diff --git a/lib/fcs/FSharp.Compiler.Service.dll b/lib/fcs/FSharp.Compiler.Service.dll index f5a4e6d847..1654a1c4b4 100644 Binary files a/lib/fcs/FSharp.Compiler.Service.dll and b/lib/fcs/FSharp.Compiler.Service.dll differ diff --git a/lib/fcs/FSharp.Compiler.Service.xml b/lib/fcs/FSharp.Compiler.Service.xml index 4c7c0a8717..558d8334c3 100644 --- a/lib/fcs/FSharp.Compiler.Service.xml +++ b/lib/fcs/FSharp.Compiler.Service.xml @@ -5,3277 +5,3277 @@ Consider using 'yield!' instead of 'yield'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:31) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:31) The byref pointer is readonly, so this write is not permitted. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1435) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1435) The value '%s' is not accessible from this code location - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:943) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:943) The union cases or fields of the type '%s' are not accessible from this code location - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:942) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:942) The union case '%s' is not accessible from this code location - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:944) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:944) The value or constructor '%s' is not defined. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:8) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:8) The value, namespace, type or module '%s' is not defined. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:9) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:9) The value, constructor, namespace or type '%s' is not defined. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:7) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:7) The type parameter %s is not defined. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:16) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:16) The type '%s' is not defined in '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:12) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:12) The type '%s' is not defined. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:11) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:11) Maybe you want one of the following: - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:15) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:15) The record label or namespace '%s' is not defined. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:13) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:13) The record label '%s' is not defined. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:14) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:14) The pattern discriminator '%s' is not defined. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:17) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:17) The namespace or module '%s' is not defined. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:5) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:5) The namespace '%s' is not defined. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:4) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:4) The field, constructor or member '%s' is not defined. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:6) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:6) The constructor, module or namespace '%s' is not defined. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:10) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:10) The type '%s' implements 'System.IComparable'. Consider also adding an explicit override for 'Object.Equals' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:171) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:171) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:172) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:172) The signature and implementation are not compatible because the respective type parameter counts differ - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:167) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:167) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:170) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:170) The signature and implementation are not compatible because the declaration of the type parameter '%s' requires a constraint of the form %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:169) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:169) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:168) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:168) The override for '%s' was ambiguous - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:187) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:187) The override '%s' implements more than one abstract slot, e.g. '%s' and '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:190) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:190) No implementations of '%s' had the correct number of arguments and type parameters. The required signature is '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:186) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:186) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:195) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:195) No implementation was given for '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:194) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:194) The interface '%s' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:192) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:192) A named argument has been assigned more than one value - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:193) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:193) More than one override implements '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:188) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:188) The namespace or module attributes differ between signature and implementation - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:184) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:184) The method '%s' is sealed and cannot be overridden - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:189) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:189) This method is over-constrained in its type parameters - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:185) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:185) The member '%s' matches multiple overloads of the same method.\nPlease restrict it to one of the following:%s. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1342) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1342) The member '%s' does not have the correct number of method type parameters. The required signature is '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:197) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:197) The member '%s' does not have the correct number of arguments. The required signature is '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:196) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:196) The member '%s' does not have the correct kinds of generic parameters. The required signature is '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:198) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:198) The member '%s' cannot be used to implement '%s'. The required signature is '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:199) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:199) Invalid value - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:166) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:166) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:173) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:173) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:174) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:174) The struct, record or union type '%s' has an explicit implementation of 'Object.Equals'. Consider implementing a matching override for 'Object.GetHashCode()' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:175) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:175) Duplicate or redundant interface - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:191) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:191) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:162) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:162) Could not resolve the ambiguity in the use of a generic construct with an 'unmanaged' constraint at or near this position - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1057) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1057) Could not resolve the ambiguity inherent in the use of a 'printf'-style format string - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:163) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:163) Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:164) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:164) Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:165) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:165) The type '%s' is not accessible from this code location - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:941) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:941) union case - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:916) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:916) property - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:921) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:921) patvar - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:926) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:926) and %d other overloads - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:915) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:915) namespace/module - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:929) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:929) namespace - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:927) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:927) module - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:928) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:928) generated type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:933) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:933) generated property - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:932) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:932) Full name - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:911) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:911) also from %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:931) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:931) from %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:930) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:930) field - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:919) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:919) extension - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:922) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:922) event - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:920) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:920) custom operation - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:923) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:923) Calls - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1246) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1246) argument - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:924) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:924) anonymous record field - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:925) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:925) active recognizer - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:918) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:918) active pattern result - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:917) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:917) \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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:32) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:32) The specified .NET Framework version '%s' is not supported. Please specify a value from the enumeration Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1099) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1099) Unexpected Expr.TyChoose - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:951) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:951) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:952) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:952) The 'VolatileField' attribute may only be used on 'let' bindings in classes - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:656) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:656) Volatile fields must be marked 'mutable' and cannot be thread-static - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:711) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:711) A declaration may only be given a value in a signature if the declaration has the [<Literal>] attribute - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:709) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:709) In sequence expressions, multiple results are generated using 'yield!' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:631) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:631) Character range matches have been removed in F#. Consider using a 'when' pattern guard instead. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:564) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:564) 'use' expressions may not be used in queries - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1263) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1263) The use of 'let! x = coll' in sequence expressions is not permitted. Use 'for x in coll' instead. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:629) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:629) This declaration is not supported in recursive declaration groups - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1332) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1332) This attribute cannot be used in this version of F# - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:683) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:683) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1266) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1266) Arguments to query operators may require parentheses, e.g. 'where (x > y)' or 'groupBy (x.Length / 10)' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1274) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1274) Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:673) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:673) The unnamed arguments do not form a prefix of the arguments of the method called - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:650) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:650) Unknown union case - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:503) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:503) Unit-of-measure cannot be used in type constructor application - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:540) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:540) This union case takes one argument - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:558) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:558) The union case named '%s' conflicts with the generated type '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1078) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1078) Union case/exception field '%s' cannot be used more than once. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1301) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1301) This union case expects %d arguments in tupled form - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:559) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:559) This union case does not take arguments - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:557) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:557) The union case '%s' does not have a field named '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1297) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1297) Uninitialized 'val' fields must be mutable and marked with the '[<DefaultValue>]' attribute. Consider using a 'let' binding instead of a 'val' field. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:712) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:712) Unexpected type arguments - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:549) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:549) Unexpected %s in type expression - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:543) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:543) Unexpected / in type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:548) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:548) Unexpected source-level property specification - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:514) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:514) Unexpected source-level property specification in syntax tree - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:508) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:508) Unexpected SynMeasure.Anon - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:464) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:464) Unexpected expression at recursive inference point - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:493) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:493) Unexpected Const_uint16array - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:469) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:469) Unexpected Const_bytearray - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:470) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:470) Unexpected condition in imported assembly: failed to decode AttributeUsage attribute - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:672) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:672) Unexpected big rational constant - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:467) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:467) The field '%s' has been given a value, but is not present in the type '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:596) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:596) Unable to parse format string '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:574) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:574) Types cannot inherit from multiple concrete types - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:762) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:762) Types cannot contain nested type definitions - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:742) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:742) Struct types are always sealed - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:774) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:774) Record types are always sealed - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:772) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:772) Enum types are always sealed - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:776) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:776) Delegate types are always sealed - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:775) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:775) Discriminated union types are always sealed - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:771) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:771) Assembly code types are always sealed - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:773) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:773) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:799) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:799) This type test or downcast will erase the provided type '%s' to the type '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1185) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1185) This type test or downcast will ignore the unit-of-measure '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1090) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1090) This type test with a provided type '%s' is not allowed because this provided type will be erased to '%s' at runtime. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1187) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1187) This type requires a definition - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:759) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:759) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:498) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:498) Type parameter cannot be used as type constructor - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:544) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:544) This type parameter has been used in a way that constrains it to always be '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:497) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:497) This value, type or method expects %d type parameter(s) but was given %d - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:520) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:520) type or module - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:744) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:744) The type '%s' is not an interface type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:719) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:719) This type is not an interface type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:737) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:737) This type is not a record type. Values of class and struct types must be created using calls to object constructors. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:624) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:624) This type is not a record type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:625) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:625) This type is not accessible from this code location - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:671) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:671) This type has no nested types - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:542) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:542) This type has no accessible object constructors - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:634) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:634) type, exception or module - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:743) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:743) This type does not inherit Attribute, it will not work correctly with other .NET languages. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1451) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1451) Type definitions may only have one 'inherit' specification and it must be the first declaration - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:792) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:792) 'let' and 'do' bindings must come before member and interface definitions in type definitions - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:793) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:793) This type definition involves an immediate cyclic reference through a struct field or inheritance relation - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:788) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:788) This type definition involves an immediate cyclic reference through an abbreviation - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:787) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:787) This downcast will erase the provided type '%s' to the type '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1186) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1186) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:527) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:527) Type abbreviations cannot have members - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:726) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:726) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:727) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:727) Type abbreviations cannot have interface declarations - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:735) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:735) Type abbreviations cannot have augmentations - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:797) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:797) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:760) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:760) One tuple type is a struct tuple, the other is a reference tuple - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1325) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1325) This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1431) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1431) 'try/with' expressions may not be used in queries - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1267) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1267) 'try'/'with' cannot be used within sequence expressions - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:630) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:630) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:710) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:710) This member, function or value declaration may not be declared 'inline' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1272) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1272) This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1254) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1254) Invalid provided field. Provided fields of erased provided types must be literals. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1283) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1283) The syntax 'expr.id' may only be used with record labels, properties and fields - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:645) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:645) Syntax error - unexpected '?' symbol - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:566) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:566) '%s' may only be used to construct object types - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:594) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:594) The struct, record or union type '%s' has the 'StructuralEquality' attribute but the component type '%s' does not satisfy the 'equality' constraint - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1035) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1035) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1034) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1034) The struct, record or union type '%s' has the 'StructuralComparison' attribute but the component type '%s' does not satisfy the 'comparison' constraint - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1029) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1029) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1028) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1028) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1036) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1036) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:731) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:731) Structs cannot contain 'do' bindings because the default constructor for structs would not execute these bindings - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:730) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:730) Structs, interfaces, enums and delegates cannot inherit from other types - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:761) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:761) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:702) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:702) Structs may only bind a 'this' parameter at member declarations - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:492) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:492) If a union type has more than one case and is a struct, then all fields within the union type must be given unique names. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1334) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1334) Struct types cannot contain abstract members - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:781) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:781) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:713) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:713) Static optimization conditionals are only for use within the F# library - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:651) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:651) This static member should not have a 'this' parameter. Consider using the notation 'member Member(args) = ...'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:511) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:511) Static value definitions may only be used in types with a primary constructor. Consider adding arguments to the type definition, e.g. 'type X(args) = ...'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:732) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:732) Interfaces cannot contain definitions of static initializers - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:697) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:697) A static initializer requires an argument - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:509) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:509) A static field was used where an instance field is expected - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:460) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:460) A simple method name is required here - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:604) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:604) In sequence expressions, results are generated using 'yield' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:466) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:466) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1296) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1296) Return values cannot have names - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:472) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:472) Return types of union cases must be identical to the type being defined, up to abbreviations - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:717) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:717) 'return' and 'return!' may not be used in queries - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1265) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1265) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:789) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:789) This is not a variable, constant, active recognizer or literal - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:562) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:562) This control construct may only be used if the computation expression builder defines a '%s' method - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:541) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:541) Only active patterns returning exactly one result may accept arguments - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:554) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:554) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:767) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:767) Recursive bindings that include member specifications can only occur as a direct augmentation of a type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:704) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:704) Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:763) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:763) This record contains fields from inconsistent types - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:490) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:490) The 'rec' on this module is implied by an outer 'rec' declaration and is being ignored - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1329) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1329) A property cannot have explicit type parameters. Consider using a method instead. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:505) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:505) This property or field was not found on this custom attribute type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:678) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:678) Property '%s' is static - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:642) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:642) Property '%s' is not static - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:639) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:639) Property '%s' is not readable - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:640) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:640) Property '%s' cannot be set - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:643) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:643) This property cannot be set - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:677) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:677) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:605) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:605) A parameter with attributes must also be given a name, e.g. '[<Attribute>] Name : Type' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:471) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:471) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1053) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1053) You must explicitly declare either all or no type parameters when overriding a generic abstract method - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:500) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:500) Accessibility modifiers are not permitted on overrides or interface implementations - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:770) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:770) This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:%s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:689) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:689) One or more of the overloads of this method has curried arguments. Consider redesigning these members to take arguments in tupled form. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:649) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:649) Optional arguments cannot be used in custom attributes - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:676) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:676) Optional arguments are only permitted on type members - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:550) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:550) Optional arguments must come at the end of the argument list, after any non-optional arguments - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1071) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1071) '%s' must be followed by 'in'. Usage: %s. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1290) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1290) Incorrect syntax for '%s'. Usage: %s. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1218) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1218) The operator '%s' does not accept the use of 'into' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1252) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1252) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:724) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:724) In a recursive declaration group, 'open' declarations must come first in each module - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1330) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1330) Only types representing units-of-measure may be given the 'Measure' attribute - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:769) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:769) Only structs and classes without primary constructors may be given the 'StructLayout' attribute - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:766) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:766) Only simple variable patterns can be bound in 'let rec' constructs - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:705) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:705) Only simple bindings of the form 'id = expr' can be used in construction expressions - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:611) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:611) Only record fields and simple, non-recursive 'let' bindings may be marked mutable - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:706) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:706) Only functions may be marked 'inline' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:665) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:665) Only classes may be given the 'AbstractClass' attribute - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:768) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:768) Objects must be initialized by an object construction expression that calls an inherited object constructor and assigns a value to each field - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:612) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:612) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:585) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:585) Only overrides of abstract and virtual members may be specified in object expressions - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:599) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:599) This form of object expression is not used in F#. Use 'member this.MemberName ... = ...' to define member implementations in object expressions. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:515) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:515) Calls to object constructors on type parameters cannot be given arguments - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:587) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:587) Interfaces cannot contain definitions of object constructors - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:698) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:698) An object constructor requires an argument - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:510) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:510) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:622) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:622) Object construction expressions may only be used to implement constructors in class types - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:610) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:610) This numeric literal requires that a module '%s' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:618) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:618) This is not a valid name for an enumeration case - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:578) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:578) This code is not sufficiently generic. The type variable %s could not be generalized because it would escape its scope. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:504) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:504) Not an exception - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:752) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:752) Non-zero constants cannot have generic units. For generic zero, write 0.0<_>. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:465) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:465) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1054) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1054) This 'let' definition may not be used in a query. Only simple value definitions may be used in queries. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1268) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1268) This value is not a literal and cannot be used in a pattern - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:523) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:523) 'while' expressions may not be used in queries - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1261) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1261) 'try/finally' expressions may not be used in queries - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1262) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1262) No abstract property was found that corresponds to this override - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:692) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:692) No abstract or interface member was found that corresponds to this override - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:688) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:688) Interface implementations cannot be given on construction expressions - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:609) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:609) In queries, use the form 'for x in n .. m do ...' for ranging over integers - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1260) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1260) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1033) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1033) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1032) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1032) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1031) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1031) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1030) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1030) No arguments may be given when constructing a record value - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:608) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:608) The member '%s' does not correspond to any abstract or virtual method available to override or implement. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:600) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:600) 'new' may only be used with object constructors - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:616) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:616) 'new' must be used with a named type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:606) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:606) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:696) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:696) This new member hides the abstract member '%s'. Rename the member or use 'override' instead. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:695) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:695) 'new' cannot be used on interface types. Consider using an object expression '{ new ... with ... }' instead. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:591) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:591) Namespaces cannot contain values. Consider using a module to hold your value declarations. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:474) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:474) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:475) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:475) '%s' may only be used with named types - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:589) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:589) Named arguments cannot be given to member trait calls - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:577) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:577) The named argument '%s' did not match any argument or mutable property - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:648) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:648) %s is an active pattern and cannot be treated as a discriminated union case with named fields. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1339) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1339) Name '%s' not bound in pattern context - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:551) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:551) Named arguments must appear after all other arguments - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:525) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:525) Mutable function values should be written 'let mutable f = (fun args -> ...)' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:664) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:664) Mutable values cannot have generic parameters - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:663) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:663) Mutable values cannot be marked 'inline' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:662) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:662) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:477) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:477) Multiple visibility attributes have been specified for this identifier - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:476) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:476) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:723) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:723) The path '%s' is a namespace. A module abbreviation may not abbreviate a namespace. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:798) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:798) In a recursive declaration group, module abbreviations must come after all 'open' declarations and before other declarations - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1331) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1331) A custom query operation for '%s' is required but not specified - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1199) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1199) Method overrides and interface implementations are not permitted here - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:687) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:687) Method '%s' is not accessible from this code location - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:461) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:461) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:790) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:790) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:800) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:800) Interfaces cannot contain definitions of member overrides - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:699) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:699) Extension members cannot provide operator overloads. Consider defining the operator as part of the type definition instead. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1074) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1074) This member is not permitted in an interface implementation - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:740) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:740) MemberKind.PropertyGetSet only expected in parse trees - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:473) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:473) This member is not sufficiently generic - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:707) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:707) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:601) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:601) A member and a local class binding both have the name '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:734) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:734) Measure definitions cannot have type parameters - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:758) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:758) Measure declarations may have only static members: constructors are not available - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:733) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:733) Measure declarations may have only static members - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:729) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:729) 'match' expressions may not be used in queries - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1287) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1287) This lookup cannot be used here - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:641) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:641) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:725) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:725) This literal pattern does not take arguments - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1319) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1319) Literal values cannot have generic parameters - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:669) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:669) A literal value cannot be marked 'mutable' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:667) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:667) A literal value cannot be marked 'inline' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:668) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:668) A declaration may only be the [<Literal>] attribute if a constant value is also given, e.g. 'val x : int = 1' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:708) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:708) This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:575) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:575) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:796) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:796) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:494) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:494) The kind of the type specified by its attributes does not match the kind implied by its definition - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:757) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:757) In queries, '%s' must use a simple pattern - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1198) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1198) A type annotated with IsReadOnly must also be a struct. Consider adding the [<Struct>] attribute to the type. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1442) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1442) Invalid use of a type name - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:633) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:633) Invalid use of an interface type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:637) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:637) Invalid use of a delegate constructor. Use the syntax 'new Type(args)' or just 'Type(args)'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:638) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:638) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1052) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1052) 'use' bindings must be of the form 'use <var> = <expr>' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:685) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:685) 'use!' bindings must be of the form 'use! <var> = <expr>' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1085) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1085) Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:539) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:539) Units-of-measure supported only on float, float32, decimal and signed integer types - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:468) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:468) Literal enumerations must have type int, uint, int16, uint16, int64, uint64, byte, sbyte or char - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:785) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:785) Invalid type extension - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:755) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:755) Type arguments cannot be specified here - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:553) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:553) The number of type arguments did not match: '%d' given, '%d' expected. This may be related to a previously reported error. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1192) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1192) Invalid signature for set member - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:694) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:694) Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:572) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:572) Invalid join relation in '%s'. Expected 'expr <op> expr', where <op> is =, =?, ?= or ?=?. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1245) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1245) Invalid record construction - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:619) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:619) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:534) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:534) This is not a valid pattern - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:563) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:563) Invalid optional assignment to a property or field - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:653) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:653) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:482) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:482) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:483) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:483) The '%s' operator should not normally be redefined. Consider using a different operator name - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:484) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:484) Invalid object, sequence or record expression - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:571) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:571) Invalid object expression. Objects without overrides or interfaces should use the expression form 'new Type(args)' without braces. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:570) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:570) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:529) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:529) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:552) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:552) 'new' constraints must take one argument of type 'unit' and return the constructed type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:533) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:533) Invalid namespace, module, type or union case name - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:715) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:715) Invalid module name - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:754) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:754) This recursive binding uses an invalid mixture of recursive forms - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:528) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:528) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:478) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:478) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:479) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:479) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:481) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:481) Invalid member name. Members may not have name '.ctor' or '.cctor' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1190) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1190) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:480) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:480) Invalid inline specification - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:684) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:684) Invalid indexer expression - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:584) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:584) The '%s' operator cannot be redefined. Consider using a different operator name - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:485) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:485) Internal error. Invalid index into active pattern array - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:556) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:556) This is not a valid value for an enumeration literal - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:718) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:718) An 'enum' constraint must be of the form 'enum<type>' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:532) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:532) Delegate specifications must be of the form 'typ -> typ' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:783) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:783) Invalid declaration - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:516) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:516) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:531) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:531) Invalid constraint - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:530) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:530) This is not a valid constant expression - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:670) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:670) Invalid assignment - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:632) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:632) Invalid argument to parameterized pattern label - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:555) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:555) This is not a valid name for an active pattern - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:660) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:660) A use of 'into' must be followed by the remainder of the computation - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1251) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1251) Interfaces inherited by other interfaces should be declared using 'inherit ...' instead of 'interface ...' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1063) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1063) Interface types cannot be sealed - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:782) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:782) Interface types and delegate types cannot contain fields - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:777) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:777) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:507) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:507) The inherited type is not an object model type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:621) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:621) A inheritance declaration is not permitted here - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:722) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:722) This 'inherit' declaration specifies the inherited type but no arguments. Consider supplying arguments, e.g. 'inherit BaseType(args)'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:794) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:794) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:795) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:795) 'inherit' cannot be used on interface types. Consider implementing the interface by using 'interface ... with ... end' instead. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:590) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:590) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1191) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1191) Implicit product of measures following / - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:463) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:463) The struct, record or union type '%s' implements the interface 'System.IStructuralEquatable' explicitly. Apply the 'CustomEquality' attribute to the type. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:745) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:745) The struct, record or union type '%s' implements the interface 'System.IStructuralComparable' explicitly. Apply the 'CustomComparison' attribute to the type. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:489) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:489) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:746) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:746) The struct, record or union type '%s' implements the interface 'System.IComparable' explicitly. You must apply the 'CustomComparison' attribute to the type. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:487) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:487) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:488) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:488) Illegal syntax in type expression - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:545) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:545) This is not valid literal expression. The [<Literal>] attribute will be ignored. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1305) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1305) Illegal pattern - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:565) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:565) Explicit type declarations for constructors must be of the form 'ty1 * ... * tyN -> resTy'. Parentheses may be required around 'resTy' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:716) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:716) A literal value cannot be given the [<ThreadStatic>] or [<ContextStatic>] attributes - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:666) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:666) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1208) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1208) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:593) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:593) The system type '%s' was required but no referenced system DLL contained this type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1341) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1341) Generic types cannot be given the 'StructLayout' attribute - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:765) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:765) A generic type parameter has been used in a way that constrains it to always be '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:496) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:496) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1294) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1294) The generic function '%s' must be given explicit type argument(s) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:518) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:518) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:526) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:526) The corresponding formal argument is not optional - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:652) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:652) Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1336) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1336) The field labels and expected type of this record expression or pattern do not uniquely determine a corresponding record type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:501) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:501) A field/val declaration is not permitted here - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:721) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:721) This field requires a name - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:714) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:714) No assignment given for field '%s' of type '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:597) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:597) This field is not a literal and cannot be used in a pattern - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:561) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:561) Named field '%s' is used more than once. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1302) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1302) Named field '%s' conflicts with autogenerated name for anonymous field. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1303) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1303) This field is readonly - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:524) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:524) Field '%s' is not static - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:560) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:560) This field is not mutable - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:579) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:579) The field '%s' appears twice in this record expression or pattern - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:502) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:502) All record, union and struct types in FSharp.Core.dll must be explicitly labelled with 'StructuralComparison' or 'NoComparison' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1027) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1027) Extraneous fields have been given values - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:598) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:598) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:573) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:573) This expression form may only be used in sequence and computation expressions - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:569) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:569) The expression form { expr with ... } may only be used with record types. To build object types use { new Type(...) with ... } - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:620) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:620) The expression form 'expr then expr' may only be used as part of an explicit object constructor - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:576) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:576) Expected %d expressions, got %d - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:567) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:567) TcExprUndelayed: delayed - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:568) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:568) Explicit type specifications cannot be used for exception constructors - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:747) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:747) Explicit type parameters may only be used on module or member bindings - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:499) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:499) An explicit static initializer should use the syntax 'static new(args) = expr' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:512) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:512) An explicit object constructor should use the syntax 'new(args) = expr' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:513) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:513) Expected unit-of-measure, not type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:538) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:538) Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [<Measure>] attribute. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:535) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:535) Expected type parameter, not unit-of-measure parameter - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:536) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:536) Expected type, not unit-of-measure - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:537) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:537) Expected an interface type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:613) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:613) Expected module or namespace parent %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:486) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:486) The exception '%s' does not have a field named '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1298) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1298) Exception abbreviations should not have argument lists - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:748) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:748) Exception abbreviations must refer to existing exceptions or F# types deriving from System.Exception - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:750) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:750) Event '%s' is static - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:646) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:646) Event '%s' is not static - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:647) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:647) Enumerations cannot have members - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:728) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:728) Enumerations cannot have interface declarations - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:736) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:736) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1087) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1087) The 'EntryPointAttribute' attribute may only be used on function definitions in modules - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:661) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:661) '{ }' 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:623) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:623) Copy-and-update record expressions must include at least one field. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1292) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1292) Duplicate specification of an interface - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:720) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:720) The method or function '%s' should not be given explicit type argument(s) because it does not declare its type parameters explicitly - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:519) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:519) 'do!' cannot be used within sequence expressions - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:628) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:628) DLLImport stubs cannot be inlined - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:491) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:491) DLLImport bindings must be static members in a class or function definitions in a module - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1080) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1080) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:784) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:784) A delegate constructor must be passed a single function value - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:654) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:654) The 'DefaultValue' attribute may only be used on 'val' declarations - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:658) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:658) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:521) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:521) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:739) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:739) This method already has a default implementation - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:690) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:690) The method implemented by this default is ambiguous - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:691) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:691) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:791) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:791) This declaration element is not permitted in an augmentation - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:741) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:741) '%s' is not used correctly. Usage: %s. This is a custom operation in this query or computation expression. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1213) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1213) '%s' is not used correctly. This is a custom operation in this query or computation expression. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1212) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1212) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1205) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1205) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1206) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1206) The custom operation '%s' refers to a method which is overloaded. The implementations of custom operations may not be overloaded. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1207) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1207) The definition of the custom operator '%s' does not use a valid combination of attribute flags - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1253) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1253) '%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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1220) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1220) A custom attribute must invoke an object constructor - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:681) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:681) A custom attribute must be a reference type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:679) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:679) The number of args for a custom attribute does not match the expected number of args for the attribute constructor - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:680) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:680) Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1337) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1337) Couldn't find Dispose on IDisposable, or it was overloaded - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:522) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:522) The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1454) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1454) Constructors are not permitted as extension members - they must be defined as part of the original definition of the type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1320) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1320) Constructors cannot be defined for this type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:703) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:703) Constructors cannot be specified in exception augmentations - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:701) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:701) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:644) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:644) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:595) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:595) This object constructor requires arguments - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:615) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:615) Constructor expressions for interfaces do not take arguments - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:614) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:614) The constructor does not have a field named '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1300) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1300) A constructor cannot have explicit type parameters. Consider using a static construction method instead. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:506) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:506) This construct may only be used within sequence or computation expressions - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:582) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:582) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:580) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:580) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:581) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:581) This construct may only be used within computation expressions - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:583) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:583) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:627) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:627) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:626) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:626) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:495) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:495) Attribute 'System.Diagnostics.ConditionalAttribute' is only valid on methods or attribute classes - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1072) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1072) The 'ConditionalAttribute' attribute may only be used on members - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:659) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:659) Interfaces cannot contain definitions of concrete members. You may need to define a constructor on your type to indicate that the type is a class. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:700) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:700) The 'CompiledName' attribute cannot be used with this language element - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:588) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:588) Cannot partially apply the extension method '%s' because the first parameter is a byref type. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1450) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1450) Cannot override inherited member '%s' because it is sealed - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1193) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1193) Cannot inherit from a variable type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:586) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:586) Cannot inherit a sealed type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:779) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:779) Cannot inherit from interface type. Use interface ... with instead. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:780) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:780) Cannot inherit from erased provided type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1188) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1188) Cannot create an extension of a sealed type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:607) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:607) Cannot call the byref extension method '%s. The first parameter requires the value to be mutable or a non-readonly byref type. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1448) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1448) Cannot call an abstract base member: '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1056) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1056) '%s' must be applied to an argument of type '%s', but has been applied to an argument of type '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1096) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1096) '%s' can only be applied to optional arguments - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1097) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1097) Byref types are not allowed to have optional type extensions. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1449) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1449) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1437) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1437) A type annotated with IsByRefLike must also be a struct. Consider adding the [<Struct>] attribute to the type. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1438) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1438) A binding cannot be marked both 'use' and 'rec' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:655) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:655) 'let!', 'use!' and 'do!' expressions may not be used in queries - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1264) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1264) '%s' must be followed by a variable name. Usage: %s. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1217) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1217) '%s' must come after a 'for' selection clause and be followed by the rest of the query. Syntax: ... %s ... - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1219) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1219) '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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1255) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1255) The attributes of this type specify multiple kinds for the type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:756) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:756) Attributes are not allowed within patterns - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:517) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:517) Attributes are not permitted on 'let' bindings in expressions - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:657) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:657) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:674) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:674) This attribute is not valid for use on this language element - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:675) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:675) Attribute expressions must be calls to object constructors - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:682) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:682) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:803) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:803) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1055) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1055) At least one override did not correctly implement its corresponding abstract member - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:617) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:617) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:603) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:603) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:602) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:602) Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:546) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:546) Anonymous type variables are not permitted in this declaration - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:547) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:547) Two anonymous record types have mismatched sets of field names '%s' and '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1346) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1346) Two anonymous record types are from different assemblies '%s' and '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1345) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1345) Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:764) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:764) All implemented interfaces should be declared on the initial declaration of the type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:738) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:738) Active patterns do not have fields. This syntax is invalid. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1299) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1299) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:592) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:592) This property overrides or implements an abstract property but the abstract property doesn't have a corresponding %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:693) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:693) Abstract members are not permitted in an augmentation - they must be defined as part of the type itself - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:686) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:686) Abbreviations for Common IL exception types must have a matching object constructor - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:751) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:751) Abbreviations for Common IL exceptions cannot take arguments - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:749) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:749) Abbreviated types cannot be given the 'Sealed' attribute - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:778) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:778) F# supports array ranks between 1 and 32. The value %d is not allowed. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1259) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1259) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:85) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:85) A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1441) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1441) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:87) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:87) This value does not have a valid property setter type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:81) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:81) Unexpected decode of InternalsVisibleToAttribute - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:92) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:92) Unexpected decode of InterfaceDataVersionAttribute - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:93) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:93) Unexpected decode of AutoOpenAttribute - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:91) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:91) Unexpected use of a byref-typed variable - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:84) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:84) The module/namespace '%s' from compilation unit '%s' did not contain the val '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1050) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1050) The module/namespace '%s' from compilation unit '%s' did not contain the namespace, module or type '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1051) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1051) The module/namespace '%s' from compilation unit '%s' did not contain the module/namespace '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1049) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1049) The type/module '%s' is not a concrete module or type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:74) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:74) The type '%s' has an inline assembly code representation - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:75) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:75) Two modules named '%s' occur in two parts of this assembly - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:77) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:77) Recursively defined values cannot appear directly as part of the construction of a tuple value within a recursive binding - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:88) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:88) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:90) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:90) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:89) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:89) This is not a valid constant expression or custom attribute value - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:95) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:95) A namespace and a module named '%s' both occur in two parts of this assembly - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:76) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:76) Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:86) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:86) Invalid member signature encountered because of an earlier error - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:80) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:80) Invalid form for a property setter. At least one argument is required. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:83) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:83) Invalid form for a property getter. At least one '()' argument is required when using the explicit syntax. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:82) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:82) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1043) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1043) Two type definitions named '%s' occur in namespace '%s' in two parts of this assembly - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:78) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:78) This literal expression or attribute argument results in an arithmetic overflow. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1304) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1304) A module and a type definition named '%s' occur in namespace '%s' in two parts of this assembly - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:79) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:79) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1447) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1447) Active patterns cannot return more than 7 possibilities - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:94) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:94) The struct or class field '%s' is not accessible from this code location - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:946) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:946) Source file is too large to embed in a portable PDB - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:851) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:851) @@ -3286,2766 +3286,2766 @@ Consider using 'return!' instead of 'return'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:30) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:30) Replace with '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:18) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:18) Recursive class hierarchy in type '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:938) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:938) A ReadOnly attribute has been applied to a struct type with a mutable field. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1436) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1436) Unexpected token '%s' in preprocessor expression - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1311) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1311) Missing token '%s' in preprocessor expression - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1313) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1313) Incomplete preprocessor expression - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1312) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1312) Unexpected character '%s' in preprocessor expression - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1310) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1310) Expected single line comment or end of line - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1023) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1023) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1430) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1430) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1314) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1314) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:73) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:73) A pattern match guard must be of type 'bool', but this 'when' expression is of type '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:26) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:26) Problem with filename '%s': Illegal characters in path. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1135) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1135) Partial active patterns may only generate one result - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:956) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:956) Missing variable '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:955) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:955) Missing 'do' in 'while' expression. Expected 'while <expr> do <expr>'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1243) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1243) Accessibility modifiers are not permitted on an 'inherits' declaration - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:411) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:411) Accessibility modifiers should come immediately prior to the identifier naming a construct - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:382) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:382) 'use' bindings are not permitted in modules and are treated as 'let' bindings - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:375) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:375) 'use' bindings are not permitted in primary constructors - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:374) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:374) Unmatched 'with' or badly formatted 'with' block - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:398) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:398) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1241) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1241) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1242) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1242) Unmatched '(' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:424) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:424) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1240) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1240) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1239) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1239) Unmatched '[<'. Expected closing '>]' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1223) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1223) Unmatched 'class', 'interface' or 'struct' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:396) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:396) Unmatched '[|' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:440) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:440) Unmatched '[' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:435) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:435) Unmatched '{|' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:442) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:442) Unmatched '{' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:441) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:441) Unmatched 'begin' or 'struct' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:389) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:389) Unmatched 'begin' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:401) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:401) Unmatched '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:439) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:439) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:419) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:419) Unexpected token '%s' or incomplete expression - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1279) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1279) Accessibility modifiers are not permitted here, but '%s' was given. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:380) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:380) Syntax error: unexpected type parameter specification - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:452) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:452) Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead? - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1344) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1344) A semicolon is not expected at this point - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:378) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:378) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1093) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1093) Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:450) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:450) Unexpected integer literal in unit-of-measure expression - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:451) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:451) Unexpected infix operator in type expression - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:447) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:447) Unexpected identifier: '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:418) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:418) Unexpected end of input in 'match' or 'try' expression - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1228) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1228) Unexpected end of input in 'while' expression. Expected 'while <expr> do <expr>'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1226) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1226) Unexpected end of input in type signature - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1233) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1233) Unexpected end of input in type definition - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1234) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1234) Unexpected end of input in type arguments - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1232) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1232) Unexpected end of input in 'try' expression. Expected 'try <expr> with <rules>' or 'try <expr> finally <expr>'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1225) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1225) Unexpected end of input in 'then' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1229) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1229) Unexpected end of input in object members - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1235) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1235) Unexpected end of input in 'match' expression. Expected 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1224) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1224) Unexpected end of input in body of lambda expression. Expected 'fun <pat> ... <pat> -> <expr>'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1231) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1231) Unexpected end of input in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1227) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1227) Unexpected end of input in expression - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1237) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1237) Unexpected end of input in 'else' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1230) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1230) Unexpected end of input in value, function or member definition - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1236) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1236) Unexpected end of input - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:379) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:379) Unexpected empty type moduleDefn list - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:391) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:391) '_' cannot be used as field name - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1293) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1293) Unclosed block - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:388) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:388) Type name cannot be empty. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1281) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1281) Type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:404) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:404) Accessibility modifiers are not permitted in this position for type abbreviations - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:414) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:414) The syntax 'module ... = struct .. end' is not used in F# code. Consider using 'module ... = begin .. end' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:458) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:458) The syntax 'module ... : sig .. end' is not used in F# code. Consider using 'module ... = begin .. end' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:459) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:459) Syntax error in labelled type argument - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:446) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:446) Syntax error - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:394) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:394) Successive patterns should be separated by spaces or tupled - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:425) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:425) Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:434) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:434) A setter property may have at most two argument groups - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1040) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1040) Property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... ' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:407) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:407) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:422) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:422) In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:437) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:437) At most one 'with' augmentation is permitted - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:377) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:377) Only '#' compiler directives may occur prior to the first 'namespace' declaration - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:381) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:381) Only class types may take value arguments - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:400) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:400) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1046) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1046) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1044) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1044) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1045) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1045) No matching 'in' found for this 'let' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:426) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:426) No #endif found for #if or #else - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:372) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:372) No '=' symbol should follow a 'namespace' declaration - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:457) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:457) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:383) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:383) To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1257) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1257) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1256) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1256) Multiple accessibilities given for property getter or setter - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:406) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:406) The syntax '(typ,...,typ) ident' is not used in F# code. Consider using 'ident<typ,...,typ>' instead - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:448) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:448) A module name must be a simple name, not a path - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:390) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:390) A module abbreviation must be a simple name, not a path - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:384) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:384) Expected type argument or static argument - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1091) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1091) Missing qualification after '.' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:436) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:436) Unmatched '<'. Expected closing '>' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1092) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1092) Missing function body - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:445) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:445) Mismatched quotation, beginning with '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:438) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:438) Mismatched quotation operator name, beginning with '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:453) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:453) This member is not permitted in an object implementation - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:444) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:444) The declaration form 'let ... and ...' for non-recursive bindings is not used in F# code. Consider using a sequence of 'let' bindings - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:423) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:423) Invalid use of 'rec' keyword - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1333) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1333) Invalid property getter or setter - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1041) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1041) Invalid operator definition. Prefix operator definitions must use a valid prefix operator name. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1065) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1065) Invalid prefix operator - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1064) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1064) Invalid literal in type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:449) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:449) Invalid declaration syntax - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:402) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:402) Invalid anonymous record type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1453) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1453) Invalid anonymous record expression - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1452) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1452) Interfaces always have the same visibility as the enclosing type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:408) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:408) An integer for loop must use a simple identifier - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:376) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:376) Accessibility modifiers are not permitted on inline assembly code types - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:417) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:417) '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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:412) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:412) An indexer property must be given at least one argument - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1042) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1042) Incomplete conditional. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:429) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:429) 'in' or '=' expected - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:432) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:432) Neither 'member val' nor 'override val' definitions are permitted in object expressions. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1291) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1291) Denominator must not be 0 in unit-of-measure exponent - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:456) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:456) The '%s' visibility attribute is not allowed on module abbreviation. Module abbreviations are always private. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:387) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:387) The '%s' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:386) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:386) Ignoring attributes on module abbreviation - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:385) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:385) Identifier expected - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:431) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:431) A getter property is expected to be a function, e.g. 'get() = ...' or 'get(index) = ...' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:405) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:405) A getter property may have at most one argument group - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1039) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1039) 'get', 'set' or 'get,set' required - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:399) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:399) 'get' and/or 'set' required - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:403) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:403) Missing 'do' in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1244) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1244) Field bindings must have the form 'id = expr;' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:443) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:443) Expected a type after this point - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1222) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1222) Unexpected end of type. Expected a name after this point. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1238) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1238) Expected an expression after this point - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1221) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1221) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:428) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:428) Attempted to parse this as an operator name, but failed - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1094) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1094) Error in the return expression for this 'let'. Possible incorrect indentation. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:427) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:427) End of file in verbatim string embedded in comment begun at or before here - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:369) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:369) End of file in verbatim string begun at or before here - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:366) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:366) End of file in triple-quote string embedded in comment begun at or before here - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1089) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1089) End of file in triple-quote string begun at or before here - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1088) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1088) End of file in string embedded in comment begun at or before here - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:368) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:368) End of file in string begun at or before here - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:365) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:365) End of file in IF-OCAML section begun at or before here - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:370) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:370) End of file in #if section begun at or after here - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:364) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:364) End of file in directive begun at or before here - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:371) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:371) End of file in comment begun at or before here - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:367) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:367) Accessibility modifiers are not permitted in this position for enum types - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:415) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:415) Accessibility modifiers are not permitted on enumeration fields - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:420) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:420) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:397) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:397) Accessibility modifiers are not permitted on 'do' bindings, but '%s' was given. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:363) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:363) Consider using a separate record type instead - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:421) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:421) Augmentations are not permitted on delegate type moduleDefns - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:395) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:395) Attributes should be placed before 'val' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:392) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:392) Attributes are not permitted on 'inherit' declarations - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:410) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:410) Attributes are not allowed here - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:413) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:413) Attributes have been ignored in this construct - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:373) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:373) Attributes are not permitted on interface implementations - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:393) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:393) Cannot find code target for this attribute, possibly because the code after the attribute is incomplete. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1280) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1280) 'assert' may not be used as a first class value. Use 'assert <expr>' instead. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:430) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:430) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:433) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:433) All enum fields must be given values - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:416) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:416) Active pattern case identifiers must begin with an uppercase letter - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:454) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:454) The '|' character is not permitted in active pattern case identifiers - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:455) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:455) Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:409) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:409) Write the xmldoc of the assembly to the given file - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:835) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:835) Specify a Win32 resource file (.res) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:843) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:843) Specify a Win32 manifest file - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:844) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:844) Report all warnings as errors - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:860) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:860) Report specific warnings as errors - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:861) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:861) Enable specific warnings that may be off by default - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:864) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:864) Set a warning level (0-5) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:862) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:862) Output messages in UTF-8 encoding - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:872) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:872) Enable high-entropy ASLR - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:903) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:903) Unrecognized target '%s', expected 'exe', 'winexe', 'library' or 'module' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:882) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:882) Unrecognized debug type '%s', expected 'pdbonly' or 'full' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:883) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:883) Unrecognized platform '%s', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:897) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:897) Unknown --test argument: '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:896) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:896) Specify target framework profile of this assembly. Valid values are mscorlib, netcore or netstandard. Default - mscorlib - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:905) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:905) Enable or disable tailcalls - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:857) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:857) Specify subsystem version of this assembly - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:904) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:904) Specify a strong name key file - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:836) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:836) Specify a strong name key container - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:837) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:837) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:878) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:878) Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:877) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:877) --sourcelink switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:850) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:850) Source link information file to embed in the portable PDB file - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:848) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:848) Resolve assembly references using directory-based rules rather than MSBuild resolution - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:881) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:881) Print the inferred interface of the assembly to a file - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:841) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:841) Short form of '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:885) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:885) Response file '%s' not found in '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1322) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1322) Response file name '%s' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1323) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1323) Read response file for more options - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:870) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:870) Embed the specified managed resource - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:852) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:852) Use a resident background compilation service to improve compiler startup times. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:879) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:879) Reference an assembly (Short form: -r) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:842) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:842) Public-sign the assembly using only the public portion of the strong name key, and mark the assembly as signed - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:834) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:834) Problem with codepage '%d': %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:825) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:825) Specify the preferred output language culture name (e.g. es-ES, ja-JP) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:907) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:907) Limit which platforms this code can run on: x86, Itanium, x64, anycpu32bitpreferred, or anycpu. The default is anycpu. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:838) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:838) Name the output debug file - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:880) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:880) Enable optimizations (Short form: -O) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:856) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:856) Do not include the default Win32 manifest - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:845) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:845) Disable specific warning messages - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:863) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:863) Suppress compiler copyright message - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:868) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:868) Do not reference the default CLI assemblies by default - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:876) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:876) Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining but improves binary compatibility. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:839) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:839) Don't add a resource to the generated assembly containing F#-specific metadata - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:840) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:840) Don't copy FSharp.Core.dll along the produced binaries - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:908) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:908) Name of the output file (Short form: -o) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:828) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:828) Ignore ML compatibility warnings - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:867) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:867) Link the specified resource to this assembly where the resinfo format is <file>[,<string name>[,public|private]] - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:853) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:853) Specify a directory for the include path which is used to resolve source files and assemblies (Short form: -I) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:874) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:874) Invalid warning level '%d' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:884) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:884) Invalid value '%s' for '--targetprofile', valid values are 'mscorlib', 'netcore' or 'netstandard'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:910) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:910) Invalid version '%s' for '--subsystemversion'. The version must be 4.00 or greater. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:909) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:909) Invalid response file '%s' ( '%s' ) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1321) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1321) The command-line option '%s' is for test purposes only - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:898) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:898) - RESOURCES - - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:890) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:890) - OUTPUT FILES - - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:888) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:888) - MISCELLANEOUS - - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:893) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:893) - LANGUAGE - - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:894) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:894) - INPUT FILES - - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:889) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:889) - ERRORS AND WARNINGS - - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:895) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:895) - CODE GENERATION - - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:891) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:891) - ADVANCED - - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:892) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:892) Display this usage message (Short form: -?) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:869) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:869) Output messages with fully qualified paths - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:873) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:873) Emit debug information in quotations - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:906) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:906) --embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:849) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:849) Embed specific source files in the portable PDB file - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:847) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:847) Embed all source files in the portable PDB file - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:846) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:846) Produce a deterministic assembly (including module version GUID and timestamp) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:858) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:858) Delay-sign the assembly using only the public portion of the strong name key - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:833) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:833) Define conditional compilation symbols (Short form: -d) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:866) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:866) Emit debug information (Short form: -g) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:854) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:854) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:855) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:855) The command-line option '%s' has been deprecated - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:899) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:899) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:901) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:901) The command-line option '%s' has been deprecated. Use '%s' instead. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:900) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:900) Enable or disable cross-module optimizations - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:859) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:859) Freely distributed under the MIT Open Source License. https://github.com/Microsoft/visualfsharp/blob/master/License.txt - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:827) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:827) Copyright (c) Microsoft Corporation. All Rights Reserved. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:826) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:826) Output warning and error messages in color - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:902) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:902) Specify the codepage used to read source files - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:871) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:871) Use to override where the compiler looks for mscorlib.dll and framework components - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:887) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:887) The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:886) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:886) Generate overflow checks - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:865) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:865) Build a Windows executable - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:830) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:830) Build a module that can be added to another assembly - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:832) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:832) Build a library (Short form: -a) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:831) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:831) Build a console executable - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:829) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:829) Base address for the library to be built - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:875) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:875) A value marked as 'inline' has an unexpected value - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:965) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:965) A value marked as 'inline' could not be inlined - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:966) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:966) The value '%s' was marked inline but was not bound in the optimization environment - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:963) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:963) The value '%s' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:962) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:962) Recursive ValValue %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:968) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:968) Local value %s not found during optimization - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:964) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:964) Failed to inline the value '%s' marked 'inline', perhaps because a recursive value was marked 'inline' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:967) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:967) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:982) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:982) Unexpected empty long identifier - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:977) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:977) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:973) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:973) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:974) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:974) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:983) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:983) The record type '%s' does not contain a label '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:978) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:978) No constructors are available for the type '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:981) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:981) This is not a constructor or literal, or a constructor is being used incorrectly - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:976) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:976) Invalid module/expression/type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:972) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:972) Invalid field label - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:979) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:979) Invalid expression '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:980) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:980) 'global' may only be used as the first name in a qualified path - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:975) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:975) This value is not a function and cannot be applied. Did you intend to access the indexer via %s.[index] instead? - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1425) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1425) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1427) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1427) This expression is not a function and cannot be applied. Did you intend to access the indexer via expr.[index] instead? - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1426) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1426) This value is not a function and cannot be applied. Did you forget to terminate a declaration? - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1428) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1428) This value is not a function and cannot be applied. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1424) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1424) No Invoke methods found for delegate type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:948) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:948) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:51) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:51) + %d overloads - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1277) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1277) + 1 overload - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1276) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1276) More than one Invoke method found for delegate type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:949) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:949) This construct is for ML compatibility. %s. You can disable this warning by using '--mlcompatibility' or '--nowarn:62'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1060) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1060) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:22) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:22) Method or object constructor '%s' is not static - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1343) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1343) Infix operator member '%s' has %d initial argument(s). Expected a tuple of 3 arguments - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1288) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1288) Infix operator member '%s' has %d initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1025) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1025) Infix operator member '%s' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1024) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1024) Infix operator member '%s' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1026) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1026) (loading description...) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1284) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1284) All elements of a list must be of the same type as the first element, which here is '%s'. This element has type '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:20) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:20) Identifiers containing '@' are reserved for use in F# code generation - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:953) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:953) The identifier '%s' is reserved for future use by F# - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:954) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:954) Possible incorrect indentation: this token is offside of context started at position %s. Try indenting this token further or using standard formatting conventions. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:970) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:970) The '|' tokens separating rules of this pattern match are misaligned by one column. Consider realigning your code or using further indentation. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:971) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:971) The indentation of this 'in' token is incorrect with respect to the corresponding 'let' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:969) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:969) Syntax error. Wrong nested #endif, unexpected tokens before it. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1021) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1021) Unexpected character '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:990) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:990) This token is reserved for future use - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1011) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1011) This Unicode encoding is only valid in string literals - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1010) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1010) TABs are not allowed in F# code unless the #indent \"off\" option is used - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1012) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1012) This number is outside the allowable range for 32-bit unsigned integers - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:999) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:999) This number is outside the allowable range for 32-bit signed integers - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:998) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:998) This number is outside the allowable range for 64-bit unsigned integers - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1001) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1001) This number is outside the allowable range for 64-bit signed integers - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1000) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1000) This number is outside the allowable range for 16-bit unsigned integers - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:997) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:997) This number is outside the allowable range for 16-bit signed integers - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:996) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:996) This number is outside the allowable range for unsigned native integers - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1003) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1003) This number is outside the allowable range for signed native integers - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1002) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1002) This number is outside the allowable range for this integer type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:985) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:985) This number is outside the allowable range for 8-bit unsigned integers - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:995) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:995) This number is outside the allowable range for hexadecimal 8-bit signed integers - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:994) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:994) This number is outside the allowable range for 8-bit signed integers - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:993) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:993) This number is outside the allowable range for 32-bit floats - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1006) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1006) This number is outside the allowable range for decimal literals - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1005) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1005) \U%s is not a valid Unicode character escape sequence - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1095) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1095) This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1007) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1007) Invalid line number: '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1013) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1013) Invalid floating point number - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1004) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1004) This is not a valid character literal - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1009) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1009) This is not a valid byte literal - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1008) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1008) Consider using a file with extension '.ml' or '.mli' instead - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1067) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1067) Identifiers followed by '%s' are reserved for future use - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:992) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:992) #if directive should be immediately followed by an identifier - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1020) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1020) #if directive must appear as the first non-whitespace character on a line - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1014) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1014) #endif has no matching #if - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1018) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1018) #endif required for #else - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1016) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1016) #endif directive must appear as the first non-whitespace character on a line - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1019) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1019) #else has no matching #if - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1015) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1015) #else directive must appear as the first non-whitespace character on a line - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1017) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1017) #! may only appear as the first line at the start of a file. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1022) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1022) '%s' is not permitted as a character in operator names and is reserved for future use - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:989) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:989) This byte array literal contains characters that do not encode as a single byte - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:991) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:991) Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1348) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1348) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1414) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1414) Used in a sequence expression to produce a value for a sequence. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1413) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1413) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1412) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1412) Introduces a looping construct. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1411) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1411) Used for Boolean conditions (when guards) on pattern matches and to introduce a constraint clause for a generic type parameter. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1410) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1410) Indicates the .NET void type. Used when interoperating with other .NET languages. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1409) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1409) Used in a signature to indicate a value, or in a type to declare a member, in limited situations. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1408) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1408) Used instead of let! in computation expressions for computation expression results that implement IDisposable. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1407) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1407) Used instead of let for values that implement IDisposable - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1406) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1406) Used to convert to a type that is higher in the inheritance chain. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1405) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1405) Delimits a untyped code quotation. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1420) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1420) Delimits a typed code quotation. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1419) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1419) Used to declare a class, record, structure, discriminated union, enumeration type, unit of measure, or type abbreviation. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1404) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1404) Used to introduce a block of code that might generate an exception. Used together with with or finally. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1403) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1403) Used as a Boolean literal. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1365) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1365) Used in for loops to indicate a range. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1402) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1402) Used in conditional expressions. Also used to perform side effects after object construction. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1401) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1401) Used to declare a structure type. Also used in generic parameter constraints. Used for OCaml compatibility in module definitions. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1400) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1400) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1399) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1399) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1398) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1398) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1415) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1415) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1397) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1397) Used to provide a value for the result of the containing computation expression. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1396) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1396) Used to indicate that a function is recursive. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1395) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1395) Allows access to a member from outside the type. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1394) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1394) Restricts access to a member to code in the same type or module. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1393) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1393) Used to implement a version of an abstract or virtual method that differs from the base version. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1392) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1392) Used with Boolean conditions as a Boolean or operator. Equivalent to ||. Also used in member constraints. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1391) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1391) Used to make the contents of a namespace or module available without qualification. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1390) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1390) Used in discriminated unions to indicate the type of categories of values, and in delegate and exception declarations. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1389) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1389) Indicates the absence of an object. Also used in generic parameter constraints. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1388) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1388) Not actually a keyword. However, not struct in combination is used as a generic parameter constraint. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1387) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1387) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1386) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1386) Used to associate a name with a group of related types and modules, to logically separate it from other code. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1385) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1385) Used to declare a variable, that is, a value that can be changed. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1384) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1384) Used to associate a name with a group of related types, values, and functions, to logically separate it from other code. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1383) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1383) Used to declare a property or method in an object type. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1382) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1382) Used in computation expressions to pattern match directly over the result of another computation expression. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1381) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1381) Used to branch by comparing a value to a pattern. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1380) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1380) Used in computation expressions to bind a name to the result of another computation expression. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1379) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1379) Used to associate, or bind, a name to a value or function. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1378) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1378) Assigns a value to a variable. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1416) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1416) Used to specify a computation that is to be performed only when a result is needed. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1377) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1377) Used to specify that a member is visible inside an assembly but not outside it. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1376) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1376) Used to declare and implement interfaces. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1375) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1375) Used to indicate a function that should be integrated directly into the caller's code. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1374) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1374) Used to specify a base class or base interface. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1373) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1373) Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1372) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1372) Used in conditional branching constructs. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1371) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1371) Used to reference the top-level .NET namespace. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1370) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1370) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1369) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1369) Used in lambda expressions, also known as anonymous functions. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1368) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1368) Used in looping constructs. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1367) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1367) Used together with try to introduce a block of code that executes regardless of whether an exception occurs. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1366) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1366) Indicates that a declared program element is defined in another binary or assembly. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1364) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1364) Used to declare an exception type. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1363) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1363) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1362) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1362) Used in conditional branching. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1361) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1361) Used in conditional branching. A short form of else if. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1360) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1360) Converts a type to a type that is lower in the hierarchy. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1418) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1418) In a for expression, used when counting in reverse. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1359) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1359) Used to convert to a type that is lower in the inheritance chain. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1358) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1358) In verbose syntax, indicates the end of a block of code in a looping expression. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1357) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1357) Used in looping constructs or to execute imperative code. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1356) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1356) Used to declare a delegate. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1355) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1355) Indicates an implementation of an abstract method; used together with an abstract method declaration to create a virtual method. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1354) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1354) In verbose syntax, indicates the start of a class definition. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1353) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1353) Converts a type to type that is higher in the hierarchy. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1417) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1417) In verbose syntax, indicates the start of a code block. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1352) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1352) Used as the name of the base class object. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1351) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1351) Used to verify code during debugging. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1350) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1350) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1349) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1349) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1347) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1347) %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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1422) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1422) %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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1421) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1421) The 'anycpu32bitpreferred' platform can only be used with EXE targets. You must use 'anycpu' instead. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1271) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1271) invalid namespace for provided type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1177) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1177) invalid full name for provided type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1178) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1178) Invalid provided literal value '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1270) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1270) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1433) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1433) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1432) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1432) The type '%s' is required here and is unavailable. You must add a reference to assembly '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:957) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:957) A reference to the type '%s' in assembly '%s' was found, but the type could not be found in that assembly - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:958) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:958) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:960) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:960) Internal error or badly formed metadata: not enough type parameters were in scope while importing - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:959) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:959) Invalid number of generic arguments to type '%s' in provided type. Expected '%d' arguments, given '%d'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1247) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1247) Invalid value unit-of-measure parameter '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1249) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1249) Invalid value '%s' for unit-of-measure parameter '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1248) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1248) An imported assembly uses the type '%s' but that type is not public - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:961) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:961) Invalid argument to 'methodhandleof' during codegen - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1209) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1209) MDB generation failed. Could not find compatible member %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1076) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1076) The name of the MDB file must be <assembly-file-name>.mdb. The --pdb option will be ignored. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1075) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1075) Unexpected error creating debug information file '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:984) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:984) Cannot generate MDB debug information. Failed to load the 'MonoSymbolWriter' type from the 'Mono.CompilerServices.SymbolWriter.dll' assembly. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1077) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1077) The file '%s' changed on disk unexpectedly, please reload. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1434) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1434) Compiler error: unexpected unrealized value - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:817) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:817) Unexpected GetSet annotation on a property - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:820) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:820) Undefined value '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:804) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:804) This type cannot be used for a literal field - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:819) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:819) The StructLayout attribute could not be decoded - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:822) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:822) GenSetStorage: %s was represented as a static method but was not an appropriate lambda expression - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:815) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:815) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:812) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:812) RSA key expected - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1106) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1106) Private key expected - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1105) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1105) No signature directory - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1111) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1111) Invalid signature size - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1110) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1110) Invalid RSAParameters structure - '{0}' expected - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1108) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1108) Invalid Public Key blob - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1112) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1112) Invalid Magic value in CLR Header - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1103) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1103) Invalid bit Length - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1107) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1107) Invalid algId - 'Exponent' expected - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1109) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1109) Bad image format - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1104) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1104) Reflected definitions cannot contain uses of the prefix splice operator '%%' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:824) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:824) Mutable variables cannot escape their method - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:816) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:816) The MarshalAs attribute could not be decoded - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:811) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:811) Main module of program is empty: nothing will happen when it is run - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:818) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:818) Literal fields cannot be set - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:814) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:814) Label %s not found - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:805) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:805) Incorrect number of type arguments to local call - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:806) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:806) The FieldOffset attribute could not be decoded - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:821) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:821) The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1070) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1070) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1062) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1062) Dynamic invocation of %s is not supported - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:807) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:807) The DllImport attribute could not be decoded - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:813) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:813) The DefaultAugmentation attribute could not be decoded - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:823) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:823) Custom marshallers cannot be specified in F# code. Consider using a C# helper function. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:810) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:810) This operation involves taking the address of a value '%s' represented using a local variable or other special representation. This is invalid. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:809) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:809) Taking the address of a literal field is invalid - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:808) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:808) The 'if' expression needs to have type '%s' to satisfy context type requirements. It currently has type '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:23) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:23) @@ -6056,2197 +6056,2197 @@ Cannot find FSharp.Core.dll in compiler's directory - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1324) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1324) Conflicting options specified: 'win32manifest' and 'win32res'. Only one of these can be used. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1118) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1118) Exiting - too many errors - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1114) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1114) System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1306) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1306) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1137) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1137) Static linking may not include a mixed managed/unmanaged DLL - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1122) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1122) Static linking may not include a .EXE - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1121) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1121) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1136) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1136) The resident compilation service was not used because a problem occured in communicating with the server. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1134) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1134) The assembly '%s' is listed on the command line. Assemblies should be referenced using a command line flag such as '-r'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1133) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1133) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1120) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1120) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1119) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1119) A problem occurred writing the binary '%s': %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1127) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1127) No implementation files specified - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1116) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1116) Option '--keycontainer' overrides attribute 'System.Reflection.AssemblyNameAttribute' given in a source file or added module - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1132) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1132) Option '--keyfile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1131) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1131) The key file '%s' could not be opened - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1126) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1126) Ignoring mixed managed/unmanaged assembly '%s' during static linking - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1123) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1123) Determinstic builds only support portable PDBs (--debug:portable or --debug:embedded) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1139) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1139) Option '--delaysign' overrides attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file or added module - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1130) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1130) The attribute %s specified version '%s', but this value is invalid and has been ignored - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1117) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1117) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1124) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1124) An %s specified version '%s', but this value is a wildcard, and you have requested a deterministic build, these are in conflict. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1138) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1138) The 'AssemblyVersionAttribute' has been ignored because a version was given using a command line option - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1128) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1128) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1125) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1125) Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be satellite assemblies, Culture should always be empty' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1129) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1129) Prefix flag (' ' or '+') set twice - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:220) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:220) Precision missing after the '.' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:225) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:225) Positional specifiers are not permitted in format strings - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:217) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:217) Missing format specifier - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:218) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:218) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:228) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:228) The # formatting modifier is invalid in F# - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:221) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:221) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:229) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:229) '%s' format does not support precision - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:226) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:226) '%s' flag set twice - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:219) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:219) '%s' format does not support '0' flag - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:224) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:224) '%s' does not support prefix '%s' flag - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:230) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:230) Bad width in format specifier - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:223) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:223) Bad precision in format specifier - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:222) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:222) Bad format specifier: '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:231) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:231) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:227) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:227) All branches of a pattern match expression must return values of the same type as the first branch, which here is '%s'. This branch returns a value of type '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:25) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:25) The record, struct or class field '%s' is not accessible from this code location - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:945) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:945) This construct is experimental - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:947) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:947) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:940) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:940) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1159) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1159) Invalid member '%s' on provided type '%s'. Only properties, methods and constructors are allowed - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1151) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1151) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1158) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1158) Unknown static argument kind '%s' when resolving a reference to a provided type or method '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1176) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1176) Unexpected 'null' return value from provided type '%s' member '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1171) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1171) Unexpected exception from provided type '%s' member '%s': %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1157) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1157) Unexpected exception from member '%s' of provided type '%s' member '%s': %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1172) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1172) The type provider constructor has thrown an exception: %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1181) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1181) Too many static parameters. Expected at most %d parameters, but got %d unnamed and %d named parameters. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1269) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1269) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1201) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1201) The static parameter '%s' has already been given a value - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1203) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1203) The type provider returned 'null', which is not a valid return value from '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1180) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1180) Assembly attribute '%s' refers to a designer assembly '%s' which cannot be loaded or doesn't exist. %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1163) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1163) The type provider '%s' reported an error in the context of provided type '%s', member '%s'. The error: %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1194) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1194) The type provider '%s' reported an error: %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1165) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1165) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1164) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1164) The '%s' of a provided type was null or empty. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1196) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1196) An exception occurred when accessing the '%s' of a provided type: %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1195) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1195) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1210) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1210) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1211) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1211) Expected provided type with path '%s' but provided type has path '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1170) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1170) Expected provided type named '%s' but provided type has 'Name' with value '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1160) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1160) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1183) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1183) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1184) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1184) Property '%s' on provided type '%s' is neither readable nor writable as it has CanRead=false and CanWrite=false - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1250) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1250) Property '%s' on provided type '%s' has CanWrite=false but GetSetMethod() returned a method - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1155) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1155) Property '%s' on provided type '%s' has CanRead=false but GetGetMethod() returned a method - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1153) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1153) Property '%s' on provided type '%s' has CanWrite=true but there was no value from GetSetMethod() - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1154) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1154) Property '%s' on provided type '%s' has CanRead=true but there was no value from GetGetMethod() - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1152) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1152) One or more errors seen during provided type setup - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1156) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1156) Type provider '%s' returned null from GetInvokerExpression. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1182) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1182) The provided type '%s' returned a member with a null or empty member name - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1141) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1141) The provided type '%s' has member '%s' which has declaring type '%s'. Expected declaring type to be the same as provided type. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1144) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1144) The provided type '%s' member info '%s' has null declaring type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1143) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1143) The provided type '%s' returned a null member - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1142) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1142) No static parameter exists with name '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1202) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1202) Nested provided types do not take static arguments or generic parameters - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1173) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1173) Provided type '%s' has 'IsGenericType' as true, but generic types are not supported. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1148) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1148) Provided type '%s' has 'IsArray' as true, but array types are not supported. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1149) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1149) Multiple static parameters exist with name '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1204) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1204) This provided method requires static parameters - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1326) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1326) Invalid member '%s' on provided type '%s'. Provided type members must be public, and not be generic, virtual, or abstract. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1150) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1150) Assembly '%s' hase TypeProviderAssembly attribute with invalid value '%s'. The value should be a valid assembly name - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1189) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1189) Invalid static argument to provided type. Expected an argument of kind '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1174) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1174) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1167) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1167) The type provider '%s' provided a constructor which is not reported among the constructors of its declaring type '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1168) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1168) The type provider '%s' used an invalid parameter in the ParameterExpression: %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1166) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1166) Character '%s' is not allowed in provided type name '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1197) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1197) Character '%s' is not allowed in provided namespace name '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1140) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1140) Referenced assembly '%s' has assembly level attribute '%s' but no public type provider classes were found - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1145) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1145) Event '%s' on provided type '%s' has no value from GetRemoveMethod() - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1162) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1162) Event '%s' on provided type '%s' has no value from GetAddMethod() - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1161) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1161) An error occured applying the static arguments to a provided type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1175) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1175) An error occured applying the static arguments to a provided method - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1309) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1309) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1273) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1273) Type '%s' from type provider '%s' has an empty namespace. Use 'null' for the global namespace. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1146) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1146) Empty namespace found from the type provider '%s'. Use 'null' for the global namespace. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1147) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1147) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1169) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1169) Named static arguments must come after all unnamed static arguments - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1200) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1200) A type provider implemented GetStaticParametersForMethod, but ApplyStaticArgumentsForMethod was not implemented or invalid - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1308) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1308) Erased to - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1278) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1278) All branches of an 'if' expression must return values of the same type as the first branch, which here is '%s'. This branch returns a value of type '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:24) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:24) System.Environment.Exit did not exit - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:232) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:232) The treatment of this operator is now handled directly by the F# compiler and its meaning cannot be redefined - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:233) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:233) The documentation file has no .xml suffix - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1115) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1115) is - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1423) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1423) (description unavailable...) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1285) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1285) The '!' operator is used to dereference a ref cell. Consider using 'not expr' here. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:28) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:28) Delegates are not allowed to have curried signatures - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:950) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:950) %s var in collection - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1216) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1216) %s var in collection %s (outerKey = innerKey). Note that parentheses are required after '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1214) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1214) %s var in collection %s (outerKey = innerKey) into group. Note that parentheses are required after '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1215) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1215) None of the types '%s' support the operator '%s'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:305) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:305) None of the types '%s' support the operator '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:303) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:303) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:322) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:322) The type '%s' is not compatible with any of the types %s, arising from the use of a printf-style format string - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:325) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:325) The type '%s' is not a CLI enum type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:319) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:319) The type '%s' is not a CLI delegate type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:321) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:321) Type instantiation length mismatch - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:329) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:329) Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:298) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:298) The type '%s' has a non-standard delegate type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:320) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:320) The type '%s' does not support the operator '%s'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:306) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:306) The type '%s' does not support the operator '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:304) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:304) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:318) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:318) The type '%s' does not support the 'equality' constraint because it is a function type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:317) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:317) The type '%s' does not support the 'equality' constraint because it has the 'NoEquality' attribute - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:316) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:316) The type '%s' does not support a conversion to the type '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:307) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:307) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:315) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:315) The type '%s' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:314) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:314) The type '%s' does not support the 'comparison' constraint because it has the 'NoComparison' attribute - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:313) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:313) The type '%s' does not have 'null' as a proper value - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:311) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:311) The declared type parameter '%s' cannot be used here since the type parameter cannot be resolved at compile time - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:296) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:296) The constraints 'struct' and 'not struct' are inconsistent - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:310) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:310) The available overloads are shown below. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:362) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:362) The required signature is %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:342) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:342) Optional arguments not permitted here - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:330) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:330) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:312) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:312) No overloads match for method '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:359) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:359) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:357) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:357) No %s member or object constructor named '%s' takes %d arguments. Note the call to this member also provides %d named arguments. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:356) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:356) No %s member or object constructor named '%s' takes %d arguments - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:355) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:355) Method or object constructor '%s' not found - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:358) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:358) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:360) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:360) %s is not an instance method - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:339) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:339) %s is not a static method - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:338) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:338) The type '%s' has a method '%s' (full name '%s'), but the method is static - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:308) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:308) The type '%s' has a method '%s' (full name '%s'), but the method is not static - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:309) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:309) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:335) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:335) The member or object constructor '%s' takes %d type argument(s) but is here given %d. The required signature is '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:351) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:351) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:347) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:347) The member or object constructor '%s' takes %d argument(s) but is here given %d. The required signature is '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:348) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:348) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:346) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:346) The member or object constructor '%s' requires %d argument(s). The required signature is '%s'. Some names for missing arguments are %s. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:345) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:345) The member or object constructor '%s' requires %d additional argument(s). The required signature is '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:344) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:344) The member or object constructor '%s' requires %d argument(s). The required signature is '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:343) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:343) The member or object constructor '%s' does not take %d argument(s). An overload was found taking %d arguments. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:354) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:354) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:352) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:352) %s is not a static member - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:331) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:331) %s is not an instance member - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:332) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:332) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:337) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:337) The member or object constructor '%s' is not %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:336) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:336) The member or object constructor '%s' has no argument or settable return property '%s'. %s. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:340) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:340) This indexer expects %d arguments but is here given %d - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:300) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:300) Incorrect generic instantiation. No %s member named '%s' takes %d generic arguments. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:353) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:353) A generic construct requires that the type '%s' is an unmanaged type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:324) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:324) A generic construct requires that the type '%s' is a CLI or F# struct type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:323) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:323) A generic construct requires that the type '%s' have reference semantics, but it does not, i.e. it is a struct - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:326) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:326) A generic construct requires that the type '%s' have a public default constructor - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:328) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:328) A generic construct requires that the type '%s' be non-abstract - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:327) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:327) Expected arguments to an instance member - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:299) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:299) Expecting a type supporting the operator '%s' but given a tuple type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:302) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:302) Expecting a type supporting the operator '%s' but given a function type. You may be missing an argument to a function. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:301) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:301) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:350) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:350) The object constructor '%s' takes %d argument(s) but is here given %d. The required signature is '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:349) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:349) The object constructor '%s' has no argument or settable return property '%s'. %s. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:341) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:341) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:297) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:297) Candidates: %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:361) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:361) The argument types don't match - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:334) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:334) Argument length mismatch - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:333) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:333) Quotations cannot contain expressions that set union case fields - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:288) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:288) Quotations cannot contain expressions that set fields in exception values - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:289) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:289) Quotations cannot contain expressions that require byref pointers - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:290) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:290) Quotations cannot contain expressions that fetch union case indexes - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:287) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:287) Quotations cannot contain this kind of type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:295) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:295) Quotations cannot contain this kind of pattern match - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:293) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:293) Quotations cannot contain this kind of constant - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:292) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:292) Quotations cannot contain expressions that fetch static fields - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:284) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:284) Quotations cannot contain object expressions - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:282) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:282) Quotations cannot contain inline assembly code or pattern matching on arrays - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:285) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:285) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:281) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:281) Quotations cannot contain uses of generic expressions - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:280) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:280) Quotations cannot contain descending for loops - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:286) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:286) Quotations cannot contain array pattern matching - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:294) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:294) Quotations cannot contain expressions that take the address of a field - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:283) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:283) Quotations cannot contain expressions that make member constraint calls, or uses of operators that implicitly resolve to a member constraint call - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:291) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:291) A quotation may not involve an assignment to or taking the address of a captured local variable - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1275) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1275) Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function is no longer generic. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1086) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1086) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:279) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:279) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1328) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1328) The conversion from %s to %s is a compile-time safe upcast, not a downcast. Consider using 'upcast' instead of 'downcast'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1327) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1327) A ';' is used to separate field values in records. Consider replacing ',' with ';'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:27) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:27) The variable '%s' is used in an invalid way - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:237) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:237) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:277) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:277) The value '%s' is unused - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1037) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1037) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1038) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1038) default augmentation of the union case - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:262) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:262) compiled form of the union case - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:261) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:261) The type '%s' is less accessible than the value, member or type '%s' it is used in. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:238) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:238) A type variable has been constrained by multiple different class types. A type variable may only have one class constraint. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1286) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1286) 'System.Void' can only be used as 'typeof<System.Void>' in F# - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:239) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:239) Struct members cannot return the address of fields of the struct by reference - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1443) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1443) Expression-splicing operators may only be used within quotations - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:242) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:242) A method return type would contain byrefs which is not permitted - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:254) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:254) [<ReflectedDefinition>] terms cannot contain uses of the prefix splice operator '%%' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:259) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:259) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:234) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:234) The property '%s' has the same name as a method in type '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:263) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:263) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:265) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:265) Object constructors cannot directly use try/with and try/finally prior to the initialization of the object. This includes constructs such as 'for x in ...' that may elaborate to uses of these constructs. This is a limitation imposed by Common IL. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:248) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:248) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1440) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1440) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1445) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1445) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1446) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1446) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1079) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1079) First-class uses of the expression-splicing operator are not permitted - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:243) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:243) First-class uses of the 'reraise' function is not permitted - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:245) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:245) First-class uses of the address-of operators are not permitted - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:244) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:244) Type '%s' is illegal because in byref<T>, T cannot contain byref types. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1258) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1258) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1444) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1444) The type abbreviation contains byrefs. This is not permitted by F#. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:278) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:278) The byref typed value '%s' cannot be used at this point - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:246) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:246) A byref typed value would be stored here. Top-level let-bound byref values are not permitted. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:258) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:258) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1439) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1439) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1338) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1338) The address of the static field '%s' cannot be used at this point - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:250) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:250) The address of the variable '%s' cannot be used at this point - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:249) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:249) The address of an array element cannot be used at this point - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:252) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:252) The address of the field '%s' cannot be used at this point - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:251) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:251) This type implements the same interface at different generic instantiations '%s' and '%s'. This is not permitted in this version of F#. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:276) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:276) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:257) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:257) 'base' values may only be used to make direct calls to the base implementations of overridden members - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:247) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:247) The function or method has an invalid return type '%s'. This is not permitted by the rules of Common IL. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1456) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1456) The parameter '%s' has an invalid type '%s'. This is not permitted by the rules of Common IL. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1455) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1455) Invalid custom attribute value (not a constant or literal) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:255) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:255) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:264) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:264) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1295) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1295) The type of a first-class function cannot contain byrefs - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:253) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:253) A type instantiation involves a byref type. This is not permitted by the rules of Common IL. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:240) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:240) Calls to 'reraise' may only occur directly in a handler of a try-with - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:241) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:241) A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:260) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:260) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:273) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:273) Duplicate property. The property '%s' has the same name and signature as another property in type '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:272) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:272) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:269) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:269) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:275) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:275) Duplicate method. The abstract method '%s' has the same name and signature as an abstract method in an inherited type. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:274) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:274) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:270) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:270) Duplicate method. The method '%s' has the same name and signature as another method in type '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:268) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:268) Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:271) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:271) A type would store a byref typed value. This is not permitted by Common IL. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:266) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:266) The byref-typed variable '%s' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:235) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:235) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:236) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:236) The attribute type '%s' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:256) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:256) Redundant arguments are being ignored in function '%s'. Expected %d but got %d arguments. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1317) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1317) Type inference caused an inference type variable to escape its scope. Consider adding type annotations to make your code less generic. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1316) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1316) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1315) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1315) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1318) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1318) The operator '%s' cannot be resolved. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1289) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1289) Unrecognized option: '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:71) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:71) The non-generic type '%s' does not expect any type arguments, but here is given %d type argument(s) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:29) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:29) Filename '%s' contains invalid character '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1084) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1084) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:68) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:68) A signature for the file or module '%s' has already been specified - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:65) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:65) The search directory '%s' could not be found - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:42) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:42) F# Compiler for F# %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:37) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:37) Microsoft (R) F# Compiler version %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:36) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:36) Problem with filename '%s': %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:38) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:38) Problem reading assembly '%s': %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1282) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1282) The '--pdb' option requires the '--debug' option to be used - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:40) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:40) Option requires parameter: %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:53) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:53) No inputs specified - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:39) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:39) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:52) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:52) Multiple references to '%s.dll' are not permitted - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:46) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:46) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:50) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:50) Invalid warning number '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:33) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:33) Invalid version string '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:34) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:34) Invalid version file '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:35) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:35) The file extension of '%s' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:55) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:55) The search directory '%s' is invalid - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:41) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:41) Unrecognized privacy setting '%s' for managed resource, valid options are 'public' and 'private' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:45) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:45) Invalid module or namespace name - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:72) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:72) Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:63) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:63) Invalid directive. Expected '#r \"<file-or-assembly>\"'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:61) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:61) Invalid directive. Expected '#load \"<file>\" ... \"<file>\"'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:62) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:62) Invalid directive. Expected '#I \"<path>\"'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:60) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:60) '%s' is not a valid filename - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:43) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:43) '%s' is not a valid assembly name - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:44) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:44) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:49) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:49) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:66) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:66) An implementation of the file or module '%s' has already been given - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:67) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:67) When mscorlib.dll or FSharp.Core.dll is explicitly referenced the %s option must also be passed - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1081) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1081) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1082) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1082) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1083) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1083) Error opening binary file '%s': %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:58) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:58) Directives inside modules are ignored - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:64) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:64) The F#-compiled DLL '%s' needs to be recompiled to be used with this version of F# - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:59) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:59) Could not resolve assembly '%s' required by '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:57) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:57) Could not resolve assembly '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:56) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:56) Source file '%s' could not be found - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:54) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:54) The file extensions '.ml' and '.mli' are for ML compatibility - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1066) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1066) Unable to read assembly '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:47) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:47) Assembly resolution failure at or near this location - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:48) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:48) '%s' is not a valid integer argument - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:69) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:69) '%s' is not a valid floating point argument - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:70) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:70) A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:209) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:209) The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:208) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:208) The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:207) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:207) A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:211) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:211) Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:210) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:210) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:204) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:204) The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:206) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:206) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:214) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:214) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:215) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:215) This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:205) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:205) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:212) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:212) The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:216) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:216) A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:213) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:213) Error while parsing embedded IL type - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:201) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:201) Error while parsing embedded IL - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:200) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:200) Invalid expression on left of assignment - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:203) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:203) This indexer notation has been removed from the F# language - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:202) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:202) .NET Framework - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:936) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:936) Global Assembly Cache - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:937) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:937) Found by AssemblyFolders registry key - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:934) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:934) Found by AssemblyFoldersEx registry key - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:935) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:935) All elements of an array must be of the same type as the first element, which here is '%s'. This element has type '%s'. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:21) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:21) Add . for indexer access. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:19) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:19) Active pattern '%s' is not a function - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1068) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1068) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1069) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1069) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1307) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1307) Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is virtual and the other isn't - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:113) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:113) Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe types differ - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:105) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:105) Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is static and the other isn't - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:112) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:112) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:118) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:118) Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe respective type parameter counts differ - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:104) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:104) Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is marked as an override and the other isn't - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:116) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:116) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:103) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:103) Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is a constructor/property and the other is not - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:117) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:117) Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe names differ - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:97) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:97) Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe literal constant values and/or attributes differ - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:102) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:102) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:119) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:119) Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe inline flags differ - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:101) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:101) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:108) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:108) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:109) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:109) Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is final and the other isn't - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:115) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:115) Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is an extension member and the other is not - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:106) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:106) Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe CLI member names differ - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:111) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:111) Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe display names differ - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:99) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:99) Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe compiled names differ - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:98) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:98) Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe mutability attributes differ - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:96) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:96) Module '%s' contains\n %s \nbut its signature specifies\n %s \nAn arity was not inferred for this value - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:107) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:107) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:110) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:110) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:100) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:100) Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is abstract and the other isn't - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:114) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:114) @@ -8257,337 +8257,337 @@ The module contains the constructor\n %s \nbut its signature specifies\n %s \nThe types of the fields differ - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:154) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:154) The module contains the constructor\n %s \nbut its signature specifies\n %s \nThe names differ - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:152) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:152) The module contains the constructor\n %s \nbut its signature specifies\n %s \nThe respective number of data fields differ - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:153) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:153) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:155) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:155) Invalid recursive reference to an abstract slot - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:939) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:939) The module contains the field\n %s \nbut its signature specifies\n %s \nThe types differ - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:161) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:161) The module contains the field\n %s \nbut its signature specifies\n %s \nThe 'static' modifiers differ - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:158) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:158) The module contains the field\n %s \nbut its signature specifies\n %s \nThe names differ - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:156) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:156) The module contains the field\n %s \nbut its signature specifies\n %s \nThe 'mutable' modifiers differ - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:159) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:159) The module contains the field\n %s \nbut its signature specifies\n %s \nThe 'literal' modifiers differ - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:160) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:160) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:157) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:157) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:179) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:179) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:176) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:176) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:183) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:183) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:181) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:181) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:182) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:182) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:180) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:180) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:177) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:177) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:178) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:178) The %s definitions for type '%s' in the signature and implementation are not compatible because the types have different base types - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:132) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:132) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:138) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:138) The %s definitions for type '%s' in the signature and implementation are not compatible because the types are of different kinds - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:139) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:139) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:127) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:127) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:126) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:126) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:131) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:131) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:134) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:134) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:148) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:148) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:151) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:151) The %s definitions for type '%s' in the signature and implementation are not compatible because the representations differ - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:141) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:141) The %s definitions for type '%s' in the signature and implementation are not compatible because the respective type parameter counts differ - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:121) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:121) The %s definitions for type '%s' in the signature and implementation are not compatible because the number of %ss differ - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:133) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:133) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:120) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:120) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:123) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:123) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:128) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:128) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:125) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:125) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:124) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:124) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:129) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:129) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:130) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:130) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:136) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:136) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:135) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:135) The %s definitions for type '%s' in the signature and implementation are not compatible because the IL representations differ - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:140) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:140) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:142) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:142) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:144) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:144) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:143) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:143) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:145) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:145) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:137) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:137) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:122) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:122) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:147) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:147) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:146) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:146) The %s definitions for type '%s' in the signature and implementation are not compatible because the abbreviations differ: %s versus %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:149) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:149) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:150) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:150) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1340) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1340) The CallerMemberNameAttribute applied to parameter '%s' will have no effect. It is overridden by the CallerFilePathAttribute. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1335) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1335) The argument names in the signature '%s' and implementation '%s' do not match. The argument name from the signature file will be used. This may cause problems when debugging or profiling. - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\FSComp.txt:1429) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/FSComp.txt:1429) Stopped due to error\n - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:2) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:2) Prevents references from being locked by the F# Interactive process - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:54) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:54) @@ -8603,307 +8603,307 @@ Use the given file on startup as initial input - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:11) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:11) Usage: %s <options> [script.fsx [<arguments>]] - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:3) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:3) - Unexpected ThreadAbortException (Ctrl-C) during event handling: Trying to restart... - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:49) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:49) --> Timing now on - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:47) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:47) --> Timing now off - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:48) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:48) Real: %s, CPU: %s, GC %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:26) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:26) gen - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:27) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:27) Treat remaining arguments as command line arguments, accessed using fsi.CommandLineArgs - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:13) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:13) Support TAB completion in console (on by default) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:18) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:18) Suppress fsi writing to stdout - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:17) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:17) F# Interactive for F# %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:53) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:53) Microsoft (R) F# Interactive version %s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:52) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:52) - MISCELLANEOUS - - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:8) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:8) Loading - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:38) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:38) #load the given file on startup - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:12) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:12) Warning: line too long, ignoring some characters\n - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:25) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:25) - LANGUAGE - - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:7) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:7) Invalid directive '#%s %s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:24) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:24) '%s' is not a valid assembly name - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:22) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:22) See '%s' for options - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:37) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:37) F# Interactive command line options: - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:36) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:36) F# Interactive directives: - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:29) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:29) Toggle timing on/off - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:33) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:33) Reference (dynamically load) the given DLL - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:30) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:30) Exit - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:35) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:35) Load the given file(s) as if compiled and referenced - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:32) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:32) Display help - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:34) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:34) Add the given search path for referenced DLLs - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:31) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:31) \n- Interrupt\n - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:39) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:39) - INPUT FILES - - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:4) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:4) Display this usage message (Short form: -?) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:14) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:14) Execute interactions on a Windows Forms event loop (on by default) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:16) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:16) Failed to resolve assembly '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:50) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:50) \n- Exit...\n - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:40) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:40) Exit fsi after loading the files or running the .fsx script given on the command line - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:15) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:15) Exception raised when starting remoting server.\n%s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:10) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:10) \n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: %s\n - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:28) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:28) - ERRORS AND WARNINGS - - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:6) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:6) Emit debug information in quotations - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:19) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:19) Directory '%s' doesn't exist - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:23) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:45) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:45) --> Referenced '%s' (file may be locked by F# Interactive process) - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:44) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:44) --> Referenced '%s' - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:43) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:43) --> Added '%s' to library include path - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:46) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:46) Failed to install ctrl-c handler - Ctrl-C handling will not be available. Error was:\n\t%s - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:42) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:42) 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:21) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:21) - CODE GENERATION - - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:5) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:5) Binding session to '%s'... - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:51) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:51) For help type #help;; - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:20) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:20) - ADVANCED - - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:9) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:9) - Aborting main thread... - (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\FSharp.Compiler.Service\..\..\src\fsharp\fsi\FSIstrings.txt:41) + (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/FSharp.Compiler.Service/../../src/fsharp/fsi/FSIstrings.txt:41) @@ -12556,6 +12556,16 @@ on forcing back to at least one sensible user location + + + memoize tables (all entries cached, never collected) + + + + + Generates unique stamps + + Computations that can cooperatively yield by returning a continuation @@ -12635,7 +12645,7 @@ - Represents a place where we are stating that execution on the compilation thread is required. The + 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. @@ -12699,17 +12709,17 @@ - A shim over FileStream with FileMode.Open,FileAccess.Write,FileShare.Read + A shim over FileStream with FileMode.Open, FileAccess.Write, FileShare.Read - A shim over FileStream with FileMode.Open,FileAccess.Read,FileShare.ReadWrite + A shim over FileStream with FileMode.Open, FileAccess.Read, FileShare.ReadWrite - A shim over FileStream with FileMode.Create,FileAccess.Write,FileShare.Read + A shim over FileStream with FileMode.Create, FileAccess.Write, FileShare.Read @@ -12742,6 +12752,11 @@ Not a very useful function - only called in one place - should be changed + + + Intern tables to save space. + + Keep running the asynchronous computation bit by bit. The runner gets called each time the computation is restarted. @@ -12835,9 +12850,8 @@ - Because FSharp.Compiler.Service is a library that will target FSharp.Core 4.5.2 for the forseeable future, - we need to stick these functions in this module rather than using the module functions for ValueOption - that come after FSharp.Core 4.5.2. + chunk the provided input into arrays that are smaller than the LOH limit + in order to prevent long-term storage of those values @@ -13267,7 +13281,7 @@ Emit comparison instructions. - SynMemberDefn.AutoProperty (attribs,isStatic,id,tyOpt,propKind,memberFlags,xmlDoc,access,synExpr,mGetSet,mWholeAutoProp). + SynMemberDefn.AutoProperty (attribs, isStatic, id, tyOpt, propKind, memberFlags, xmlDoc, access, synExpr, mGetSet, mWholeAutoProp). F# syntax: 'member val X = expr' @@ -13368,7 +13382,7 @@ Emit comparison instructions. - Full type spec given by 'UnionCase : ty1 * tyN -> rty'. Only used in FSharp.Core, otherwise a warning. + Full type spec given by 'UnionCase: ty1 * tyN -> rty'. Only used in FSharp.Core, otherwise a warning. @@ -13394,12 +13408,12 @@ Emit comparison instructions. - An exception definition , "exception E = ..." + An exception definition, "exception E = ..." - An abstract definition , "type X" + An abstract definition, "type X" @@ -13422,7 +13436,7 @@ Emit comparison instructions. - A record type definition, type X = { A : int; B : int } + A record type definition, type X = { A: int; B: int } @@ -13464,7 +13478,7 @@ Emit comparison instructions. - Target specifier, e.g. "assembly","module",etc. + Target specifier, e.g. "assembly", "module", etc. @@ -13479,7 +13493,7 @@ Emit comparison instructions. - Deprecated character range:ranges + Deprecated character range: ranges @@ -13504,7 +13518,7 @@ Emit comparison instructions. - Represents a simple set of variable bindings a, (a,b) or (a:Type,b:Type) at a lambda, + 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 ..." @@ -13532,7 +13546,7 @@ Emit comparison instructions. The info indicates an alternative (compiler generated) identifier to be used because the name of the identifier is already bound. See Product Studio FSharp 1.0, bug 6389. - isCompilerGenerated : true if a compiler generated name + isCompilerGenerated: true if a compiler generated name isThisVar: true if 'this' variable in member isOptArg: true if a '?' is in front of the name @@ -13665,24 +13679,24 @@ Emit comparison instructions. - F# syntax: expr.Items(e1) <- e2 , rarely used named-property-setter notation, e.g. (stringExpr).Chars(3) <- 'a' + 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: Type.Items(e1) <- e2, rarely used named-property-setter notation, e.g. Foo.Bar.Chars(3) <- 'a' DotIndexedSet (objectExpr, indexExprs, valueExpr, rangeOfLeftOfSet, rangeOfDot, rangeOfWholeExpr) - F# syntax: expr.[expr,...,expr] <- expr + F# syntax: expr.[expr, ..., expr] <- expr - F# syntax: expr.[expr,...,expr] + F# syntax: expr.[expr, ..., expr] @@ -13718,12 +13732,12 @@ Emit comparison instructions. F# syntax: ident - Optimized representation, = SynExpr.LongIdent(false,[id],id.idRange) + Optimized representation, = SynExpr.LongIdent(false, [id], id.idRange) - IfThenElse(exprGuard,exprThen,optionalExprElse,spIfToThen,isFromErrorRecovery,mIfToThen,mIfToEndOfLastBranch) + IfThenElse(exprGuard, exprThen, optionalExprElse, spIfToThen, isFromErrorRecovery, mIfToThen, mIfToEndOfLastBranch) F# syntax: if expr then expr F# syntax: if expr then expr else expr @@ -13767,15 +13781,15 @@ Emit comparison instructions. TypeApp(expr, mLessThan, types, mCommas, mGreaterThan, mTypeArgs, mWholeExpr) "mCommas" are the ranges for interstitial commas, these only matter for parsing/design-time tooling, the typechecker may munge/discard them - F# syntax: expr<type1,...,typeN> + F# syntax: expr<type1, ..., typeN> App(exprAtomicFlag, isInfix, funcExpr, argExpr, m) - exprAtomicFlag: 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 - (or more generally, for higher operator fixities, if App(x,y) is such that y comes before x in the source code, then the node is marked isInfix=true) + - 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 + (or more generally, for higher operator fixities, if App(x, y) is such that y comes before x in the source code, then the node is marked isInfix=true) F# syntax: f x @@ -13839,7 +13853,7 @@ Emit comparison instructions. - SynExpr.ObjExpr(objTy,argOpt,binds,extraImpls,mNewExpr,mWholeExpr) + SynExpr.ObjExpr(objTy, argOpt, binds, extraImpls, mNewExpr, mWholeExpr) F# syntax: { new ... with ... } @@ -13877,7 +13891,7 @@ Emit comparison instructions. - F# syntax: expr : type + F# syntax: expr: type @@ -13889,7 +13903,7 @@ Emit comparison instructions. F# syntax: <@ expr @>, <@@ expr @@> - Quote(operator,isRaw,quotedSynExpr,isFromQueryExpression,m) + Quote(operator, isRaw, quotedSynExpr, isFromQueryExpression, m) @@ -13898,8 +13912,8 @@ Emit comparison instructions. Paren(expr, leftParenRange, rightParenRange, wholeRangeIncludingParentheses) - Parenthesized expressions. Kept in AST to distinguish A.M((x,y)) - from A.M(x,y), among other things. + Parenthesized expressions. Kept in AST to distinguish A.M((x, y)) + from A.M(x, y), among other things. @@ -13919,77 +13933,77 @@ Emit comparison instructions. - F# syntax : ident=1 etc., used in static parameters to type providers + 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: 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: 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: for units of measure e.g. m^3, kg^1/2 - F# syntax : for units of measure e.g. m / s + F# syntax: for units of measure e.g. m / s - F# syntax : #type + F# syntax: #type - F# syntax : typ with constraints + F# syntax: typ with constraints - F# syntax : _ + F# syntax: _ - F# syntax : 'Var + F# syntax: 'Var - F# syntax : type -> type + F# syntax: type -> type - F# syntax : type[] + F# syntax: type[] - F# syntax : {| id: type; ...; id: type |} - F# syntax : struct {| id: type; ...; id: 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 * ... * type + F# syntax: struct (type * ... * type) LongIdentApp(typeName, longId, LESSm, tyArgs, commasm, GREATERm, wholem) - F# syntax : type.A.B.C<type, ..., type> + F# syntax: type.A.B.C<type, ..., type> commasm: ranges for interstitial commas, these only matter for parsing/design-time tooling, the typechecker may munge/discard them @@ -13997,14 +14011,14 @@ Emit comparison instructions. App(typeName, LESSm, typeArgs, commasm, GREATERm, isPostfix, m) - 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: type<type, ..., type> or type type or (type, ..., type) type + isPostfix: indicates a postfix type application e.g. "int list" or "(int, string) dict" commasm: ranges for interstitial commas, these only matter for parsing/design-time tooling, the typechecker may munge/discard them - F# syntax : A.B.C + F# syntax: A.B.C @@ -14019,17 +14033,17 @@ Emit comparison instructions. - F# syntax is 'typar : delegate<'Args,unit> + F# syntax is 'typar: delegate<'Args, unit> - F# syntax is 'typar : enum<'UnderlyingType> + F# syntax is 'typar: enum<'UnderlyingType> - F# syntax is ^T : (static member MemberName : ^T * int -> ^T) + F# syntax is ^T: (static member MemberName: ^T * int -> ^T) @@ -14039,37 +14053,37 @@ Emit comparison instructions. - F# syntax is default ^T : type + F# syntax is default ^T: type - F# syntax is 'typar : equality + F# syntax is 'typar: equality - F# syntax is 'typar : comparison + F# syntax is 'typar: comparison - F# syntax is 'typar : null + F# syntax is 'typar: null - F# syntax is 'typar : unmanaged + F# syntax is 'typar: unmanaged - F# syntax : is 'typar : not struct + F# syntax: is 'typar: not struct - F# syntax : is 'typar : struct + F# syntax: is 'typar: struct @@ -14266,6 +14280,12 @@ Emit comparison instructions. 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) + + + This code runs for .XML generation and thus influences cross-project xmldoc tooltips; for within-project tooltips, + see XmlDocumentation.fs in the language service + + Used to collect XML documentation during lexing and parsing. @@ -14907,8 +14927,8 @@ Emit comparison instructions. - Specifies the compiled representations of type and exception definitions. Basically - just an ILTypeRef. Computed and cached by later phases. Stored in + Specifies the compiled representations of type and exception definitions. Basically + just an ILTypeRef. Computed and cached by later phases. Stored in type and exception definitions. Not pickled. Store an optional ILType object for non-generic types. @@ -15024,7 +15044,7 @@ Emit comparison instructions. Represents a complete typechecked implementation file, including its typechecked signature if any. - TImplFile(qualifiedNameOfFile,pragmas,implementationExpressionWithSignature,hasExplicitEntryPoint,isScript) + TImplFile(qualifiedNameOfFile, pragmas, implementationExpressionWithSignature, hasExplicitEntryPoint, isScript) @@ -15078,21 +15098,21 @@ Emit comparison instructions. Represents a parameter to an abstract method slot. - TSlotParam(nm,ty,inFlag,outFlag,optionalFlag,attribs) + TSlotParam(nm, ty, inFlag, outFlag, optionalFlag, attribs) Represents an abstract method slot, or delegate signature. - TSlotSig(methodName,declaringType,declaringTypeParameters,methodTypeParameters,slotParameters,returnTy) + TSlotSig(methodName, declaringType, declaringTypeParameters, methodTypeParameters, slotParameters, returnTy) A representation of a method in an object expression. - TObjExprMethod(slotsig,attribs,methTyparsOfOverridingMethod,methodParams,methodBodyExpr,m) + TObjExprMethod(slotsig, attribs, methTyparsOfOverridingMethod, methodParams, methodBodyExpr, m) @@ -15153,7 +15173,7 @@ Emit comparison instructions. - In C syntax this is: localv = e , note == *(&localv) = e == LAddrOf; LByrefSet + In C syntax this is: localv = e, note == *(&localv) = e == LAddrOf; LByrefSet @@ -15225,7 +15245,7 @@ Emit comparison instructions. - ILCall(useCallvirt,isProtected,valu,newobj,valUseFlags,isProp,noTailCall,mref,actualTypeInst,actualMethInst, retTy) + ILCall(useCallvirt, isProtected, valu, newobj, valUseFlags, isProp, noTailCall, mref, actualTypeInst, actualMethInst, retTy) IL method calls. value -- is the object a value type? @@ -15416,7 +15436,7 @@ Emit comparison instructions. Typechecking residue: Indicates a free choice of typars that arises due to - minimization of polymorphism at let-rec bindings. These are + minimization of polymorphism at let-rec bindings. These are resolved to a concrete instantiation on subsequent rewrites. @@ -15470,7 +15490,7 @@ Emit comparison instructions. - Type lambdas. These are used for the r.h.s. of polymorphic 'let' bindings and + Type lambdas. These are used for the r.h.s. of polymorphic 'let' bindings and for expressions that implement first-class polymorphic values. @@ -15619,10 +15639,10 @@ Emit comparison instructions. Run the active pattern and 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. + activePatExpr -- The active pattern function being called, perhaps applied to some active pattern parameters. + activePatResTys -- The result types (case types) of the active pattern. activePatIdentity -- The value and 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. + idx -- The case number of the active pattern which the test relates to. activePatternInfo -- The extracted info for the active pattern. @@ -15697,14 +15717,14 @@ Emit comparison instructions. must be the address of the expression being tested. cases -- The list of tests and their subsequent decision trees default -- The default decision tree, if any - range -- (precise documentation needed) + 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 + 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. @@ -15716,7 +15736,7 @@ Emit comparison instructions. - AttribNamedArg(name,type,isField,value) + AttribNamedArg(name, type, isField, value) @@ -15731,7 +15751,7 @@ Emit comparison instructions. - Attrib(kind,unnamedArgs,propVal,appliedToAGetterOrSetter,targetsOpt,range) + Attrib(kind, unnamedArgs, propVal, appliedToAGetterOrSetter, targetsOpt, range) @@ -15831,7 +15851,7 @@ Emit comparison instructions. - Try to get the .NET Assembly, if known. May not be present for `IsFSharp` for in-memory cross-project references + Try to get the .NET Assembly, if known. May not be present for `IsFSharp` for in-memory cross-project references @@ -15877,19 +15897,19 @@ Emit comparison instructions. A compilation unit is, more or less, the new material created in one - invocation of the compiler. Due to static linking assemblies may hold more + invocation of the compiler. Due to static linking assemblies may hold more than one compilation unit (i.e. when two assemblies are merged into a compilation - the resulting assembly will contain 3 CUs). Compilation units are also created for referenced + the resulting assembly will contain 3 CUs). Compilation units are also created for referenced .NET assemblies. References to items such as type constructors are via cross-compilation-unit thunks, which directly reference the data structures that define - these modules. Thus, when saving out values to disk we only wish - to save out the "current" part of the term graph. When reading values + these modules. Thus, when saving out values to disk we only wish + to save out the "current" part of the term graph. When reading values back in we "fixup" the links to previously referenced modules. All non-local accesses to the data structures are mediated - by ccu-thunks. Ultimately, a ccu-thunk is either a (named) element of + by ccu-thunks. Ultimately, a ccu-thunk is either a (named) element of the data structure, or it is a delayed fixup, i.e. an invalid dangling reference that has not had an appropriate fixup applied. @@ -16038,7 +16058,7 @@ Emit comparison instructions. - TType_fun(domainType,rangeType). + TType_fun(domainType, rangeType). Indicates the type is a function type @@ -16611,7 +16631,7 @@ Emit comparison instructions. - Indicates if this is a struct or enum type definition , i.e. a value type definition + Indicates if this is a struct or enum type definition, i.e. a value type definition @@ -16646,7 +16666,7 @@ Emit comparison instructions. - Indicates the type prefers the "tycon<a,b>" syntax for display etc. + Indicates the type prefers the "tycon<a, b>" syntax for display etc. @@ -16677,7 +16697,7 @@ Emit comparison instructions. - 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 struct or enum type definition, i.e. a value type definition @@ -16693,7 +16713,7 @@ Emit comparison instructions. - Indicates if this is an F#-defined struct or enum type definition , i.e. a value type definition + Indicates if this is an F#-defined struct or enum type definition, i.e. a value type definition @@ -16800,7 +16820,7 @@ Emit comparison instructions. - The display name of the namespace, module or type with <_,_,_> added for generic types, including static parameters + The display name of the namespace, module or type with <_, _, _> added for generic types, including static parameters @@ -17018,7 +17038,7 @@ Emit comparison instructions. - Gets updated with 'true' if an abstract slot is implemented in the file being typechecked. Internal only. + Gets updated with 'true' if an abstract slot is implemented in the file being typechecked. Internal only. @@ -17512,10 +17532,10 @@ Get the signature for the value's XML documentation ILMethSln(ty, extOpt, ilMethodRef, minst) Indicates a trait is solved by a .NET method. - ty -- the type and its instantiation - extOpt -- information about an extension member, if any + ty -- the type and its instantiation + extOpt -- information about an extension member, if any ilMethodRef -- the method that solves the trait constraint - minst -- the generic method instantiation + minst -- the generic method instantiation @@ -17528,8 +17548,8 @@ Get the signature for the value's XML documentation 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 + 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 @@ -17538,8 +17558,8 @@ Get the signature for the value's XML documentation FSMethSln(ty, vref, minst) Indicates a trait is solved by an F# method. - ty -- the type and its instantiation - vref -- the method that solves the trait constraint + ty -- the type and its instantiation + vref -- the method that solves the trait constraint minst -- the generic method instantiation @@ -17550,7 +17570,7 @@ Get the signature for the value's XML documentation - TTrait(tys,nm,memFlags,argtys,rty,colution) + TTrait(tys, nm, memFlags, argtys, rty, colution) Indicates the signature of a member constraint. Contains a mutable solution cell to store the inferred solution of the constraint. @@ -17871,7 +17891,7 @@ Get the signature for the value's XML documentation A set of static methods for constructing types. - + Mutation used during compilation of FSharp.Core.dll @@ -17924,7 +17944,7 @@ Get the signature for the value's XML documentation - Get a table of values and members indexed by partial linkage key, which includes name, the mangled name of the parent type (if any), + Get a table of values and members indexed by partial linkage key, which includes name, the mangled name of the parent type (if any), and the method argument count (if any). @@ -17962,7 +17982,7 @@ Get the signature for the value's XML documentation Get a table of types defined within this module, namespace or type. The table is indexed by both name and generic arity. This means that for generic - types "List`1", the entry (List,1) will be present. + types "List`1", the entry (List, 1) will be present. @@ -18193,11 +18213,6 @@ Get the signature for the value's XML documentation Documentation for the case - - - Name of the case in generated IL code - - Return type constructed by the case. Normally exactly the type of the enclosing type, sometimes an abbreviation of it @@ -18208,6 +18223,11 @@ Get the signature for the value's XML documentation Data carried by the case. + + + Name of the case in generated IL code. + + The ILX data structure representing the discriminated union. @@ -18681,7 +18701,7 @@ Get the signature for the value's XML documentation - Indicates if this is a struct or enum type definition , i.e. a value type definition + Indicates if this is a struct or enum type definition, i.e. a value type definition @@ -18711,7 +18731,7 @@ Get the signature for the value's XML documentation - Indicates the type prefers the "tycon<a,b>" syntax for display etc. + Indicates the type prefers the "tycon<a, b>" syntax for display etc. @@ -18747,7 +18767,7 @@ Get the signature for the value's XML documentation - 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 struct or enum type definition, i.e. a value type definition @@ -18763,7 +18783,7 @@ Get the signature for the value's XML documentation - Indicates if this is an F#-defined struct or enum type definition , i.e. a value type definition + Indicates if this is an F#-defined struct or enum type definition, i.e. a value type definition @@ -18875,7 +18895,7 @@ Get the signature for the value's XML documentation - The display name of the namespace, module or type with <_,_,_> added for generic types, plus static parameters if any + The display name of the namespace, module or type with <_, _, _> added for generic types, plus static parameters if any @@ -19129,7 +19149,7 @@ Get the signature for the value's XML documentation - Indicates the type prefers the "tycon<a,b>" syntax for display etc. + Indicates the type prefers the "tycon<a, b>" syntax for display etc. @@ -19387,12 +19407,12 @@ Get the signature for the value's XML documentation - Given (newPath,oldPath) replace oldPath by newPath in the TAccess. + 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 + 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' @@ -21454,7 +21474,7 @@ Get the signature for the value's XML documentation - Indicates if the enclosing type for the event is a value type. + 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. @@ -21481,7 +21501,7 @@ Get the signature for the value's XML documentation - Get the declaring type or module holding the method. + 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. @@ -21494,7 +21514,7 @@ Get the signature for the value's XML documentation - Get the enclosing type of the event. + 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. @@ -21511,7 +21531,7 @@ Get the signature for the value's XML documentation - Get the delegate type associated with the event. + Get the delegate type associated with the event. @@ -21563,7 +21583,7 @@ Get the signature for the value's XML documentation - Get the enclosing ("parent"/"declaring") type of the field. + Get the enclosing ("parent"/"declaring") type of the field. @@ -21618,7 +21638,7 @@ Get the signature for the value's XML documentation - Indicates if the enclosing type for the property is a value type. + 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. @@ -21693,7 +21713,7 @@ Get the signature for the value's XML documentation - Get the declaring type or module holding the method. + 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. @@ -21706,7 +21726,7 @@ Get the signature for the value's XML documentation - Get the enclosing type of the property. + 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. @@ -21752,7 +21772,7 @@ Get the signature for the value's XML documentation - Describes an F# use of a property + Describes an F# use of a property @@ -21812,8 +21832,8 @@ Get the signature for the value's XML documentation - 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 + 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. @@ -21895,12 +21915,12 @@ Get the signature for the value's XML documentation - Get a reference to the F# metadata for the F#-declared record, class or struct type + 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 the F# metadata for the F#-declared record, class or struct type @@ -21915,32 +21935,32 @@ Get the signature for the value's XML documentation - Get the name of the field in an F#-declared record, class or struct type + Get the 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 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 + 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 (instantiated) type of the field in an F#-declared record, class or struct type - Get the enclosing (declaring) type of the field in an F#-declared record, class or struct type + 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 + Describes an F# use of a field in an F#-declared record, class or struct type @@ -21955,7 +21975,7 @@ Get the signature for the value's XML documentation - Get the type instantiation of the declaring type of the field + Get the type instantiation of the declaring type of the field @@ -22010,7 +22030,7 @@ Get the signature for the value's XML documentation - Get the enclosing ("parent"/"declaring") type of the field. + Get the enclosing ("parent"/"declaring") type of the field. @@ -22070,7 +22090,7 @@ Get the signature for the value's XML documentation - Get the information about provided static parameters, if any + Get the information about provided static parameters, if any @@ -22087,7 +22107,7 @@ Get the signature for the value's XML documentation - Indicates if the enclosing type for the method is a value type. + 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. @@ -22104,7 +22124,7 @@ Get the signature for the value's XML documentation - Indicates if this is an F# extension member. + Indicates if this is an F# extension member. @@ -22119,7 +22139,7 @@ Get the signature for the value's XML documentation - Indicates if this is an extension member. + Indicates if this is an extension member. @@ -22129,7 +22149,7 @@ Get the signature for the value's XML documentation - Indicates if this is an C#-style extension member. + Indicates if this is an C#-style extension member. @@ -22175,8 +22195,8 @@ Get the signature for the value's XML documentation 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). + + For extension members this is empty (the instantiation of the declaring type). @@ -22193,7 +22213,7 @@ Get the signature for the value's XML documentation - Get the enclosing type of the method info. + 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. @@ -22223,7 +22243,7 @@ Get the signature for the value's XML documentation - Apply a type instantiation to a method info, i.e. apply the instantiation to the enclosing type. + Apply a type instantiation to a method info, i.e. apply the instantiation to the enclosing type. @@ -22259,10 +22279,10 @@ Get the signature for the value's XML documentation - Select all the type parameters of the declaring type of a method. + 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 + 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. @@ -22278,7 +22298,7 @@ Get the signature for the value's XML documentation - Build IL method infos. + Build IL method infos. @@ -22305,7 +22325,7 @@ Get the signature for the value's XML documentation ILMethInfo(g, ilApparentType, ilDeclaringTyconRefOpt, ilMethodDef, ilGenericMethodTyArgs) - Describes an F# use of an IL method. + Describes an F# use of an IL method. If ilDeclaringTyconRefOpt is 'Some' then this is an F# use of an C#-style extension method. If ilDeclaringTyconRefOpt is 'None' then ilApparentType is an IL type definition. @@ -22318,7 +22338,7 @@ Get the signature for the value's XML documentation - Get the Abstract IL metadata corresponding to the parameters of 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. @@ -22404,7 +22424,7 @@ Get the signature for the value's XML documentation - Get the instantiation of the declaring type of the 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. @@ -22417,8 +22437,8 @@ Get the signature for the value's XML documentation - 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 + 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. @@ -22429,25 +22449,25 @@ Get the signature for the value's XML documentation - Indicates if the method is marked as a DllImport (a PInvoke). This is done by looking at the IL custom attributes on + 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 + 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 + 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 + 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. @@ -22455,7 +22475,7 @@ Get the signature for the value's XML documentation - Get the (zero or one) 'self'/'this'/'object' arguments associated with an IL method. + Get the (zero or one) 'self'/'this'/'object' arguments associated with an IL method. An instance extension method returns one object argument. @@ -22510,7 +22530,7 @@ Get the signature for the value's XML documentation - The argument is optional, and is an F# callee-side optional arg + The argument is optional, and is an F# callee-side optional arg @@ -22532,7 +22552,7 @@ Get the signature for the value's XML documentation - The caller-side value for the optional arg, if any + The caller-side value for the optional arg, if any @@ -22553,17 +22573,17 @@ Get the signature for the value's XML documentation - Used to hide/filter members from super 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 + Used to hide/filter members from super 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 @@ -22591,17 +22611,17 @@ Get the signature for the value's XML documentation - Create an error object to raise should an event not have the shape expected by the .NET idiom described further below + Create an error object to raise should an event not have the shape expected by the .NET idiom described further below - Properties compatible with type IDelegateEvent and attributed with CLIEvent are special: - we generate metadata and add/remove methods - to make them into a .NET event, and mangle the name of a property. - We don't handle static, indexer or abstract properties correctly. - Note the name mangling doesn't affect the name of the get/set methods for the property - and so doesn't affect how we compile F# accesses to the property. + Properties compatible with type IDelegateEvent and attributed with CLIEvent are special: + we generate metadata and add/remove methods + to make them into a .NET event, and mangle the name of a property. + We don't handle static, indexer or abstract properties correctly. + Note the name mangling doesn't affect the name of the get/set methods for the property + and so doesn't affect how we compile F# accesses to the property. @@ -22616,10 +22636,10 @@ Get the signature for the value's XML documentation - Compute the OptionalArgInfo for a provided parameter. + Compute the OptionalArgInfo for a provided parameter. - This is the same logic as OptionalArgInfoOfILParameter except we do not apply the - Visual Basic rules for IDispatchConstant and IUnknownConstant to optional + This is the same logic as OptionalArgInfoOfILParameter except we do not apply the + Visual Basic rules for IDispatchConstant and IUnknownConstant to optional provided parameters. @@ -22638,7 +22658,7 @@ Get the signature for the value's XML documentation Work out the instantiation relevant to interpret the backing metadata for a member. The 'methTyArgs' is the instantiation of any generic method type parameters (this instantiation is - not included in the MethInfo objects, but carried separately). + not included in the MethInfo objects, but carried separately). @@ -22648,7 +22668,7 @@ Get the signature for the value's XML documentation - Get the object type for a member value which is a C#-style extension method + Get the object type for a member value which is a C#-style extension method @@ -22658,7 +22678,7 @@ Get the signature for the value's XML documentation - Split the type of an F# member value into + Split the type of an F# member value into - the type parameters associated with method but matching those of the enclosing type - the type parameters associated with a generic method - the return type of the method @@ -22678,7 +22698,7 @@ Get the signature for the value's XML documentation 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 + Reverse-map the slotsig so it is in terms of the type parameters for the overriding method @@ -22713,8 +22733,8 @@ Get the signature for the value's XML documentation - 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>> ... + 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>> ... @@ -22722,7 +22742,7 @@ Get the signature for the value's XML documentation 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 + 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. @@ -22736,7 +22756,7 @@ Get the signature for the value's XML documentation - Get the parameter type of an IL method. + Get the parameter type of an IL method. @@ -22806,7 +22826,7 @@ Get the signature for the value's XML documentation - Traverse the type hierarchy, e.g. f D (f C (f System.Object acc)). + Traverse the type hierarchy, e.g. f D (f C (f System.Object acc)). Visit base types and interfaces first. @@ -22844,12 +22864,6 @@ Get the signature for the value's XML documentation 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." - - - tinfos, minfos, finfos, pinfos - summaries of information for references - to .NET and F# constructs. - - An AccessorDomain which returns all items @@ -23523,7 +23537,7 @@ Get the signature for the value's XML documentation - Layout type arguments, either NAME<ty,...,ty> or (ty,...,ty) NAME *) + Layout type arguments, either NAME<ty, ..., ty> or (ty, ..., ty) NAME *) @@ -23543,14 +23557,14 @@ Get the signature for the value's XML documentation - Layout a single type parameter declaration, taking TypeSimplificationInfo into account + Layout a single type parameter declaration, taking TypeSimplificationInfo into account There are several printing-cases for a typar: - 'a - is multiple occurrence. + 'a - is multiple occurrence. _ - singleton occurrence, an underscore preferred over 'b. (OCaml accepts but does not print) #Type - inplace coercion constraint and singleton. ('a :> Type) - inplace coercion constraint not singleton. - ('a.opM : S->T) - inplace operator constraint. + ('a.opM: S->T) - inplace operator constraint. @@ -24362,7 +24376,7 @@ Get the signature for the value's XML documentation 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) = ([],[]) + e.g. let ([], x) = ([], []) Here x gets a generalized type "list<'T>". @@ -24376,6 +24390,11 @@ Get the signature for the value's XML documentation 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 @@ -24637,7 +24656,7 @@ Get the signature for the value's XML documentation - Represents the possibilities for a named-setter argument (a property, field , or a record field setter) + Represents the possibilities for a named-setter argument (a property, field, or a record field setter) @@ -25053,7 +25072,7 @@ Get the signature for the value's XML documentation 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. + 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 @@ -25066,9 +25085,9 @@ Get the signature for the value's XML documentation - An "expr -> expr" pass that eta-expands under-applied values of - known arity to lambda expressions and beta-var-reduces to bind - any known arguments. The results are later optimized by the peephole + An "expr -> expr" pass that eta-expands under-applied values of + known arity to lambda expressions and beta-var-reduces to bind + any known arguments. The results are later optimized by the peephole optimizer in opt.fs @@ -25102,14 +25121,15 @@ Get the signature for the value's XML documentation Find all the mutable locals that escape a binding - + Find all the mutable locals that escape a lambda expression or object expression - + Special cases where representation uses Lambda. + Handle these as special cases since mutables are allowed inside their bodies @@ -25260,6 +25280,11 @@ Special cases where representation uses Lambda. Indicates how the generated IL code is ultimately emitted + + + Determine if an F#-declared value, method or function is compiled as a method. + + Diagnostics seen while processing the compiler options implied root of closure diff --git a/src/fcs-fable/codegen/FSComp.fs b/src/fcs-fable/codegen/FSComp.fs index abd5cc9552..3940a78dc5 100644 --- a/src/fcs-fable/codegen/FSComp.fs +++ b/src/fcs-fable/codegen/FSComp.fs @@ -1,4284 +1,4284 @@ -// This is a generated file; the original input is 'C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt' +// This is a generated file; the original input is '/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt' namespace FSComp type internal SR private() = /// The namespace '%s' is not defined. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:4) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:4) static member undefinedNameNamespace(a0 : System.String) = (sprintf "The namespace '%s' is not defined." a0) /// The namespace or module '%s' is not defined. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:5) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:5) static member undefinedNameNamespaceOrModule(a0 : System.String) = (sprintf "The namespace or module '%s' is not defined." a0) /// The field, constructor or member '%s' is not defined. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:6) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:6) static member undefinedNameFieldConstructorOrMember(a0 : System.String) = (sprintf "The field, constructor or member '%s' is not defined." a0) /// The value, constructor, namespace or type '%s' is not defined. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:7) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:7) static member undefinedNameValueConstructorNamespaceOrType(a0 : System.String) = (sprintf "The value, constructor, namespace or type '%s' is not defined." a0) /// The value or constructor '%s' is not defined. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:8) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:8) static member undefinedNameValueOfConstructor(a0 : System.String) = (sprintf "The value or constructor '%s' is not defined." a0) /// The value, namespace, type or module '%s' is not defined. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:9) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:9) static member undefinedNameValueNamespaceTypeOrModule(a0 : System.String) = (sprintf "The value, namespace, type or module '%s' is not defined." a0) /// The constructor, module or namespace '%s' is not defined. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:10) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:10) static member undefinedNameConstructorModuleOrNamespace(a0 : System.String) = (sprintf "The constructor, module or namespace '%s' is not defined." a0) /// The type '%s' is not defined. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:11) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:11) static member undefinedNameType(a0 : System.String) = (sprintf "The type '%s' is not defined." a0) /// The type '%s' is not defined in '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:12) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:12) static member undefinedNameTypeIn(a0 : System.String, a1 : System.String) = (sprintf "The type '%s' is not defined in '%s'." a0 a1) /// The record label or namespace '%s' is not defined. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:13) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:13) static member undefinedNameRecordLabelOrNamespace(a0 : System.String) = (sprintf "The record label or namespace '%s' is not defined." a0) /// The record label '%s' is not defined. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:14) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:14) static member undefinedNameRecordLabel(a0 : System.String) = (sprintf "The record label '%s' is not defined." a0) /// Maybe you want one of the following: - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:15) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:15) static member undefinedNameSuggestionsIntro() = (sprintf "Maybe you want one of the following:" ) /// The type parameter %s is not defined. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:16) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:16) static member undefinedNameTypeParameter(a0 : System.String) = (sprintf "The type parameter %s is not defined." a0) /// The pattern discriminator '%s' is not defined. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:17) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:17) static member undefinedNamePatternDiscriminator(a0 : System.String) = (sprintf "The pattern discriminator '%s' is not defined." a0) /// Replace with '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:18) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:18) static member replaceWithSuggestion(a0 : System.String) = (sprintf "Replace with '%s'" a0) /// Add . for indexer access. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:19) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:19) static member addIndexerDot() = (sprintf "Add . for indexer access." ) /// All elements of a list must be of the same type as the first element, which here is '%s'. This element has type '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:20) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:20) static member listElementHasWrongType(a0 : System.String, a1 : System.String) = (sprintf "All elements of a list must be of the same type as the first element, which here is '%s'. This element has type '%s'." a0 a1) /// All elements of an array must be of the same type as the first element, which here is '%s'. This element has type '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:21) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:21) static member arrayElementHasWrongType(a0 : System.String, a1 : System.String) = (sprintf "All elements of an array must be of the same type as the first element, which here is '%s'. This element has type '%s'." a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:22) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:22) static member missingElseBranch(a0 : System.String) = (sprintf "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'." a0) /// The 'if' expression needs to have type '%s' to satisfy context type requirements. It currently has type '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:23) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:23) static member ifExpression(a0 : System.String, a1 : System.String) = (sprintf "The 'if' expression needs to have type '%s' to satisfy context type requirements. It currently has type '%s'." a0 a1) /// All branches of an 'if' expression must return values of the same type as the first branch, which here is '%s'. This branch returns a value of type '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:24) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:24) static member elseBranchHasWrongType(a0 : System.String, a1 : System.String) = (sprintf "All branches of an 'if' expression must return values of the same type as the first branch, which here is '%s'. This branch returns a value of type '%s'." a0 a1) /// All branches of a pattern match expression must return values of the same type as the first branch, which here is '%s'. This branch returns a value of type '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:25) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:25) static member followingPatternMatchClauseHasWrongType(a0 : System.String, a1 : System.String) = (sprintf "All branches of a pattern match expression must return values of the same type as the first branch, which here is '%s'. This branch returns a value of type '%s'." a0 a1) /// A pattern match guard must be of type 'bool', but this 'when' expression is of type '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:26) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:26) static member patternMatchGuardIsNotBool(a0 : System.String) = (sprintf "A pattern match guard must be of type 'bool', but this 'when' expression is of type '%s'." a0) /// A ';' is used to separate field values in records. Consider replacing ',' with ';'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:27) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:27) static member commaInsteadOfSemicolonInRecord() = (sprintf "A ';' is used to separate field values in records. Consider replacing ',' with ';'." ) /// The '!' operator is used to dereference a ref cell. Consider using 'not expr' here. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:28) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:28) static member derefInsteadOfNot() = (sprintf "The '!' operator is used to dereference a ref cell. Consider using 'not expr' here." ) /// The non-generic type '%s' does not expect any type arguments, but here is given %d type argument(s) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:29) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:29) static member buildUnexpectedTypeArgs(a0 : System.String, a1 : System.Int32) = (sprintf "The non-generic type '%s' does not expect any type arguments, but here is given %d type argument(s)" a0 a1) /// Consider using 'return!' instead of 'return'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:30) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:30) static member returnUsedInsteadOfReturnBang() = (sprintf "Consider using 'return!' instead of 'return'." ) /// Consider using 'yield!' instead of 'yield'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:31) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:31) static member yieldUsedInsteadOfYieldBang() = (sprintf "Consider using 'yield!' instead of 'yield'." ) /// \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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:32) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:32) static member tupleRequiredInAbstractMethod() = (sprintf "\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." ) /// Invalid warning number '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:33) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:33) static member buildInvalidWarningNumber(a0 : System.String) = (203, sprintf "Invalid warning number '%s'" a0) /// Invalid version string '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:34) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:34) static member buildInvalidVersionString(a0 : System.String) = (204, sprintf "Invalid version string '%s'" a0) /// Invalid version file '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:35) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:35) static member buildInvalidVersionFile(a0 : System.String) = (205, sprintf "Invalid version file '%s'" a0) /// Microsoft (R) F# Compiler version %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:36) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:36) static member buildProductName(a0 : System.String) = (sprintf "Microsoft (R) F# Compiler version %s" a0) /// F# Compiler for F# %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:37) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:37) static member buildProductNameCommunity(a0 : System.String) = (sprintf "F# Compiler for F# %s" a0) /// Problem with filename '%s': %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:38) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:38) static member buildProblemWithFilename(a0 : System.String, a1 : System.String) = (206, sprintf "Problem with filename '%s': %s" a0 a1) /// No inputs specified - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:39) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:39) static member buildNoInputsSpecified() = (207, sprintf "No inputs specified" ) /// The '--pdb' option requires the '--debug' option to be used - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:40) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:40) static member buildPdbRequiresDebug() = (209, sprintf "The '--pdb' option requires the '--debug' option to be used" ) /// The search directory '%s' is invalid - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:41) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:41) static member buildInvalidSearchDirectory(a0 : System.String) = (210, sprintf "The search directory '%s' is invalid" a0) /// The search directory '%s' could not be found - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:42) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:42) static member buildSearchDirectoryNotFound(a0 : System.String) = (211, sprintf "The search directory '%s' could not be found" a0) /// '%s' is not a valid filename - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:43) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:43) static member buildInvalidFilename(a0 : System.String) = (212, sprintf "'%s' is not a valid filename" a0) /// '%s' is not a valid assembly name - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:44) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:44) static member buildInvalidAssemblyName(a0 : System.String) = (213, sprintf "'%s' is not a valid assembly name" a0) /// Unrecognized privacy setting '%s' for managed resource, valid options are 'public' and 'private' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:45) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:45) static member buildInvalidPrivacy(a0 : System.String) = (214, sprintf "Unrecognized privacy setting '%s' for managed resource, valid options are 'public' and 'private'" a0) /// Multiple references to '%s.dll' are not permitted - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:46) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:46) static member buildMultipleReferencesNotAllowed(a0 : System.String) = (215, sprintf "Multiple references to '%s.dll' are not permitted" a0) /// Unable to read assembly '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:47) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:47) static member buildCannotReadAssembly(a0 : System.String) = (218, sprintf "Unable to read assembly '%s'" a0) /// Assembly resolution failure at or near this location - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:48) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:48) static member buildAssemblyResolutionFailed() = (220, sprintf "Assembly resolution failure at or near this location" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:49) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:49) static member buildImplicitModuleIsNotLegalIdentifier(a0 : System.String, a1 : System.String) = (221, sprintf "The declarations in this file will be placed in an implicit module '%s' based on the file name '%s'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file." a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:50) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:50) static member buildMultiFileRequiresNamespaceOrModule() = (222, sprintf "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." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:51) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:51) static member noEqualSignAfterModule() = (222, sprintf "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." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:52) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:52) static member buildMultipleToplevelModules() = (223, sprintf "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." ) /// Option requires parameter: %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:53) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:53) static member buildOptionRequiresParameter(a0 : System.String) = (224, sprintf "Option requires parameter: %s" a0) /// Source file '%s' could not be found - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:54) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:54) static member buildCouldNotFindSourceFile(a0 : System.String) = (225, sprintf "Source file '%s' could not be found" a0) /// The file extension of '%s' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:55) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:55) static member buildInvalidSourceFileExtension(a0 : System.String) = (226, sprintf "The file extension of '%s' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli." a0) /// Could not resolve assembly '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:56) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:56) static member buildCouldNotResolveAssembly(a0 : System.String) = (227, sprintf "Could not resolve assembly '%s'" a0) /// Could not resolve assembly '%s' required by '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:57) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:57) static member buildCouldNotResolveAssemblyRequiredByFile(a0 : System.String, a1 : System.String) = (228, sprintf "Could not resolve assembly '%s' required by '%s'" a0 a1) /// Error opening binary file '%s': %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:58) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:58) static member buildErrorOpeningBinaryFile(a0 : System.String, a1 : System.String) = (229, sprintf "Error opening binary file '%s': %s" a0 a1) /// The F#-compiled DLL '%s' needs to be recompiled to be used with this version of F# - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:59) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:59) static member buildDifferentVersionMustRecompile(a0 : System.String) = (231, sprintf "The F#-compiled DLL '%s' needs to be recompiled to be used with this version of F#" a0) /// Invalid directive. Expected '#I \"\"'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:60) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:60) static member buildInvalidHashIDirective() = (232, sprintf "Invalid directive. Expected '#I \"\"'." ) /// Invalid directive. Expected '#r \"\"'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:61) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:61) static member buildInvalidHashrDirective() = (233, sprintf "Invalid directive. Expected '#r \"\"'." ) /// Invalid directive. Expected '#load \"\" ... \"\"'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:62) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:62) static member buildInvalidHashloadDirective() = (234, sprintf "Invalid directive. Expected '#load \"\" ... \"\"'." ) /// Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:63) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:63) static member buildInvalidHashtimeDirective() = (235, sprintf "Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'." ) /// Directives inside modules are ignored - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:64) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:64) static member buildDirectivesInModulesAreIgnored() = (236, sprintf "Directives inside modules are ignored" ) /// A signature for the file or module '%s' has already been specified - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:65) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:65) static member buildSignatureAlreadySpecified(a0 : System.String) = (237, sprintf "A signature for the file or module '%s' has already been specified" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:66) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:66) static member buildImplementationAlreadyGivenDetail(a0 : System.String) = (238, sprintf "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." a0) /// An implementation of the file or module '%s' has already been given - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:67) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:67) static member buildImplementationAlreadyGiven(a0 : System.String) = (239, sprintf "An implementation of the file or module '%s' has already been given" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:68) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:68) static member buildSignatureWithoutImplementation(a0 : System.String) = (240, sprintf "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." a0) /// '%s' is not a valid integer argument - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:69) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:69) static member buildArgInvalidInt(a0 : System.String) = (241, sprintf "'%s' is not a valid integer argument" a0) /// '%s' is not a valid floating point argument - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:70) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:70) static member buildArgInvalidFloat(a0 : System.String) = (242, sprintf "'%s' is not a valid floating point argument" a0) /// Unrecognized option: '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:71) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:71) static member buildUnrecognizedOption(a0 : System.String) = (243, sprintf "Unrecognized option: '%s'" a0) /// Invalid module or namespace name - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:72) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:72) static member buildInvalidModuleOrNamespaceName() = (244, sprintf "Invalid module or namespace name" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:73) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:73) static member pickleErrorReadingWritingMetadata(a0 : System.String, a1 : System.String) = (sprintf "Error reading/writing metadata for the F# compiled DLL '%s'. Was the DLL compiled with an earlier version of the F# compiler? (error: '%s')." a0 a1) /// The type/module '%s' is not a concrete module or type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:74) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:74) static member tastTypeOrModuleNotConcrete(a0 : System.String) = (245, sprintf "The type/module '%s' is not a concrete module or type" a0) /// The type '%s' has an inline assembly code representation - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:75) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:75) static member tastTypeHasAssemblyCodeRepresentation(a0 : System.String) = (sprintf "The type '%s' has an inline assembly code representation" a0) /// A namespace and a module named '%s' both occur in two parts of this assembly - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:76) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:76) static member tastNamespaceAndModuleWithSameNameInAssembly(a0 : System.String) = (247, sprintf "A namespace and a module named '%s' both occur in two parts of this assembly" a0) /// Two modules named '%s' occur in two parts of this assembly - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:77) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:77) static member tastTwoModulesWithSameNameInAssembly(a0 : System.String) = (248, sprintf "Two modules named '%s' occur in two parts of this assembly" a0) /// Two type definitions named '%s' occur in namespace '%s' in two parts of this assembly - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:78) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:78) static member tastDuplicateTypeDefinitionInAssembly(a0 : System.String, a1 : System.String) = (249, sprintf "Two type definitions named '%s' occur in namespace '%s' in two parts of this assembly" a0 a1) /// A module and a type definition named '%s' occur in namespace '%s' in two parts of this assembly - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:79) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:79) static member tastConflictingModuleAndTypeDefinitionInAssembly(a0 : System.String, a1 : System.String) = (250, sprintf "A module and a type definition named '%s' occur in namespace '%s' in two parts of this assembly" a0 a1) /// Invalid member signature encountered because of an earlier error - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:80) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:80) static member tastInvalidMemberSignature() = (251, sprintf "Invalid member signature encountered because of an earlier error" ) /// This value does not have a valid property setter type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:81) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:81) static member tastValueDoesNotHaveSetterType() = (252, sprintf "This value does not have a valid property setter type" ) /// Invalid form for a property getter. At least one '()' argument is required when using the explicit syntax. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:82) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:82) static member tastInvalidFormForPropertyGetter() = (253, sprintf "Invalid form for a property getter. At least one '()' argument is required when using the explicit syntax." ) /// Invalid form for a property setter. At least one argument is required. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:83) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:83) static member tastInvalidFormForPropertySetter() = (254, sprintf "Invalid form for a property setter. At least one argument is required." ) /// Unexpected use of a byref-typed variable - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:84) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:84) static member tastUnexpectedByRef() = (255, sprintf "Unexpected use of a byref-typed variable" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:85) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:85) static member tastValueMustBeMutable() = (256, sprintf "A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...'" ) /// Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:86) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:86) static member tastInvalidMutationOfConstant() = (257, sprintf "Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:87) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:87) static member tastValueHasBeenCopied() = (sprintf "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" ) /// Recursively defined values cannot appear directly as part of the construction of a tuple value within a recursive binding - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:88) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:88) static member tastRecursiveValuesMayNotBeInConstructionOfTuple() = (259, sprintf "Recursively defined values cannot appear directly as part of the construction of a tuple value within a recursive binding" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:89) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:89) static member tastRecursiveValuesMayNotAppearInConstructionOfType(a0 : System.String) = (260, sprintf "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." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:90) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:90) static member tastRecursiveValuesMayNotBeAssignedToNonMutableField(a0 : System.String, a1 : System.String) = (261, sprintf "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." a0 a1) /// Unexpected decode of AutoOpenAttribute - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:91) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:91) static member tastUnexpectedDecodeOfAutoOpenAttribute() = (sprintf "Unexpected decode of AutoOpenAttribute" ) /// Unexpected decode of InternalsVisibleToAttribute - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:92) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:92) static member tastUnexpectedDecodeOfInternalsVisibleToAttribute() = (sprintf "Unexpected decode of InternalsVisibleToAttribute" ) /// Unexpected decode of InterfaceDataVersionAttribute - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:93) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:93) static member tastUnexpectedDecodeOfInterfaceDataVersionAttribute() = (sprintf "Unexpected decode of InterfaceDataVersionAttribute" ) /// Active patterns cannot return more than 7 possibilities - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:94) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:94) static member tastActivePatternsLimitedToSeven() = (265, sprintf "Active patterns cannot return more than 7 possibilities" ) /// This is not a valid constant expression or custom attribute value - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:95) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:95) static member tastNotAConstantExpression() = (267, sprintf "This is not a valid constant expression or custom attribute value" ) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe mutability attributes differ - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:96) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:96) static member ValueNotContainedMutabilityAttributesDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe mutability attributes differ" a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe names differ - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:97) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:97) static member ValueNotContainedMutabilityNamesDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe names differ" a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe compiled names differ - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:98) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:98) static member ValueNotContainedMutabilityCompiledNamesDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe compiled names differ" a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe display names differ - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:99) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:99) static member ValueNotContainedMutabilityDisplayNamesDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe display names differ" a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:100) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:100) static member ValueNotContainedMutabilityAccessibilityMore(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "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" a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe inline flags differ - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:101) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:101) static member ValueNotContainedMutabilityInlineFlagsDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe inline flags differ" a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe literal constant values and/or attributes differ - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:102) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:102) static member ValueNotContainedMutabilityLiteralConstantValuesDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe literal constant values and/or attributes differ" a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:103) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:103) static member ValueNotContainedMutabilityOneIsTypeFunction(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "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." a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe respective type parameter counts differ - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:104) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:104) static member ValueNotContainedMutabilityParameterCountsDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe respective type parameter counts differ" a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe types differ - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:105) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:105) static member ValueNotContainedMutabilityTypesDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe types differ" a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is an extension member and the other is not - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:106) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:106) static member ValueNotContainedMutabilityExtensionsDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is an extension member and the other is not" a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nAn arity was not inferred for this value - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:107) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:107) static member ValueNotContainedMutabilityArityNotInferred(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "Module '%s' contains\n %s \nbut its signature specifies\n %s \nAn arity was not inferred for this value" a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:108) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:108) static member ValueNotContainedMutabilityGenericParametersDiffer(a0 : System.String, a1 : System.String, a2 : System.String, a3 : System.String, a4 : System.String) = (sprintf "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" a0 a1 a2 a3 a4) /// 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 [] attribute. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:109) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:109) static member ValueNotContainedMutabilityGenericParametersAreDifferentKinds(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "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 [] attribute." a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:110) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:110) static member ValueNotContainedMutabilityAritiesDiffer(a0 : System.String, a1 : System.String, a2 : System.String, a3 : System.String, a4 : System.String, a5 : System.String, a6 : System.String) = (sprintf "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." a0 a1 a2 a3 a4 a5 a6) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe CLI member names differ - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:111) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:111) static member ValueNotContainedMutabilityDotNetNamesDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe CLI member names differ" a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is static and the other isn't - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:112) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:112) static member ValueNotContainedMutabilityStaticsDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is static and the other isn't" a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is virtual and the other isn't - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:113) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:113) static member ValueNotContainedMutabilityVirtualsDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is virtual and the other isn't" a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is abstract and the other isn't - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:114) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:114) static member ValueNotContainedMutabilityAbstractsDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is abstract and the other isn't" a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is final and the other isn't - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:115) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:115) static member ValueNotContainedMutabilityFinalsDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is final and the other isn't" a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is marked as an override and the other isn't - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:116) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:116) static member ValueNotContainedMutabilityOverridesDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is marked as an override and the other isn't" a0 a1 a2) /// Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is a constructor/property and the other is not - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:117) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:117) static member ValueNotContainedMutabilityOneIsConstructor(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is a constructor/property and the other is not" a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:118) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:118) static member ValueNotContainedMutabilityStaticButInstance(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "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" a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:119) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:119) static member ValueNotContainedMutabilityInstanceButStatic(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "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" a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:120) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:120) static member DefinitionsInSigAndImplNotCompatibleNamesDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (290, sprintf "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." a0 a1 a2) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the respective type parameter counts differ - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:121) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:121) static member DefinitionsInSigAndImplNotCompatibleParameterCountsDiffer(a0 : System.String, a1 : System.String) = (291, sprintf "The %s definitions for type '%s' in the signature and implementation are not compatible because the respective type parameter counts differ" a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:122) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:122) static member DefinitionsInSigAndImplNotCompatibleAccessibilityDiffer(a0 : System.String, a1 : System.String) = (292, sprintf "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" a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:123) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:123) static member DefinitionsInSigAndImplNotCompatibleMissingInterface(a0 : System.String, a1 : System.String, a2 : System.String) = (293, sprintf "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" a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:124) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:124) static member DefinitionsInSigAndImplNotCompatibleImplementationSaysNull(a0 : System.String, a1 : System.String) = (294, sprintf "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" a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:125) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:125) static member DefinitionsInSigAndImplNotCompatibleImplementationSaysNull2(a0 : System.String, a1 : System.String) = (294, sprintf "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" a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:126) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:126) static member DefinitionsInSigAndImplNotCompatibleSignatureSaysNull(a0 : System.String, a1 : System.String) = (295, sprintf "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" a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:127) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:127) static member DefinitionsInSigAndImplNotCompatibleSignatureSaysNull2(a0 : System.String, a1 : System.String) = (295, sprintf "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" a0 a1) /// 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 [] attribute to the signature. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:128) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:128) static member DefinitionsInSigAndImplNotCompatibleImplementationSealed(a0 : System.String, a1 : System.String) = (296, sprintf "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 [] attribute to the signature." a0 a1) /// 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 [] attribute to the implementation. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:129) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:129) static member DefinitionsInSigAndImplNotCompatibleImplementationIsNotSealed(a0 : System.String, a1 : System.String) = (297, sprintf "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 [] attribute to the implementation." a0 a1) /// 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 [] attribute to the signature. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:130) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:130) static member DefinitionsInSigAndImplNotCompatibleImplementationIsAbstract(a0 : System.String, a1 : System.String) = (298, sprintf "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 [] attribute to the signature." a0 a1) /// 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 [] attribute to the implementation. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:131) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:131) static member DefinitionsInSigAndImplNotCompatibleSignatureIsAbstract(a0 : System.String, a1 : System.String) = (299, sprintf "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 [] attribute to the implementation." a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the types have different base types - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:132) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:132) static member DefinitionsInSigAndImplNotCompatibleTypesHaveDifferentBaseTypes(a0 : System.String, a1 : System.String) = (300, sprintf "The %s definitions for type '%s' in the signature and implementation are not compatible because the types have different base types" a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the number of %ss differ - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:133) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:133) static member DefinitionsInSigAndImplNotCompatibleNumbersDiffer(a0 : System.String, a1 : System.String, a2 : System.String) = (301, sprintf "The %s definitions for type '%s' in the signature and implementation are not compatible because the number of %ss differ" a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:134) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:134) static member DefinitionsInSigAndImplNotCompatibleSignatureDefinesButImplDoesNot(a0 : System.String, a1 : System.String, a2 : System.String, a3 : System.String) = (302, sprintf "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)" a0 a1 a2 a3) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:135) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:135) static member DefinitionsInSigAndImplNotCompatibleImplDefinesButSignatureDoesNot(a0 : System.String, a1 : System.String, a2 : System.String, a3 : System.String) = (303, sprintf "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)" a0 a1 a2 a3) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:136) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:136) static member DefinitionsInSigAndImplNotCompatibleImplDefinesStruct(a0 : System.String, a1 : System.String) = (304, sprintf "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" a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:137) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:137) static member DefinitionsInSigAndImplNotCompatibleDotNetTypeRepresentationIsHidden(a0 : System.String, a1 : System.String) = (305, sprintf "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" a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:138) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:138) static member DefinitionsInSigAndImplNotCompatibleTypeIsHidden(a0 : System.String, a1 : System.String) = (306, sprintf "The %s definitions for type '%s' in the signature and implementation are not compatible because a type representation is being hidden by a signature" a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the types are of different kinds - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:139) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:139) static member DefinitionsInSigAndImplNotCompatibleTypeIsDifferentKind(a0 : System.String, a1 : System.String) = (307, sprintf "The %s definitions for type '%s' in the signature and implementation are not compatible because the types are of different kinds" a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the IL representations differ - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:140) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:140) static member DefinitionsInSigAndImplNotCompatibleILDiffer(a0 : System.String, a1 : System.String) = (308, sprintf "The %s definitions for type '%s' in the signature and implementation are not compatible because the IL representations differ" a0 a1) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the representations differ - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:141) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:141) static member DefinitionsInSigAndImplNotCompatibleRepresentationsDiffer(a0 : System.String, a1 : System.String) = (309, sprintf "The %s definitions for type '%s' in the signature and implementation are not compatible because the representations differ" a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:142) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:142) static member DefinitionsInSigAndImplNotCompatibleFieldWasPresent(a0 : System.String, a1 : System.String, a2 : System.String) = (311, sprintf "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" a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:143) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:143) static member DefinitionsInSigAndImplNotCompatibleFieldOrderDiffer(a0 : System.String, a1 : System.String) = (312, sprintf "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" a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:144) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:144) static member DefinitionsInSigAndImplNotCompatibleFieldRequiredButNotSpecified(a0 : System.String, a1 : System.String, a2 : System.String) = (313, sprintf "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" a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:145) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:145) static member DefinitionsInSigAndImplNotCompatibleFieldIsInImplButNotSig(a0 : System.String, a1 : System.String, a2 : System.String) = (314, sprintf "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'." a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:146) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:146) static member DefinitionsInSigAndImplNotCompatibleAbstractMemberMissingInImpl(a0 : System.String, a1 : System.String, a2 : System.String) = (315, sprintf "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" a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:147) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:147) static member DefinitionsInSigAndImplNotCompatibleAbstractMemberMissingInSig(a0 : System.String, a1 : System.String, a2 : System.String) = (316, sprintf "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" a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:148) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:148) static member DefinitionsInSigAndImplNotCompatibleSignatureDeclaresDiffer(a0 : System.String, a1 : System.String, a2 : System.String, a3 : System.String) = (317, sprintf "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" a0 a1 a2 a3) /// The %s definitions for type '%s' in the signature and implementation are not compatible because the abbreviations differ: %s versus %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:149) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:149) static member DefinitionsInSigAndImplNotCompatibleAbbreviationsDiffer(a0 : System.String, a1 : System.String, a2 : System.String, a3 : System.String) = (318, sprintf "The %s definitions for type '%s' in the signature and implementation are not compatible because the abbreviations differ: %s versus %s" a0 a1 a2 a3) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:150) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:150) static member DefinitionsInSigAndImplNotCompatibleAbbreviationHiddenBySig(a0 : System.String, a1 : System.String) = (319, sprintf "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." a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:151) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:151) static member DefinitionsInSigAndImplNotCompatibleSigHasAbbreviation(a0 : System.String, a1 : System.String) = (320, sprintf "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" a0 a1) /// The module contains the constructor\n %s \nbut its signature specifies\n %s \nThe names differ - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:152) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:152) static member ModuleContainsConstructorButNamesDiffer(a0 : System.String, a1 : System.String) = (sprintf "The module contains the constructor\n %s \nbut its signature specifies\n %s \nThe names differ" a0 a1) /// The module contains the constructor\n %s \nbut its signature specifies\n %s \nThe respective number of data fields differ - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:153) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:153) static member ModuleContainsConstructorButDataFieldsDiffer(a0 : System.String, a1 : System.String) = (sprintf "The module contains the constructor\n %s \nbut its signature specifies\n %s \nThe respective number of data fields differ" a0 a1) /// The module contains the constructor\n %s \nbut its signature specifies\n %s \nThe types of the fields differ - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:154) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:154) static member ModuleContainsConstructorButTypesOfFieldsDiffer(a0 : System.String, a1 : System.String) = (sprintf "The module contains the constructor\n %s \nbut its signature specifies\n %s \nThe types of the fields differ" a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:155) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:155) static member ModuleContainsConstructorButAccessibilityDiffers(a0 : System.String, a1 : System.String) = (sprintf "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" a0 a1) /// The module contains the field\n %s \nbut its signature specifies\n %s \nThe names differ - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:156) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:156) static member FieldNotContainedNamesDiffer(a0 : System.String, a1 : System.String) = (sprintf "The module contains the field\n %s \nbut its signature specifies\n %s \nThe names differ" a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:157) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:157) static member FieldNotContainedAccessibilitiesDiffer(a0 : System.String, a1 : System.String) = (sprintf "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" a0 a1) /// The module contains the field\n %s \nbut its signature specifies\n %s \nThe 'static' modifiers differ - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:158) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:158) static member FieldNotContainedStaticsDiffer(a0 : System.String, a1 : System.String) = (sprintf "The module contains the field\n %s \nbut its signature specifies\n %s \nThe 'static' modifiers differ" a0 a1) /// The module contains the field\n %s \nbut its signature specifies\n %s \nThe 'mutable' modifiers differ - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:159) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:159) static member FieldNotContainedMutablesDiffer(a0 : System.String, a1 : System.String) = (sprintf "The module contains the field\n %s \nbut its signature specifies\n %s \nThe 'mutable' modifiers differ" a0 a1) /// The module contains the field\n %s \nbut its signature specifies\n %s \nThe 'literal' modifiers differ - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:160) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:160) static member FieldNotContainedLiteralsDiffer(a0 : System.String, a1 : System.String) = (sprintf "The module contains the field\n %s \nbut its signature specifies\n %s \nThe 'literal' modifiers differ" a0 a1) /// The module contains the field\n %s \nbut its signature specifies\n %s \nThe types differ - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:161) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:161) static member FieldNotContainedTypesDiffer(a0 : System.String, a1 : System.String) = (sprintf "The module contains the field\n %s \nbut its signature specifies\n %s \nThe types differ" a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:162) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:162) static member typrelCannotResolveImplicitGenericInstantiation(a0 : System.String, a1 : System.String) = (331, sprintf "The implicit instantiation of a generic construct at or near this point could not be resolved because it could resolve to multiple unrelated types, e.g. '%s' and '%s'. Consider using type annotations to resolve the ambiguity" a0 a1) /// Could not resolve the ambiguity inherent in the use of a 'printf'-style format string - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:163) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:163) static member typrelCannotResolveAmbiguityInPrintf() = (333, sprintf "Could not resolve the ambiguity inherent in the use of a 'printf'-style format string" ) /// Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:164) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:164) static member typrelCannotResolveAmbiguityInEnum() = (334, sprintf "Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position" ) /// Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:165) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:165) static member typrelCannotResolveAmbiguityInDelegate() = (335, sprintf "Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position" ) /// Invalid value - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:166) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:166) static member typrelInvalidValue() = (337, sprintf "Invalid value" ) /// The signature and implementation are not compatible because the respective type parameter counts differ - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:167) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:167) static member typrelSigImplNotCompatibleParamCountsDiffer() = (338, sprintf "The signature and implementation are not compatible because the respective type parameter counts differ" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:168) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:168) static member typrelSigImplNotCompatibleCompileTimeRequirementsDiffer() = (339, sprintf "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" ) /// The signature and implementation are not compatible because the declaration of the type parameter '%s' requires a constraint of the form %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:169) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:169) static member typrelSigImplNotCompatibleConstraintsDiffer(a0 : System.String, a1 : System.String) = (340, sprintf "The signature and implementation are not compatible because the declaration of the type parameter '%s' requires a constraint of the form %s" a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:170) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:170) static member typrelSigImplNotCompatibleConstraintsDifferRemove(a0 : System.String, a1 : System.String) = (341, sprintf "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." a0 a1) /// The type '%s' implements 'System.IComparable'. Consider also adding an explicit override for 'Object.Equals' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:171) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:171) static member typrelTypeImplementsIComparableShouldOverrideObjectEquals(a0 : System.String) = (342, sprintf "The type '%s' implements 'System.IComparable'. Consider also adding an explicit override for 'Object.Equals'" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:172) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:172) static member typrelTypeImplementsIComparableDefaultObjectEqualsProvided(a0 : System.String) = (343, sprintf "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" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:173) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:173) static member typrelExplicitImplementationOfGetHashCodeOrEquals(a0 : System.String) = (344, sprintf "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" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:174) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:174) static member typrelExplicitImplementationOfGetHashCode(a0 : System.String) = (345, sprintf "The struct, record or union type '%s' has an explicit implementation of 'Object.GetHashCode'. Consider implementing a matching override for 'Object.Equals(obj)'" a0) /// The struct, record or union type '%s' has an explicit implementation of 'Object.Equals'. Consider implementing a matching override for 'Object.GetHashCode()' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:175) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:175) static member typrelExplicitImplementationOfEquals(a0 : System.String) = (346, sprintf "The struct, record or union type '%s' has an explicit implementation of 'Object.Equals'. Consider implementing a matching override for 'Object.GetHashCode()'" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:176) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:176) static member ExceptionDefsNotCompatibleHiddenBySignature(a0 : System.String, a1 : System.String) = (sprintf "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" a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:177) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:177) static member ExceptionDefsNotCompatibleDotNetRepresentationsDiffer(a0 : System.String, a1 : System.String) = (sprintf "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" a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:178) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:178) static member ExceptionDefsNotCompatibleAbbreviationHiddenBySignature(a0 : System.String, a1 : System.String) = (sprintf "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." a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:179) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:179) static member ExceptionDefsNotCompatibleSignaturesDiffer(a0 : System.String, a1 : System.String) = (sprintf "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." a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:180) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:180) static member ExceptionDefsNotCompatibleExceptionDeclarationsDiffer(a0 : System.String, a1 : System.String) = (sprintf "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." a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:181) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:181) static member ExceptionDefsNotCompatibleFieldInSigButNotImpl(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "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." a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:182) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:182) static member ExceptionDefsNotCompatibleFieldInImplButNotSig(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "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." a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:183) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:183) static member ExceptionDefsNotCompatibleFieldOrderDiffers(a0 : System.String, a1 : System.String) = (sprintf "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." a0 a1) /// The namespace or module attributes differ between signature and implementation - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:184) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:184) static member typrelModuleNamespaceAttributesDifferInSigAndImpl() = (355, sprintf "The namespace or module attributes differ between signature and implementation" ) /// This method is over-constrained in its type parameters - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:185) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:185) static member typrelMethodIsOverconstrained() = (356, sprintf "This method is over-constrained in its type parameters" ) /// No implementations of '%s' had the correct number of arguments and type parameters. The required signature is '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:186) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:186) static member typrelOverloadNotFound(a0 : System.String, a1 : System.String) = (357, sprintf "No implementations of '%s' had the correct number of arguments and type parameters. The required signature is '%s'." a0 a1) /// The override for '%s' was ambiguous - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:187) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:187) static member typrelOverrideWasAmbiguous(a0 : System.String) = (358, sprintf "The override for '%s' was ambiguous" a0) /// More than one override implements '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:188) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:188) static member typrelMoreThenOneOverride(a0 : System.String) = (359, sprintf "More than one override implements '%s'" a0) /// The method '%s' is sealed and cannot be overridden - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:189) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:189) static member typrelMethodIsSealed(a0 : System.String) = (360, sprintf "The method '%s' is sealed and cannot be overridden" a0) /// The override '%s' implements more than one abstract slot, e.g. '%s' and '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:190) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:190) static member typrelOverrideImplementsMoreThenOneSlot(a0 : System.String, a1 : System.String, a2 : System.String) = (361, sprintf "The override '%s' implements more than one abstract slot, e.g. '%s' and '%s'" a0 a1 a2) /// Duplicate or redundant interface - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:191) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:191) static member typrelDuplicateInterface() = (362, sprintf "Duplicate or redundant interface" ) /// The interface '%s' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:192) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:192) static member typrelNeedExplicitImplementation(a0 : System.String) = (363, sprintf "The interface '%s' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface." a0) /// A named argument has been assigned more than one value - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:193) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:193) static member typrelNamedArgumentHasBeenAssignedMoreThenOnce() = (364, sprintf "A named argument has been assigned more than one value" ) /// No implementation was given for '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:194) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:194) static member typrelNoImplementationGiven(a0 : System.String) = (365, sprintf "No implementation was given for '%s'" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:195) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:195) static member typrelNoImplementationGivenWithSuggestion(a0 : System.String) = (366, sprintf "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 ...'." a0) /// The member '%s' does not have the correct number of arguments. The required signature is '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:196) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:196) static member typrelMemberDoesNotHaveCorrectNumberOfArguments(a0 : System.String, a1 : System.String) = (367, sprintf "The member '%s' does not have the correct number of arguments. The required signature is '%s'." a0 a1) /// The member '%s' does not have the correct number of method type parameters. The required signature is '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:197) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:197) static member typrelMemberDoesNotHaveCorrectNumberOfTypeParameters(a0 : System.String, a1 : System.String) = (368, sprintf "The member '%s' does not have the correct number of method type parameters. The required signature is '%s'." a0 a1) /// The member '%s' does not have the correct kinds of generic parameters. The required signature is '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:198) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:198) static member typrelMemberDoesNotHaveCorrectKindsOfGenericParameters(a0 : System.String, a1 : System.String) = (369, sprintf "The member '%s' does not have the correct kinds of generic parameters. The required signature is '%s'." a0 a1) /// The member '%s' cannot be used to implement '%s'. The required signature is '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:199) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:199) static member typrelMemberCannotImplement(a0 : System.String, a1 : System.String, a2 : System.String) = (370, sprintf "The member '%s' cannot be used to implement '%s'. The required signature is '%s'." a0 a1 a2) /// Error while parsing embedded IL - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:200) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:200) static member astParseEmbeddedILError() = (371, sprintf "Error while parsing embedded IL" ) /// Error while parsing embedded IL type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:201) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:201) static member astParseEmbeddedILTypeError() = (372, sprintf "Error while parsing embedded IL type" ) /// This indexer notation has been removed from the F# language - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:202) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:202) static member astDeprecatedIndexerNotation() = (sprintf "This indexer notation has been removed from the F# language" ) /// Invalid expression on left of assignment - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:203) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:203) static member astInvalidExprLeftHandOfAssignment() = (374, sprintf "Invalid expression on left of assignment" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:204) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:204) static member augNoRefEqualsOnStruct() = (376, sprintf "The 'ReferenceEquality' attribute cannot be used on structs. Consider using the 'StructuralEquality' attribute instead, or implement an override for 'System.Object.Equals(obj)'." ) /// This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:205) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:205) static member augInvalidAttrs() = (377, sprintf "This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison'" ) /// The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:206) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:206) static member augNoEqualityNeedsNoComparison() = (378, sprintf "The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute" ) /// The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:207) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:207) static member augStructCompNeedsStructEquality() = (379, sprintf "The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute" ) /// The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:208) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:208) static member augStructEqNeedsNoCompOrStructComp() = (380, sprintf "The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes" ) /// A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:209) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:209) static member augTypeCantHaveRefEqAndStructAttrs() = (381, sprintf "A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes" ) /// Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:210) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:210) static member augOnlyCertainTypesCanHaveAttrs() = (382, sprintf "Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes" ) /// A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:211) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:211) static member augRefEqCantHaveObjEquals() = (383, sprintf "A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable'" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:212) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:212) static member augCustomEqNeedsObjEquals() = (384, sprintf "A type with attribute 'CustomEquality' must have an explicit implementation of at least one of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable'" ) /// A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:213) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:213) static member augCustomCompareNeedsIComp() = (385, sprintf "A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable'" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:214) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:214) static member augNoEqNeedsNoObjEquals() = (386, sprintf "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" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:215) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:215) static member augNoCompCantImpIComp() = (386, sprintf "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" ) /// The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:216) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:216) static member augCustomEqNeedsNoCompOrCustomComp() = (387, sprintf "The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes" ) /// Positional specifiers are not permitted in format strings - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:217) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:217) static member forPositionalSpecifiersNotPermitted() = (sprintf "Positional specifiers are not permitted in format strings" ) /// Missing format specifier - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:218) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:218) static member forMissingFormatSpecifier() = (sprintf "Missing format specifier" ) /// '%s' flag set twice - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:219) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:219) static member forFlagSetTwice(a0 : System.String) = (sprintf "'%s' flag set twice" a0) /// Prefix flag (' ' or '+') set twice - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:220) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:220) static member forPrefixFlagSpacePlusSetTwice() = (sprintf "Prefix flag (' ' or '+') set twice" ) /// The # formatting modifier is invalid in F# - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:221) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:221) static member forHashSpecifierIsInvalid() = (sprintf "The # formatting modifier is invalid in F#" ) /// Bad precision in format specifier - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:222) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:222) static member forBadPrecision() = (sprintf "Bad precision in format specifier" ) /// Bad width in format specifier - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:223) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:223) static member forBadWidth() = (sprintf "Bad width in format specifier" ) /// '%s' format does not support '0' flag - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:224) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:224) static member forDoesNotSupportZeroFlag(a0 : System.String) = (sprintf "'%s' format does not support '0' flag" a0) /// Precision missing after the '.' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:225) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:225) static member forPrecisionMissingAfterDot() = (sprintf "Precision missing after the '.'" ) /// '%s' format does not support precision - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:226) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:226) static member forFormatDoesntSupportPrecision(a0 : System.String) = (sprintf "'%s' format does not support precision" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:227) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:227) static member forBadFormatSpecifier() = (sprintf "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." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:228) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:228) static member forLIsUnnecessary() = (sprintf "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." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:229) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:229) static member forHIsUnnecessary() = (sprintf "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." ) /// '%s' does not support prefix '%s' flag - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:230) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:230) static member forDoesNotSupportPrefixFlag(a0 : System.String, a1 : System.String) = (sprintf "'%s' does not support prefix '%s' flag" a0 a1) /// Bad format specifier: '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:231) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:231) static member forBadFormatSpecifierGeneral(a0 : System.String) = (sprintf "Bad format specifier: '%s'" a0) /// System.Environment.Exit did not exit - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:232) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:232) static member elSysEnvExitDidntExit() = (sprintf "System.Environment.Exit did not exit" ) /// The treatment of this operator is now handled directly by the F# compiler and its meaning cannot be redefined - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:233) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:233) static member elDeprecatedOperator() = (sprintf "The treatment of this operator is now handled directly by the F# compiler and its meaning cannot be redefined" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:234) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:234) static member chkProtectedOrBaseCalled() = (405, sprintf "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." ) /// The byref-typed variable '%s' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:235) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:235) static member chkByrefUsedInInvalidWay(a0 : System.String) = (406, sprintf "The byref-typed variable '%s' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:236) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:236) static member chkBaseUsedInInvalidWay() = (408, sprintf "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." ) /// The variable '%s' is used in an invalid way - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:237) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:237) static member chkVariableUsedInInvalidWay(a0 : System.String) = (sprintf "The variable '%s' is used in an invalid way" a0) /// The type '%s' is less accessible than the value, member or type '%s' it is used in. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:238) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:238) static member chkTypeLessAccessibleThanType(a0 : System.String, a1 : System.String) = (410, sprintf "The type '%s' is less accessible than the value, member or type '%s' it is used in." a0 a1) /// 'System.Void' can only be used as 'typeof' in F# - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:239) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:239) static member chkSystemVoidOnlyInTypeof() = (411, sprintf "'System.Void' can only be used as 'typeof' in F#" ) /// A type instantiation involves a byref type. This is not permitted by the rules of Common IL. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:240) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:240) static member chkErrorUseOfByref() = (412, sprintf "A type instantiation involves a byref type. This is not permitted by the rules of Common IL." ) /// Calls to 'reraise' may only occur directly in a handler of a try-with - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:241) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:241) static member chkErrorContainsCallToRethrow() = (413, sprintf "Calls to 'reraise' may only occur directly in a handler of a try-with" ) /// Expression-splicing operators may only be used within quotations - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:242) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:242) static member chkSplicingOnlyInQuotations() = (414, sprintf "Expression-splicing operators may only be used within quotations" ) /// First-class uses of the expression-splicing operator are not permitted - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:243) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:243) static member chkNoFirstClassSplicing() = (415, sprintf "First-class uses of the expression-splicing operator are not permitted" ) /// First-class uses of the address-of operators are not permitted - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:244) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:244) static member chkNoFirstClassAddressOf() = (416, sprintf "First-class uses of the address-of operators are not permitted" ) /// First-class uses of the 'reraise' function is not permitted - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:245) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:245) static member chkNoFirstClassRethrow() = (417, sprintf "First-class uses of the 'reraise' function is not permitted" ) /// The byref typed value '%s' cannot be used at this point - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:246) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:246) static member chkNoByrefAtThisPoint(a0 : System.String) = (418, sprintf "The byref typed value '%s' cannot be used at this point" a0) /// 'base' values may only be used to make direct calls to the base implementations of overridden members - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:247) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:247) static member chkLimitationsOfBaseKeyword() = (419, sprintf "'base' values may only be used to make direct calls to the base implementations of overridden members" ) /// Object constructors cannot directly use try/with and try/finally prior to the initialization of the object. This includes constructs such as 'for x in ...' that may elaborate to uses of these constructs. This is a limitation imposed by Common IL. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:248) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:248) static member chkObjCtorsCantUseExceptionHandling() = (420, sprintf "Object constructors cannot directly use try/with and try/finally prior to the initialization of the object. This includes constructs such as 'for x in ...' that may elaborate to uses of these constructs. This is a limitation imposed by Common IL." ) /// The address of the variable '%s' cannot be used at this point - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:249) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:249) static member chkNoAddressOfAtThisPoint(a0 : System.String) = (421, sprintf "The address of the variable '%s' cannot be used at this point" a0) /// The address of the static field '%s' cannot be used at this point - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:250) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:250) static member chkNoAddressStaticFieldAtThisPoint(a0 : System.String) = (422, sprintf "The address of the static field '%s' cannot be used at this point" a0) /// The address of the field '%s' cannot be used at this point - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:251) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:251) static member chkNoAddressFieldAtThisPoint(a0 : System.String) = (423, sprintf "The address of the field '%s' cannot be used at this point" a0) /// The address of an array element cannot be used at this point - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:252) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:252) static member chkNoAddressOfArrayElementAtThisPoint() = (424, sprintf "The address of an array element cannot be used at this point" ) /// The type of a first-class function cannot contain byrefs - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:253) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:253) static member chkFirstClassFuncNoByref() = (425, sprintf "The type of a first-class function cannot contain byrefs" ) /// A method return type would contain byrefs which is not permitted - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:254) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:254) static member chkReturnTypeNoByref() = (426, sprintf "A method return type would contain byrefs which is not permitted" ) /// Invalid custom attribute value (not a constant or literal) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:255) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:255) static member chkInvalidCustAttrVal() = (428, sprintf "Invalid custom attribute value (not a constant or literal)" ) /// The attribute type '%s' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:256) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:256) static member chkAttrHasAllowMultiFalse(a0 : System.String) = (429, sprintf "The attribute type '%s' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:257) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:257) static member chkMemberUsedInInvalidWay(a0 : System.String, a1 : System.String, a2 : System.String) = (430, sprintf "The member '%s' is used in an invalid way. A use of '%s' has been inferred prior to its definition at or near '%s'. This is an invalid forward reference." a0 a1 a2) /// A byref typed value would be stored here. Top-level let-bound byref values are not permitted. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:258) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:258) static member chkNoByrefAsTopValue() = (431, sprintf "A byref typed value would be stored here. Top-level let-bound byref values are not permitted." ) /// [] terms cannot contain uses of the prefix splice operator '%%' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:259) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:259) static member chkReflectedDefCantSplice() = (432, sprintf "[] terms cannot contain uses of the prefix splice operator '%%'" ) /// A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:260) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:260) static member chkEntryPointUsage() = (433, sprintf "A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence." ) /// compiled form of the union case - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:261) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:261) static member chkUnionCaseCompiledForm() = (sprintf "compiled form of the union case" ) /// default augmentation of the union case - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:262) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:262) static member chkUnionCaseDefaultAugmentation() = (sprintf "default augmentation of the union case" ) /// The property '%s' has the same name as a method in type '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:263) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:263) static member chkPropertySameNameMethod(a0 : System.String, a1 : System.String) = (434, sprintf "The property '%s' has the same name as a method in type '%s'." a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:264) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:264) static member chkGetterSetterDoNotMatchAbstract(a0 : System.String, a1 : System.String) = (435, sprintf "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." a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:265) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:265) static member chkPropertySameNameIndexer(a0 : System.String, a1 : System.String) = (436, sprintf "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." a0 a1) /// A type would store a byref typed value. This is not permitted by Common IL. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:266) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:266) static member chkCantStoreByrefValue() = (437, sprintf "A type would store a byref typed value. This is not permitted by Common IL." ) /// Duplicate method. The method '%s' has the same name and signature as another method in type '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:268) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:268) static member chkDuplicateMethod(a0 : System.String, a1 : System.String) = (438, sprintf "Duplicate method. The method '%s' has the same name and signature as another method in type '%s'." a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:269) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:269) static member chkDuplicateMethodWithSuffix(a0 : System.String, a1 : System.String) = (438, sprintf "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." a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:270) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:270) static member chkDuplicateMethodCurried(a0 : System.String, a1 : System.String) = (439, sprintf "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." a0 a1) /// Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:271) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:271) static member chkCurriedMethodsCantHaveOutParams() = (440, sprintf "Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments" ) /// Duplicate property. The property '%s' has the same name and signature as another property in type '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:272) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:272) static member chkDuplicateProperty(a0 : System.String, a1 : System.String) = (441, sprintf "Duplicate property. The property '%s' has the same name and signature as another property in type '%s'." a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:273) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:273) static member chkDuplicatePropertyWithSuffix(a0 : System.String, a1 : System.String) = (441, sprintf "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." a0 a1) /// Duplicate method. The abstract method '%s' has the same name and signature as an abstract method in an inherited type. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:274) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:274) static member chkDuplicateMethodInheritedType(a0 : System.String) = (442, sprintf "Duplicate method. The abstract method '%s' has the same name and signature as an abstract method in an inherited type." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:275) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:275) static member chkDuplicateMethodInheritedTypeWithSuffix(a0 : System.String) = (442, sprintf "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." a0) /// This type implements the same interface at different generic instantiations '%s' and '%s'. This is not permitted in this version of F#. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:276) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:276) static member chkMultipleGenericInterfaceInstantiations(a0 : System.String, a1 : System.String) = (443, sprintf "This type implements the same interface at different generic instantiations '%s' and '%s'. This is not permitted in this version of F#." a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:277) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:277) static member chkValueWithDefaultValueMustHaveDefaultValue() = (444, sprintf "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" ) /// The type abbreviation contains byrefs. This is not permitted by F#. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:278) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:278) static member chkNoByrefInTypeAbbrev() = (445, sprintf "The type abbreviation contains byrefs. This is not permitted by F#." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:279) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:279) static member crefBoundVarUsedInSplice(a0 : System.String) = (446, sprintf "The variable '%s' is bound in a quotation but is used as part of a spliced expression. This is not permitted since it may escape its scope." a0) /// Quotations cannot contain uses of generic expressions - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:280) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:280) static member crefQuotationsCantContainGenericExprs() = (447, sprintf "Quotations cannot contain uses of generic expressions" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:281) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:281) static member crefQuotationsCantContainGenericFunctions() = (448, sprintf "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." ) /// Quotations cannot contain object expressions - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:282) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:282) static member crefQuotationsCantContainObjExprs() = (449, sprintf "Quotations cannot contain object expressions" ) /// Quotations cannot contain expressions that take the address of a field - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:283) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:283) static member crefQuotationsCantContainAddressOf() = (450, sprintf "Quotations cannot contain expressions that take the address of a field" ) /// Quotations cannot contain expressions that fetch static fields - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:284) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:284) static member crefQuotationsCantContainStaticFieldRef() = (451, sprintf "Quotations cannot contain expressions that fetch static fields" ) /// Quotations cannot contain inline assembly code or pattern matching on arrays - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:285) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:285) static member crefQuotationsCantContainInlineIL() = (452, sprintf "Quotations cannot contain inline assembly code or pattern matching on arrays" ) /// Quotations cannot contain descending for loops - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:286) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:286) static member crefQuotationsCantContainDescendingForLoops() = (453, sprintf "Quotations cannot contain descending for loops" ) /// Quotations cannot contain expressions that fetch union case indexes - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:287) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:287) static member crefQuotationsCantFetchUnionIndexes() = (454, sprintf "Quotations cannot contain expressions that fetch union case indexes" ) /// Quotations cannot contain expressions that set union case fields - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:288) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:288) static member crefQuotationsCantSetUnionFields() = (455, sprintf "Quotations cannot contain expressions that set union case fields" ) /// Quotations cannot contain expressions that set fields in exception values - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:289) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:289) static member crefQuotationsCantSetExceptionFields() = (456, sprintf "Quotations cannot contain expressions that set fields in exception values" ) /// Quotations cannot contain expressions that require byref pointers - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:290) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:290) static member crefQuotationsCantRequireByref() = (457, sprintf "Quotations cannot contain expressions that require byref pointers" ) /// Quotations cannot contain expressions that make member constraint calls, or uses of operators that implicitly resolve to a member constraint call - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:291) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:291) static member crefQuotationsCantCallTraitMembers() = (458, sprintf "Quotations cannot contain expressions that make member constraint calls, or uses of operators that implicitly resolve to a member constraint call" ) /// Quotations cannot contain this kind of constant - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:292) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:292) static member crefQuotationsCantContainThisConstant() = (459, sprintf "Quotations cannot contain this kind of constant" ) /// Quotations cannot contain this kind of pattern match - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:293) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:293) static member crefQuotationsCantContainThisPatternMatch() = (460, sprintf "Quotations cannot contain this kind of pattern match" ) /// Quotations cannot contain array pattern matching - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:294) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:294) static member crefQuotationsCantContainArrayPatternMatching() = (461, sprintf "Quotations cannot contain array pattern matching" ) /// Quotations cannot contain this kind of type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:295) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:295) static member crefQuotationsCantContainThisType() = (462, sprintf "Quotations cannot contain this kind of type" ) /// The declared type parameter '%s' cannot be used here since the type parameter cannot be resolved at compile time - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:296) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:296) static member csTypeCannotBeResolvedAtCompileTime(a0 : System.String) = (sprintf "The declared type parameter '%s' cannot be used here since the type parameter cannot be resolved at compile time" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:297) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:297) static member csCodeLessGeneric() = (464, sprintf "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 '_'." ) /// Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:298) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:298) static member csTypeInferenceMaxDepth() = (465, sprintf "Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations." ) /// Expected arguments to an instance member - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:299) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:299) static member csExpectedArguments() = (sprintf "Expected arguments to an instance member" ) /// This indexer expects %d arguments but is here given %d - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:300) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:300) static member csIndexArgumentMismatch(a0 : System.Int32, a1 : System.Int32) = (sprintf "This indexer expects %d arguments but is here given %d" a0 a1) /// Expecting a type supporting the operator '%s' but given a function type. You may be missing an argument to a function. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:301) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:301) static member csExpectTypeWithOperatorButGivenFunction(a0 : System.String) = (sprintf "Expecting a type supporting the operator '%s' but given a function type. You may be missing an argument to a function." a0) /// Expecting a type supporting the operator '%s' but given a tuple type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:302) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:302) static member csExpectTypeWithOperatorButGivenTuple(a0 : System.String) = (sprintf "Expecting a type supporting the operator '%s' but given a tuple type" a0) /// None of the types '%s' support the operator '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:303) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:303) static member csTypesDoNotSupportOperator(a0 : System.String, a1 : System.String) = (sprintf "None of the types '%s' support the operator '%s'" a0 a1) /// The type '%s' does not support the operator '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:304) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:304) static member csTypeDoesNotSupportOperator(a0 : System.String, a1 : System.String) = (sprintf "The type '%s' does not support the operator '%s'" a0 a1) /// None of the types '%s' support the operator '%s'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:305) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:305) static member csTypesDoNotSupportOperatorNullable(a0 : System.String, a1 : System.String) = (sprintf "None of the types '%s' support the operator '%s'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'." a0 a1) /// The type '%s' does not support the operator '%s'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:306) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:306) static member csTypeDoesNotSupportOperatorNullable(a0 : System.String, a1 : System.String) = (sprintf "The type '%s' does not support the operator '%s'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'." a0 a1) /// The type '%s' does not support a conversion to the type '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:307) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:307) static member csTypeDoesNotSupportConversion(a0 : System.String, a1 : System.String) = (sprintf "The type '%s' does not support a conversion to the type '%s'" a0 a1) /// The type '%s' has a method '%s' (full name '%s'), but the method is static - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:308) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:308) static member csMethodFoundButIsStatic(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "The type '%s' has a method '%s' (full name '%s'), but the method is static" a0 a1 a2) /// The type '%s' has a method '%s' (full name '%s'), but the method is not static - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:309) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:309) static member csMethodFoundButIsNotStatic(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "The type '%s' has a method '%s' (full name '%s'), but the method is not static" a0 a1 a2) /// The constraints 'struct' and 'not struct' are inconsistent - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:310) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:310) static member csStructConstraintInconsistent() = (472, sprintf "The constraints 'struct' and 'not struct' are inconsistent" ) /// The type '%s' does not have 'null' as a proper value - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:311) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:311) static member csTypeDoesNotHaveNull(a0 : System.String) = (sprintf "The type '%s' does not have 'null' as a proper value" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:312) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:312) static member csNullableTypeDoesNotHaveNull(a0 : System.String) = (sprintf "The type '%s' does not have 'null' as a proper value. To create a null value for a Nullable type use 'System.Nullable()'." a0) /// The type '%s' does not support the 'comparison' constraint because it has the 'NoComparison' attribute - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:313) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:313) static member csTypeDoesNotSupportComparison1(a0 : System.String) = (sprintf "The type '%s' does not support the 'comparison' constraint because it has the 'NoComparison' attribute" a0) /// The type '%s' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:314) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:314) static member csTypeDoesNotSupportComparison2(a0 : System.String) = (sprintf "The type '%s' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:315) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:315) static member csTypeDoesNotSupportComparison3(a0 : System.String) = (sprintf "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" a0) /// The type '%s' does not support the 'equality' constraint because it has the 'NoEquality' attribute - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:316) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:316) static member csTypeDoesNotSupportEquality1(a0 : System.String) = (sprintf "The type '%s' does not support the 'equality' constraint because it has the 'NoEquality' attribute" a0) /// The type '%s' does not support the 'equality' constraint because it is a function type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:317) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:317) static member csTypeDoesNotSupportEquality2(a0 : System.String) = (sprintf "The type '%s' does not support the 'equality' constraint because it is a function type" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:318) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:318) static member csTypeDoesNotSupportEquality3(a0 : System.String) = (sprintf "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" a0) /// The type '%s' is not a CLI enum type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:319) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:319) static member csTypeIsNotEnumType(a0 : System.String) = (sprintf "The type '%s' is not a CLI enum type" a0) /// The type '%s' has a non-standard delegate type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:320) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:320) static member csTypeHasNonStandardDelegateType(a0 : System.String) = (sprintf "The type '%s' has a non-standard delegate type" a0) /// The type '%s' is not a CLI delegate type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:321) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:321) static member csTypeIsNotDelegateType(a0 : System.String) = (sprintf "The type '%s' is not a CLI delegate type" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:322) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:322) static member csTypeParameterCannotBeNullable() = (sprintf "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." ) /// A generic construct requires that the type '%s' is a CLI or F# struct type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:323) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:323) static member csGenericConstructRequiresStructType(a0 : System.String) = (sprintf "A generic construct requires that the type '%s' is a CLI or F# struct type" a0) /// A generic construct requires that the type '%s' is an unmanaged type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:324) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:324) static member csGenericConstructRequiresUnmanagedType(a0 : System.String) = (sprintf "A generic construct requires that the type '%s' is an unmanaged type" a0) /// The type '%s' is not compatible with any of the types %s, arising from the use of a printf-style format string - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:325) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:325) static member csTypeNotCompatibleBecauseOfPrintf(a0 : System.String, a1 : System.String) = (sprintf "The type '%s' is not compatible with any of the types %s, arising from the use of a printf-style format string" a0 a1) /// A generic construct requires that the type '%s' have reference semantics, but it does not, i.e. it is a struct - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:326) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:326) static member csGenericConstructRequiresReferenceSemantics(a0 : System.String) = (sprintf "A generic construct requires that the type '%s' have reference semantics, but it does not, i.e. it is a struct" a0) /// A generic construct requires that the type '%s' be non-abstract - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:327) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:327) static member csGenericConstructRequiresNonAbstract(a0 : System.String) = (sprintf "A generic construct requires that the type '%s' be non-abstract" a0) /// A generic construct requires that the type '%s' have a public default constructor - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:328) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:328) static member csGenericConstructRequiresPublicDefaultConstructor(a0 : System.String) = (sprintf "A generic construct requires that the type '%s' have a public default constructor" a0) /// Type instantiation length mismatch - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:329) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:329) static member csTypeInstantiationLengthMismatch() = (483, sprintf "Type instantiation length mismatch" ) /// Optional arguments not permitted here - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:330) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:330) static member csOptionalArgumentNotPermittedHere() = (484, sprintf "Optional arguments not permitted here" ) /// %s is not a static member - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:331) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:331) static member csMemberIsNotStatic(a0 : System.String) = (485, sprintf "%s is not a static member" a0) /// %s is not an instance member - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:332) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:332) static member csMemberIsNotInstance(a0 : System.String) = (486, sprintf "%s is not an instance member" a0) /// Argument length mismatch - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:333) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:333) static member csArgumentLengthMismatch() = (487, sprintf "Argument length mismatch" ) /// The argument types don't match - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:334) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:334) static member csArgumentTypesDoNotMatch() = (488, sprintf "The argument types don't match" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:335) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:335) static member csMethodExpectsParams() = (489, sprintf "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" ) /// The member or object constructor '%s' is not %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:336) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:336) static member csMemberIsNotAccessible(a0 : System.String, a1 : System.String) = (490, sprintf "The member or object constructor '%s' is not %s" a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:337) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:337) static member csMemberIsNotAccessible2(a0 : System.String, a1 : System.String) = (491, sprintf "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." a0 a1) /// %s is not a static method - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:338) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:338) static member csMethodIsNotAStaticMethod(a0 : System.String) = (492, sprintf "%s is not a static method" a0) /// %s is not an instance method - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:339) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:339) static member csMethodIsNotAnInstanceMethod(a0 : System.String) = (493, sprintf "%s is not an instance method" a0) /// The member or object constructor '%s' has no argument or settable return property '%s'. %s. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:340) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:340) static member csMemberHasNoArgumentOrReturnProperty(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "The member or object constructor '%s' has no argument or settable return property '%s'. %s." a0 a1 a2) /// The object constructor '%s' has no argument or settable return property '%s'. %s. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:341) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:341) static member csCtorHasNoArgumentOrReturnProperty(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "The object constructor '%s' has no argument or settable return property '%s'. %s." a0 a1 a2) /// The required signature is %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:342) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:342) static member csRequiredSignatureIs(a0 : System.String) = (495, sprintf "The required signature is %s" a0) /// The member or object constructor '%s' requires %d argument(s). The required signature is '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:343) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:343) static member csMemberSignatureMismatch(a0 : System.String, a1 : System.Int32, a2 : System.String) = (496, sprintf "The member or object constructor '%s' requires %d argument(s). The required signature is '%s'." a0 a1 a2) /// The member or object constructor '%s' requires %d additional argument(s). The required signature is '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:344) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:344) static member csMemberSignatureMismatch2(a0 : System.String, a1 : System.Int32, a2 : System.String) = (497, sprintf "The member or object constructor '%s' requires %d additional argument(s). The required signature is '%s'." a0 a1 a2) /// The member or object constructor '%s' requires %d argument(s). The required signature is '%s'. Some names for missing arguments are %s. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:345) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:345) static member csMemberSignatureMismatch3(a0 : System.String, a1 : System.Int32, a2 : System.String, a3 : System.String) = (498, sprintf "The member or object constructor '%s' requires %d argument(s). The required signature is '%s'. Some names for missing arguments are %s." a0 a1 a2 a3) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:346) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:346) static member csMemberSignatureMismatch4(a0 : System.String, a1 : System.Int32, a2 : System.String, a3 : System.String) = (499, sprintf "The member or object constructor '%s' requires %d additional argument(s). The required signature is '%s'. Some names for missing arguments are %s." a0 a1 a2 a3) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:347) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:347) static member csMemberSignatureMismatchArityNamed(a0 : System.String, a1 : System.Int32, a2 : System.Int32, a3 : System.Int32, a4 : System.String) = (500, sprintf "The member or object constructor '%s' requires %d argument(s) but is here given %d unnamed and %d named argument(s). The required signature is '%s'." a0 a1 a2 a3 a4) /// The member or object constructor '%s' takes %d argument(s) but is here given %d. The required signature is '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:348) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:348) static member csMemberSignatureMismatchArity(a0 : System.String, a1 : System.Int32, a2 : System.Int32, a3 : System.String) = (501, sprintf "The member or object constructor '%s' takes %d argument(s) but is here given %d. The required signature is '%s'." a0 a1 a2 a3) /// The object constructor '%s' takes %d argument(s) but is here given %d. The required signature is '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:349) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:349) static member csCtorSignatureMismatchArity(a0 : System.String, a1 : System.Int32, a2 : System.Int32, a3 : System.String) = (501, sprintf "The object constructor '%s' takes %d argument(s) but is here given %d. The required signature is '%s'." a0 a1 a2 a3) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:350) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:350) static member csCtorSignatureMismatchArityProp(a0 : System.String, a1 : System.Int32, a2 : System.Int32, a3 : System.String) = (501, sprintf "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 (',')." a0 a1 a2 a3) /// The member or object constructor '%s' takes %d type argument(s) but is here given %d. The required signature is '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:351) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:351) static member csMemberSignatureMismatchArityType(a0 : System.String, a1 : System.Int32, a2 : System.Int32, a3 : System.String) = (502, sprintf "The member or object constructor '%s' takes %d type argument(s) but is here given %d. The required signature is '%s'." a0 a1 a2 a3) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:352) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:352) static member csMemberNotAccessible(a0 : System.String, a1 : System.Int32, a2 : System.String, a3 : System.Int32) = (503, sprintf "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." a0 a1 a2 a3) /// Incorrect generic instantiation. No %s member named '%s' takes %d generic arguments. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:353) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:353) static member csIncorrectGenericInstantiation(a0 : System.String, a1 : System.String, a2 : System.Int32) = (504, sprintf "Incorrect generic instantiation. No %s member named '%s' takes %d generic arguments." a0 a1 a2) /// The member or object constructor '%s' does not take %d argument(s). An overload was found taking %d arguments. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:354) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:354) static member csMemberOverloadArityMismatch(a0 : System.String, a1 : System.Int32, a2 : System.Int32) = (505, sprintf "The member or object constructor '%s' does not take %d argument(s). An overload was found taking %d arguments." a0 a1 a2) /// No %s member or object constructor named '%s' takes %d arguments - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:355) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:355) static member csNoMemberTakesTheseArguments(a0 : System.String, a1 : System.String, a2 : System.Int32) = (506, sprintf "No %s member or object constructor named '%s' takes %d arguments" a0 a1 a2) /// No %s member or object constructor named '%s' takes %d arguments. Note the call to this member also provides %d named arguments. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:356) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:356) static member csNoMemberTakesTheseArguments2(a0 : System.String, a1 : System.String, a2 : System.Int32, a3 : System.Int32) = (507, sprintf "No %s member or object constructor named '%s' takes %d arguments. Note the call to this member also provides %d named arguments." a0 a1 a2 a3) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:357) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:357) static member csNoMemberTakesTheseArguments3(a0 : System.String, a1 : System.String, a2 : System.Int32, a3 : System.String) = (508, sprintf "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." a0 a1 a2 a3) /// Method or object constructor '%s' not found - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:358) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:358) static member csMethodNotFound(a0 : System.String) = (509, sprintf "Method or object constructor '%s' not found" a0) /// No overloads match for method '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:359) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:359) static member csNoOverloadsFound(a0 : System.String) = (sprintf "No overloads match for method '%s'." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:360) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:360) static member csMethodIsOverloaded(a0 : System.String) = (sprintf "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." a0) /// Candidates: %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:361) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:361) static member csCandidates(a0 : System.String) = (sprintf "Candidates: %s" a0) /// The available overloads are shown below. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:362) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:362) static member csSeeAvailableOverloads() = (sprintf "The available overloads are shown below." ) /// Accessibility modifiers are not permitted on 'do' bindings, but '%s' was given. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:363) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:363) static member parsDoCannotHaveVisibilityDeclarations(a0 : System.String) = (512, sprintf "Accessibility modifiers are not permitted on 'do' bindings, but '%s' was given." a0) /// End of file in #if section begun at or after here - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:364) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:364) static member parsEofInHashIf() = (513, sprintf "End of file in #if section begun at or after here" ) /// End of file in string begun at or before here - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:365) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:365) static member parsEofInString() = (514, sprintf "End of file in string begun at or before here" ) /// End of file in verbatim string begun at or before here - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:366) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:366) static member parsEofInVerbatimString() = (515, sprintf "End of file in verbatim string begun at or before here" ) /// End of file in comment begun at or before here - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:367) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:367) static member parsEofInComment() = (516, sprintf "End of file in comment begun at or before here" ) /// End of file in string embedded in comment begun at or before here - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:368) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:368) static member parsEofInStringInComment() = (517, sprintf "End of file in string embedded in comment begun at or before here" ) /// End of file in verbatim string embedded in comment begun at or before here - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:369) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:369) static member parsEofInVerbatimStringInComment() = (518, sprintf "End of file in verbatim string embedded in comment begun at or before here" ) /// End of file in IF-OCAML section begun at or before here - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:370) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:370) static member parsEofInIfOcaml() = (519, sprintf "End of file in IF-OCAML section begun at or before here" ) /// End of file in directive begun at or before here - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:371) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:371) static member parsEofInDirective() = (520, sprintf "End of file in directive begun at or before here" ) /// No #endif found for #if or #else - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:372) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:372) static member parsNoHashEndIfFound() = (521, sprintf "No #endif found for #if or #else" ) /// Attributes have been ignored in this construct - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:373) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:373) static member parsAttributesIgnored() = (522, sprintf "Attributes have been ignored in this construct" ) /// 'use' bindings are not permitted in primary constructors - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:374) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:374) static member parsUseBindingsIllegalInImplicitClassConstructors() = (523, sprintf "'use' bindings are not permitted in primary constructors" ) /// 'use' bindings are not permitted in modules and are treated as 'let' bindings - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:375) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:375) static member parsUseBindingsIllegalInModules() = (524, sprintf "'use' bindings are not permitted in modules and are treated as 'let' bindings" ) /// An integer for loop must use a simple identifier - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:376) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:376) static member parsIntegerForLoopRequiresSimpleIdentifier() = (525, sprintf "An integer for loop must use a simple identifier" ) /// At most one 'with' augmentation is permitted - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:377) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:377) static member parsOnlyOneWithAugmentationAllowed() = (526, sprintf "At most one 'with' augmentation is permitted" ) /// A semicolon is not expected at this point - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:378) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:378) static member parsUnexpectedSemicolon() = (527, sprintf "A semicolon is not expected at this point" ) /// Unexpected end of input - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:379) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:379) static member parsUnexpectedEndOfFile() = (528, sprintf "Unexpected end of input" ) /// Accessibility modifiers are not permitted here, but '%s' was given. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:380) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:380) static member parsUnexpectedVisibilityDeclaration(a0 : System.String) = (529, sprintf "Accessibility modifiers are not permitted here, but '%s' was given." a0) /// Only '#' compiler directives may occur prior to the first 'namespace' declaration - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:381) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:381) static member parsOnlyHashDirectivesAllowed() = (530, sprintf "Only '#' compiler directives may occur prior to the first 'namespace' declaration" ) /// Accessibility modifiers should come immediately prior to the identifier naming a construct - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:382) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:382) static member parsVisibilityDeclarationsShouldComePriorToIdentifier() = (531, sprintf "Accessibility modifiers should come immediately prior to the identifier naming a construct" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:383) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:383) static member parsNamespaceOrModuleNotBoth() = (532, sprintf "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 = ...'" ) /// A module abbreviation must be a simple name, not a path - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:384) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:384) static member parsModuleAbbreviationMustBeSimpleName() = (534, sprintf "A module abbreviation must be a simple name, not a path" ) /// Ignoring attributes on module abbreviation - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:385) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:385) static member parsIgnoreAttributesOnModuleAbbreviation() = (535, sprintf "Ignoring attributes on module abbreviation" ) /// The '%s' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:386) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:386) static member parsIgnoreAttributesOnModuleAbbreviationAlwaysPrivate(a0 : System.String) = (536, sprintf "The '%s' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private." a0) /// The '%s' visibility attribute is not allowed on module abbreviation. Module abbreviations are always private. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:387) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:387) static member parsIgnoreVisibilityOnModuleAbbreviationAlwaysPrivate(a0 : System.String) = (537, sprintf "The '%s' visibility attribute is not allowed on module abbreviation. Module abbreviations are always private." a0) /// Unclosed block - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:388) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:388) static member parsUnClosedBlockInHashLight() = (538, sprintf "Unclosed block" ) /// Unmatched 'begin' or 'struct' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:389) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:389) static member parsUnmatchedBeginOrStruct() = (539, sprintf "Unmatched 'begin' or 'struct'" ) /// A module name must be a simple name, not a path - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:390) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:390) static member parsModuleDefnMustBeSimpleName() = (541, sprintf "A module name must be a simple name, not a path" ) /// Unexpected empty type moduleDefn list - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:391) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:391) static member parsUnexpectedEmptyModuleDefn() = (542, sprintf "Unexpected empty type moduleDefn list" ) /// Attributes should be placed before 'val' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:392) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:392) static member parsAttributesMustComeBeforeVal() = (sprintf "Attributes should be placed before 'val'" ) /// Attributes are not permitted on interface implementations - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:393) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:393) static member parsAttributesAreNotPermittedOnInterfaceImplementations() = (543, sprintf "Attributes are not permitted on interface implementations" ) /// Syntax error - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:394) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:394) static member parsSyntaxError() = (544, sprintf "Syntax error" ) /// Augmentations are not permitted on delegate type moduleDefns - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:395) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:395) static member parsAugmentationsIllegalOnDelegateType() = (545, sprintf "Augmentations are not permitted on delegate type moduleDefns" ) /// Unmatched 'class', 'interface' or 'struct' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:396) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:396) static member parsUnmatchedClassInterfaceOrStruct() = (546, sprintf "Unmatched 'class', 'interface' or 'struct'" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:397) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:397) static member parsEmptyTypeDefinition() = (547, sprintf "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'." ) /// Unmatched 'with' or badly formatted 'with' block - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:398) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:398) static member parsUnmatchedWith() = (550, sprintf "Unmatched 'with' or badly formatted 'with' block" ) /// 'get', 'set' or 'get,set' required - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:399) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:399) static member parsGetOrSetRequired() = (551, sprintf "'get', 'set' or 'get,set' required" ) /// Only class types may take value arguments - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:400) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:400) static member parsOnlyClassCanTakeValueArguments() = (552, sprintf "Only class types may take value arguments" ) /// Unmatched 'begin' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:401) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:401) static member parsUnmatchedBegin() = (553, sprintf "Unmatched 'begin'" ) /// Invalid declaration syntax - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:402) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:402) static member parsInvalidDeclarationSyntax() = (554, sprintf "Invalid declaration syntax" ) /// 'get' and/or 'set' required - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:403) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:403) static member parsGetAndOrSetRequired() = (555, sprintf "'get' and/or 'set' required" ) /// Type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:404) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:404) static member parsTypeAnnotationsOnGetSet() = (556, sprintf "Type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...'" ) /// A getter property is expected to be a function, e.g. 'get() = ...' or 'get(index) = ...' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:405) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:405) static member parsGetterMustHaveAtLeastOneArgument() = (557, sprintf "A getter property is expected to be a function, e.g. 'get() = ...' or 'get(index) = ...'" ) /// Multiple accessibilities given for property getter or setter - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:406) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:406) static member parsMultipleAccessibilitiesForGetSet() = (558, sprintf "Multiple accessibilities given for property getter or setter" ) /// Property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... ' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:407) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:407) static member parsSetSyntax() = (559, sprintf "Property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... '" ) /// Interfaces always have the same visibility as the enclosing type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:408) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:408) static member parsInterfacesHaveSameVisibilityAsEnclosingType() = (560, sprintf "Interfaces always have the same visibility as the enclosing type" ) /// Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:409) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:409) static member parsAccessibilityModsIllegalForAbstract() = (561, sprintf "Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type." ) /// Attributes are not permitted on 'inherit' declarations - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:410) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:410) static member parsAttributesIllegalOnInherit() = (562, sprintf "Attributes are not permitted on 'inherit' declarations" ) /// Accessibility modifiers are not permitted on an 'inherits' declaration - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:411) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:411) static member parsVisibilityIllegalOnInherit() = (563, sprintf "Accessibility modifiers are not permitted on an 'inherits' declaration" ) /// '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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:412) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:412) static member parsInheritDeclarationsCannotHaveAsBindings() = (564, sprintf "'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." ) /// Attributes are not allowed here - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:413) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:413) static member parsAttributesIllegalHere() = (565, sprintf "Attributes are not allowed here" ) /// Accessibility modifiers are not permitted in this position for type abbreviations - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:414) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:414) static member parsTypeAbbreviationsCannotHaveVisibilityDeclarations() = (566, sprintf "Accessibility modifiers are not permitted in this position for type abbreviations" ) /// Accessibility modifiers are not permitted in this position for enum types - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:415) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:415) static member parsEnumTypesCannotHaveVisibilityDeclarations() = (567, sprintf "Accessibility modifiers are not permitted in this position for enum types" ) /// All enum fields must be given values - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:416) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:416) static member parsAllEnumFieldsRequireValues() = (568, sprintf "All enum fields must be given values" ) /// Accessibility modifiers are not permitted on inline assembly code types - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:417) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:417) static member parsInlineAssemblyCannotHaveVisibilityDeclarations() = (569, sprintf "Accessibility modifiers are not permitted on inline assembly code types" ) /// Unexpected identifier: '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:418) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:418) static member parsUnexpectedIdentifier(a0 : System.String) = (571, sprintf "Unexpected identifier: '%s'" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:419) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:419) static member parsUnionCasesCannotHaveVisibilityDeclarations() = (572, sprintf "Accessibility modifiers are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation." ) /// Accessibility modifiers are not permitted on enumeration fields - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:420) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:420) static member parsEnumFieldsCannotHaveVisibilityDeclarations() = (573, sprintf "Accessibility modifiers are not permitted on enumeration fields" ) /// Consider using a separate record type instead - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:421) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:421) static member parsConsiderUsingSeparateRecordType() = (sprintf "Consider using a separate record type instead" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:422) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:422) static member parsRecordFieldsCannotHaveVisibilityDeclarations() = (575, sprintf "Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation." ) /// The declaration form 'let ... and ...' for non-recursive bindings is not used in F# code. Consider using a sequence of 'let' bindings - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:423) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:423) static member parsLetAndForNonRecBindings() = (576, sprintf "The declaration form 'let ... and ...' for non-recursive bindings is not used in F# code. Consider using a sequence of 'let' bindings" ) /// Unmatched '(' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:424) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:424) static member parsUnmatchedParen() = (583, sprintf "Unmatched '('" ) /// Successive patterns should be separated by spaces or tupled - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:425) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:425) static member parsSuccessivePatternsShouldBeSpacedOrTupled() = (584, sprintf "Successive patterns should be separated by spaces or tupled" ) /// No matching 'in' found for this 'let' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:426) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:426) static member parsNoMatchingInForLet() = (586, sprintf "No matching 'in' found for this 'let'" ) /// Error in the return expression for this 'let'. Possible incorrect indentation. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:427) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:427) static member parsErrorInReturnForLetIncorrectIndentation() = (587, sprintf "Error in the return expression for this 'let'. Possible incorrect indentation." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:428) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:428) static member parsExpectedExpressionAfterLet(a0 : System.String, a1 : System.String) = (588, sprintf "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." a0 a1) /// Incomplete conditional. Expected 'if then ' or 'if then else '. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:429) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:429) static member parsIncompleteIf() = (589, sprintf "Incomplete conditional. Expected 'if then ' or 'if then else '." ) /// 'assert' may not be used as a first class value. Use 'assert ' instead. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:430) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:430) static member parsAssertIsNotFirstClassValue() = (590, sprintf "'assert' may not be used as a first class value. Use 'assert ' instead." ) /// Identifier expected - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:431) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:431) static member parsIdentifierExpected() = (594, sprintf "Identifier expected" ) /// 'in' or '=' expected - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:432) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:432) static member parsInOrEqualExpected() = (595, sprintf "'in' or '=' expected" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:433) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:433) static member parsArrowUseIsLimited() = (596, sprintf "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." ) /// Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:434) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:434) static member parsSuccessiveArgsShouldBeSpacedOrTupled() = (597, sprintf "Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized" ) /// Unmatched '[' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:435) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:435) static member parsUnmatchedBracket() = (598, sprintf "Unmatched '['" ) /// Missing qualification after '.' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:436) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:436) static member parsMissingQualificationAfterDot() = (599, sprintf "Missing qualification after '.'" ) /// In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:437) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:437) static member parsParenFormIsForML() = (sprintf "In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array" ) /// Mismatched quotation, beginning with '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:438) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:438) static member parsMismatchedQuote(a0 : System.String) = (601, sprintf "Mismatched quotation, beginning with '%s'" a0) /// Unmatched '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:439) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:439) static member parsUnmatched(a0 : System.String) = (602, sprintf "Unmatched '%s'" a0) /// Unmatched '[|' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:440) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:440) static member parsUnmatchedBracketBar() = (603, sprintf "Unmatched '[|'" ) /// Unmatched '{' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:441) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:441) static member parsUnmatchedBrace() = (604, sprintf "Unmatched '{'" ) /// Unmatched '{|' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:442) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:442) static member parsUnmatchedBraceBar() = (605, sprintf "Unmatched '{|'" ) /// Field bindings must have the form 'id = expr;' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:443) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:443) static member parsFieldBinding() = (609, sprintf "Field bindings must have the form 'id = expr;'" ) /// This member is not permitted in an object implementation - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:444) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:444) static member parsMemberIllegalInObjectImplementation() = (610, sprintf "This member is not permitted in an object implementation" ) /// Missing function body - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:445) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:445) static member parsMissingFunctionBody() = (611, sprintf "Missing function body" ) /// Syntax error in labelled type argument - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:446) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:446) static member parsSyntaxErrorInLabeledType() = (613, sprintf "Syntax error in labelled type argument" ) /// Unexpected infix operator in type expression - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:447) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:447) static member parsUnexpectedInfixOperator() = (615, sprintf "Unexpected infix operator in type expression" ) /// The syntax '(typ,...,typ) ident' is not used in F# code. Consider using 'ident' instead - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:448) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:448) static member parsMultiArgumentGenericTypeFormDeprecated() = (sprintf "The syntax '(typ,...,typ) ident' is not used in F# code. Consider using 'ident' instead" ) /// Invalid literal in type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:449) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:449) static member parsInvalidLiteralInType() = (618, sprintf "Invalid literal in type" ) /// Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:450) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:450) static member parsUnexpectedOperatorForUnitOfMeasure() = (619, sprintf "Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'." ) /// Unexpected integer literal in unit-of-measure expression - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:451) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:451) static member parsUnexpectedIntegerLiteralForUnitOfMeasure() = (620, sprintf "Unexpected integer literal in unit-of-measure expression" ) /// Syntax error: unexpected type parameter specification - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:452) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:452) static member parsUnexpectedTypeParameter() = (621, sprintf "Syntax error: unexpected type parameter specification" ) /// Mismatched quotation operator name, beginning with '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:453) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:453) static member parsMismatchedQuotationName(a0 : System.String) = (622, sprintf "Mismatched quotation operator name, beginning with '%s'" a0) /// Active pattern case identifiers must begin with an uppercase letter - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:454) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:454) static member parsActivePatternCaseMustBeginWithUpperCase() = (623, sprintf "Active pattern case identifiers must begin with an uppercase letter" ) /// The '|' character is not permitted in active pattern case identifiers - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:455) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:455) static member parsActivePatternCaseContainsPipe() = (624, sprintf "The '|' character is not permitted in active pattern case identifiers" ) /// Denominator must not be 0 in unit-of-measure exponent - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:456) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:456) static member parsIllegalDenominatorForMeasureExponent() = (625, sprintf "Denominator must not be 0 in unit-of-measure exponent" ) /// No '=' symbol should follow a 'namespace' declaration - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:457) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:457) static member parsNoEqualShouldFollowNamespace() = (sprintf "No '=' symbol should follow a 'namespace' declaration" ) /// The syntax 'module ... = struct .. end' is not used in F# code. Consider using 'module ... = begin .. end' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:458) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:458) static member parsSyntaxModuleStructEndDeprecated() = (sprintf "The syntax 'module ... = struct .. end' is not used in F# code. Consider using 'module ... = begin .. end'" ) /// The syntax 'module ... : sig .. end' is not used in F# code. Consider using 'module ... = begin .. end' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:459) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:459) static member parsSyntaxModuleSigEndDeprecated() = (sprintf "The syntax 'module ... : sig .. end' is not used in F# code. Consider using 'module ... = begin .. end'" ) /// A static field was used where an instance field is expected - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:460) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:460) static member tcStaticFieldUsedWhenInstanceFieldExpected() = (627, sprintf "A static field was used where an instance field is expected" ) /// Method '%s' is not accessible from this code location - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:461) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:461) static member tcMethodNotAccessible(a0 : System.String) = (629, sprintf "Method '%s' is not accessible from this code location" a0) /// Implicit product of measures following / - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:463) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:463) static member tcImplicitMeasureFollowingSlash() = (632, sprintf "Implicit product of measures following /" ) /// Unexpected SynMeasure.Anon - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:464) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:464) static member tcUnexpectedMeasureAnon() = (633, sprintf "Unexpected SynMeasure.Anon" ) /// Non-zero constants cannot have generic units. For generic zero, write 0.0<_>. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:465) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:465) static member tcNonZeroConstantCannotHaveGenericUnit() = (634, sprintf "Non-zero constants cannot have generic units. For generic zero, write 0.0<_>." ) /// In sequence expressions, results are generated using 'yield' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:466) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:466) static member tcSeqResultsUseYield() = (635, sprintf "In sequence expressions, results are generated using 'yield'" ) /// Unexpected big rational constant - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:467) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:467) static member tcUnexpectedBigRationalConstant() = (sprintf "Unexpected big rational constant" ) /// Units-of-measure supported only on float, float32, decimal and signed integer types - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:468) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:468) static member tcInvalidTypeForUnitsOfMeasure() = (636, sprintf "Units-of-measure supported only on float, float32, decimal and signed integer types" ) /// Unexpected Const_uint16array - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:469) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:469) static member tcUnexpectedConstUint16Array() = (sprintf "Unexpected Const_uint16array" ) /// Unexpected Const_bytearray - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:470) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:470) static member tcUnexpectedConstByteArray() = (sprintf "Unexpected Const_bytearray" ) /// A parameter with attributes must also be given a name, e.g. '[] Name : Type' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:471) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:471) static member tcParameterRequiresName() = (640, sprintf "A parameter with attributes must also be given a name, e.g. '[] Name : Type'" ) /// Return values cannot have names - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:472) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:472) static member tcReturnValuesCannotHaveNames() = (641, sprintf "Return values cannot have names" ) /// MemberKind.PropertyGetSet only expected in parse trees - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:473) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:473) static member tcMemberKindPropertyGetSetNotExpected() = (sprintf "MemberKind.PropertyGetSet only expected in parse trees" ) /// Namespaces cannot contain values. Consider using a module to hold your value declarations. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:474) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:474) static member tcNamespaceCannotContainValues() = (201, sprintf "Namespaces cannot contain values. Consider using a module to hold your value declarations." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:475) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:475) static member tcNamespaceCannotContainExtensionMembers() = (644, sprintf "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." ) /// Multiple visibility attributes have been specified for this identifier - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:476) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:476) static member tcMultipleVisibilityAttributes() = (645, sprintf "Multiple visibility attributes have been specified for this identifier" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:477) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:477) static member tcMultipleVisibilityAttributesWithLet() = (646, sprintf "Multiple visibility attributes have been specified for this identifier. 'let' bindings in classes are always private, as are any 'let' bindings inside expressions." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:478) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:478) static member tcInvalidMethodNameForRelationalOperator(a0 : System.String, a1 : System.String) = (sprintf "The name '(%s)' should not be used as a member name. To define comparison semantics for a type, implement the 'System.IComparable' interface. If defining a static member for use from other CLI languages then use the name '%s' instead." a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:479) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:479) static member tcInvalidMethodNameForEquality(a0 : System.String, a1 : System.String) = (sprintf "The name '(%s)' should not be used as a member name. To define equality semantics for a type, override the 'Object.Equals' member. If defining a static member for use from other CLI languages then use the name '%s' instead." a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:480) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:480) static member tcInvalidMemberName(a0 : System.String, a1 : System.String) = (sprintf "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." a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:481) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:481) static member tcInvalidMemberNameFixedTypes(a0 : System.String) = (sprintf "The name '(%s)' should not be used as a member name because it is given a standard definition in the F# library over fixed types" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:482) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:482) static member tcInvalidOperatorDefinitionRelational(a0 : System.String) = (sprintf "The '%s' operator should not normally be redefined. To define overloaded comparison semantics for a particular type, implement the 'System.IComparable' interface in the definition of that type." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:483) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:483) static member tcInvalidOperatorDefinitionEquality(a0 : System.String) = (sprintf "The '%s' operator should not normally be redefined. To define equality semantics for a type, override the 'Object.Equals' member in the definition of that type." a0) /// The '%s' operator should not normally be redefined. Consider using a different operator name - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:484) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:484) static member tcInvalidOperatorDefinition(a0 : System.String) = (sprintf "The '%s' operator should not normally be redefined. Consider using a different operator name" a0) /// The '%s' operator cannot be redefined. Consider using a different operator name - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:485) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:485) static member tcInvalidIndexOperatorDefinition(a0 : System.String) = (sprintf "The '%s' operator cannot be redefined. Consider using a different operator name" a0) /// Expected module or namespace parent %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:486) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:486) static member tcExpectModuleOrNamespaceParent(a0 : System.String) = (sprintf "Expected module or namespace parent %s" a0) /// The struct, record or union type '%s' implements the interface 'System.IComparable' explicitly. You must apply the 'CustomComparison' attribute to the type. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:487) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:487) static member tcImplementsIComparableExplicitly(a0 : System.String) = (647, sprintf "The struct, record or union type '%s' implements the interface 'System.IComparable' explicitly. You must apply the 'CustomComparison' attribute to the type." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:488) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:488) static member tcImplementsGenericIComparableExplicitly(a0 : System.String) = (648, sprintf "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." a0) /// The struct, record or union type '%s' implements the interface 'System.IStructuralComparable' explicitly. Apply the 'CustomComparison' attribute to the type. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:489) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:489) static member tcImplementsIStructuralComparableExplicitly(a0 : System.String) = (649, sprintf "The struct, record or union type '%s' implements the interface 'System.IStructuralComparable' explicitly. Apply the 'CustomComparison' attribute to the type." a0) /// This record contains fields from inconsistent types - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:490) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:490) static member tcRecordFieldInconsistentTypes() = (656, sprintf "This record contains fields from inconsistent types" ) /// DLLImport stubs cannot be inlined - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:491) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:491) static member tcDllImportStubsCannotBeInlined() = (657, sprintf "DLLImport stubs cannot be inlined" ) /// Structs may only bind a 'this' parameter at member declarations - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:492) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:492) static member tcStructsCanOnlyBindThisAtMemberDeclaration() = (658, sprintf "Structs may only bind a 'this' parameter at member declarations" ) /// Unexpected expression at recursive inference point - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:493) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:493) static member tcUnexpectedExprAtRecInfPoint() = (659, sprintf "Unexpected expression at recursive inference point" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:494) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:494) static member tcLessGenericBecauseOfAnnotation(a0 : System.String, a1 : System.String) = (660, sprintf "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'." a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:495) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:495) static member tcConstrainedTypeVariableCannotBeGeneralized() = (661, sprintf "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" ) /// A generic type parameter has been used in a way that constrains it to always be '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:496) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:496) static member tcGenericParameterHasBeenConstrained(a0 : System.String) = (662, sprintf "A generic type parameter has been used in a way that constrains it to always be '%s'" a0) /// This type parameter has been used in a way that constrains it to always be '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:497) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:497) static member tcTypeParameterHasBeenConstrained(a0 : System.String) = (663, sprintf "This type parameter has been used in a way that constrains it to always be '%s'" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:498) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:498) static member tcTypeParametersInferredAreNotStable() = (664, sprintf "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)." ) /// Explicit type parameters may only be used on module or member bindings - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:499) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:499) static member tcExplicitTypeParameterInvalid() = (665, sprintf "Explicit type parameters may only be used on module or member bindings" ) /// You must explicitly declare either all or no type parameters when overriding a generic abstract method - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:500) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:500) static member tcOverridingMethodRequiresAllOrNoTypeParameters() = (666, sprintf "You must explicitly declare either all or no type parameters when overriding a generic abstract method" ) /// The field labels and expected type of this record expression or pattern do not uniquely determine a corresponding record type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:501) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:501) static member tcFieldsDoNotDetermineUniqueRecordType() = (667, sprintf "The field labels and expected type of this record expression or pattern do not uniquely determine a corresponding record type" ) /// The field '%s' appears twice in this record expression or pattern - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:502) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:502) static member tcFieldAppearsTwiceInRecord(a0 : System.String) = (668, sprintf "The field '%s' appears twice in this record expression or pattern" a0) /// Unknown union case - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:503) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:503) static member tcUnknownUnion() = (669, sprintf "Unknown union case" ) /// This code is not sufficiently generic. The type variable %s could not be generalized because it would escape its scope. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:504) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:504) static member tcNotSufficientlyGenericBecauseOfScope(a0 : System.String) = (670, sprintf "This code is not sufficiently generic. The type variable %s could not be generalized because it would escape its scope." a0) /// A property cannot have explicit type parameters. Consider using a method instead. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:505) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:505) static member tcPropertyRequiresExplicitTypeParameters() = (671, sprintf "A property cannot have explicit type parameters. Consider using a method instead." ) /// A constructor cannot have explicit type parameters. Consider using a static construction method instead. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:506) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:506) static member tcConstructorCannotHaveTypeParameters() = (672, sprintf "A constructor cannot have explicit type parameters. Consider using a static construction method instead." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:507) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:507) static member tcInstanceMemberRequiresTarget() = (673, sprintf "This instance member needs a parameter to represent the object being invoked. Make the member static or use the notation 'member x.Member(args) = ...'." ) /// Unexpected source-level property specification in syntax tree - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:508) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:508) static member tcUnexpectedPropertyInSyntaxTree() = (674, sprintf "Unexpected source-level property specification in syntax tree" ) /// A static initializer requires an argument - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:509) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:509) static member tcStaticInitializerRequiresArgument() = (675, sprintf "A static initializer requires an argument" ) /// An object constructor requires an argument - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:510) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:510) static member tcObjectConstructorRequiresArgument() = (676, sprintf "An object constructor requires an argument" ) /// This static member should not have a 'this' parameter. Consider using the notation 'member Member(args) = ...'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:511) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:511) static member tcStaticMemberShouldNotHaveThis() = (677, sprintf "This static member should not have a 'this' parameter. Consider using the notation 'member Member(args) = ...'." ) /// An explicit static initializer should use the syntax 'static new(args) = expr' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:512) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:512) static member tcExplicitStaticInitializerSyntax() = (678, sprintf "An explicit static initializer should use the syntax 'static new(args) = expr'" ) /// An explicit object constructor should use the syntax 'new(args) = expr' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:513) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:513) static member tcExplicitObjectConstructorSyntax() = (679, sprintf "An explicit object constructor should use the syntax 'new(args) = expr'" ) /// Unexpected source-level property specification - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:514) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:514) static member tcUnexpectedPropertySpec() = (680, sprintf "Unexpected source-level property specification" ) /// This form of object expression is not used in F#. Use 'member this.MemberName ... = ...' to define member implementations in object expressions. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:515) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:515) static member tcObjectExpressionFormDeprecated() = (sprintf "This form of object expression is not used in F#. Use 'member this.MemberName ... = ...' to define member implementations in object expressions." ) /// Invalid declaration - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:516) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:516) static member tcInvalidDeclaration() = (682, sprintf "Invalid declaration" ) /// Attributes are not allowed within patterns - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:517) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:517) static member tcAttributesInvalidInPatterns() = (683, sprintf "Attributes are not allowed within patterns" ) /// The generic function '%s' must be given explicit type argument(s) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:518) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:518) static member tcFunctionRequiresExplicitTypeArguments(a0 : System.String) = (685, sprintf "The generic function '%s' must be given explicit type argument(s)" a0) /// The method or function '%s' should not be given explicit type argument(s) because it does not declare its type parameters explicitly - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:519) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:519) static member tcDoesNotAllowExplicitTypeArguments(a0 : System.String) = (686, sprintf "The method or function '%s' should not be given explicit type argument(s) because it does not declare its type parameters explicitly" a0) /// This value, type or method expects %d type parameter(s) but was given %d - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:520) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:520) static member tcTypeParameterArityMismatch(a0 : System.Int32, a1 : System.Int32) = (687, sprintf "This value, type or method expects %d type parameter(s) but was given %d" a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:521) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:521) static member tcDefaultStructConstructorCall() = (688, sprintf "The default, zero-initializing constructor of a struct type may only be used if all the fields of the struct type admit default initialization" ) /// Couldn't find Dispose on IDisposable, or it was overloaded - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:522) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:522) static member tcCouldNotFindIDisposable() = (sprintf "Couldn't find Dispose on IDisposable, or it was overloaded" ) /// This value is not a literal and cannot be used in a pattern - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:523) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:523) static member tcNonLiteralCannotBeUsedInPattern() = (689, sprintf "This value is not a literal and cannot be used in a pattern" ) /// This field is readonly - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:524) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:524) static member tcFieldIsReadonly() = (690, sprintf "This field is readonly" ) /// Named arguments must appear after all other arguments - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:525) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:525) static member tcNameArgumentsMustAppearLast() = (691, sprintf "Named arguments must appear after all other arguments" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:526) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:526) static member tcFunctionRequiresExplicitLambda(a0 : System.Int32) = (692, sprintf "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." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:527) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:527) static member tcTypeCannotBeEnumerated(a0 : System.String) = (693, sprintf "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" a0) /// This recursive binding uses an invalid mixture of recursive forms - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:528) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:528) static member tcInvalidMixtureOfRecursiveForms() = (695, sprintf "This recursive binding uses an invalid mixture of recursive forms" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:529) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:529) static member tcInvalidObjectConstructionExpression() = (696, sprintf "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." ) /// Invalid constraint - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:530) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:530) static member tcInvalidConstraint() = (697, sprintf "Invalid constraint" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:531) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:531) static member tcInvalidConstraintTypeSealed() = (698, sprintf "Invalid constraint: the type used for the constraint is sealed, which means the constraint could only be satisfied by at most one solution" ) /// An 'enum' constraint must be of the form 'enum' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:532) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:532) static member tcInvalidEnumConstraint() = (699, sprintf "An 'enum' constraint must be of the form 'enum'" ) /// 'new' constraints must take one argument of type 'unit' and return the constructed type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:533) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:533) static member tcInvalidNewConstraint() = (700, sprintf "'new' constraints must take one argument of type 'unit' and return the constructed type" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:534) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:534) static member tcInvalidPropertyType() = (701, sprintf "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)'." ) /// Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [] attribute. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:535) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:535) static member tcExpectedUnitOfMeasureMarkWithAttribute() = (702, sprintf "Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [] attribute." ) /// Expected type parameter, not unit-of-measure parameter - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:536) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:536) static member tcExpectedTypeParameter() = (703, sprintf "Expected type parameter, not unit-of-measure parameter" ) /// Expected type, not unit-of-measure - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:537) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:537) static member tcExpectedTypeNotUnitOfMeasure() = (704, sprintf "Expected type, not unit-of-measure" ) /// Expected unit-of-measure, not type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:538) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:538) static member tcExpectedUnitOfMeasureNotType() = (705, sprintf "Expected unit-of-measure, not type" ) /// Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:539) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:539) static member tcInvalidUnitsOfMeasurePrefix() = (706, sprintf "Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets." ) /// Unit-of-measure cannot be used in type constructor application - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:540) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:540) static member tcUnitsOfMeasureInvalidInTypeConstructor() = (707, sprintf "Unit-of-measure cannot be used in type constructor application" ) /// This control construct may only be used if the computation expression builder defines a '%s' method - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:541) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:541) static member tcRequireBuilderMethod(a0 : System.String) = (708, sprintf "This control construct may only be used if the computation expression builder defines a '%s' method" a0) /// This type has no nested types - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:542) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:542) static member tcTypeHasNoNestedTypes() = (709, sprintf "This type has no nested types" ) /// Unexpected %s in type expression - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:543) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:543) static member tcUnexpectedSymbolInTypeExpression(a0 : System.String) = (711, sprintf "Unexpected %s in type expression" a0) /// Type parameter cannot be used as type constructor - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:544) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:544) static member tcTypeParameterInvalidAsTypeConstructor() = (712, sprintf "Type parameter cannot be used as type constructor" ) /// Illegal syntax in type expression - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:545) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:545) static member tcIllegalSyntaxInTypeExpression() = (713, sprintf "Illegal syntax in type expression" ) /// Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:546) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:546) static member tcAnonymousUnitsOfMeasureCannotBeNested() = (714, sprintf "Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression" ) /// Anonymous type variables are not permitted in this declaration - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:547) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:547) static member tcAnonymousTypeInvalidInDeclaration() = (715, sprintf "Anonymous type variables are not permitted in this declaration" ) /// Unexpected / in type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:548) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:548) static member tcUnexpectedSlashInType() = (716, sprintf "Unexpected / in type" ) /// Unexpected type arguments - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:549) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:549) static member tcUnexpectedTypeArguments() = (717, sprintf "Unexpected type arguments" ) /// Optional arguments are only permitted on type members - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:550) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:550) static member tcOptionalArgsOnlyOnMembers() = (718, sprintf "Optional arguments are only permitted on type members" ) /// Name '%s' not bound in pattern context - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:551) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:551) static member tcNameNotBoundInPattern(a0 : System.String) = (719, sprintf "Name '%s' not bound in pattern context" a0) /// 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 = ' at the end of the match clause. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:552) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:552) static member tcInvalidNonPrimitiveLiteralInPatternMatch() = (720, sprintf "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 = ' at the end of the match clause." ) /// Type arguments cannot be specified here - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:553) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:553) static member tcInvalidTypeArgumentUsage() = (721, sprintf "Type arguments cannot be specified here" ) /// Only active patterns returning exactly one result may accept arguments - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:554) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:554) static member tcRequireActivePatternWithOneResult() = (722, sprintf "Only active patterns returning exactly one result may accept arguments" ) /// Invalid argument to parameterized pattern label - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:555) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:555) static member tcInvalidArgForParameterizedPattern() = (723, sprintf "Invalid argument to parameterized pattern label" ) /// Internal error. Invalid index into active pattern array - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:556) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:556) static member tcInvalidIndexIntoActivePatternArray() = (724, sprintf "Internal error. Invalid index into active pattern array" ) /// This union case does not take arguments - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:557) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:557) static member tcUnionCaseDoesNotTakeArguments() = (725, sprintf "This union case does not take arguments" ) /// This union case takes one argument - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:558) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:558) static member tcUnionCaseRequiresOneArgument() = (726, sprintf "This union case takes one argument" ) /// This union case expects %d arguments in tupled form - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:559) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:559) static member tcUnionCaseExpectsTupledArguments(a0 : System.Int32) = (727, sprintf "This union case expects %d arguments in tupled form" a0) /// Field '%s' is not static - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:560) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:560) static member tcFieldIsNotStatic(a0 : System.String) = (728, sprintf "Field '%s' is not static" a0) /// This field is not a literal and cannot be used in a pattern - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:561) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:561) static member tcFieldNotLiteralCannotBeUsedInPattern() = (729, sprintf "This field is not a literal and cannot be used in a pattern" ) /// This is not a variable, constant, active recognizer or literal - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:562) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:562) static member tcRequireVarConstRecogOrLiteral() = (730, sprintf "This is not a variable, constant, active recognizer or literal" ) /// This is not a valid pattern - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:563) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:563) static member tcInvalidPattern() = (731, sprintf "This is not a valid pattern" ) /// Character range matches have been removed in F#. Consider using a 'when' pattern guard instead. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:564) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:564) static member tcUseWhenPatternGuard() = (sprintf "Character range matches have been removed in F#. Consider using a 'when' pattern guard instead." ) /// Illegal pattern - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:565) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:565) static member tcIllegalPattern() = (733, sprintf "Illegal pattern" ) /// Syntax error - unexpected '?' symbol - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:566) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:566) static member tcSyntaxErrorUnexpectedQMark() = (734, sprintf "Syntax error - unexpected '?' symbol" ) /// Expected %d expressions, got %d - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:567) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:567) static member tcExpressionCountMisMatch(a0 : System.Int32, a1 : System.Int32) = (735, sprintf "Expected %d expressions, got %d" a0 a1) /// TcExprUndelayed: delayed - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:568) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:568) static member tcExprUndelayed() = (736, sprintf "TcExprUndelayed: delayed" ) /// This expression form may only be used in sequence and computation expressions - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:569) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:569) static member tcExpressionRequiresSequence() = (737, sprintf "This expression form may only be used in sequence and computation expressions" ) /// Invalid object expression. Objects without overrides or interfaces should use the expression form 'new Type(args)' without braces. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:570) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:570) static member tcInvalidObjectExpressionSyntaxForm() = (738, sprintf "Invalid object expression. Objects without overrides or interfaces should use the expression form 'new Type(args)' without braces." ) /// Invalid object, sequence or record expression - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:571) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:571) static member tcInvalidObjectSequenceOrRecordExpression() = (739, sprintf "Invalid object, sequence or record expression" ) /// Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:572) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:572) static member tcInvalidSequenceExpressionSyntaxForm() = (740, sprintf "Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }'" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:573) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:573) static member tcExpressionWithIfRequiresParenthesis() = (sprintf "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" ) /// Unable to parse format string '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:574) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:574) static member tcUnableToParseFormatString(a0 : System.String) = (741, sprintf "Unable to parse format string '%s'" a0) /// This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:575) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:575) static member tcListLiteralMaxSize() = (742, sprintf "This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList." ) /// The expression form 'expr then expr' may only be used as part of an explicit object constructor - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:576) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:576) static member tcExpressionFormRequiresObjectConstructor() = (743, sprintf "The expression form 'expr then expr' may only be used as part of an explicit object constructor" ) /// Named arguments cannot be given to member trait calls - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:577) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:577) static member tcNamedArgumentsCannotBeUsedInMemberTraits() = (744, sprintf "Named arguments cannot be given to member trait calls" ) /// This is not a valid name for an enumeration case - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:578) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:578) static member tcNotValidEnumCaseName() = (745, sprintf "This is not a valid name for an enumeration case" ) /// This field is not mutable - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:579) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:579) static member tcFieldIsNotMutable() = (746, sprintf "This field is not mutable" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:580) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:580) static member tcConstructRequiresListArrayOrSequence() = (747, sprintf "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" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:581) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:581) static member tcConstructRequiresComputationExpressions() = (748, sprintf "This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'." ) /// This construct may only be used within sequence or computation expressions - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:582) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:582) static member tcConstructRequiresSequenceOrComputations() = (749, sprintf "This construct may only be used within sequence or computation expressions" ) /// This construct may only be used within computation expressions - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:583) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:583) static member tcConstructRequiresComputationExpression() = (750, sprintf "This construct may only be used within computation expressions" ) /// Invalid indexer expression - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:584) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:584) static member tcInvalidIndexerExpression() = (751, sprintf "Invalid indexer expression" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:585) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:585) static member tcObjectOfIndeterminateTypeUsedRequireTypeConstraint() = (752, sprintf "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" ) /// Cannot inherit from a variable type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:586) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:586) static member tcCannotInheritFromVariableType() = (753, sprintf "Cannot inherit from a variable type" ) /// Calls to object constructors on type parameters cannot be given arguments - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:587) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:587) static member tcObjectConstructorsOnTypeParametersCannotTakeArguments() = (754, sprintf "Calls to object constructors on type parameters cannot be given arguments" ) /// The 'CompiledName' attribute cannot be used with this language element - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:588) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:588) static member tcCompiledNameAttributeMisused() = (755, sprintf "The 'CompiledName' attribute cannot be used with this language element" ) /// '%s' may only be used with named types - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:589) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:589) static member tcNamedTypeRequired(a0 : System.String) = (756, sprintf "'%s' may only be used with named types" a0) /// 'inherit' cannot be used on interface types. Consider implementing the interface by using 'interface ... with ... end' instead. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:590) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:590) static member tcInheritCannotBeUsedOnInterfaceType() = (757, sprintf "'inherit' cannot be used on interface types. Consider implementing the interface by using 'interface ... with ... end' instead." ) /// 'new' cannot be used on interface types. Consider using an object expression '{ new ... with ... }' instead. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:591) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:591) static member tcNewCannotBeUsedOnInterfaceType() = (758, sprintf "'new' cannot be used on interface types. Consider using an object expression '{ new ... with ... }' instead." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:592) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:592) static member tcAbstractTypeCannotBeInstantiated() = (759, sprintf "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." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:593) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:593) static member tcIDisposableTypeShouldUseNew() = (760, sprintf "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" ) /// '%s' may only be used to construct object types - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:594) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:594) static member tcSyntaxCanOnlyBeUsedToCreateObjectTypes(a0 : System.String) = (761, sprintf "'%s' may only be used to construct object types" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:595) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:595) static member tcConstructorRequiresCall(a0 : System.String) = (762, sprintf "Constructors for the type '%s' must directly or indirectly call its implicit object constructor. Use a call to the implicit object constructor instead of a record expression." a0) /// The field '%s' has been given a value, but is not present in the type '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:596) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:596) static member tcUndefinedField(a0 : System.String, a1 : System.String) = (763, sprintf "The field '%s' has been given a value, but is not present in the type '%s'" a0 a1) /// No assignment given for field '%s' of type '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:597) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:597) static member tcFieldRequiresAssignment(a0 : System.String, a1 : System.String) = (764, sprintf "No assignment given for field '%s' of type '%s'" a0 a1) /// Extraneous fields have been given values - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:598) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:598) static member tcExtraneousFieldsGivenValues() = (765, sprintf "Extraneous fields have been given values" ) /// Only overrides of abstract and virtual members may be specified in object expressions - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:599) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:599) static member tcObjectExpressionsCanOnlyOverrideAbstractOrVirtual() = (766, sprintf "Only overrides of abstract and virtual members may be specified in object expressions" ) /// The member '%s' does not correspond to any abstract or virtual method available to override or implement. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:600) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:600) static member tcNoAbstractOrVirtualMemberFound(a0 : System.String) = (767, sprintf "The member '%s' does not correspond to any abstract or virtual method available to override or implement." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:601) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:601) static member tcMemberFoundIsNotAbstractOrVirtual(a0 : System.String, a1 : System.String) = (767, sprintf "The type %s contains the member '%s' but it is not a virtual or abstract method that is available to override or implement." a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:602) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:602) static member tcArgumentArityMismatch(a0 : System.String, a1 : System.Int32, a2 : System.Int32, a3 : System.String, a4 : System.String) = (768, sprintf "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" a0 a1 a2 a3 a4) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:603) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:603) static member tcArgumentArityMismatchOneOverload(a0 : System.String, a1 : System.Int32, a2 : System.Int32, a3 : System.String, a4 : System.String) = (769, sprintf "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" a0 a1 a2 a3 a4) /// A simple method name is required here - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:604) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:604) static member tcSimpleMethodNameRequired() = (770, sprintf "A simple method name is required here" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:605) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:605) static member tcPredefinedTypeCannotBeUsedAsSuperType() = (771, sprintf "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" ) /// 'new' must be used with a named type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:606) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:606) static member tcNewMustBeUsedWithNamedType() = (772, sprintf "'new' must be used with a named type" ) /// Cannot create an extension of a sealed type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:607) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:607) static member tcCannotCreateExtensionOfSealedType() = (773, sprintf "Cannot create an extension of a sealed type" ) /// No arguments may be given when constructing a record value - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:608) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:608) static member tcNoArgumentsForRecordValue() = (774, sprintf "No arguments may be given when constructing a record value" ) /// Interface implementations cannot be given on construction expressions - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:609) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:609) static member tcNoInterfaceImplementationForConstructionExpression() = (775, sprintf "Interface implementations cannot be given on construction expressions" ) /// Object construction expressions may only be used to implement constructors in class types - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:610) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:610) static member tcObjectConstructionCanOnlyBeUsedInClassTypes() = (776, sprintf "Object construction expressions may only be used to implement constructors in class types" ) /// Only simple bindings of the form 'id = expr' can be used in construction expressions - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:611) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:611) static member tcOnlySimpleBindingsCanBeUsedInConstructionExpressions() = (777, sprintf "Only simple bindings of the form 'id = expr' can be used in construction expressions" ) /// Objects must be initialized by an object construction expression that calls an inherited object constructor and assigns a value to each field - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:612) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:612) static member tcObjectsMustBeInitializedWithObjectExpression() = (778, sprintf "Objects must be initialized by an object construction expression that calls an inherited object constructor and assigns a value to each field" ) /// Expected an interface type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:613) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:613) static member tcExpectedInterfaceType() = (779, sprintf "Expected an interface type" ) /// Constructor expressions for interfaces do not take arguments - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:614) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:614) static member tcConstructorForInterfacesDoNotTakeArguments() = (780, sprintf "Constructor expressions for interfaces do not take arguments" ) /// This object constructor requires arguments - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:615) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:615) static member tcConstructorRequiresArguments() = (781, sprintf "This object constructor requires arguments" ) /// 'new' may only be used with object constructors - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:616) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:616) static member tcNewRequiresObjectConstructor() = (782, sprintf "'new' may only be used with object constructors" ) /// At least one override did not correctly implement its corresponding abstract member - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:617) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:617) static member tcAtLeastOneOverrideIsInvalid() = (783, sprintf "At least one override did not correctly implement its corresponding abstract member" ) /// This numeric literal requires that a module '%s' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:618) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:618) static member tcNumericLiteralRequiresModule(a0 : System.String) = (784, sprintf "This numeric literal requires that a module '%s' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope" a0) /// Invalid record construction - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:619) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:619) static member tcInvalidRecordConstruction() = (785, sprintf "Invalid record construction" ) /// The expression form { expr with ... } may only be used with record types. To build object types use { new Type(...) with ... } - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:620) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:620) static member tcExpressionFormRequiresRecordTypes() = (786, sprintf "The expression form { expr with ... } may only be used with record types. To build object types use { new Type(...) with ... }" ) /// The inherited type is not an object model type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:621) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:621) static member tcInheritedTypeIsNotObjectModelType() = (787, sprintf "The inherited type is not an object model type" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:622) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:622) static member tcObjectConstructionExpressionCanOnlyImplementConstructorsInObjectModelTypes() = (788, sprintf "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" ) /// '{ }' 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:623) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:623) static member tcEmptyRecordInvalid() = (789, sprintf "'{ }' is not a valid expression. Records must include at least one field. Empty sequences are specified by using Seq.empty or an empty list '[]'." ) /// This type is not a record type. Values of class and struct types must be created using calls to object constructors. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:624) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:624) static member tcTypeIsNotARecordTypeNeedConstructor() = (790, sprintf "This type is not a record type. Values of class and struct types must be created using calls to object constructors." ) /// This type is not a record type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:625) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:625) static member tcTypeIsNotARecordType() = (791, sprintf "This type is not a record type" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:626) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:626) static member tcConstructIsAmbiguousInComputationExpression() = (792, sprintf "This construct is ambiguous as part of a computation expression. Nested expressions may be written using 'let _ = (...)' and nested computations using 'let! res = builder { ... }'." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:627) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:627) static member tcConstructIsAmbiguousInSequenceExpression() = (793, sprintf "This construct is ambiguous as part of a sequence expression. Nested expressions may be written using 'let _ = (...)' and nested sequences using 'yield! seq {... }'." ) /// 'do!' cannot be used within sequence expressions - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:628) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:628) static member tcDoBangIllegalInSequenceExpression() = (794, sprintf "'do!' cannot be used within sequence expressions" ) /// The use of 'let! x = coll' in sequence expressions is not permitted. Use 'for x in coll' instead. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:629) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:629) static member tcUseForInSequenceExpression() = (795, sprintf "The use of 'let! x = coll' in sequence expressions is not permitted. Use 'for x in coll' instead." ) /// 'try'/'with' cannot be used within sequence expressions - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:630) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:630) static member tcTryIllegalInSequenceExpression() = (796, sprintf "'try'/'with' cannot be used within sequence expressions" ) /// In sequence expressions, multiple results are generated using 'yield!' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:631) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:631) static member tcUseYieldBangForMultipleResults() = (797, sprintf "In sequence expressions, multiple results are generated using 'yield!'" ) /// Invalid assignment - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:632) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:632) static member tcInvalidAssignment() = (799, sprintf "Invalid assignment" ) /// Invalid use of a type name - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:633) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:633) static member tcInvalidUseOfTypeName() = (800, sprintf "Invalid use of a type name" ) /// This type has no accessible object constructors - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:634) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:634) static member tcTypeHasNoAccessibleConstructor() = (801, sprintf "This type has no accessible object constructors" ) /// Invalid use of an interface type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:637) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:637) static member tcInvalidUseOfInterfaceType() = (804, sprintf "Invalid use of an interface type" ) /// Invalid use of a delegate constructor. Use the syntax 'new Type(args)' or just 'Type(args)'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:638) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:638) static member tcInvalidUseOfDelegate() = (805, sprintf "Invalid use of a delegate constructor. Use the syntax 'new Type(args)' or just 'Type(args)'." ) /// Property '%s' is not static - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:639) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:639) static member tcPropertyIsNotStatic(a0 : System.String) = (806, sprintf "Property '%s' is not static" a0) /// Property '%s' is not readable - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:640) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:640) static member tcPropertyIsNotReadable(a0 : System.String) = (807, sprintf "Property '%s' is not readable" a0) /// This lookup cannot be used here - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:641) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:641) static member tcLookupMayNotBeUsedHere() = (808, sprintf "This lookup cannot be used here" ) /// Property '%s' is static - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:642) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:642) static member tcPropertyIsStatic(a0 : System.String) = (809, sprintf "Property '%s' is static" a0) /// Property '%s' cannot be set - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:643) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:643) static member tcPropertyCannotBeSet1(a0 : System.String) = (810, sprintf "Property '%s' cannot be set" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:644) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:644) static member tcConstructorsCannotBeFirstClassValues() = (811, sprintf "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))'." ) /// The syntax 'expr.id' may only be used with record labels, properties and fields - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:645) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:645) static member tcSyntaxFormUsedOnlyWithRecordLabelsPropertiesAndFields() = (812, sprintf "The syntax 'expr.id' may only be used with record labels, properties and fields" ) /// Event '%s' is static - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:646) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:646) static member tcEventIsStatic(a0 : System.String) = (813, sprintf "Event '%s' is static" a0) /// Event '%s' is not static - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:647) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:647) static member tcEventIsNotStatic(a0 : System.String) = (814, sprintf "Event '%s' is not static" a0) /// The named argument '%s' did not match any argument or mutable property - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:648) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:648) static member tcNamedArgumentDidNotMatch(a0 : System.String) = (815, sprintf "The named argument '%s' did not match any argument or mutable property" a0) /// One or more of the overloads of this method has curried arguments. Consider redesigning these members to take arguments in tupled form. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:649) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:649) static member tcOverloadsCannotHaveCurriedArguments() = (816, sprintf "One or more of the overloads of this method has curried arguments. Consider redesigning these members to take arguments in tupled form." ) /// The unnamed arguments do not form a prefix of the arguments of the method called - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:650) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:650) static member tcUnnamedArgumentsDoNotFormPrefix() = (sprintf "The unnamed arguments do not form a prefix of the arguments of the method called" ) /// Static optimization conditionals are only for use within the F# library - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:651) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:651) static member tcStaticOptimizationConditionalsOnlyForFSharpLibrary() = (817, sprintf "Static optimization conditionals are only for use within the F# library" ) /// The corresponding formal argument is not optional - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:652) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:652) static member tcFormalArgumentIsNotOptional() = (818, sprintf "The corresponding formal argument is not optional" ) /// Invalid optional assignment to a property or field - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:653) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:653) static member tcInvalidOptionalAssignmentToPropertyOrField() = (819, sprintf "Invalid optional assignment to a property or field" ) /// A delegate constructor must be passed a single function value - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:654) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:654) static member tcDelegateConstructorMustBePassed() = (820, sprintf "A delegate constructor must be passed a single function value" ) /// A binding cannot be marked both 'use' and 'rec' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:655) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:655) static member tcBindingCannotBeUseAndRec() = (821, sprintf "A binding cannot be marked both 'use' and 'rec'" ) /// The 'VolatileField' attribute may only be used on 'let' bindings in classes - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:656) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:656) static member tcVolatileOnlyOnClassLetBindings() = (823, sprintf "The 'VolatileField' attribute may only be used on 'let' bindings in classes" ) /// Attributes are not permitted on 'let' bindings in expressions - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:657) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:657) static member tcAttributesAreNotPermittedOnLetBindings() = (824, sprintf "Attributes are not permitted on 'let' bindings in expressions" ) /// The 'DefaultValue' attribute may only be used on 'val' declarations - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:658) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:658) static member tcDefaultValueAttributeRequiresVal() = (825, sprintf "The 'DefaultValue' attribute may only be used on 'val' declarations" ) /// The 'ConditionalAttribute' attribute may only be used on members - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:659) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:659) static member tcConditionalAttributeRequiresMembers() = (826, sprintf "The 'ConditionalAttribute' attribute may only be used on members" ) /// This is not a valid name for an active pattern - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:660) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:660) static member tcInvalidActivePatternName() = (827, sprintf "This is not a valid name for an active pattern" ) /// The 'EntryPointAttribute' attribute may only be used on function definitions in modules - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:661) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:661) static member tcEntryPointAttributeRequiresFunctionInModule() = (828, sprintf "The 'EntryPointAttribute' attribute may only be used on function definitions in modules" ) /// Mutable values cannot be marked 'inline' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:662) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:662) static member tcMutableValuesCannotBeInline() = (829, sprintf "Mutable values cannot be marked 'inline'" ) /// Mutable values cannot have generic parameters - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:663) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:663) static member tcMutableValuesMayNotHaveGenericParameters() = (830, sprintf "Mutable values cannot have generic parameters" ) /// Mutable function values should be written 'let mutable f = (fun args -> ...)' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:664) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:664) static member tcMutableValuesSyntax() = (831, sprintf "Mutable function values should be written 'let mutable f = (fun args -> ...)'" ) /// Only functions may be marked 'inline' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:665) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:665) static member tcOnlyFunctionsCanBeInline() = (832, sprintf "Only functions may be marked 'inline'" ) /// A literal value cannot be given the [] or [] attributes - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:666) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:666) static member tcIllegalAttributesForLiteral() = (833, sprintf "A literal value cannot be given the [] or [] attributes" ) /// A literal value cannot be marked 'mutable' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:667) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:667) static member tcLiteralCannotBeMutable() = (834, sprintf "A literal value cannot be marked 'mutable'" ) /// A literal value cannot be marked 'inline' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:668) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:668) static member tcLiteralCannotBeInline() = (835, sprintf "A literal value cannot be marked 'inline'" ) /// Literal values cannot have generic parameters - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:669) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:669) static member tcLiteralCannotHaveGenericParameters() = (836, sprintf "Literal values cannot have generic parameters" ) /// This is not a valid constant expression - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:670) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:670) static member tcInvalidConstantExpression() = (837, sprintf "This is not a valid constant expression" ) /// This type is not accessible from this code location - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:671) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:671) static member tcTypeIsInaccessible() = (838, sprintf "This type is not accessible from this code location" ) /// Unexpected condition in imported assembly: failed to decode AttributeUsage attribute - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:672) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:672) static member tcUnexpectedConditionInImportedAssembly() = (839, sprintf "Unexpected condition in imported assembly: failed to decode AttributeUsage attribute" ) /// Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:673) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:673) static member tcUnrecognizedAttributeTarget() = (840, sprintf "Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:674) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:674) static member tcAttributeIsNotValidForLanguageElementUseDo() = (841, sprintf "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." ) /// This attribute is not valid for use on this language element - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:675) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:675) static member tcAttributeIsNotValidForLanguageElement() = (842, sprintf "This attribute is not valid for use on this language element" ) /// Optional arguments cannot be used in custom attributes - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:676) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:676) static member tcOptionalArgumentsCannotBeUsedInCustomAttribute() = (843, sprintf "Optional arguments cannot be used in custom attributes" ) /// This property cannot be set - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:677) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:677) static member tcPropertyCannotBeSet0() = (844, sprintf "This property cannot be set" ) /// This property or field was not found on this custom attribute type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:678) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:678) static member tcPropertyOrFieldNotFoundInAttribute() = (845, sprintf "This property or field was not found on this custom attribute type" ) /// A custom attribute must be a reference type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:679) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:679) static member tcCustomAttributeMustBeReferenceType() = (846, sprintf "A custom attribute must be a reference type" ) /// The number of args for a custom attribute does not match the expected number of args for the attribute constructor - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:680) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:680) static member tcCustomAttributeArgumentMismatch() = (847, sprintf "The number of args for a custom attribute does not match the expected number of args for the attribute constructor" ) /// A custom attribute must invoke an object constructor - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:681) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:681) static member tcCustomAttributeMustInvokeConstructor() = (848, sprintf "A custom attribute must invoke an object constructor" ) /// Attribute expressions must be calls to object constructors - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:682) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:682) static member tcAttributeExpressionsMustBeConstructorCalls() = (849, sprintf "Attribute expressions must be calls to object constructors" ) /// This attribute cannot be used in this version of F# - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:683) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:683) static member tcUnsupportedAttribute() = (850, sprintf "This attribute cannot be used in this version of F#" ) /// Invalid inline specification - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:684) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:684) static member tcInvalidInlineSpecification() = (851, sprintf "Invalid inline specification" ) /// 'use' bindings must be of the form 'use = ' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:685) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:685) static member tcInvalidUseBinding() = (852, sprintf "'use' bindings must be of the form 'use = '" ) /// Abstract members are not permitted in an augmentation - they must be defined as part of the type itself - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:686) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:686) static member tcAbstractMembersIllegalInAugmentation() = (853, sprintf "Abstract members are not permitted in an augmentation - they must be defined as part of the type itself" ) /// Method overrides and interface implementations are not permitted here - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:687) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:687) static member tcMethodOverridesIllegalHere() = (854, sprintf "Method overrides and interface implementations are not permitted here" ) /// No abstract or interface member was found that corresponds to this override - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:688) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:688) static member tcNoMemberFoundForOverride() = (855, sprintf "No abstract or interface member was found that corresponds to this override" ) /// This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:%s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:689) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:689) static member tcOverrideArityMismatch(a0 : System.String) = (856, sprintf "This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:%s" a0) /// This method already has a default implementation - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:690) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:690) static member tcDefaultImplementationAlreadyExists() = (857, sprintf "This method already has a default implementation" ) /// The method implemented by this default is ambiguous - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:691) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:691) static member tcDefaultAmbiguous() = (858, sprintf "The method implemented by this default is ambiguous" ) /// No abstract property was found that corresponds to this override - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:692) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:692) static member tcNoPropertyFoundForOverride() = (859, sprintf "No abstract property was found that corresponds to this override" ) /// This property overrides or implements an abstract property but the abstract property doesn't have a corresponding %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:693) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:693) static member tcAbstractPropertyMissingGetOrSet(a0 : System.String) = (860, sprintf "This property overrides or implements an abstract property but the abstract property doesn't have a corresponding %s" a0) /// Invalid signature for set member - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:694) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:694) static member tcInvalidSignatureForSet() = (861, sprintf "Invalid signature for set member" ) /// This new member hides the abstract member '%s'. Rename the member or use 'override' instead. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:695) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:695) static member tcNewMemberHidesAbstractMember(a0 : System.String) = (864, sprintf "This new member hides the abstract member '%s'. Rename the member or use 'override' instead." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:696) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:696) static member tcNewMemberHidesAbstractMemberWithSuffix(a0 : System.String) = (864, sprintf "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." a0) /// Interfaces cannot contain definitions of static initializers - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:697) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:697) static member tcStaticInitializersIllegalInInterface() = (865, sprintf "Interfaces cannot contain definitions of static initializers" ) /// Interfaces cannot contain definitions of object constructors - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:698) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:698) static member tcObjectConstructorsIllegalInInterface() = (866, sprintf "Interfaces cannot contain definitions of object constructors" ) /// Interfaces cannot contain definitions of member overrides - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:699) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:699) static member tcMemberOverridesIllegalInInterface() = (867, sprintf "Interfaces cannot contain definitions of member overrides" ) /// Interfaces cannot contain definitions of concrete members. You may need to define a constructor on your type to indicate that the type is a class. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:700) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:700) static member tcConcreteMembersIllegalInInterface() = (868, sprintf "Interfaces cannot contain definitions of concrete members. You may need to define a constructor on your type to indicate that the type is a class." ) /// Constructors cannot be specified in exception augmentations - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:701) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:701) static member tcConstructorsDisallowedInExceptionAugmentation() = (869, sprintf "Constructors cannot be specified in exception augmentations" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:702) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:702) static member tcStructsCannotHaveConstructorWithNoArguments() = (870, sprintf "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." ) /// Constructors cannot be defined for this type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:703) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:703) static member tcConstructorsIllegalForThisType() = (871, sprintf "Constructors cannot be defined for this type" ) /// Recursive bindings that include member specifications can only occur as a direct augmentation of a type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:704) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:704) static member tcRecursiveBindingsWithMembersMustBeDirectAugmentation() = (872, sprintf "Recursive bindings that include member specifications can only occur as a direct augmentation of a type" ) /// Only simple variable patterns can be bound in 'let rec' constructs - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:705) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:705) static member tcOnlySimplePatternsInLetRec() = (873, sprintf "Only simple variable patterns can be bound in 'let rec' constructs" ) /// Only record fields and simple, non-recursive 'let' bindings may be marked mutable - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:706) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:706) static member tcOnlyRecordFieldsAndSimpleLetCanBeMutable() = (874, sprintf "Only record fields and simple, non-recursive 'let' bindings may be marked mutable" ) /// This member is not sufficiently generic - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:707) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:707) static member tcMemberIsNotSufficientlyGeneric() = (875, sprintf "This member is not sufficiently generic" ) /// A declaration may only be the [] attribute if a constant value is also given, e.g. 'val x : int = 1' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:708) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:708) static member tcLiteralAttributeRequiresConstantValue() = (876, sprintf "A declaration may only be the [] attribute if a constant value is also given, e.g. 'val x : int = 1'" ) /// A declaration may only be given a value in a signature if the declaration has the [] attribute - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:709) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:709) static member tcValueInSignatureRequiresLiteralAttribute() = (877, sprintf "A declaration may only be given a value in a signature if the declaration has the [] attribute" ) /// Thread-static and context-static variables must be static and given the [] attribute to indicate that the value is initialized to the default value on each new thread - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:710) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:710) static member tcThreadStaticAndContextStaticMustBeStatic() = (878, sprintf "Thread-static and context-static variables must be static and given the [] attribute to indicate that the value is initialized to the default value on each new thread" ) /// Volatile fields must be marked 'mutable' and cannot be thread-static - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:711) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:711) static member tcVolatileFieldsMustBeMutable() = (879, sprintf "Volatile fields must be marked 'mutable' and cannot be thread-static" ) /// Uninitialized 'val' fields must be mutable and marked with the '[]' attribute. Consider using a 'let' binding instead of a 'val' field. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:712) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:712) static member tcUninitializedValFieldsMustBeMutable() = (880, sprintf "Uninitialized 'val' fields must be mutable and marked with the '[]' attribute. Consider using a 'let' binding instead of a 'val' field." ) /// Static 'val' fields in types must be mutable, private and marked with the '[]' 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:713) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:713) static member tcStaticValFieldsMustBeMutableAndPrivate() = (881, sprintf "Static 'val' fields in types must be mutable, private and marked with the '[]' 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." ) /// This field requires a name - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:714) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:714) static member tcFieldRequiresName() = (882, sprintf "This field requires a name" ) /// Invalid namespace, module, type or union case name - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:715) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:715) static member tcInvalidNamespaceModuleTypeUnionName() = (883, sprintf "Invalid namespace, module, type or union case name" ) /// Explicit type declarations for constructors must be of the form 'ty1 * ... * tyN -> resTy'. Parentheses may be required around 'resTy' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:716) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:716) static member tcIllegalFormForExplicitTypeDeclaration() = (884, sprintf "Explicit type declarations for constructors must be of the form 'ty1 * ... * tyN -> resTy'. Parentheses may be required around 'resTy'" ) /// Return types of union cases must be identical to the type being defined, up to abbreviations - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:717) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:717) static member tcReturnTypesForUnionMustBeSameAsType() = (885, sprintf "Return types of union cases must be identical to the type being defined, up to abbreviations" ) /// This is not a valid value for an enumeration literal - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:718) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:718) static member tcInvalidEnumerationLiteral() = (886, sprintf "This is not a valid value for an enumeration literal" ) /// The type '%s' is not an interface type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:719) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:719) static member tcTypeIsNotInterfaceType1(a0 : System.String) = (887, sprintf "The type '%s' is not an interface type" a0) /// Duplicate specification of an interface - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:720) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:720) static member tcDuplicateSpecOfInterface() = (888, sprintf "Duplicate specification of an interface" ) /// A field/val declaration is not permitted here - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:721) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:721) static member tcFieldValIllegalHere() = (889, sprintf "A field/val declaration is not permitted here" ) /// A inheritance declaration is not permitted here - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:722) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:722) static member tcInheritIllegalHere() = (890, sprintf "A inheritance declaration is not permitted here" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:723) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:723) static member tcModuleRequiresQualifiedAccess(a0 : System.String) = (892, sprintf "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." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:724) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:724) static member tcOpenUsedWithPartiallyQualifiedPath(a0 : System.String) = (893, sprintf "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." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:725) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:725) static member tcLocalClassBindingsCannotBeInline() = (894, sprintf "Local class bindings cannot be marked inline. Consider lifting the definition out of the class or else do not mark it as inline." ) /// Type abbreviations cannot have members - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:726) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:726) static member tcTypeAbbreviationsMayNotHaveMembers() = (895, sprintf "Type abbreviations cannot have members" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:727) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:727) static member tcTypeAbbreviationsCheckedAtCompileTime() = (sprintf "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." ) /// Enumerations cannot have members - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:728) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:728) static member tcEnumerationsMayNotHaveMembers() = (896, sprintf "Enumerations cannot have members" ) /// Measure declarations may have only static members - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:729) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:729) static member tcMeasureDeclarationsRequireStaticMembers() = (897, sprintf "Measure declarations may have only static members" ) /// Structs cannot contain 'do' bindings because the default constructor for structs would not execute these bindings - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:730) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:730) static member tcStructsMayNotContainDoBindings() = (sprintf "Structs cannot contain 'do' bindings because the default constructor for structs would not execute these bindings" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:731) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:731) static member tcStructsMayNotContainLetBindings() = (901, sprintf "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." ) /// Static value definitions may only be used in types with a primary constructor. Consider adding arguments to the type definition, e.g. 'type X(args) = ...'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:732) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:732) static member tcStaticLetBindingsRequireClassesWithImplicitConstructors() = (902, sprintf "Static value definitions may only be used in types with a primary constructor. Consider adding arguments to the type definition, e.g. 'type X(args) = ...'." ) /// Measure declarations may have only static members: constructors are not available - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:733) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:733) static member tcMeasureDeclarationsRequireStaticMembersNotConstructors() = (904, sprintf "Measure declarations may have only static members: constructors are not available" ) /// A member and a local class binding both have the name '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:734) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:734) static member tcMemberAndLocalClassBindingHaveSameName(a0 : System.String) = (905, sprintf "A member and a local class binding both have the name '%s'" a0) /// Type abbreviations cannot have interface declarations - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:735) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:735) static member tcTypeAbbreviationsCannotHaveInterfaceDeclaration() = (906, sprintf "Type abbreviations cannot have interface declarations" ) /// Enumerations cannot have interface declarations - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:736) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:736) static member tcEnumerationsCannotHaveInterfaceDeclaration() = (907, sprintf "Enumerations cannot have interface declarations" ) /// This type is not an interface type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:737) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:737) static member tcTypeIsNotInterfaceType0() = (908, sprintf "This type is not an interface type" ) /// All implemented interfaces should be declared on the initial declaration of the type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:738) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:738) static member tcAllImplementedInterfacesShouldBeDeclared() = (909, sprintf "All implemented interfaces should be declared on the initial declaration of the type" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:739) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:739) static member tcDefaultImplementationForInterfaceHasAlreadyBeenAdded() = (910, sprintf "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" ) /// This member is not permitted in an interface implementation - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:740) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:740) static member tcMemberNotPermittedInInterfaceImplementation() = (911, sprintf "This member is not permitted in an interface implementation" ) /// This declaration element is not permitted in an augmentation - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:741) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:741) static member tcDeclarationElementNotPermittedInAugmentation() = (912, sprintf "This declaration element is not permitted in an augmentation" ) /// Types cannot contain nested type definitions - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:742) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:742) static member tcTypesCannotContainNestedTypes() = (913, sprintf "Types cannot contain nested type definitions" ) /// type, exception or module - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:743) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:743) static member tcTypeExceptionOrModule() = (sprintf "type, exception or module" ) /// type or module - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:744) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:744) static member tcTypeOrModule() = (sprintf "type or module" ) /// The struct, record or union type '%s' implements the interface 'System.IStructuralEquatable' explicitly. Apply the 'CustomEquality' attribute to the type. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:745) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:745) static member tcImplementsIStructuralEquatableExplicitly(a0 : System.String) = (914, sprintf "The struct, record or union type '%s' implements the interface 'System.IStructuralEquatable' explicitly. Apply the 'CustomEquality' attribute to the type." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:746) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:746) static member tcImplementsIEquatableExplicitly(a0 : System.String) = (915, sprintf "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)'." a0) /// Explicit type specifications cannot be used for exception constructors - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:747) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:747) static member tcExplicitTypeSpecificationCannotBeUsedForExceptionConstructors() = (916, sprintf "Explicit type specifications cannot be used for exception constructors" ) /// Exception abbreviations should not have argument lists - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:748) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:748) static member tcExceptionAbbreviationsShouldNotHaveArgumentList() = (917, sprintf "Exception abbreviations should not have argument lists" ) /// Abbreviations for Common IL exceptions cannot take arguments - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:749) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:749) static member tcAbbreviationsFordotNetExceptionsCannotTakeArguments() = (918, sprintf "Abbreviations for Common IL exceptions cannot take arguments" ) /// Exception abbreviations must refer to existing exceptions or F# types deriving from System.Exception - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:750) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:750) static member tcExceptionAbbreviationsMustReferToValidExceptions() = (919, sprintf "Exception abbreviations must refer to existing exceptions or F# types deriving from System.Exception" ) /// Abbreviations for Common IL exception types must have a matching object constructor - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:751) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:751) static member tcAbbreviationsFordotNetExceptionsMustHaveMatchingObjectConstructor() = (920, sprintf "Abbreviations for Common IL exception types must have a matching object constructor" ) /// Not an exception - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:752) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:752) static member tcNotAnException() = (921, sprintf "Not an exception" ) /// Invalid module name - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:754) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:754) static member tcInvalidModuleName() = (924, sprintf "Invalid module name" ) /// Invalid type extension - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:755) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:755) static member tcInvalidTypeExtension() = (925, sprintf "Invalid type extension" ) /// The attributes of this type specify multiple kinds for the type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:756) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:756) static member tcAttributesOfTypeSpecifyMultipleKindsForType() = (926, sprintf "The attributes of this type specify multiple kinds for the type" ) /// The kind of the type specified by its attributes does not match the kind implied by its definition - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:757) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:757) static member tcKindOfTypeSpecifiedDoesNotMatchDefinition() = (927, sprintf "The kind of the type specified by its attributes does not match the kind implied by its definition" ) /// Measure definitions cannot have type parameters - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:758) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:758) static member tcMeasureDefinitionsCannotHaveTypeParameters() = (928, sprintf "Measure definitions cannot have type parameters" ) /// This type requires a definition - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:759) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:759) static member tcTypeRequiresDefinition() = (929, sprintf "This type requires a definition" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:760) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:760) static member tcTypeAbbreviationHasTypeParametersMissingOnType() = (sprintf "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 ...'." ) /// Structs, interfaces, enums and delegates cannot inherit from other types - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:761) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:761) static member tcStructsInterfacesEnumsDelegatesMayNotInheritFromOtherTypes() = (931, sprintf "Structs, interfaces, enums and delegates cannot inherit from other types" ) /// Types cannot inherit from multiple concrete types - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:762) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:762) static member tcTypesCannotInheritFromMultipleConcreteTypes() = (932, sprintf "Types cannot inherit from multiple concrete types" ) /// Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:763) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:763) static member tcRecordsUnionsAbbreviationsStructsMayNotHaveAllowNullLiteralAttribute() = (934, sprintf "Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute" ) /// Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:764) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:764) static member tcAllowNullTypesMayOnlyInheritFromAllowNullTypes() = (935, sprintf "Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal" ) /// Generic types cannot be given the 'StructLayout' attribute - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:765) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:765) static member tcGenericTypesCannotHaveStructLayout() = (936, sprintf "Generic types cannot be given the 'StructLayout' attribute" ) /// Only structs and classes without primary constructors may be given the 'StructLayout' attribute - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:766) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:766) static member tcOnlyStructsCanHaveStructLayout() = (937, sprintf "Only structs and classes without primary constructors may be given the 'StructLayout' attribute" ) /// The representation of this type is hidden by the signature. It must be given an attribute such as [], [] or [] to indicate the characteristics of the type. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:767) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:767) static member tcRepresentationOfTypeHiddenBySignature() = (938, sprintf "The representation of this type is hidden by the signature. It must be given an attribute such as [], [] or [] to indicate the characteristics of the type." ) /// Only classes may be given the 'AbstractClass' attribute - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:768) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:768) static member tcOnlyClassesCanHaveAbstract() = (939, sprintf "Only classes may be given the 'AbstractClass' attribute" ) /// Only types representing units-of-measure may be given the 'Measure' attribute - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:769) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:769) static member tcOnlyTypesRepresentingUnitsOfMeasureCanHaveMeasure() = (940, sprintf "Only types representing units-of-measure may be given the 'Measure' attribute" ) /// Accessibility modifiers are not permitted on overrides or interface implementations - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:770) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:770) static member tcOverridesCannotHaveVisibilityDeclarations() = (941, sprintf "Accessibility modifiers are not permitted on overrides or interface implementations" ) /// Discriminated union types are always sealed - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:771) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:771) static member tcTypesAreAlwaysSealedDU() = (942, sprintf "Discriminated union types are always sealed" ) /// Record types are always sealed - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:772) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:772) static member tcTypesAreAlwaysSealedRecord() = (942, sprintf "Record types are always sealed" ) /// Assembly code types are always sealed - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:773) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:773) static member tcTypesAreAlwaysSealedAssemblyCode() = (942, sprintf "Assembly code types are always sealed" ) /// Struct types are always sealed - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:774) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:774) static member tcTypesAreAlwaysSealedStruct() = (942, sprintf "Struct types are always sealed" ) /// Delegate types are always sealed - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:775) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:775) static member tcTypesAreAlwaysSealedDelegate() = (942, sprintf "Delegate types are always sealed" ) /// Enum types are always sealed - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:776) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:776) static member tcTypesAreAlwaysSealedEnum() = (942, sprintf "Enum types are always sealed" ) /// Interface types and delegate types cannot contain fields - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:777) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:777) static member tcInterfaceTypesAndDelegatesCannotContainFields() = (943, sprintf "Interface types and delegate types cannot contain fields" ) /// Abbreviated types cannot be given the 'Sealed' attribute - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:778) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:778) static member tcAbbreviatedTypesCannotBeSealed() = (944, sprintf "Abbreviated types cannot be given the 'Sealed' attribute" ) /// Cannot inherit a sealed type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:779) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:779) static member tcCannotInheritFromSealedType() = (945, sprintf "Cannot inherit a sealed type" ) /// Cannot inherit from interface type. Use interface ... with instead. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:780) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:780) static member tcCannotInheritFromInterfaceType() = (946, sprintf "Cannot inherit from interface type. Use interface ... with instead." ) /// Struct types cannot contain abstract members - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:781) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:781) static member tcStructTypesCannotContainAbstractMembers() = (947, sprintf "Struct types cannot contain abstract members" ) /// Interface types cannot be sealed - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:782) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:782) static member tcInterfaceTypesCannotBeSealed() = (948, sprintf "Interface types cannot be sealed" ) /// Delegate specifications must be of the form 'typ -> typ' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:783) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:783) static member tcInvalidDelegateSpecification() = (949, sprintf "Delegate specifications must be of the form 'typ -> typ'" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:784) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:784) static member tcDelegatesCannotBeCurried() = (950, sprintf "Delegate specifications must not be curried types. Use 'typ * ... * typ -> typ' for multi-argument delegates, and 'typ -> (typ -> typ)' for delegates returning function values." ) /// Literal enumerations must have type int, uint, int16, uint16, int64, uint64, byte, sbyte or char - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:785) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:785) static member tcInvalidTypeForLiteralEnumeration() = (951, sprintf "Literal enumerations must have type int, uint, int16, uint16, int64, uint64, byte, sbyte or char" ) /// This type definition involves an immediate cyclic reference through an abbreviation - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:787) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:787) static member tcTypeDefinitionIsCyclic() = (953, sprintf "This type definition involves an immediate cyclic reference through an abbreviation" ) /// This type definition involves an immediate cyclic reference through a struct field or inheritance relation - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:788) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:788) static member tcTypeDefinitionIsCyclicThroughInheritance() = (954, sprintf "This type definition involves an immediate cyclic reference through a struct field or inheritance relation" ) /// The syntax 'type X with ...' is reserved for augmentations. Types whose representations are hidden but which have members are now declared in signatures using 'type X = ...'. You may also need to add the '[] attribute to the type definition in the signature - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:789) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:789) static member tcReservedSyntaxForAugmentation() = (sprintf "The syntax 'type X with ...' is reserved for augmentations. Types whose representations are hidden but which have members are now declared in signatures using 'type X = ...'. You may also need to add the '[] attribute to the type definition in the signature" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:790) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:790) static member tcMembersThatExtendInterfaceMustBePlacedInSeparateModule() = (956, sprintf "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." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:791) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:791) static member tcDeclaredTypeParametersForExtensionDoNotMatchOriginal(a0 : System.String) = (957, sprintf "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'" a0) /// Type definitions may only have one 'inherit' specification and it must be the first declaration - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:792) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:792) static member tcTypeDefinitionsWithImplicitConstructionMustHaveOneInherit() = (959, sprintf "Type definitions may only have one 'inherit' specification and it must be the first declaration" ) /// 'let' and 'do' bindings must come before member and interface definitions in type definitions - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:793) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:793) static member tcTypeDefinitionsWithImplicitConstructionMustHaveLocalBindingsBeforeMembers() = (960, sprintf "'let' and 'do' bindings must come before member and interface definitions in type definitions" ) /// This 'inherit' declaration specifies the inherited type but no arguments. Consider supplying arguments, e.g. 'inherit BaseType(args)'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:794) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:794) static member tcInheritDeclarationMissingArguments() = (961, sprintf "This 'inherit' declaration specifies the inherited type but no arguments. Consider supplying arguments, e.g. 'inherit BaseType(args)'." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:795) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:795) static member tcInheritConstructionCallNotPartOfImplicitSequence() = (962, sprintf "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) = ...'." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:796) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:796) static member tcLetAndDoRequiresImplicitConstructionSequence() = (963, sprintf "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) = ...'." ) /// Type abbreviations cannot have augmentations - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:797) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:797) static member tcTypeAbbreviationsCannotHaveAugmentations() = (964, sprintf "Type abbreviations cannot have augmentations" ) /// The path '%s' is a namespace. A module abbreviation may not abbreviate a namespace. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:798) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:798) static member tcModuleAbbreviationForNamespace(a0 : System.String) = (965, sprintf "The path '%s' is a namespace. A module abbreviation may not abbreviate a namespace." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:799) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:799) static member tcTypeUsedInInvalidWay(a0 : System.String, a1 : System.String, a2 : System.String) = (966, sprintf "The type '%s' is used in an invalid way. A value prior to '%s' has an inferred type involving '%s', which is an invalid forward reference." a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:800) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:800) static member tcMemberUsedInInvalidWay(a0 : System.String, a1 : System.String, a2 : System.String) = (967, sprintf "The member '%s' is used in an invalid way. A use of '%s' has been inferred prior to the definition of '%s', which is an invalid forward reference." a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:803) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:803) static member tcAttributeAutoOpenWasIgnored(a0 : System.String, a1 : System.String) = (970, sprintf "The attribute 'AutoOpen(\"%s\")' in the assembly '%s' did not refer to a valid module or namespace in that assembly and has been ignored" a0 a1) /// Undefined value '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:804) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:804) static member ilUndefinedValue(a0 : System.String) = (971, sprintf "Undefined value '%s'" a0) /// Label %s not found - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:805) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:805) static member ilLabelNotFound(a0 : System.String) = (972, sprintf "Label %s not found" a0) /// Incorrect number of type arguments to local call - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:806) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:806) static member ilIncorrectNumberOfTypeArguments() = (973, sprintf "Incorrect number of type arguments to local call" ) /// Dynamic invocation of %s is not supported - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:807) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:807) static member ilDynamicInvocationNotSupported(a0 : System.String) = (sprintf "Dynamic invocation of %s is not supported" a0) /// Taking the address of a literal field is invalid - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:808) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:808) static member ilAddressOfLiteralFieldIsInvalid() = (975, sprintf "Taking the address of a literal field is invalid" ) /// This operation involves taking the address of a value '%s' represented using a local variable or other special representation. This is invalid. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:809) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:809) static member ilAddressOfValueHereIsInvalid(a0 : System.String) = (976, sprintf "This operation involves taking the address of a value '%s' represented using a local variable or other special representation. This is invalid." a0) /// Custom marshallers cannot be specified in F# code. Consider using a C# helper function. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:810) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:810) static member ilCustomMarshallersCannotBeUsedInFSharp() = (980, sprintf "Custom marshallers cannot be specified in F# code. Consider using a C# helper function." ) /// The MarshalAs attribute could not be decoded - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:811) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:811) static member ilMarshalAsAttributeCannotBeDecoded() = (981, sprintf "The MarshalAs attribute could not be decoded" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:812) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:812) static member ilSignatureForExternalFunctionContainsTypeParameters() = (982, sprintf "The signature for this external function contains type parameters. Constrain the argument and return types to indicate the types of the corresponding C function." ) /// The DllImport attribute could not be decoded - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:813) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:813) static member ilDllImportAttributeCouldNotBeDecoded() = (983, sprintf "The DllImport attribute could not be decoded" ) /// Literal fields cannot be set - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:814) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:814) static member ilLiteralFieldsCannotBeSet() = (984, sprintf "Literal fields cannot be set" ) /// GenSetStorage: %s was represented as a static method but was not an appropriate lambda expression - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:815) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:815) static member ilStaticMethodIsNotLambda(a0 : System.String) = (985, sprintf "GenSetStorage: %s was represented as a static method but was not an appropriate lambda expression" a0) /// Mutable variables cannot escape their method - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:816) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:816) static member ilMutableVariablesCannotEscapeMethod() = (986, sprintf "Mutable variables cannot escape their method" ) /// Compiler error: unexpected unrealized value - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:817) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:817) static member ilUnexpectedUnrealizedValue() = (987, sprintf "Compiler error: unexpected unrealized value" ) /// Main module of program is empty: nothing will happen when it is run - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:818) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:818) static member ilMainModuleEmpty() = (988, sprintf "Main module of program is empty: nothing will happen when it is run" ) /// This type cannot be used for a literal field - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:819) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:819) static member ilTypeCannotBeUsedForLiteralField() = (989, sprintf "This type cannot be used for a literal field" ) /// Unexpected GetSet annotation on a property - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:820) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:820) static member ilUnexpectedGetSetAnnotation() = (990, sprintf "Unexpected GetSet annotation on a property" ) /// The FieldOffset attribute could not be decoded - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:821) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:821) static member ilFieldOffsetAttributeCouldNotBeDecoded() = (991, sprintf "The FieldOffset attribute could not be decoded" ) /// The StructLayout attribute could not be decoded - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:822) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:822) static member ilStructLayoutAttributeCouldNotBeDecoded() = (992, sprintf "The StructLayout attribute could not be decoded" ) /// The DefaultAugmentation attribute could not be decoded - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:823) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:823) static member ilDefaultAugmentationAttributeCouldNotBeDecoded() = (993, sprintf "The DefaultAugmentation attribute could not be decoded" ) /// Reflected definitions cannot contain uses of the prefix splice operator '%%' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:824) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:824) static member ilReflectedDefinitionsCannotUseSliceOperator() = (994, sprintf "Reflected definitions cannot contain uses of the prefix splice operator '%%'" ) /// Problem with codepage '%d': %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:825) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:825) static member optsProblemWithCodepage(a0 : System.Int32, a1 : System.String) = (1000, sprintf "Problem with codepage '%d': %s" a0 a1) /// Copyright (c) Microsoft Corporation. All Rights Reserved. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:826) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:826) static member optsCopyright() = (sprintf "Copyright (c) Microsoft Corporation. All Rights Reserved." ) /// Freely distributed under the MIT Open Source License. https://github.com/Microsoft/visualfsharp/blob/master/License.txt - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:827) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:827) static member optsCopyrightCommunity() = (sprintf "Freely distributed under the MIT Open Source License. https://github.com/Microsoft/visualfsharp/blob/master/License.txt" ) /// Name of the output file (Short form: -o) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:828) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:828) static member optsNameOfOutputFile() = (sprintf "Name of the output file (Short form: -o)" ) /// Build a console executable - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:829) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:829) static member optsBuildConsole() = (sprintf "Build a console executable" ) /// Build a Windows executable - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:830) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:830) static member optsBuildWindows() = (sprintf "Build a Windows executable" ) /// Build a library (Short form: -a) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:831) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:831) static member optsBuildLibrary() = (sprintf "Build a library (Short form: -a)" ) /// Build a module that can be added to another assembly - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:832) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:832) static member optsBuildModule() = (sprintf "Build a module that can be added to another assembly" ) /// Delay-sign the assembly using only the public portion of the strong name key - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:833) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:833) static member optsDelaySign() = (sprintf "Delay-sign the assembly using only the public portion of the strong name key" ) /// Public-sign the assembly using only the public portion of the strong name key, and mark the assembly as signed - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:834) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:834) static member optsPublicSign() = (sprintf "Public-sign the assembly using only the public portion of the strong name key, and mark the assembly as signed" ) /// Write the xmldoc of the assembly to the given file - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:835) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:835) static member optsWriteXml() = (sprintf "Write the xmldoc of the assembly to the given file" ) /// Specify a strong name key file - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:836) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:836) static member optsStrongKeyFile() = (sprintf "Specify a strong name key file" ) /// Specify a strong name key container - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:837) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:837) static member optsStrongKeyContainer() = (sprintf "Specify a strong name key container" ) /// Limit which platforms this code can run on: x86, Itanium, x64, anycpu32bitpreferred, or anycpu. The default is anycpu. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:838) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:838) static member optsPlatform() = (sprintf "Limit which platforms this code can run on: x86, Itanium, x64, anycpu32bitpreferred, or anycpu. The default is anycpu." ) /// Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining but improves binary compatibility. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:839) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:839) static member optsNoOpt() = (sprintf "Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining but improves binary compatibility." ) /// Don't add a resource to the generated assembly containing F#-specific metadata - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:840) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:840) static member optsNoInterface() = (sprintf "Don't add a resource to the generated assembly containing F#-specific metadata" ) /// Print the inferred interface of the assembly to a file - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:841) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:841) static member optsSig() = (sprintf "Print the inferred interface of the assembly to a file" ) /// Reference an assembly (Short form: -r) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:842) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:842) static member optsReference() = (sprintf "Reference an assembly (Short form: -r)" ) /// Specify a Win32 resource file (.res) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:843) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:843) static member optsWin32res() = (sprintf "Specify a Win32 resource file (.res)" ) /// Specify a Win32 manifest file - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:844) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:844) static member optsWin32manifest() = (sprintf "Specify a Win32 manifest file" ) /// Do not include the default Win32 manifest - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:845) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:845) static member optsNowin32manifest() = (sprintf "Do not include the default Win32 manifest" ) /// Embed all source files in the portable PDB file - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:846) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:846) static member optsEmbedAllSource() = (sprintf "Embed all source files in the portable PDB file" ) /// Embed specific source files in the portable PDB file - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:847) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:847) static member optsEmbedSource() = (sprintf "Embed specific source files in the portable PDB file" ) /// Source link information file to embed in the portable PDB file - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:848) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:848) static member optsSourceLink() = (sprintf "Source link information file to embed in the portable PDB file" ) /// --embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:849) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:849) static member optsEmbeddedSourceRequirePortablePDBs() = (1501, sprintf "--embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded)" ) /// --sourcelink switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:850) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:850) static member optsSourceLinkRequirePortablePDBs() = (1502, sprintf "--sourcelink switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded)" ) /// Source file is too large to embed in a portable PDB - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:851) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:851) static member srcFileTooLarge() = (sprintf "Source file is too large to embed in a portable PDB" ) /// Embed the specified managed resource - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:852) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:852) static member optsResource() = (sprintf "Embed the specified managed resource" ) /// Link the specified resource to this assembly where the resinfo format is [,[,public|private]] - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:853) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:853) static member optsLinkresource() = (sprintf "Link the specified resource to this assembly where the resinfo format is [,[,public|private]]" ) /// Emit debug information (Short form: -g) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:854) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:854) static member optsDebugPM() = (sprintf "Emit debug information (Short form: -g)" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:855) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:855) static member optsDebug(a0 : System.String) = (sprintf "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)." a0) /// Enable optimizations (Short form: -O) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:856) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:856) static member optsOptimize() = (sprintf "Enable optimizations (Short form: -O)" ) /// Enable or disable tailcalls - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:857) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:857) static member optsTailcalls() = (sprintf "Enable or disable tailcalls" ) /// Produce a deterministic assembly (including module version GUID and timestamp) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:858) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:858) static member optsDeterministic() = (sprintf "Produce a deterministic assembly (including module version GUID and timestamp)" ) /// Enable or disable cross-module optimizations - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:859) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:859) static member optsCrossoptimize() = (sprintf "Enable or disable cross-module optimizations" ) /// Report all warnings as errors - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:860) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:860) static member optsWarnaserrorPM() = (sprintf "Report all warnings as errors" ) /// Report specific warnings as errors - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:861) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:861) static member optsWarnaserror() = (sprintf "Report specific warnings as errors" ) /// Set a warning level (0-5) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:862) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:862) static member optsWarn() = (sprintf "Set a warning level (0-5)" ) /// Disable specific warning messages - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:863) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:863) static member optsNowarn() = (sprintf "Disable specific warning messages" ) /// Enable specific warnings that may be off by default - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:864) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:864) static member optsWarnOn() = (sprintf "Enable specific warnings that may be off by default" ) /// Generate overflow checks - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:865) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:865) static member optsChecked() = (sprintf "Generate overflow checks" ) /// Define conditional compilation symbols (Short form: -d) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:866) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:866) static member optsDefine() = (sprintf "Define conditional compilation symbols (Short form: -d)" ) /// Ignore ML compatibility warnings - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:867) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:867) static member optsMlcompatibility() = (sprintf "Ignore ML compatibility warnings" ) /// Suppress compiler copyright message - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:868) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:868) static member optsNologo() = (sprintf "Suppress compiler copyright message" ) /// Display this usage message (Short form: -?) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:869) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:869) static member optsHelp() = (sprintf "Display this usage message (Short form: -?)" ) /// Read response file for more options - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:870) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:870) static member optsResponseFile() = (sprintf "Read response file for more options" ) /// Specify the codepage used to read source files - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:871) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:871) static member optsCodepage() = (sprintf "Specify the codepage used to read source files" ) /// Output messages in UTF-8 encoding - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:872) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:872) static member optsUtf8output() = (sprintf "Output messages in UTF-8 encoding" ) /// Output messages with fully qualified paths - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:873) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:873) static member optsFullpaths() = (sprintf "Output messages with fully qualified paths" ) /// Specify a directory for the include path which is used to resolve source files and assemblies (Short form: -I) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:874) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:874) static member optsLib() = (sprintf "Specify a directory for the include path which is used to resolve source files and assemblies (Short form: -I)" ) /// Base address for the library to be built - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:875) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:875) static member optsBaseaddress() = (sprintf "Base address for the library to be built" ) /// Do not reference the default CLI assemblies by default - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:876) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:876) static member optsNoframework() = (sprintf "Do not reference the default CLI assemblies by default" ) /// Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:877) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:877) static member optsStandalone() = (sprintf "Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:878) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:878) static member optsStaticlink() = (sprintf "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." ) /// Use a resident background compilation service to improve compiler startup times. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:879) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:879) static member optsResident() = (sprintf "Use a resident background compilation service to improve compiler startup times." ) /// Name the output debug file - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:880) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:880) static member optsPdb() = (sprintf "Name the output debug file" ) /// Resolve assembly references using directory-based rules rather than MSBuild resolution - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:881) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:881) static member optsSimpleresolution() = (sprintf "Resolve assembly references using directory-based rules rather than MSBuild resolution" ) /// Unrecognized target '%s', expected 'exe', 'winexe', 'library' or 'module' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:882) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:882) static member optsUnrecognizedTarget(a0 : System.String) = (1048, sprintf "Unrecognized target '%s', expected 'exe', 'winexe', 'library' or 'module'" a0) /// Unrecognized debug type '%s', expected 'pdbonly' or 'full' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:883) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:883) static member optsUnrecognizedDebugType(a0 : System.String) = (1049, sprintf "Unrecognized debug type '%s', expected 'pdbonly' or 'full'" a0) /// Invalid warning level '%d' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:884) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:884) static member optsInvalidWarningLevel(a0 : System.Int32) = (1050, sprintf "Invalid warning level '%d'" a0) /// Short form of '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:885) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:885) static member optsShortFormOf(a0 : System.String) = (sprintf "Short form of '%s'" a0) /// The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:886) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:886) static member optsClirootDeprecatedMsg() = (sprintf "The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead." ) /// Use to override where the compiler looks for mscorlib.dll and framework components - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:887) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:887) static member optsClirootDescription() = (sprintf "Use to override where the compiler looks for mscorlib.dll and framework components" ) /// - OUTPUT FILES - - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:888) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:888) static member optsHelpBannerOutputFiles() = (sprintf "- OUTPUT FILES -" ) /// - INPUT FILES - - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:889) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:889) static member optsHelpBannerInputFiles() = (sprintf "- INPUT FILES -" ) /// - RESOURCES - - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:890) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:890) static member optsHelpBannerResources() = (sprintf "- RESOURCES -" ) /// - CODE GENERATION - - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:891) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:891) static member optsHelpBannerCodeGen() = (sprintf "- CODE GENERATION -" ) /// - ADVANCED - - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:892) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:892) static member optsHelpBannerAdvanced() = (sprintf "- ADVANCED -" ) /// - MISCELLANEOUS - - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:893) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:893) static member optsHelpBannerMisc() = (sprintf "- MISCELLANEOUS -" ) /// - LANGUAGE - - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:894) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:894) static member optsHelpBannerLanguage() = (sprintf "- LANGUAGE -" ) /// - ERRORS AND WARNINGS - - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:895) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:895) static member optsHelpBannerErrsAndWarns() = (sprintf "- ERRORS AND WARNINGS -" ) /// Unknown --test argument: '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:896) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:896) static member optsUnknownArgumentToTheTestSwitch(a0 : System.String) = (1063, sprintf "Unknown --test argument: '%s'" a0) /// Unrecognized platform '%s', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:897) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:897) static member optsUnknownPlatform(a0 : System.String) = (1064, sprintf "Unrecognized platform '%s', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu'" a0) /// The command-line option '%s' is for test purposes only - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:898) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:898) static member optsInternalNoDescription(a0 : System.String) = (sprintf "The command-line option '%s' is for test purposes only" a0) /// The command-line option '%s' has been deprecated - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:899) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:899) static member optsDCLONoDescription(a0 : System.String) = (sprintf "The command-line option '%s' has been deprecated" a0) /// The command-line option '%s' has been deprecated. Use '%s' instead. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:900) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:900) static member optsDCLODeprecatedSuggestAlternative(a0 : System.String, a1 : System.String) = (sprintf "The command-line option '%s' has been deprecated. Use '%s' instead." a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:901) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:901) static member optsDCLOHtmlDoc(a0 : System.String) = (sprintf "The command-line option '%s' has been deprecated. HTML document generation is now part of the F# Power Pack, via the tool FsHtmlDoc.exe." a0) /// Output warning and error messages in color - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:902) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:902) static member optsConsoleColors() = (sprintf "Output warning and error messages in color" ) /// Enable high-entropy ASLR - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:903) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:903) static member optsUseHighEntropyVA() = (sprintf "Enable high-entropy ASLR" ) /// Specify subsystem version of this assembly - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:904) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:904) static member optsSubSystemVersion() = (sprintf "Specify subsystem version of this assembly" ) /// Specify target framework profile of this assembly. Valid values are mscorlib, netcore or netstandard. Default - mscorlib - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:905) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:905) static member optsTargetProfile() = (sprintf "Specify target framework profile of this assembly. Valid values are mscorlib, netcore or netstandard. Default - mscorlib" ) /// Emit debug information in quotations - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:906) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:906) static member optsEmitDebugInfoInQuotations() = (sprintf "Emit debug information in quotations" ) /// Specify the preferred output language culture name (e.g. es-ES, ja-JP) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:907) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:907) static member optsPreferredUiLang() = (sprintf "Specify the preferred output language culture name (e.g. es-ES, ja-JP)" ) /// Don't copy FSharp.Core.dll along the produced binaries - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:908) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:908) static member optsNoCopyFsharpCore() = (sprintf "Don't copy FSharp.Core.dll along the produced binaries" ) /// Invalid version '%s' for '--subsystemversion'. The version must be 4.00 or greater. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:909) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:909) static member optsInvalidSubSystemVersion(a0 : System.String) = (1051, sprintf "Invalid version '%s' for '--subsystemversion'. The version must be 4.00 or greater." a0) /// Invalid value '%s' for '--targetprofile', valid values are 'mscorlib', 'netcore' or 'netstandard'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:910) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:910) static member optsInvalidTargetProfile(a0 : System.String) = (1052, sprintf "Invalid value '%s' for '--targetprofile', valid values are 'mscorlib', 'netcore' or 'netstandard'." a0) /// Full name - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:911) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:911) static member typeInfoFullName() = (sprintf "Full name" ) /// and %d other overloads - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:915) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:915) static member typeInfoOtherOverloads(a0 : System.Int32) = (sprintf "and %d other overloads" a0) /// union case - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:916) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:916) static member typeInfoUnionCase() = (sprintf "union case" ) /// active pattern result - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:917) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:917) static member typeInfoActivePatternResult() = (sprintf "active pattern result" ) /// active recognizer - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:918) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:918) static member typeInfoActiveRecognizer() = (sprintf "active recognizer" ) /// field - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:919) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:919) static member typeInfoField() = (sprintf "field" ) /// event - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:920) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:920) static member typeInfoEvent() = (sprintf "event" ) /// property - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:921) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:921) static member typeInfoProperty() = (sprintf "property" ) /// extension - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:922) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:922) static member typeInfoExtension() = (sprintf "extension" ) /// custom operation - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:923) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:923) static member typeInfoCustomOperation() = (sprintf "custom operation" ) /// argument - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:924) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:924) static member typeInfoArgument() = (sprintf "argument" ) /// anonymous record field - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:925) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:925) static member typeInfoAnonRecdField() = (sprintf "anonymous record field" ) /// patvar - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:926) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:926) static member typeInfoPatternVariable() = (sprintf "patvar" ) /// namespace - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:927) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:927) static member typeInfoNamespace() = (sprintf "namespace" ) /// module - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:928) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:928) static member typeInfoModule() = (sprintf "module" ) /// namespace/module - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:929) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:929) static member typeInfoNamespaceOrModule() = (sprintf "namespace/module" ) /// from %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:930) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:930) static member typeInfoFromFirst(a0 : System.String) = (sprintf "from %s" a0) /// also from %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:931) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:931) static member typeInfoFromNext(a0 : System.String) = (sprintf "also from %s" a0) /// generated property - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:932) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:932) static member typeInfoGeneratedProperty() = (sprintf "generated property" ) /// generated type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:933) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:933) static member typeInfoGeneratedType() = (sprintf "generated type" ) /// Found by AssemblyFolders registry key - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:934) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:934) static member assemblyResolutionFoundByAssemblyFoldersKey() = (sprintf "Found by AssemblyFolders registry key" ) /// Found by AssemblyFoldersEx registry key - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:935) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:935) static member assemblyResolutionFoundByAssemblyFoldersExKey() = (sprintf "Found by AssemblyFoldersEx registry key" ) /// .NET Framework - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:936) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:936) static member assemblyResolutionNetFramework() = (sprintf ".NET Framework" ) /// Global Assembly Cache - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:937) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:937) static member assemblyResolutionGAC() = (sprintf "Global Assembly Cache" ) /// Recursive class hierarchy in type '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:938) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:938) static member recursiveClassHierarchy(a0 : System.String) = (1089, sprintf "Recursive class hierarchy in type '%s'" a0) /// Invalid recursive reference to an abstract slot - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:939) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:939) static member InvalidRecursiveReferenceToAbstractSlot() = (1090, sprintf "Invalid recursive reference to an abstract slot" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:940) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:940) static member eventHasNonStandardType(a0 : System.String, a1 : System.String, a2 : System.String) = (1091, sprintf "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<_,_>'." a0 a1 a2) /// The type '%s' is not accessible from this code location - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:941) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:941) static member typeIsNotAccessible(a0 : System.String) = (1092, sprintf "The type '%s' is not accessible from this code location" a0) /// The union cases or fields of the type '%s' are not accessible from this code location - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:942) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:942) static member unionCasesAreNotAccessible(a0 : System.String) = (1093, sprintf "The union cases or fields of the type '%s' are not accessible from this code location" a0) /// The value '%s' is not accessible from this code location - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:943) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:943) static member valueIsNotAccessible(a0 : System.String) = (1094, sprintf "The value '%s' is not accessible from this code location" a0) /// The union case '%s' is not accessible from this code location - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:944) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:944) static member unionCaseIsNotAccessible(a0 : System.String) = (1095, sprintf "The union case '%s' is not accessible from this code location" a0) /// The record, struct or class field '%s' is not accessible from this code location - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:945) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:945) static member fieldIsNotAccessible(a0 : System.String) = (1096, sprintf "The record, struct or class field '%s' is not accessible from this code location" a0) /// The struct or class field '%s' is not accessible from this code location - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:946) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:946) static member structOrClassFieldIsNotAccessible(a0 : System.String) = (1097, sprintf "The struct or class field '%s' is not accessible from this code location" a0) /// This construct is experimental - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:947) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:947) static member experimentalConstruct() = (sprintf "This construct is experimental" ) /// No Invoke methods found for delegate type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:948) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:948) static member noInvokeMethodsFound() = (1099, sprintf "No Invoke methods found for delegate type" ) /// More than one Invoke method found for delegate type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:949) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:949) static member moreThanOneInvokeMethodFound() = (sprintf "More than one Invoke method found for delegate type" ) /// Delegates are not allowed to have curried signatures - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:950) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:950) static member delegatesNotAllowedToHaveCurriedSignatures() = (1101, sprintf "Delegates are not allowed to have curried signatures" ) /// Unexpected Expr.TyChoose - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:951) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:951) static member tlrUnexpectedTExpr() = (1102, sprintf "Unexpected Expr.TyChoose" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:952) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:952) static member tlrLambdaLiftingOptimizationsNotApplied() = (1103, sprintf "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." ) /// Identifiers containing '@' are reserved for use in F# code generation - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:953) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:953) static member lexhlpIdentifiersContainingAtSymbolReserved() = (1104, sprintf "Identifiers containing '@' are reserved for use in F# code generation" ) /// The identifier '%s' is reserved for future use by F# - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:954) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:954) static member lexhlpIdentifierReserved(a0 : System.String) = (sprintf "The identifier '%s' is reserved for future use by F#" a0) /// Missing variable '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:955) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:955) static member patcMissingVariable(a0 : System.String) = (1106, sprintf "Missing variable '%s'" a0) /// Partial active patterns may only generate one result - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:956) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:956) static member patcPartialActivePatternsGenerateOneResult() = (1107, sprintf "Partial active patterns may only generate one result" ) /// The type '%s' is required here and is unavailable. You must add a reference to assembly '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:957) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:957) static member impTypeRequiredUnavailable(a0 : System.String, a1 : System.String) = (1108, sprintf "The type '%s' is required here and is unavailable. You must add a reference to assembly '%s'." a0 a1) /// A reference to the type '%s' in assembly '%s' was found, but the type could not be found in that assembly - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:958) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:958) static member impReferencedTypeCouldNotBeFoundInAssembly(a0 : System.String, a1 : System.String) = (1109, sprintf "A reference to the type '%s' in assembly '%s' was found, but the type could not be found in that assembly" a0 a1) /// Internal error or badly formed metadata: not enough type parameters were in scope while importing - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:959) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:959) static member impNotEnoughTypeParamsInScopeWhileImporting() = (1110, sprintf "Internal error or badly formed metadata: not enough type parameters were in scope while importing" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:960) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:960) static member impReferenceToDllRequiredByAssembly(a0 : System.String, a1 : System.String, a2 : System.String) = (1111, sprintf "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." a0 a1 a2) /// An imported assembly uses the type '%s' but that type is not public - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:961) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:961) static member impImportedAssemblyUsesNotPublicType(a0 : System.String) = (1112, sprintf "An imported assembly uses the type '%s' but that type is not public" a0) /// The value '%s' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:962) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:962) static member optValueMarkedInlineButIncomplete(a0 : System.String) = (1113, sprintf "The value '%s' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible" a0) /// The value '%s' was marked inline but was not bound in the optimization environment - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:963) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:963) static member optValueMarkedInlineButWasNotBoundInTheOptEnv(a0 : System.String) = (1114, sprintf "The value '%s' was marked inline but was not bound in the optimization environment" a0) /// Local value %s not found during optimization - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:964) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:964) static member optLocalValueNotFoundDuringOptimization(a0 : System.String) = (1115, sprintf "Local value %s not found during optimization" a0) /// A value marked as 'inline' has an unexpected value - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:965) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:965) static member optValueMarkedInlineHasUnexpectedValue() = (1116, sprintf "A value marked as 'inline' has an unexpected value" ) /// A value marked as 'inline' could not be inlined - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:966) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:966) static member optValueMarkedInlineCouldNotBeInlined() = (1117, sprintf "A value marked as 'inline' could not be inlined" ) /// Failed to inline the value '%s' marked 'inline', perhaps because a recursive value was marked 'inline' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:967) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:967) static member optFailedToInlineValue(a0 : System.String) = (1118, sprintf "Failed to inline the value '%s' marked 'inline', perhaps because a recursive value was marked 'inline'" a0) /// Recursive ValValue %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:968) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:968) static member optRecursiveValValue(a0 : System.String) = (1119, sprintf "Recursive ValValue %s" a0) /// The indentation of this 'in' token is incorrect with respect to the corresponding 'let' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:969) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:969) static member lexfltIncorrentIndentationOfIn() = (sprintf "The indentation of this 'in' token is incorrect with respect to the corresponding 'let'" ) /// Possible incorrect indentation: this token is offside of context started at position %s. Try indenting this token further or using standard formatting conventions. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:970) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:970) static member lexfltTokenIsOffsideOfContextStartedEarlier(a0 : System.String) = (sprintf "Possible incorrect indentation: this token is offside of context started at position %s. Try indenting this token further or using standard formatting conventions." a0) /// The '|' tokens separating rules of this pattern match are misaligned by one column. Consider realigning your code or using further indentation. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:971) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:971) static member lexfltSeparatorTokensOfPatternMatchMisaligned() = (sprintf "The '|' tokens separating rules of this pattern match are misaligned by one column. Consider realigning your code or using further indentation." ) /// Invalid module/expression/type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:972) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:972) static member nrInvalidModuleExprType() = (1123, sprintf "Invalid module/expression/type" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:973) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:973) static member nrTypeInstantiationNeededToDisambiguateTypesWithSameName(a0 : System.String, a1 : System.String) = (1124, sprintf "Multiple types exist called '%s', taking different numbers of generic parameters. Provide a type instantiation to disambiguate the type resolution, e.g. '%s'." a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:974) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:974) static member nrTypeInstantiationIsMissingAndCouldNotBeInferred(a0 : System.String, a1 : System.String) = (1125, sprintf "The instantiation of the generic type '%s' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. '%s'." a0 a1) /// 'global' may only be used as the first name in a qualified path - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:975) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:975) static member nrGlobalUsedOnlyAsFirstName() = (1126, sprintf "'global' may only be used as the first name in a qualified path" ) /// This is not a constructor or literal, or a constructor is being used incorrectly - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:976) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:976) static member nrIsNotConstructorOrLiteral() = (1127, sprintf "This is not a constructor or literal, or a constructor is being used incorrectly" ) /// Unexpected empty long identifier - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:977) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:977) static member nrUnexpectedEmptyLongId() = (1128, sprintf "Unexpected empty long identifier" ) /// The record type '%s' does not contain a label '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:978) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:978) static member nrRecordDoesNotContainSuchLabel(a0 : System.String, a1 : System.String) = (1129, sprintf "The record type '%s' does not contain a label '%s'." a0 a1) /// Invalid field label - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:979) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:979) static member nrInvalidFieldLabel() = (1130, sprintf "Invalid field label" ) /// Invalid expression '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:980) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:980) static member nrInvalidExpression(a0 : System.String) = (1132, sprintf "Invalid expression '%s'" a0) /// No constructors are available for the type '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:981) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:981) static member nrNoConstructorsAvailableForType(a0 : System.String) = (1133, sprintf "No constructors are available for the type '%s'" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:982) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:982) static member nrUnionTypeNeedsQualifiedAccess(a0 : System.String, a1 : System.String) = (1134, sprintf "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." a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:983) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:983) static member nrRecordTypeNeedsQualifiedAccess(a0 : System.String, a1 : System.String) = (1135, sprintf "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." a0 a1) /// Unexpected error creating debug information file '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:984) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:984) static member ilwriteErrorCreatingPdb(a0 : System.String) = (1136, sprintf "Unexpected error creating debug information file '%s'" a0) /// This number is outside the allowable range for this integer type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:985) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:985) static member lexOutsideIntegerRange() = (1138, sprintf "This number is outside the allowable range for this integer type" ) /// '%s' is not permitted as a character in operator names and is reserved for future use - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:989) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:989) static member lexCharNotAllowedInOperatorNames(a0 : System.String) = (sprintf "'%s' is not permitted as a character in operator names and is reserved for future use" a0) /// Unexpected character '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:990) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:990) static member lexUnexpectedChar(a0 : System.String) = (sprintf "Unexpected character '%s'" a0) /// This byte array literal contains characters that do not encode as a single byte - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:991) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:991) static member lexByteArrayCannotEncode() = (1140, sprintf "This byte array literal contains characters that do not encode as a single byte" ) /// Identifiers followed by '%s' are reserved for future use - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:992) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:992) static member lexIdentEndInMarkReserved(a0 : System.String) = (1141, sprintf "Identifiers followed by '%s' are reserved for future use" a0) /// This number is outside the allowable range for 8-bit signed integers - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:993) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:993) static member lexOutsideEightBitSigned() = (1142, sprintf "This number is outside the allowable range for 8-bit signed integers" ) /// This number is outside the allowable range for hexadecimal 8-bit signed integers - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:994) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:994) static member lexOutsideEightBitSignedHex() = (1143, sprintf "This number is outside the allowable range for hexadecimal 8-bit signed integers" ) /// This number is outside the allowable range for 8-bit unsigned integers - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:995) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:995) static member lexOutsideEightBitUnsigned() = (1144, sprintf "This number is outside the allowable range for 8-bit unsigned integers" ) /// This number is outside the allowable range for 16-bit signed integers - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:996) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:996) static member lexOutsideSixteenBitSigned() = (1145, sprintf "This number is outside the allowable range for 16-bit signed integers" ) /// This number is outside the allowable range for 16-bit unsigned integers - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:997) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:997) static member lexOutsideSixteenBitUnsigned() = (1146, sprintf "This number is outside the allowable range for 16-bit unsigned integers" ) /// This number is outside the allowable range for 32-bit signed integers - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:998) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:998) static member lexOutsideThirtyTwoBitSigned() = (1147, sprintf "This number is outside the allowable range for 32-bit signed integers" ) /// This number is outside the allowable range for 32-bit unsigned integers - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:999) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:999) static member lexOutsideThirtyTwoBitUnsigned() = (1148, sprintf "This number is outside the allowable range for 32-bit unsigned integers" ) /// This number is outside the allowable range for 64-bit signed integers - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1000) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1000) static member lexOutsideSixtyFourBitSigned() = (1149, sprintf "This number is outside the allowable range for 64-bit signed integers" ) /// This number is outside the allowable range for 64-bit unsigned integers - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1001) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1001) static member lexOutsideSixtyFourBitUnsigned() = (1150, sprintf "This number is outside the allowable range for 64-bit unsigned integers" ) /// This number is outside the allowable range for signed native integers - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1002) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1002) static member lexOutsideNativeSigned() = (1151, sprintf "This number is outside the allowable range for signed native integers" ) /// This number is outside the allowable range for unsigned native integers - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1003) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1003) static member lexOutsideNativeUnsigned() = (1152, sprintf "This number is outside the allowable range for unsigned native integers" ) /// Invalid floating point number - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1004) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1004) static member lexInvalidFloat() = (1153, sprintf "Invalid floating point number" ) /// This number is outside the allowable range for decimal literals - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1005) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1005) static member lexOusideDecimal() = (1154, sprintf "This number is outside the allowable range for decimal literals" ) /// This number is outside the allowable range for 32-bit floats - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1006) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1006) static member lexOusideThirtyTwoBitFloat() = (1155, sprintf "This number is outside the allowable range for 32-bit floats" ) /// This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1007) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1007) static member lexInvalidNumericLiteral() = (1156, sprintf "This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger)." ) /// This is not a valid byte literal - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1008) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1008) static member lexInvalidByteLiteral() = (1157, sprintf "This is not a valid byte literal" ) /// This is not a valid character literal - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1009) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1009) static member lexInvalidCharLiteral() = (1158, sprintf "This is not a valid character literal" ) /// This Unicode encoding is only valid in string literals - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1010) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1010) static member lexThisUnicodeOnlyInStringLiterals() = (1159, sprintf "This Unicode encoding is only valid in string literals" ) /// This token is reserved for future use - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1011) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1011) static member lexTokenReserved() = (1160, sprintf "This token is reserved for future use" ) /// TABs are not allowed in F# code unless the #indent \"off\" option is used - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1012) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1012) static member lexTabsNotAllowed() = (1161, sprintf "TABs are not allowed in F# code unless the #indent \"off\" option is used" ) /// Invalid line number: '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1013) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1013) static member lexInvalidLineNumber(a0 : System.String) = (1162, sprintf "Invalid line number: '%s'" a0) /// #if directive must appear as the first non-whitespace character on a line - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1014) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1014) static member lexHashIfMustBeFirst() = (1163, sprintf "#if directive must appear as the first non-whitespace character on a line" ) /// #else has no matching #if - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1015) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1015) static member lexHashElseNoMatchingIf() = (sprintf "#else has no matching #if" ) /// #endif required for #else - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1016) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1016) static member lexHashEndifRequiredForElse() = (sprintf "#endif required for #else" ) /// #else directive must appear as the first non-whitespace character on a line - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1017) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1017) static member lexHashElseMustBeFirst() = (1166, sprintf "#else directive must appear as the first non-whitespace character on a line" ) /// #endif has no matching #if - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1018) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1018) static member lexHashEndingNoMatchingIf() = (sprintf "#endif has no matching #if" ) /// #endif directive must appear as the first non-whitespace character on a line - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1019) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1019) static member lexHashEndifMustBeFirst() = (1168, sprintf "#endif directive must appear as the first non-whitespace character on a line" ) /// #if directive should be immediately followed by an identifier - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1020) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1020) static member lexHashIfMustHaveIdent() = (1169, sprintf "#if directive should be immediately followed by an identifier" ) /// Syntax error. Wrong nested #endif, unexpected tokens before it. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1021) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1021) static member lexWrongNestedHashEndif() = (1170, sprintf "Syntax error. Wrong nested #endif, unexpected tokens before it." ) /// #! may only appear as the first line at the start of a file. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1022) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1022) static member lexHashBangMustBeFirstInFile() = (sprintf "#! may only appear as the first line at the start of a file." ) /// Expected single line comment or end of line - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1023) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1023) static member pplexExpectedSingleLineComment() = (1171, sprintf "Expected single line comment or end of line" ) /// Infix operator member '%s' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1024) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1024) static member memberOperatorDefinitionWithNoArguments(a0 : System.String) = (1172, sprintf "Infix operator member '%s' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ..." a0) /// Infix operator member '%s' has %d initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1025) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1025) static member memberOperatorDefinitionWithNonPairArgument(a0 : System.String, a1 : System.Int32) = (1173, sprintf "Infix operator member '%s' has %d initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ..." a0 a1) /// Infix operator member '%s' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1026) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1026) static member memberOperatorDefinitionWithCurriedArguments(a0 : System.String) = (1174, sprintf "Infix operator member '%s' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ..." a0) /// All record, union and struct types in FSharp.Core.dll must be explicitly labelled with 'StructuralComparison' or 'NoComparison' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1027) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1027) static member tcFSharpCoreRequiresExplicit() = (1175, sprintf "All record, union and struct types in FSharp.Core.dll must be explicitly labelled with 'StructuralComparison' or 'NoComparison'" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1028) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1028) static member tcStructuralComparisonNotSatisfied1(a0 : System.String, a1 : System.String) = (1176, sprintf "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" a0 a1) /// The struct, record or union type '%s' has the 'StructuralComparison' attribute but the component type '%s' does not satisfy the 'comparison' constraint - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1029) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1029) static member tcStructuralComparisonNotSatisfied2(a0 : System.String, a1 : System.String) = (1177, sprintf "The struct, record or union type '%s' has the 'StructuralComparison' attribute but the component type '%s' does not satisfy the 'comparison' constraint" a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1030) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1030) static member tcNoComparisonNeeded1(a0 : System.String, a1 : System.String, a2 : System.String) = (1178, sprintf "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" a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1031) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1031) static member tcNoComparisonNeeded2(a0 : System.String, a1 : System.String, a2 : System.String) = (1178, sprintf "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" a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1032) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1032) static member tcNoEqualityNeeded1(a0 : System.String, a1 : System.String, a2 : System.String) = (1178, sprintf "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" a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1033) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1033) static member tcNoEqualityNeeded2(a0 : System.String, a1 : System.String, a2 : System.String) = (1178, sprintf "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" a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1034) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1034) static member tcStructuralEqualityNotSatisfied1(a0 : System.String, a1 : System.String) = (1179, sprintf "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" a0 a1) /// The struct, record or union type '%s' has the 'StructuralEquality' attribute but the component type '%s' does not satisfy the 'equality' constraint - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1035) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1035) static member tcStructuralEqualityNotSatisfied2(a0 : System.String, a1 : System.String) = (1180, sprintf "The struct, record or union type '%s' has the 'StructuralEquality' attribute but the component type '%s' does not satisfy the 'equality' constraint" a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1036) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1036) static member tcStructsMustDeclareTypesOfImplicitCtorArgsExplicitly() = (1181, sprintf "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." ) /// The value '%s' is unused - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1037) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1037) static member chkUnusedValue(a0 : System.String) = (1182, sprintf "The value '%s' is unused" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1038) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1038) static member chkUnusedThisVariable(a0 : System.String) = (1183, sprintf "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." a0) /// A getter property may have at most one argument group - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1039) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1039) static member parsGetterAtMostOneArgument() = (1184, sprintf "A getter property may have at most one argument group" ) /// A setter property may have at most two argument groups - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1040) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1040) static member parsSetterAtMostTwoArguments() = (1185, sprintf "A setter property may have at most two argument groups" ) /// Invalid property getter or setter - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1041) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1041) static member parsInvalidProperty() = (1186, sprintf "Invalid property getter or setter" ) /// An indexer property must be given at least one argument - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1042) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1042) static member parsIndexerPropertyRequiresAtLeastOneArgument() = (1187, sprintf "An indexer property must be given at least one argument" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1043) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1043) static member tastInvalidAddressOfMutableAcrossAssemblyBoundary() = (1188, sprintf "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" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1044) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1044) static member parsNonAdjacentTypars() = (1189, sprintf "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." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1045) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1045) static member parsNonAdjacentTyargs() = (1190, sprintf "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." ) /// The use of the type syntax 'int C' and 'C ' is not permitted here. Consider adjusting this type to be written in the form 'C' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1046) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1046) static member parsNonAtomicType() = (sprintf "The use of the type syntax 'int C' and 'C ' is not permitted here. Consider adjusting this type to be written in the form 'C'" ) /// The module/namespace '%s' from compilation unit '%s' did not contain the module/namespace '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1049) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1049) static member tastUndefinedItemRefModuleNamespace(a0 : System.String, a1 : System.String, a2 : System.String) = (1193, sprintf "The module/namespace '%s' from compilation unit '%s' did not contain the module/namespace '%s'" a0 a1 a2) /// The module/namespace '%s' from compilation unit '%s' did not contain the val '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1050) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1050) static member tastUndefinedItemRefVal(a0 : System.String, a1 : System.String, a2 : System.String) = (1194, sprintf "The module/namespace '%s' from compilation unit '%s' did not contain the val '%s'" a0 a1 a2) /// The module/namespace '%s' from compilation unit '%s' did not contain the namespace, module or type '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1051) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1051) static member tastUndefinedItemRefModuleNamespaceType(a0 : System.String, a1 : System.String, a2 : System.String) = (1195, sprintf "The module/namespace '%s' from compilation unit '%s' did not contain the namespace, module or type '%s'" a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1052) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1052) static member tcInvalidUseNullAsTrueValue() = (1196, sprintf "The 'UseNullAsTrueValue' attribute flag may only be used with union types that have one nullary case and at least one non-nullary case" ) /// The parameter '%s' was inferred to have byref type. Parameters of byref type must be given an explicit type annotation, e.g. 'x1: byref'. When used, a byref parameter is implicitly dereferenced. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1053) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1053) static member tcParameterInferredByref(a0 : System.String) = (1197, sprintf "The parameter '%s' was inferred to have byref type. Parameters of byref type must be given an explicit type annotation, e.g. 'x1: byref'. When used, a byref parameter is implicitly dereferenced." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1054) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1054) static member tcNonUniformMemberUse(a0 : System.String) = (1198, sprintf "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." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1055) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1055) static member tcAttribArgsDiffer(a0 : System.String) = (1200, sprintf "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." a0) /// Cannot call an abstract base member: '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1056) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1056) static member tcCannotCallAbstractBaseMember(a0 : System.String) = (1201, sprintf "Cannot call an abstract base member: '%s'" a0) /// Could not resolve the ambiguity in the use of a generic construct with an 'unmanaged' constraint at or near this position - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1057) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1057) static member typrelCannotResolveAmbiguityInUnmanaged() = (1202, sprintf "Could not resolve the ambiguity in the use of a generic construct with an 'unmanaged' constraint at or near this position" ) /// This construct is for ML compatibility. %s. You can disable this warning by using '--mlcompatibility' or '--nowarn:62'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1060) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1060) static member mlCompatMessage(a0 : System.String) = (sprintf "This construct is for ML compatibility. %s. You can disable this warning by using '--mlcompatibility' or '--nowarn:62'." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1062) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1062) static member ilFieldDoesNotHaveValidOffsetForStructureLayout(a0 : System.String, a1 : System.String) = (1206, sprintf "The type '%s' has been marked as having an Explicit layout, but the field '%s' has not been marked with the 'FieldOffset' attribute" a0 a1) /// Interfaces inherited by other interfaces should be declared using 'inherit ...' instead of 'interface ...' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1063) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1063) static member tcInterfacesShouldUseInheritNotInterface() = (1207, sprintf "Interfaces inherited by other interfaces should be declared using 'inherit ...' instead of 'interface ...'" ) /// Invalid prefix operator - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1064) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1064) static member parsInvalidPrefixOperator() = (1208, sprintf "Invalid prefix operator" ) /// Invalid operator definition. Prefix operator definitions must use a valid prefix operator name. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1065) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1065) static member parsInvalidPrefixOperatorDefinition() = (1208, sprintf "Invalid operator definition. Prefix operator definitions must use a valid prefix operator name." ) /// The file extensions '.ml' and '.mli' are for ML compatibility - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1066) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1066) static member buildCompilingExtensionIsForML() = (sprintf "The file extensions '.ml' and '.mli' are for ML compatibility" ) /// Consider using a file with extension '.ml' or '.mli' instead - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1067) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1067) static member lexIndentOffForML() = (sprintf "Consider using a file with extension '.ml' or '.mli' instead" ) /// Active pattern '%s' is not a function - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1068) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1068) static member activePatternIdentIsNotFunctionTyped(a0 : System.String) = (1209, sprintf "Active pattern '%s' is not a function" a0) /// 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 = A x' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1069) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1069) static member activePatternChoiceHasFreeTypars(a0 : System.String) = (1210, sprintf "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 = A x'" a0) /// The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1070) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1070) static member ilFieldHasOffsetForSequentialLayout() = (1211, sprintf "The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit)" ) /// Optional arguments must come at the end of the argument list, after any non-optional arguments - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1071) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1071) static member tcOptionalArgsMustComeAfterNonOptionalArgs() = (1212, sprintf "Optional arguments must come at the end of the argument list, after any non-optional arguments" ) /// Attribute 'System.Diagnostics.ConditionalAttribute' is only valid on methods or attribute classes - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1072) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1072) static member tcConditionalAttributeUsage() = (1213, sprintf "Attribute 'System.Diagnostics.ConditionalAttribute' is only valid on methods or attribute classes" ) /// Extension members cannot provide operator overloads. Consider defining the operator as part of the type definition instead. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1074) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1074) static member tcMemberOperatorDefinitionInExtrinsic() = (1215, sprintf "Extension members cannot provide operator overloads. Consider defining the operator as part of the type definition instead." ) /// The name of the MDB file must be .mdb. The --pdb option will be ignored. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1075) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1075) static member ilwriteMDBFileNameCannotBeChangedWarning() = (1216, sprintf "The name of the MDB file must be .mdb. The --pdb option will be ignored." ) /// MDB generation failed. Could not find compatible member %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1076) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1076) static member ilwriteMDBMemberMissing(a0 : System.String) = (1217, sprintf "MDB generation failed. Could not find compatible member %s" a0) /// Cannot generate MDB debug information. Failed to load the 'MonoSymbolWriter' type from the 'Mono.CompilerServices.SymbolWriter.dll' assembly. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1077) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1077) static member ilwriteErrorCreatingMdb() = (1218, sprintf "Cannot generate MDB debug information. Failed to load the 'MonoSymbolWriter' type from the 'Mono.CompilerServices.SymbolWriter.dll' assembly." ) /// The union case named '%s' conflicts with the generated type '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1078) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1078) static member tcUnionCaseNameConflictsWithGeneratedType(a0 : System.String, a1 : System.String) = (1219, sprintf "The union case named '%s' conflicts with the generated type '%s'" a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1079) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1079) static member chkNoReflectedDefinitionOnStructMember() = (1220, sprintf "ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter" ) /// DLLImport bindings must be static members in a class or function definitions in a module - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1080) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1080) static member tcDllImportNotAllowed() = (1221, sprintf "DLLImport bindings must be static members in a class or function definitions in a module" ) /// When mscorlib.dll or FSharp.Core.dll is explicitly referenced the %s option must also be passed - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1081) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1081) static member buildExplicitCoreLibRequiresNoFramework(a0 : System.String) = (1222, sprintf "When mscorlib.dll or FSharp.Core.dll is explicitly referenced the %s option must also be passed" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1082) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1082) static member buildExpectedSigdataFile(a0 : System.String) = (1223, sprintf "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." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1083) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1083) static member buildExpectedFileAlongSideFSharpCore(a0 : System.String, a1 : System.String) = (1225, sprintf "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." a0 a1) /// Filename '%s' contains invalid character '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1084) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1084) static member buildUnexpectedFileNameCharacter(a0 : System.String, a1 : System.String) = (1227, sprintf "Filename '%s' contains invalid character '%s'" a0 a1) /// 'use!' bindings must be of the form 'use! = ' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1085) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1085) static member tcInvalidUseBangBinding() = (1228, sprintf "'use!' bindings must be of the form 'use! = '" ) /// Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function is no longer generic. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1086) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1086) static member crefNoInnerGenericsInQuotations() = (1230, sprintf "Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function is no longer generic." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1087) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1087) static member tcEnumTypeCannotBeEnumerated(a0 : System.String) = (1231, sprintf "The type '%s' is not a valid enumerator type , i.e. does not have a 'MoveNext()' method returning a bool, and a 'Current' property" a0) /// End of file in triple-quote string begun at or before here - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1088) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1088) static member parsEofInTripleQuoteString() = (1232, sprintf "End of file in triple-quote string begun at or before here" ) /// End of file in triple-quote string embedded in comment begun at or before here - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1089) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1089) static member parsEofInTripleQuoteStringInComment() = (1233, sprintf "End of file in triple-quote string embedded in comment begun at or before here" ) /// This type test or downcast will ignore the unit-of-measure '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1090) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1090) static member tcTypeTestLosesMeasures(a0 : System.String) = (1240, sprintf "This type test or downcast will ignore the unit-of-measure '%s'" a0) /// Expected type argument or static argument - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1091) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1091) static member parsMissingTypeArgs() = (1241, sprintf "Expected type argument or static argument" ) /// Unmatched '<'. Expected closing '>' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1092) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1092) static member parsMissingGreaterThan() = (1242, sprintf "Unmatched '<'. Expected closing '>'" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1093) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1093) static member parsUnexpectedQuotationOperatorInTypeAliasDidYouMeanVerbatimString() = (1243, sprintf "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." ) /// Attempted to parse this as an operator name, but failed - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1094) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1094) static member parsErrorParsingAsOperatorName() = (1244, sprintf "Attempted to parse this as an operator name, but failed" ) /// \U%s is not a valid Unicode character escape sequence - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1095) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1095) static member lexInvalidUnicodeLiteral(a0 : System.String) = (1245, sprintf "\U%s is not a valid Unicode character escape sequence" a0) /// '%s' must be applied to an argument of type '%s', but has been applied to an argument of type '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1096) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1096) static member tcCallerInfoWrongType(a0 : System.String, a1 : System.String, a2 : System.String) = (1246, sprintf "'%s' must be applied to an argument of type '%s', but has been applied to an argument of type '%s'" a0 a1 a2) /// '%s' can only be applied to optional arguments - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1097) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1097) static member tcCallerInfoNotOptional(a0 : System.String) = (1247, sprintf "'%s' can only be applied to optional arguments" a0) /// The specified .NET Framework version '%s' is not supported. Please specify a value from the enumeration Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1099) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1099) static member toolLocationHelperUnsupportedFrameworkVersion(a0 : System.String) = (1300, sprintf "The specified .NET Framework version '%s' is not supported. Please specify a value from the enumeration Microsoft.Build.Utilities.TargetDotNetFrameworkVersion." a0) /// Invalid Magic value in CLR Header - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1103) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1103) static member ilSignInvalidMagicValue() = (1301, sprintf "Invalid Magic value in CLR Header" ) /// Bad image format - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1104) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1104) static member ilSignBadImageFormat() = (1302, sprintf "Bad image format" ) /// Private key expected - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1105) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1105) static member ilSignPrivateKeyExpected() = (1303, sprintf "Private key expected" ) /// RSA key expected - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1106) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1106) static member ilSignRsaKeyExpected() = (1304, sprintf "RSA key expected" ) /// Invalid bit Length - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1107) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1107) static member ilSignInvalidBitLen() = (1305, sprintf "Invalid bit Length" ) /// Invalid RSAParameters structure - '{0}' expected - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1108) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1108) static member ilSignInvalidRSAParams() = (1306, sprintf "Invalid RSAParameters structure - '{0}' expected" ) /// Invalid algId - 'Exponent' expected - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1109) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1109) static member ilSignInvalidAlgId() = (1307, sprintf "Invalid algId - 'Exponent' expected" ) /// Invalid signature size - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1110) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1110) static member ilSignInvalidSignatureSize() = (1308, sprintf "Invalid signature size" ) /// No signature directory - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1111) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1111) static member ilSignNoSignatureDirectory() = (1309, sprintf "No signature directory" ) /// Invalid Public Key blob - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1112) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1112) static member ilSignInvalidPKBlob() = (1310, sprintf "Invalid Public Key blob" ) /// Exiting - too many errors - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1114) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1114) static member fscTooManyErrors() = (sprintf "Exiting - too many errors" ) /// The documentation file has no .xml suffix - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1115) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1115) static member docfileNoXmlSuffix() = (2001, sprintf "The documentation file has no .xml suffix" ) /// No implementation files specified - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1116) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1116) static member fscNoImplementationFiles() = (2002, sprintf "No implementation files specified" ) /// The attribute %s specified version '%s', but this value is invalid and has been ignored - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1117) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1117) static member fscBadAssemblyVersion(a0 : System.String, a1 : System.String) = (2003, sprintf "The attribute %s specified version '%s', but this value is invalid and has been ignored" a0 a1) /// Conflicting options specified: 'win32manifest' and 'win32res'. Only one of these can be used. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1118) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1118) static member fscTwoResourceManifests() = (2004, sprintf "Conflicting options specified: 'win32manifest' and 'win32res'. Only one of these can be used." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1119) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1119) static member fscQuotationLiteralsStaticLinking(a0 : System.String) = (2005, sprintf "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." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1120) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1120) static member fscQuotationLiteralsStaticLinking0() = (2006, sprintf "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." ) /// Static linking may not include a .EXE - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1121) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1121) static member fscStaticLinkingNoEXE() = (2007, sprintf "Static linking may not include a .EXE" ) /// Static linking may not include a mixed managed/unmanaged DLL - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1122) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1122) static member fscStaticLinkingNoMixedDLL() = (2008, sprintf "Static linking may not include a mixed managed/unmanaged DLL" ) /// Ignoring mixed managed/unmanaged assembly '%s' during static linking - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1123) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1123) static member fscIgnoringMixedWhenLinking(a0 : System.String) = (2009, sprintf "Ignoring mixed managed/unmanaged assembly '%s' during static linking" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1124) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1124) static member fscAssumeStaticLinkContainsNoDependencies(a0 : System.String) = (2011, sprintf "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." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1125) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1125) static member fscAssemblyNotFoundInDependencySet(a0 : System.String) = (2012, sprintf "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." a0) /// The key file '%s' could not be opened - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1126) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1126) static member fscKeyFileCouldNotBeOpened(a0 : System.String) = (2013, sprintf "The key file '%s' could not be opened" a0) /// A problem occurred writing the binary '%s': %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1127) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1127) static member fscProblemWritingBinary(a0 : System.String, a1 : System.String) = (2014, sprintf "A problem occurred writing the binary '%s': %s" a0 a1) /// The 'AssemblyVersionAttribute' has been ignored because a version was given using a command line option - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1128) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1128) static member fscAssemblyVersionAttributeIgnored() = (2015, sprintf "The 'AssemblyVersionAttribute' has been ignored because a version was given using a command line option" ) /// Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be satellite assemblies, Culture should always be empty' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1129) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1129) static member fscAssemblyCultureAttributeError() = (2016, sprintf "Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be satellite assemblies, Culture should always be empty'" ) /// Option '--delaysign' overrides attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file or added module - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1130) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1130) static member fscDelaySignWarning() = (2017, sprintf "Option '--delaysign' overrides attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file or added module" ) /// Option '--keyfile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1131) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1131) static member fscKeyFileWarning() = (2018, sprintf "Option '--keyfile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module" ) /// Option '--keycontainer' overrides attribute 'System.Reflection.AssemblyNameAttribute' given in a source file or added module - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1132) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1132) static member fscKeyNameWarning() = (2019, sprintf "Option '--keycontainer' overrides attribute 'System.Reflection.AssemblyNameAttribute' given in a source file or added module" ) /// The assembly '%s' is listed on the command line. Assemblies should be referenced using a command line flag such as '-r'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1133) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1133) static member fscReferenceOnCommandLine(a0 : System.String) = (2020, sprintf "The assembly '%s' is listed on the command line. Assemblies should be referenced using a command line flag such as '-r'." a0) /// The resident compilation service was not used because a problem occured in communicating with the server. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1134) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1134) static member fscRemotingError() = (2021, sprintf "The resident compilation service was not used because a problem occured in communicating with the server." ) /// Problem with filename '%s': Illegal characters in path. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1135) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1135) static member pathIsInvalid(a0 : System.String) = (2022, sprintf "Problem with filename '%s': Illegal characters in path." a0) /// 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 item in the .fsproj project file. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1136) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1136) static member fscResxSourceFileDeprecated(a0 : System.String) = (2023, sprintf "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 item in the .fsproj project file." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1137) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1137) static member fscStaticLinkingNoProfileMismatches() = (2024, sprintf "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)." ) /// An %s specified version '%s', but this value is a wildcard, and you have requested a deterministic build, these are in conflict. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1138) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1138) static member fscAssemblyWildcardAndDeterminism(a0 : System.String, a1 : System.String) = (2025, sprintf "An %s specified version '%s', but this value is a wildcard, and you have requested a deterministic build, these are in conflict." a0 a1) /// Determinstic builds only support portable PDBs (--debug:portable or --debug:embedded) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1139) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1139) static member fscDeterministicDebugRequiresPortablePdb() = (2026, sprintf "Determinstic builds only support portable PDBs (--debug:portable or --debug:embedded)" ) /// Character '%s' is not allowed in provided namespace name '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1140) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1140) static member etIllegalCharactersInNamespaceName(a0 : System.String, a1 : System.String) = (3000, sprintf "Character '%s' is not allowed in provided namespace name '%s'" a0 a1) /// The provided type '%s' returned a member with a null or empty member name - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1141) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1141) static member etNullOrEmptyMemberName(a0 : System.String) = (3001, sprintf "The provided type '%s' returned a member with a null or empty member name" a0) /// The provided type '%s' returned a null member - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1142) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1142) static member etNullMember(a0 : System.String) = (3002, sprintf "The provided type '%s' returned a null member" a0) /// The provided type '%s' member info '%s' has null declaring type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1143) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1143) static member etNullMemberDeclaringType(a0 : System.String, a1 : System.String) = (3003, sprintf "The provided type '%s' member info '%s' has null declaring type" a0 a1) /// The provided type '%s' has member '%s' which has declaring type '%s'. Expected declaring type to be the same as provided type. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1144) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1144) static member etNullMemberDeclaringTypeDifferentFromProvidedType(a0 : System.String, a1 : System.String, a2 : System.String) = (3004, sprintf "The provided type '%s' has member '%s' which has declaring type '%s'. Expected declaring type to be the same as provided type." a0 a1 a2) /// Referenced assembly '%s' has assembly level attribute '%s' but no public type provider classes were found - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1145) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1145) static member etHostingAssemblyFoundWithoutHosts(a0 : System.String, a1 : System.String) = (3005, sprintf "Referenced assembly '%s' has assembly level attribute '%s' but no public type provider classes were found" a0 a1) /// Type '%s' from type provider '%s' has an empty namespace. Use 'null' for the global namespace. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1146) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1146) static member etEmptyNamespaceOfTypeNotAllowed(a0 : System.String, a1 : System.String) = (3006, sprintf "Type '%s' from type provider '%s' has an empty namespace. Use 'null' for the global namespace." a0 a1) /// Empty namespace found from the type provider '%s'. Use 'null' for the global namespace. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1147) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1147) static member etEmptyNamespaceNotAllowed(a0 : System.String) = (3007, sprintf "Empty namespace found from the type provider '%s'. Use 'null' for the global namespace." a0) /// Provided type '%s' has 'IsGenericType' as true, but generic types are not supported. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1148) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1148) static member etMustNotBeGeneric(a0 : System.String) = (3011, sprintf "Provided type '%s' has 'IsGenericType' as true, but generic types are not supported." a0) /// Provided type '%s' has 'IsArray' as true, but array types are not supported. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1149) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1149) static member etMustNotBeAnArray(a0 : System.String) = (3013, sprintf "Provided type '%s' has 'IsArray' as true, but array types are not supported." a0) /// Invalid member '%s' on provided type '%s'. Provided type members must be public, and not be generic, virtual, or abstract. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1150) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1150) static member etMethodHasRequirements(a0 : System.String, a1 : System.String) = (3014, sprintf "Invalid member '%s' on provided type '%s'. Provided type members must be public, and not be generic, virtual, or abstract." a0 a1) /// Invalid member '%s' on provided type '%s'. Only properties, methods and constructors are allowed - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1151) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1151) static member etUnsupportedMemberKind(a0 : System.String, a1 : System.String) = (3015, sprintf "Invalid member '%s' on provided type '%s'. Only properties, methods and constructors are allowed" a0 a1) /// Property '%s' on provided type '%s' has CanRead=true but there was no value from GetGetMethod() - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1152) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1152) static member etPropertyCanReadButHasNoGetter(a0 : System.String, a1 : System.String) = (3016, sprintf "Property '%s' on provided type '%s' has CanRead=true but there was no value from GetGetMethod()" a0 a1) /// Property '%s' on provided type '%s' has CanRead=false but GetGetMethod() returned a method - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1153) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1153) static member etPropertyHasGetterButNoCanRead(a0 : System.String, a1 : System.String) = (3017, sprintf "Property '%s' on provided type '%s' has CanRead=false but GetGetMethod() returned a method" a0 a1) /// Property '%s' on provided type '%s' has CanWrite=true but there was no value from GetSetMethod() - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1154) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1154) static member etPropertyCanWriteButHasNoSetter(a0 : System.String, a1 : System.String) = (3018, sprintf "Property '%s' on provided type '%s' has CanWrite=true but there was no value from GetSetMethod()" a0 a1) /// Property '%s' on provided type '%s' has CanWrite=false but GetSetMethod() returned a method - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1155) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1155) static member etPropertyHasSetterButNoCanWrite(a0 : System.String, a1 : System.String) = (3019, sprintf "Property '%s' on provided type '%s' has CanWrite=false but GetSetMethod() returned a method" a0 a1) /// One or more errors seen during provided type setup - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1156) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1156) static member etOneOrMoreErrorsSeenDuringExtensionTypeSetting() = (3020, sprintf "One or more errors seen during provided type setup" ) /// Unexpected exception from provided type '%s' member '%s': %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1157) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1157) static member etUnexpectedExceptionFromProvidedTypeMember(a0 : System.String, a1 : System.String, a2 : System.String) = (3021, sprintf "Unexpected exception from provided type '%s' member '%s': %s" a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1158) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1158) static member etUnsupportedConstantType(a0 : System.String) = (3022, sprintf "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." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1159) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1159) static member etUnsupportedProvidedExpression(a0 : System.String) = (3025, sprintf "Unsupported expression '%s' from type provider. If you are the author of this type provider, consider adjusting it to provide a different provided expression." a0) /// Expected provided type named '%s' but provided type has 'Name' with value '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1160) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1160) static member etProvidedTypeHasUnexpectedName(a0 : System.String, a1 : System.String) = (3028, sprintf "Expected provided type named '%s' but provided type has 'Name' with value '%s'" a0 a1) /// Event '%s' on provided type '%s' has no value from GetAddMethod() - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1161) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1161) static member etEventNoAdd(a0 : System.String, a1 : System.String) = (3029, sprintf "Event '%s' on provided type '%s' has no value from GetAddMethod()" a0 a1) /// Event '%s' on provided type '%s' has no value from GetRemoveMethod() - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1162) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1162) static member etEventNoRemove(a0 : System.String, a1 : System.String) = (3030, sprintf "Event '%s' on provided type '%s' has no value from GetRemoveMethod()" a0 a1) /// Assembly attribute '%s' refers to a designer assembly '%s' which cannot be loaded or doesn't exist. %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1163) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1163) static member etProviderHasWrongDesignerAssembly(a0 : System.String, a1 : System.String, a2 : System.String) = (3031, sprintf "Assembly attribute '%s' refers to a designer assembly '%s' which cannot be loaded or doesn't exist. %s" a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1164) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1164) static member etProviderDoesNotHaveValidConstructor() = (3032, sprintf "The type provider does not have a valid constructor. A constructor taking either no arguments or one argument of type 'TypeProviderConfig' was expected." ) /// The type provider '%s' reported an error: %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1165) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1165) static member etProviderError(a0 : System.String, a1 : System.String) = (3033, sprintf "The type provider '%s' reported an error: %s" a0 a1) /// The type provider '%s' used an invalid parameter in the ParameterExpression: %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1166) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1166) static member etIncorrectParameterExpression(a0 : System.String, a1 : System.String) = (3034, sprintf "The type provider '%s' used an invalid parameter in the ParameterExpression: %s" a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1167) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1167) static member etIncorrectProvidedMethod(a0 : System.String, a1 : System.String, a2 : System.Int32, a3 : System.String) = (3035, sprintf "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'" a0 a1 a2 a3) /// The type provider '%s' provided a constructor which is not reported among the constructors of its declaring type '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1168) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1168) static member etIncorrectProvidedConstructor(a0 : System.String, a1 : System.String) = (3036, sprintf "The type provider '%s' provided a constructor which is not reported among the constructors of its declaring type '%s'" a0 a1) /// A direct reference to the generated type '%s' is not permitted. Instead, use a type definition, e.g. 'type TypeAlias = '. This indicates that a type provider adds generated types to your assembly. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1169) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1169) static member etDirectReferenceToGeneratedTypeNotAllowed(a0 : System.String) = (3039, sprintf "A direct reference to the generated type '%s' is not permitted. Instead, use a type definition, e.g. 'type TypeAlias = '. This indicates that a type provider adds generated types to your assembly." a0) /// Expected provided type with path '%s' but provided type has path '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1170) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1170) static member etProvidedTypeHasUnexpectedPath(a0 : System.String, a1 : System.String) = (3041, sprintf "Expected provided type with path '%s' but provided type has path '%s'" a0 a1) /// Unexpected 'null' return value from provided type '%s' member '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1171) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1171) static member etUnexpectedNullFromProvidedTypeMember(a0 : System.String, a1 : System.String) = (3042, sprintf "Unexpected 'null' return value from provided type '%s' member '%s'" a0 a1) /// Unexpected exception from member '%s' of provided type '%s' member '%s': %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1172) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1172) static member etUnexpectedExceptionFromProvidedMemberMember(a0 : System.String, a1 : System.String, a2 : System.String, a3 : System.String) = (3043, sprintf "Unexpected exception from member '%s' of provided type '%s' member '%s': %s" a0 a1 a2 a3) /// Nested provided types do not take static arguments or generic parameters - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1173) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1173) static member etNestedProvidedTypesDoNotTakeStaticArgumentsOrGenericParameters() = (3044, sprintf "Nested provided types do not take static arguments or generic parameters" ) /// Invalid static argument to provided type. Expected an argument of kind '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1174) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1174) static member etInvalidStaticArgument(a0 : System.String) = (3045, sprintf "Invalid static argument to provided type. Expected an argument of kind '%s'." a0) /// An error occured applying the static arguments to a provided type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1175) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1175) static member etErrorApplyingStaticArgumentsToType() = (3046, sprintf "An error occured applying the static arguments to a provided type" ) /// Unknown static argument kind '%s' when resolving a reference to a provided type or method '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1176) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1176) static member etUnknownStaticArgumentKind(a0 : System.String, a1 : System.String) = (3047, sprintf "Unknown static argument kind '%s' when resolving a reference to a provided type or method '%s'" a0 a1) /// invalid namespace for provided type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1177) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1177) static member invalidNamespaceForProvidedType() = (sprintf "invalid namespace for provided type" ) /// invalid full name for provided type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1178) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1178) static member invalidFullNameForProvidedType() = (sprintf "invalid full name for provided type" ) /// The type provider returned 'null', which is not a valid return value from '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1180) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1180) static member etProviderReturnedNull(a0 : System.String) = (3051, sprintf "The type provider returned 'null', which is not a valid return value from '%s'" a0) /// The type provider constructor has thrown an exception: %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1181) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1181) static member etTypeProviderConstructorException(a0 : System.String) = (3053, sprintf "The type provider constructor has thrown an exception: %s" a0) /// Type provider '%s' returned null from GetInvokerExpression. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1182) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1182) static member etNullProvidedExpression(a0 : System.String) = (3056, sprintf "Type provider '%s' returned null from GetInvokerExpression." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1183) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1183) static member etProvidedAppliedTypeHadWrongName(a0 : System.String, a1 : System.String, a2 : System.String) = (3057, sprintf "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." a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1184) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1184) static member etProvidedAppliedMethodHadWrongName(a0 : System.String, a1 : System.String, a2 : System.String) = (3058, sprintf "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." a0 a1 a2) /// This type test or downcast will erase the provided type '%s' to the type '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1185) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1185) static member tcTypeTestLossy(a0 : System.String, a1 : System.String) = (3060, sprintf "This type test or downcast will erase the provided type '%s' to the type '%s'" a0 a1) /// This downcast will erase the provided type '%s' to the type '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1186) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1186) static member tcTypeCastErased(a0 : System.String, a1 : System.String) = (3061, sprintf "This downcast will erase the provided type '%s' to the type '%s'." a0 a1) /// This type test with a provided type '%s' is not allowed because this provided type will be erased to '%s' at runtime. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1187) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1187) static member tcTypeTestErased(a0 : System.String, a1 : System.String) = (3062, sprintf "This type test with a provided type '%s' is not allowed because this provided type will be erased to '%s' at runtime." a0 a1) /// Cannot inherit from erased provided type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1188) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1188) static member tcCannotInheritFromErasedType() = (3063, sprintf "Cannot inherit from erased provided type" ) /// Assembly '%s' hase TypeProviderAssembly attribute with invalid value '%s'. The value should be a valid assembly name - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1189) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1189) static member etInvalidTypeProviderAssemblyName(a0 : System.String, a1 : System.String) = (3065, sprintf "Assembly '%s' hase TypeProviderAssembly attribute with invalid value '%s'. The value should be a valid assembly name" a0 a1) /// Invalid member name. Members may not have name '.ctor' or '.cctor' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1190) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1190) static member tcInvalidMemberNameCtor() = (3066, sprintf "Invalid member name. Members may not have name '.ctor' or '.cctor'" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1191) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1191) static member tcInferredGenericTypeGivesRiseToInconsistency(a0 : System.String, a1 : System.String) = (3068, sprintf "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'." a0 a1) /// The number of type arguments did not match: '%d' given, '%d' expected. This may be related to a previously reported error. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1192) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1192) static member tcInvalidTypeArgumentCount(a0 : System.Int32, a1 : System.Int32) = (3069, sprintf "The number of type arguments did not match: '%d' given, '%d' expected. This may be related to a previously reported error." a0 a1) /// Cannot override inherited member '%s' because it is sealed - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1193) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1193) static member tcCannotOverrideSealedMethod(a0 : System.String) = (3070, sprintf "Cannot override inherited member '%s' because it is sealed" a0) /// The type provider '%s' reported an error in the context of provided type '%s', member '%s'. The error: %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1194) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1194) static member etProviderErrorWithContext(a0 : System.String, a1 : System.String, a2 : System.String, a3 : System.String) = (3071, sprintf "The type provider '%s' reported an error in the context of provided type '%s', member '%s'. The error: %s" a0 a1 a2 a3) /// An exception occurred when accessing the '%s' of a provided type: %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1195) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1195) static member etProvidedTypeWithNameException(a0 : System.String, a1 : System.String) = (3072, sprintf "An exception occurred when accessing the '%s' of a provided type: %s" a0 a1) /// The '%s' of a provided type was null or empty. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1196) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1196) static member etProvidedTypeWithNullOrEmptyName(a0 : System.String) = (3073, sprintf "The '%s' of a provided type was null or empty." a0) /// Character '%s' is not allowed in provided type name '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1197) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1197) static member etIllegalCharactersInTypeName(a0 : System.String, a1 : System.String) = (3075, sprintf "Character '%s' is not allowed in provided type name '%s'" a0 a1) /// In queries, '%s' must use a simple pattern - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1198) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1198) static member tcJoinMustUseSimplePattern(a0 : System.String) = (3077, sprintf "In queries, '%s' must use a simple pattern" a0) /// A custom query operation for '%s' is required but not specified - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1199) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1199) static member tcMissingCustomOperation(a0 : System.String) = (3078, sprintf "A custom query operation for '%s' is required but not specified" a0) /// Named static arguments must come after all unnamed static arguments - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1200) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1200) static member etBadUnnamedStaticArgs() = (3080, sprintf "Named static arguments must come after all unnamed static arguments" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1201) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1201) static member etStaticParameterRequiresAValue(a0 : System.String, a1 : System.String, a2 : System.String, a3 : System.String) = (3081, sprintf "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=...>'." a0 a1 a2 a3) /// No static parameter exists with name '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1202) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1202) static member etNoStaticParameterWithName(a0 : System.String) = (3082, sprintf "No static parameter exists with name '%s'" a0) /// The static parameter '%s' has already been given a value - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1203) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1203) static member etStaticParameterAlreadyHasValue(a0 : System.String) = (3083, sprintf "The static parameter '%s' has already been given a value" a0) /// Multiple static parameters exist with name '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1204) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1204) static member etMultipleStaticParameterWithName(a0 : System.String) = (3084, sprintf "Multiple static parameters exist with name '%s'" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1205) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1205) static member tcCustomOperationMayNotBeUsedInConjunctionWithNonSimpleLetBindings() = (3085, sprintf "A custom operation may not be used in conjunction with a non-value or recursive 'let' binding in another part of this computation expression" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1206) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1206) static member tcCustomOperationMayNotBeUsedHere() = (3086, sprintf "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" ) /// The custom operation '%s' refers to a method which is overloaded. The implementations of custom operations may not be overloaded. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1207) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1207) static member tcCustomOperationMayNotBeOverloaded(a0 : System.String) = (3087, sprintf "The custom operation '%s' refers to a method which is overloaded. The implementations of custom operations may not be overloaded." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1208) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1208) static member tcIfThenElseMayNotBeUsedWithinQueries() = (3090, sprintf "An if/then/else expression may not be used within queries. Consider using either an if/then expression, or use a sequence expression instead." ) /// Invalid argument to 'methodhandleof' during codegen - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1209) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1209) static member ilxgenUnexpectedArgumentToMethodHandleOfDuringCodegen() = (3091, sprintf "Invalid argument to 'methodhandleof' during codegen" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1210) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1210) static member etProvidedTypeReferenceMissingArgument(a0 : System.String) = (3092, sprintf "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." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1211) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1211) static member etProvidedTypeReferenceInvalidText(a0 : System.String) = (3093, sprintf "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." a0) /// '%s' is not used correctly. This is a custom operation in this query or computation expression. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1212) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1212) static member tcCustomOperationNotUsedCorrectly(a0 : System.String) = (3095, sprintf "'%s' is not used correctly. This is a custom operation in this query or computation expression." a0) /// '%s' is not used correctly. Usage: %s. This is a custom operation in this query or computation expression. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1213) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1213) static member tcCustomOperationNotUsedCorrectly2(a0 : System.String, a1 : System.String) = (3095, sprintf "'%s' is not used correctly. Usage: %s. This is a custom operation in this query or computation expression." a0 a1) /// %s var in collection %s (outerKey = innerKey). Note that parentheses are required after '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1214) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1214) static member customOperationTextLikeJoin(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "%s var in collection %s (outerKey = innerKey). Note that parentheses are required after '%s'" a0 a1 a2) /// %s var in collection %s (outerKey = innerKey) into group. Note that parentheses are required after '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1215) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1215) static member customOperationTextLikeGroupJoin(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "%s var in collection %s (outerKey = innerKey) into group. Note that parentheses are required after '%s'" a0 a1 a2) /// %s var in collection - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1216) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1216) static member customOperationTextLikeZip(a0 : System.String) = (sprintf "%s var in collection" a0) /// '%s' must be followed by a variable name. Usage: %s. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1217) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1217) static member tcBinaryOperatorRequiresVariable(a0 : System.String, a1 : System.String) = (3096, sprintf "'%s' must be followed by a variable name. Usage: %s." a0 a1) /// Incorrect syntax for '%s'. Usage: %s. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1218) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1218) static member tcOperatorIncorrectSyntax(a0 : System.String, a1 : System.String) = (3097, sprintf "Incorrect syntax for '%s'. Usage: %s." a0 a1) /// '%s' must come after a 'for' selection clause and be followed by the rest of the query. Syntax: ... %s ... - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1219) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1219) static member tcBinaryOperatorRequiresBody(a0 : System.String, a1 : System.String) = (3098, sprintf "'%s' must come after a 'for' selection clause and be followed by the rest of the query. Syntax: ... %s ..." a0 a1) /// '%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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1220) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1220) static member tcCustomOperationHasIncorrectArgCount(a0 : System.String, a1 : System.Int32, a2 : System.Int32) = (3099, sprintf "'%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." a0 a1 a2) /// Expected an expression after this point - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1221) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1221) static member parsExpectedExpressionAfterToken() = (3100, sprintf "Expected an expression after this point" ) /// Expected a type after this point - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1222) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1222) static member parsExpectedTypeAfterToken() = (3101, sprintf "Expected a type after this point" ) /// Unmatched '[<'. Expected closing '>]' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1223) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1223) static member parsUnmatchedLBrackLess() = (3102, sprintf "Unmatched '[<'. Expected closing '>]'" ) /// Unexpected end of input in 'match' expression. Expected 'match with | -> | -> ...'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1224) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1224) static member parsUnexpectedEndOfFileMatch() = (3103, sprintf "Unexpected end of input in 'match' expression. Expected 'match with | -> | -> ...'." ) /// Unexpected end of input in 'try' expression. Expected 'try with ' or 'try finally '. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1225) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1225) static member parsUnexpectedEndOfFileTry() = (3104, sprintf "Unexpected end of input in 'try' expression. Expected 'try with ' or 'try finally '." ) /// Unexpected end of input in 'while' expression. Expected 'while do '. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1226) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1226) static member parsUnexpectedEndOfFileWhile() = (3105, sprintf "Unexpected end of input in 'while' expression. Expected 'while do '." ) /// Unexpected end of input in 'for' expression. Expected 'for in do '. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1227) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1227) static member parsUnexpectedEndOfFileFor() = (3106, sprintf "Unexpected end of input in 'for' expression. Expected 'for in do '." ) /// Unexpected end of input in 'match' or 'try' expression - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1228) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1228) static member parsUnexpectedEndOfFileWith() = (3107, sprintf "Unexpected end of input in 'match' or 'try' expression" ) /// Unexpected end of input in 'then' branch of conditional expression. Expected 'if then ' or 'if then else '. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1229) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1229) static member parsUnexpectedEndOfFileThen() = (3108, sprintf "Unexpected end of input in 'then' branch of conditional expression. Expected 'if then ' or 'if then else '." ) /// Unexpected end of input in 'else' branch of conditional expression. Expected 'if then ' or 'if then else '. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1230) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1230) static member parsUnexpectedEndOfFileElse() = (3109, sprintf "Unexpected end of input in 'else' branch of conditional expression. Expected 'if then ' or 'if then else '." ) /// Unexpected end of input in body of lambda expression. Expected 'fun ... -> '. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1231) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1231) static member parsUnexpectedEndOfFileFunBody() = (3110, sprintf "Unexpected end of input in body of lambda expression. Expected 'fun ... -> '." ) /// Unexpected end of input in type arguments - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1232) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1232) static member parsUnexpectedEndOfFileTypeArgs() = (3111, sprintf "Unexpected end of input in type arguments" ) /// Unexpected end of input in type signature - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1233) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1233) static member parsUnexpectedEndOfFileTypeSignature() = (3112, sprintf "Unexpected end of input in type signature" ) /// Unexpected end of input in type definition - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1234) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1234) static member parsUnexpectedEndOfFileTypeDefinition() = (3113, sprintf "Unexpected end of input in type definition" ) /// Unexpected end of input in object members - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1235) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1235) static member parsUnexpectedEndOfFileObjectMembers() = (3114, sprintf "Unexpected end of input in object members" ) /// Unexpected end of input in value, function or member definition - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1236) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1236) static member parsUnexpectedEndOfFileDefinition() = (3115, sprintf "Unexpected end of input in value, function or member definition" ) /// Unexpected end of input in expression - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1237) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1237) static member parsUnexpectedEndOfFileExpression() = (3116, sprintf "Unexpected end of input in expression" ) /// Unexpected end of type. Expected a name after this point. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1238) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1238) static member parsExpectedNameAfterToken() = (3117, sprintf "Unexpected end of type. Expected a name after this point." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1239) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1239) static member parsUnmatchedLet() = (3118, sprintf "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." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1240) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1240) static member parsUnmatchedLetBang() = (3119, sprintf "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." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1241) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1241) static member parsUnmatchedUseBang() = (3120, sprintf "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." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1242) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1242) static member parsUnmatchedUse() = (3121, sprintf "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." ) /// Missing 'do' in 'while' expression. Expected 'while do '. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1243) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1243) static member parsWhileDoExpected() = (3122, sprintf "Missing 'do' in 'while' expression. Expected 'while do '." ) /// Missing 'do' in 'for' expression. Expected 'for in do '. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1244) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1244) static member parsForDoExpected() = (3123, sprintf "Missing 'do' in 'for' expression. Expected 'for in do '." ) /// Invalid join relation in '%s'. Expected 'expr expr', where is =, =?, ?= or ?=?. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1245) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1245) static member tcInvalidRelationInJoin(a0 : System.String) = (3125, sprintf "Invalid join relation in '%s'. Expected 'expr expr', where is =, =?, ?= or ?=?." a0) /// Calls - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1246) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1246) static member typeInfoCallsWord() = (sprintf "Calls" ) /// Invalid number of generic arguments to type '%s' in provided type. Expected '%d' arguments, given '%d'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1247) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1247) static member impInvalidNumberOfGenericArguments(a0 : System.String, a1 : System.Int32, a2 : System.Int32) = (3126, sprintf "Invalid number of generic arguments to type '%s' in provided type. Expected '%d' arguments, given '%d'." a0 a1 a2) /// Invalid value '%s' for unit-of-measure parameter '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1248) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1248) static member impInvalidMeasureArgument1(a0 : System.String, a1 : System.String) = (3127, sprintf "Invalid value '%s' for unit-of-measure parameter '%s'" a0 a1) /// Invalid value unit-of-measure parameter '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1249) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1249) static member impInvalidMeasureArgument2(a0 : System.String) = (3127, sprintf "Invalid value unit-of-measure parameter '%s'" a0) /// Property '%s' on provided type '%s' is neither readable nor writable as it has CanRead=false and CanWrite=false - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1250) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1250) static member etPropertyNeedsCanWriteOrCanRead(a0 : System.String, a1 : System.String) = (3128, sprintf "Property '%s' on provided type '%s' is neither readable nor writable as it has CanRead=false and CanWrite=false" a0 a1) /// A use of 'into' must be followed by the remainder of the computation - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1251) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1251) static member tcIntoNeedsRestOfQuery() = (3129, sprintf "A use of 'into' must be followed by the remainder of the computation" ) /// The operator '%s' does not accept the use of 'into' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1252) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1252) static member tcOperatorDoesntAcceptInto(a0 : System.String) = (3130, sprintf "The operator '%s' does not accept the use of 'into'" a0) /// The definition of the custom operator '%s' does not use a valid combination of attribute flags - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1253) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1253) static member tcCustomOperationInvalid(a0 : System.String) = (3131, sprintf "The definition of the custom operator '%s' does not use a valid combination of attribute flags" a0) /// This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1254) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1254) static member tcThisTypeMayNotHaveACLIMutableAttribute() = (3132, sprintf "This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute." ) /// '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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1255) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1255) static member tcAutoPropertyRequiresImplicitConstructionSequence() = (3133, sprintf "'member val' definitions are only permitted in types with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1256) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1256) static member parsMutableOnAutoPropertyShouldBeGetSet() = (3134, sprintf "Property definitions may not be declared mutable. To indicate that this property can be set, use 'member val PropertyName = expr with get,set'." ) /// To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1257) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1257) static member parsMutableOnAutoPropertyShouldBeGetSetNotJustSet() = (3135, sprintf "To indicate that this property can be set, use 'member val PropertyName = expr with get,set'." ) /// Type '%s' is illegal because in byref, T cannot contain byref types. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1258) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1258) static member chkNoByrefsOfByrefs(a0 : System.String) = (3136, sprintf "Type '%s' is illegal because in byref, T cannot contain byref types." a0) /// F# supports array ranks between 1 and 32. The value %d is not allowed. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1259) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1259) static member tastopsMaxArrayThirtyTwo(a0 : System.Int32) = (3138, sprintf "F# supports array ranks between 1 and 32. The value %d is not allowed." a0) /// In queries, use the form 'for x in n .. m do ...' for ranging over integers - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1260) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1260) static member tcNoIntegerForLoopInQuery() = (3139, sprintf "In queries, use the form 'for x in n .. m do ...' for ranging over integers" ) /// 'while' expressions may not be used in queries - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1261) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1261) static member tcNoWhileInQuery() = (3140, sprintf "'while' expressions may not be used in queries" ) /// 'try/finally' expressions may not be used in queries - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1262) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1262) static member tcNoTryFinallyInQuery() = (3141, sprintf "'try/finally' expressions may not be used in queries" ) /// 'use' expressions may not be used in queries - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1263) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1263) static member tcUseMayNotBeUsedInQueries() = (3142, sprintf "'use' expressions may not be used in queries" ) /// 'let!', 'use!' and 'do!' expressions may not be used in queries - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1264) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1264) static member tcBindMayNotBeUsedInQueries() = (3143, sprintf "'let!', 'use!' and 'do!' expressions may not be used in queries" ) /// 'return' and 'return!' may not be used in queries - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1265) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1265) static member tcReturnMayNotBeUsedInQueries() = (3144, sprintf "'return' and 'return!' may not be used in queries" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1266) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1266) static member tcUnrecognizedQueryOperator() = (3145, sprintf "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." ) /// 'try/with' expressions may not be used in queries - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1267) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1267) static member tcTryWithMayNotBeUsedInQueries() = (3146, sprintf "'try/with' expressions may not be used in queries" ) /// This 'let' definition may not be used in a query. Only simple value definitions may be used in queries. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1268) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1268) static member tcNonSimpleLetBindingInQuery() = (3147, sprintf "This 'let' definition may not be used in a query. Only simple value definitions may be used in queries." ) /// Too many static parameters. Expected at most %d parameters, but got %d unnamed and %d named parameters. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1269) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1269) static member etTooManyStaticParameters(a0 : System.Int32, a1 : System.Int32, a2 : System.Int32) = (3148, sprintf "Too many static parameters. Expected at most %d parameters, but got %d unnamed and %d named parameters." a0 a1 a2) /// Invalid provided literal value '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1270) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1270) static member infosInvalidProvidedLiteralValue(a0 : System.String) = (3149, sprintf "Invalid provided literal value '%s'" a0) /// The 'anycpu32bitpreferred' platform can only be used with EXE targets. You must use 'anycpu' instead. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1271) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1271) static member invalidPlatformTarget() = (3150, sprintf "The 'anycpu32bitpreferred' platform can only be used with EXE targets. You must use 'anycpu' instead." ) /// This member, function or value declaration may not be declared 'inline' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1272) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1272) static member tcThisValueMayNotBeInlined() = (3151, sprintf "This member, function or value declaration may not be declared 'inline'" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1273) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1273) static member etErasedTypeUsedInGeneration(a0 : System.String, a1 : System.String) = (3152, sprintf "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." a0 a1) /// Arguments to query operators may require parentheses, e.g. 'where (x > y)' or 'groupBy (x.Length / 10)' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1274) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1274) static member tcUnrecognizedQueryBinaryOperator() = (3153, sprintf "Arguments to query operators may require parentheses, e.g. 'where (x > y)' or 'groupBy (x.Length / 10)'" ) /// A quotation may not involve an assignment to or taking the address of a captured local variable - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1275) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1275) static member crefNoSetOfHole() = (3155, sprintf "A quotation may not involve an assignment to or taking the address of a captured local variable" ) /// + 1 overload - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1276) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1276) static member nicePrintOtherOverloads1() = (sprintf "+ 1 overload" ) /// + %d overloads - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1277) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1277) static member nicePrintOtherOverloadsN(a0 : System.Int32) = (sprintf "+ %d overloads" a0) /// Erased to - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1278) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1278) static member erasedTo() = (sprintf "Erased to" ) /// Unexpected token '%s' or incomplete expression - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1279) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1279) static member parsUnfinishedExpression(a0 : System.String) = (3156, sprintf "Unexpected token '%s' or incomplete expression" a0) /// Cannot find code target for this attribute, possibly because the code after the attribute is incomplete. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1280) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1280) static member parsAttributeOnIncompleteCode() = (3158, sprintf "Cannot find code target for this attribute, possibly because the code after the attribute is incomplete." ) /// Type name cannot be empty. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1281) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1281) static member parsTypeNameCannotBeEmpty() = (3159, sprintf "Type name cannot be empty." ) /// Problem reading assembly '%s': %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1282) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1282) static member buildProblemReadingAssembly(a0 : System.String, a1 : System.String) = (3160, sprintf "Problem reading assembly '%s': %s" a0 a1) /// Invalid provided field. Provided fields of erased provided types must be literals. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1283) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1283) static member tcTPFieldMustBeLiteral() = (3161, sprintf "Invalid provided field. Provided fields of erased provided types must be literals." ) /// (loading description...) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1284) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1284) static member loadingDescription() = (sprintf "(loading description...)" ) /// (description unavailable...) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1285) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1285) static member descriptionUnavailable() = (sprintf "(description unavailable...)" ) /// A type variable has been constrained by multiple different class types. A type variable may only have one class constraint. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1286) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1286) static member chkTyparMultipleClassConstraints() = (3162, sprintf "A type variable has been constrained by multiple different class types. A type variable may only have one class constraint." ) /// 'match' expressions may not be used in queries - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1287) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1287) static member tcMatchMayNotBeUsedWithQuery() = (3163, sprintf "'match' expressions may not be used in queries" ) /// Infix operator member '%s' has %d initial argument(s). Expected a tuple of 3 arguments - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1288) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1288) static member memberOperatorDefinitionWithNonTripleArgument(a0 : System.String, a1 : System.Int32) = (3164, sprintf "Infix operator member '%s' has %d initial argument(s). Expected a tuple of 3 arguments" a0 a1) /// The operator '%s' cannot be resolved. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1289) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1289) static member cannotResolveNullableOperators(a0 : System.String) = (3165, sprintf "The operator '%s' cannot be resolved. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'." a0) /// '%s' must be followed by 'in'. Usage: %s. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1290) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1290) static member tcOperatorRequiresIn(a0 : System.String, a1 : System.String) = (3167, sprintf "'%s' must be followed by 'in'. Usage: %s." a0 a1) /// Neither 'member val' nor 'override val' definitions are permitted in object expressions. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1291) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1291) static member parsIllegalMemberVarInObjectImplementation() = (3168, sprintf "Neither 'member val' nor 'override val' definitions are permitted in object expressions." ) /// Copy-and-update record expressions must include at least one field. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1292) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1292) static member tcEmptyCopyAndUpdateRecordInvalid() = (3169, sprintf "Copy-and-update record expressions must include at least one field." ) /// '_' cannot be used as field name - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1293) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1293) static member parsUnderscoreInvalidFieldName() = (3170, sprintf "'_' cannot be used as field name" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1294) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1294) static member tcGeneratedTypesShouldBeInternalOrPrivate() = (3171, sprintf "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 = ...'." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1295) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1295) static member chkGetterAndSetterHaveSamePropertyType(a0 : System.String, a1 : System.String, a2 : System.String) = (3172, sprintf "A property's getter and setter must have the same type. Property '%s' has getter of type '%s' but setter of type '%s'." a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1296) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1296) static member tcRuntimeSuppliedMethodCannotBeUsedInUserCode(a0 : System.String) = (3173, sprintf "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." a0) /// The union case '%s' does not have a field named '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1297) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1297) static member tcUnionCaseConstructorDoesNotHaveFieldWithGivenName(a0 : System.String, a1 : System.String) = (3174, sprintf "The union case '%s' does not have a field named '%s'." a0 a1) /// The exception '%s' does not have a field named '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1298) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1298) static member tcExceptionConstructorDoesNotHaveFieldWithGivenName(a0 : System.String, a1 : System.String) = (3174, sprintf "The exception '%s' does not have a field named '%s'." a0 a1) /// Active patterns do not have fields. This syntax is invalid. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1299) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1299) static member tcActivePatternsDoNotHaveFields() = (3174, sprintf "Active patterns do not have fields. This syntax is invalid." ) /// The constructor does not have a field named '%s'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1300) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1300) static member tcConstructorDoesNotHaveFieldWithGivenName(a0 : System.String) = (3174, sprintf "The constructor does not have a field named '%s'." a0) /// Union case/exception field '%s' cannot be used more than once. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1301) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1301) static member tcUnionCaseFieldCannotBeUsedMoreThanOnce(a0 : System.String) = (3175, sprintf "Union case/exception field '%s' cannot be used more than once." a0) /// Named field '%s' is used more than once. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1302) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1302) static member tcFieldNameIsUsedModeThanOnce(a0 : System.String) = (3176, sprintf "Named field '%s' is used more than once." a0) /// Named field '%s' conflicts with autogenerated name for anonymous field. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1303) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1303) static member tcFieldNameConflictsWithGeneratedNameForAnonymousField(a0 : System.String) = (3176, sprintf "Named field '%s' conflicts with autogenerated name for anonymous field." a0) /// This literal expression or attribute argument results in an arithmetic overflow. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1304) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1304) static member tastConstantExpressionOverflow() = (3177, sprintf "This literal expression or attribute argument results in an arithmetic overflow." ) /// This is not valid literal expression. The [] attribute will be ignored. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1305) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1305) static member tcIllegalStructTypeForConstantExpression() = (3178, sprintf "This is not valid literal expression. The [] attribute will be ignored." ) /// System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1306) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1306) static member fscSystemRuntimeInteropServicesIsRequired() = (3179, sprintf "System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1307) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1307) static member abImplicitHeapAllocation(a0 : System.String) = (3180, sprintf "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." a0) /// A type provider implemented GetStaticParametersForMethod, but ApplyStaticArgumentsForMethod was not implemented or invalid - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1308) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1308) static member estApplyStaticArgumentsForMethodNotImplemented() = (sprintf "A type provider implemented GetStaticParametersForMethod, but ApplyStaticArgumentsForMethod was not implemented or invalid" ) /// An error occured applying the static arguments to a provided method - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1309) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1309) static member etErrorApplyingStaticArgumentsToMethod() = (3181, sprintf "An error occured applying the static arguments to a provided method" ) /// Unexpected character '%s' in preprocessor expression - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1310) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1310) static member pplexUnexpectedChar(a0 : System.String) = (3182, sprintf "Unexpected character '%s' in preprocessor expression" a0) /// Unexpected token '%s' in preprocessor expression - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1311) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1311) static member ppparsUnexpectedToken(a0 : System.String) = (3183, sprintf "Unexpected token '%s' in preprocessor expression" a0) /// Incomplete preprocessor expression - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1312) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1312) static member ppparsIncompleteExpression() = (3184, sprintf "Incomplete preprocessor expression" ) /// Missing token '%s' in preprocessor expression - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1313) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1313) static member ppparsMissingToken(a0 : System.String) = (3185, sprintf "Missing token '%s' in preprocessor expression" a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1314) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1314) static member pickleMissingDefinition(a0 : System.Int32, a1 : System.String, a2 : System.String) = (3186, sprintf "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." a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1315) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1315) static member checkNotSufficientlyGenericBecauseOfScope(a0 : System.String) = (3187, sprintf "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." a0) /// Type inference caused an inference type variable to escape its scope. Consider adding type annotations to make your code less generic. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1316) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1316) static member checkNotSufficientlyGenericBecauseOfScopeAnon() = (3188, sprintf "Type inference caused an inference type variable to escape its scope. Consider adding type annotations to make your code less generic." ) /// Redundant arguments are being ignored in function '%s'. Expected %d but got %d arguments. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1317) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1317) static member checkRaiseFamilyFunctionArgumentCount(a0 : System.String, a1 : System.Int32, a2 : System.Int32) = (3189, sprintf "Redundant arguments are being ignored in function '%s'. Expected %d but got %d arguments." a0 a1 a2) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1318) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1318) static member checkLowercaseLiteralBindingInPattern(a0 : System.String) = (3190, sprintf "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." a0) /// This literal pattern does not take arguments - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1319) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1319) static member tcLiteralDoesNotTakeArguments() = (3191, sprintf "This literal pattern does not take arguments" ) /// Constructors are not permitted as extension members - they must be defined as part of the original definition of the type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1320) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1320) static member tcConstructorsIllegalInAugmentation() = (3192, sprintf "Constructors are not permitted as extension members - they must be defined as part of the original definition of the type" ) /// Invalid response file '%s' ( '%s' ) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1321) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1321) static member optsInvalidResponseFile(a0 : System.String, a1 : System.String) = (3193, sprintf "Invalid response file '%s' ( '%s' )" a0 a1) /// Response file '%s' not found in '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1322) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1322) static member optsResponseFileNotFound(a0 : System.String, a1 : System.String) = (3194, sprintf "Response file '%s' not found in '%s'" a0 a1) /// Response file name '%s' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1323) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1323) static member optsResponseFileNameInvalid(a0 : System.String) = (3195, sprintf "Response file name '%s' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long" a0) /// Cannot find FSharp.Core.dll in compiler's directory - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1324) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1324) static member fsharpCoreNotFoundToBeCopied() = (3196, sprintf "Cannot find FSharp.Core.dll in compiler's directory" ) /// One tuple type is a struct tuple, the other is a reference tuple - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1325) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1325) static member tcTupleStructMismatch() = (sprintf "One tuple type is a struct tuple, the other is a reference tuple" ) /// This provided method requires static parameters - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1326) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1326) static member etMissingStaticArgumentsToMethod() = (3197, sprintf "This provided method requires static parameters" ) /// The conversion from %s to %s is a compile-time safe upcast, not a downcast. Consider using 'upcast' instead of 'downcast'. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1327) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1327) static member considerUpcast(a0 : System.String, a1 : System.String) = (3198, sprintf "The conversion from %s to %s is a compile-time safe upcast, not a downcast. Consider using 'upcast' instead of 'downcast'." a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1328) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1328) static member considerUpcastOperator(a0 : System.String, a1 : System.String) = (3198, sprintf "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." a0 a1) /// The 'rec' on this module is implied by an outer 'rec' declaration and is being ignored - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1329) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1329) static member tcRecImplied() = (3199, sprintf "The 'rec' on this module is implied by an outer 'rec' declaration and is being ignored" ) /// In a recursive declaration group, 'open' declarations must come first in each module - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1330) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1330) static member tcOpenFirstInMutRec() = (3200, sprintf "In a recursive declaration group, 'open' declarations must come first in each module" ) /// In a recursive declaration group, module abbreviations must come after all 'open' declarations and before other declarations - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1331) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1331) static member tcModuleAbbrevFirstInMutRec() = (3201, sprintf "In a recursive declaration group, module abbreviations must come after all 'open' declarations and before other declarations" ) /// This declaration is not supported in recursive declaration groups - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1332) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1332) static member tcUnsupportedMutRecDecl() = (3202, sprintf "This declaration is not supported in recursive declaration groups" ) /// Invalid use of 'rec' keyword - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1333) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1333) static member parsInvalidUseOfRec() = (3203, sprintf "Invalid use of 'rec' keyword" ) /// If a union type has more than one case and is a struct, then all fields within the union type must be given unique names. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1334) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1334) static member tcStructUnionMultiCaseDistinctFields() = (3204, sprintf "If a union type has more than one case and is a struct, then all fields within the union type must be given unique names." ) /// The CallerMemberNameAttribute applied to parameter '%s' will have no effect. It is overridden by the CallerFilePathAttribute. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1335) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1335) static member CallerMemberNameIsOverriden(a0 : System.String) = (3206, sprintf "The CallerMemberNameAttribute applied to parameter '%s' will have no effect. It is overridden by the CallerFilePathAttribute." a0) /// Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1336) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1336) static member tcFixedNotAllowed() = (3207, sprintf "Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string'" ) /// Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1337) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1337) static member tcCouldNotFindOffsetToStringData() = (3208, sprintf "Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1338) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1338) static member chkNoByrefAddressOfLocal(a0 : System.String) = (3209, sprintf "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." a0) /// %s is an active pattern and cannot be treated as a discriminated union case with named fields. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1339) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1339) static member tcNamedActivePattern(a0 : System.String) = (3210, sprintf "%s is an active pattern and cannot be treated as a discriminated union case with named fields." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1340) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1340) static member DefaultParameterValueNotAppropriateForArgument() = (3211, sprintf "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)'." ) /// The system type '%s' was required but no referenced system DLL contained this type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1341) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1341) static member tcGlobalsSystemTypeNotFound(a0 : System.String) = (sprintf "The system type '%s' was required but no referenced system DLL contained this type" a0) /// The member '%s' matches multiple overloads of the same method.\nPlease restrict it to one of the following:%s. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1342) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1342) static member typrelMemberHasMultiplePossibleDispatchSlots(a0 : System.String, a1 : System.String) = (3213, sprintf "The member '%s' matches multiple overloads of the same method.\nPlease restrict it to one of the following:%s." a0 a1) /// Method or object constructor '%s' is not static - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1343) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1343) static member methodIsNotStatic(a0 : System.String) = (3214, sprintf "Method or object constructor '%s' is not static" a0) /// Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead? - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1344) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1344) static member parsUnexpectedSymbolEqualsInsteadOfIn() = (3215, sprintf "Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead?" ) /// Two anonymous record types are from different assemblies '%s' and '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1345) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1345) static member tcAnonRecdCcuMismatch(a0 : System.String, a1 : System.String) = (sprintf "Two anonymous record types are from different assemblies '%s' and '%s'" a0 a1) /// Two anonymous record types have mismatched sets of field names '%s' and '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1346) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1346) static member tcAnonRecdFieldNameMismatch(a0 : System.String, a1 : System.String) = (sprintf "Two anonymous record types have mismatched sets of field names '%s' and '%s'" a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1347) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1347) static member keywordDescriptionAbstract() = (sprintf "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." ) /// Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1348) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1348) static member keyworkDescriptionAnd() = (sprintf "Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1349) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1349) static member keywordDescriptionAs() = (sprintf "Used to give the current class object an object name. Also used to give a name to a whole pattern within a pattern match." ) /// Used to verify code during debugging. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1350) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1350) static member keywordDescriptionAssert() = (sprintf "Used to verify code during debugging." ) /// Used as the name of the base class object. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1351) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1351) static member keywordDescriptionBase() = (sprintf "Used as the name of the base class object." ) /// In verbose syntax, indicates the start of a code block. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1352) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1352) static member keywordDescriptionBegin() = (sprintf "In verbose syntax, indicates the start of a code block." ) /// In verbose syntax, indicates the start of a class definition. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1353) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1353) static member keywordDescriptionClass() = (sprintf "In verbose syntax, indicates the start of a class definition." ) /// Indicates an implementation of an abstract method; used together with an abstract method declaration to create a virtual method. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1354) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1354) static member keywordDescriptionDefault() = (sprintf "Indicates an implementation of an abstract method; used together with an abstract method declaration to create a virtual method." ) /// Used to declare a delegate. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1355) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1355) static member keywordDescriptionDelegate() = (sprintf "Used to declare a delegate." ) /// Used in looping constructs or to execute imperative code. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1356) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1356) static member keywordDescriptionDo() = (sprintf "Used in looping constructs or to execute imperative code." ) /// In verbose syntax, indicates the end of a block of code in a looping expression. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1357) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1357) static member keywordDescriptionDone() = (sprintf "In verbose syntax, indicates the end of a block of code in a looping expression." ) /// Used to convert to a type that is lower in the inheritance chain. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1358) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1358) static member keywordDescriptionDowncast() = (sprintf "Used to convert to a type that is lower in the inheritance chain." ) /// In a for expression, used when counting in reverse. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1359) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1359) static member keywordDescriptionDownto() = (sprintf "In a for expression, used when counting in reverse." ) /// Used in conditional branching. A short form of else if. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1360) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1360) static member keywordDescriptionElif() = (sprintf "Used in conditional branching. A short form of else if." ) /// Used in conditional branching. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1361) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1361) static member keywordDescriptionElse() = (sprintf "Used in conditional branching." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1362) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1362) static member keywordDescriptionEnd() = (sprintf "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." ) /// Used to declare an exception type. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1363) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1363) static member keywordDescriptionException() = (sprintf "Used to declare an exception type." ) /// Indicates that a declared program element is defined in another binary or assembly. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1364) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1364) static member keywordDescriptionExtern() = (sprintf "Indicates that a declared program element is defined in another binary or assembly." ) /// Used as a Boolean literal. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1365) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1365) static member keywordDescriptionTrueFalse() = (sprintf "Used as a Boolean literal." ) /// Used together with try to introduce a block of code that executes regardless of whether an exception occurs. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1366) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1366) static member keywordDescriptionFinally() = (sprintf "Used together with try to introduce a block of code that executes regardless of whether an exception occurs." ) /// Used in looping constructs. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1367) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1367) static member keywordDescriptionFor() = (sprintf "Used in looping constructs." ) /// Used in lambda expressions, also known as anonymous functions. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1368) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1368) static member keywordDescriptionFun() = (sprintf "Used in lambda expressions, also known as anonymous functions." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1369) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1369) static member keywordDescriptionFunction() = (sprintf "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." ) /// Used to reference the top-level .NET namespace. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1370) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1370) static member keywordDescriptionGlobal() = (sprintf "Used to reference the top-level .NET namespace." ) /// Used in conditional branching constructs. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1371) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1371) static member keywordDescriptionIf() = (sprintf "Used in conditional branching constructs." ) /// Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1372) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1372) static member keywordDescriptionIn() = (sprintf "Used for sequence expressions and, in verbose syntax, to separate expressions from bindings." ) /// Used to specify a base class or base interface. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1373) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1373) static member keywordDescriptionInherit() = (sprintf "Used to specify a base class or base interface." ) /// Used to indicate a function that should be integrated directly into the caller's code. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1374) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1374) static member keywordDescriptionInline() = (sprintf "Used to indicate a function that should be integrated directly into the caller's code." ) /// Used to declare and implement interfaces. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1375) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1375) static member keywordDescriptionInterface() = (sprintf "Used to declare and implement interfaces." ) /// Used to specify that a member is visible inside an assembly but not outside it. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1376) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1376) static member keywordDescriptionInternal() = (sprintf "Used to specify that a member is visible inside an assembly but not outside it." ) /// Used to specify a computation that is to be performed only when a result is needed. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1377) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1377) static member keywordDescriptionLazy() = (sprintf "Used to specify a computation that is to be performed only when a result is needed." ) /// Used to associate, or bind, a name to a value or function. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1378) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1378) static member keywordDescriptionLet() = (sprintf "Used to associate, or bind, a name to a value or function." ) /// Used in computation expressions to bind a name to the result of another computation expression. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1379) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1379) static member keywordDescriptionLetBang() = (sprintf "Used in computation expressions to bind a name to the result of another computation expression." ) /// Used to branch by comparing a value to a pattern. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1380) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1380) static member keywordDescriptionMatch() = (sprintf "Used to branch by comparing a value to a pattern." ) /// Used in computation expressions to pattern match directly over the result of another computation expression. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1381) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1381) static member keywordDescriptionMatchBang() = (sprintf "Used in computation expressions to pattern match directly over the result of another computation expression." ) /// Used to declare a property or method in an object type. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1382) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1382) static member keywordDescriptionMember() = (sprintf "Used to declare a property or method in an object type." ) /// Used to associate a name with a group of related types, values, and functions, to logically separate it from other code. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1383) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1383) static member keywordDescriptionModule() = (sprintf "Used to associate a name with a group of related types, values, and functions, to logically separate it from other code." ) /// Used to declare a variable, that is, a value that can be changed. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1384) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1384) static member keywordDescriptionMutable() = (sprintf "Used to declare a variable, that is, a value that can be changed." ) /// Used to associate a name with a group of related types and modules, to logically separate it from other code. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1385) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1385) static member keywordDescriptionNamespace() = (sprintf "Used to associate a name with a group of related types and modules, to logically separate it from other code." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1386) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1386) static member keywordDescriptionNew() = (sprintf "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." ) /// Not actually a keyword. However, not struct in combination is used as a generic parameter constraint. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1387) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1387) static member keywordDescriptionNot() = (sprintf "Not actually a keyword. However, not struct in combination is used as a generic parameter constraint." ) /// Indicates the absence of an object. Also used in generic parameter constraints. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1388) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1388) static member keywordDescriptionNull() = (sprintf "Indicates the absence of an object. Also used in generic parameter constraints." ) /// Used in discriminated unions to indicate the type of categories of values, and in delegate and exception declarations. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1389) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1389) static member keywordDescriptionOf() = (sprintf "Used in discriminated unions to indicate the type of categories of values, and in delegate and exception declarations." ) /// Used to make the contents of a namespace or module available without qualification. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1390) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1390) static member keywordDescriptionOpen() = (sprintf "Used to make the contents of a namespace or module available without qualification." ) /// Used with Boolean conditions as a Boolean or operator. Equivalent to ||. Also used in member constraints. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1391) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1391) static member keywordDescriptionOr() = (sprintf "Used with Boolean conditions as a Boolean or operator. Equivalent to ||. Also used in member constraints." ) /// Used to implement a version of an abstract or virtual method that differs from the base version. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1392) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1392) static member keywordDescriptionOverride() = (sprintf "Used to implement a version of an abstract or virtual method that differs from the base version." ) /// Restricts access to a member to code in the same type or module. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1393) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1393) static member keywordDescriptionPrivate() = (sprintf "Restricts access to a member to code in the same type or module." ) /// Allows access to a member from outside the type. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1394) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1394) static member keywordDescriptionPublic() = (sprintf "Allows access to a member from outside the type." ) /// Used to indicate that a function is recursive. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1395) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1395) static member keywordDescriptionRec() = (sprintf "Used to indicate that a function is recursive." ) /// Used to provide a value for the result of the containing computation expression. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1396) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1396) static member keywordDescriptionReturn() = (sprintf "Used to provide a value for the result of the containing computation expression." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1397) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1397) static member keywordDescriptionReturnBang() = (sprintf "Used to provide a value for the result of the containing computation expression, where that value itself comes from the result another computation expression." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1398) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1398) static member keywordDescriptionSelect() = (sprintf "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." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1399) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1399) static member keywordDescriptionStatic() = (sprintf "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." ) /// Used to declare a structure type. Also used in generic parameter constraints. Used for OCaml compatibility in module definitions. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1400) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1400) static member keywordDescriptionStruct() = (sprintf "Used to declare a structure type. Also used in generic parameter constraints. Used for OCaml compatibility in module definitions." ) /// Used in conditional expressions. Also used to perform side effects after object construction. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1401) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1401) static member keywordDescriptionThen() = (sprintf "Used in conditional expressions. Also used to perform side effects after object construction." ) /// Used in for loops to indicate a range. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1402) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1402) static member keywordDescriptionTo() = (sprintf "Used in for loops to indicate a range." ) /// Used to introduce a block of code that might generate an exception. Used together with with or finally. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1403) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1403) static member keywordDescriptionTry() = (sprintf "Used to introduce a block of code that might generate an exception. Used together with with or finally." ) /// Used to declare a class, record, structure, discriminated union, enumeration type, unit of measure, or type abbreviation. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1404) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1404) static member keywordDescriptionType() = (sprintf "Used to declare a class, record, structure, discriminated union, enumeration type, unit of measure, or type abbreviation." ) /// Used to convert to a type that is higher in the inheritance chain. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1405) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1405) static member keywordDescriptionUpcast() = (sprintf "Used to convert to a type that is higher in the inheritance chain." ) /// Used instead of let for values that implement IDisposable - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1406) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1406) static member keywordDescriptionUse() = (sprintf "Used instead of let for values that implement IDisposable" ) /// Used instead of let! in computation expressions for computation expression results that implement IDisposable. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1407) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1407) static member keywordDescriptionUseBang() = (sprintf "Used instead of let! in computation expressions for computation expression results that implement IDisposable." ) /// Used in a signature to indicate a value, or in a type to declare a member, in limited situations. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1408) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1408) static member keywordDescriptionVal() = (sprintf "Used in a signature to indicate a value, or in a type to declare a member, in limited situations." ) /// Indicates the .NET void type. Used when interoperating with other .NET languages. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1409) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1409) static member keywordDescriptionVoid() = (sprintf "Indicates the .NET void type. Used when interoperating with other .NET languages." ) /// Used for Boolean conditions (when guards) on pattern matches and to introduce a constraint clause for a generic type parameter. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1410) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1410) static member keywordDescriptionWhen() = (sprintf "Used for Boolean conditions (when guards) on pattern matches and to introduce a constraint clause for a generic type parameter." ) /// Introduces a looping construct. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1411) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1411) static member keywordDescriptionWhile() = (sprintf "Introduces a looping construct." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1412) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1412) static member keywordDescriptionWith() = (sprintf "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." ) /// Used in a sequence expression to produce a value for a sequence. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1413) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1413) static member keywordDescriptionYield() = (sprintf "Used in a sequence expression to produce a value for a sequence." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1414) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1414) static member keywordDescriptionYieldBang() = (sprintf "Used in a computation expression to append the result of a given computation expression to a collection of results for the containing computation expression." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1415) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1415) static member keywordDescriptionRightArrow() = (sprintf "In function types, delimits arguments and return values. Yields an expression (in sequence expressions); equivalent to the yield keyword. Used in match expressions" ) /// Assigns a value to a variable. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1416) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1416) static member keywordDescriptionLeftArrow() = (sprintf "Assigns a value to a variable." ) /// Converts a type to type that is higher in the hierarchy. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1417) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1417) static member keywordDescriptionCast() = (sprintf "Converts a type to type that is higher in the hierarchy." ) /// Converts a type to a type that is lower in the hierarchy. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1418) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1418) static member keywordDescriptionDynamicCast() = (sprintf "Converts a type to a type that is lower in the hierarchy." ) /// Delimits a typed code quotation. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1419) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1419) static member keywordDescriptionTypedQuotation() = (sprintf "Delimits a typed code quotation." ) /// Delimits a untyped code quotation. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1420) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1420) static member keywordDescriptionUntypedQuotation() = (sprintf "Delimits a untyped code quotation." ) /// %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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1421) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1421) static member itemNotFoundDuringDynamicCodeGen(a0 : System.String, a1 : System.String, a2 : System.String) = (3216, sprintf "%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." a0 a1 a2) /// %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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1422) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1422) static member itemNotFoundInTypeDuringDynamicCodeGen(a0 : System.String, a1 : System.String, a2 : System.String, a3 : System.String) = (3216, sprintf "%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." a0 a1 a2 a3) /// is - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1423) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1423) static member descriptionWordIs() = (sprintf "is" ) /// This value is not a function and cannot be applied. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1424) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1424) static member notAFunction() = (sprintf "This value is not a function and cannot be applied." ) /// This value is not a function and cannot be applied. Did you intend to access the indexer via %s.[index] instead? - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1425) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1425) static member notAFunctionButMaybeIndexerWithName(a0 : System.String) = (sprintf "This value is not a function and cannot be applied. Did you intend to access the indexer via %s.[index] instead?" a0) /// This expression is not a function and cannot be applied. Did you intend to access the indexer via expr.[index] instead? - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1426) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1426) static member notAFunctionButMaybeIndexer() = (sprintf "This expression is not a function and cannot be applied. Did you intend to access the indexer via expr.[index] instead?" ) /// - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1427) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1427) static member notAFunctionButMaybeIndexerErrorCode() = (3217, sprintf "" ) /// This value is not a function and cannot be applied. Did you forget to terminate a declaration? - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1428) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1428) static member notAFunctionButMaybeDeclaration() = (sprintf "This value is not a function and cannot be applied. Did you forget to terminate a declaration?" ) /// The argument names in the signature '%s' and implementation '%s' do not match. The argument name from the signature file will be used. This may cause problems when debugging or profiling. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1429) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1429) static member ArgumentsInSigAndImplMismatch(a0 : System.String, a1 : System.String) = (3218, sprintf "The argument names in the signature '%s' and implementation '%s' do not match. The argument name from the signature file will be used. This may cause problems when debugging or profiling." a0 a1) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1430) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1430) static member pickleUnexpectedNonZero(a0 : System.String) = (3219, sprintf "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." a0) /// This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1431) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1431) static member tcTupleMemberNotNormallyUsed() = (3220, sprintf "This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1432) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1432) static member implicitlyDiscardedInSequenceExpression(a0 : System.String) = (3221, sprintf "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'." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1433) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1433) static member implicitlyDiscardedSequenceInSequenceExpression(a0 : System.String) = (3222, sprintf "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!'." a0) /// The file '%s' changed on disk unexpectedly, please reload. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1434) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1434) static member ilreadFileChanged(a0 : System.String) = (3223, sprintf "The file '%s' changed on disk unexpectedly, please reload." a0) /// The byref pointer is readonly, so this write is not permitted. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1435) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1435) static member writeToReadOnlyByref() = (3224, sprintf "The byref pointer is readonly, so this write is not permitted." ) /// A ReadOnly attribute has been applied to a struct type with a mutable field. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1436) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1436) static member readOnlyAttributeOnStructWithMutableField() = (3225, sprintf "A ReadOnly attribute has been applied to a struct type with a mutable field." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1437) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1437) static member tcByrefReturnImplicitlyDereferenced() = (3226, sprintf "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)'." ) /// A type annotated with IsByRefLike must also be a struct. Consider adding the [] attribute to the type. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1438) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1438) static member tcByRefLikeNotStruct() = (3227, sprintf "A type annotated with IsByRefLike must also be a struct. Consider adding the [] attribute to the type." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1439) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1439) static member chkNoByrefAddressOfValueFromExpression() = (3228, sprintf "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." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1440) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1440) static member chkNoWriteToLimitedSpan(a0 : System.String) = (3229, sprintf "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." a0) /// A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1441) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1441) static member tastValueMustBeLocal() = (3230, sprintf "A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...'" ) /// A type annotated with IsReadOnly must also be a struct. Consider adding the [] attribute to the type. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1442) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1442) static member tcIsReadOnlyNotStruct() = (3231, sprintf "A type annotated with IsReadOnly must also be a struct. Consider adding the [] attribute to the type." ) /// Struct members cannot return the address of fields of the struct by reference - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1443) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1443) static member chkStructsMayNotReturnAddressesOfContents() = (3232, sprintf "Struct members cannot return the address of fields of the struct by reference" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1444) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1444) static member chkNoByrefLikeFunctionCall() = (3233, sprintf "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." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1445) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1445) static member chkNoSpanLikeVariable(a0 : System.String) = (3234, sprintf "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." a0) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1446) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1446) static member chkNoSpanLikeValueFromExpression() = (3235, sprintf "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." ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1447) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1447) static member tastCantTakeAddressOfExpression() = (3236, sprintf "Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address." ) /// Cannot call the byref extension method '%s. The first parameter requires the value to be mutable or a non-readonly byref type. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1448) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1448) static member tcCannotCallExtensionMethodInrefToByref(a0 : System.String) = (3237, sprintf "Cannot call the byref extension method '%s. The first parameter requires the value to be mutable or a non-readonly byref type." a0) /// Byref types are not allowed to have optional type extensions. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1449) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1449) static member tcByrefsMayNotHaveTypeExtensions() = (3238, sprintf "Byref types are not allowed to have optional type extensions." ) /// Cannot partially apply the extension method '%s' because the first parameter is a byref type. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1450) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1450) static member tcCannotPartiallyApplyExtensionMethodForByref(a0 : System.String) = (3239, sprintf "Cannot partially apply the extension method '%s' because the first parameter is a byref type." a0) /// This type does not inherit Attribute, it will not work correctly with other .NET languages. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1451) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1451) static member tcTypeDoesNotInheritAttribute() = (3242, sprintf "This type does not inherit Attribute, it will not work correctly with other .NET languages." ) /// Invalid anonymous record expression - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1452) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1452) static member parsInvalidAnonRecdExpr() = (3243, sprintf "Invalid anonymous record expression" ) /// Invalid anonymous record type - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1453) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1453) static member parsInvalidAnonRecdType() = (3244, sprintf "Invalid anonymous record type" ) /// The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1454) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1454) static member tcCopyAndUpdateNeedsRecordType() = (3245, sprintf "The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record" ) /// The parameter '%s' has an invalid type '%s'. This is not permitted by the rules of Common IL. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1455) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1455) static member chkInvalidFunctionParameterType(a0 : System.String, a1 : System.String) = (3300, sprintf "The parameter '%s' has an invalid type '%s'. This is not permitted by the rules of Common IL." a0 a1) /// The function or method has an invalid return type '%s'. This is not permitted by the rules of Common IL. - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\FSComp.txt:1456) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/FSComp.txt:1456) static member chkInvalidFunctionReturnType(a0 : System.String) = (3301, sprintf "The function or method has an invalid return type '%s'. This is not permitted by the rules of Common IL." a0) diff --git a/src/fcs-fable/codegen/FSIstrings.fs b/src/fcs-fable/codegen/FSIstrings.fs index 2d63701100..ca5480cc8d 100644 --- a/src/fcs-fable/codegen/FSIstrings.fs +++ b/src/fcs-fable/codegen/FSIstrings.fs @@ -1,162 +1,162 @@ -// This is a generated file; the original input is 'C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt' +// This is a generated file; the original input is '/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt' namespace FSIstrings type internal SR private() = /// Stopped due to error\n - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:2) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:2) static member stoppedDueToError() = (sprintf "Stopped due to error\n" ) /// Usage: %s [script.fsx []] - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:3) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:3) static member fsiUsage(a0 : System.String) = (sprintf "Usage: %s [script.fsx []]" a0) /// - INPUT FILES - - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:4) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:4) static member fsiInputFiles() = (sprintf "- INPUT FILES -" ) /// - CODE GENERATION - - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:5) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:5) static member fsiCodeGeneration() = (sprintf "- CODE GENERATION -" ) /// - ERRORS AND WARNINGS - - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:6) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:6) static member fsiErrorsAndWarnings() = (sprintf "- ERRORS AND WARNINGS -" ) /// - LANGUAGE - - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:7) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:7) static member fsiLanguage() = (sprintf "- LANGUAGE -" ) /// - MISCELLANEOUS - - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:8) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:8) static member fsiMiscellaneous() = (sprintf "- MISCELLANEOUS -" ) /// - ADVANCED - - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:9) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:9) static member fsiAdvanced() = (sprintf "- ADVANCED -" ) /// Exception raised when starting remoting server.\n%s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:10) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:10) static member fsiExceptionRaisedStartingServer(a0 : System.String) = (sprintf "Exception raised when starting remoting server.\n%s" a0) /// Use the given file on startup as initial input - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:11) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:11) static member fsiUse() = (sprintf "Use the given file on startup as initial input" ) /// #load the given file on startup - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:12) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:12) static member fsiLoad() = (sprintf "#load the given file on startup" ) /// Treat remaining arguments as command line arguments, accessed using fsi.CommandLineArgs - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:13) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:13) static member fsiRemaining() = (sprintf "Treat remaining arguments as command line arguments, accessed using fsi.CommandLineArgs" ) /// Display this usage message (Short form: -?) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:14) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:14) static member fsiHelp() = (sprintf "Display this usage message (Short form: -?)" ) /// Exit fsi after loading the files or running the .fsx script given on the command line - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:15) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:15) static member fsiExec() = (sprintf "Exit fsi after loading the files or running the .fsx script given on the command line" ) /// Execute interactions on a Windows Forms event loop (on by default) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:16) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:16) static member fsiGui() = (sprintf "Execute interactions on a Windows Forms event loop (on by default)" ) /// Suppress fsi writing to stdout - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:17) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:17) static member fsiQuiet() = (sprintf "Suppress fsi writing to stdout" ) /// Support TAB completion in console (on by default) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:18) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:18) static member fsiReadline() = (sprintf "Support TAB completion in console (on by default)" ) /// Emit debug information in quotations - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:19) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:19) static member fsiEmitDebugInfoInQuotations() = (sprintf "Emit debug information in quotations" ) /// For help type #help;; - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:20) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:20) static member fsiBanner3() = (sprintf "For help type #help;;" ) /// 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 C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:21) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:21) static member fsiConsoleProblem() = (sprintf "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'." ) /// '%s' is not a valid assembly name - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:22) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:22) static member fsiInvalidAssembly(a0 : System.String) = (2301, sprintf "'%s' is not a valid assembly name" a0) /// Directory '%s' doesn't exist - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:23) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:23) static member fsiDirectoryDoesNotExist(a0 : System.String) = (2302, sprintf "Directory '%s' doesn't exist" a0) /// Invalid directive '#%s %s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:24) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:24) static member fsiInvalidDirective(a0 : System.String, a1 : System.String) = (sprintf "Invalid directive '#%s %s'" a0 a1) /// Warning: line too long, ignoring some characters\n - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:25) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:25) static member fsiLineTooLong() = (sprintf "Warning: line too long, ignoring some characters\n" ) /// Real: %s, CPU: %s, GC %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:26) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:26) static member fsiTimeInfoMainString(a0 : System.String, a1 : System.String, a2 : System.String) = (sprintf "Real: %s, CPU: %s, GC %s" a0 a1 a2) /// gen - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:27) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:27) static member fsiTimeInfoGCGenerationLabelSomeShorthandForTheWordGeneration() = (sprintf "gen" ) /// \n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: %s\n - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:28) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:28) static member fsiExceptionDuringPrettyPrinting(a0 : System.String) = (sprintf "\n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: %s\n" a0) /// F# Interactive directives: - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:29) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:29) static member fsiIntroTextHeader1directives() = (sprintf " F# Interactive directives:" ) /// Reference (dynamically load) the given DLL - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:30) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:30) static member fsiIntroTextHashrInfo() = (sprintf "Reference (dynamically load) the given DLL" ) /// Add the given search path for referenced DLLs - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:31) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:31) static member fsiIntroTextHashIInfo() = (sprintf "Add the given search path for referenced DLLs" ) /// Load the given file(s) as if compiled and referenced - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:32) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:32) static member fsiIntroTextHashloadInfo() = (sprintf "Load the given file(s) as if compiled and referenced" ) /// Toggle timing on/off - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:33) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:33) static member fsiIntroTextHashtimeInfo() = (sprintf "Toggle timing on/off" ) /// Display help - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:34) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:34) static member fsiIntroTextHashhelpInfo() = (sprintf "Display help" ) /// Exit - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:35) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:35) static member fsiIntroTextHashquitInfo() = (sprintf "Exit" ) /// F# Interactive command line options: - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:36) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:36) static member fsiIntroTextHeader2commandLine() = (sprintf " F# Interactive command line options:" ) /// See '%s' for options - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:37) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:37) static member fsiIntroTextHeader3(a0 : System.String) = (sprintf " See '%s' for options" a0) /// Loading - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:38) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:38) static member fsiLoadingFilesPrefixText() = (sprintf "Loading" ) /// \n- Interrupt\n - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:39) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:39) static member fsiInterrupt() = (sprintf "\n- Interrupt\n" ) /// \n- Exit...\n - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:40) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:40) static member fsiExit() = (sprintf "\n- Exit...\n" ) /// - Aborting main thread... - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:41) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:41) static member fsiAbortingMainThread() = (sprintf "- Aborting main thread..." ) /// Failed to install ctrl-c handler - Ctrl-C handling will not be available. Error was:\n\t%s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:42) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:42) static member fsiCouldNotInstallCtrlCHandler(a0 : System.String) = (sprintf "Failed to install ctrl-c handler - Ctrl-C handling will not be available. Error was:\n\t%s" a0) /// --> Referenced '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:43) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:43) static member fsiDidAHashr(a0 : System.String) = (sprintf "--> Referenced '%s'" a0) /// --> Referenced '%s' (file may be locked by F# Interactive process) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:44) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:44) static member fsiDidAHashrWithLockWarning(a0 : System.String) = (sprintf "--> Referenced '%s' (file may be locked by F# Interactive process)" a0) /// --> Referenced '%s' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:45) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:45) static member fsiDidAHashrWithStaleWarning(a0 : System.String) = (sprintf "--> Referenced '%s' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly)" a0) /// --> Added '%s' to library include path - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:46) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:46) static member fsiDidAHashI(a0 : System.String) = (sprintf "--> Added '%s' to library include path" a0) /// --> Timing now on - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:47) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:47) static member fsiTurnedTimingOn() = (sprintf "--> Timing now on" ) /// --> Timing now off - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:48) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:48) static member fsiTurnedTimingOff() = (sprintf "--> Timing now off" ) /// - Unexpected ThreadAbortException (Ctrl-C) during event handling: Trying to restart... - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:49) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:49) static member fsiUnexpectedThreadAbortException() = (sprintf "- Unexpected ThreadAbortException (Ctrl-C) during event handling: Trying to restart..." ) /// Failed to resolve assembly '%s' - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:50) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:50) static member fsiFailedToResolveAssembly(a0 : System.String) = (sprintf "Failed to resolve assembly '%s'" a0) /// Binding session to '%s'... - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:51) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:51) static member fsiBindingSessionTo(a0 : System.String) = (sprintf "Binding session to '%s'..." a0) /// Microsoft (R) F# Interactive version %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:52) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:52) static member fsiProductName(a0 : System.String) = (sprintf "Microsoft (R) F# Interactive version %s" a0) /// F# Interactive for F# %s - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:53) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:53) static member fsiProductNameCommunity(a0 : System.String) = (sprintf "F# Interactive for F# %s" a0) /// Prevents references from being locked by the F# Interactive process - /// (Originally from C:\Users\alfon\dev\FSharp.Compiler.Service_fable\src\fsharp\fsi\FSIstrings.txt:54) + /// (Originally from /Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/src/fsharp/fsi/FSIstrings.txt:54) static member shadowCopyReferences() = (sprintf "Prevents references from being locked by the F# Interactive process" ) diff --git a/src/fcs-fable/codegen/illex.fs b/src/fcs-fable/codegen/illex.fs index 1c325958de..acdab0ba97 100644 --- a/src/fcs-fable/codegen/illex.fs +++ b/src/fcs-fable/codegen/illex.fs @@ -1,4 +1,4 @@ -//# 3 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 3 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" module internal FSharp.Compiler.AbstractIL.Internal.AsciiLexer @@ -370,159 +370,157 @@ let trans : uint16[] array = let actions : uint16[] = [|65535us; 0us; 1us; 2us; 3us; 4us; 5us; 6us; 7us; 8us; 9us; 10us; 11us; 26us; 14us; 15us; 15us; 23us; 23us; 23us; 23us; 23us; 23us; 26us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 25us; 26us; 27us; 23us; 23us; 65535us; 65535us; 24us; 65535us; 24us; 65535us; 24us; 24us; 23us; 23us; 23us; 23us; 23us; 23us; 65535us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 22us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 23us; 20us; 20us; 65535us; 21us; 21us; 21us; 65535us; 21us; 17us; 23us; 17us; 23us; 23us; 23us; 23us; 23us; 17us; 23us; 23us; 17us; 17us; 23us; 23us; 23us; 23us; 23us; 19us; 17us; 21us; 17us; 17us; 65535us; 16us; 15us; 15us; 65535us; 18us; 18us; 21us; 21us; 13us; 65535us; 12us; |] let _fslex_tables = Internal.Utilities.Text.Lexing.UnicodeTables.Create(trans,actions) let rec _fslex_dummy () = _fslex_dummy() -(* Rule token *) -and inline token (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_token 0 lexbuf -(* Rule token *) -and _fslex_token _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with +// Rule token +and token lexbuf = + match _fslex_tables.Interpret(0,lexbuf) with | 0 -> ( -//# 98 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 98 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" COMMA -//# 381 "illex.fs" +//# 379 "illex.fs" ) | 1 -> ( -//# 99 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 99 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" DOT -//# 386 "illex.fs" +//# 384 "illex.fs" ) | 2 -> ( -//# 100 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 100 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" STAR -//# 391 "illex.fs" +//# 389 "illex.fs" ) | 3 -> ( -//# 101 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 101 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" BANG -//# 396 "illex.fs" +//# 394 "illex.fs" ) | 4 -> ( -//# 102 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 102 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" AMP -//# 401 "illex.fs" +//# 399 "illex.fs" ) | 5 -> ( -//# 103 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 103 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" LPAREN -//# 406 "illex.fs" +//# 404 "illex.fs" ) | 6 -> ( -//# 104 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 104 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" RPAREN -//# 411 "illex.fs" +//# 409 "illex.fs" ) | 7 -> ( -//# 105 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 105 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" LBRACK -//# 416 "illex.fs" +//# 414 "illex.fs" ) | 8 -> ( -//# 106 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 106 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" RBRACK -//# 421 "illex.fs" +//# 419 "illex.fs" ) | 9 -> ( -//# 107 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 107 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" SLASH -//# 426 "illex.fs" +//# 424 "illex.fs" ) | 10 -> ( -//# 108 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 108 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" LESS -//# 431 "illex.fs" +//# 429 "illex.fs" ) | 11 -> ( -//# 109 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 109 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" GREATER -//# 436 "illex.fs" +//# 434 "illex.fs" ) | 12 -> ( -//# 110 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 110 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" ELIPSES -//# 441 "illex.fs" +//# 439 "illex.fs" ) | 13 -> ( -//# 111 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 111 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" DCOLON -//# 446 "illex.fs" +//# 444 "illex.fs" ) | 14 -> ( -//# 112 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 112 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" PLUS -//# 451 "illex.fs" +//# 449 "illex.fs" ) | 15 -> ( -//# 114 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 114 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" VAL_INT64(int64(lexeme lexbuf)) -//# 456 "illex.fs" +//# 454 "illex.fs" ) | 16 -> ( -//# 123 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 123 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" let b = lexeme lexbuf in VAL_INT32_ELIPSES(int32(String.sub b 0 (String.length b - 3))) -//# 462 "illex.fs" +//# 460 "illex.fs" ) | 17 -> ( -//# 126 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 126 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" let c1 = String.get (lexeme lexbuf) 0 in let c2 = String.get (lexeme lexbuf) 1 in if c1 >= '0' && c1 <= '9' && c2 >= '0' && c2 <= '9' then VAL_INT64(int64 (10*eval c1 + eval c2) ) else VAL_ID(lexeme lexbuf) -//# 471 "illex.fs" +//# 469 "illex.fs" ) | 18 -> ( -//# 132 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 132 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" VAL_INT64(int64(lexeme lexbuf)) -//# 476 "illex.fs" +//# 474 "illex.fs" ) | 19 -> ( -//# 134 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 134 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" let c1 = (lexeme lexbuf).[6] in let c2 = (lexeme lexbuf).[7] in if c1 >= '0' && c1 <= '9' && c2 >= '0' && c2 <= '9' then VAL_INT64(int64 (10*eval c1 + eval c2)) else VAL_ID(lexeme lexbuf) -//# 485 "illex.fs" +//# 483 "illex.fs" ) | 20 -> ( -//# 141 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 141 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" VAL_INT64(int64(lexeme lexbuf)) -//# 490 "illex.fs" +//# 488 "illex.fs" ) | 21 -> ( -//# 143 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 143 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" VAL_FLOAT64( (float (lexeme lexbuf)) ) -//# 495 "illex.fs" +//# 493 "illex.fs" ) | 22 -> ( -//# 146 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 146 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" let s = (lexeme lexbuf) in kwdOrInstr s -//# 500 "illex.fs" +//# 498 "illex.fs" ) | 23 -> ( -//# 148 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 148 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" kwdOrInstrOrId (lexeme lexbuf) -//# 505 "illex.fs" +//# 503 "illex.fs" ) | 24 -> ( -//# 151 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 151 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" VAL_DOTTEDNAME(lexeme lexbuf) -//# 510 "illex.fs" +//# 508 "illex.fs" ) | 25 -> ( -//# 154 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 154 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" token lexbuf -//# 515 "illex.fs" +//# 513 "illex.fs" ) | 26 -> ( -//# 156 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 156 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" unexpectedChar lexbuf -//# 520 "illex.fs" +//# 518 "illex.fs" ) | 27 -> ( -//# 158 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\illex.fsl" +//# 158 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/illex.fsl" EOF -//# 525 "illex.fs" +//# 523 "illex.fs" ) | _ -> failwith "token" diff --git a/src/fcs-fable/codegen/ilpars.fs b/src/fcs-fable/codegen/ilpars.fs index 32c9f22448..5baa691300 100644 --- a/src/fcs-fable/codegen/ilpars.fs +++ b/src/fcs-fable/codegen/ilpars.fs @@ -4,7 +4,7 @@ module internal FSharp.Compiler.AbstractIL.Internal.AsciiParser open FSharp.Compiler.AbstractIL open Internal.Utilities.Text.Lexing open Internal.Utilities.Text.Parsing.ParseHelpers -//# 3 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 3 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" #nowarn "1182" // the generated code often has unused variable "parseState" @@ -657,10 +657,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 148 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 148 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" resolveMethodSpecScope _1 [] ) -//# 148 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 148 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType)); //# 665 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -668,10 +668,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 152 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 152 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" Array.ofList _1 ) -//# 152 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 152 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILInstr array)); //# 676 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -679,10 +679,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 156 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 156 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" _1 ) -//# 156 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 156 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'compQstring)); //# 687 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -691,10 +691,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 157 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 157 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" _1 + _3 ) -//# 157 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 157 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'compQstring)); //# 699 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -702,10 +702,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 159 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 159 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" _1 ) -//# 159 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 159 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'methodName)); //# 710 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -714,20 +714,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 163 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 163 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" _1 :: _2 ) -//# 163 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 163 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'instrs2)); //# 722 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 164 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 164 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" [] ) -//# 164 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 164 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'instrs2)); //# 732 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -740,7 +740,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 170 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 170 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" let callee_class_typ : ILType = resolveCurrentMethodSpecScope _3 let gscope = (if isILArrTy callee_class_typ then None else Some callee_class_typ.TypeSpec) let argtys_n_varargs = resolveFormalMethodSpecScope gscope _8 @@ -749,7 +749,7 @@ let _fsyacc_reductions () = [| let callee_retty = resolveFormalMethodSpecScope gscope _2 (callee_class_typ, _1, _5, argtys, callee_retty, minst), varargs ) -//# 170 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 170 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'methodSpecMaybeArrayMethod)); //# 754 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -757,10 +757,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 180 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 180 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" (_1 ()) ) -//# 180 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 180 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'instr)); //# 765 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -769,10 +769,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 182 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 182 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" (_1 _2) ) -//# 182 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 182 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'instr)); //# 777 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -782,10 +782,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 184 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 184 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" (_1 (_2,_3)) ) -//# 184 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 184 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'instr)); //# 790 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -794,10 +794,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 186 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 186 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" (_1 _2) ) -//# 186 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 186 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'instr)); //# 802 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -806,10 +806,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 188 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 188 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" (_1 (ILConst.R8 _2)) ) -//# 188 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 188 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'instr)); //# 814 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -818,10 +818,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 190 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 190 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" (_1 (ILConst.R8 (float _2))) ) -//# 190 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 190 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'instr)); //# 826 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -830,7 +830,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 192 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 192 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" let ((encl_typ, _cc, nm, _argtys, _retty, _minst) as data),varargs = _2 if isILArrTy encl_typ then @@ -844,7 +844,7 @@ let _fsyacc_reductions () = [| else _1 (mkILMethSpecInTy data, varargs) ) -//# 192 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 192 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'instr)); //# 849 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -853,10 +853,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 205 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 205 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" _1 (resolveCurrentMethodSpecScope _2) ) -//# 205 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 205 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'instr)); //# 861 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -866,10 +866,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 207 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 207 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" _1 ( _2,resolveCurrentMethodSpecScope _3) ) -//# 207 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 207 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'instr)); //# 874 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -878,10 +878,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 209 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 209 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" _1 (resolveCurrentMethodSpecScope _2) ) -//# 209 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 209 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'instr)); //# 886 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -890,20 +890,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 211 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 211 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" (_1 (ILToken.ILType (resolveCurrentMethodSpecScope _2))) ) -//# 211 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 211 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'instr)); //# 898 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 218 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 218 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope [] ) -//# 218 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 218 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'sigArgs0)); //# 908 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -911,10 +911,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 219 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 219 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" _1 ) -//# 219 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 219 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'sigArgs0)); //# 919 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -922,10 +922,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 223 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 223 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" ResolvedAtMethodSpecScope (fun c -> List.map (fun obj -> resolveMethodSpecScope obj c) (List.rev _1)) ) -//# 223 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 223 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'sigArgs1)); //# 930 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -933,10 +933,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 227 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 227 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" [_1] ) -//# 227 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 227 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'sigArgs1a)); //# 941 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -945,10 +945,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 229 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 229 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" _3:: _1 ) -//# 229 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 229 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'sigArgs1a)); //# 953 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -957,21 +957,21 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 233 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 233 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" resolveMethodSpecScopeThen _1 (fun ty -> noMethodSpecScope (SigArg(_2, ty))) ) -//# 233 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 233 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'sigArg)); //# 966 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 238 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 238 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" None ) -//# 238 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 238 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'opt_id)); //# 976 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -979,10 +979,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 238 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 238 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" Some _1 ) -//# 238 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 238 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'opt_id)); //# 987 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -990,10 +990,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 246 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 246 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" _1 ) -//# 246 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 246 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : string)); //# 998 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1001,10 +1001,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 248 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 248 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" _1 ) -//# 248 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 248 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : string)); //# 1009 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1013,10 +1013,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 250 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 250 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" _1 + "." + _3 ) -//# 250 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 250 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : string)); //# 1021 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1025,12 +1025,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 254 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 254 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" let (enc,nm) = _4 let aref = findAssemblyRef _2 ILScopeRef.Assembly aref, enc, nm ) -//# 254 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 254 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'className)); //# 1035 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1038,10 +1038,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 258 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 258 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" let enc, nm = _1 in (ILScopeRef.Local, enc, nm) ) -//# 258 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 258 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'className)); //# 1046 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1049,10 +1049,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 262 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 262 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" ([],_1) ) -//# 262 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 262 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'slashedName)); //# 1057 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1061,10 +1061,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 264 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 264 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" let (enc,nm) = _3 in (_1::enc, nm) ) -//# 264 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 264 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'slashedName)); //# 1069 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1073,12 +1073,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 268 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 268 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" let (a,b,c) = _1 resolveMethodSpecScopeThen _2 (fun inst -> noMethodSpecScope ( (mkILTySpec ( (mkILNestedTyRef (a,b,c)), inst)))) ) -//# 268 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 268 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'typeNameInst)); //# 1083 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1086,11 +1086,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 275 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 275 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" let (a,b,c) = _1 noMethodSpecScope ( (mkILTySpec ( (mkILNestedTyRef (a,b,c)), []))) ) -//# 275 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 275 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'typeName)); //# 1095 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1098,11 +1098,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 281 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 281 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" resolveMethodSpecScopeThen _1 (fun tref -> noMethodSpecScope (mkILBoxedType tref)) ) -//# 281 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 281 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'typSpec)); //# 1107 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1110,10 +1110,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 284 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 284 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" _1 ) -//# 284 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 284 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'typSpec)); //# 1118 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1121,10 +1121,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 286 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 286 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" _2 ) -//# 286 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 286 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'typSpec)); //# 1129 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1132,10 +1132,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 291 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 291 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" Callconv (ILThisConvention.Instance,_2) ) -//# 291 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 291 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'callConv)); //# 1140 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1143,10 +1143,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 293 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 293 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" Callconv (ILThisConvention.InstanceExplicit,_2) ) -//# 293 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 293 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'callConv)); //# 1151 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1154,60 +1154,60 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 295 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 295 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" Callconv (ILThisConvention.Static,_1) ) -//# 295 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 295 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'callConv)); //# 1162 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 299 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 299 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" ILArgConvention.Default ) -//# 299 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 299 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'callKind)); //# 1172 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 301 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 301 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" ILArgConvention.Default ) -//# 301 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 301 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'callKind)); //# 1182 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 303 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 303 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" ILArgConvention.VarArg ) -//# 303 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 303 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'callKind)); //# 1192 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 312 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 312 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope (!parseILGlobals).typ_String ) -//# 312 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 312 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1202 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 314 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 314 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope (!parseILGlobals).typ_Object ) -//# 314 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 314 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1212 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1215,11 +1215,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 316 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 316 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" resolveMethodSpecScopeThen _2 (fun tspec -> noMethodSpecScope (mkILBoxedType tspec)) ) -//# 316 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 316 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1224 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1227,11 +1227,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 319 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 319 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" resolveMethodSpecScopeThen _3 (fun tspec -> noMethodSpecScope (ILType.Value tspec)) ) -//# 319 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 319 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1236 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1239,11 +1239,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 322 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 322 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" resolveMethodSpecScopeThen _2 (fun tspec -> noMethodSpecScope (ILType.Value tspec)) ) -//# 322 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 322 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1248 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1251,10 +1251,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 325 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 325 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" resolveMethodSpecScopeThen _1 (fun ty -> noMethodSpecScope (mkILArr1DTy ty)) ) -//# 325 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 325 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1259 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1263,10 +1263,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 327 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 327 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" resolveMethodSpecScopeThen _1 (fun ty -> noMethodSpecScope (mkILArrTy (ty,ILArrayShape _3))) ) -//# 327 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 327 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1271 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1274,10 +1274,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 329 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 329 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" resolveMethodSpecScopeThen _1 (fun ty -> noMethodSpecScope (ILType.Byref ty)) ) -//# 329 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 329 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1282 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1285,210 +1285,210 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 331 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 331 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" resolveMethodSpecScopeThen _1 (fun ty -> noMethodSpecScope (ILType.Ptr ty)) ) -//# 331 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 331 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1293 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 333 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 333 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope (!parseILGlobals).typ_Char ) -//# 333 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 333 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1303 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 335 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 335 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope ILType.Void ) -//# 335 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 335 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1313 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 337 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 337 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope (!parseILGlobals).typ_Bool ) -//# 337 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 337 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1323 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 339 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 339 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope (!parseILGlobals).typ_SByte ) -//# 339 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 339 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1333 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 341 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 341 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope (!parseILGlobals).typ_Int16 ) -//# 341 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 341 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1343 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 343 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 343 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope (!parseILGlobals).typ_Int32 ) -//# 343 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 343 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1353 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 345 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 345 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope (!parseILGlobals).typ_Int64 ) -//# 345 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 345 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1363 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 347 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 347 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope (!parseILGlobals).typ_Single ) -//# 347 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 347 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1373 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 349 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 349 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope (!parseILGlobals).typ_Double ) -//# 349 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 349 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1383 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 351 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 351 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope (!parseILGlobals).typ_Byte ) -//# 351 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 351 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1393 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 353 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 353 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope (!parseILGlobals).typ_UInt16 ) -//# 353 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 353 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1403 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 355 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 355 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope (!parseILGlobals).typ_UInt32 ) -//# 355 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 355 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1413 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 357 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 357 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope (!parseILGlobals).typ_UInt64 ) -//# 357 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 357 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1423 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 359 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 359 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope (!parseILGlobals).typ_Byte ) -//# 359 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 359 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1433 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 361 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 361 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope (!parseILGlobals).typ_UInt16 ) -//# 361 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 361 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1443 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 363 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 363 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope (!parseILGlobals).typ_UInt32 ) -//# 363 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 363 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1453 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 365 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 365 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope (!parseILGlobals).typ_UInt64 ) -//# 365 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 365 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1463 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 367 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 367 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope (!parseILGlobals).typ_IntPtr ) -//# 367 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 367 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1473 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 369 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 369 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope (!parseILGlobals).typ_UIntPtr ) -//# 369 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 369 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1483 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 371 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 371 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope (!parseILGlobals).typ_UIntPtr ) -//# 371 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 371 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1493 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1496,10 +1496,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 374 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 374 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope (ILType.TypeVar (uint16 ( _2))) ) -//# 374 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 374 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : ILType ResolvedAtMethodSpecScope)); //# 1504 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1507,10 +1507,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 379 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 379 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" [_1] ) -//# 379 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 379 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'bounds1)); //# 1515 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1519,20 +1519,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 381 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 381 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" _1 @ [_3] ) -//# 381 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 381 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'bounds1)); //# 1527 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 385 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 385 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" (None, None) ) -//# 385 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 385 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'bound)); //# 1537 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1540,10 +1540,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 387 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 387 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" (None, Some _1) ) -//# 387 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 387 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'bound)); //# 1548 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1552,10 +1552,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 389 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 389 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" (Some _1, Some (_3 - _1 + 1)) ) -//# 389 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 389 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'bound)); //# 1560 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1563,10 +1563,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 391 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 391 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" (Some _1, None) ) -//# 391 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 391 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'bound)); //# 1571 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1575,10 +1575,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 398 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 398 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" (Some _1, Some (_2 - _1 + 1)) ) -//# 398 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 398 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'bound)); //# 1583 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1586,10 +1586,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 400 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 400 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" (Some _1, None) ) -//# 400 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 400 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'bound)); //# 1594 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1597,10 +1597,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 404 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 404 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" _1 ) -//# 404 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 404 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'id)); //# 1605 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1608,10 +1608,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 406 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 406 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" _1 ) -//# 406 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 406 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'id)); //# 1616 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1619,10 +1619,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 410 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 410 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" int32 _1 ) -//# 410 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 410 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'int32)); //# 1627 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1630,10 +1630,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 414 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 414 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" _1 ) -//# 414 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 414 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'int64)); //# 1638 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1641,10 +1641,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 418 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 418 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" _1 ) -//# 418 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 418 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'float64)); //# 1649 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1652,20 +1652,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 420 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 420 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" System.BitConverter.Int64BitsToDouble _3 ) -//# 420 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 420 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'float64)); //# 1660 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 424 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 424 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" noMethodSpecScope [] ) -//# 424 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 424 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'opt_actual_tyargs)); //# 1670 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1673,11 +1673,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 426 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 426 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" resolveMethodSpecScopeThen _1 (fun res -> noMethodSpecScope res) ) -//# 426 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 426 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'opt_actual_tyargs)); //# 1682 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1685,10 +1685,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 431 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 431 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" _2 ) -//# 431 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 431 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'actual_tyargs)); //# 1693 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1696,11 +1696,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 435 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 435 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" resolveMethodSpecScopeThen _1 (fun res -> noMethodSpecScope [ res]) ) -//# 435 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 435 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'actualTypSpecs)); //# 1705 "ilpars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -1709,12 +1709,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 438 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 438 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" resolveMethodSpecScopeThen _1 (fun x -> resolveMethodSpecScopeThen _3 (fun y -> noMethodSpecScope (x @ [ y]))) ) -//# 438 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\absil\ilpars.fsy" +//# 438 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/absil/ilpars.fsy" : 'actualTypSpecs)); |] //# 1720 "ilpars.fs" diff --git a/src/fcs-fable/codegen/lex.fs b/src/fcs-fable/codegen/lex.fs index 83da12181d..3972ddfd0b 100644 --- a/src/fcs-fable/codegen/lex.fs +++ b/src/fcs-fable/codegen/lex.fs @@ -1,4 +1,4 @@ -//# 3 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 3 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" module internal FSharp.Compiler.Lexer @@ -1677,129 +1677,105 @@ let trans : uint16[] array = let actions : uint16[] = [|65535us; 0us; 1us; 6us; 6us; 4us; 4us; 5us; 4us; 4us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 3us; 65535us; 65535us; 65535us; 65535us; 2us; 1us; 65535us; 4us; 1us; 1us; 1us; 1us; 2us; 4us; 3us; 4us; 4us; 2us; 1us; 1us; 65535us; 65535us; 65535us; 65535us; 1us; 1us; 65535us; 1us; 1us; 65535us; 1us; 1us; 65535us; 1us; 65535us; 0us; 65535us; 1us; 2us; 2us; 2us; 2us; 3us; 5us; 4us; 5us; 5us; 3us; 2us; 2us; 65535us; 65535us; 65535us; 65535us; 2us; 2us; 65535us; 2us; 2us; 65535us; 2us; 2us; 65535us; 2us; 0us; 65535us; 5us; 1us; 1us; 1us; 1us; 2us; 3us; 5us; 4us; 5us; 5us; 3us; 1us; 1us; 65535us; 65535us; 65535us; 65535us; 1us; 1us; 65535us; 1us; 1us; 65535us; 1us; 1us; 65535us; 1us; 0us; 65535us; 1us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 0us; 65535us; 10us; 1us; 10us; 10us; 6us; 10us; 10us; 8us; 8us; 8us; 9us; 10us; 8us; 8us; 8us; 7us; 6us; 5us; 4us; 3us; 65535us; 2us; 65535us; 65535us; 0us; 65535us; 0us; 3us; 1us; 2us; 2us; 2us; 2us; 2us; 2us; 2us; 2us; 0us; 65535us; 6us; 1us; 6us; 2us; 3us; 3us; 4us; 5us; 6us; 6us; 4us; 3us; 65535us; 65535us; 65535us; 65535us; 3us; 3us; 65535us; 3us; 3us; 65535us; 3us; 3us; 65535us; 2us; 1us; 65535us; 0us; 65535us; 1us; 3us; 8us; 4us; 5us; 5us; 6us; 7us; 8us; 8us; 6us; 5us; 65535us; 65535us; 65535us; 65535us; 5us; 5us; 65535us; 5us; 5us; 65535us; 5us; 5us; 65535us; 4us; 3us; 0us; 2us; 65535us; 13us; 6us; 8us; 13us; 9us; 10us; 10us; 11us; 12us; 13us; 13us; 11us; 10us; 65535us; 65535us; 65535us; 65535us; 10us; 10us; 65535us; 10us; 10us; 65535us; 10us; 10us; 65535us; 9us; 8us; 7us; 0us; 65535us; 1us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 5us; 65535us; 65535us; 65535us; 4us; 65535us; 3us; 65535us; 2us; 0us; 65535us; 0us; 2us; 1us; 2us; 2us; 0us; 65535us; 4us; 4us; 4us; 3us; 4us; 4us; 4us; 5us; 4us; 3us; 4us; 4us; 4us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 2us; 65535us; 2us; 2us; 2us; 65535us; 1us; 65535us; 1us; 1us; 1us; 65535us; 0us; 0us; 0us; 4us; 4us; 4us; 4us; 4us; 4us; 2us; 4us; 2us; 2us; 2us; 4us; 1us; 4us; 1us; 1us; 1us; 4us; 0us; 0us; 0us; 65535us; 0us; 0us; 0us; 0us; 0us; 0us; 0us; 14us; 14us; 64us; 65us; 44us; 100us; 109us; 48us; 49us; 107us; 53us; 122us; 105us; 60us; 90us; 61us; 98us; 66us; 67us; 68us; 103us; 70us; 73us; 74us; 91us; 84us; 86us; 87us; 97us; 93us; 99us; 101us; 104us; 108us; 109us; 113us; 122us; 122us; 123us; 110us; 113us; 110us; 109us; 108us; 102us; 107us; 89us; 88us; 92us; 110us; 83us; 110us; 96us; 79us; 75us; 76us; 81us; 82us; 80us; 72us; 107us; 110us; 65535us; 107us; 108us; 109us; 110us; 113us; 111us; 112us; 113us; 65535us; 65535us; 114us; 65535us; 114us; 114us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 114us; 65535us; 114us; 65535us; 114us; 65535us; 65535us; 65535us; 65535us; 112us; 111us; 107us; 110us; 110us; 107us; 108us; 109us; 110us; 110us; 110us; 110us; 110us; 110us; 110us; 110us; 109us; 108us; 107us; 106us; 106us; 106us; 106us; 71us; 69us; 63us; 94us; 95us; 62us; 56us; 85us; 57us; 65535us; 65535us; 65535us; 115us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 120us; 65535us; 120us; 120us; 120us; 65535us; 119us; 65535us; 119us; 119us; 119us; 65535us; 121us; 118us; 118us; 118us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 117us; 116us; 115us; 65535us; 65535us; 65535us; 65535us; 116us; 116us; 116us; 65535us; 65535us; 65535us; 55us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 54us; 53us; 52us; 51us; 52us; 50us; 51us; 50us; 49us; 65535us; 65535us; 65535us; 65535us; 48us; 47us; 58us; 109us; 59us; 78us; 77us; 46us; 65535us; 45us; 42us; 65535us; 65535us; 41us; 38us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 43us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 37us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 36us; 65535us; 65535us; 34us; 65535us; 65535us; 65535us; 65535us; 35us; 33us; 65535us; 65535us; 31us; 32us; 29us; 30us; 7us; 14us; 28us; 16us; 10us; 23us; 15us; 18us; 28us; 20us; 28us; 24us; 27us; 28us; 28us; 23us; 65535us; 23us; 22us; 23us; 28us; 23us; 28us; 22us; 23us; 28us; 24us; 28us; 19us; 13us; 23us; 23us; 28us; 28us; 23us; 28us; 9us; 12us; 17us; 21us; 14us; 28us; 7us; 14us; 28us; 16us; 10us; 15us; 18us; 28us; 20us; 27us; 28us; 28us; 28us; 14us; 8us; 14us; 28us; 11us; 15us; 18us; 26us; 25us; 14us; 28us; 14us; 14us; 28us; 14us; 28us; 14us; 14us; 28us; 14us; 28us; 0us; 5us; 6us; 0us; 0us; 0us; 0us; 2us; 0us; 0us; 0us; 0us; 0us; 3us; 0us; 0us; 0us; 0us; 4us; 0us; 1us; 6us; 65535us; 40us; 0us; 0us; 0us; 0us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 65535us; 39us; |] let _fslex_tables = Internal.Utilities.Text.Lexing.UnicodeTables.Create(trans,actions) let rec _fslex_dummy () = _fslex_dummy() -(* Rule token *) -and inline token args skip (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_token args skip 356 lexbuf -(* Rule ifdefSkip *) -and inline ifdefSkip n m args skip (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_ifdefSkip n m args skip 299 lexbuf -(* Rule endline *) -and inline endline cont args skip (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_endline cont args skip 292 lexbuf -(* Rule string *) -and inline string sargs skip (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_string sargs skip 238 lexbuf -(* Rule verbatimString *) -and inline verbatimString sargs skip (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_verbatimString sargs skip 208 lexbuf -(* Rule tripleQuoteString *) -and inline tripleQuoteString sargs skip (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_tripleQuoteString sargs skip 178 lexbuf -(* Rule singleLineComment *) -and inline singleLineComment cargs skip (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_singleLineComment cargs skip 165 lexbuf -(* Rule comment *) -and inline comment cargs skip (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_comment cargs skip 139 lexbuf -(* Rule stringInComment *) -and inline stringInComment n m args skip (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_stringInComment n m args skip 90 lexbuf -(* Rule verbatimStringInComment *) -and inline verbatimStringInComment n m args skip (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_verbatimStringInComment n m args skip 61 lexbuf -(* Rule tripleQuoteStringInComment *) -and inline tripleQuoteStringInComment n m args skip (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_tripleQuoteStringInComment n m args skip 31 lexbuf -(* Rule mlOnly *) -and inline mlOnly m args skip (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_mlOnly m args skip 0 lexbuf -(* Rule token *) -and _fslex_token args skip _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with +// Rule token +and token args skip lexbuf = + match _fslex_tables.Interpret(356,lexbuf) with | 0 -> ( -//# 243 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 243 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" Keywords.KeywordOrIdentifierToken args lexbuf (lexeme lexbuf) -//# 1710 "lex.fs" +//# 1686 "lex.fs" ) | 1 -> ( -//# 245 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 245 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" DO_BANG -//# 1715 "lex.fs" +//# 1691 "lex.fs" ) | 2 -> ( -//# 247 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 247 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" YIELD_BANG(true) -//# 1720 "lex.fs" +//# 1696 "lex.fs" ) | 3 -> ( -//# 249 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 249 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" YIELD_BANG(false) -//# 1725 "lex.fs" +//# 1701 "lex.fs" ) | 4 -> ( -//# 251 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 251 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" MATCH_BANG -//# 1730 "lex.fs" +//# 1706 "lex.fs" ) | 5 -> ( -//# 253 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 253 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let tok = Keywords.KeywordOrIdentifierToken args lexbuf (lexemeTrimRight lexbuf 1) match tok with | LET _ -> BINDER (lexemeTrimRight lexbuf 1) | _ -> fail args lexbuf (FSComp.SR.lexIdentEndInMarkReserved("!")) (Keywords.KeywordOrIdentifierToken args lexbuf (lexeme lexbuf)) -//# 1738 "lex.fs" +//# 1714 "lex.fs" ) | 6 -> ( -//# 258 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 258 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" fail args lexbuf (FSComp.SR.lexIdentEndInMarkReserved("#")) (Keywords.KeywordOrIdentifierToken args lexbuf (lexeme lexbuf)) -//# 1743 "lex.fs" +//# 1719 "lex.fs" ) | 7 -> ( -//# 260 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 260 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let n = lexemeTrimRightToInt32 args lexbuf 1 if n > 0x80 || n < -0x80 then fail args lexbuf (FSComp.SR.lexOutsideEightBitSigned()) (INT8(0y,false)) // Allow to parse as min_int. Allowed only because we parse '-' as an operator. else if n = 0x80 then INT8(sbyte(-0x80), true (* 'true' = 'bad'*) ) else INT8(sbyte n,false) -//# 1752 "lex.fs" +//# 1728 "lex.fs" ) | 8 -> ( -//# 266 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 266 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let n = lexemeTrimRightToInt32 args lexbuf 1 if n > 0xFF || n < 0 then fail args lexbuf (FSComp.SR.lexOutsideEightBitSignedHex()) (INT8(0y,false)) else INT8(sbyte(byte(n)),false) -//# 1759 "lex.fs" +//# 1735 "lex.fs" ) | 9 -> ( -//# 270 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 270 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let n = lexemeTrimRightToInt32 args lexbuf 2 if n > 0xFF || n < 0 then fail args lexbuf (FSComp.SR.lexOutsideEightBitUnsigned()) (UINT8(0uy)) else UINT8(byte n) -//# 1766 "lex.fs" +//# 1742 "lex.fs" ) | 10 -> ( -//# 274 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 274 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let n = lexemeTrimRightToInt32 args lexbuf 1 if n > 0x8000 || n < -0x8000 then fail args lexbuf (FSComp.SR.lexOutsideSixteenBitSigned()) (INT16(0s,false)) // Allow to parse as min_int. Allowed only because we parse '-' as an operator. else if n = 0x8000 then INT16(-0x8000s,true) else INT16(int16 n,false) -//# 1775 "lex.fs" +//# 1751 "lex.fs" ) | 11 -> ( -//# 280 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 280 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let n = lexemeTrimRightToInt32 args lexbuf 1 if n > 0xFFFF || n < 0 then fail args lexbuf (FSComp.SR.lexOutsideSixteenBitSigned()) (INT16(0s,false)) else INT16(int16(uint16(n)),false) -//# 1782 "lex.fs" +//# 1758 "lex.fs" ) | 12 -> ( -//# 284 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 284 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let n = lexemeTrimRightToInt32 args lexbuf 2 if n > 0xFFFF || n < 0 then fail args lexbuf (FSComp.SR.lexOutsideSixteenBitUnsigned()) (UINT16(0us)) else UINT16(uint16 n) -//# 1789 "lex.fs" +//# 1765 "lex.fs" ) | 13 -> ( -//# 288 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 288 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let s = removeUnderscores (lexemeTrimRight lexbuf 2) // Allow to parse as min_int. Allowed only because we parse '-' as an operator. if s = "2147483648" then INT32_DOT_DOT(-2147483648,true) else let n = try int32 s with _ -> fail args lexbuf (FSComp.SR.lexOutsideThirtyTwoBitSigned()) 0 INT32_DOT_DOT(n,false) -//# 1799 "lex.fs" +//# 1775 "lex.fs" ) | 14 -> ( -//# 296 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 296 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let s = removeUnderscores (lexeme lexbuf) // Allow to parse as min_int. Allowed only because we parse '-' as an operator. if s = "2147483648" then INT32(-2147483648,true) else @@ -1807,10 +1783,10 @@ and _fslex_token args skip _fslex_state lexbuf = try int32 s with _ -> fail args lexbuf (FSComp.SR.lexOutsideThirtyTwoBitSigned()) 0 INT32(n,false) -//# 1810 "lex.fs" +//# 1786 "lex.fs" ) | 15 -> ( -//# 305 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 305 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let s = removeUnderscores (lexemeTrimRight lexbuf 1) // Allow to parse as min_int. Allowed only because we parse '-' as an operator. if s = "2147483648" then INT32(-2147483648,true) else @@ -1818,30 +1794,30 @@ and _fslex_token args skip _fslex_state lexbuf = try int32 s with _ -> fail args lexbuf (FSComp.SR.lexOutsideThirtyTwoBitSigned()) 0 INT32(n,false) -//# 1821 "lex.fs" +//# 1797 "lex.fs" ) | 16 -> ( -//# 314 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 314 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let s = removeUnderscores (lexemeTrimRight lexbuf 1) let n = try int64 s with _ -> fail args lexbuf (FSComp.SR.lexOutsideThirtyTwoBitUnsigned()) 0L if n > 0xFFFFFFFFL || n < 0L then fail args lexbuf (FSComp.SR.lexOutsideThirtyTwoBitUnsigned()) (UINT32(0u)) else UINT32(uint32 (uint64 n)) -//# 1831 "lex.fs" +//# 1807 "lex.fs" ) | 17 -> ( -//# 322 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 322 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let s = removeUnderscores (lexemeTrimRight lexbuf 2) let n = try int64 s with _ -> fail args lexbuf (FSComp.SR.lexOutsideThirtyTwoBitUnsigned()) 0L if n > 0xFFFFFFFFL || n < 0L then fail args lexbuf (FSComp.SR.lexOutsideThirtyTwoBitUnsigned()) (UINT32(0u)) else UINT32(uint32 (uint64 n)) -//# 1841 "lex.fs" +//# 1817 "lex.fs" ) | 18 -> ( -//# 330 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 330 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let s = removeUnderscores (lexemeTrimRight lexbuf 1) // Allow to parse as min_int. Stupid but allowed because we parse '-' as an operator. if s = "9223372036854775808" then INT64(-9223372036854775808L,true) else @@ -1849,42 +1825,42 @@ and _fslex_token args skip _fslex_state lexbuf = try int64 s with _ -> fail args lexbuf (FSComp.SR.lexOutsideSixtyFourBitSigned()) 0L INT64(n,false) -//# 1852 "lex.fs" +//# 1828 "lex.fs" ) | 19 -> ( -//# 339 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 339 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let s = removeUnderscores (lexemeTrimRight lexbuf 2) let n = try uint64 s with _ -> fail args lexbuf (FSComp.SR.lexOutsideSixtyFourBitUnsigned()) 0UL UINT64(n) -//# 1860 "lex.fs" +//# 1836 "lex.fs" ) | 20 -> ( -//# 345 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 345 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" try NATIVEINT(int64 (removeUnderscores (lexemeTrimRight lexbuf 1))) with _ -> fail args lexbuf (FSComp.SR.lexOutsideNativeSigned()) (NATIVEINT(0L)) -//# 1867 "lex.fs" +//# 1843 "lex.fs" ) | 21 -> ( -//# 350 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 350 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" try UNATIVEINT(uint64 (removeUnderscores (lexemeTrimRight lexbuf 2))) with _ -> fail args lexbuf (FSComp.SR.lexOutsideNativeUnsigned()) (UNATIVEINT(0UL)) -//# 1874 "lex.fs" +//# 1850 "lex.fs" ) | 22 -> ( -//# 355 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 355 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" IEEE32 (try float32(removeUnderscores (lexemeTrimRight lexbuf 1)) with _ -> fail args lexbuf (FSComp.SR.lexInvalidFloat()) 0.0f) -//# 1879 "lex.fs" +//# 1855 "lex.fs" ) | 23 -> ( -//# 357 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 357 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" IEEE64 (try float(lexeme lexbuf) with _ -> fail args lexbuf (FSComp.SR.lexInvalidFloat()) 0.0) -//# 1884 "lex.fs" +//# 1860 "lex.fs" ) | 24 -> ( -//# 360 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 360 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" try let s = removeUnderscores (lexemeTrimRight lexbuf 1) // This implements a range check for decimal literals @@ -1893,10 +1869,10 @@ and _fslex_token args skip _fslex_state lexbuf = with e -> fail args lexbuf (FSComp.SR.lexOusideDecimal()) (DECIMAL (decimal 0)) -//# 1900 "lex.fs" +//# 1872 "lex.fs" ) | 25 -> ( -//# 373 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 369 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" #if FABLE_COMPILER fail args lexbuf (FSComp.SR.lexInvalidFloat()) (IEEE32 0.0f) @@ -1908,10 +1884,10 @@ and _fslex_token args skip _fslex_state lexbuf = IEEE32 (System.BitConverter.ToSingle(System.BitConverter.GetBytes(int32 (uint32 (uint64 n64))),0)) #endif -//# 1915 "lex.fs" +//# 1887 "lex.fs" ) | 26 -> ( -//# 385 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 381 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" #if FABLE_COMPILER fail args lexbuf (FSComp.SR.lexInvalidFloat()) (IEEE64 0.0) @@ -1920,37 +1896,37 @@ and _fslex_token args skip _fslex_state lexbuf = IEEE64 (System.BitConverter.Int64BitsToDouble(n64)) #endif -//# 1927 "lex.fs" +//# 1899 "lex.fs" ) | 27 -> ( -//# 395 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 391 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let s = lexeme lexbuf BIGNUM (removeUnderscores (lexemeTrimRight lexbuf 1), s.[s.Length-1..s.Length-1]) -//# 1933 "lex.fs" +//# 1905 "lex.fs" ) | 28 -> ( -//# 399 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 395 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" fail args lexbuf (FSComp.SR.lexInvalidNumericLiteral()) (INT32(0,false)) -//# 1938 "lex.fs" +//# 1910 "lex.fs" ) | 29 -> ( -//# 402 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 398 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let s = lexeme lexbuf CHAR (if s.[1] = '\\' then escape s.[2] else s.[1]) -//# 1944 "lex.fs" +//# 1916 "lex.fs" ) | 30 -> ( -//# 406 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 402 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let s = lexeme lexbuf let x = int32 (if s.[1] = '\\' then escape s.[2] else s.[1]) if x < 0 || x > 127 then fail args lexbuf (FSComp.SR.lexInvalidByteLiteral()) (UINT8(byte 0)) else UINT8 (byte(x)) -//# 1954 "lex.fs" +//# 1926 "lex.fs" ) | 31 -> ( -//# 414 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 410 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let s = lexeme lexbuf let c = trigraph s.[2] s.[3] s.[4] let x = int32 c @@ -1958,151 +1934,151 @@ and _fslex_token args skip _fslex_state lexbuf = fail args lexbuf (FSComp.SR.lexInvalidCharLiteral()) (CHAR c) else CHAR c -//# 1965 "lex.fs" +//# 1937 "lex.fs" ) | 32 -> ( -//# 423 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 419 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let s = lexeme lexbuf let x = int32 (trigraph s.[2] s.[3] s.[4]) if x < 0 || x > 255 then fail args lexbuf (FSComp.SR.lexInvalidByteLiteral()) (UINT8(byte 0)) else UINT8 (byte(x)) -//# 1975 "lex.fs" +//# 1947 "lex.fs" ) | 33 -> ( -//# 431 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 427 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let x = int32 (unicodeGraphShort (lexemeTrimBoth lexbuf 3 2)) if x < 0 || x > 127 then fail args lexbuf (FSComp.SR.lexInvalidByteLiteral()) (UINT8(byte 0)) else UINT8 (byte(x)) -//# 1984 "lex.fs" +//# 1956 "lex.fs" ) | 34 -> ( -//# 437 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 433 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" CHAR (char (int32 (hexGraphShort (lexemeTrimBoth lexbuf 3 1)))) -//# 1989 "lex.fs" +//# 1961 "lex.fs" ) | 35 -> ( -//# 438 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 434 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" CHAR (char (int32 (unicodeGraphShort (lexemeTrimBoth lexbuf 3 1)))) -//# 1994 "lex.fs" +//# 1966 "lex.fs" ) | 36 -> ( -//# 440 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 436 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" match unicodeGraphLong (lexemeTrimBoth lexbuf 3 1) with | SingleChar(c) -> CHAR (char c) | _ -> fail args lexbuf (FSComp.SR.lexThisUnicodeOnlyInStringLiterals()) (CHAR (char 0)) -//# 2001 "lex.fs" +//# 1973 "lex.fs" ) | 37 -> ( -//# 444 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 440 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" if not skip then (COMMENT (LexCont.Token !args.ifdefStack)) else token args skip lexbuf -//# 2006 "lex.fs" +//# 1978 "lex.fs" ) | 38 -> ( -//# 446 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 442 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" if not skip then (COMMENT (LexCont.Token !args.ifdefStack)) else token args skip lexbuf -//# 2011 "lex.fs" +//# 1983 "lex.fs" ) | 39 -> ( -//# 448 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 444 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" if not skip then (COMMENT (LexCont.Token !args.ifdefStack)) else token args skip lexbuf -//# 2016 "lex.fs" +//# 1988 "lex.fs" ) | 40 -> ( -//# 450 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 446 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" if not skip then (COMMENT (LexCont.Token !args.ifdefStack)) else token args skip lexbuf -//# 2021 "lex.fs" +//# 1993 "lex.fs" ) | 41 -> ( -//# 453 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 449 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" LPAREN_STAR_RPAREN -//# 2026 "lex.fs" +//# 1998 "lex.fs" ) | 42 -> ( -//# 456 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 452 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let m = lexbuf.LexemeRange if not skip then (COMMENT (LexCont.Comment(!args.ifdefStack,1,m))) else comment (1,m,args) skip lexbuf -//# 2032 "lex.fs" +//# 2004 "lex.fs" ) | 43 -> ( -//# 460 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 456 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let m = lexbuf.LexemeRange if not skip then (COMMENT (LexCont.MLOnly(!args.ifdefStack,m))) else mlOnly m args skip lexbuf -//# 2038 "lex.fs" +//# 2010 "lex.fs" ) | 44 -> ( -//# 464 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 460 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let buf,fin,m = startString args lexbuf if not skip then (STRING_TEXT (LexCont.String(!args.ifdefStack,m))) else string (buf,fin,m,args) skip lexbuf -//# 2044 "lex.fs" +//# 2016 "lex.fs" ) | 45 -> ( -//# 468 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 464 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let buf,fin,m = startString args lexbuf if not skip then (STRING_TEXT (LexCont.TripleQuoteString(!args.ifdefStack,m))) else tripleQuoteString (buf,fin,m,args) skip lexbuf -//# 2050 "lex.fs" +//# 2022 "lex.fs" ) | 46 -> ( -//# 472 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 468 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" fail args lexbuf (FSComp.SR.lexTokenReserved()) (WHITESPACE (LexCont.Token !args.ifdefStack)) -//# 2055 "lex.fs" +//# 2027 "lex.fs" ) | 47 -> ( -//# 475 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 471 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let buf,fin,m = startString args lexbuf if not skip then (STRING_TEXT (LexCont.VerbatimString(!args.ifdefStack,m))) else verbatimString (buf,fin,m,args) skip lexbuf -//# 2061 "lex.fs" +//# 2033 "lex.fs" ) | 48 -> ( -//# 479 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 475 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" if skip then token args skip lexbuf else WHITESPACE (LexCont.Token !args.ifdefStack) -//# 2067 "lex.fs" +//# 2039 "lex.fs" ) | 49 -> ( -//# 483 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 479 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" if args.lightSyntaxStatus.Status then errorR(Error(FSComp.SR.lexTabsNotAllowed(),lexbuf.LexemeRange)) if not skip then (WHITESPACE (LexCont.Token !args.ifdefStack)) else token args skip lexbuf -//# 2073 "lex.fs" +//# 2045 "lex.fs" ) | 50 -> ( -//# 487 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 483 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" // 4+ slash are 1-line comments, online 3 slash are XmlDoc let m = lexbuf.LexemeRange if not skip then (LINE_COMMENT (LexCont.SingleLineComment(!args.ifdefStack,1,m))) else singleLineComment (None,1,m,args) skip lexbuf -//# 2080 "lex.fs" +//# 2052 "lex.fs" ) | 51 -> ( -//# 492 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 488 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" // Match exactly 3 slash, 4+ slash caught by preceding rule let m = lexbuf.LexemeRange let doc = lexemeTrimLeft lexbuf 3 let sb = (new StringBuilder(100)).Append(doc) if not skip then (LINE_COMMENT (LexCont.SingleLineComment(!args.ifdefStack,1,m))) else singleLineComment (Some sb,1,m,args) skip lexbuf -//# 2089 "lex.fs" +//# 2061 "lex.fs" ) | 52 -> ( -//# 499 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 495 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" // Need to read all operator symbols too, otherwise it might be parsed by a rule below let m = lexbuf.LexemeRange if not skip then (LINE_COMMENT (LexCont.SingleLineComment(!args.ifdefStack,1,m))) else singleLineComment (None,1,m,args) skip lexbuf -//# 2096 "lex.fs" +//# 2068 "lex.fs" ) | 53 -> ( -//# 504 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 500 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" newline lexbuf; if not skip then (WHITESPACE (LexCont.Token !args.ifdefStack)) else token args skip lexbuf -//# 2101 "lex.fs" +//# 2073 "lex.fs" ) | 54 -> ( -//# 507 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 503 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" Keywords.IdentifierToken args lexbuf (lexemeTrimBoth lexbuf 2 2) -//# 2106 "lex.fs" +//# 2078 "lex.fs" ) | 55 -> ( -//# 510 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 506 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let pos = lexbuf.EndPos if skip then let s = lexeme lexbuf @@ -2143,329 +2119,329 @@ and _fslex_token args skip _fslex_state lexbuf = token args skip lexbuf else if not skip then (HASH_LINE (LexCont.Token !args.ifdefStack)) else token args skip lexbuf -//# 2150 "lex.fs" +//# 2122 "lex.fs" ) | 56 -> ( -//# 554 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 550 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" checkExprOp lexbuf; LQUOTE ("<@ @>", false) -//# 2155 "lex.fs" +//# 2127 "lex.fs" ) | 57 -> ( -//# 555 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 551 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" checkExprOp lexbuf; LQUOTE ("<@@ @@>", true) -//# 2160 "lex.fs" +//# 2132 "lex.fs" ) | 58 -> ( -//# 556 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 552 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" checkExprOp lexbuf; RQUOTE ("<@ @>", false) -//# 2165 "lex.fs" +//# 2137 "lex.fs" ) | 59 -> ( -//# 557 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 553 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" checkExprOp lexbuf; RQUOTE ("<@@ @@>", true) -//# 2170 "lex.fs" +//# 2142 "lex.fs" ) | 60 -> ( -//# 558 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 554 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" HASH -//# 2175 "lex.fs" +//# 2147 "lex.fs" ) | 61 -> ( -//# 559 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 555 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" AMP -//# 2180 "lex.fs" +//# 2152 "lex.fs" ) | 62 -> ( -//# 560 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 556 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" AMP_AMP -//# 2185 "lex.fs" +//# 2157 "lex.fs" ) | 63 -> ( -//# 561 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 557 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" BAR_BAR -//# 2190 "lex.fs" +//# 2162 "lex.fs" ) | 64 -> ( -//# 562 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 558 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" QUOTE -//# 2195 "lex.fs" +//# 2167 "lex.fs" ) | 65 -> ( -//# 563 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 559 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" LPAREN -//# 2200 "lex.fs" +//# 2172 "lex.fs" ) | 66 -> ( -//# 564 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 560 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" RPAREN -//# 2205 "lex.fs" +//# 2177 "lex.fs" ) | 67 -> ( -//# 565 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 561 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" STAR -//# 2210 "lex.fs" +//# 2182 "lex.fs" ) | 68 -> ( -//# 566 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 562 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" COMMA -//# 2215 "lex.fs" +//# 2187 "lex.fs" ) | 69 -> ( -//# 567 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 563 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" RARROW -//# 2220 "lex.fs" +//# 2192 "lex.fs" ) | 70 -> ( -//# 568 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 564 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" QMARK -//# 2225 "lex.fs" +//# 2197 "lex.fs" ) | 71 -> ( -//# 569 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 565 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" QMARK_QMARK -//# 2230 "lex.fs" +//# 2202 "lex.fs" ) | 72 -> ( -//# 570 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 566 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" DOT_DOT -//# 2235 "lex.fs" +//# 2207 "lex.fs" ) | 73 -> ( -//# 571 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 567 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" DOT -//# 2240 "lex.fs" +//# 2212 "lex.fs" ) | 74 -> ( -//# 572 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 568 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" COLON -//# 2245 "lex.fs" +//# 2217 "lex.fs" ) | 75 -> ( -//# 573 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 569 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" COLON_COLON -//# 2250 "lex.fs" +//# 2222 "lex.fs" ) | 76 -> ( -//# 574 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 570 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" COLON_GREATER -//# 2255 "lex.fs" +//# 2227 "lex.fs" ) | 77 -> ( -//# 575 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 571 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" RQUOTE_DOT ("<@ @>",false) -//# 2260 "lex.fs" +//# 2232 "lex.fs" ) | 78 -> ( -//# 576 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 572 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" RQUOTE_DOT ("<@@ @@>",true) -//# 2265 "lex.fs" +//# 2237 "lex.fs" ) | 79 -> ( -//# 577 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 573 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" GREATER_BAR_RBRACK -//# 2270 "lex.fs" +//# 2242 "lex.fs" ) | 80 -> ( -//# 578 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 574 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" COLON_QMARK_GREATER -//# 2275 "lex.fs" +//# 2247 "lex.fs" ) | 81 -> ( -//# 579 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 575 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" COLON_QMARK -//# 2280 "lex.fs" +//# 2252 "lex.fs" ) | 82 -> ( -//# 580 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 576 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" COLON_EQUALS -//# 2285 "lex.fs" +//# 2257 "lex.fs" ) | 83 -> ( -//# 581 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 577 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" SEMICOLON_SEMICOLON -//# 2290 "lex.fs" +//# 2262 "lex.fs" ) | 84 -> ( -//# 582 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 578 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" SEMICOLON -//# 2295 "lex.fs" +//# 2267 "lex.fs" ) | 85 -> ( -//# 583 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 579 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" LARROW -//# 2300 "lex.fs" +//# 2272 "lex.fs" ) | 86 -> ( -//# 584 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 580 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" EQUALS -//# 2305 "lex.fs" +//# 2277 "lex.fs" ) | 87 -> ( -//# 585 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 581 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" LBRACK -//# 2310 "lex.fs" +//# 2282 "lex.fs" ) | 88 -> ( -//# 586 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 582 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" LBRACK_BAR -//# 2315 "lex.fs" +//# 2287 "lex.fs" ) | 89 -> ( -//# 587 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 583 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" LBRACE_BAR -//# 2320 "lex.fs" +//# 2292 "lex.fs" ) | 90 -> ( -//# 588 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 584 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" LESS false -//# 2325 "lex.fs" +//# 2297 "lex.fs" ) | 91 -> ( -//# 589 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 585 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" GREATER false -//# 2330 "lex.fs" +//# 2302 "lex.fs" ) | 92 -> ( -//# 590 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 586 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" LBRACK_LESS -//# 2335 "lex.fs" +//# 2307 "lex.fs" ) | 93 -> ( -//# 591 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 587 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" RBRACK -//# 2340 "lex.fs" +//# 2312 "lex.fs" ) | 94 -> ( -//# 592 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 588 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" BAR_RBRACK -//# 2345 "lex.fs" +//# 2317 "lex.fs" ) | 95 -> ( -//# 593 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 589 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" BAR_RBRACE -//# 2350 "lex.fs" +//# 2322 "lex.fs" ) | 96 -> ( -//# 594 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 590 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" GREATER_RBRACK -//# 2355 "lex.fs" +//# 2327 "lex.fs" ) | 97 -> ( -//# 595 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 591 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" LBRACE -//# 2360 "lex.fs" +//# 2332 "lex.fs" ) | 98 -> ( -//# 596 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 592 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" BAR -//# 2365 "lex.fs" +//# 2337 "lex.fs" ) | 99 -> ( -//# 597 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 593 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" RBRACE -//# 2370 "lex.fs" +//# 2342 "lex.fs" ) | 100 -> ( -//# 598 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 594 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" DOLLAR -//# 2375 "lex.fs" +//# 2347 "lex.fs" ) | 101 -> ( -//# 599 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 595 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" PERCENT_OP("%") -//# 2380 "lex.fs" +//# 2352 "lex.fs" ) | 102 -> ( -//# 600 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 596 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" PERCENT_OP("%%") -//# 2385 "lex.fs" +//# 2357 "lex.fs" ) | 103 -> ( -//# 601 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 597 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" MINUS -//# 2390 "lex.fs" +//# 2362 "lex.fs" ) | 104 -> ( -//# 602 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 598 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" RESERVED -//# 2395 "lex.fs" +//# 2367 "lex.fs" ) | 105 -> ( -//# 603 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 599 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" RESERVED -//# 2400 "lex.fs" +//# 2372 "lex.fs" ) | 106 -> ( -//# 604 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 600 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" checkExprOp lexbuf; INFIX_STAR_STAR_OP(lexeme lexbuf) -//# 2405 "lex.fs" +//# 2377 "lex.fs" ) | 107 -> ( -//# 605 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 601 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" checkExprOp lexbuf; INFIX_STAR_DIV_MOD_OP(lexeme lexbuf) -//# 2410 "lex.fs" +//# 2382 "lex.fs" ) | 108 -> ( -//# 606 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 602 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" checkExprOp lexbuf; PLUS_MINUS_OP(lexeme lexbuf) -//# 2415 "lex.fs" +//# 2387 "lex.fs" ) | 109 -> ( -//# 607 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 603 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" checkExprOp lexbuf; INFIX_AT_HAT_OP(lexeme lexbuf) -//# 2420 "lex.fs" +//# 2392 "lex.fs" ) | 110 -> ( -//# 608 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 604 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" checkExprOp lexbuf; INFIX_COMPARE_OP(lexeme lexbuf) -//# 2425 "lex.fs" +//# 2397 "lex.fs" ) | 111 -> ( -//# 609 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 605 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" checkExprOp lexbuf; INFIX_AMP_OP(lexeme lexbuf) -//# 2430 "lex.fs" +//# 2402 "lex.fs" ) | 112 -> ( -//# 610 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 606 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" checkExprOp lexbuf; INFIX_BAR_OP(lexeme lexbuf) -//# 2435 "lex.fs" +//# 2407 "lex.fs" ) | 113 -> ( -//# 611 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 607 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" checkExprOp lexbuf; PREFIX_OP(lexeme lexbuf) -//# 2440 "lex.fs" +//# 2412 "lex.fs" ) | 114 -> ( -//# 613 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 609 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" FUNKY_OPERATOR_NAME(lexeme lexbuf) -//# 2445 "lex.fs" +//# 2417 "lex.fs" ) | 115 -> ( -//# 615 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 611 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" // Treat shebangs like regular comments, but they are only allowed at the start of a file let m = lexbuf.LexemeRange let tok = shouldStartFile args lexbuf m (0,FSComp.SR.lexHashBangMustBeFirstInFile()) (LINE_COMMENT (LexCont.SingleLineComment(!args.ifdefStack,1,m))) if not skip then tok else singleLineComment (None,1,m,args) skip lexbuf -//# 2453 "lex.fs" +//# 2425 "lex.fs" ) | 116 -> ( -//# 622 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 618 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" if args.lightSyntaxStatus.ExplicitlySet && args.lightSyntaxStatus.WarnOnMultipleTokens then warning(Error((0,"#light should only occur as the first non-comment text in an F# source file"),lexbuf.LexemeRange)) // TODO unreachable error above, I think? - brianmcn args.lightSyntaxStatus.Status <- true if not skip then (HASH_LIGHT (LexCont.Token !args.ifdefStack)) else token args skip lexbuf -//# 2462 "lex.fs" +//# 2434 "lex.fs" ) | 117 -> ( -//# 629 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 625 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" args.lightSyntaxStatus.Status <- false mlCompatWarning (FSComp.SR.lexIndentOffForML()) lexbuf.LexemeRange if not skip then (HASH_LIGHT (LexCont.Token !args.ifdefStack)) else token args skip lexbuf -//# 2469 "lex.fs" +//# 2441 "lex.fs" ) | 118 -> ( -//# 634 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 630 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let m = lexbuf.LexemeRange let lookup id = List.contains id args.defines let lexed = lexeme lexbuf @@ -2478,10 +2454,10 @@ and _fslex_token args skip _fslex_state lexbuf = else (LexCont.EndLine(LexerEndlineContinuation.Skip(!args.ifdefStack,0,m)), endline (LexerEndlineContinuation.Skip(!args.ifdefStack,0,m)) args skip) ) let tok = shouldStartLine args lexbuf m (FSComp.SR.lexHashIfMustBeFirst()) (HASH_IF(m,lexed,cont)) if not skip then tok else f lexbuf -//# 2485 "lex.fs" +//# 2457 "lex.fs" ) | 119 -> ( -//# 648 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 644 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let lexed = (lexeme lexbuf) match !(args.ifdefStack) with | [] -> LEX_FAILURE (FSComp.SR.lexHashElseNoMatchingIf()) @@ -2492,10 +2468,10 @@ and _fslex_token args skip _fslex_state lexbuf = let tok = HASH_ELSE(m,lexed, LexCont.EndLine(LexerEndlineContinuation.Skip(!args.ifdefStack,0,m))) let tok = shouldStartLine args lexbuf m (FSComp.SR.lexHashElseMustBeFirst()) tok if not skip then tok else endline (LexerEndlineContinuation.Skip(!args.ifdefStack,0,m)) args skip lexbuf -//# 2499 "lex.fs" +//# 2471 "lex.fs" ) | 120 -> ( -//# 660 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 656 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let lexed = (lexeme lexbuf) let m = lexbuf.LexemeRange match !(args.ifdefStack) with @@ -2505,30 +2481,30 @@ and _fslex_token args skip _fslex_state lexbuf = let tok = HASH_ENDIF(m,lexed,LexCont.EndLine(LexerEndlineContinuation.Token(!args.ifdefStack))) let tok = shouldStartLine args lexbuf m (FSComp.SR.lexHashEndifMustBeFirst()) tok if not skip then tok else endline (LexerEndlineContinuation.Token(!args.ifdefStack)) args skip lexbuf -//# 2512 "lex.fs" +//# 2484 "lex.fs" ) | 121 -> ( -//# 671 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 667 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let tok = fail args lexbuf (FSComp.SR.lexHashIfMustHaveIdent()) (WHITESPACE (LexCont.Token !args.ifdefStack)) if not skip then tok else token args skip lexbuf -//# 2518 "lex.fs" +//# 2490 "lex.fs" ) | 122 -> ( -//# 676 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 672 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" unexpectedChar lexbuf -//# 2523 "lex.fs" +//# 2495 "lex.fs" ) | 123 -> ( -//# 678 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 674 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" EOF (LexCont.Token !args.ifdefStack) -//# 2528 "lex.fs" +//# 2500 "lex.fs" ) | _ -> failwith "token" -(* Rule ifdefSkip *) -and _fslex_ifdefSkip n m args skip _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with +// Rule ifdefSkip +and ifdefSkip n m args skip lexbuf = + match _fslex_tables.Interpret(299,lexbuf) with | 0 -> ( -//# 684 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 680 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let m = lexbuf.LexemeRange // If #if is the first thing on the line then increase depth, otherwise skip, because it is invalid (e.g. "(**) #if ...") @@ -2537,10 +2513,10 @@ and _fslex_ifdefSkip n m args skip _fslex_state lexbuf = else let tok = INACTIVECODE(LexCont.EndLine(LexerEndlineContinuation.Skip(!args.ifdefStack,n+1,m))) if not skip then tok else endline (LexerEndlineContinuation.Skip(!args.ifdefStack,n+1,m)) args skip lexbuf -//# 2544 "lex.fs" +//# 2516 "lex.fs" ) | 1 -> ( -//# 694 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 690 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let lexed = (lexeme lexbuf) let m = lexbuf.LexemeRange @@ -2557,10 +2533,10 @@ and _fslex_ifdefSkip n m args skip _fslex_state lexbuf = if not skip then (HASH_ELSE(m,lexed,LexCont.EndLine(LexerEndlineContinuation.Token(!args.ifdefStack)))) else endline (LexerEndlineContinuation.Token(!args.ifdefStack)) args skip lexbuf else if not skip then (INACTIVECODE(LexCont.EndLine(LexerEndlineContinuation.Skip(!args.ifdefStack,n,m)))) else endline (LexerEndlineContinuation.Skip(!args.ifdefStack,n,m)) args skip lexbuf -//# 2564 "lex.fs" +//# 2536 "lex.fs" ) | 2 -> ( -//# 712 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 708 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let lexed = lexeme lexbuf let m = lexbuf.LexemeRange @@ -2577,93 +2553,93 @@ and _fslex_ifdefSkip n m args skip _fslex_state lexbuf = let tok = INACTIVECODE(LexCont.EndLine(LexerEndlineContinuation.Skip(!args.ifdefStack,n-1,m))) let tok = shouldStartLine args lexbuf m (FSComp.SR.lexWrongNestedHashEndif()) tok if not skip then tok else endline (LexerEndlineContinuation.Skip(!args.ifdefStack,(n-1),m)) args skip lexbuf -//# 2584 "lex.fs" +//# 2556 "lex.fs" ) | 3 -> ( -//# 730 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 726 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" newline lexbuf; ifdefSkip n m args skip lexbuf -//# 2589 "lex.fs" +//# 2561 "lex.fs" ) | 4 -> ( -//# 736 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 732 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" // This tries to be nice and get tokens as 'words' because VS uses this when selecting stuff if not skip then (INACTIVECODE (LexCont.IfDefSkip(!args.ifdefStack,n,m))) else ifdefSkip n m args skip lexbuf -//# 2595 "lex.fs" +//# 2567 "lex.fs" ) | 5 -> ( -//# 739 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 735 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" EOF (LexCont.IfDefSkip(!args.ifdefStack,n,m)) -//# 2600 "lex.fs" +//# 2572 "lex.fs" ) | _ -> failwith "ifdefSkip" -(* Rule endline *) -and _fslex_endline cont args skip _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with +// Rule endline +and endline cont args skip lexbuf = + match _fslex_tables.Interpret(292,lexbuf) with | 0 -> ( -//# 745 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 741 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" newline lexbuf match cont with | LexerEndlineContinuation.Token(ifdefStack) -> if not skip then (WHITESPACE(LexCont.Token ifdefStack)) else token args skip lexbuf | LexerEndlineContinuation.Skip(ifdefStack, n, m) -> if not skip then (INACTIVECODE (LexCont.IfDefSkip(ifdefStack,n,m))) else ifdefSkip n m args skip lexbuf -//# 2613 "lex.fs" +//# 2585 "lex.fs" ) | 1 -> ( -//# 751 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 747 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" match cont with | LexerEndlineContinuation.Token(ifdefStack) -> (EOF(LexCont.Token ifdefStack)) | LexerEndlineContinuation.Skip(ifdefStack, n, m) -> (EOF(LexCont.IfDefSkip(ifdefStack,n,m))) -//# 2621 "lex.fs" +//# 2593 "lex.fs" ) | 2 -> ( -//# 757 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 753 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let tok = fail args lexbuf (FSComp.SR.pplexExpectedSingleLineComment()) (WHITESPACE (LexCont.Token !args.ifdefStack)) if not skip then tok else token args skip lexbuf -//# 2627 "lex.fs" +//# 2599 "lex.fs" ) | _ -> failwith "endline" -(* Rule string *) -and _fslex_string sargs skip _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with +// Rule string +and string sargs skip lexbuf = + match _fslex_tables.Interpret(238,lexbuf) with | 0 -> ( -//# 762 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 758 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (_buf,_fin,m,args) = sargs newline lexbuf if not skip then (STRING_TEXT (LexCont.String(!args.ifdefStack,m))) else string sargs skip lexbuf -//# 2638 "lex.fs" +//# 2610 "lex.fs" ) | 1 -> ( -//# 767 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 763 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,_fin,m,args) = sargs addByteChar buf (escape (lexeme lexbuf).[1]) if not skip then (STRING_TEXT (LexCont.String(!args.ifdefStack,m))) else string sargs skip lexbuf -//# 2645 "lex.fs" +//# 2617 "lex.fs" ) | 2 -> ( -//# 772 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 768 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,_fin,m,args) = sargs let s = lexeme lexbuf addByteChar buf (trigraph s.[1] s.[2] s.[3]) if not skip then (STRING_TEXT (LexCont.String(!args.ifdefStack,m))) else string sargs skip lexbuf -//# 2653 "lex.fs" +//# 2625 "lex.fs" ) | 3 -> ( -//# 778 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 774 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,_fin,m,args) = sargs addUnicodeChar buf (int (hexGraphShort (lexemeTrimLeft lexbuf 2))) if not skip then (STRING_TEXT (LexCont.String(!args.ifdefStack,m))) else string sargs skip lexbuf -//# 2660 "lex.fs" +//# 2632 "lex.fs" ) | 4 -> ( -//# 783 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 779 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,_fin,m,args) = sargs addUnicodeChar buf (int (unicodeGraphShort (lexemeTrimLeft lexbuf 2))) if not skip then (STRING_TEXT (LexCont.String(!args.ifdefStack,m))) else string sargs skip lexbuf -//# 2667 "lex.fs" +//# 2639 "lex.fs" ) | 5 -> ( -//# 788 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 784 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,_fin,m,args) = sargs let hexChars = lexemeTrimLeft lexbuf 2 let result () = if not skip then (STRING_TEXT (LexCont.String(!args.ifdefStack,m))) else string sargs skip lexbuf @@ -2677,433 +2653,433 @@ and _fslex_string sargs skip _fslex_state lexbuf = addUnicodeChar buf (int hi) addUnicodeChar buf (int lo) result () -//# 2684 "lex.fs" +//# 2656 "lex.fs" ) | 6 -> ( -//# 803 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 799 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,fin,_m,_args) = sargs let m2 = lexbuf.LexemeRange callStringFinisher fin buf m2 false -//# 2691 "lex.fs" +//# 2663 "lex.fs" ) | 7 -> ( -//# 808 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 804 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,fin,_m,_args) = sargs let m2 = lexbuf.LexemeRange callStringFinisher fin buf m2 true -//# 2698 "lex.fs" +//# 2670 "lex.fs" ) | 8 -> ( -//# 813 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 809 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,_fin,m,args) = sargs newline lexbuf addUnicodeString buf (lexeme lexbuf) if not skip then (STRING_TEXT (LexCont.String(!args.ifdefStack,m))) else string sargs skip lexbuf -//# 2706 "lex.fs" +//# 2678 "lex.fs" ) | 9 -> ( -//# 819 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 815 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,_fin,m,args) = sargs addUnicodeString buf (lexeme lexbuf) if not skip then (STRING_TEXT (LexCont.String(!args.ifdefStack,m))) else string sargs skip lexbuf -//# 2713 "lex.fs" +//# 2685 "lex.fs" ) | 10 -> ( -//# 825 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 821 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,_fin,m,args) = sargs addUnicodeString buf (lexeme lexbuf) if not skip then (STRING_TEXT (LexCont.String(!args.ifdefStack,m))) else string sargs skip lexbuf -//# 2720 "lex.fs" +//# 2692 "lex.fs" ) | 11 -> ( -//# 830 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 826 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,_fin,m,args) = sargs addUnicodeString buf (lexeme lexbuf) if not skip then (STRING_TEXT (LexCont.String(!args.ifdefStack,m))) else string sargs skip lexbuf -//# 2727 "lex.fs" +//# 2699 "lex.fs" ) | 12 -> ( -//# 835 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 831 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (_buf,_fin,m,args) = sargs EOF (LexCont.String(!args.ifdefStack,m)) -//# 2733 "lex.fs" +//# 2705 "lex.fs" ) | 13 -> ( -//# 839 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 835 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,_fin,m,args) = sargs addUnicodeString buf (lexeme lexbuf) if not skip then (STRING_TEXT (LexCont.String(!args.ifdefStack,m))) else string sargs skip lexbuf -//# 2740 "lex.fs" +//# 2712 "lex.fs" ) | _ -> failwith "string" -(* Rule verbatimString *) -and _fslex_verbatimString sargs skip _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with +// Rule verbatimString +and verbatimString sargs skip lexbuf = + match _fslex_tables.Interpret(208,lexbuf) with | 0 -> ( -//# 845 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 841 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,_fin,m,args) = sargs addByteChar buf '\"' if not skip then (STRING_TEXT (LexCont.VerbatimString(!args.ifdefStack,m))) else verbatimString sargs skip lexbuf -//# 2751 "lex.fs" +//# 2723 "lex.fs" ) | 1 -> ( -//# 850 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 846 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,fin,_m,_args) = sargs let m2 = lexbuf.LexemeRange callStringFinisher fin buf m2 false -//# 2758 "lex.fs" +//# 2730 "lex.fs" ) | 2 -> ( -//# 855 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 851 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,fin,_m,_args) = sargs let m2 = lexbuf.LexemeRange callStringFinisher fin buf m2 true -//# 2765 "lex.fs" +//# 2737 "lex.fs" ) | 3 -> ( -//# 860 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 856 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,_fin,m,args) = sargs newline lexbuf addUnicodeString buf (lexeme lexbuf) if not skip then (STRING_TEXT (LexCont.VerbatimString(!args.ifdefStack,m))) else verbatimString sargs skip lexbuf -//# 2773 "lex.fs" +//# 2745 "lex.fs" ) | 4 -> ( -//# 866 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 862 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,_fin,m,args) = sargs addUnicodeString buf (lexeme lexbuf) if not skip then (STRING_TEXT (LexCont.VerbatimString(!args.ifdefStack,m))) else verbatimString sargs skip lexbuf -//# 2780 "lex.fs" +//# 2752 "lex.fs" ) | 5 -> ( -//# 872 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 868 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,_fin,m,args) = sargs addUnicodeString buf (lexeme lexbuf) if not skip then (STRING_TEXT (LexCont.VerbatimString(!args.ifdefStack,m))) else verbatimString sargs skip lexbuf -//# 2787 "lex.fs" +//# 2759 "lex.fs" ) | 6 -> ( -//# 877 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 873 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,_fin,m,args) = sargs addUnicodeString buf (lexeme lexbuf) if not skip then (STRING_TEXT (LexCont.VerbatimString(!args.ifdefStack,m))) else verbatimString sargs skip lexbuf -//# 2794 "lex.fs" +//# 2766 "lex.fs" ) | 7 -> ( -//# 882 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 878 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (_buf,_fin,m,args) = sargs EOF (LexCont.VerbatimString(!args.ifdefStack,m)) -//# 2800 "lex.fs" +//# 2772 "lex.fs" ) | 8 -> ( -//# 886 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 882 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,_fin,m,args) = sargs addUnicodeString buf (lexeme lexbuf) if not skip then (STRING_TEXT (LexCont.VerbatimString(!args.ifdefStack,m))) else verbatimString sargs skip lexbuf -//# 2807 "lex.fs" +//# 2779 "lex.fs" ) | _ -> failwith "verbatimString" -(* Rule tripleQuoteString *) -and _fslex_tripleQuoteString sargs skip _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with +// Rule tripleQuoteString +and tripleQuoteString sargs skip lexbuf = + match _fslex_tables.Interpret(178,lexbuf) with | 0 -> ( -//# 892 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 888 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,fin,_m,_args) = sargs let m2 = lexbuf.LexemeRange callStringFinisher fin buf m2 false -//# 2818 "lex.fs" +//# 2790 "lex.fs" ) | 1 -> ( -//# 897 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 893 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,_fin,m,args) = sargs newline lexbuf addUnicodeString buf (lexeme lexbuf) if not skip then (STRING_TEXT (LexCont.TripleQuoteString(!args.ifdefStack,m))) else tripleQuoteString sargs skip lexbuf -//# 2826 "lex.fs" +//# 2798 "lex.fs" ) | 2 -> ( -//# 904 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 900 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,_fin,m,args) = sargs addUnicodeString buf (lexeme lexbuf) if not skip then (STRING_TEXT (LexCont.TripleQuoteString(!args.ifdefStack,m))) else tripleQuoteString sargs skip lexbuf -//# 2833 "lex.fs" +//# 2805 "lex.fs" ) | 3 -> ( -//# 910 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 906 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,_fin,m,args) = sargs addUnicodeString buf (lexeme lexbuf) if not skip then (STRING_TEXT (LexCont.TripleQuoteString(!args.ifdefStack,m))) else tripleQuoteString sargs skip lexbuf -//# 2840 "lex.fs" +//# 2812 "lex.fs" ) | 4 -> ( -//# 915 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 911 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,_fin,m,args) = sargs addUnicodeString buf (lexeme lexbuf) if not skip then (STRING_TEXT (LexCont.TripleQuoteString(!args.ifdefStack,m))) else tripleQuoteString sargs skip lexbuf -//# 2847 "lex.fs" +//# 2819 "lex.fs" ) | 5 -> ( -//# 920 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 916 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (_buf,_fin,m,args) = sargs EOF (LexCont.TripleQuoteString(!args.ifdefStack,m)) -//# 2853 "lex.fs" +//# 2825 "lex.fs" ) | 6 -> ( -//# 924 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 920 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let (buf,_fin,m,args) = sargs addUnicodeString buf (lexeme lexbuf) if not skip then (STRING_TEXT (LexCont.TripleQuoteString(!args.ifdefStack,m))) else tripleQuoteString sargs skip lexbuf -//# 2860 "lex.fs" +//# 2832 "lex.fs" ) | _ -> failwith "tripleQuoteString" -(* Rule singleLineComment *) -and _fslex_singleLineComment cargs skip _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with +// Rule singleLineComment +and singleLineComment cargs skip lexbuf = + match _fslex_tables.Interpret(165,lexbuf) with | 0 -> ( -//# 931 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 927 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let buff,_n,_m,args = cargs trySaveXmlDoc lexbuf buff newline lexbuf // Saves the documentation (if we're collecting any) into a buffer-local variable. if not skip then (LINE_COMMENT (LexCont.Token !args.ifdefStack)) else token args skip lexbuf -//# 2873 "lex.fs" +//# 2845 "lex.fs" ) | 1 -> ( -//# 938 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 934 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let _, _n,_m,args = cargs // NOTE: it is legal to end a file with this comment, so we'll return EOF as a token EOF (LexCont.Token !args.ifdefStack) -//# 2880 "lex.fs" +//# 2852 "lex.fs" ) | 2 -> ( -//# 944 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 940 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let buff,n,m,args = cargs // Append the current token to the XML documentation if we're collecting it tryAppendXmlDoc buff (lexeme lexbuf) if not skip then (LINE_COMMENT (LexCont.SingleLineComment(!args.ifdefStack,n,m))) else singleLineComment (buff,n,m,args) skip lexbuf -//# 2888 "lex.fs" +//# 2860 "lex.fs" ) | 3 -> ( -//# 950 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 946 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let _, _n,_m,args = cargs if not skip then (LINE_COMMENT (LexCont.Token !args.ifdefStack)) else token args skip lexbuf -//# 2894 "lex.fs" +//# 2866 "lex.fs" ) | _ -> failwith "singleLineComment" -(* Rule comment *) -and _fslex_comment cargs skip _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with +// Rule comment +and comment cargs skip lexbuf = + match _fslex_tables.Interpret(139,lexbuf) with | 0 -> ( -//# 956 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 952 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let n,m,args = cargs if not skip then (COMMENT (LexCont.Comment(!args.ifdefStack,n,m))) else comment (n,m,args) skip lexbuf -//# 2904 "lex.fs" +//# 2876 "lex.fs" ) | 1 -> ( -//# 960 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 956 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let n,m,args = cargs if not skip then (COMMENT (LexCont.StringInComment(!args.ifdefStack,n,m))) else stringInComment n m args skip lexbuf -//# 2910 "lex.fs" +//# 2882 "lex.fs" ) | 2 -> ( -//# 964 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 960 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let n,m,args = cargs if not skip then (COMMENT (LexCont.TripleQuoteStringInComment(!args.ifdefStack,n,m))) else tripleQuoteStringInComment n m args skip lexbuf -//# 2916 "lex.fs" +//# 2888 "lex.fs" ) | 3 -> ( -//# 968 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 964 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let n,m,args = cargs if not skip then (COMMENT (LexCont.VerbatimStringInComment(!args.ifdefStack,n,m))) else verbatimStringInComment n m args skip lexbuf -//# 2922 "lex.fs" +//# 2894 "lex.fs" ) | 4 -> ( -//# 972 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 968 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let n,m,args = cargs if not skip then (COMMENT (LexCont.Comment(!args.ifdefStack,n,m))) else comment cargs skip lexbuf -//# 2928 "lex.fs" +//# 2900 "lex.fs" ) | 5 -> ( -//# 976 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 972 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let n,m,args = cargs if not skip then (COMMENT (LexCont.Comment(!args.ifdefStack,n+1,m))) else comment (n+1,m,args) skip lexbuf -//# 2934 "lex.fs" +//# 2906 "lex.fs" ) | 6 -> ( -//# 980 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 976 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let n,m,args = cargs newline lexbuf if not skip then (COMMENT (LexCont.Comment(!args.ifdefStack,n,m))) else comment cargs skip lexbuf -//# 2941 "lex.fs" +//# 2913 "lex.fs" ) | 7 -> ( -//# 984 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 980 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let n,m,args = cargs if n > 1 then if not skip then (COMMENT (LexCont.Comment(!args.ifdefStack,n-1,m))) else comment (n-1,m,args) skip lexbuf else if not skip then (COMMENT (LexCont.Token !args.ifdefStack)) else token args skip lexbuf -//# 2949 "lex.fs" +//# 2921 "lex.fs" ) | 8 -> ( -//# 991 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 987 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let n,m,args = cargs if not skip then (COMMENT (LexCont.Comment(!args.ifdefStack,n,m))) else comment cargs skip lexbuf -//# 2955 "lex.fs" +//# 2927 "lex.fs" ) | 9 -> ( -//# 995 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 991 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let n,m,args = cargs EOF (LexCont.Comment(!args.ifdefStack,n,m)) -//# 2961 "lex.fs" +//# 2933 "lex.fs" ) | 10 -> ( -//# 999 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 995 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let n,m,args = cargs if not skip then (COMMENT (LexCont.Comment(!args.ifdefStack,n,m))) else comment (n,m,args) skip lexbuf -//# 2967 "lex.fs" +//# 2939 "lex.fs" ) | _ -> failwith "comment" -(* Rule stringInComment *) -and _fslex_stringInComment n m args skip _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with +// Rule stringInComment +and stringInComment n m args skip lexbuf = + match _fslex_tables.Interpret(90,lexbuf) with | 0 -> ( -//# 1005 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1001 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" newline lexbuf if not skip then (COMMENT (LexCont.StringInComment(!args.ifdefStack,n,m))) else stringInComment n m args skip lexbuf -//# 2977 "lex.fs" +//# 2949 "lex.fs" ) | 1 -> ( -//# 1017 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1013 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" if not skip then (COMMENT (LexCont.StringInComment(!args.ifdefStack,n,m))) else stringInComment n m args skip lexbuf -//# 2982 "lex.fs" +//# 2954 "lex.fs" ) | 2 -> ( -//# 1021 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1017 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" if not skip then (COMMENT (LexCont.Comment(!args.ifdefStack,n,m))) else comment (n,m,args) skip lexbuf -//# 2987 "lex.fs" +//# 2959 "lex.fs" ) | 3 -> ( -//# 1024 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1020 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" newline lexbuf if not skip then (COMMENT (LexCont.StringInComment(!args.ifdefStack,n,m))) else stringInComment n m args skip lexbuf -//# 2993 "lex.fs" +//# 2965 "lex.fs" ) | 4 -> ( -//# 1028 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1024 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" EOF (LexCont.StringInComment(!args.ifdefStack,n,m)) -//# 2998 "lex.fs" +//# 2970 "lex.fs" ) | 5 -> ( -//# 1032 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1028 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" if not skip then (COMMENT (LexCont.StringInComment(!args.ifdefStack,n,m))) else stringInComment n m args skip lexbuf -//# 3003 "lex.fs" +//# 2975 "lex.fs" ) | _ -> failwith "stringInComment" -(* Rule verbatimStringInComment *) -and _fslex_verbatimStringInComment n m args skip _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with +// Rule verbatimStringInComment +and verbatimStringInComment n m args skip lexbuf = + match _fslex_tables.Interpret(61,lexbuf) with | 0 -> ( -//# 1037 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1033 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" if not skip then (COMMENT (LexCont.VerbatimStringInComment(!args.ifdefStack,n,m))) else verbatimStringInComment n m args skip lexbuf -//# 3012 "lex.fs" +//# 2984 "lex.fs" ) | 1 -> ( -//# 1040 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1036 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" if not skip then (COMMENT (LexCont.Comment(!args.ifdefStack,n,m))) else comment (n,m,args) skip lexbuf -//# 3017 "lex.fs" +//# 2989 "lex.fs" ) | 2 -> ( -//# 1046 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1042 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" if not skip then (COMMENT (LexCont.VerbatimStringInComment(!args.ifdefStack,n,m))) else verbatimStringInComment n m args skip lexbuf -//# 3022 "lex.fs" +//# 2994 "lex.fs" ) | 3 -> ( -//# 1049 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1045 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" newline lexbuf if not skip then (COMMENT (LexCont.VerbatimStringInComment(!args.ifdefStack,n,m))) else verbatimStringInComment n m args skip lexbuf -//# 3028 "lex.fs" +//# 3000 "lex.fs" ) | 4 -> ( -//# 1053 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1049 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" EOF (LexCont.VerbatimStringInComment(!args.ifdefStack,n,m)) -//# 3033 "lex.fs" +//# 3005 "lex.fs" ) | 5 -> ( -//# 1057 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1053 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" if not skip then (COMMENT (LexCont.VerbatimStringInComment(!args.ifdefStack,n,m))) else verbatimStringInComment n m args skip lexbuf -//# 3038 "lex.fs" +//# 3010 "lex.fs" ) | _ -> failwith "verbatimStringInComment" -(* Rule tripleQuoteStringInComment *) -and _fslex_tripleQuoteStringInComment n m args skip _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with +// Rule tripleQuoteStringInComment +and tripleQuoteStringInComment n m args skip lexbuf = + match _fslex_tables.Interpret(31,lexbuf) with | 0 -> ( -//# 1062 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1058 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" if not skip then (COMMENT (LexCont.Comment(!args.ifdefStack,n,m))) else comment (n,m,args) skip lexbuf -//# 3047 "lex.fs" +//# 3019 "lex.fs" ) | 1 -> ( -//# 1068 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1064 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" if not skip then (COMMENT (LexCont.TripleQuoteStringInComment(!args.ifdefStack,n,m))) else tripleQuoteStringInComment n m args skip lexbuf -//# 3052 "lex.fs" +//# 3024 "lex.fs" ) | 2 -> ( -//# 1071 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1067 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" newline lexbuf if not skip then (COMMENT (LexCont.TripleQuoteStringInComment(!args.ifdefStack,n,m))) else tripleQuoteStringInComment n m args skip lexbuf -//# 3058 "lex.fs" +//# 3030 "lex.fs" ) | 3 -> ( -//# 1075 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1071 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" EOF (LexCont.TripleQuoteStringInComment(!args.ifdefStack,n,m)) -//# 3063 "lex.fs" +//# 3035 "lex.fs" ) | 4 -> ( -//# 1079 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1075 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" if not skip then (COMMENT (LexCont.TripleQuoteStringInComment(!args.ifdefStack,n,m))) else tripleQuoteStringInComment n m args skip lexbuf -//# 3068 "lex.fs" +//# 3040 "lex.fs" ) | _ -> failwith "tripleQuoteStringInComment" -(* Rule mlOnly *) -and _fslex_mlOnly m args skip _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with +// Rule mlOnly +and mlOnly m args skip lexbuf = + match _fslex_tables.Interpret(0,lexbuf) with | 0 -> ( -//# 1084 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1080 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" let buf = ByteBuffer.Create 100 let m2 = lexbuf.LexemeRange let _ = string (buf,defaultStringFinisher,m2,args) skip lexbuf if not skip then (COMMENT (LexCont.MLOnly(!args.ifdefStack,m))) else mlOnly m args skip lexbuf -//# 3080 "lex.fs" +//# 3052 "lex.fs" ) | 1 -> ( -//# 1089 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1085 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" newline lexbuf; if not skip then (COMMENT (LexCont.MLOnly(!args.ifdefStack,m))) else mlOnly m args skip lexbuf -//# 3085 "lex.fs" +//# 3057 "lex.fs" ) | 2 -> ( -//# 1091 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1087 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" if not skip then (COMMENT (LexCont.Token !args.ifdefStack)) else token args skip lexbuf -//# 3090 "lex.fs" +//# 3062 "lex.fs" ) | 3 -> ( -//# 1093 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1089 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" if not skip then (COMMENT (LexCont.Token !args.ifdefStack)) else token args skip lexbuf -//# 3095 "lex.fs" +//# 3067 "lex.fs" ) | 4 -> ( -//# 1095 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1091 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" if not skip then (COMMENT (LexCont.MLOnly(!args.ifdefStack,m))) else mlOnly m args skip lexbuf -//# 3100 "lex.fs" +//# 3072 "lex.fs" ) | 5 -> ( -//# 1097 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1093 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" EOF (LexCont.MLOnly(!args.ifdefStack,m)) -//# 3105 "lex.fs" +//# 3077 "lex.fs" ) | 6 -> ( -//# 1100 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\lex.fsl" +//# 1096 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/lex.fsl" if not skip then (COMMENT (LexCont.MLOnly(!args.ifdefStack,m))) else mlOnly m args skip lexbuf -//# 3110 "lex.fs" +//# 3082 "lex.fs" ) | _ -> failwith "mlOnly" diff --git a/src/fcs-fable/codegen/pars.fs b/src/fcs-fable/codegen/pars.fs index 31c85b5e38..53ab8f4cec 100644 --- a/src/fcs-fable/codegen/pars.fs +++ b/src/fcs-fable/codegen/pars.fs @@ -4,7 +4,7 @@ module internal FSharp.Compiler.Parser open FSharp.Compiler open Internal.Utilities.Text.Lexing open Internal.Utilities.Text.Parsing.ParseHelpers -//# 3 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" #nowarn "1182" // generated code has lots of unused "parseState" @@ -2810,41 +2810,41 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 493 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 493 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" IDefns (_1,lhs parseState) ) -//# 493 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 493 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.ParsedFsiInteraction)); //# 2818 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 496 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 496 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" warning(Error(FSComp.SR.parsUnexpectedSemicolon(),rhs parseState 1)) IDefns ([],lhs parseState) ) -//# 496 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 496 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.ParsedFsiInteraction)); //# 2829 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 500 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 500 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" IDefns ([],lhs parseState) ) -//# 500 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 500 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.ParsedFsiInteraction)); //# 2839 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 504 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 504 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 504 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 504 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'interactiveTerminator)); //# 2849 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -2852,10 +2852,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 505 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 505 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" checkEndOfFileError _1 ) -//# 505 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 505 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'interactiveTerminator)); //# 2860 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -2863,10 +2863,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 519 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 519 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 519 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 519 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'interactiveItemsTerminator)); //# 2871 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -2875,10 +2875,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 522 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 522 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 522 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 522 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'interactiveItemsTerminator)); //# 2883 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -2887,10 +2887,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 525 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 525 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 525 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 525 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'interactiveItemsTerminator)); //# 2895 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -2899,10 +2899,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 528 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 528 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 528 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 528 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'interactiveItemsTerminator)); //# 2907 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -2912,10 +2912,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 531 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 531 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 @ _3 ) -//# 531 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 531 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'interactiveItemsTerminator)); //# 2920 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -2925,10 +2925,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 534 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 534 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 @ _3 ) -//# 534 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 534 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'interactiveItemsTerminator)); //# 2933 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -2938,10 +2938,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 537 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 537 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 @ _3 ) -//# 537 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 537 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'interactiveItemsTerminator)); //# 2946 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -2949,10 +2949,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 543 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 543 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 543 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 543 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'interactiveDefns)); //# 2957 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -2961,10 +2961,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 546 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 546 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 @ _2 ) -//# 546 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 546 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'interactiveDefns)); //# 2969 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -2974,14 +2974,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 552 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 552 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" match _2 with | Some vis -> errorR(Error(FSComp.SR.parsUnexpectedVisibilityDeclaration(vis.ToString()),rhs parseState 3)) | _ -> () let attrDecls = if not (isNil _1) then [ SynModuleDecl.Attributes (_1, rangeOfNonNilAttrs _1) ] else [] in attrDecls @ [ mkSynDoDecl(_3)] ) -//# 552 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 552 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'interactiveExpr)); //# 2986 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -2989,10 +2989,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 562 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 562 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [SynModuleDecl.HashDirective(_1,rhs parseState 1)] ) -//# 562 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 562 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'interactiveHash)); //# 2997 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3000,10 +3000,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 567 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 567 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 567 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 567 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'interactiveSeparators)); //# 3008 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3012,30 +3012,30 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 568 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 568 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 568 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 568 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'interactiveSeparators)); //# 3020 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 573 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 573 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 573 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 573 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'interactiveSeparator)); //# 3030 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 574 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 574 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 574 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 574 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'interactiveSeparator)); //# 3040 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3044,20 +3044,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 584 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 584 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ParsedHashDirective (_2,_3,lhs parseState) ) -//# 584 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 584 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'hashDirective)); //# 3052 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 590 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 590 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 590 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 590 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'hashDirectiveArgs)); //# 3062 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3066,10 +3066,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 593 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 593 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 @ [_2] ) -//# 593 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 593 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'hashDirectiveArgs)); //# 3074 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3077,10 +3077,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 599 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 599 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 599 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 599 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'hashDirectiveArg)); //# 3085 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3089,10 +3089,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 608 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 608 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" checkEndOfFileError _2; _1 ) -//# 608 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 608 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.ParsedSigFile)); //# 3097 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3101,10 +3101,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 611 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 611 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 611 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 611 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.ParsedSigFile)); //# 3109 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3112,11 +3112,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 617 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 617 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let emptySigFileFrag = ParsedSigFileFragment.AnonModule([],rhs parseState 1) in ParsedSigFile([],[emptySigFileFrag]) ) -//# 617 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 617 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.ParsedSigFile)); //# 3121 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3127,10 +3127,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 625 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 625 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _3, _4.Lid, grabXmlDoc(parseState,1), _2 ) -//# 625 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 625 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleIntro)); //# 3135 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3139,10 +3139,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 631 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 631 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2, _3.Lid, grabXmlDoc(parseState,1) ) -//# 631 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 631 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'namespaceIntro)); //# 3147 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3150,10 +3150,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 637 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 637 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ParsedSigFile([],[ (_1 (false,[],PreXmlDoc.Empty)) ]) ) -//# 637 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 637 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'fileNamespaceSpecs)); //# 3158 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3162,7 +3162,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 640 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 640 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" // If there are namespaces, the first fileModuleImpl may only contain # directives let decls = match (_1 (false,[],PreXmlDoc.Empty)) with @@ -3178,7 +3178,7 @@ let _fsyacc_reductions () = [| []) ParsedSigFile(decls, _2) ) -//# 640 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 640 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'fileNamespaceSpecs)); //# 3183 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3187,10 +3187,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 658 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 658 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 :: _2 ) -//# 658 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 658 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'fileNamespaceSpecList)); //# 3195 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3198,10 +3198,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 661 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 661 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1] ) -//# 661 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 661 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'fileNamespaceSpecList)); //# 3206 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3211,10 +3211,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 665 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 665 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let isRec,path,xml = _1 in (_3 (isRec,path,xml)) ) -//# 665 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 665 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'fileNamespaceSpec)); //# 3219 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3225,7 +3225,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 671 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 671 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) let m2 = rhs parseState 3 let m = (rhs2 parseState 3 4) @@ -3235,7 +3235,7 @@ let _fsyacc_reductions () = [| let lid = path@path2 ParsedSigFileFragment.NamedModule(SynModuleOrNamespaceSig(lid, (isRec || isRec2), NamedModule, _4, xml,_1,vis,m))) ) -//# 671 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 671 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'fileModuleSpec)); //# 3240 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3243,14 +3243,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 681 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 681 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = (rhs parseState 1) (fun (isRec, path, xml) -> match path with | [] -> ParsedSigFileFragment.AnonModule(_1, m) | _ -> ParsedSigFileFragment.NamespaceFragment(path, isRec, DeclaredNamespace, _1, xml,[],m)) ) -//# 681 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 681 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'fileModuleSpec)); //# 3255 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3258,10 +3258,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 690 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 690 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 690 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 690 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleSpfnsPossiblyEmptyBlock)); //# 3266 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3271,10 +3271,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 693 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 693 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 693 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 693 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleSpfnsPossiblyEmptyBlock)); //# 3279 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3283,13 +3283,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 696 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 696 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" // The lex filter ensures we can only get a mismatch in OBLOCKBEGIN/OBLOCKEND tokens if there was some other kind of error, hence we don't need to report this error // reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnClosedBlockInHashLight()) _2 ) -//# 696 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 696 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleSpfnsPossiblyEmptyBlock)); //# 3294 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3297,10 +3297,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 702 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 702 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 702 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 702 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleSpfnsPossiblyEmptyBlock)); //# 3305 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3308,30 +3308,30 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 707 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 707 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 707 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 707 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleSpfnsPossiblyEmpty)); //# 3316 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 710 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 710 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 710 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 710 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleSpfnsPossiblyEmpty)); //# 3326 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 713 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 713 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 713 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 713 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleSpfnsPossiblyEmpty)); //# 3336 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3341,10 +3341,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 718 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 718 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 :: _3 ) -//# 718 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 718 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleSpfns)); //# 3349 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3353,10 +3353,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 721 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 721 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (* silent recovery *) _3 ) -//# 721 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 721 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleSpfns)); //# 3361 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3365,10 +3365,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 724 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 724 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1] ) -//# 724 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 724 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleSpfns)); //# 3373 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3376,10 +3376,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 729 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 729 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynModuleSigDecl.HashDirective (_1,rhs2 parseState 1 1) ) -//# 729 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 729 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleSpfn)); //# 3384 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3387,10 +3387,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 732 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 732 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 732 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 732 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleSpfn)); //# 3395 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3402,7 +3402,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 735 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 735 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) let isRec, path, xml, vis = _3 if isRec then raiseParseErrorAt (rhs parseState 3) (FSComp.SR.parsInvalidUseOfRec()) @@ -3412,7 +3412,7 @@ let _fsyacc_reductions () = [| | Some vis -> raiseParseErrorAt (rhs parseState 1) (FSComp.SR.parsIgnoreVisibilityOnModuleAbbreviationAlwaysPrivate(vis.ToString())) | _ -> SynModuleSigDecl.ModuleAbbrev(List.head path,_5,rhs2 parseState 3 5) ) -//# 735 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 735 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleSpfn)); //# 3417 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3424,7 +3424,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 745 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 745 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let isRec, path, xml, vis = _3 if not (isSingleton path) then raiseParseErrorAt (rhs parseState 3) (FSComp.SR.parsModuleDefnMustBeSimpleName()) if isRec then raiseParseErrorAt (rhs parseState 3) (FSComp.SR.parsInvalidUseOfRec()) @@ -3432,7 +3432,7 @@ let _fsyacc_reductions () = [| if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) SynModuleSigDecl.NestedModule(info, isRec, _5, rhs2 parseState 3 5) ) -//# 745 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 745 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleSpfn)); //# 3437 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3442,7 +3442,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 753 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 753 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) let (TypeDefnSig(ComponentInfo(cas,a,cs,b,c,d,d2,d3),e,f,g)),rest = match _3 with @@ -3451,7 +3451,7 @@ let _fsyacc_reductions () = [| let tc = (TypeDefnSig(ComponentInfo(_1@cas,a,cs,b,c,d,d2,d3),e,f,g))in SynModuleSigDecl.Types (tc::rest,rhs parseState 3) ) -//# 753 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 753 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleSpfn)); //# 3456 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3461,13 +3461,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 762 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 762 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) let (SynExceptionSig(SynExceptionDefnRepr(cas,a,b,c,d,d2),e,f)) = _3 let ec = (SynExceptionSig(SynExceptionDefnRepr(_1@cas,a,b,c,d,d2),e,f)) SynModuleSigDecl.Exception(ec, rhs parseState 3) ) -//# 762 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 762 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleSpfn)); //# 3472 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3475,10 +3475,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 768 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 768 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynModuleSigDecl.Open (_2.Lid, unionRanges (rhs parseState 1) _2.Range) ) -//# 768 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 768 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleSpfn)); //# 3483 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3495,7 +3495,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 772 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 772 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) let attr1,attr2,isInline,isMutable,vis2,id,doc,explicitValTyparDecls,(ty,arity),konst = (_1),(_4),(_5),(_6),(_7),(_8),grabXmlDoc(parseState,3),(_9),(_11),(_12) if not (isNil attr2) then errorR(Deprecated(FSComp.SR.parsAttributesMustComeBeforeVal(),rhs parseState 4)) @@ -3504,17 +3504,17 @@ let _fsyacc_reductions () = [| SynModuleSigDecl.Val(valSpfn,m) ) -//# 772 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 772 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'valSpfn)); //# 3509 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 783 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 783 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" None ) -//# 783 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 783 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'optLiteralValueSpfn)); //# 3519 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3522,10 +3522,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 786 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 786 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Some(_2) ) -//# 786 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 786 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'optLiteralValueSpfn)); //# 3530 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3534,10 +3534,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 789 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 789 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Some(_3) ) -//# 789 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 789 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'optLiteralValueSpfn)); //# 3542 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3546,10 +3546,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 797 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 797 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 797 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 797 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleSpecBlock)); //# 3554 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3559,10 +3559,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 801 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 801 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _3 ) -//# 801 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 801 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleSpecBlock)); //# 3567 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3571,10 +3571,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 805 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 805 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 805 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 805 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleSpecBlock)); //# 3579 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3583,10 +3583,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 811 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 811 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 811 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 811 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynTypeDefnSig list)); //# 3591 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3595,10 +3595,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 816 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 816 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 :: _3 ) -//# 816 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 816 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconSpfnList)); //# 3603 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3606,10 +3606,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 819 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 819 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1] ) -//# 819 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 819 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconSpfnList)); //# 3614 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3618,11 +3618,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 825 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 825 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let lhsm = rhs parseState 1 _3 lhsm _1 ) -//# 825 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 825 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconSpfn)); //# 3627 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3631,10 +3631,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 828 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 828 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" TypeDefnSig(_1,SynTypeDefnSigRepr.Simple (SynTypeDefnSimpleRepr.None (lhs parseState),lhs parseState),_2,lhs parseState) ) -//# 828 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 828 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconSpfn)); //# 3639 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3647,12 +3647,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 842 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 842 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = lhs parseState (fun lhsm nameInfo -> _2 lhsm nameInfo (checkForMultipleAugmentations m (_4 @ _5) _7)) ) -//# 842 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 842 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconSpfnRhsBlock)); //# 3657 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3661,12 +3661,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 847 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 847 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = lhs parseState (fun lhsm nameInfo -> _1 lhsm nameInfo _2) ) -//# 847 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 847 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconSpfnRhsBlock)); //# 3671 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3674,12 +3674,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 855 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 855 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = _1.Range (fun lhsm nameInfo augmentation -> TypeDefnSig(nameInfo,SynTypeDefnSigRepr.Simple (_1,m),augmentation,m)) ) -//# 855 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 855 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconSpfnRhs)); //# 3684 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3687,7 +3687,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 860 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 860 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = lhs parseState let needsCheck,(kind,decls) = _1 (fun nameRange nameInfo augmentation -> @@ -3695,7 +3695,7 @@ let _fsyacc_reductions () = [| reportParseErrorAt nameRange (FSComp.SR.parsEmptyTypeDefinition()) TypeDefnSig(nameInfo,SynTypeDefnSigRepr.ObjectModel (kind,decls,m),augmentation,m)) ) -//# 860 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 860 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconSpfnRhs)); //# 3700 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3703,7 +3703,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 868 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 868 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = lhs parseState let ty,arity = _3 let invoke = SynMemberSig.Member(ValSpfn([],mkSynId m "Invoke",inferredTyparDecls,ty,arity,false,false,PreXmlDoc.Empty,None,None,m),AbstractMemberFlags MemberKind.Member,m) @@ -3711,7 +3711,7 @@ let _fsyacc_reductions () = [| if not (isNil augmentation) then raiseParseErrorAt m (FSComp.SR.parsAugmentationsIllegalOnDelegateType()) TypeDefnSig(nameInfo,SynTypeDefnSigRepr.ObjectModel (TyconDelegate (ty,arity),[invoke],m),[],m)) ) -//# 868 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 868 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconSpfnRhs)); //# 3716 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3719,11 +3719,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 879 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 879 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let needsCheck,decls = _1 needsCheck,(TyconUnspecified, decls) ) -//# 879 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 879 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconClassSpfn)); //# 3728 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3732,10 +3732,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 883 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 883 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" false,(_1,_2) ) -//# 883 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 883 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconClassSpfn)); //# 3740 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3745,11 +3745,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 886 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 886 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedClassInterfaceOrStruct()) false,(_1,_2) ) -//# 886 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 886 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconClassSpfn)); //# 3754 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3757,11 +3757,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 890 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 890 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" // silent recovery false,(_1,[]) ) -//# 890 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 890 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconClassSpfn)); //# 3766 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3770,10 +3770,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 897 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 897 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" true, _2 ) -//# 897 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 897 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classSpfnBlockKindUnspecified)); //# 3778 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3782,11 +3782,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 900 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 900 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _3 then reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsUnexpectedEndOfFileTypeSignature()) false, _2 ) -//# 900 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 900 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classSpfnBlockKindUnspecified)); //# 3791 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3794,10 +3794,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 905 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 905 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" false, _2 ) -//# 905 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 905 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classSpfnBlockKindUnspecified)); //# 3802 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3806,10 +3806,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 908 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 908 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" false, _2 ) -//# 908 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 908 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classSpfnBlockKindUnspecified)); //# 3814 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3818,10 +3818,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 914 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 914 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 914 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 914 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classSpfnBlock)); //# 3826 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3830,11 +3830,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 917 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 917 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _3 then reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsUnexpectedEndOfFileTypeSignature()) _2 ) -//# 917 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 917 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classSpfnBlock)); //# 3839 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3842,10 +3842,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 920 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 920 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 920 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 920 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classSpfnBlock)); //# 3850 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3853,20 +3853,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 925 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 925 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 925 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 925 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classSpfnMembers)); //# 3861 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 928 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 928 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 928 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 928 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classSpfnMembers)); //# 3871 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3876,10 +3876,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 934 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 934 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 :: _3 ) -//# 934 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 934 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classSpfnMembersAtLeastOne)); //# 3884 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3896,7 +3896,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 940 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 940 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) let isInline,doc,vis2,id,explicitValTyparDecls,(ty,arity),optLiteralValue = _4,grabXmlDoc(parseState,3),_5,_6,_7,_9,_11 let getSetRangeOpt, getSet = _10 @@ -3910,7 +3910,7 @@ let _fsyacc_reductions () = [| let _,flags = _3 SynMemberSig.Member(valSpfn, flags (getSetAdjuster arity),wholeRange) ) -//# 940 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 940 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classMemberSpfn)); //# 3915 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3921,11 +3921,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 954 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 954 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) SynMemberSig.Interface (_4,unionRanges (rhs parseState 3) (_4).Range) ) -//# 954 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 954 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classMemberSpfn)); //# 3930 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3935,11 +3935,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 958 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 958 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) SynMemberSig.Inherit (_4,unionRanges (rhs parseState 3) (_4).Range) ) -//# 958 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 958 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classMemberSpfn)); //# 3944 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3949,12 +3949,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 962 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 962 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) let fld = _4 _1 false SynMemberSig.ValField(fld,rhs2 parseState 3 4) ) -//# 962 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 962 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classMemberSpfn)); //# 3959 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3964,11 +3964,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 967 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 967 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) SynMemberSig.ValField(_5 _1 true,rhs2 parseState 3 5) ) -//# 967 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 967 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classMemberSpfn)); //# 3973 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3979,11 +3979,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 971 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 971 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) SynMemberSig.NestedType(_5,rhs2 parseState 3 5) ) -//# 971 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 971 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classMemberSpfn)); //# 3988 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -3993,24 +3993,24 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 975 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 975 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let vis,doc,(ty,valSynInfo) = _2,grabXmlDoc(parseState,3),_5 let m = unionRanges (rhs parseState 3) ty.Range let isInline = false let valSpfn = ValSpfn (_1, mkSynId (rhs parseState 3) "new", noInferredTypars, ty, valSynInfo, isInline, false, doc, vis, None, m) SynMemberSig.Member(valSpfn, CtorMemberFlags,m) ) -//# 975 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 975 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classMemberSpfn)); //# 4005 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 985 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 985 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" None, MemberKind.Member ) -//# 985 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 985 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classMemberSpfnGetSet)); //# 4015 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4018,10 +4018,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 988 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 988 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Some (rhs2 parseState 1 2), _2 ) -//# 988 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 988 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classMemberSpfnGetSet)); //# 4026 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4029,10 +4029,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 991 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 991 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Some (rhs2 parseState 1 2), _2 ) -//# 991 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 991 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classMemberSpfnGetSet)); //# 4037 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4040,11 +4040,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 994 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 994 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedWith()) Some (rhs2 parseState 1 2), _2 ) -//# 994 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 994 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classMemberSpfnGetSet)); //# 4049 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4052,13 +4052,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1001 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1001 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (let (id:Ident) = _1 if id.idText = "get" then MemberKind.PropertyGet else if id.idText = "set" then MemberKind.PropertySet else raiseParseErrorAt (rhs parseState 1) (FSComp.SR.parsGetOrSetRequired())) ) -//# 1001 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1001 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classMemberSpfnGetSetElements)); //# 4063 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4067,14 +4067,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1007 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1007 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let (id:Ident) = _1 if not ((id.idText = "get" && _3.idText = "set") || (id.idText = "set" && _3.idText = "get")) then raiseParseErrorAt (rhs2 parseState 1 3) (FSComp.SR.parsGetOrSetRequired()) MemberKind.PropertyGetSet ) -//# 1007 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1007 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classMemberSpfnGetSetElements)); //# 4079 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4082,30 +4082,30 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1014 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1014 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 1014 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1014 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'memberSpecFlags)); //# 4090 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1015 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1015 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (false,AbstractMemberFlags) ) -//# 1015 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1015 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'memberSpecFlags)); //# 4100 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1016 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1016 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (false,AbstractMemberFlags) ) -//# 1016 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1016 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'memberSpecFlags)); //# 4110 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4114,10 +4114,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1022 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1022 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExceptionSig(_1,_2,lhs parseState) ) -//# 1022 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1022 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'exconSpfn)); //# 4122 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4126,20 +4126,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1028 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1028 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 1028 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1028 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_classSpfn)); //# 4134 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1031 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1031 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 1031 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1031 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_classSpfn)); //# 4144 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4148,10 +4148,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1040 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1040 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" checkEndOfFileError _2; _1 ) -//# 1040 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1040 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.ParsedImplFile)); //# 4156 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4160,10 +4160,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1043 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1043 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 1043 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1043 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.ParsedImplFile)); //# 4168 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4171,11 +4171,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1049 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1049 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let emptyImplFileFrag = ParsedImplFileFragment.AnonModule([],rhs parseState 1) in ParsedImplFile([],[emptyImplFileFrag]) ) -//# 1049 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1049 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.ParsedImplFile)); //# 4180 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4183,10 +4183,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1056 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1056 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ParsedImplFile([], [ (_1 (false,[],PreXmlDoc.Empty)) ]) ) -//# 1056 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1056 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'fileNamespaceImpls)); //# 4191 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4195,7 +4195,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1059 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1059 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" // If there are namespaces, the first fileModuleImpl may only contain # directives let decls = match (_1 (false,[],PreXmlDoc.Empty)) with @@ -4211,7 +4211,7 @@ let _fsyacc_reductions () = [| []) ParsedImplFile(decls, _2) ) -//# 1059 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1059 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'fileNamespaceImpls)); //# 4216 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4220,10 +4220,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1078 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1078 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 :: _2 ) -//# 1078 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1078 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'fileNamespaceImplList)); //# 4228 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4231,10 +4231,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1081 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1081 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1] ) -//# 1081 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1081 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'fileNamespaceImplList)); //# 4239 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4244,10 +4244,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1087 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1087 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let isRec, path, xml = _1 in (_3 (isRec, path, xml)) ) -//# 1087 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1087 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'fileNamespaceImpl)); //# 4252 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4258,7 +4258,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1093 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1093 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) let m2 = rhs parseState 3 let m = (m2, _4) ||> unionRangeWithListBy (fun modu -> modu.Range) @@ -4268,7 +4268,7 @@ let _fsyacc_reductions () = [| let lid = path@path2 ParsedImplFileFragment.NamedModule(SynModuleOrNamespace(lid, (isRec || isRec2), NamedModule, _4, xml,_1,vis,m))) ) -//# 1093 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1093 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'fileModuleImpl)); //# 4273 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4276,14 +4276,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1103 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1103 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = (rhs parseState 1) (fun (isRec, path, xml) -> match path with | [] -> ParsedImplFileFragment.AnonModule(_1,m) | _ -> ParsedImplFileFragment.NamespaceFragment(path, isRec, DeclaredNamespace, _1, xml,[],m)) ) -//# 1103 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1103 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'fileModuleImpl)); //# 4288 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4293,10 +4293,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1113 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1113 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 1113 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1113 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynModuleDecl list)); //# 4301 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4305,12 +4305,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1116 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1116 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" // The lex filter ensures we can only get a mismatch in OBLOCKBEGIN/OBLOCKEND tokens if there was some other kind of error, hence we don't need to report this error // reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnClosedBlockInHashLight()) _2 ) -//# 1116 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1116 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynModuleDecl list)); //# 4315 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4318,10 +4318,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1121 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1121 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 1121 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1121 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynModuleDecl list)); //# 4326 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4329,10 +4329,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1124 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1124 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 1124 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1124 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynModuleDecl list)); //# 4337 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4340,20 +4340,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1130 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1130 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 1130 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1130 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleDefnsOrExprPossiblyEmpty)); //# 4348 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1133 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1133 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 1133 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1133 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleDefnsOrExprPossiblyEmpty)); //# 4358 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4365,14 +4365,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1140 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1140 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" match _2 with | Some vis -> errorR(Error(FSComp.SR.parsUnexpectedVisibilityDeclaration(vis.ToString()),rhs parseState 3)) | _ -> () let attrDecls = if not (isNil _1) then [ SynModuleDecl.Attributes (_1, rangeOfNonNilAttrs _1) ] else [] attrDecls @ mkSynDoDecl (_3) :: _5 ) -//# 1140 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1140 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleDefnsOrExpr)); //# 4377 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4383,14 +4383,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1147 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1147 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" match _2 with | Some vis -> errorR(Error(FSComp.SR.parsUnexpectedVisibilityDeclaration(vis.ToString()),rhs parseState 3)) | _ -> () let attrDecls = if not (isNil _1) then [ SynModuleDecl.Attributes (_1, rangeOfNonNilAttrs _1) ] else [] attrDecls @ [ mkSynDoDecl(_3) ] ) -//# 1147 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1147 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleDefnsOrExpr)); //# 4395 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4400,14 +4400,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1154 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1154 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" match _2 with | Some vis -> errorR(Error(FSComp.SR.parsUnexpectedVisibilityDeclaration(vis.ToString()),rhs parseState 3)) | _ -> () let attrDecls = if not (isNil _1) then [ SynModuleDecl.Attributes (_1, rangeOfNonNilAttrs _1) ] else [] attrDecls @ [ mkSynDoDecl(_3) ] ) -//# 1154 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1154 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleDefnsOrExpr)); //# 4412 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4415,10 +4415,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1161 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1161 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 1161 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1161 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleDefnsOrExpr)); //# 4423 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4426,10 +4426,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1164 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1164 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not (isNil _1) then [ SynModuleDecl.Attributes (_1, rangeOfNonNilAttrs _1) ] else [] ) -//# 1164 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1164 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleDefnsOrExpr)); //# 4434 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4438,10 +4438,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1170 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1170 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 @ _2 ) -//# 1170 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1170 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleDefns)); //# 4446 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4451,10 +4451,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1173 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1173 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 @ _3 ) -//# 1173 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1173 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleDefns)); //# 4459 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4462,10 +4462,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1176 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1176 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 1176 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1176 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleDefns)); //# 4470 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4474,10 +4474,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1179 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1179 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 1179 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1179 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleDefns)); //# 4482 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4486,10 +4486,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1182 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1182 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _3 ) -//# 1182 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1182 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleDefns)); //# 4494 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4497,10 +4497,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1188 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1188 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 1188 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1188 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleDefnOrDirective)); //# 4505 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4508,10 +4508,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1191 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1191 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [ SynModuleDecl.HashDirective (_1,rhs2 parseState 1 1) ] ) -//# 1191 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1191 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleDefnOrDirective)); //# 4516 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4521,13 +4521,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1200 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1200 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) parseState.ResetSynArgNameGenerator() let (BindingSetPreAttrs(_,_,_,_,mWhole)) = _3 mkDefnBindings (mWhole,_3,_1,_2,mWhole) ) -//# 1200 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1200 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleDefn)); //# 4532 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4537,13 +4537,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1207 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1207 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let hwlb,m = _3 if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) parseState.ResetSynArgNameGenerator() mkDefnBindings (m,hwlb,_1,_2,m) ) -//# 1207 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1207 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleDefn)); //# 4548 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4553,12 +4553,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1214 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1214 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) let mWhole = rhs parseState 3 mkDefnBindings (mWhole,_3,_1,_2,mWhole) ) -//# 1214 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1214 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleDefn)); //# 4563 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4570,14 +4570,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1220 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1220 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) - let (TypeDefn(ComponentInfo(cas ,a,cs,b,c,d,d2,d3),e,f,g)) = _4 + let (TypeDefn(ComponentInfo(cas,a,cs,b,c,d,d2,d3),e,f,g)) = _4 let tc = (TypeDefn(ComponentInfo(_1@cas,a,cs,b,c,d,d2,d3),e,f,g)) let types = tc :: _5 [ SynModuleDecl.Types(types, (rhs parseState 3, types) ||> unionRangeWithListBy (fun t -> t.Range) ) ] ) -//# 1220 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1220 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleDefn)); //# 4582 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4587,14 +4587,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1228 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1228 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) let (SynExceptionDefn(SynExceptionDefnRepr(cas,a,b,c,d,d2),e,f)) = _3 let f = (f, _1) ||> unionRangeWithListBy (fun a -> a.Range) let ec = (SynExceptionDefn(SynExceptionDefnRepr(_1@cas,a,b,c,d,d2),e,f)) [ SynModuleDecl.Exception(ec, f) ] ) -//# 1228 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1228 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleDefn)); //# 4599 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4605,7 +4605,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1236 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1236 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) let attribs, (isRec, path, xml, vis) = _1,_3 match _5 with @@ -4623,7 +4623,7 @@ let _fsyacc_reductions () = [| let info = ComponentInfo(attribs,[],[],path,xml,false,vis,rhs parseState 3) [ SynModuleDecl.NestedModule(info, isRec, def, false,(rhs2 parseState 3 4, def) ||> unionRangeWithListBy (fun d -> d.Range) ) ] ) -//# 1236 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1236 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleDefn)); //# 4628 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4632,11 +4632,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1255 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1255 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" errorR(Error(FSComp.SR.parsAttributeOnIncompleteCode(),rhs parseState 1)) [] ) -//# 1255 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1255 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleDefn)); //# 4641 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4644,10 +4644,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1260 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1260 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [SynModuleDecl.Open(_1, _1.Range)] ) -//# 1260 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1260 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleDefn)); //# 4652 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4656,10 +4656,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1268 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1268 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2.Lid ) -//# 1268 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1268 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'namedModuleAbbrevBlock)); //# 4664 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4667,10 +4667,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1271 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1271 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1.Lid ) -//# 1271 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1271 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'namedModuleAbbrevBlock)); //# 4675 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4679,10 +4679,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1277 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1277 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Choice2Of2 _2 ) -//# 1277 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1277 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'namedModuleDefnBlock)); //# 4687 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4691,11 +4691,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1280 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1280 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" // The lex filter ensures we can only get a mismatch in OBLOCKBEGIN/OBLOCKEND tokens if there was some other kind of error, hence we don't need to report this error Choice2Of2 _2 ) -//# 1280 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1280 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'namedModuleDefnBlock)); //# 4700 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4704,7 +4704,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1284 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1284 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" // There is an ambiguity here // In particular, consider the following two: // @@ -4712,7 +4712,7 @@ let _fsyacc_reductions () = [| // System.DateTime.Now // module M2 = // Microsoft.FSharp.Core.List - // The second is a module abbreviation , the first a module containing a single expression. + // The second is a module abbreviation, the first a module containing a single expression. // The resolution is in favour of the module abbreviation, i.e. anything of the form // module M2 = ID.ID.ID.ID // will be taken as a module abbreviation, regardles of the identifiers themselves. @@ -4729,7 +4729,7 @@ let _fsyacc_reductions () = [| Choice2Of2 _2 ) -//# 1284 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1284 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'namedModuleDefnBlock)); //# 4734 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4738,12 +4738,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1310 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1310 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" // The lex filter ensures we can only get a mismatch in OBLOCKBEGIN/OBLOCKEND tokens if there was some other kind of error, hence we don't need to report this error // reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnClosedBlockInHashLight()) Choice2Of2 _2 ) -//# 1310 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1310 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'namedModuleDefnBlock)); //# 4748 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4751,10 +4751,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1315 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1315 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Choice2Of2 [] ) -//# 1315 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1315 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'namedModuleDefnBlock)); //# 4759 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4762,10 +4762,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1318 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1318 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Choice2Of2 _1 ) -//# 1318 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1318 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'namedModuleDefnBlock)); //# 4770 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4773,10 +4773,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1321 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1321 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Choice1Of2 _1.Lid ) -//# 1321 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1321 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'namedModuleDefnBlock)); //# 4781 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4785,10 +4785,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1327 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1327 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 1327 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1327 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'wrappedNamedModuleDefn)); //# 4793 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4798,11 +4798,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1330 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1330 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBeginOrStruct()) _2 ) -//# 1330 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1330 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'wrappedNamedModuleDefn)); //# 4807 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4810,10 +4810,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1334 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1334 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 1334 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1334 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'wrappedNamedModuleDefn)); //# 4818 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4822,10 +4822,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1339 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1339 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 1339 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1339 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynMemberDefns)); //# 4830 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4833,20 +4833,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1345 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1345 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 1345 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1345 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_attributes)); //# 4841 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1348 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1348 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 1348 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1348 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_attributes)); //# 4851 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4854,10 +4854,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1353 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1353 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 1353 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1353 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'attributes)); //# 4862 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4866,10 +4866,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1356 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1356 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 @ _2 ) -//# 1356 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1356 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'attributes)); //# 4874 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4879,10 +4879,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1362 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1362 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 1362 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1362 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'attributeList)); //# 4887 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4890,10 +4890,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1365 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1365 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 1365 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1365 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'attributeList)); //# 4898 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4903,11 +4903,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1368 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1368 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _4 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedLBrackLess()) _2 ) -//# 1368 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1368 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'attributeList)); //# 4912 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4915,11 +4915,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1372 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1372 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _2 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedLBrackLess()) [] ) -//# 1372 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1372 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'attributeList)); //# 4924 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4927,10 +4927,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1379 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1379 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1] ) -//# 1379 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1379 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'attributeListElements)); //# 4935 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4940,10 +4940,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1382 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1382 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 @ [_3] ) -//# 1382 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1382 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'attributeListElements)); //# 4948 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4953,11 +4953,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1389 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1389 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let arg = match _3 with None -> mkSynUnit _1.Range | Some e -> e ({ TypeName=_1; ArgExpr=arg; Target=None; AppliesToGetterAndSetter=false; Range=_1.Range } : SynAttribute) ) -//# 1389 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1389 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'attribute)); //# 4962 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4968,11 +4968,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1394 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1394 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let arg = match _4 with None -> mkSynUnit _2.Range | Some e -> e ({ TypeName=_2; ArgExpr=arg; Target=_1; AppliesToGetterAndSetter=false; Range=_2.Range } : SynAttribute) ) -//# 1394 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1394 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'attribute)); //# 4977 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4984,11 +4984,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1399 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1399 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let arg = match _6 with None -> mkSynUnit _3.Range | Some e -> e ({ TypeName=_3; ArgExpr=arg; Target=_1; AppliesToGetterAndSetter=false; Range=_3.Range } : SynAttribute) ) -//# 1399 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1399 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'attribute)); //# 4993 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -4996,10 +4996,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1406 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1406 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Some(ident("module",(rhs parseState 1))) ) -//# 1406 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1406 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'attributeTarget)); //# 5004 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5007,10 +5007,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1409 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1409 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Some(ident("type",(rhs parseState 1))) ) -//# 1409 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1409 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'attributeTarget)); //# 5015 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5018,10 +5018,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1411 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1411 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Some(_1) ) -//# 1411 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1411 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'attributeTarget)); //# 5026 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5029,51 +5029,51 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1415 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1415 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if _1 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsSyntaxError()) Some(ident("return",(rhs parseState 1))) ) -//# 1415 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1415 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'attributeTarget)); //# 5038 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1420 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1420 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (true,StaticMemberFlags) ) -//# 1420 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1420 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'memberFlags)); //# 5048 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1421 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1421 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (false,NonVirtualMemberFlags) ) -//# 1421 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1421 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'memberFlags)); //# 5058 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1422 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1422 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (false,OverrideMemberFlags) ) -//# 1422 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1422 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'memberFlags)); //# 5068 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1423 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1423 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (false,OverrideMemberFlags) ) -//# 1423 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1423 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'memberFlags)); //# 5078 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5083,12 +5083,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1428 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1428 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let typars,lid,fixity,tpcs1,vis,xmlDoc = _2 let tpcs2 = _3 ComponentInfo(_1,typars,(tpcs1 @ tpcs2),lid,xmlDoc,fixity,vis,rangeOfLid lid) ) -//# 1428 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1428 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeNameInfo)); //# 5093 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5097,20 +5097,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1435 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1435 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 :: _3 ) -//# 1435 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1435 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconDefnList)); //# 5105 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1437 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1437 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 1437 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1437 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconDefnList)); //# 5115 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5118,10 +5118,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1442 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1442 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" TypeDefn(_1,SynTypeDefnRepr.Simple(SynTypeDefnSimpleRepr.None(_1.Range),_1.Range),[],_1.Range) ) -//# 1442 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1442 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconDefn)); //# 5126 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5130,14 +5130,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1445 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1445 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let nameRange = rhs parseState 1 let (tcDefRepr:SynTypeDefnRepr),members = _3 nameRange let declRange = unionRanges (rhs parseState 1) tcDefRepr.Range let mWhole = (declRange, members) ||> unionRangeWithListBy (fun (mem:SynMemberDefn) -> mem.Range) TypeDefn(_1, tcDefRepr, members, mWhole) ) -//# 1445 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1445 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconDefn)); //# 5142 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5146,11 +5146,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1452 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1452 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = (rhs parseState 1, _2) ||> unionRangeWithListBy (fun mem -> mem.Range) TypeDefn(_1,SynTypeDefnRepr.ObjectModel(TyconAugmentation,[],m),_2,m) ) -//# 1452 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1452 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconDefn)); //# 5155 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5164,7 +5164,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1456 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1456 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let vis,spats, az = _3,_5,_6 let nameRange = rhs parseState 1 let (tcDefRepr,members) = _8 nameRange @@ -5179,7 +5179,7 @@ let _fsyacc_reductions () = [| TypeDefn(_1,tcDefRepr,members,mWhole) ) -//# 1456 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1456 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconDefn)); //# 5184 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5192,11 +5192,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1482 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1482 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = unionRanges (rhs parseState 1) (match _7 with [] -> (match _5 with [] -> (rhs parseState 4) | _ -> (rhs parseState 5)) | _ -> (rhs parseState 7)) (fun nameRange -> _2 nameRange (checkForMultipleAugmentations m (_4 @ _5) _7)) ) -//# 1482 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1482 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconDefnRhsBlock)); //# 5201 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5208,12 +5208,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1486 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1486 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _6 then reportParseErrorAt (rhs parseState 6) (FSComp.SR.parsUnexpectedEndOfFileTypeDefinition()) let m = unionRanges (rhs parseState 1) (match _5 with [] -> (rhs parseState 4) | _ -> (rhs parseState 5)) (fun nameRange -> _2 nameRange (checkForMultipleAugmentations m (_4 @ _5) [])) ) -//# 1486 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1486 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconDefnRhsBlock)); //# 5218 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5222,11 +5222,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1491 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1491 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = rhs parseState 1 (fun nameRange -> _1 nameRange _2) ) -//# 1491 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1491 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconDefnRhsBlock)); //# 5231 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5234,11 +5234,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1500 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1500 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = _1.Range (fun nameRange augmentation -> SynTypeDefnRepr.Simple (_1,m),augmentation) ) -//# 1500 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1500 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconDefnRhs)); //# 5243 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5246,7 +5246,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1505 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1505 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let needsCheck,(kind,decls),mopt = _1 let m = match mopt with | None -> (lhs parseState).StartRange // create a zero-width range @@ -5256,7 +5256,7 @@ let _fsyacc_reductions () = [| reportParseErrorAt nameRange (FSComp.SR.parsEmptyTypeDefinition()) SynTypeDefnRepr.ObjectModel (kind,decls,m),augmentation) ) -//# 1505 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1505 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconDefnRhs)); //# 5261 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5264,7 +5264,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1516 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1516 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = lhs parseState let ty,arity = _3 (fun nameRange augmentation -> @@ -5273,7 +5273,7 @@ let _fsyacc_reductions () = [| if not (isNil augmentation) then raiseParseErrorAt m (FSComp.SR.parsAugmentationsIllegalOnDelegateType()) SynTypeDefnRepr.ObjectModel (TyconDelegate (ty,arity),[invoke],m),[]) ) -//# 1516 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1516 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconDefnRhs)); //# 5278 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5281,11 +5281,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1528 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1528 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let needsCheck,decls,mopt = _1 needsCheck,(TyconUnspecified, decls),mopt ) -//# 1528 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1528 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconClassDefn)); //# 5290 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5294,11 +5294,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1532 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1532 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = (rhs parseState 1, _2) ||> unionRangeWithListBy (fun (d:SynMemberDefn) -> d.Range) false,(_1,_2),Some(m) ) -//# 1532 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1532 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconClassDefn)); //# 5303 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5308,12 +5308,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1536 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1536 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedClassInterfaceOrStruct()) let m = (rhs parseState 1, _2) ||> unionRangeWithListBy (fun (d:SynMemberDefn) -> d.Range) false,(_1,_2),Some(m) ) -//# 1536 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1536 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconClassDefn)); //# 5318 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5321,11 +5321,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1541 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1541 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" // silent recovery false,(_1,[]),Some(rhs parseState 1) ) -//# 1541 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1541 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconClassDefn)); //# 5330 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5334,7 +5334,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1548 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1548 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _3 then reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsUnexpectedEndOfFileTypeDefinition()) let mopt = match _2 with @@ -5342,7 +5342,7 @@ let _fsyacc_reductions () = [| | _ -> None false,_2,mopt ) -//# 1548 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1548 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnBlockKindUnspecified)); //# 5347 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5351,14 +5351,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1556 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1556 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mopt = match _2 with | _::_ -> Some( (rhs parseState 1, _2) ||> unionRangeWithListBy (fun (d:SynMemberDefn) -> d.Range) ) | _ -> None true, _2, mopt ) -//# 1556 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1556 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnBlockKindUnspecified)); //# 5363 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5367,11 +5367,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1566 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1566 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _3 then reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsUnexpectedEndOfFileTypeDefinition()) _2 ) -//# 1566 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1566 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnBlock)); //# 5376 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5380,10 +5380,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1570 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1570 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 1570 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1570 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnBlock)); //# 5388 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5391,10 +5391,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1573 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1573 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 1573 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1573 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnBlock)); //# 5399 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5402,10 +5402,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1579 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1579 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 1579 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1579 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnMembers)); //# 5410 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5413,20 +5413,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1583 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1583 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 1583 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1583 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnMembers)); //# 5421 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1586 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1586 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 1586 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1586 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnMembers)); //# 5431 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5436,10 +5436,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1592 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1592 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 @ _3 ) -//# 1592 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1592 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnMembersAtLeastOne)); //# 5444 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5447,10 +5447,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1598 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1598 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 1598 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1598 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnMemberGetSet)); //# 5455 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5458,10 +5458,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1601 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1601 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 1601 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1601 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnMemberGetSet)); //# 5466 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5469,11 +5469,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1604 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1604 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedWith()) _2 ) -//# 1604 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1604 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnMemberGetSet)); //# 5478 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5481,10 +5481,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1610 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1610 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1] ) -//# 1610 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1610 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnMemberGetSetElements)); //# 5489 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5493,10 +5493,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1612 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1612 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1;_3] ) -//# 1612 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1612 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnMemberGetSetElements)); //# 5501 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5508,11 +5508,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1616 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1616 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mRhs = (_6 : SynExpr).Range (_1,_2,_3,_4,_6,mRhs) ) -//# 1616 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1616 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnMemberGetSetElement)); //# 5517 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5523,7 +5523,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1624 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1624 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mRhs = _5.Range let mWhole = unionRanges (rhs2 parseState 3 4) mRhs let optReturnType = _3 @@ -5531,7 +5531,7 @@ let _fsyacc_reductions () = [| (fun vis memFlagsBuilder attrs -> [ SynMemberDefn.Member (bindingBuilder (vis,_1,false,mBindLhs,NoSequencePointAtInvisibleBinding,optReturnType,_5,mRhs,[],attrs,Some(memFlagsBuilder MemberKind.Member)),unionRanges mWhole mBindLhs) ]) ) -//# 1624 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1624 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'memberCore)); //# 5536 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5542,7 +5542,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1633 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1633 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mWhole = (rhs parseState 2, _4) ||> unionRangeWithListBy (fun (_,_,_,_,_,m2) -> m2) let propertyNameBindingBuilder,_ = _2 let optPropertyType = _3 @@ -5693,27 +5693,27 @@ let _fsyacc_reductions () = [| Some <| SynMemberDefn.Member (Binding (vis, NormalBinding, isInline, isMutable, attrs, xmlDocAdjusted, valSynData, bindingPatAdjusted, rhsRetInfo, rhsExpr, mBindLhs, spBind),mWhole))) ) -//# 1633 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1633 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'memberCore)); //# 5698 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1810 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1810 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 1810 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1810 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'abstractMemberFlags)); //# 5708 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1811 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1811 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 1811 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1811 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'abstractMemberFlags)); //# 5718 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5723,11 +5723,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1817 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1817 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) [mkClassMemberLocalBindings(false,None,_1,_2,_3)] ) -//# 1817 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1817 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnMember)); //# 5732 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5737,11 +5737,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1821 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1821 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) [mkClassMemberLocalBindings(true,Some (rhs parseState 3),_1,_2,_4)] ) -//# 1821 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1821 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnMember)); //# 5746 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5753,12 +5753,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1825 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1825 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) let _,flags = _3 _4 _2 flags _1 ) -//# 1825 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1825 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnMember)); //# 5763 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5770,7 +5770,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1830 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1830 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not (isNil _1) then errorR(Error(FSComp.SR.parsAttributesAreNotPermittedOnInterfaceImplementations(),rhs parseState 1)) if Option.isSome _2 then errorR(Error(FSComp.SR.parsInterfacesHaveSameVisibilityAsEnclosingType(),rhs parseState 3)) let mWhole = @@ -5779,7 +5779,7 @@ let _fsyacc_reductions () = [| | Some(mems) -> (rhs2 parseState 3 4, mems) ||> unionRangeWithListBy (fun (mem:SynMemberDefn) -> mem.Range) [ SynMemberDefn.Interface (_4, _5, mWhole) ] ) -//# 1830 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1830 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnMember)); //# 5784 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5795,7 +5795,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1839 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1839 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let ty,arity = _8 let isInline,doc,id,explicitValTyparDecls = _4,grabXmlDoc(parseState,3),_5,_6 let getSetRangeOpt, getSet = _9 @@ -5809,7 +5809,7 @@ let _fsyacc_reductions () = [| let valSpfn = ValSpfn(_1,id,explicitValTyparDecls,ty,arity, isInline,false,doc, None,None,wholeRange) [ SynMemberDefn.AbstractSlot(valSpfn,AbstractMemberFlags (getSetAdjuster arity), wholeRange) ] ) -//# 1839 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1839 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnMember)); //# 5814 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5819,12 +5819,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1853 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1853 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not (isNil _1) then errorR(Error(FSComp.SR.parsAttributesIllegalOnInherit(),rhs parseState 1)) if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityIllegalOnInherit(),rhs parseState 1)) [ _3 ] ) -//# 1853 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1853 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnMember)); //# 5829 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5835,11 +5835,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1858 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1858 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) _3 None _1 false ) -//# 1858 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1858 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnMember)); //# 5844 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5850,11 +5850,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1862 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1862 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) _4 (Some (rhs parseState 3)) _1 true ) -//# 1862 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1862 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnMember)); //# 5859 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5866,12 +5866,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1866 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1866 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) let isStatic, flags = _3 _4 _1 isStatic flags ) -//# 1866 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1866 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnMember)); //# 5876 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5884,7 +5884,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1871 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1871 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = unionRanges (rhs2 parseState 3 6) _7.Range let expr = _7 let valSynData = SynValData (Some CtorMemberFlags, SynValInfo([SynInfo.InferSynArgInfoFromPat _4],SynInfo.unnamedRetVal), _5) @@ -5894,7 +5894,7 @@ let _fsyacc_reductions () = [| assert (match declPat with SynPatForConstructorDecl _ -> true | _ -> false) [ SynMemberDefn.Member(Binding (None,NormalBinding,false,false,_1,grabXmlDoc(parseState,3),valSynData, declPat,None,expr,m,NoSequencePointAtInvisibleBinding),m) ] ) -//# 1871 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1871 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnMember)); //# 5899 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5905,11 +5905,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1881 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1881 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) [ SynMemberDefn.NestedType(_5,None,rhs2 parseState 3 5) ] ) -//# 1881 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1881 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnMember)); //# 5914 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5920,7 +5920,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1888 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1888 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mRhs = rhs2 parseState 4 6 let doc = grabXmlDoc(parseState,4) let mValDecl = rhs2 parseState 1 6 @@ -5929,7 +5929,7 @@ let _fsyacc_reductions () = [| let fld = Field(attribs,isStatic,Some _4,_6,_2,doc,_3,mRhs) [ SynMemberDefn.ValField(fld, mValDecl) ]) ) -//# 1888 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1888 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'valDefnDecl)); //# 5934 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5942,7 +5942,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1900 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1900 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let doc = grabXmlDoc(parseState,5) let mValDecl = unionRanges (rhs parseState 1) _7.Range let mGetSetOpt, getSet = _8 @@ -5950,17 +5950,17 @@ let _fsyacc_reductions () = [| (fun attribs isStatic flags -> [ SynMemberDefn.AutoProperty(attribs, isStatic, _4, _5, getSet, flags, doc, _3, _7, mGetSetOpt, mValDecl) ]) ) -//# 1900 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1900 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'autoPropsDefnDecl)); //# 5955 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1910 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1910 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" None ) -//# 1910 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1910 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_typ)); //# 5965 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5968,10 +5968,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1911 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1911 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Some _2 ) -//# 1911 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1911 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_typ)); //# 5976 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5979,10 +5979,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1915 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1915 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let (LongIdentWithDots(lid,dotms)) = _3 in (None,LongIdentWithDots(ident(MangledGlobalName,rhs parseState 1)::lid, rhs parseState 2::dotms)) ) -//# 1915 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1915 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPatternLongIdent)); //# 5987 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -5990,10 +5990,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1916 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1916 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (None,_1) ) -//# 1916 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1916 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPatternLongIdent)); //# 5998 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6002,20 +6002,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1917 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1917 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (Some(_1), _2) ) -//# 1917 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1917 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPatternLongIdent)); //# 6010 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1921 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1921 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" None ) -//# 1921 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1921 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_access)); //# 6020 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6023,40 +6023,40 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1922 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1922 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Some(_1) ) -//# 1922 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1922 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_access)); //# 6031 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1926 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1926 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynAccess.Private ) -//# 1926 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1926 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'access)); //# 6041 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1927 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1927 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynAccess.Public ) -//# 1927 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1927 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'access)); //# 6051 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1928 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1928 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynAccess.Internal ) -//# 1928 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1928 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'access)); //# 6061 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6064,20 +6064,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1932 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1932 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Some(_1) ) -//# 1932 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1932 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_declVisibility)); //# 6072 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1933 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1933 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" None ) -//# 1933 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1933 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_declVisibility)); //# 6082 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6086,20 +6086,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1937 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1937 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Some(_2) ) -//# 1937 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1937 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_interfaceImplDefn)); //# 6094 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1938 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1938 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" None ) -//# 1938 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1938 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_interfaceImplDefn)); //# 6104 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6108,20 +6108,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1942 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1942 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 1942 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1942 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_classDefn)); //# 6116 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1943 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1943 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 1943 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1943 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_classDefn)); //# 6126 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6130,11 +6130,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1949 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1949 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mDecl = unionRanges (rhs parseState 1) ((_2): SynType).Range SynMemberDefn.Inherit(_2,_3,mDecl) ) -//# 1949 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1949 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'inheritsDefn)); //# 6139 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6145,11 +6145,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1953 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1953 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mDecl = unionRanges (rhs parseState 1) _4.Range SynMemberDefn.ImplicitInherit(_2,_4,_5,mDecl) ) -//# 1953 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1953 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'inheritsDefn)); //# 6154 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6157,12 +6157,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1957 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1957 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mDecl = (rhs parseState 1) if not _2 then errorR(Error(FSComp.SR.parsTypeNameCannotBeEmpty(), mDecl)) SynMemberDefn.Inherit(SynType.LongIdent(LongIdentWithDots([], [])), None,mDecl) ) -//# 1957 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1957 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'inheritsDefn)); //# 6167 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6170,20 +6170,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1962 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1962 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Some(_1) ) -//# 1962 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1962 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'optAsSpec)); //# 6178 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1963 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1963 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" None ) -//# 1963 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1963 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'optAsSpec)); //# 6188 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6191,10 +6191,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1966 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1966 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 1966 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1966 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'asSpec)); //# 6199 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6202,20 +6202,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1970 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1970 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Some(_1) ) -//# 1970 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1970 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'optBaseSpec)); //# 6210 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1971 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1971 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" None ) -//# 1971 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1971 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'optBaseSpec)); //# 6220 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6223,23 +6223,23 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1976 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1976 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if (_2).idText <> "base" then errorR(Error(FSComp.SR.parsInheritDeclarationsCannotHaveAsBindings(),rhs2 parseState 1 2)) ident("base",rhs parseState 2) ) -//# 1976 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1976 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'baseSpec)); //# 6233 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 1981 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1981 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" errorR(Error(FSComp.SR.parsInheritDeclarationsCannotHaveAsBindings(),rhs2 parseState 1 2)) ident("base",rhs parseState 2) ) -//# 1981 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1981 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'baseSpec)); //# 6244 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6248,10 +6248,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1988 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1988 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 1988 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1988 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'objectImplementationBlock)); //# 6256 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6260,11 +6260,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1991 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1991 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _3 then reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsUnexpectedEndOfFileObjectMembers()) _2 ) -//# 1991 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1991 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'objectImplementationBlock)); //# 6269 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6272,10 +6272,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 1995 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1995 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 1995 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 1995 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'objectImplementationBlock)); //# 6280 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6285,10 +6285,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2001 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2001 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 @ _3 ) -//# 2001 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2001 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'objectImplementationMembers)); //# 6293 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6297,10 +6297,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2004 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2004 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 2004 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2004 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'objectImplementationMembers)); //# 6305 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6311,10 +6311,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2010 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2010 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _3 None OverrideMemberFlags _1 ) -//# 2010 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2010 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'objectImplementationMember)); //# 6319 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6325,10 +6325,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2013 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2013 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _3 _1 false OverrideMemberFlags ) -//# 2013 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2013 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'objectImplementationMember)); //# 6333 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6337,10 +6337,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2016 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2016 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 2016 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2016 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'objectImplementationMember)); //# 6345 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6350,30 +6350,30 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2019 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2019 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 2019 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2019 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'objectImplementationMember)); //# 6358 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2023 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2023 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 2023 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2023 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'memberOrOverride)); //# 6368 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2024 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2024 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 2024 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2024 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'memberOrOverride)); //# 6378 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6386,11 +6386,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2032 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2032 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" errorR(Error(FSComp.SR.parsUnexpectedQuotationOperatorInTypeAliasDidYouMeanVerbatimString(), rhs parseState 4)) SynTypeDefnSimpleRepr.TypeAbbrev (ParserDetail.ThereWereSignificantParseErrorsSoDoNotTypecheckThisNode, SynType.LongIdent(_3), unionRanges (rhs parseState 1) _3.Range) ) -//# 2032 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2032 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynTypeDefnSimpleRepr)); //# 6395 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6400,12 +6400,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2037 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2037 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not (isNil _1) then errorR(Error(FSComp.SR.parsAttributesIllegalHere(),rhs parseState 1)) if Option.isSome _2 then errorR(Error(FSComp.SR.parsTypeAbbreviationsCannotHaveVisibilityDeclarations(),rhs parseState 2)) SynTypeDefnSimpleRepr.TypeAbbrev (ParserDetail.Ok, _3, unionRanges (rhs parseState 1) _3.Range) ) -//# 2037 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2037 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynTypeDefnSimpleRepr)); //# 6410 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6415,7 +6415,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2043 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2043 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not (isNil _1) then errorR(Error(FSComp.SR.parsAttributesIllegalHere(),rhs parseState 1)) let rangesOf3 = _3 |> List.map (function |Choice1Of2(ec)->ec.Range | Choice2Of2(uc)->uc.Range) let mWhole = (rhs2 parseState 1 2, rangesOf3) ||> List.fold unionRanges @@ -6432,7 +6432,7 @@ let _fsyacc_reductions () = [| _3 |> List.choose (function Choice2Of2 data -> Some(data) | Choice1Of2 _ -> failwith "huh?"), mWhole) ) -//# 2043 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2043 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynTypeDefnSimpleRepr)); //# 6437 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6442,11 +6442,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2061 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2061 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not (isNil _1) then errorR(Error(FSComp.SR.parsAttributesIllegalHere(),rhs parseState 1)) SynTypeDefnSimpleRepr.Record (_2,_3,lhs parseState) ) -//# 2061 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2061 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynTypeDefnSimpleRepr)); //# 6451 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6457,13 +6457,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2066 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2066 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not (isNil _1) then errorR(Error(FSComp.SR.parsAttributesIllegalHere(),rhs parseState 1)) libraryOnlyError (lhs parseState) if Option.isSome _2 then errorR(Error(FSComp.SR.parsInlineAssemblyCannotHaveVisibilityDeclarations(),rhs parseState 2)) _4 ) -//# 2066 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2066 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynTypeDefnSimpleRepr)); //# 6468 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6472,10 +6472,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2075 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2075 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 2075 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2075 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'braceFieldDeclList)); //# 6480 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6484,11 +6484,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2078 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2078 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBrace()) _2 ) -//# 2078 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2078 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'braceFieldDeclList)); //# 6493 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6496,10 +6496,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2082 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2082 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 2082 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2082 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'braceFieldDeclList)); //# 6504 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6507,10 +6507,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2086 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2086 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2,true ) -//# 2086 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2086 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'anonRecdType)); //# 6515 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6518,10 +6518,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2088 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2088 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1,false ) -//# 2088 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2088 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'anonRecdType)); //# 6526 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6530,10 +6530,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2093 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2093 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 2093 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2093 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'braceBarFieldDeclListCore)); //# 6538 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6542,11 +6542,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2096 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2096 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBraceBar()) _2 ) -//# 2096 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2096 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'braceBarFieldDeclListCore)); //# 6551 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6554,10 +6554,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2100 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2100 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 2100 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2100 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'braceBarFieldDeclListCore)); //# 6562 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6565,62 +6565,62 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2104 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2104 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" libraryOnlyError (lhs parseState) let lhsm = lhs parseState SynTypeDefnSimpleRepr.LibraryOnlyILAssembly (ParseAssemblyCodeType _2 (rhs parseState 2),lhsm) ) -//# 2104 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2104 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'inlineAssemblyTyconRepr)); //# 6575 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2109 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2109 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" TyconClass ) -//# 2109 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2109 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classOrInterfaceOrStruct)); //# 6585 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2110 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2110 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" TyconInterface ) -//# 2110 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2110 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classOrInterfaceOrStruct)); //# 6595 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2111 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2111 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" TyconStruct ) -//# 2111 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2111 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classOrInterfaceOrStruct)); //# 6605 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2114 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2114 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 2114 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2114 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'interfaceMember)); //# 6615 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2115 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2115 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 2115 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2115 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'interfaceMember)); //# 6625 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6629,10 +6629,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2119 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2119 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [], _2.Lid,false,[],_1,grabXmlDoc(parseState,2) ) -//# 2119 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2119 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconNameAndTyparDecls)); //# 6637 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6642,10 +6642,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2122 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2122 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2, _3.Lid,false,[],_1,grabXmlDoc(parseState,2) ) -//# 2122 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2122 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconNameAndTyparDecls)); //# 6650 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6655,11 +6655,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2125 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2125 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let tps,tpcs = _3 tps, _2.Lid,true,tpcs,_1,grabXmlDoc(parseState,2) ) -//# 2125 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2125 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tyconNameAndTyparDecls)); //# 6664 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6667,10 +6667,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2129 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2129 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [ TyparDecl([],_1) ] ) -//# 2129 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2129 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'prefixTyparDecls)); //# 6675 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6679,10 +6679,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2130 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2130 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" List.rev _2 ) -//# 2130 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2130 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'prefixTyparDecls)); //# 6687 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6691,10 +6691,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2133 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2133 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _3 :: _1 ) -//# 2133 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2133 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typarDeclList)); //# 6699 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6702,10 +6702,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2134 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2134 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1] ) -//# 2134 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2134 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typarDeclList)); //# 6710 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6714,10 +6714,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2138 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2138 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" TyparDecl(_1,_2) ) -//# 2138 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2138 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typarDecl)); //# 6722 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6729,11 +6729,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2144 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2144 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _2 then warning(Error(FSComp.SR.parsNonAdjacentTypars(),rhs2 parseState 2 5)) List.rev _3, _4 ) -//# 2144 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2144 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'postfixTyparDecls)); //# 6738 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6741,10 +6741,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2151 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2151 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (List.rev _1,true) ) -//# 2151 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2151 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'explicitValTyparDeclsCore)); //# 6749 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6752,20 +6752,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2153 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2153 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (List.rev _1,false) ) -//# 2153 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2153 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'explicitValTyparDeclsCore)); //# 6760 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2155 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2155 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ([],false) ) -//# 2155 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2155 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'explicitValTyparDeclsCore)); //# 6770 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6777,12 +6777,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2159 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2159 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _2 then warning(Error(FSComp.SR.parsNonAdjacentTypars(),rhs2 parseState 2 5)) let tps,flex = _3 SynValTyparDecls(tps,flex,_4) ) -//# 2159 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2159 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'explicitValTyparDecls)); //# 6787 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6790,20 +6790,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2165 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2165 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 2165 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2165 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_explicitValTyparDecls)); //# 6798 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2167 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2167 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynValTyparDecls([],true,[]) ) -//# 2167 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2167 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_explicitValTyparDecls)); //# 6808 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6811,30 +6811,30 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2171 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2171 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Some _1 ) -//# 2171 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2171 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_explicitValTyparDecls2)); //# 6819 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2173 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2173 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" None ) -//# 2173 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2173 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_explicitValTyparDecls2)); //# 6829 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2179 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2179 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 2179 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2179 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_typeConstraints)); //# 6839 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6842,10 +6842,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2181 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2181 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" List.rev _2 ) -//# 2181 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2181 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_typeConstraints)); //# 6850 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6854,10 +6854,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2186 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2186 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _3 :: _1 ) -//# 2186 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2186 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeConstraints)); //# 6862 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6865,10 +6865,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2187 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2187 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1] ) -//# 2187 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2187 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeConstraints)); //# 6873 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6877,10 +6877,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2193 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2193 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" libraryOnlyError (lhs parseState); WhereTyparDefaultsToType(_2,_4,lhs parseState) ) -//# 2193 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2193 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeConstraint)); //# 6885 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6889,10 +6889,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2196 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2196 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" WhereTyparSubtypeOfType(_1,_3,lhs parseState) ) -//# 2196 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2196 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeConstraint)); //# 6897 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6900,10 +6900,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2199 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2199 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" WhereTyparIsValueType(_1,lhs parseState) ) -//# 2199 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2199 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeConstraint)); //# 6908 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6912,11 +6912,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2202 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2202 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if _3 <> "not" then reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsUnexpectedIdentifier(_3)) WhereTyparIsReferenceType(_1,lhs parseState) ) -//# 2202 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2202 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeConstraint)); //# 6921 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6924,10 +6924,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2206 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2206 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" WhereTyparSupportsNull(_1,lhs parseState) ) -//# 2206 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2206 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeConstraint)); //# 6932 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6937,11 +6937,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2209 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2209 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let tp = _1 WhereTyparSupportsMember([ SynType.Var(tp, tp.Range) ],_4,lhs parseState) ) -//# 2209 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2209 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeConstraint)); //# 6946 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6952,10 +6952,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2213 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2213 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" WhereTyparSupportsMember(List.rev(_2),_6,lhs parseState) ) -//# 2213 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2213 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeConstraint)); //# 6960 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6964,10 +6964,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2216 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2216 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let _ltm,_gtm,args,_commas,mWhole = _4 in WhereTyparIsDelegate(_1, args, unionRanges _1.Range mWhole) ) -//# 2216 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2216 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeConstraint)); //# 6972 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6977,12 +6977,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2219 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2219 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" match _3 with | "enum" -> let _ltm,_gtm,args,_commas,mWhole = _4 in WhereTyparIsEnum(_1, args, unionRanges _1.Range mWhole) | nm -> raiseParseErrorAt (rhs parseState 3) (FSComp.SR.parsUnexpectedIdentifier(nm)) ) -//# 2219 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2219 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeConstraint)); //# 6987 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -6991,14 +6991,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2224 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2224 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" match _3 with | "comparison" -> WhereTyparIsComparable(_1,lhs parseState) | "equality" -> WhereTyparIsEquatable(_1,lhs parseState) | "unmanaged" -> WhereTyparIsUnmanaged(_1,lhs parseState) | nm -> raiseParseErrorAt (rhs parseState 3) (FSComp.SR.parsUnexpectedIdentifier(nm)) ) -//# 2224 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2224 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeConstraint)); //# 7003 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7007,10 +7007,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2231 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2231 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _3::_1 ) -//# 2231 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2231 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typarAlts)); //# 7015 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7018,10 +7018,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2232 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2232 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1] ) -//# 2232 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2232 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typarAlts)); //# 7026 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7030,10 +7030,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2239 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2239 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 _1 ) -//# 2239 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2239 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Choice list)); //# 7038 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7043,10 +7043,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2242 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2242 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 :: _3 _2 ) -//# 2242 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2242 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Choice list)); //# 7051 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7054,20 +7054,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2245 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2245 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1] ) -//# 2245 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2245 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Choice list)); //# 7062 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2248 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2248 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" grabXmlDoc(parseState,1) ) -//# 2248 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2248 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'barAndgrabXmlDoc)); //# 7072 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7077,10 +7077,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2251 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2251 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (fun xmlDoc -> _1 xmlDoc :: _3 _2) ) -//# 2251 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2251 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'attrUnionCaseDecls)); //# 7085 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7088,10 +7088,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2252 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2252 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (fun xmlDoc -> [ _1 xmlDoc ]) ) -//# 2252 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2252 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'attrUnionCaseDecls)); //# 7096 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7102,13 +7102,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2257 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2257 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsUnionCasesCannotHaveVisibilityDeclarations(),rhs parseState 2)) let mDecl = rhs parseState 3 (fun xmlDoc -> Choice2Of2 (UnionCase ( _1, _3,UnionCaseFields [],xmlDoc,None,mDecl))) ) -//# 2257 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2257 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'attrUnionCaseDecl)); //# 7113 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7120,13 +7120,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2263 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2263 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsUnionCasesCannotHaveVisibilityDeclarations(),rhs parseState 2)) let mDecl = rhs2 parseState 3 5 (fun xmlDoc -> Choice2Of2 (UnionCase ( _1, _3,UnionCaseFields _5,xmlDoc,None,mDecl))) ) -//# 2263 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2263 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'attrUnionCaseDecl)); //# 7131 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7138,14 +7138,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2269 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2269 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsUnionCasesCannotHaveVisibilityDeclarations(),rhs parseState 2)) libraryOnlyWarning(lhs parseState) let mDecl = rhs2 parseState 3 5 (fun xmlDoc -> Choice2Of2 (UnionCase ( _1, _3,UnionCaseFullType _5,xmlDoc,None,mDecl))) ) -//# 2269 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2269 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'attrUnionCaseDecl)); //# 7150 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7157,13 +7157,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2276 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2276 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if Option.isSome _2 then errorR(Error(FSComp.SR.parsEnumFieldsCannotHaveVisibilityDeclarations(),rhs parseState 2)) let mDecl = rhs2 parseState 3 5 (fun xmlDoc -> Choice1Of2 (EnumCase ( _1, _3,_5,xmlDoc,mDecl))) ) -//# 2276 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2276 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'attrUnionCaseDecl)); //# 7168 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7171,10 +7171,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2284 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2284 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 2284 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2284 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'unionCaseName)); //# 7179 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7182,10 +7182,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2287 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2287 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ident(opNameCons,rhs parseState 2) ) -//# 2287 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2287 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'unionCaseName)); //# 7190 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7193,10 +7193,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2290 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2290 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ident(opNameNil,rhs2 parseState 2 3) ) -//# 2290 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2290 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'unionCaseName)); //# 7201 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7205,10 +7205,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2294 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2294 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Choice2Of2 (UnionCase ( [], _1,UnionCaseFields [],PreXmlDoc.Empty,None,rhs parseState 1)) ) -//# 2294 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2294 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'firstUnionCaseDeclOfMany)); //# 7213 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7218,10 +7218,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2297 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2297 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Choice1Of2 (EnumCase ([],_1,_3,PreXmlDoc.Empty,rhs2 parseState 1 3)) ) -//# 2297 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2297 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'firstUnionCaseDeclOfMany)); //# 7226 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7230,10 +7230,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2300 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2300 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 2300 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2300 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'firstUnionCaseDeclOfMany)); //# 7238 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7242,10 +7242,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2304 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2304 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Choice2Of2 (UnionCase ( [],_1,UnionCaseFields _3,PreXmlDoc.Empty,None,rhs2 parseState 1 3)) ) -//# 2304 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2304 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'firstUnionCaseDecl)); //# 7250 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7255,10 +7255,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2307 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2307 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Choice1Of2 (EnumCase ([],_1,_3,PreXmlDoc.Empty,rhs2 parseState 1 3)) ) -//# 2307 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2307 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'firstUnionCaseDecl)); //# 7263 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7267,10 +7267,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2310 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2310 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1::_3 ) -//# 2310 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2310 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'unionCaseReprElements)); //# 7275 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7278,10 +7278,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2311 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2311 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1] ) -//# 2311 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2311 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'unionCaseReprElements)); //# 7286 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7290,10 +7290,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2314 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2314 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkNamedField(_1, _3) ) -//# 2314 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2314 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'unionCaseReprElement)); //# 7298 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7301,10 +7301,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2315 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2315 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkAnonField _1 ) -//# 2315 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2315 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'unionCaseReprElement)); //# 7309 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7312,11 +7312,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2319 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2319 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" errorR(Deprecated(FSComp.SR.parsConsiderUsingSeparateRecordType(),lhs parseState)) _1 ) -//# 2319 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2319 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'unionCaseRepr)); //# 7321 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7324,10 +7324,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2323 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2323 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 2323 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2323 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'unionCaseRepr)); //# 7332 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7337,10 +7337,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2328 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2328 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 :: _3 ) -//# 2328 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2328 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recdFieldDeclList)); //# 7345 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7349,10 +7349,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2331 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2331 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1] ) -//# 2331 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2331 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recdFieldDeclList)); //# 7357 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7361,13 +7361,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2336 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2336 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let fld = _2 _1 false let (Field(a,b,c,d,e,f,vis,g)) = fld if Option.isSome vis then errorR(Error(FSComp.SR.parsRecordFieldsCannotHaveVisibilityDeclarations(),rhs parseState 2)) Field(a,b,c,d,e,f,None,g) ) -//# 2336 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2336 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recdFieldDecl)); //# 7372 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7378,12 +7378,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2344 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2344 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mRhs = rhs2 parseState 3 5 let xmlDoc = grabXmlDoc(parseState,3) (fun attrs stat -> Field(attrs, stat,Some _3,_5,_1,xmlDoc,_2,mRhs)) ) -//# 2344 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2344 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'fieldDecl)); //# 7388 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7392,20 +7392,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2352 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2352 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExceptionDefn(_1,_2, (_1.Range,_2) ||> unionRangeWithListBy (fun cd -> cd.Range) ) ) -//# 2352 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2352 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExceptionDefn)); //# 7400 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2356 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2356 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" grabXmlDoc(parseState,1) ) -//# 2356 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2356 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'exceptionAndGrabDoc)); //# 7410 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7417,10 +7417,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2361 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2361 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExceptionDefnRepr(_2,_4,_5,_1,_3,(match _5 with None -> rhs2 parseState 1 4 | Some p -> unionRanges (rangeOfLongIdent p) (rhs2 parseState 1 4))) ) -//# 2361 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2361 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExceptionDefnRepr)); //# 7425 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7428,10 +7428,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2366 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2366 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" UnionCase ( [], _1,UnionCaseFields [],PreXmlDoc.Empty,None,lhs parseState) ) -//# 2366 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2366 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'exconIntro)); //# 7436 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7440,20 +7440,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2369 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2369 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" UnionCase ( [], _1,UnionCaseFields _3,PreXmlDoc.Empty,None,lhs parseState) ) -//# 2369 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2369 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'exconIntro)); //# 7448 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2372 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2372 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" None ) -//# 2372 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2372 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'exconRepr)); //# 7458 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7461,10 +7461,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2373 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2373 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Some (_2.Lid) ) -//# 2373 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2373 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'exconRepr)); //# 7469 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7472,10 +7472,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2376 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2376 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 2376 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2376 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.LongIdentWithDots)); //# 7480 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7485,7 +7485,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2385 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2385 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mLetKwd = rhs parseState 1 let isUse = _1 let isRec = _2 @@ -7506,7 +7506,7 @@ let _fsyacc_reductions () = [| [],binds), bindingSetRange) ) -//# 2385 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2385 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'defnBindings)); //# 7511 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7514,11 +7514,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2407 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2407 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let bindRange = lhs parseState BindingSetPreAttrs(bindRange, false,false,_1,bindRange) ) -//# 2407 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2407 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'defnBindings)); //# 7523 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7526,14 +7526,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2414 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2414 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mDoKwd = rhs parseState 1 let mWhole = unionRanges mDoKwd _2.Range // any attributes prior to the 'let' are left free, e.g. become top-level attributes // associated with the module, 'main' function or assembly depending on their target BindingSetPreAttrs(mDoKwd,false,false,(fun attrs vis -> attrs,[mkSynDoBinding (vis,true,_2,mWhole)]), mWhole) ) -//# 2414 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2414 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'doBinding)); //# 7538 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7544,7 +7544,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2424 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2424 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mLetKwd = rhs parseState 1 let isUse = _1 let isRec = _2 @@ -7566,7 +7566,7 @@ let _fsyacc_reductions () = [| [],binds), bindingSetRange), (unionRanges mLetKwd bindingSetRange) ) -//# 2424 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2424 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'hardwhiteLetBindings)); //# 7571 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7575,7 +7575,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2450 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2450 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mLetKwd = rhs parseState 1 let bindingSetRange = unionRanges mLetKwd _2.Range let seqPt = NoSequencePointAtDoBinding @@ -7583,7 +7583,7 @@ let _fsyacc_reductions () = [| // associated with the module, 'main' function or assembly depending on their target BindingSetPreAttrs(mLetKwd,false,false,(fun attrs vis -> attrs,[mkSynDoBinding (vis,true,_2,bindingSetRange)]),bindingSetRange), _2 ) -//# 2450 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2450 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'hardwhiteDoBinding)); //# 7588 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7591,10 +7591,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2460 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2460 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 2460 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2460 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnBindings)); //# 7599 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7602,10 +7602,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2461 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2461 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 2461 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2461 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnBindings)); //# 7610 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7613,10 +7613,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2462 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2462 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let b,m = _1 in b ) -//# 2462 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2462 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnBindings)); //# 7621 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7624,20 +7624,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2463 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2463 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" fst _1 ) -//# 2463 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2463 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'classDefnBindings)); //# 7632 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2469 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2469 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (fun _ m -> ()) ) -//# 2469 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2469 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'hardwhiteDefnBindingsTerminator)); //# 7642 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7645,14 +7645,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2471 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2471 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (fun kwd m -> reportParseErrorAt m (match kwd with | "let!" -> FSComp.SR.parsUnmatchedLetBang() | "use!" -> FSComp.SR.parsUnmatchedUseBang() | "use" -> FSComp.SR.parsUnmatchedUse() | _ (*"let" *) -> FSComp.SR.parsUnmatchedLet())) ) -//# 2471 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2471 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'hardwhiteDefnBindingsTerminator)); //# 7657 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7665,7 +7665,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2480 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2480 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let rty,vis,nm,args = _2,_3,_4,_7 let xmlDoc = grabXmlDoc(parseState,1) let nmm = rhs parseState 3 @@ -7682,10 +7682,10 @@ let _fsyacc_reductions () = [| let bindingId = SynPat.LongIdent (LongIdentWithDots([nm],[]), None, Some noInferredTypars, SynConstructorArgs.Pats [SynPat.Tuple(false,args,argsm)], vis, nmm) let binding = mkSynBinding (xmlDoc, bindingId) - (vis, false, false, mBindLhs, NoSequencePointAtInvisibleBinding, Some rty ,rhsExpr, mRhs, [], attrs, None) + (vis, false, false, mBindLhs, NoSequencePointAtInvisibleBinding, Some rty, rhsExpr, mRhs, [], attrs, None) [], [binding]) ) -//# 2480 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2480 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'cPrototype)); //# 7690 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7693,10 +7693,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2502 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2502 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" List.rev _1 ) -//# 2502 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2502 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'cArgs)); //# 7701 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7704,20 +7704,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2505 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2505 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1] ) -//# 2505 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2505 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'cArgs)); //# 7712 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2507 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2507 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 2507 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2507 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'cArgs)); //# 7722 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7726,10 +7726,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2513 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2513 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _3 :: _1 ) -//# 2513 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2513 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'cMoreArgs)); //# 7734 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7738,10 +7738,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2516 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2516 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_3; _1] ) -//# 2516 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2516 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'cMoreArgs)); //# 7746 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7750,10 +7750,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2522 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2522 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = lhs parseState in SynPat.Typed(SynPat.Wild m,_2,m) |> addAttribs _1 ) -//# 2522 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2522 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'cArg)); //# 7758 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7763,10 +7763,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2525 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2525 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = lhs parseState in SynPat.Typed(SynPat.Named (SynPat.Wild m,_3,false,None,m),_2,m) |> addAttribs _1 ) -//# 2525 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2525 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'cArg)); //# 7771 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7774,11 +7774,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2530 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2530 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = _1.Range SynType.App(SynType.LongIdent(_1),None,[],[],None,false,m) ) -//# 2530 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2530 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'cType)); //# 7783 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7787,11 +7787,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2534 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2534 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = lhs parseState SynType.App(SynType.LongIdent(LongIdentWithDots([ident("[]",m)],[])),None,[_1],[],None,true,m) ) -//# 2534 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2534 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'cType)); //# 7796 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7799,11 +7799,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2538 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2538 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = lhs parseState SynType.App(SynType.LongIdent(LongIdentWithDots([ident("nativeptr",m)],[])),None,[_1],[],None,true,m) ) -//# 2538 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2538 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'cType)); //# 7808 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7811,22 +7811,22 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2542 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2542 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = lhs parseState SynType.App(SynType.LongIdent(LongIdentWithDots([ident("byref",m)],[])),None,[_1],[],None,true,m) ) -//# 2542 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2542 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'cType)); //# 7820 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2546 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2546 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = lhs parseState SynType.App(SynType.LongIdent(LongIdentWithDots([ident("nativeint",m)],[])),None,[],[],None,true,m) ) -//# 2546 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2546 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'cType)); //# 7831 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7835,10 +7835,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2553 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2553 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynReturnInfo((_2,SynArgInfo(_1,false,None)),rhs parseState 2) ) -//# 2553 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2553 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'cRetType)); //# 7843 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7846,11 +7846,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2556 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2556 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = rhs parseState 2 SynReturnInfo((SynType.App(SynType.LongIdent(LongIdentWithDots([ident("unit",m)],[])),None,[],[],None,false,m),SynArgInfo(_1,false,None)),m) ) -//# 2556 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2556 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'cRetType)); //# 7855 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7859,7 +7859,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2562 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2562 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let (moreBindings, moreBindingRanges) = List.unzip _2 let moreLocalBindingsLastRange = if moreBindingRanges.IsEmpty then None else Some (List.last moreBindingRanges) match _1 with @@ -7872,7 +7872,7 @@ let _fsyacc_reductions () = [| | None -> moreLocalBindingsLastRange, (fun _attrs _vis _letm -> moreBindings) ) -//# 2562 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2562 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'localBindings)); //# 7877 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7881,23 +7881,23 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2577 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2577 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mLetKwd = rhs parseState 1 (match _2 with | Some (localBindingRange,attrLocalBindingBuilder) -> (attrLocalBindingBuilder [] None mLetKwd false,localBindingRange) :: _3 | None -> _3) ) -//# 2577 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2577 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moreLocalBindings)); //# 7892 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2583 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2583 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 2583 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2583 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moreLocalBindings)); //# 7902 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7906,23 +7906,23 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2589 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2589 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let attrs2 = _1 let localBindingRange,localBindingBuilder = _2 let attrLocalBindingBuilder = (fun attrs vis mLetKwd _ -> localBindingBuilder (attrs@attrs2) vis mLetKwd) Some(localBindingRange,attrLocalBindingBuilder) ) -//# 2589 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2589 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'attr_localBinding)); //# 7917 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2595 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2595 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" None ) -//# 2595 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2595 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'attr_localBinding)); //# 7927 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7934,7 +7934,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2601 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2601 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let (expr:SynExpr),opts = _6 let eqm = rhs parseState 5 let mRhs = expr.Range @@ -7948,7 +7948,7 @@ let _fsyacc_reductions () = [| bindingBuilder (vis,_1,_2,mBindLhs,spBind,optReturnType,expr,mRhs,opts,attrs,None)) localBindingRange,localBindingBuilder ) -//# 2601 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2601 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'localBinding)); //# 7953 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7959,7 +7959,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2615 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2615 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mWhole = rhs2 parseState 3 5 let mRhs = rhs parseState 5 let optReturnType = _4 @@ -7972,7 +7972,7 @@ let _fsyacc_reductions () = [| bindingBuilder (vis,_1,_2,mBindLhs,spBind,optReturnType,arbExpr("localBinding1",zeroWidthAtEnd),mRhs,[],attrs,None)) mWhole,localBindingBuilder ) -//# 2615 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2615 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'localBinding)); //# 7977 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -7984,7 +7984,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2628 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2628 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _5 then reportParseErrorAt (rhs parseState 5) (FSComp.SR.parsUnexpectedEndOfFileDefinition()) let optReturnType = _4 let mWhole = match optReturnType with None -> rhs parseState 3 | Some _ -> rhs2 parseState 3 4 @@ -7996,7 +7996,7 @@ let _fsyacc_reductions () = [| bindingBuilder (vis,_1,_2,mBindLhs,spBind,optReturnType,arbExpr("localBinding2",mRhs),mRhs,[],attrs,None)) mWhole,localBindingBuilder ) -//# 2628 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2628 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'localBinding)); //# 8001 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8005,10 +8005,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2643 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2643 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 2643 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2643 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typedExprWithStaticOptimizationsBlock)); //# 8013 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8017,12 +8017,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2646 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2646 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _3 then reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsUnexpectedEndOfFile()) let a,b = _2 (exprFromParseError a, b) ) -//# 2646 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2646 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typedExprWithStaticOptimizationsBlock)); //# 8027 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8030,10 +8030,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2651 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2651 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 2651 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2651 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typedExprWithStaticOptimizationsBlock)); //# 8038 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8042,10 +8042,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2654 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2654 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1, List.rev _2 ) -//# 2654 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2654 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typedExprWithStaticOptimizations)); //# 8050 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8054,20 +8054,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2657 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2657 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 :: _1 ) -//# 2657 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2657 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_staticOptimizations)); //# 8062 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2658 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2658 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 2658 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2658 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_staticOptimizations)); //# 8072 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8076,10 +8076,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2661 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2661 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (_2,_4) ) -//# 2661 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2661 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'staticOptimization)); //# 8084 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8088,10 +8088,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2664 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2664 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _3 :: _1 ) -//# 2664 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2664 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'staticOptimizationConditions)); //# 8096 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8099,10 +8099,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2665 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2665 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1 ] ) -//# 2665 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2665 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'staticOptimizationConditions)); //# 8107 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8111,10 +8111,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2668 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2668 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" WhenTyparTyconEqualsTycon(_1,_3,lhs parseState) ) -//# 2668 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2668 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'staticOptimizationCondition)); //# 8119 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8122,10 +8122,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2669 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2669 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" WhenTyparIsStruct(_1,lhs parseState) ) -//# 2669 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2669 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'staticOptimizationCondition)); //# 8130 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8133,11 +8133,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2672 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2672 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if snd _1 then errorR(Error(FSComp.SR.lexOutsideEightBitSigned(), lhs parseState)) SynConst.SByte (fst _1) ) -//# 2672 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2672 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rawConstant)); //# 8142 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8145,10 +8145,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2674 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2674 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynConst.Byte _1 ) -//# 2674 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2674 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rawConstant)); //# 8153 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8156,11 +8156,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2675 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2675 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if snd _1 then errorR(Error(FSComp.SR.lexOutsideSixteenBitSigned(), lhs parseState)) SynConst.Int16 (fst _1) ) -//# 2675 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2675 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rawConstant)); //# 8165 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8168,10 +8168,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2677 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2677 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynConst.UInt16 _1 ) -//# 2677 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2677 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rawConstant)); //# 8176 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8179,11 +8179,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2678 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2678 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if snd _1 then errorR(Error(FSComp.SR.lexOutsideThirtyTwoBitSigned(), lhs parseState)) SynConst.Int32 (fst _1) ) -//# 2678 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2678 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rawConstant)); //# 8188 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8191,10 +8191,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2680 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2680 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynConst.UInt32 _1 ) -//# 2680 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2680 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rawConstant)); //# 8199 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8202,11 +8202,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2681 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2681 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if snd _1 then errorR(Error(FSComp.SR.lexOutsideSixtyFourBitSigned(), lhs parseState)) SynConst.Int64 (fst _1) ) -//# 2681 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2681 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rawConstant)); //# 8211 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8214,10 +8214,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2683 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2683 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynConst.UInt64 _1 ) -//# 2683 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2683 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rawConstant)); //# 8222 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8225,10 +8225,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2684 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2684 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynConst.IntPtr _1 ) -//# 2684 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2684 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rawConstant)); //# 8233 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8236,10 +8236,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2685 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2685 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynConst.UIntPtr _1 ) -//# 2685 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2685 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rawConstant)); //# 8244 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8247,10 +8247,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2686 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2686 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynConst.Single _1 ) -//# 2686 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2686 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rawConstant)); //# 8255 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8258,10 +8258,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2687 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2687 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynConst.Double _1 ) -//# 2687 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2687 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rawConstant)); //# 8266 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8269,10 +8269,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2688 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2688 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynConst.Char _1 ) -//# 2688 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2688 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rawConstant)); //# 8277 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8280,10 +8280,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2689 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2689 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynConst.Decimal _1 ) -//# 2689 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2689 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rawConstant)); //# 8288 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8291,10 +8291,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2690 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2690 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynConst.UserNum _1 ) -//# 2690 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2690 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rawConstant)); //# 8299 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8302,10 +8302,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2691 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2691 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynConst.String (_1,lhs parseState) ) -//# 2691 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2691 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rawConstant)); //# 8310 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8313,10 +8313,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2692 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2692 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynConst.Bytes (_1,lhs parseState) ) -//# 2692 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2692 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rawConstant)); //# 8321 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8326,13 +8326,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2696 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2696 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if _2 <> "/" then reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnexpectedOperatorForUnitOfMeasure()) if fst _3 = 0 then reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsIllegalDenominatorForMeasureExponent()) if (snd _1) || (snd _3) then errorR(Error(FSComp.SR.lexOutsideThirtyTwoBitSigned(), lhs parseState)) SynRationalConst.Rational(fst _1, fst _3, lhs parseState) ) -//# 2696 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2696 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rationalConstant)); //# 8337 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8342,13 +8342,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2702 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2702 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if _3 <> "/" then reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsUnexpectedOperatorForUnitOfMeasure()) if fst _4 = 0 then reportParseErrorAt (rhs parseState 4) (FSComp.SR.parsIllegalDenominatorForMeasureExponent()) if (snd _2) || (snd _4) then errorR(Error(FSComp.SR.lexOutsideThirtyTwoBitSigned(), lhs parseState)) SynRationalConst.Negate(SynRationalConst.Rational(fst _2, fst _4, lhs parseState)) ) -//# 2702 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2702 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rationalConstant)); //# 8353 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8356,11 +8356,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2707 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2707 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if snd _1 then errorR(Error(FSComp.SR.lexOutsideThirtyTwoBitSigned(), lhs parseState)) SynRationalConst.Integer(fst _1) ) -//# 2707 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2707 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rationalConstant)); //# 8365 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8368,11 +8368,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2710 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2710 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if snd _2 then errorR(Error(FSComp.SR.lexOutsideThirtyTwoBitSigned(), lhs parseState)) SynRationalConst.Negate(SynRationalConst.Integer(fst _2)) ) -//# 2710 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2710 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rationalConstant)); //# 8377 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8380,11 +8380,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2714 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2714 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if snd _1 then errorR(Error(FSComp.SR.lexOutsideThirtyTwoBitSigned(), lhs parseState)) SynRationalConst.Integer(fst _1) ) -//# 2714 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2714 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicUnsignedRationalConstant)); //# 8389 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8393,10 +8393,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2718 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2718 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 2718 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2718 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicUnsignedRationalConstant)); //# 8401 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8404,10 +8404,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2721 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2721 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 2721 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2721 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicRationalConstant)); //# 8412 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8415,10 +8415,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2724 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2724 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynRationalConst.Negate(_2) ) -//# 2724 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2724 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicRationalConstant)); //# 8423 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8426,10 +8426,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2727 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2727 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 2727 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2727 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'constant)); //# 8434 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8438,10 +8438,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2728 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2728 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynConst.Measure(_1, _3) ) -//# 2728 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2728 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'constant)); //# 8446 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8449,11 +8449,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2732 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2732 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let xmlDoc = grabXmlDoc(parseState,1) mkSynBinding (xmlDoc,_1), rhs parseState 1 ) -//# 2732 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2732 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'bindingPattern)); //# 8458 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8461,10 +8461,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2738 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2738 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynSimplePat.Id (_1,None,false,false,false,rhs parseState 1) ) -//# 2738 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2738 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'simplePattern)); //# 8469 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8472,10 +8472,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2740 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2740 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynSimplePat.Id (_2,None,false,false,true,rhs parseState 2) ) -//# 2740 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2740 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'simplePattern)); //# 8480 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8484,11 +8484,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2742 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2742 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let lhsm = lhs parseState SynSimplePat.Typed(_1,_3,lhsm) ) -//# 2742 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2742 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'simplePattern)); //# 8493 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8497,11 +8497,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2745 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2745 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let lhsm = lhs parseState SynSimplePat.Attrib(_2,_1,lhsm) ) -//# 2745 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2745 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'simplePattern)); //# 8506 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8509,10 +8509,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2750 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2750 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1] ) -//# 2750 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2750 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'simplePatternCommaList)); //# 8517 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8521,10 +8521,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2752 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2752 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 :: _3 ) -//# 2752 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2752 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'simplePatternCommaList)); //# 8529 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8533,10 +8533,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2756 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2756 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 2756 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2756 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'simplePatterns)); //# 8541 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8544,10 +8544,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2758 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2758 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 2758 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2758 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'simplePatterns)); //# 8552 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8556,11 +8556,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2760 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2760 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedParen()) [] ) -//# 2760 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2760 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'simplePatterns)); //# 8565 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8568,10 +8568,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2763 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2763 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (* silent recovery *) [] ) -//# 2763 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2763 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'simplePatterns)); //# 8576 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8579,11 +8579,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2765 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2765 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedParen()) [] ) -//# 2765 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2765 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'simplePatterns)); //# 8588 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8592,10 +8592,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2771 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2771 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynPat.Named (_1,_3,false,None,rhs2 parseState 1 3) ) -//# 2771 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2771 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynPat)); //# 8600 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8604,10 +8604,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2773 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2773 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynPat.Or(_1,_3,rhs2 parseState 1 3) ) -//# 2773 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2773 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynPat)); //# 8612 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8616,10 +8616,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2775 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2775 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynPat.LongIdent (LongIdentWithDots(mkSynCaseName (rhs parseState 2) opNameCons,[]), None, None, SynConstructorArgs.Pats [SynPat.Tuple (false,[_1;_3],rhs2 parseState 1 3)],None,lhs parseState) ) -//# 2775 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2775 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynPat)); //# 8624 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8627,10 +8627,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2777 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2777 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynPat.Tuple(false,List.rev _1, lhs parseState) ) -//# 2777 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2777 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynPat)); //# 8635 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8638,10 +8638,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2779 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2779 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynPat.Ands(List.rev _1, lhs parseState) ) -//# 2779 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2779 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynPat)); //# 8646 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8649,10 +8649,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2781 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2781 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 2781 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2781 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynPat)); //# 8657 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8661,10 +8661,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2785 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2785 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _3 :: _1 ) -//# 2785 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2785 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tuplePatternElements)); //# 8669 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8673,10 +8673,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2787 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2787 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _3 :: _1 :: [] ) -//# 2787 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2787 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tuplePatternElements)); //# 8681 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8685,10 +8685,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2791 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2791 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _3 :: _1 ) -//# 2791 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2791 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'conjPatternElements)); //# 8693 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8697,10 +8697,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2793 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2793 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _3 :: _1 :: [] ) -//# 2793 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2793 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'conjPatternElements)); //# 8705 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8709,10 +8709,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2796 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2796 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1], lhs parseState ) -//# 2796 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2796 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'namePatPairs)); //# 8717 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8722,10 +8722,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2797 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2797 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let (rs, _) = _3 in (_1::rs), lhs parseState ) -//# 2797 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2797 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'namePatPairs)); //# 8730 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8734,10 +8734,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2800 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2800 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (_1, _3) ) -//# 2800 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2800 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'namePatPair)); //# 8742 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8746,10 +8746,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2804 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2804 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let vis,lid = _1 in SynPat.LongIdent (lid,None,Some _2, SynConstructorArgs.Pats [],vis,lhs parseState) ) -//# 2804 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2804 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'constrPattern)); //# 8754 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8759,10 +8759,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2806 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2806 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let vis,lid = _1 in SynPat.LongIdent (lid,None,_2, _3,vis,lhs parseState) ) -//# 2806 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2806 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'constrPattern)); //# 8767 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8772,10 +8772,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2808 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2808 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let vis,lid = _1 in SynPat.LongIdent (lid,None,_2, _4,vis,lhs parseState) ) -//# 2808 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2808 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'constrPattern)); //# 8780 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8785,10 +8785,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2810 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2810 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let vis,lid = _1 in SynPat.LongIdent (lid,None,_2, _4,vis,lhs parseState) ) -//# 2810 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2810 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'constrPattern)); //# 8793 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8796,10 +8796,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2812 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2812 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynPat.IsInst(_2,lhs parseState) ) -//# 2812 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2812 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'constrPattern)); //# 8804 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8807,10 +8807,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2814 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2814 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 2814 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2814 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'constrPattern)); //# 8815 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8819,10 +8819,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2817 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2817 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynConstructorArgs.NamePatPairs _2 ) -//# 2817 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2817 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPatsOrNamePatPairs)); //# 8827 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8830,10 +8830,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2818 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2818 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynConstructorArgs.Pats _1 ) -//# 2818 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2818 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPatsOrNamePatPairs)); //# 8838 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8842,10 +8842,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2822 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2822 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 :: _2 ) -//# 2822 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2822 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPatterns)); //# 8850 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8854,11 +8854,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2824 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2824 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsSuccessivePatternsShouldBeSpacedOrTupled()) _1 :: _3 ) -//# 2824 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2824 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPatterns)); //# 8863 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8867,11 +8867,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2827 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2827 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsSuccessivePatternsShouldBeSpacedOrTupled()) _1 :: _3 ) -//# 2827 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2827 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPatterns)); //# 8876 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8879,10 +8879,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2829 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2829 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1] ) -//# 2829 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2829 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPatterns)); //# 8887 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8890,10 +8890,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2834 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2834 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynPat.QuoteExpr(_1,lhs parseState) ) -//# 2834 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2834 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPattern)); //# 8898 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8902,10 +8902,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2835 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2835 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynPat.DeprecatedCharRange (_1,_3,rhs2 parseState 1 3) ) -//# 2835 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2835 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPattern)); //# 8910 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8914,10 +8914,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2837 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2837 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let rs,m = _2 in SynPat.Record (rs,m) ) -//# 2837 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2837 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPattern)); //# 8922 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8925,10 +8925,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2839 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2839 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynPat.ArrayOrList(false,_2,lhs parseState) ) -//# 2839 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2839 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPattern)); //# 8933 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8936,20 +8936,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2841 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2841 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynPat.ArrayOrList(true,_2, lhs parseState) ) -//# 2841 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2841 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPattern)); //# 8944 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2843 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2843 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynPat.Wild (lhs parseState) ) -//# 2843 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2843 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPattern)); //# 8954 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8957,10 +8957,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2845 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2845 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynPat.OptionalVal(_2,lhs parseState) ) -//# 2845 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2845 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPattern)); //# 8965 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8968,13 +8968,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2847 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2847 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let vis,lidwd = _1 if not (isNilOrSingleton lidwd.Lid) || (String.isUpper (List.head lidwd.Lid).idText) then mkSynPatMaybeVar lidwd vis (lhs parseState) else mkSynPatVar vis (List.head lidwd.Lid) ) -//# 2847 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2847 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPattern)); //# 8979 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -8982,40 +8982,40 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2852 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2852 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynPat.Const (_1,_1.Range (lhs parseState)) ) -//# 2852 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2852 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPattern)); //# 8990 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2854 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2854 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynPat.Const(SynConst.Bool false,lhs parseState) ) -//# 2854 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2854 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPattern)); //# 9000 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2856 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2856 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynPat.Const(SynConst.Bool true,lhs parseState) ) -//# 2856 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2856 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPattern)); //# 9010 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2858 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2858 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynPat.Null(lhs parseState) ) -//# 2858 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2858 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPattern)); //# 9020 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9024,11 +9024,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2860 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2860 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = (lhs parseState) SynPat.Paren(_2 m,m) ) -//# 2860 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2860 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPattern)); //# 9033 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9037,11 +9037,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2863 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2863 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedParen()) patFromParseError (_2 (rhs2 parseState 1 2)) ) -//# 2863 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2863 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPattern)); //# 9046 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9049,10 +9049,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2866 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2866 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (* silent recovery *) SynPat.Wild (lhs parseState) ) -//# 2866 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2866 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPattern)); //# 9057 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9060,11 +9060,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2868 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2868 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedParen()) SynPat.Wild (lhs parseState) ) -//# 2868 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2868 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPattern)); //# 9069 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9073,10 +9073,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2871 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2871 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynPat.Tuple(true, List.rev _3,lhs parseState) ) -//# 2871 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2871 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPattern)); //# 9081 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9085,11 +9085,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2873 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2873 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnmatchedParen()); SynPat.Tuple(true, List.rev _3,lhs parseState) ) -//# 2873 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2873 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPattern)); //# 9094 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9097,10 +9097,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2876 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2876 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (* silent recovery *) SynPat.Wild (lhs parseState) ) -//# 2876 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2876 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPattern)); //# 9105 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9108,11 +9108,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2878 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2878 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnmatchedParen()); SynPat.Wild (lhs parseState) ) -//# 2878 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2878 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicPattern)); //# 9117 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9120,20 +9120,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2885 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2885 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (fun m -> _1) ) -//# 2885 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2885 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'parenPatternBody)); //# 9128 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2887 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2887 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (fun m -> SynPat.Const(SynConst.Unit,m)) ) -//# 2887 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2887 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'parenPatternBody)); //# 9138 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9142,10 +9142,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2916 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2916 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynPat.Named (_1,_3,false,None,rhs2 parseState 1 3) ) -//# 2916 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2916 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'parenPattern)); //# 9150 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9154,10 +9154,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2918 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2918 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynPat.Or(_1,_3,rhs2 parseState 1 3) ) -//# 2918 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2918 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'parenPattern)); //# 9162 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9165,10 +9165,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2920 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2920 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynPat.Tuple(false,List.rev _1,lhs parseState) ) -//# 2920 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2920 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'parenPattern)); //# 9173 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9176,10 +9176,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2922 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2922 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynPat.Ands(List.rev _1,rhs2 parseState 1 3) ) -//# 2922 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2922 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'parenPattern)); //# 9184 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9188,11 +9188,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2924 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2924 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let lhsm = lhs parseState SynPat.Typed(_1,_3,lhsm) ) -//# 2924 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2924 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'parenPattern)); //# 9197 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9201,11 +9201,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2927 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2927 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let lhsm = lhs parseState SynPat.Attrib(_2,_1,lhsm) ) -//# 2927 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2927 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'parenPattern)); //# 9210 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9214,10 +9214,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2930 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2930 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynPat.LongIdent (LongIdentWithDots(mkSynCaseName (rhs parseState 2) opNameCons,[]), None, None, SynConstructorArgs.Pats [ SynPat.Tuple (false,[_1;_3],rhs2 parseState 1 3) ],None,lhs parseState) ) -//# 2930 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2930 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'parenPattern)); //# 9222 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9225,10 +9225,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2931 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2931 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 2931 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2931 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'parenPattern)); //# 9233 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9237,10 +9237,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2935 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2935 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _3 :: _1 ) -//# 2935 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2935 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tupleParenPatternElements)); //# 9245 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9249,10 +9249,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2937 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2937 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _3 :: _1 :: [] ) -//# 2937 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2937 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tupleParenPatternElements)); //# 9257 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9261,10 +9261,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2941 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2941 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _3 :: _1 ) -//# 2941 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2941 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'conjParenPatternElements)); //# 9269 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9273,10 +9273,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2943 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2943 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _3 :: _1 :: [] ) -//# 2943 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2943 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'conjParenPatternElements)); //# 9281 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9285,10 +9285,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2947 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2947 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1],lhs parseState ) -//# 2947 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2947 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recordPatternElementsAux)); //# 9293 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9298,10 +9298,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2949 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2949 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let r = _1 in let (rs,dropMark) = _3 in (r :: rs),lhs parseState ) -//# 2949 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2949 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recordPatternElementsAux)); //# 9306 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9310,20 +9310,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2952 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2952 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (List.frontAndBack _1.Lid,_3) ) -//# 2952 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2952 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recordPatternElement)); //# 9318 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 2956 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2956 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 2956 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2956 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'listPatternElements)); //# 9328 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9332,10 +9332,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2958 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2958 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1] ) -//# 2958 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2958 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'listPatternElements)); //# 9340 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9345,10 +9345,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2960 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2960 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 :: _3 ) -//# 2960 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2960 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'listPatternElements)); //# 9353 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9357,10 +9357,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2965 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2965 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 2965 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2965 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9365 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9369,11 +9369,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2967 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2967 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _3 then reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsUnexpectedEndOfFileExpression()) exprFromParseError _2 ) -//# 2967 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2967 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9378 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9381,10 +9381,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2970 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2970 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 2970 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2970 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9389 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9393,10 +9393,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2975 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2975 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 2975 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2975 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9401 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9404,10 +9404,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2977 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2977 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 2977 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2977 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9412 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9415,10 +9415,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2982 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2982 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 2982 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2982 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typedSeqExprBlockR)); //# 9423 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9426,10 +9426,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2983 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2983 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 2983 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2983 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typedSeqExprBlockR)); //# 9434 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9438,10 +9438,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2986 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2986 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.Typed (_1,_3, unionRanges _1.Range _3.Range) ) -//# 2986 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2986 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typedSeqExpr)); //# 9446 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9449,10 +9449,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2987 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2987 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 2987 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2987 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typedSeqExpr)); //# 9457 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9461,10 +9461,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2990 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2990 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" checkEndOfFileError _2; _1 ) -//# 2990 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2990 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9469 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9474,10 +9474,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2994 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2994 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.Sequential(SequencePointsAtSeq,true,_1,_3,unionRanges _1.Range _3.Range) ) -//# 2994 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2994 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'seqExpr)); //# 9482 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9486,10 +9486,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2996 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2996 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 2996 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2996 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'seqExpr)); //# 9494 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9497,10 +9497,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 2998 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2998 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 2998 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 2998 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'seqExpr)); //# 9505 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9509,10 +9509,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3000 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3000 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.Sequential(SequencePointsAtSeq,false,_1,_3,unionRanges _1.Range _3.Range ) ) -//# 3000 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3000 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'seqExpr)); //# 9517 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9522,10 +9522,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3002 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3002 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.Sequential(SequencePointsAtSeq,false,_1,_4,unionRanges _1.Range _4.Range) ) -//# 3002 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3002 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'seqExpr)); //# 9530 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9533,7 +9533,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3004 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3004 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let hwlb,m = _1 let mLetKwd,isUse = match hwlb with (BindingSetPreAttrs(m,_,isUse,_,_)) -> m,isUse let usedKeyword = if isUse then "use" else "let" @@ -9541,17 +9541,17 @@ let _fsyacc_reductions () = [| let fauxRange = m.EndRange // zero width range at end of m mkLocalBindings (m,hwlb,arbExpr("seqExpr",fauxRange)) ) -//# 3004 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3004 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'seqExpr)); //# 9546 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3016 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3016 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" debugPrint("recovering via error"); true ) -//# 3016 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3016 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recover)); //# 9556 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9559,10 +9559,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3017 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3017 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" debugPrint("recovering via EOF"); false ) -//# 3017 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3017 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recover)); //# 9567 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9571,10 +9571,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3022 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3022 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkLocalBindings (unionRanges (rhs2 parseState 1 2) _3.Range,_1,_3) ) -//# 3022 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3022 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9579 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9582,10 +9582,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3025 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3025 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkLocalBindings (rhs2 parseState 1 2,_1,arbExpr("declExpr1",(rhs parseState 3))) ) -//# 3025 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3025 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9590 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9594,11 +9594,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3031 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3031 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let hwlb,m = _1 mkLocalBindings (unionRanges m _2.Range,hwlb,_2) ) -//# 3031 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3031 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9603 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9606,12 +9606,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3035 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3035 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let hwlb,m = _1 reportParseErrorAt (match hwlb with (BindingSetPreAttrs(m,_,_,_,_)) -> m) (FSComp.SR.parsErrorInReturnForLetIncorrectIndentation()) mkLocalBindings (m,hwlb,arbExpr("declExpr2",(rhs parseState 2))) ) -//# 3035 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3035 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9616 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9620,11 +9620,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3040 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3040 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let hwlb,m = _1 - mkLocalBindings (unionRanges m _3.Range ,hwlb,_3) + mkLocalBindings (unionRanges m _3.Range, hwlb, _3) ) -//# 3040 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3040 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9629 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9632,12 +9632,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3044 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3044 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let hwlb,m = _1 //reportParseErrorAt (match hwlb with (BindingSetPreAttrs(m,_,_,_,_)) -> m) (FSComp.SR.parsErrorInReturnForLetIncorrectIndentation()) mkLocalBindings (unionRanges m (rhs parseState 3),hwlb,arbExpr("declExpr3",(rhs parseState 3))) ) -//# 3044 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3044 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9642 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9645,11 +9645,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3049 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3049 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let e = snd _1 SynExpr.Do(e,e.Range) ) -//# 3049 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3049 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9654 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9657,10 +9657,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3053 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3053 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 3053 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3053 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9665 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9668,10 +9668,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3056 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3056 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 3056 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3056 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9676 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9680,13 +9680,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3059 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3059 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mMatch = (rhs parseState 1) let mWith,(clauses,mLast) = _3 let spBind = SequencePointAtBinding(unionRanges mMatch mWith) SynExpr.Match(spBind, _2,clauses,unionRanges mMatch mLast) ) -//# 3059 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3059 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9691 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9695,12 +9695,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3065 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3065 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _3 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileMatch()) // Produce approximate expression during error recovery exprFromParseError _2 ) -//# 3065 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3065 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9705 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9709,13 +9709,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3070 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3070 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mMatch = (rhs parseState 1) let mWith,(clauses,mLast) = _3 let spBind = SequencePointAtBinding(unionRanges mMatch mWith) SynExpr.MatchBang(spBind, _2,clauses,unionRanges mMatch mLast) ) -//# 3070 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3070 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9720 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9724,12 +9724,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3076 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3076 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _3 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileMatch()) // Produce approximate expression during error recovery exprFromParseError _2 ) -//# 3076 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3076 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9734 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9738,7 +9738,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3081 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3081 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mTry = (rhs parseState 1) let spTry = SequencePointAtTry(mTry) let mWith,(clauses,mLast) = _3 @@ -9748,7 +9748,7 @@ let _fsyacc_reductions () = [| let mTryToLast = unionRanges mTry mLast SynExpr.TryWith(_2, mTryToWith, clauses,mWithToLast, mTryToLast,spTry,spWith) ) -//# 3081 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3081 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9753 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9757,13 +9757,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3091 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3091 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" // Produce approximate expression during error recovery // Include any expressions to make sure they gets type checked in case that generates useful results for intellisense if not _3 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileTry()) exprFromParseError _2 ) -//# 3091 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3091 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9768 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9772,14 +9772,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3097 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3097 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mTry = rhs parseState 1 let spTry = SequencePointAtTry(mTry) let spFinally = SequencePointAtFinally(rhs parseState 3) let mTryToLast = unionRanges mTry _4.Range SynExpr.TryFinally(_2, _4,mTryToLast,spTry,spFinally) ) -//# 3097 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3097 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9784 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9788,11 +9788,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3104 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3104 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mIf = (rhs parseState 1) _3 _2 mIf ) -//# 3104 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3104 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9797 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9801,7 +9801,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3108 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3108 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsIncompleteIf()) // Produce an approximate expression during error recovery. // Include expressions to make sure they get type checked in case that generates useful results for intellisense. @@ -9809,7 +9809,7 @@ let _fsyacc_reductions () = [| // from the context it is used in. exprFromParseError _2 ) -//# 3108 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3108 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9814 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9817,7 +9817,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3116 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3116 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsIncompleteIf()) // Produce an approximate expression during error recovery. There can still be value in doing this even // for this pathological case. @@ -9826,7 +9826,7 @@ let _fsyacc_reductions () = [| let spIfToThen = SequencePointAtBinding mEnd exprFromParseError (SynExpr.IfThenElse(arbExpr("ifGuard1",mEnd),arbExpr("thenBody1",mEnd),None,spIfToThen,true,m,m)) ) -//# 3116 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3116 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9831 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9834,10 +9834,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3125 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3125 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.Lazy(_2,unionRanges (rhs parseState 1) _2.Range) ) -//# 3125 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3125 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9842 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9845,20 +9845,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3128 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3128 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.Assert(_2, unionRanges (rhs parseState 1) _2.Range) ) -//# 3128 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3128 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9853 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3131 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3131 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" raiseParseErrorAt (rhs parseState 1) (FSComp.SR.parsAssertIsNotFirstClassValue()) ) -//# 3131 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3131 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9863 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9866,10 +9866,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3134 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3134 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.Lazy(_2,unionRanges (rhs parseState 1) _2.Range) ) -//# 3134 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3134 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9874 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9877,20 +9877,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3137 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3137 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.Assert(_2, unionRanges (rhs parseState 1) _2.Range) ) -//# 3137 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3137 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9885 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3140 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3140 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" raiseParseErrorAt (rhs parseState 1) (FSComp.SR.parsAssertIsNotFirstClassValue()) ) -//# 3140 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3140 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9895 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9901,13 +9901,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3143 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3143 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mWhileHeader = unionRanges (rhs parseState 1) _2.Range let spWhile = SequencePointAtWhileLoop mWhileHeader let mWhileAll = unionRanges (rhs parseState 1) _4.Range SynExpr.While(spWhile,_2,_4,mWhileAll) ) -//# 3143 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3143 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9912 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9918,14 +9918,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3149 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3149 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _5 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileWhile()) let mWhileHeader = unionRanges (rhs parseState 1) _2.Range let spWhile = SequencePointAtWhileLoop mWhileHeader let mWhileAll = unionRanges (rhs parseState 1) _4.Range exprFromParseError (SynExpr.While(spWhile,_2,_4,mWhileAll)) ) -//# 3149 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3149 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9930 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9935,7 +9935,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3156 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3156 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" // silent recovery let mWhileHeader = unionRanges (rhs parseState 1) _2.Range let spWhile = SequencePointAtWhileLoop mWhileHeader @@ -9943,7 +9943,7 @@ let _fsyacc_reductions () = [| let mWhileAll = unionRanges (rhs parseState 1) (rhs parseState 5) SynExpr.While(spWhile,_2,arbExpr("whileBody1",mWhileBodyArb),mWhileAll) ) -//# 3156 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3156 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9948 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9952,7 +9952,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3164 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3164 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsWhileDoExpected()) let mWhileHeader = unionRanges (rhs parseState 1) _2.Range let spWhile = SequencePointAtWhileLoop mWhileHeader @@ -9960,7 +9960,7 @@ let _fsyacc_reductions () = [| let mWhileAll = unionRanges (rhs parseState 1) (rhs parseState 3) exprFromParseError (SynExpr.While(spWhile,_2,arbExpr("whileBody2",mWhileBodyArb),mWhileAll)) ) -//# 3164 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3164 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9965 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9968,11 +9968,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3172 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3172 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _2 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileWhile()) arbExpr("whileLoop1",rhs parseState 1) ) -//# 3172 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3172 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9977 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9980,7 +9980,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3176 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3176 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" //silent recovery let mWhileHeader = rhs parseState 1 let spWhile = SequencePointAtWhileLoop mWhileHeader @@ -9988,7 +9988,7 @@ let _fsyacc_reductions () = [| let mWhileAll = unionRanges (rhs parseState 1) (rhs parseState 3) exprFromParseError (SynExpr.While(spWhile,arbExpr("whileGuard1",mWhileHeader),arbExpr("whileBody3",mWhileBodyArb),mWhileAll)) ) -//# 3176 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3176 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 9993 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -9999,12 +9999,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3184 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3184 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let spBind = SequencePointAtForLoop(rhs2 parseState 1 3) let (a,b,_) = _2 SynExpr.ForEach(spBind,SeqExprOnly false,true,a,b,_4,unionRanges (rhs parseState 1) _4.Range) ) -//# 3184 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3184 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10009 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10015,14 +10015,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3189 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3189 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _5 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileFor()) let spBind = SequencePointAtForLoop(rhs2 parseState 1 3) let (a,b,_) = _2 let mForLoopAll = unionRanges (rhs parseState 1) _4.Range SynExpr.ForEach(spBind,SeqExprOnly false,true,a,b,_4,mForLoopAll) ) -//# 3189 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3189 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10027 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10032,7 +10032,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3196 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3196 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" // Silent recovery let mForLoopHeader = rhs2 parseState 1 3 let spBind = SequencePointAtForLoop mForLoopHeader @@ -10041,7 +10041,7 @@ let _fsyacc_reductions () = [| let mForLoopAll = rhs2 parseState 1 5 SynExpr.ForEach(spBind,SeqExprOnly false,true,a,b,arbExpr("forLoopBody2a",mForLoopBodyArb),mForLoopAll) ) -//# 3196 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3196 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10046 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10051,7 +10051,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3205 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3205 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _4 then reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsExpectedExpressionAfterToken()) let mForLoopHeader = rhs2 parseState 1 3 let spBind = SequencePointAtForLoop mForLoopHeader @@ -10060,7 +10060,7 @@ let _fsyacc_reductions () = [| let mForLoopAll = rhs2 parseState 1 3 SynExpr.ForEach(spBind,SeqExprOnly false,true,a,b,arbExpr("forLoopBody2",mForLoopBodyArb),mForLoopAll) ) -//# 3205 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3205 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10065 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10069,7 +10069,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3214 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3214 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let (a,b,ok) = _2 if not _3 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsForDoExpected()) let mForLoopHeader = rhs2 parseState 1 3 @@ -10078,7 +10078,7 @@ let _fsyacc_reductions () = [| let mForLoopAll = rhs2 parseState 1 3 SynExpr.ForEach(spBind,SeqExprOnly false,true,a,b,arbExpr("forLoopBody1",mForLoopBodyArb),mForLoopAll) ) -//# 3214 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3214 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10083 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10089,14 +10089,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3223 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3223 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mForLoopHeader = rhs2 parseState 1 3 let spBind = SequencePointAtForLoop mForLoopHeader let (a,b,c,d) = _2 let mForLoopAll = unionRanges (rhs parseState 1) _4.Range SynExpr.For(spBind,a,b,c,d,_4,mForLoopAll) ) -//# 3223 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3223 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10101 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10107,7 +10107,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3230 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3230 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _5 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileFor()) // Still produce an expression let mForLoopHeader = rhs2 parseState 1 3 @@ -10116,7 +10116,7 @@ let _fsyacc_reductions () = [| let mForLoopAll = unionRanges (rhs parseState 1) _4.Range exprFromParseError (SynExpr.For(spBind,a,b,c,d,_4,mForLoopAll)) ) -//# 3230 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3230 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10121 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10126,7 +10126,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3239 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3239 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" // silent recovery let mForLoopHeader = rhs2 parseState 1 3 let spBind = SequencePointAtForLoop mForLoopHeader @@ -10135,7 +10135,7 @@ let _fsyacc_reductions () = [| let mForLoopAll = rhs2 parseState 1 5 SynExpr.For(spBind,a,b,c,d,arbExpr("declExpr11",mForLoopBodyArb),mForLoopAll) ) -//# 3239 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3239 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10140 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10145,7 +10145,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3248 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3248 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _4 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileFor()) let mForLoopHeader = rhs2 parseState 1 3 let spBind = SequencePointAtForLoop mForLoopHeader @@ -10154,7 +10154,7 @@ let _fsyacc_reductions () = [| let mForLoopAll = rhs2 parseState 1 3 exprFromParseError (SynExpr.For(spBind,a,b,c,d,arbExpr("declExpr11",mForLoopBodyArb),mForLoopAll)) ) -//# 3248 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3248 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10159 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10163,7 +10163,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3257 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3257 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _3 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileFor()) let mForLoopHeader = rhs2 parseState 1 2 let spBind = SequencePointAtForLoop mForLoopHeader @@ -10172,7 +10172,7 @@ let _fsyacc_reductions () = [| let mForLoopAll = rhs2 parseState 1 2 exprFromParseError (SynExpr.For(spBind,a,b,c,d,arbExpr("declExpr11",mForLoopBodyArb),mForLoopAll)) ) -//# 3257 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3257 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10177 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10182,14 +10182,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3267 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3267 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" // silent recovery let mForLoopHeader = rhs2 parseState 1 2 let mForLoopAll = unionRanges (rhs parseState 1) _4.Range let spBind = SequencePointAtForLoop(mForLoopHeader) SynExpr.For(spBind,mkSynId mForLoopHeader "_loopVar",arbExpr("startLoopRange1",mForLoopHeader),true,arbExpr("endLoopRange1",rhs parseState 3),_4,mForLoopAll) ) -//# 3267 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3267 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10194 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10197,11 +10197,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3286 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3286 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsIdentifierExpected()) arbExpr("declExpr12",(rhs parseState 1)) ) -//# 3286 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3286 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10206 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10210,7 +10210,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3290 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3290 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsInOrEqualExpected()) let mForLoopHeader = rhs2 parseState 1 2 let spBind = SequencePointAtForLoop mForLoopHeader @@ -10218,7 +10218,7 @@ let _fsyacc_reductions () = [| let mForLoopAll = rhs2 parseState 1 4 SynExpr.ForEach(spBind,SeqExprOnly false,true,_2,arbExpr("forLoopCollection",mForLoopHeader),arbExpr("forLoopBody3",mForLoopBodyArb),mForLoopAll) ) -//# 3290 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3290 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10223 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10227,7 +10227,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3298 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3298 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _3 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileFor()) let mForLoopHeader = rhs2 parseState 1 2 let spBind = SequencePointAtForLoop mForLoopHeader @@ -10235,7 +10235,7 @@ let _fsyacc_reductions () = [| let mForLoopAll = rhs2 parseState 1 2 exprFromParseError (SynExpr.ForEach(spBind,SeqExprOnly false,true,_2,arbExpr("forLoopCollection",mForLoopHeader),arbExpr("forLoopBody3",mForLoopBodyArb),mForLoopAll)) ) -//# 3298 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3298 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10240 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10244,10 +10244,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3307 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3307 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.YieldOrReturn((_1,not _1),_2, unionRanges (rhs parseState 1) _2.Range) ) -//# 3307 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3307 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10252 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10256,10 +10256,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3310 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3310 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.YieldOrReturnFrom((_1,not _1), _2, unionRanges (rhs parseState 1) _2.Range) ) -//# 3310 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3310 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10264 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10271,12 +10271,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3313 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3313 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let spBind = SequencePointAtBinding(rhs2 parseState 1 5) let m = unionRanges (rhs parseState 1) _7.Range SynExpr.LetOrUseBang(spBind,(_1 = "use"),true,_2,_4,_7,m) ) -//# 3313 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3313 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10281 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10289,13 +10289,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3318 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3318 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _5 (if _1 = "use" then "use!" else "let!") (rhs parseState 1) // report unterminated error let spBind = SequencePointAtBinding(unionRanges (rhs parseState 1) _4.Range) let m = unionRanges (rhs parseState 1) _7.Range SynExpr.LetOrUseBang(spBind,(_1 = "use"),true,_2,_4,_7,m) ) -//# 3318 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3318 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10300 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10307,14 +10307,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3324 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3324 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" // error recovery that allows intellisense when writing incomplete computation expressions let spBind = SequencePointAtBinding(unionRanges (rhs parseState 1) _4.Range) let mAll = unionRanges (rhs parseState 1) (rhs parseState 7) let m = _4.Range.EndRange // zero-width range SynExpr.LetOrUseBang(spBind,(_1 = "use"),true,_2,_4, SynExpr.ImplicitZero m, mAll) ) -//# 3324 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3324 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10319 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10324,11 +10324,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3331 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3331 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let spBind = NoSequencePointAtDoBinding SynExpr.LetOrUseBang(spBind,false,true,SynPat.Const(SynConst.Unit,_2.Range),_2,_5, unionRanges (rhs parseState 1) _5.Range) ) -//# 3331 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3331 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10333 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10337,10 +10337,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3335 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3335 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.DoBang(_2, unionRanges (rhs parseState 1) _2.Range) ) -//# 3335 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3335 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10345 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10350,11 +10350,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3338 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3338 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let spBind = SequencePointAtForLoop(rhs2 parseState 1 2) let (a,b,_) = _2 in SynExpr.ForEach(spBind,SeqExprOnly true,true,a,b,_4,unionRanges (rhs parseState 1) _4.Range) ) -//# 3338 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3338 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10359 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10362,10 +10362,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3342 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3342 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.Fixed(_2, (unionRanges (rhs parseState 1) _2.Range)) ) -//# 3342 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3342 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10370 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10373,11 +10373,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3345 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3345 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" errorR(Error(FSComp.SR.parsArrowUseIsLimited(),lhs parseState)) SynExpr.YieldOrReturn((true,true),_2, (unionRanges (rhs parseState 1) _2.Range)) ) -//# 3345 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3345 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10382 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10386,10 +10386,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3350 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3350 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.TypeTest(_1,_3, unionRanges _1.Range _3.Range) ) -//# 3350 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3350 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10394 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10398,10 +10398,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3351 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3351 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.Upcast(_1,_3, unionRanges _1.Range _3.Range) ) -//# 3351 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3351 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10406 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10410,10 +10410,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3352 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3352 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.Downcast(_1,_3, unionRanges _1.Range _3.Range) ) -//# 3352 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3352 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10418 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10422,10 +10422,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3355 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3355 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkSynInfix (rhs parseState 2) _1 ":=" _3 ) -//# 3355 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3355 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10430 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10434,10 +10434,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3356 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3356 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkSynAssign _1 _3 ) -//# 3356 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3356 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10442 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10445,10 +10445,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3358 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3358 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let exprs,commas = _1 in SynExpr.Tuple(false, List.rev exprs, List.rev commas, (commas.Head, exprs) ||> unionRangeWithListBy (fun e -> e.Range) ) ) -//# 3358 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3358 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10453 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10457,10 +10457,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3359 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3359 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.JoinIn(_1,rhs parseState 2,_3,unionRanges _1.Range _3.Range) ) -//# 3359 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3359 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10465 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10469,10 +10469,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3360 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3360 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkSynInfix (rhs parseState 2) _1 "||" _3 ) -//# 3360 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3360 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10477 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10482,10 +10482,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3361 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3361 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkSynInfix (rhs parseState 2) _1 _2 _3 ) -//# 3361 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3361 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10490 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10494,10 +10494,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3362 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3362 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkSynInfix (rhs parseState 2) _1 "or" _3 ) -//# 3362 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3362 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10502 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10506,10 +10506,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3363 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3363 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkSynInfix (rhs parseState 2) _1 "&" _3 ) -//# 3363 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3363 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10514 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10518,10 +10518,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3364 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3364 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkSynInfix (rhs parseState 2) _1 "&&" _3 ) -//# 3364 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3364 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10526 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10531,10 +10531,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3365 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3365 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkSynInfix (rhs parseState 2) _1 _2 _3 ) -//# 3365 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3365 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10539 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10543,10 +10543,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3366 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3366 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkSynInfix (rhs parseState 2) _1 "=" _3 ) -//# 3366 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3366 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10551 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10556,10 +10556,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3367 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3367 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkSynInfix (rhs parseState 2) _1 _2 _3 ) -//# 3367 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3367 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10564 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10568,10 +10568,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3368 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3368 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkSynInfix (rhs parseState 2) _1 "$" _3 ) -//# 3368 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3368 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10576 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10581,10 +10581,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3369 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3369 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkSynInfix (rhs parseState 2) _1 "<" _3 ) -//# 3369 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3369 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10589 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10594,11 +10594,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3370 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3370 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _3 then reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("<")) exprFromParseError (mkSynInfix (rhs parseState 2) _1 "<" (arbExpr("declExprInfix",(rhs parseState 3).StartRange))) ) -//# 3370 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3370 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10603 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10608,10 +10608,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3372 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3372 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkSynInfix (rhs parseState 2) _1 ">" _3 ) -//# 3372 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3372 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10616 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10621,10 +10621,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3373 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3373 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkSynInfix (rhs parseState 2) _1 _2 _3 ) -//# 3373 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3373 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10629 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10634,10 +10634,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3374 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3374 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkSynInfix (rhs parseState 2) _1 _2 _3 ) -//# 3374 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3374 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10642 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10646,10 +10646,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3375 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3375 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.App (ExprAtomicFlag.NonAtomic, true, mkSynIdGet (rhs parseState 2) opNameCons,SynExpr.Tuple (false,[_1;_3],[rhs parseState 2],unionRanges _1.Range _3.Range),unionRanges _1.Range _3.Range) ) -//# 3375 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3375 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10654 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10659,10 +10659,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3376 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3376 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkSynInfix (rhs parseState 2) _1 _2 _3 ) -//# 3376 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3376 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10667 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10671,10 +10671,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3377 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3377 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkSynInfix (rhs parseState 2) _1 "-" _3 ) -//# 3377 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3377 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10679 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10683,10 +10683,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3378 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3378 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkSynInfix (rhs parseState 2) _1 "*" _3 ) -//# 3378 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3378 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10691 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10696,10 +10696,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3379 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3379 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkSynInfix (rhs parseState 2) _1 _2 _3 ) -//# 3379 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3379 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10704 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10709,10 +10709,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3380 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3380 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkSynInfix (rhs parseState 2) _1 _2 _3 ) -//# 3380 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3380 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10717 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10720,11 +10720,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3382 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3382 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("in")) exprFromParseError(mkSynInfix (rhs parseState 2) _1 "@in" (arbExpr("declExprInfix",(rhs parseState 3).StartRange))) ) -//# 3382 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3382 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10729 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10732,11 +10732,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3384 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3384 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("||")) exprFromParseError(mkSynInfix (rhs parseState 2) _1 "||" (arbExpr("declExprInfix",(rhs parseState 3).StartRange))) ) -//# 3384 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3384 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10741 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10745,11 +10745,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3386 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3386 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression(_2)) exprFromParseError(mkSynInfix (rhs parseState 2) _1 _2 (arbExpr("declExprInfix",(rhs parseState 3).StartRange))) ) -//# 3386 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3386 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10754 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10757,11 +10757,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3388 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3388 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("or")) exprFromParseError(mkSynInfix (rhs parseState 2) _1 "or" (arbExpr("declExprInfix",(rhs parseState 3).StartRange))) ) -//# 3388 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3388 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10766 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10769,11 +10769,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3390 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3390 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("&")) exprFromParseError(mkSynInfix (rhs parseState 2) _1 "&" (arbExpr("declExprInfix",(rhs parseState 3).StartRange))) ) -//# 3390 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3390 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10778 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10781,11 +10781,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3392 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3392 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("&&")) exprFromParseError(mkSynInfix (rhs parseState 2) _1 "&&" (arbExpr("declExprInfix",(rhs parseState 3).StartRange))) ) -//# 3392 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3392 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10790 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10794,11 +10794,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3394 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3394 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression(_2)) exprFromParseError(mkSynInfix (rhs parseState 2) _1 _2 (arbExpr("declExprInfix",(rhs parseState 3).StartRange))) ) -//# 3394 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3394 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10803 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10806,11 +10806,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3396 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3396 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("=")) exprFromParseError(mkSynInfix (rhs parseState 2) _1 "=" (arbExpr("declExprInfix",(rhs parseState 3).StartRange))) ) -//# 3396 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3396 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10815 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10819,11 +10819,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3398 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3398 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression(_2)) exprFromParseError(mkSynInfix (rhs parseState 2) _1 _2 (arbExpr("declExprInfix",(rhs parseState 3).StartRange))) ) -//# 3398 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3398 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10828 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10831,11 +10831,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3400 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3400 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("$")) exprFromParseError(mkSynInfix (rhs parseState 2) _1 "$" (arbExpr("declExprInfix",(rhs parseState 3).StartRange))) ) -//# 3400 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3400 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10840 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10844,11 +10844,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3402 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3402 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("<")) exprFromParseError(mkSynInfix (rhs parseState 2) _1 "<" (arbExpr("declExprInfix",(rhs parseState 3).StartRange))) ) -//# 3402 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3402 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10853 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10857,11 +10857,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3404 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3404 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression(">")) exprFromParseError(mkSynInfix (rhs parseState 2) _1 ">" (arbExpr("declExprInfix",(rhs parseState 3).StartRange))) ) -//# 3404 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3404 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10866 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10870,11 +10870,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3406 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3406 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression(_2)) exprFromParseError(mkSynInfix (rhs parseState 2) _1 _2 (arbExpr("declExprInfix",(rhs parseState 3).StartRange))) ) -//# 3406 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3406 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10879 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10883,11 +10883,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3408 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3408 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression(_2)) exprFromParseError(mkSynInfix (rhs parseState 2) _1 _2 (arbExpr("declExprInfix",(rhs parseState 3).StartRange))) ) -//# 3408 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3408 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10892 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10895,11 +10895,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3410 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3410 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("::")) SynExpr.App (ExprAtomicFlag.NonAtomic, true, mkSynIdGet (rhs parseState 2) opNameCons,SynExpr.Tuple (false,[_1;(arbExpr("declExprInfix",(rhs parseState 3).StartRange))],[rhs parseState 2],unionRanges _1.Range (rhs parseState 3).StartRange),unionRanges _1.Range (rhs parseState 3).StartRange) ) -//# 3410 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3410 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10904 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10908,11 +10908,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3412 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3412 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression(_2)) exprFromParseError(mkSynInfix (rhs parseState 2) _1 _2 (arbExpr("declExprInfix",(rhs parseState 3).StartRange))) ) -//# 3412 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3412 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10917 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10920,11 +10920,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3414 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3414 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("-")) exprFromParseError(mkSynInfix (rhs parseState 2) _1 "-" (arbExpr("declExprInfix",(rhs parseState 3).StartRange))) ) -//# 3414 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3414 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10929 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10932,11 +10932,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3416 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3416 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("*")) exprFromParseError(mkSynInfix (rhs parseState 2) _1 "*" (arbExpr("declExprInfix",(rhs parseState 3).StartRange))) ) -//# 3416 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3416 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10941 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10945,11 +10945,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3418 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3418 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression(_2)) exprFromParseError(mkSynInfix (rhs parseState 2) _1 _2 (arbExpr("declExprInfix",(rhs parseState 3).StartRange))) ) -//# 3418 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3418 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10954 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10958,11 +10958,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3420 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3420 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression(_2)) exprFromParseError(mkSynInfix (rhs parseState 2) _1 _2 (arbExpr("declExprInfix",(rhs parseState 3).StartRange))) ) -//# 3420 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3420 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10967 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10970,10 +10970,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3423 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3423 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 3423 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3423 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 10978 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10981,12 +10981,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3427 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3427 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let con = SynConst.String (_1,rhs parseState 1) let arg2 = SynExpr.Const (con,con.Range (rhs parseState 1)) arg2 ) -//# 3427 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3427 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'dynamicArg)); //# 10991 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -10995,10 +10995,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3431 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3431 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 3431 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3431 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'dynamicArg)); //# 11003 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11006,10 +11006,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3435 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3435 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" rhs parseState 1, _2 ) -//# 3435 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3435 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'withClauses)); //# 11014 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11017,10 +11017,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3437 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3437 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" rhs parseState 1, _2 ) -//# 3437 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3437 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'withClauses)); //# 11025 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11029,11 +11029,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3439 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3439 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _3 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileWith()) rhs parseState 1, _2 ) -//# 3439 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3439 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'withClauses)); //# 11038 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11041,10 +11041,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3444 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3444 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 3444 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3444 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'withPatternClauses)); //# 11049 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11052,34 +11052,34 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3446 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3446 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 3446 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3446 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'withPatternClauses)); //# 11060 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3448 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3448 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" // silent recovery let mLast = rhs parseState 1 [], mLast ) -//# 3448 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3448 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'withPatternClauses)); //# 11072 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3452 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3452 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" // silent recovery let mLast = rhs parseState 1 [], mLast ) -//# 3452 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3452 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'withPatternClauses)); //# 11084 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11088,10 +11088,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3459 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3459 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1, _2, rhs parseState 1 ) -//# 3459 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3459 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'patternAndGuard)); //# 11096 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11100,12 +11100,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3463 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3463 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let pat,guard,patm = _1 let mLast = _2.Range [Clause(pat,guard,_2,patm,SequencePointAtTarget)], mLast ) -//# 3463 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3463 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'patternClauses)); //# 11110 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11115,12 +11115,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3467 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3467 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let pat,guard,patm = _1 let clauses,mLast = _4 (Clause(pat,guard,_2,patm,SequencePointAtTarget) :: clauses), mLast ) -//# 3467 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3467 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'patternClauses)); //# 11125 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11129,13 +11129,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3471 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3471 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let pat,guard,patm = _1 let mLast = rhs parseState 3 // silent recovery [Clause(pat,guard,_2,patm,SequencePointAtTarget)], mLast ) -//# 3471 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3471 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'patternClauses)); //# 11140 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11144,13 +11144,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3476 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3476 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let pat,guard,patm = _1 let mLast = _2.Range // silent recovery [Clause(pat,guard,_2,patm,SequencePointAtTarget)], mLast ) -//# 3476 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3476 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'patternClauses)); //# 11155 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11158,13 +11158,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3481 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3481 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let pat,guard,patm = _1 let mLast = rhs parseState 2 // silent recovery [Clause(pat,guard,SynExpr.Const(SynConst.Unit,mLast.EndRange),patm,SequencePointAtTarget)], mLast ) -//# 3481 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3481 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'patternClauses)); //# 11169 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11172,20 +11172,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3488 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3488 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Some _2 ) -//# 3488 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3488 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'patternGuard)); //# 11180 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3490 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3490 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" None ) -//# 3490 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3490 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'patternGuard)); //# 11190 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11193,10 +11193,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3494 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3494 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 3494 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3494 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 11201 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11205,7 +11205,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3498 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3498 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let exprThen,mThen = _1 (fun exprGuard mIf -> let mIfToThen = unionRanges mIf mThen @@ -11214,7 +11214,7 @@ let _fsyacc_reductions () = [| let spIfToThen = SequencePointAtBinding(mIfToThen) SynExpr.IfThenElse(exprGuard,exprThen,_2,spIfToThen,false,mIfToThen,mIfToEndOfLastBranch)) ) -//# 3498 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3498 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'ifExprCases)); //# 11219 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11222,10 +11222,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3508 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3508 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2, rhs parseState 1 ) -//# 3508 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3508 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'ifExprThen)); //# 11230 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11234,10 +11234,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3510 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3510 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _3,rhs parseState 1 ) -//# 3510 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3510 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'ifExprThen)); //# 11242 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11246,21 +11246,21 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3512 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3512 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _4 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileThen()) exprFromParseError _3,rhs parseState 1 ) -//# 3512 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3512 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'ifExprThen)); //# 11255 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3517 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3517 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" None ) -//# 3517 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3517 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'ifExprElifs)); //# 11265 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11268,10 +11268,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3520 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3520 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Some _2 ) -//# 3520 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3520 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'ifExprElifs)); //# 11276 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11280,10 +11280,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3523 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3523 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Some _3 ) -//# 3523 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3523 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'ifExprElifs)); //# 11288 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11292,11 +11292,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3526 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3526 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _4 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileElse()) Some (exprFromParseError _3) ) -//# 3526 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3526 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'ifExprElifs)); //# 11301 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11305,11 +11305,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3530 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3530 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mElif = rhs parseState 1 Some (_3 _2 mElif) ) -//# 3530 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3530 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'ifExprElifs)); //# 11314 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11318,10 +11318,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3534 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3534 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Some (exprFromParseError _2) ) -//# 3534 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3534 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'ifExprElifs)); //# 11326 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11330,10 +11330,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3538 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3538 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let exprs,commas = _1 in (_3 :: exprs),((rhs parseState 2)::commas) ) -//# 3538 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3538 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tupleExpr)); //# 11338 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11342,13 +11342,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3541 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3541 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _3 then reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsExpectedExpressionAfterToken()) let exprs,commas = _1 let zeroWidthAtNextToken = (rhs parseState 3).StartRange ((arbExpr("tupleExpr1",zeroWidthAtNextToken)) :: exprs), (rhs parseState 2)::commas ) -//# 3541 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3541 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tupleExpr)); //# 11353 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11357,12 +11357,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3547 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3547 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _3 then reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsExpectedExpressionAfterToken()) let zeroWidthAtNextToken = (rhs parseState 3).StartRange ((arbExpr("tupleExpr2",zeroWidthAtNextToken)) :: [_1]), [rhs parseState 2] ) -//# 3547 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3547 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tupleExpr)); //# 11367 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11371,10 +11371,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3552 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3552 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_3 ; _1], [rhs parseState 2] ) -//# 3552 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3552 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tupleExpr)); //# 11379 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11382,10 +11382,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3556 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3556 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkSynPrefix (rhs parseState 1) (unionRanges (rhs parseState 1) _2.Range) "~-" _2 ) -//# 3556 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3556 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 11390 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11394,11 +11394,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3559 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3559 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not (IsValidPrefixOperatorUse _1) then reportParseErrorAt _2.Range (FSComp.SR.parsInvalidPrefixOperator()) mkSynPrefix (rhs parseState 1) (unionRanges (rhs parseState 1) _2.Range) ("~"+(_1)) _2 ) -//# 3559 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3559 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 11403 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11407,11 +11407,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3563 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3563 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not (IsValidPrefixOperatorUse _1) then reportParseErrorAt _2.Range (FSComp.SR.parsInvalidPrefixOperator()) mkSynPrefix (rhs parseState 1) (unionRanges (rhs parseState 1) _2.Range) ("~"+(_1)) _2 ) -//# 3563 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3563 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 11416 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11420,11 +11420,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3567 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3567 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not (IsValidPrefixOperatorUse _1) then reportParseErrorAt _2.Range (FSComp.SR.parsInvalidPrefixOperator()) mkSynPrefix (rhs parseState 1) (unionRanges (rhs parseState 1) _2.Range) ("~"+(_1)) _2 ) -//# 3567 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3567 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 11429 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11432,10 +11432,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3571 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3571 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.AddressOf(true,_2,rhs parseState 1,unionRanges (rhs parseState 1) _2.Range) ) -//# 3571 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3571 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 11440 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11443,10 +11443,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3574 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3574 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.AddressOf(false,_2,rhs parseState 1, unionRanges (rhs parseState 1) _2.Range) ) -//# 3574 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3574 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 11451 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11456,10 +11456,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3577 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3577 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.New(false,_2,_4,unionRanges (rhs parseState 1) _4.Range) ) -//# 3577 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3577 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 11464 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11468,20 +11468,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3580 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3580 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.New(false,_2,arbExpr("minusExpr",(rhs parseState 4)),unionRanges (rhs parseState 1) (_2).Range) ) -//# 3580 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3580 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 11476 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3583 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3583 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" arbExpr("minusExpr2",(rhs parseState 1)) ) -//# 3583 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3583 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 11486 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11489,10 +11489,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3586 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3586 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.InferredUpcast(_2,unionRanges (rhs parseState 1) _2.Range) ) -//# 3586 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3586 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 11497 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11500,10 +11500,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3589 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3589 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.InferredDowncast(_2,unionRanges (rhs parseState 1) _2.Range) ) -//# 3589 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3589 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 11508 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11511,10 +11511,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3592 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3592 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 3592 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3592 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 11519 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11523,10 +11523,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3596 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3596 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.App (ExprAtomicFlag.NonAtomic, false, _1,_2,unionRanges _1.Range _2.Range) ) -//# 3596 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3596 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 11531 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11534,11 +11534,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3599 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3599 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let arg,_ = _1 arg ) -//# 3599 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3599 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 11543 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11547,13 +11547,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3604 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3604 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let arg2,hpa2 = _2 if not (IsValidPrefixOperatorUse _1) then reportParseErrorAt arg2.Range (FSComp.SR.parsInvalidPrefixOperator()) if hpa2 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsSuccessiveArgsShouldBeSpacedOrTupled()) mkSynPrefix (rhs parseState 1) (unionRanges (rhs parseState 1) arg2.Range) ("~"+(_1)) arg2 ) -//# 3604 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3604 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 11558 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11561,12 +11561,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3610 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3610 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let arg,hpa = _1 if hpa then reportParseErrorAt arg.Range (FSComp.SR.parsSuccessiveArgsShouldBeSpacedOrTupled()) arg ) -//# 3610 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3610 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 11571 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11575,12 +11575,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3616 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3616 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let arg1,_ = _1 let arg2,_ = _3 SynExpr.App (ExprAtomicFlag.Atomic, false, arg1,arg2,unionRanges arg1.Range arg2.Range),true ) -//# 3616 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3616 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr * bool)); //# 11585 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11589,12 +11589,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3621 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3621 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let arg1,_ = _1 let arg2,_ = _3 SynExpr.App (ExprAtomicFlag.Atomic, false, arg1,arg2,unionRanges arg1.Range arg2.Range),true ) -//# 3621 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3621 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr * bool)); //# 11599 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11603,13 +11603,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3626 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3626 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let arg1,_ = _1 let mLessThan,mGreaterThan,_,args,commas,mTypeArgs = _3 let mWholeExpr = unionRanges arg1.Range mTypeArgs SynExpr.TypeApp(arg1, mLessThan, args, commas, mGreaterThan, mTypeArgs, mWholeExpr), false ) -//# 3626 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3626 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr * bool)); //# 11614 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11618,12 +11618,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3632 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3632 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let arg2,hpa2 = _2 if not (IsValidPrefixOperatorUse _1) then reportParseErrorAt arg2.Range (FSComp.SR.parsInvalidPrefixOperator()) mkSynPrefixPrim (rhs parseState 1) (unionRanges (rhs parseState 1) arg2.Range) _1 arg2,hpa2 ) -//# 3632 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3632 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr * bool)); //# 11628 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11632,11 +11632,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3637 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3637 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let arg1,hpa1 = _1 _3 arg1 (lhs parseState) (rhs parseState 2),hpa1 ) -//# 3637 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3637 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr * bool)); //# 11641 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11644,11 +11644,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3641 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3641 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let arg1 = SynExpr.Ident(ident("base",rhs parseState 1)) _3 arg1 (lhs parseState) (rhs parseState 2),false ) -//# 3641 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3641 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr * bool)); //# 11653 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11656,10 +11656,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3645 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3645 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.LongIdent (true,LongIdentWithDots([_2],[]),None,rhs parseState 2),false ) -//# 3645 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3645 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr * bool)); //# 11664 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11668,21 +11668,21 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3648 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3648 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let arg1,hpa1 = _1 mkSynInfix (rhs parseState 2) arg1 "?" _3, hpa1 ) -//# 3648 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3648 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr * bool)); //# 11677 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3652 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3652 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.Ident (ident(MangledGlobalName,rhs parseState 1)), false ) -//# 3652 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3652 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr * bool)); //# 11687 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11690,10 +11690,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3655 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3655 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.Ident (_1),false ) -//# 3655 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3655 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr * bool)); //# 11698 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11701,10 +11701,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3658 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3658 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 (lhs parseState) false,false ) -//# 3658 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3658 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr * bool)); //# 11709 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11713,22 +11713,22 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3661 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3661 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBracket()) exprFromParseError (_2 (rhs2 parseState 1 2) false), false ) -//# 3661 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3661 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr * bool)); //# 11722 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3665 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3665 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" // silent recovery SynExpr.ArrayOrList(false,[ ], lhs parseState),false ) -//# 3665 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3665 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr * bool)); //# 11733 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11736,12 +11736,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3669 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3669 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBracket()) // silent recovery exprFromParseError (SynExpr.ArrayOrList(false,[ ], rhs parseState 1)),false ) -//# 3669 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3669 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr * bool)); //# 11746 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11750,10 +11750,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3674 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3674 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let exprs,commas = _3 in SynExpr.Tuple(true, List.rev exprs, List.rev commas, (commas.Head, exprs) ||> unionRangeWithListBy (fun e -> e.Range) ), false ) -//# 3674 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3674 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr * bool)); //# 11758 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11762,11 +11762,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3677 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3677 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnmatchedBracket()); let exprs,commas = _3 in SynExpr.Tuple(true, List.rev exprs, List.rev commas, (commas.Head, exprs) ||> unionRangeWithListBy (fun e -> e.Range) ), false ) -//# 3677 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3677 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr * bool)); //# 11771 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11774,10 +11774,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3681 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3681 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1,false ) -//# 3681 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3681 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr * bool)); //# 11782 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11785,37 +11785,37 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3685 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3685 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let idm = rhs parseState 1 (fun e lhsm dotm -> mkSynDot dotm lhsm e _1) ) -//# 3685 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3685 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicExprQualification)); //# 11794 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3689 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3689 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (fun e lhsm dotm -> reportParseErrorAt (rhs parseState 3) (FSComp.SR.nrGlobalUsedOnlyAsFirstName()) let fixedLhsm = mkRange lhsm.FileName lhsm.Start dotm.End // previous lhsm is wrong after 'recover' mkSynDotMissing dotm fixedLhsm e) ) -//# 3689 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3689 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicExprQualification)); //# 11807 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3695 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3695 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (fun e lhsm dotm -> reportParseErrorAt dotm (FSComp.SR.parsMissingQualificationAfterDot()) let fixedLhsm = mkRange lhsm.FileName lhsm.Start dotm.End // previous lhsm is wrong after 'recover' mkSynDotMissing dotm fixedLhsm e) ) -//# 3695 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3695 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicExprQualification)); //# 11820 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11823,14 +11823,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3700 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3700 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (fun e lhsm dotm -> reportParseErrorAt dotm (FSComp.SR.parsMissingQualificationAfterDot()) let fixedLhsm = mkRange lhsm.FileName lhsm.Start dotm.End // previous lhsm is wrong after 'recover' // Include 'e' in the returned expression but throw it away SynExpr.DiscardAfterMissingQualificationAfterDot(e,fixedLhsm)) ) -//# 3700 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3700 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicExprQualification)); //# 11835 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11839,12 +11839,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3706 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3706 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (fun e lhsm dotm -> libraryOnlyError(lhs parseState) SynExpr.LibraryOnlyUnionCaseFieldGet (e,mkSynCaseName lhsm opNameCons,(fst _5),lhsm)) ) -//# 3706 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3706 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicExprQualification)); //# 11849 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11853,12 +11853,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3711 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3711 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (fun e lhsm dotm -> mlCompatWarning (FSComp.SR.parsParenFormIsForML()) (lhs parseState) mkSynDotParenGet lhsm dotm e _2) ) -//# 3711 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3711 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicExprQualification)); //# 11863 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11866,10 +11866,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3716 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3716 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (fun e lhsm dotm -> mkSynDotBrackGet lhsm dotm e _2) ) -//# 3716 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3716 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicExprQualification)); //# 11874 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11878,11 +11878,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3719 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3719 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBracket()) (fun e lhsm dotm -> exprFromParseError (mkSynDotBrackGet lhsm dotm e _2)) ) -//# 3719 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3719 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicExprQualification)); //# 11887 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11890,10 +11890,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3723 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3723 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (fun e lhsm dotm -> mkSynDotBrackSeqSliceGet lhsm dotm e _2) ) -//# 3723 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3723 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicExprQualification)); //# 11898 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11902,22 +11902,22 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3726 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3726 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBracket()) (fun e lhsm dotm -> exprFromParseError (mkSynDotBrackSeqSliceGet lhsm dotm e _2)) ) -//# 3726 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3726 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicExprQualification)); //# 11911 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3730 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3730 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mArg = rhs2 parseState 1 3 (fun e lhsm dotm -> mkSynDotBrackGet lhsm dotm e (arbExpr("indexerExpr1",mArg))) ) -//# 3730 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3730 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicExprQualification)); //# 11922 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11925,12 +11925,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3734 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3734 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBracket()) let mArg = (rhs parseState 1).EndRange (fun e lhsm dotm -> exprFromParseError (mkSynDotBrackGet lhsm dotm e (arbExpr("indexerExpr2",mArg)))) ) -//# 3734 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3734 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomicExprQualification)); //# 11935 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11939,10 +11939,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3739 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3739 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1::_3 ) -//# 3739 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3739 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'optRangeSeqExpr)); //# 11947 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11950,10 +11950,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3740 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3740 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1] ) -//# 3740 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3740 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'optRangeSeqExpr)); //# 11958 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11962,10 +11962,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3744 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3744 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynIndexerArg.Two(mkSynOptionalExpr (rhs parseState 1) (Some _1), mkSynOptionalExpr (rhs parseState 3) (Some _3)) ) -//# 3744 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3744 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'optRange)); //# 11970 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11973,10 +11973,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3747 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3747 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynIndexerArg.Two(mkSynOptionalExpr (rhs parseState 1) (Some _1), mkSynOptionalExpr (rhs parseState 2) None) ) -//# 3747 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3747 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'optRange)); //# 11981 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -11984,20 +11984,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3750 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3750 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynIndexerArg.Two(mkSynOptionalExpr (rhs parseState 1) None, mkSynOptionalExpr (rhs parseState 2) (Some _2)) ) -//# 3750 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3750 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'optRange)); //# 11992 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3753 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3753 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynIndexerArg.Two(mkSynOptionalExpr (rhs parseState 1) None, mkSynOptionalExpr (rhs parseState 1) None) ) -//# 3753 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3753 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'optRange)); //# 12002 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12005,10 +12005,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3756 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3756 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynIndexerArg.One(_1) ) -//# 3756 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3756 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'optRange)); //# 12013 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12016,10 +12016,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3761 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3761 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.Const (_1,_1.Range (lhs parseState)) ) -//# 3761 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3761 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 12024 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12027,10 +12027,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3763 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3763 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 3763 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3763 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 12035 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12038,10 +12038,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3765 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3765 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 3765 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3765 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 12046 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12049,40 +12049,40 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3767 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3767 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 3767 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3767 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 12057 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3769 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3769 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.Null(lhs parseState) ) -//# 3769 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3769 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 12067 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3771 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3771 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.Const(SynConst.Bool false,lhs parseState) ) -//# 3771 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3771 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 12077 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3773 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3773 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.Const(SynConst.Bool true,lhs parseState) ) -//# 3773 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3773 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 12087 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12090,10 +12090,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3775 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3775 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 3775 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3775 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 12098 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12101,10 +12101,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3777 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3777 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 3777 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3777 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 12109 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12112,10 +12112,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3779 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3779 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 3779 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3779 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynExpr)); //# 12120 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12123,10 +12123,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3783 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3783 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.Paren(_2, rhs parseState 1, Some(rhs parseState 3), rhs2 parseState 1 3) ) -//# 3783 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3783 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'beginEndExpr)); //# 12131 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12135,30 +12135,30 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3786 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3786 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBegin()); exprFromParseError _2 ) -//# 3786 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3786 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'beginEndExpr)); //# 12143 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3789 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3789 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (* silent recovery *) arbExpr("beginEndExpr",(lhs parseState)) ) -//# 3789 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3789 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'beginEndExpr)); //# 12153 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3792 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3792 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkSynUnit (lhs parseState) ) -//# 3792 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3792 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'beginEndExpr)); //# 12163 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12168,11 +12168,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3796 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3796 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if _1 <> _3 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsMismatchedQuote(fst _1)) (SynExpr.Quote(mkSynIdGet (lhs parseState) (CompileOpName (fst _1)), snd _1, _2, false, lhs parseState)) ) -//# 3796 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3796 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'quoteExpr)); //# 12177 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12182,12 +12182,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3800 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3800 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatched(fst _1)) let mExpr = rhs2 parseState 1 2 exprFromParseError (SynExpr.Quote(mkSynIdGet (lhs parseState) (CompileOpName (fst _1)),snd _1, _2, false, mExpr)) ) -//# 3800 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3800 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'quoteExpr)); //# 12192 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12196,10 +12196,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3805 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3805 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (* silent recovery *) SynExpr.Quote(mkSynIdGet (lhs parseState) (CompileOpName (fst _1)),snd _1, arbExpr("quoteExpr",(rhs parseState 2)), false, lhs parseState) ) -//# 3805 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3805 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'quoteExpr)); //# 12204 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12208,11 +12208,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3808 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3808 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatched(fst _1)) exprFromParseError (SynExpr.Quote(mkSynIdGet (lhs parseState) (CompileOpName (fst _1)),snd _1, arbExpr("quoteExpr2",(rhs parseState 1).EndRange), false, rhs parseState 1)) ) -//# 3808 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3808 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'quoteExpr)); //# 12217 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12220,10 +12220,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3813 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3813 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 (lhs parseState) true ) -//# 3813 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3813 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'arrayExpr)); //# 12228 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12232,21 +12232,21 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3816 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3816 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBracketBar()) exprFromParseError (_2 (rhs2 parseState 1 2) true) ) -//# 3816 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3816 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'arrayExpr)); //# 12241 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3820 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3820 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (* silent recovery *) SynExpr.ArrayOrList(true,[ ], lhs parseState) ) -//# 3820 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3820 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'arrayExpr)); //# 12251 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12254,12 +12254,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3823 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3823 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBracketBar()) (* silent recovery *) exprFromParseError (SynExpr.ArrayOrList(true,[ ], rhs parseState 1)) ) -//# 3823 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3823 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'arrayExpr)); //# 12264 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12267,10 +12267,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3829 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3829 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.Const(SynConst.Unit,(rhs2 parseState 1 2)) ) -//# 3829 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3829 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'parenExpr)); //# 12275 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12279,11 +12279,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3832 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3832 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = rhs2 parseState 1 3 SynExpr.Paren(_2 m, rhs parseState 1, Some(rhs parseState 3), m) ) -//# 3832 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3832 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'parenExpr)); //# 12288 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12292,12 +12292,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3836 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3836 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _3 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedParen()) let lhsm = unionRangeWithPos (rhs parseState 1) (rhs parseState 3).Start SynExpr.Paren(exprFromParseError (_2 lhsm), rhs parseState 1, None, lhsm) ) -//# 3836 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3836 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'parenExpr)); //# 12302 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12305,59 +12305,59 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3841 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3841 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" // silent recovery SynExpr.Paren(arbExpr("parenExpr1",(rhs parseState 1).EndRange),(rhs parseState 1),Some(rhs parseState 3),(rhs2 parseState 1 3)) ) -//# 3841 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3841 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'parenExpr)); //# 12314 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3845 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3845 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedParen()) let lhsm = unionRangeWithPos (rhs parseState 1) (rhs parseState 2).Start arbExpr("parenExpr2tcs", lhsm) ) -//# 3845 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3845 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'parenExpr)); //# 12326 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3850 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3850 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedParen()) let lhsm = unionRangeWithPos (rhs parseState 1) (rhs parseState 2).Start arbExpr("parenExpr2mcs", lhsm) ) -//# 3850 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3850 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'parenExpr)); //# 12338 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3855 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3855 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedParen()) let lhsm = unionRangeWithPos (rhs parseState 1) (rhs parseState 2).Start arbExpr("parenExpr2rbcs", lhsm) ) -//# 3855 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3855 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'parenExpr)); //# 12350 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3860 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3860 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedParen()) let lhsm = unionRangeWithPos (rhs parseState 1) (rhs parseState 2).Start arbExpr("parenExpr2obecs", lhsm) ) -//# 3860 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3860 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'parenExpr)); //# 12362 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12365,11 +12365,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3865 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3865 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedParen()) arbExpr("parenExpr2",(lhs parseState)) ) -//# 3865 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3865 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'parenExpr)); //# 12374 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12380,10 +12380,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3877 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3877 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (fun m -> SynExpr.TraitCall(_1,_4,_6,m)) ) -//# 3877 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3877 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'parenExprBody)); //# 12388 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12391,10 +12391,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3879 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3879 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (fun _m -> _1) ) -//# 3879 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3879 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'parenExprBody)); //# 12399 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12402,10 +12402,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3881 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3881 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 3881 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3881 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'parenExprBody)); //# 12410 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12413,10 +12413,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3885 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3885 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1] ) -//# 3885 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3885 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'staticallyKnownHeadTypars)); //# 12421 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12425,10 +12425,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3888 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3888 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" List.rev _2 ) -//# 3888 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3888 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'staticallyKnownHeadTypars)); //# 12433 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12437,10 +12437,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3892 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3892 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _3 :: _1 ) -//# 3892 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3892 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'staticallyKnownHeadTyparAlts)); //# 12445 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12448,10 +12448,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3895 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3895 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1] ) -//# 3895 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3895 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'staticallyKnownHeadTyparAlts)); //# 12456 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12460,10 +12460,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3899 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3899 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m,r = _2 in r (rhs2 parseState 1 3) ) -//# 3899 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3899 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'braceExpr)); //# 12468 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12472,13 +12472,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3902 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3902 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBrace()) let m,r = _2 // Note, we can't use 'exprFromParseError' because the extra syntax node interferes with some syntax-directed transformations for computation expressions r (unionRanges (rhs parseState 1) m) ) -//# 3902 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3902 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'braceExpr)); //# 12483 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12486,11 +12486,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3908 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3908 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" // silent recovery arbExpr("braceExpr",rhs2 parseState 1 3) ) -//# 3908 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3908 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'braceExpr)); //# 12495 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12498,12 +12498,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3912 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3912 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBrace()) // Note, we can't use 'exprFromParseError' because the extra syntax node interferes with some syntax-directed transformations for computation expressions SynExpr.Record(None,None,[],rhs parseState 1) ) -//# 3912 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3912 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'braceExpr)); //# 12508 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12511,11 +12511,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3917 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3917 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = rhs2 parseState 1 2 SynExpr.Record(None,None,[],m) ) -//# 3917 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3917 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'braceExpr)); //# 12520 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12523,10 +12523,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3922 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3922 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (lhs parseState), (fun m -> let a,b,c = _1 in SynExpr.Record(a,b,c,m)) ) -//# 3922 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3922 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'braceExprBody)); //# 12531 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12534,10 +12534,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3925 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3925 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 3925 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3925 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'braceExprBody)); //# 12542 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12545,10 +12545,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3928 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3928 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m,r = _1 in (m, r false) ) -//# 3928 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3928 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'braceExprBody)); //# 12553 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12556,20 +12556,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3932 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3932 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m,r = _1 in (fun lhsm isArray -> SynExpr.ArrayOrListOfSeqExpr(isArray, r true m, lhsm)) ) -//# 3932 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3932 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'listExprElements)); //# 12564 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3934 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3934 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (fun lhsm isArray -> SynExpr.ArrayOrList(isArray,[ ], lhsm)) ) -//# 3934 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3934 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'listExprElements)); //# 12574 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12577,10 +12577,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3938 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3938 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1.Range, (fun isArrayOrList lhsm -> SynExpr.CompExpr(isArrayOrList,ref(isArrayOrList),_1,lhsm)) ) -//# 3938 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3938 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'monadicExprInitial)); //# 12585 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12588,10 +12588,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3941 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3941 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 3941 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3941 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'monadicExprInitial)); //# 12596 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12600,7 +12600,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3945 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3945 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let opm = (rhs parseState 2) (unionRanges _1.Range _3.Range),(fun _isArray wholem -> // in the case of "{ 1 .. 10 }", we want the range of the expression to include the curlies, that comes from a higher level rule in the grammar, @@ -12609,7 +12609,7 @@ let _fsyacc_reductions () = [| | SynExpr.App(a,b,c,d,_) -> SynExpr.App(a,b,c,d,wholem) | _ -> failwith "impossible") ) -//# 3945 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3945 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rangeSequenceExpr)); //# 12614 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12619,10 +12619,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3953 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3953 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (unionRanges _1.Range _5.Range),(fun _isArray wholem -> mkSynTrifix wholem ".. .." _1 _3 _5) ) -//# 3953 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3953 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rangeSequenceExpr)); //# 12627 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12631,7 +12631,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3956 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3956 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _3 then reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsUnexpectedEndOfFileExpression()) let opm = (rhs parseState 2) let e = arbExpr("rangeSeqError1", (rhs parseState 3).StartRange) @@ -12642,7 +12642,7 @@ let _fsyacc_reductions () = [| | SynExpr.App(a,b,c,d,_) -> SynExpr.App(a,b,c,d,wholem) | _ -> failwith "impossible") ) -//# 3956 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3956 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rangeSequenceExpr)); //# 12647 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12650,10 +12650,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3969 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3969 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynExpr.YieldOrReturn((true,false), _2, unionRanges (rhs parseState 1) _2.Range) ) -//# 3969 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3969 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'arrowThenExprR)); //# 12658 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12662,10 +12662,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3974 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3974 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (_1, _3, true) ) -//# 3974 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3974 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'forLoopBinder)); //# 12670 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12674,10 +12674,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3977 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3977 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m,r = _3 in (_1, r false m, true) ) -//# 3977 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3977 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'forLoopBinder)); //# 12682 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12686,11 +12686,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3980 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3980 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _3 then reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsExpectedExpressionAfterToken()) (_1, arbExpr("forLoopBinder",(rhs parseState 2)), false) ) -//# 3980 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3980 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'forLoopBinder)); //# 12695 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12699,11 +12699,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3984 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3984 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _2 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsInOrEqualExpected()) (_1, arbExpr("forLoopBinder2",(rhs parseState 1).EndRange), false) ) -//# 3984 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3984 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'forLoopBinder)); //# 12708 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12714,10 +12714,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3989 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3989 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" idOfPat (rhs parseState 1) _1,_3,_4,_5 ) -//# 3989 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3989 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'forLoopRange)); //# 12722 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12726,30 +12726,30 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 3992 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3992 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" raiseParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnexpectedSymbolEqualsInsteadOfIn()) ) -//# 3992 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3992 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'forLoopRange)); //# 12734 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3995 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3995 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" true ) -//# 3995 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3995 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'forLoopDirection)); //# 12744 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 3996 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3996 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" false ) -//# 3996 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 3996 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'forLoopDirection)); //# 12754 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12760,12 +12760,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4000 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4000 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" libraryOnlyWarning (lhs parseState) let s,sm = _2,rhs parseState 2 (fun m -> SynExpr.LibraryOnlyILAssembly (ParseAssemblyCodeInstructions s sm,_3,List.rev _4,_5,m)) ) -//# 4000 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4000 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'inlineAssemblyExpr)); //# 12770 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12774,30 +12774,30 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4006 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4006 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 :: _1 ) -//# 4006 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4006 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_curriedArgExprs)); //# 12782 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4009 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4009 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 4009 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4009 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_curriedArgExprs)); //# 12792 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4013 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4013 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" None ) -//# 4013 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4013 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_atomicExprAfterType)); //# 12802 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12805,20 +12805,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4016 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4016 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Some(_1) ) -//# 4016 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4016 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_atomicExprAfterType)); //# 12813 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4019 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4019 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 4019 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4019 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_inlineAssemblyTypeArg)); //# 12823 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12828,20 +12828,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4020 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4020 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_3] ) -//# 4020 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4020 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_inlineAssemblyTypeArg)); //# 12836 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4024 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4024 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 4024 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4024 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_inlineAssemblyReturnTypes)); //# 12846 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12849,10 +12849,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4027 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4027 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_2] ) -//# 4027 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4027 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_inlineAssemblyReturnTypes)); //# 12857 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12860,10 +12860,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4030 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4030 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 4030 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4030 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_inlineAssemblyReturnTypes)); //# 12868 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12875,7 +12875,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4034 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4034 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let arg = match _4 with None -> mkSynUnit (lhs parseState) | Some e -> e let l = List.rev _5 let dummyField = mkRecdField (LongIdentWithDots([], [])) // dummy identifier, it will be discarded @@ -12884,7 +12884,7 @@ let _fsyacc_reductions () = [| let bindings = List.tail l (Some (_2,arg,rhs2 parseState 2 4, inheritsSep, rhs parseState 1), None, bindings) ) -//# 4034 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4034 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recdExpr)); //# 12889 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12892,10 +12892,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4042 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4042 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let a,b = _1 in (None, a, b) ) -//# 4042 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4042 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recdExpr)); //# 12900 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12906,7 +12906,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4046 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4046 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" match _1 with | LongOrSingleIdent(false, (LongIdentWithDots(_,_) as f),None,m) -> let f = mkRecdField f @@ -12915,28 +12915,28 @@ let _fsyacc_reductions () = [| (None, l) | _ -> raiseParseErrorAt (rhs parseState 2) (FSComp.SR.parsFieldBinding()) ) -//# 4046 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4046 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recdExprCore)); //# 12920 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4059 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4059 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = rhs parseState 1 reportParseErrorAt m (FSComp.SR.parsUnderscoreInvalidFieldName()) reportParseErrorAt m (FSComp.SR.parsFieldBinding()) let f = mkUnderscoreRecdField m (None, [ (f, None, None) ]) ) -//# 4059 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4059 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recdExprCore)); //# 12934 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4066 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4066 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = rhs parseState 1 reportParseErrorAt m (FSComp.SR.parsUnderscoreInvalidFieldName()) let f = mkUnderscoreRecdField m @@ -12944,7 +12944,7 @@ let _fsyacc_reductions () = [| (None, [ (f, None, None) ]) ) -//# 4066 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4066 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recdExprCore)); //# 12949 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12954,14 +12954,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4075 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4075 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnderscoreInvalidFieldName()) let f = mkUnderscoreRecdField (rhs parseState 1) let l = List.rev _4 let l = rebindRanges (f, Some _3) l _5 (None, l) ) -//# 4075 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4075 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recdExprCore)); //# 12966 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12972,12 +12972,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4083 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4083 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let l = List.rev _4 let l = rebindRanges _3 l _5 (Some (_1, (rhs parseState 2, None)), l) ) -//# 4083 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4083 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recdExprCore)); //# 12982 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -12986,10 +12986,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4088 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4088 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (Some (_1, (rhs parseState 2, None)), []) ) -//# 4088 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4088 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recdExprCore)); //# 12994 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13000,12 +13000,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4091 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4091 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let l = List.rev _4 let l = rebindRanges _3 l _5 (Some (_1, (rhs parseState 2, None)), l) ) -//# 4091 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4091 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recdExprCore)); //# 13010 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13013,60 +13013,60 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4096 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4096 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" Some _1 ) -//# 4096 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4096 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_seps_recd)); //# 13021 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4097 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4097 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" None ) -//# 4097 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4097 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_seps_recd)); //# 13031 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4100 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4100 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (rhs parseState 1), None ) -//# 4100 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4100 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'seps_recd)); //# 13041 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4101 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4101 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = (rhs parseState 1) in (m, Some m.End) ) -//# 4101 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4101 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'seps_recd)); //# 13051 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4102 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4102 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (rhs2 parseState 1 2), Some (rhs parseState 1).End ) -//# 4102 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4102 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'seps_recd)); //# 13061 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4103 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4103 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (rhs2 parseState 1 2), Some (rhs parseState 2).End ) -//# 4103 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4103 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'seps_recd)); //# 13071 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13074,22 +13074,22 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4110 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4110 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mkRecdField _1 ) -//# 4110 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4110 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'pathOrUnderscore)); //# 13082 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4112 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4112 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = rhs parseState 1 reportParseErrorAt m (FSComp.SR.parsUnderscoreInvalidFieldName()) mkUnderscoreRecdField m ) -//# 4112 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4112 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'pathOrUnderscore)); //# 13094 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13099,20 +13099,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4118 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4118 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (_3, Some _2) :: _1 ) -//# 4118 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4118 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recdExprBindings)); //# 13107 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4119 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4119 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 4119 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4119 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recdExprBindings)); //# 13117 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13121,10 +13121,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4123 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4123 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (_1, Some _3) ) -//# 4123 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4123 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recdBinding)); //# 13129 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13132,11 +13132,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4126 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4126 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsFieldBinding()) (_1, None) ) -//# 4126 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4126 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recdBinding)); //# 13141 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13145,11 +13145,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4130 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4130 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsFieldBinding()) (_1, None) ) -//# 4130 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4130 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recdBinding)); //# 13154 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13157,11 +13157,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4134 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4134 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsFieldBinding()) (_1, None) ) -//# 4134 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4134 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recdBinding)); //# 13166 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13170,11 +13170,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4138 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4138 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsFieldBinding()) (_1, None) ) -//# 4138 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4138 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'recdBinding)); //# 13179 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13185,12 +13185,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4149 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4149 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mNewExpr = rhs parseState 1 let fullRange = match _4 with [] -> (rhs parseState 1) | _ -> (rhs2 parseState 1 4) fullRange, (fun m -> let (a,b) = _1 in SynExpr.ObjExpr(a,b,_2,_4, mNewExpr, m)) ) -//# 4149 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4149 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'objExpr)); //# 13195 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13200,12 +13200,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4154 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4154 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mNewExpr = rhs parseState 1 let fullRange = match _3 with [] -> (rhs parseState 1) | _ -> (rhs2 parseState 1 3) fullRange, (fun m -> let (a,b) = _1 in SynExpr.ObjExpr(a,b,[],_3, mNewExpr, m)) ) -//# 4154 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4154 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'objExpr)); //# 13210 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13213,11 +13213,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4159 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4159 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mNewExpr = rhs parseState 1 (rhs2 parseState 1 2), (fun m -> let (a,b) = _2,None in SynExpr.ObjExpr(a,b,[],[], mNewExpr, m)) ) -//# 4159 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4159 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'objExpr)); //# 13222 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13228,10 +13228,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4165 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4165 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (_2, Some(_4,Some(_5))) ) -//# 4165 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4165 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'objExprBaseCall)); //# 13236 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13241,10 +13241,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4168 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4168 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (_2, Some(_4,None)) ) -//# 4168 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4168 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'objExprBaseCall)); //# 13249 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13252,10 +13252,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4171 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4171 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2,None ) -//# 4171 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4171 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'objExprBaseCall)); //# 13260 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13263,20 +13263,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4176 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4176 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4176 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4176 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_objExprBindings)); //# 13271 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4177 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4177 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 4177 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4177 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_objExprBindings)); //# 13281 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13284,12 +13284,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4181 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4181 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mWithKwd = (rhs parseState 1) let _localBindingsLastRange, localBindingsBuilder = _2 localBindingsBuilder [] None mWithKwd ) -//# 4181 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4181 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'objExprBindings)); //# 13294 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13297,12 +13297,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4186 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4186 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mWithKwd = (rhs parseState 1) let _localBindingsLastRange, localBindingsBuilder = _2 localBindingsBuilder [] None mWithKwd ) -//# 4186 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4186 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'objExprBindings)); //# 13307 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13311,14 +13311,14 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4191 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4191 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 |> (List.choose (function | SynMemberDefn.Member(b,m) -> Some b | SynMemberDefn.AutoProperty(_,_,_,_,_,_,_,_,_,_,m) -> errorR(Error(FSComp.SR.parsIllegalMemberVarInObjectImplementation(),m)); None | x -> errorR(Error(FSComp.SR.parsMemberIllegalInObjectImplementation(),x.Range)); None)) ) -//# 4191 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4191 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'objExprBindings)); //# 13323 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13327,20 +13327,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4198 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4198 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 :: _2 ) -//# 4198 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4198 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'objExprInterfaces)); //# 13335 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4202 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4202 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [] ) -//# 4202 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4202 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_objExprInterfaces)); //# 13345 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13349,10 +13349,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4205 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4205 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 :: _2 ) -//# 4205 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4205 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_objExprInterfaces)); //# 13357 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13360,10 +13360,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4208 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4208 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (* silent recovery *) _2 ) -//# 4208 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4208 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_objExprInterfaces)); //# 13368 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13375,10 +13375,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4212 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4212 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" InterfaceImpl(_2, _3, lhs parseState) ) -//# 4212 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4212 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'objExprInterface)); //# 13383 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13386,10 +13386,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4216 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4216 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 true ) -//# 4216 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4216 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'braceBarExpr)); //# 13394 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13397,10 +13397,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4218 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4218 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 false ) -//# 4218 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4218 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'braceBarExpr)); //# 13405 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13409,7 +13409,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4222 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4222 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let orig, flds = _2 let flds = flds |> List.choose (function @@ -13419,7 +13419,7 @@ let _fsyacc_reductions () = [| let m = rhs2 parseState 1 3 (fun isStruct -> SynExpr.AnonRecd(isStruct,orig,flds,m)) ) -//# 4222 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4222 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'braceBarExprCore)); //# 13424 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13428,7 +13428,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4232 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4232 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBraceBar()) let orig, flds = _2 let flds = @@ -13439,7 +13439,7 @@ let _fsyacc_reductions () = [| let m = rhs2 parseState 1 2 (fun isStruct -> SynExpr.AnonRecd(isStruct,orig,flds,m)) ) -//# 4232 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4232 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'braceBarExprCore)); //# 13444 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13447,12 +13447,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4243 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4243 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" // silent recovery let m = rhs2 parseState 1 3 (fun _ -> arbExpr("braceBarExpr",m)) ) -//# 4243 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4243 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'braceBarExprCore)); //# 13457 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13460,12 +13460,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4248 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4248 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBraceBar()) let m = rhs2 parseState 1 1 (fun isStruct -> SynExpr.AnonRecd(isStruct,None,[],m)) ) -//# 4248 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4248 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'braceBarExprCore)); //# 13470 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13473,11 +13473,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4253 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4253 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = rhs2 parseState 1 2 (fun isStruct -> SynExpr.AnonRecd(isStruct,None,[],m)) ) -//# 4253 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4253 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'braceBarExprCore)); //# 13482 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13486,11 +13486,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4258 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4258 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mAll = unionRanges (rhs parseState 1) _4.Range mkSynFunMatchLambdas parseState.SynArgNameGenerator false mAll _2 _4 ) -//# 4258 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4258 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'anonLambdaExpr)); //# 13495 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13498,11 +13498,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4262 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4262 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mAll = rhs2 parseState 1 3 mkSynFunMatchLambdas parseState.SynArgNameGenerator false mAll _2 (arbExpr("anonLambdaExpr1",(rhs parseState 4))) ) -//# 4262 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4262 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'anonLambdaExpr)); //# 13507 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13511,11 +13511,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4266 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4266 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mAll = unionRanges (rhs parseState 1) _4.Range mkSynFunMatchLambdas parseState.SynArgNameGenerator false mAll _2 _4 ) -//# 4266 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4266 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'anonLambdaExpr)); //# 13520 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13525,12 +13525,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4270 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4270 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _5 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileFunBody()); let mAll = unionRanges (rhs parseState 1) _4.Range exprFromParseError (mkSynFunMatchLambdas parseState.SynArgNameGenerator false mAll _2 _4) ) -//# 4270 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4270 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'anonLambdaExpr)); //# 13535 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13538,11 +13538,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4275 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4275 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs2 parseState 1 3) (FSComp.SR.parsMissingFunctionBody()) mkSynFunMatchLambdas parseState.SynArgNameGenerator false (rhs2 parseState 1 3) _2 (arbExpr("anonLambdaExpr2",(rhs parseState 4))) ) -//# 4275 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4275 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'anonLambdaExpr)); //# 13547 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13551,11 +13551,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4279 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4279 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _4 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileFunBody()) exprFromParseError (mkSynFunMatchLambdas parseState.SynArgNameGenerator false (rhs2 parseState 1 3) _2 (arbExpr("anonLambdaExpr3",(rhs parseState 4)))) ) -//# 4279 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4279 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'anonLambdaExpr)); //# 13560 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13563,20 +13563,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4283 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4283 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" exprFromParseError (mkSynFunMatchLambdas parseState.SynArgNameGenerator false (rhs2 parseState 1 2) _2 (arbExpr("anonLambdaExpr4",(rhs parseState 3)))) ) -//# 4283 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4283 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'anonLambdaExpr)); //# 13571 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4286 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4286 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" exprFromParseError (mkSynFunMatchLambdas parseState.SynArgNameGenerator false (rhs parseState 1) [] (arbExpr("anonLambdaExpr5",(rhs parseState 2)))) ) -//# 4286 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4286 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'anonLambdaExpr)); //# 13581 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13584,12 +13584,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4290 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4290 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let clauses,mLast = _2 let mAll = unionRanges (rhs parseState 1) mLast SynExpr.MatchLambda(false,(rhs parseState 1),clauses,NoSequencePointAtInvisibleBinding,mAll) ) -//# 4290 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4290 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'anonMatchingExpr)); //# 13594 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13597,12 +13597,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4295 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4295 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let clauses,mLast = _2 let mAll = unionRanges (rhs parseState 1) mLast SynExpr.MatchLambda(false,(rhs parseState 1),clauses,NoSequencePointAtInvisibleBinding,mAll) ) -//# 4295 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4295 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'anonMatchingExpr)); //# 13607 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13610,10 +13610,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4304 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4304 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4304 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4304 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeWithTypeConstraints)); //# 13618 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13622,10 +13622,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4307 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4307 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynType.WithGlobalConstraints(_1, List.rev _3,lhs parseState) ) -//# 4307 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4307 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeWithTypeConstraints)); //# 13630 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13633,10 +13633,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4311 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4311 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4311 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4311 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'topTypeWithTypeConstraints)); //# 13641 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13645,22 +13645,22 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4314 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4314 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let ty,arity = _1 // nb. it doesn't matter where the constraints go in the structure of the type. SynType.WithGlobalConstraints(ty,List.rev _3,lhs parseState), arity ) -//# 4314 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4314 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'topTypeWithTypeConstraints)); //# 13655 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4320 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4320 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" None ) -//# 4320 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4320 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_topReturnTypeWithTypeConstraints)); //# 13665 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13668,12 +13668,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4323 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4323 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let ty,arity = _2 let arity = (match arity with SynValInfo([],rmdata)-> rmdata | _ -> SynInfo.unnamedRetVal) Some (SynReturnInfo((ty,arity),rhs parseState 2)) ) -//# 4323 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4323 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_topReturnTypeWithTypeConstraints)); //# 13678 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13682,12 +13682,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4329 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4329 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let dty,dmdata= _1 let rty,(SynValInfo(dmdatas,rmdata)) = _3 SynType.Fun(dty,rty,lhs parseState), (SynValInfo(dmdata::dmdatas, rmdata)) ) -//# 4329 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4329 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'topType)); //# 13692 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13695,10 +13695,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4334 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4334 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let ty,rmdata = _1 in ty, (SynValInfo([],(match rmdata with [md] -> md | _ -> SynInfo.unnamedRetVal))) ) -//# 4334 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4334 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'topType)); //# 13703 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13707,10 +13707,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4338 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4338 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let ty,mdata = _1 in let tys,mdatas = List.unzip _3 in (SynType.Tuple(false,List.map (fun ty -> (false,ty)) (ty ::tys), lhs parseState)),(mdata :: mdatas) ) -//# 4338 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4338 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'topTupleType)); //# 13715 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13718,10 +13718,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4341 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4341 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let ty,mdata = _1 in ty,[mdata] ) -//# 4341 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4341 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'topTupleType)); //# 13726 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13730,10 +13730,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4345 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4345 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 :: _3 ) -//# 4345 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4345 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'topTupleTypeElements)); //# 13738 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13741,10 +13741,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4348 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4348 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1] ) -//# 4348 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4348 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'topTupleTypeElements)); //# 13749 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13754,12 +13754,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4352 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4352 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" match _2 with | SynType.LongIdent(LongIdentWithDots([id],_)) -> _4,SynArgInfo(_1,false,Some id) | _ -> raiseParseErrorAt (rhs parseState 2) (FSComp.SR.parsSyntaxErrorInLabeledType()) ) -//# 4352 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4352 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'topAppType)); //# 13764 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13769,10 +13769,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4357 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4357 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _5,SynArgInfo(_1,true,Some _3) ) -//# 4357 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4357 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'topAppType)); //# 13777 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13781,10 +13781,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4360 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4360 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (_2,SynArgInfo(_1,false,None)) ) -//# 4360 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4360 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'topAppType)); //# 13789 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13793,12 +13793,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4363 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4363 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" match _1 with | SynType.LongIdent(LongIdentWithDots([id],_)) -> _3,SynArgInfo([],false,Some id) | _ -> raiseParseErrorAt (rhs parseState 2) (FSComp.SR.parsSyntaxErrorInLabeledType()) ) -//# 4363 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4363 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'topAppType)); //# 13803 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13807,10 +13807,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4368 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4368 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _4,SynArgInfo([],true,Some _2) ) -//# 4368 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4368 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'topAppType)); //# 13815 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13818,10 +13818,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4371 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4371 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1,SynArgInfo([],false,None) ) -//# 4371 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4371 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'topAppType)); //# 13826 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13830,10 +13830,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4377 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4377 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynType.Fun(_1,_3,lhs parseState) ) -//# 4377 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4377 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynType)); //# 13838 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13841,10 +13841,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4380 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4380 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4380 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4380 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynType)); //# 13849 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13853,10 +13853,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4383 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4383 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" checkEndOfFileError _2; _1 ) -//# 4383 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4383 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynType)); //# 13861 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13865,10 +13865,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4388 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4388 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynType.Tuple(false,(false,_1) :: _3,lhs parseState) ) -//# 4388 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4388 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tupleType)); //# 13873 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13877,11 +13877,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4391 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4391 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if _1 <> "/" then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedInfixOperator()); SynType.Tuple(false,(true, SynType.StaticConstant (SynConst.Int32 1, lhs parseState)):: _2, lhs parseState) ) -//# 4391 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4391 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tupleType)); //# 13886 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13891,11 +13891,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4395 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4395 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if _2 <> "/" then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedInfixOperator()); SynType.Tuple(false,(true,_1) :: _3, lhs parseState) ) -//# 4395 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4395 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tupleType)); //# 13900 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13903,10 +13903,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4399 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4399 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4399 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4399 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tupleType)); //# 13911 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13915,10 +13915,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4403 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4403 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (false,_1) :: _3 ) -//# 4403 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4403 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tupleOrQuotTypeElements)); //# 13923 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13928,11 +13928,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4406 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4406 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if _2 <> "/" then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedInfixOperator()); (true,_1) :: _3 ) -//# 4406 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4406 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tupleOrQuotTypeElements)); //# 13937 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13940,10 +13940,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4410 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4410 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [(false,_1)] ) -//# 4410 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4410 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'tupleOrQuotTypeElements)); //# 13948 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13951,10 +13951,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4414 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4414 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynType.LongIdent(_1) ) -//# 4414 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4414 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'appTypeCon)); //# 13959 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13962,10 +13962,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4417 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4417 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynType.Var(_1, lhs parseState) ) -//# 4417 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4417 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'appTypeCon)); //# 13970 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13975,12 +13975,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4421 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4421 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if _2 <> "^" && _2 <> "^-" then reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnexpectedInfixOperator()); if _2 = "^-" then SynType.MeasurePower(_1, SynRationalConst.Negate(_3), lhs parseState) else SynType.MeasurePower(_1, _3, lhs parseState) ) -//# 4421 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4421 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'appTypeConPower)); //# 13985 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -13988,10 +13988,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4426 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4426 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4426 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4426 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'appTypeConPower)); //# 13996 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14000,10 +14000,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4430 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4430 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynType.Array(_2,_1,lhs parseState) ) -//# 4430 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4430 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'appType)); //# 14008 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14012,10 +14012,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4433 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4433 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynType.Array(_3,_1,lhs parseState) ) -//# 4433 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4433 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'appType)); //# 14020 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14024,10 +14024,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4436 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4436 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynType.App(_2, None, [_1], [], None, true, unionRanges (rhs parseState 1) _2.Range) ) -//# 4436 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4436 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'appType)); //# 14032 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14037,12 +14037,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4439 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4439 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let args, commas = _2 mlCompatWarning (FSComp.SR.parsMultiArgumentGenericTypeFormDeprecated()) (unionRanges (rhs parseState 1) _4.Range); SynType.App(_4, None, args, commas, None, true, unionRanges (rhs parseState 1) _4.Range) ) -//# 4439 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4439 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'appType)); //# 14047 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14050,10 +14050,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4444 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4444 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4444 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4444 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'appType)); //# 14058 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14062,12 +14062,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4447 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4447 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let tp,typ = _1,_3 let m = lhs parseState SynType.WithGlobalConstraints(SynType.Var (tp, rhs parseState 1), [WhereTyparSubtypeOfType(tp,typ,m)],m) ) -//# 4447 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4447 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'appType)); //# 14072 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14075,50 +14075,50 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4452 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4452 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynType.HashConstraint(_3, lhs parseState) ) -//# 4452 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4452 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'appType)); //# 14083 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4456 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4456 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" 1 ) -//# 4456 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4456 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'arrayTypeSuffix)); //# 14093 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4459 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4459 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" 2 ) -//# 4459 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4459 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'arrayTypeSuffix)); //# 14103 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4462 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4462 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" 3 ) -//# 4462 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4462 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'arrayTypeSuffix)); //# 14113 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4465 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4465 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" 4 ) -//# 4465 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4465 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'arrayTypeSuffix)); //# 14123 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14128,10 +14128,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4469 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4469 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let typeArgs, commas = _4 in _1 :: _3 :: List.rev typeArgs, (rhs parseState 2)::(List.rev commas) ) -//# 4469 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4469 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'appTypePrefixArguments)); //# 14136 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14140,11 +14140,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4473 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4473 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let typeArgs, commas = _1 _3 :: typeArgs, (rhs parseState 2)::commas ) -//# 4473 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4473 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeArgListElements)); //# 14149 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14153,22 +14153,22 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4477 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4477 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsMissingTypeArgs()) let typeArgs, commas = _1 _3 :: typeArgs, (rhs parseState 2)::commas ) -//# 4477 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4477 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeArgListElements)); //# 14163 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4482 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4482 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [], [] ) -//# 4482 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4482 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeArgListElements)); //# 14173 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14176,10 +14176,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4486 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4486 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4486 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4486 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'powerType)); //# 14184 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14189,12 +14189,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4489 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4489 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if _2 <> "^" && _2 <> "^-" then reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnexpectedInfixOperator()); if _2 = "^-" then SynType.MeasurePower(_1, SynRationalConst.Negate(_3), lhs parseState) else SynType.MeasurePower(_1, _3, lhs parseState) ) -//# 4489 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4489 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'powerType)); //# 14199 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14204,12 +14204,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4498 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4498 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let args, commas = _2 mlCompatWarning (FSComp.SR.parsMultiArgumentGenericTypeFormDeprecated()) (unionRanges (rhs parseState 1) _4.Range); SynType.App(_4, None, args, commas, None, true, unionRanges (rhs parseState 1) _4.Range) ) -//# 4498 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4498 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomTypeNonAtomicDeprecated)); //# 14214 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14217,10 +14217,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4503 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4503 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4503 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4503 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomTypeNonAtomicDeprecated)); //# 14225 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14228,10 +14228,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4507 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4507 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4507 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4507 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomTypeOrAnonRecdType)); //# 14236 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14239,7 +14239,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4509 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4509 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let flds,isStruct = _1 let flds2 = flds |> List.choose (function @@ -14247,7 +14247,7 @@ let _fsyacc_reductions () = [| | _ -> reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsInvalidAnonRecdType()); None) SynType.AnonRecd (isStruct,flds2, rhs parseState 1) ) -//# 4509 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4509 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomTypeOrAnonRecdType)); //# 14252 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14255,10 +14255,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4522 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4522 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynType.HashConstraint(_2, lhs parseState) ) -//# 4522 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4522 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomType)); //# 14263 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14266,20 +14266,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4525 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4525 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4525 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4525 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomType)); //# 14274 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4528 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4528 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynType.Anon (lhs parseState) ) -//# 4528 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4528 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomType)); //# 14284 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14288,10 +14288,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4531 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4531 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 4531 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4531 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomType)); //# 14296 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14300,11 +14300,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4534 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4534 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedParen()) _2 ) -//# 4534 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4534 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomType)); //# 14309 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14314,10 +14314,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4538 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4538 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynType.Tuple(true, (false,_3) :: _5,lhs parseState) ) -//# 4538 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4538 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomType)); //# 14322 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14327,11 +14327,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4541 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4541 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnmatchedParen()) SynType.Tuple(true, (false,_3) :: _5,lhs parseState) ) -//# 4541 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4541 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomType)); //# 14336 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14340,11 +14340,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4545 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4545 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnmatchedParen()) SynType.Anon (lhs parseState) ) -//# 4545 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4545 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomType)); //# 14349 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14353,11 +14353,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4549 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4549 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnmatchedParen()) SynType.Anon (lhs parseState) ) -//# 4549 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4549 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomType)); //# 14362 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14365,11 +14365,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4553 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4553 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnmatchedParen()) SynType.Anon (lhs parseState) ) -//# 4553 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4553 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomType)); //# 14374 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14377,21 +14377,21 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4557 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4557 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynType.StaticConstant(_1, rhs parseState 1) ) -//# 4557 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4557 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomType)); //# 14385 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4560 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4560 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = rhs parseState 1 SynType.StaticConstant(SynConst.String (null, m), m) ) -//# 4560 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4560 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomType)); //# 14396 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14399,31 +14399,31 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4564 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4564 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let e,_ = _2 SynType.StaticConstantExpr(e, e.Range) ) -//# 4564 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4564 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomType)); //# 14408 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4568 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4568 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynType.StaticConstant(SynConst.Bool false,lhs parseState) ) -//# 4568 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4568 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomType)); //# 14418 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4571 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4571 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynType.StaticConstant(SynConst.Bool true,lhs parseState) ) -//# 4571 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4571 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomType)); //# 14428 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14431,10 +14431,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4574 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4574 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (* silent recovery *) SynType.Anon (lhs parseState) ) -//# 4574 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4574 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomType)); //# 14439 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14443,10 +14443,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4577 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4577 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mLessThan,mGreaterThan,args,commas,mWhole = _2 in SynType.App(_1, Some(mLessThan), args, commas, mGreaterThan, false, unionRanges _1.Range mWhole) ) -//# 4577 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4577 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomType)); //# 14451 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14455,10 +14455,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4580 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4580 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynType.LongIdentApp(_1, _3, None, [], [], None, unionRanges (rhs parseState 1) _3.Range) ) -//# 4580 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4580 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomType)); //# 14463 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14468,11 +14468,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4583 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4583 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mLessThan,mGreaterThan,args,commas,mWhole = _4 SynType.LongIdentApp(_1, _3, Some(mLessThan), args, commas, mGreaterThan, unionRanges _1.Range mWhole) ) -//# 4583 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4583 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomType)); //# 14477 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14481,11 +14481,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4587 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4587 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _3 then reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsExpectedNameAfterToken()) _1 ) -//# 4587 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4587 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'atomType)); //# 14490 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14493,13 +14493,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4593 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4593 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mLessThan, mGreaterThan, parsedOk, args, commas, mAll = _1 if parsedOk then // if someone has "foo @@ -14507,11 +14507,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4599 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4599 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let mLessThan, mGreaterThan, _, args, commas, mAll = _2 mLessThan, mGreaterThan, args, commas, mAll ) -//# 4599 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4599 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : range * range option * Ast.SynType list * range list * range)); //# 14516 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14523,11 +14523,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4604 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4604 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let typeArgs, commas = _5 (rhs parseState 1), Some(rhs parseState 6), true, (_2 :: _4 :: List.rev typeArgs), (rhs parseState 3)::(List.rev commas), lhs parseState ) -//# 4604 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4604 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : range * range option * bool * Ast.SynType list * range list * range)); //# 14532 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14539,7 +14539,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4608 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4608 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _6 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileTypeArgs()) else @@ -14549,7 +14549,7 @@ let _fsyacc_reductions () = [| let zeroWidthAtStartOfNextToken = nextToken.StartRange (rhs parseState 1), None, false, (_2 :: _4 :: List.rev typeArgs), (rhs parseState 3)::(List.rev commas), unionRanges (rhs parseState 1) zeroWidthAtStartOfNextToken ) -//# 4608 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4608 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : range * range option * bool * Ast.SynType list * range list * range)); //# 14554 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14559,13 +14559,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4618 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4618 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _4 then reportParseErrorAt (rhs parseState 4) (FSComp.SR.parsMissingTypeArgs()) let nextToken = rhs parseState 4 let zeroWidthAtStartOfNextToken = nextToken.StartRange (rhs parseState 1), None, false, [_2], [rhs parseState 3], unionRanges (rhs parseState 1) zeroWidthAtStartOfNextToken ) -//# 4618 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4618 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : range * range option * bool * Ast.SynType list * range list * range)); //# 14570 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14575,10 +14575,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4624 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4624 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (rhs parseState 1), Some(rhs parseState 3), true, [_2], [], lhs parseState ) -//# 4624 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4624 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : range * range option * bool * Ast.SynType list * range list * range)); //# 14583 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14588,13 +14588,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4627 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4627 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let nextToken = rhs parseState 3 if not _3 then reportParseErrorAt nextToken (FSComp.SR.parsMissingTypeArgs()) let zeroWidthAtStartOfNextToken = nextToken.StartRange (rhs parseState 1), None, false, [_2], [], unionRanges (rhs parseState 1) zeroWidthAtStartOfNextToken ) -//# 4627 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4627 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : range * range option * bool * Ast.SynType list * range list * range)); //# 14599 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14603,10 +14603,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4633 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4633 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (rhs parseState 1), Some(rhs parseState 2), true, [], [], lhs parseState ) -//# 4633 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4633 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : range * range option * bool * Ast.SynType list * range list * range)); //# 14611 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14615,7 +14615,7 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4636 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4636 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _2 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsExpectedTypeAfterToken()) else @@ -14624,7 +14624,7 @@ let _fsyacc_reductions () = [| let zeroWidthAtStartOfNextToken = nextToken.StartRange (rhs parseState 1), None, false, [], [], unionRanges (rhs parseState 1) zeroWidthAtStartOfNextToken ) -//# 4636 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4636 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : range * range option * bool * Ast.SynType list * range list * range)); //# 14629 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14632,10 +14632,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4646 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4646 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4646 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4646 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeArgActual)); //# 14640 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14644,10 +14644,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4649 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4649 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynType.StaticConstantNamed(_1, _3, unionRanges _1.Range _3.Range) ) -//# 4649 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4649 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeArgActual)); //# 14652 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14655,13 +14655,13 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4652 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4652 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsMissingTypeArgs()) let dummy = SynType.StaticConstant(SynConst.Int32(0), rhs parseState 2) SynType.StaticConstantNamed(_1, dummy, (rhs2 parseState 1 2)) ) -//# 4652 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4652 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeArgActual)); //# 14666 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14669,10 +14669,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4659 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4659 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4659 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4659 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeArgActualOrDummyIfEmpty)); //# 14677 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14680,25 +14680,25 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4662 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4662 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsMissingTypeArgs()) _1 ) -//# 4662 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4662 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeArgActualOrDummyIfEmpty)); //# 14689 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4667 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4667 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let m = rhs parseState 1 let dummyStatVal = SynType.StaticConstant(SynConst.Int32(0), m) let dummyName = SynType.LongIdent(LongIdentWithDots([ident("",m)],[])) let dummyTypeArg = SynType.StaticConstantNamed(dummyName, dummyStatVal, m) dummyTypeArg ) -//# 4667 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4667 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'dummyTypeArg)); //# 14703 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14708,10 +14708,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4676 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4676 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 4676 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4676 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'measureTypeArg)); //# 14716 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14720,10 +14720,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4679 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4679 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynMeasure.Anon (lhs parseState) ) -//# 4679 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4679 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'measureTypeArg)); //# 14728 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14731,10 +14731,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4683 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4683 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynMeasure.Named(_1.Lid, _1.Range) ) -//# 4683 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4683 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'measureTypeAtom)); //# 14739 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14742,10 +14742,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4686 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4686 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynMeasure.Var(_1, lhs parseState) ) -//# 4686 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4686 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'measureTypeAtom)); //# 14750 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14754,10 +14754,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4689 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4689 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _2 ) -//# 4689 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4689 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'measureTypeAtom)); //# 14762 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14765,10 +14765,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4693 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4693 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4693 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4693 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'measureTypePower)); //# 14773 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14778,12 +14778,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4696 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4696 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if _2 <> "^" && _2 <> "^-" then reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnexpectedOperatorForUnitOfMeasure()); if _2 = "^-" then SynMeasure.Power(_1, SynRationalConst.Negate(_3), lhs parseState) else SynMeasure.Power(_1, _3, lhs parseState) ) -//# 4696 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4696 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'measureTypePower)); //# 14788 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14791,11 +14791,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4701 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4701 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if fst _1 <> 1 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedIntegerLiteralForUnitOfMeasure()); SynMeasure.One ) -//# 4701 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4701 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'measureTypePower)); //# 14800 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14803,10 +14803,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4706 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4706 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_1] ) -//# 4706 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4706 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'measureTypeSeq)); //# 14811 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14815,10 +14815,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4709 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4709 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 :: _2 ) -//# 4709 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4709 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'measureTypeSeq)); //# 14823 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14826,10 +14826,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4713 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4713 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynMeasure.Seq(_1, lhs parseState) ) -//# 4713 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4713 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'measureTypeExpr)); //# 14834 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14838,10 +14838,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4716 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4716 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" SynMeasure.Product(_1, _3, lhs parseState) ) -//# 4716 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4716 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'measureTypeExpr)); //# 14846 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14851,12 +14851,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4719 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4719 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if _2 <> "*" && _2 <> "/" then reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnexpectedOperatorForUnitOfMeasure()); if _2 = "*" then SynMeasure.Product(_1, _3, lhs parseState) else SynMeasure.Divide(_1, _3, lhs parseState) ) -//# 4719 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4719 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'measureTypeExpr)); //# 14861 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14865,11 +14865,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4724 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4724 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if _1 <> "/" then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedOperatorForUnitOfMeasure()); SynMeasure.Divide(SynMeasure.One, _2, lhs parseState) ) -//# 4724 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4724 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'measureTypeExpr)); //# 14874 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14877,11 +14877,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4729 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4729 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let id = mkSynId (lhs parseState) (_2).idText - Typar(id ,NoStaticReq,false) + Typar(id, NoStaticReq,false) ) -//# 4729 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4729 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynTypar)); //# 14886 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14889,10 +14889,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4733 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4733 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4733 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4733 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.SynTypar)); //# 14897 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14901,12 +14901,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4737 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4737 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if _1 <> "^" then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedTypeParameter()); let id = mkSynId (lhs parseState) (_2).idText Typar(id,HeadTypeStaticReq,false) ) -//# 4737 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4737 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'staticallyKnownHeadTypar)); //# 14911 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14914,20 +14914,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4745 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4745 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ident(_1,rhs parseState 1) ) -//# 4745 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4745 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.Ident)); //# 14922 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4751 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4751 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" LongIdentWithDots([ident(MangledGlobalName,rhs parseState 1)],[]) ) -//# 4751 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4751 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.LongIdentWithDots)); //# 14932 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14935,10 +14935,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4754 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4754 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" LongIdentWithDots([_1],[]) ) -//# 4754 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4754 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.LongIdentWithDots)); //# 14943 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14947,10 +14947,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4757 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4757 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let (LongIdentWithDots(lid,dotms)) = _1 in LongIdentWithDots(lid @ [_3], dotms @ [rhs parseState 2]) ) -//# 4757 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4757 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.LongIdentWithDots)); //# 14955 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14959,11 +14959,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4760 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4760 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not _3 then reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsExpectedNameAfterToken()) let (LongIdentWithDots(lid,dotms)) = _1 in LongIdentWithDots(lid, dotms @ [rhs parseState 2]) ) -//# 4760 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4760 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.LongIdentWithDots)); //# 14968 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14972,10 +14972,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4767 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4767 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ident(CompileOpName _2,rhs parseState 2) ) -//# 4767 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4767 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opName)); //# 14980 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -14983,20 +14983,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4770 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4770 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" reportParseErrorAt (lhs parseState) (FSComp.SR.parsErrorParsingAsOperatorName()); ident(CompileOpName "****",rhs parseState 2) ) -//# 4770 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4770 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opName)); //# 14991 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4773 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4773 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ident(CompileOpName "*",rhs parseState 1) ) -//# 4773 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4773 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opName)); //# 15001 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15005,11 +15005,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4777 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4777 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let text = ("|" + String.concat "|" (List.rev _2) + "|") ident(text,rhs2 parseState 2 3) ) -//# 4777 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4777 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opName)); //# 15014 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15018,11 +15018,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4782 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4782 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let text = ("|" + String.concat "|" (List.rev _2) + "|_|" ) ident(text,rhs2 parseState 2 5) ) -//# 4782 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4782 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opName)); //# 15027 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15030,12 +15030,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4788 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4788 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not (IsValidPrefixOperatorDefinitionName _1) then reportParseErrorAt (lhs parseState) (FSComp.SR.parsInvalidPrefixOperatorDefinition()); _1 ) -//# 4788 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4788 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15040 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15043,10 +15043,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4792 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4792 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4792 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4792 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15051 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15054,10 +15054,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4794 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4794 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4794 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4794 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15062 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15065,10 +15065,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4796 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4796 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4796 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4796 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15073 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15076,10 +15076,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4798 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4798 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4798 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4798 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15084 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15087,10 +15087,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4800 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4800 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4800 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4800 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15095 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15098,10 +15098,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4802 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4802 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4802 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4802 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15106 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15109,20 +15109,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4804 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4804 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4804 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4804 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15117 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4806 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4806 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" "$" ) -//# 4806 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4806 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15127 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15130,50 +15130,50 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4808 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4808 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4808 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4808 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15138 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4810 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4810 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" "-" ) -//# 4810 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4810 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15148 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4812 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4812 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" "*" ) -//# 4812 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4812 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15158 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4814 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4814 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" "=" ) -//# 4814 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4814 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15168 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4816 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4816 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" "or" ) -//# 4816 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4816 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15178 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15181,10 +15181,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4818 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4818 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" "<" ) -//# 4818 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4818 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15189 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15192,60 +15192,60 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4820 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4820 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ">" ) -//# 4820 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4820 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15200 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4822 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4822 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" "?" ) -//# 4822 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4822 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15210 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4824 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4824 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" "&" ) -//# 4824 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4824 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15220 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4826 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4826 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" "&&" ) -//# 4826 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4826 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15230 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4828 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4828 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" "||" ) -//# 4828 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4828 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15240 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4830 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4830 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ":=" ) -//# 4830 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4830 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15250 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15253,12 +15253,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4833 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4833 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if _1 <> ".[]" && _1 <> ".()" && _1 <> ".()<-" then deprecatedOperator (lhs parseState); _1 ) -//# 4833 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4833 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15263 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15266,30 +15266,30 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4837 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4837 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4837 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4837 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15274 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4839 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4839 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ".." ) -//# 4839 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4839 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15284 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4841 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4841 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ".. .." ) -//# 4841 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4841 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15294 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15298,11 +15298,11 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4844 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4844 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if _1 <> _2 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsMismatchedQuotationName(fst _1)); fst _1 ) -//# 4844 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4844 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'operatorName)); //# 15307 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15310,12 +15310,12 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4850 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4850 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" if not (String.isUpper _1) then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsActivePatternCaseMustBeginWithUpperCase()); if (_1.IndexOf('|') <> -1) then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsActivePatternCaseContainsPipe()); _1 ) -//# 4850 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4850 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'activePatternCaseName)); //# 15320 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15323,10 +15323,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4857 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4857 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" [_2] ) -//# 4857 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4857 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'activePatternCaseNames)); //# 15331 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15335,10 +15335,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4860 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4860 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _3 :: _1 ) -//# 4860 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4860 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'activePatternCaseNames)); //# 15343 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15346,10 +15346,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4865 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4865 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4865 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4865 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'identOrOp)); //# 15354 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15357,10 +15357,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4868 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4868 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4868 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4868 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'identOrOp)); //# 15365 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15368,10 +15368,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4874 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4874 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" LongIdentWithDots([_1],[]) ) -//# 4874 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4874 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.LongIdentWithDots)); //# 15376 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15379,10 +15379,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4877 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4877 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" LongIdentWithDots([_1],[]) ) -//# 4877 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4877 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.LongIdentWithDots)); //# 15387 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15391,10 +15391,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4880 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4880 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" let (LongIdentWithDots(lid,dotms)) = _3 in LongIdentWithDots(_1 :: lid, rhs parseState 2 :: dotms) ) -//# 4880 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4880 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.LongIdentWithDots)); //# 15399 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15402,10 +15402,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4883 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4883 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" (* silent recovery *) LongIdentWithDots([_1],[rhs parseState 2]) ) -//# 4883 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4883 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : Ast.LongIdentWithDots)); //# 15410 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15413,40 +15413,40 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4888 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4888 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4888 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4888 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'nameop)); //# 15421 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4891 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4891 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4891 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4891 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'topSeparator)); //# 15431 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4892 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4892 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4892 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4892 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'topSeparator)); //# 15441 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4893 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4893 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4893 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4893 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'topSeparator)); //# 15451 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15454,10 +15454,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4896 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4896 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4896 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4896 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'topSeparators)); //# 15462 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15466,10 +15466,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4897 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4897 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4897 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4897 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'topSeparators)); //# 15474 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15478,190 +15478,190 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4900 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4900 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4900 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4900 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_topSeparators)); //# 15486 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4901 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4901 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4901 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4901 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_topSeparators)); //# 15496 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4905 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4905 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4905 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4905 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'seps)); //# 15506 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4906 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4906 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4906 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4906 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'seps)); //# 15516 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4907 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4907 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4907 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4907 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'seps)); //# 15526 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4908 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4908 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4908 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4908 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'seps)); //# 15536 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4913 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4913 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4913 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4913 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'declEnd)); //# 15546 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4915 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4915 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4915 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4915 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'declEnd)); //# 15556 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4917 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4917 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4917 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4917 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'declEnd)); //# 15566 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4922 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4922 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4922 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4922 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_declEnd)); //# 15576 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4924 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4924 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4924 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4924 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_declEnd)); //# 15586 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4926 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4926 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4926 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4926 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_declEnd)); //# 15596 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4928 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4928 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4928 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4928 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_declEnd)); //# 15606 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4931 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4931 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4931 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4931 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_ODECLEND)); //# 15616 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4932 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4932 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4932 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4932 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_ODECLEND)); //# 15626 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4935 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4935 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" deprecatedWithError (FSComp.SR.parsNoEqualShouldFollowNamespace()) (lhs parseState); () ) -//# 4935 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4935 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'deprecated_opt_equals)); //# 15636 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4936 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4936 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4936 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4936 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'deprecated_opt_equals)); //# 15646 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4939 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4939 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4939 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4939 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_OBLOCKSEP)); //# 15656 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4940 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4940 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4940 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4940 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_OBLOCKSEP)); //# 15666 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15669,200 +15669,200 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4943 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4943 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4943 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4943 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_seps)); //# 15677 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4944 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4944 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4944 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4944 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_seps)); //# 15687 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4947 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4947 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" true ) -//# 4947 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4947 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_rec)); //# 15697 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4948 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4948 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" false ) -//# 4948 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4948 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_rec)); //# 15707 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4951 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4951 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4951 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4951 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_bar)); //# 15717 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4952 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4952 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4952 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4952 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_bar)); //# 15727 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4955 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4955 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" true ) -//# 4955 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4955 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_inline)); //# 15737 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4956 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4956 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" false ) -//# 4956 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4956 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_inline)); //# 15747 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4959 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4959 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" true ) -//# 4959 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4959 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_mutable)); //# 15757 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4960 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4960 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" false ) -//# 4960 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4960 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_mutable)); //# 15767 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4964 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4964 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4964 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4964 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'doToken)); //# 15777 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4965 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4965 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4965 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4965 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'doToken)); //# 15787 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4968 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4968 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4968 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4968 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'doneDeclEnd)); //# 15797 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4969 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4969 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4969 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4969 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'doneDeclEnd)); //# 15807 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4972 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4972 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mlCompatWarning (FSComp.SR.parsSyntaxModuleStructEndDeprecated()) (lhs parseState); ) -//# 4972 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4972 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'structOrBegin)); //# 15817 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4973 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4973 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4973 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4973 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'structOrBegin)); //# 15827 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4976 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4976 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mlCompatWarning (FSComp.SR.parsSyntaxModuleSigEndDeprecated()) (lhs parseState); ) -//# 4976 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4976 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'sigOrBegin)); //# 15837 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4977 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4977 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4977 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4977 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'sigOrBegin)); //# 15847 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4980 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4980 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" mlCompatWarning (FSComp.SR.parsSyntaxModuleSigEndDeprecated()) (lhs parseState); ) -//# 4980 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4980 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'colonOrEquals)); //# 15857 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4981 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4981 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4981 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4981 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'colonOrEquals)); //# 15867 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15870,10 +15870,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4985 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4985 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4985 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4985 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'stringOrKeywordString)); //# 15878 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15881,60 +15881,60 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4986 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4986 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 4986 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4986 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'stringOrKeywordString)); //# 15889 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4989 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4989 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4989 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4989 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_HIGH_PRECEDENCE_APP)); //# 15899 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4990 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4990 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4990 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4990 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_HIGH_PRECEDENCE_APP)); //# 15909 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4991 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4991 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4991 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4991 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_HIGH_PRECEDENCE_APP)); //# 15919 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4994 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4994 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4994 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4994 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_HIGH_PRECEDENCE_TYAPP)); //# 15929 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 4995 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4995 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4995 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4995 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'opt_HIGH_PRECEDENCE_TYAPP)); //# 15939 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15942,30 +15942,30 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 4999 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4999 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 4999 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 4999 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeKeyword)); //# 15950 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 5000 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5000 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 5000 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5000 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeKeyword)); //# 15960 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 5001 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5001 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 5001 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5001 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'typeKeyword)); //# 15970 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -15973,30 +15973,30 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 5005 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5005 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 5005 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5005 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleKeyword)); //# 15981 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 5006 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5006 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 5006 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5006 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleKeyword)); //# 15991 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 5007 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5007 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 5007 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5007 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'moduleKeyword)); //# 16001 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -16004,40 +16004,40 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 5010 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5010 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 5010 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5010 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rbrace)); //# 16012 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 5011 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5011 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 5011 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5011 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rbrace)); //# 16022 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 5012 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5012 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 5012 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5012 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rbrace)); //# 16032 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 5015 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5015 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 5015 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5015 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'bar_rbrace)); //# 16042 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -16045,30 +16045,30 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 5018 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5018 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 5018 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5018 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rparen)); //# 16053 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 5019 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5019 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 5019 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5019 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rparen)); //# 16063 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 5020 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5020 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 5020 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5020 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'rparen)); //# 16073 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -16076,70 +16076,70 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 5023 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5023 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 5023 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5023 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'oblockend)); //# 16084 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 5024 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5024 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 5024 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5024 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'oblockend)); //# 16094 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 5025 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5025 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" ) -//# 5025 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5025 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'oblockend)); //# 16104 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 5028 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5028 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" false ) -//# 5028 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5028 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'ends_other_than_rparen_coming_soon_or_recover)); //# 16114 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 5029 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5029 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" false ) -//# 5029 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5029 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'ends_other_than_rparen_coming_soon_or_recover)); //# 16124 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 5030 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5030 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" false ) -//# 5030 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5030 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'ends_other_than_rparen_coming_soon_or_recover)); //# 16134 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 5031 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5031 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" false ) -//# 5031 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5031 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'ends_other_than_rparen_coming_soon_or_recover)); //# 16144 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -16147,60 +16147,60 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 5032 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5032 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 5032 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5032 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'ends_other_than_rparen_coming_soon_or_recover)); //# 16155 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 5035 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5035 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" false ) -//# 5035 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5035 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'ends_coming_soon_or_recover)); //# 16165 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 5036 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5036 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" false ) -//# 5036 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5036 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'ends_coming_soon_or_recover)); //# 16175 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 5037 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5037 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" false ) -//# 5037 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5037 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'ends_coming_soon_or_recover)); //# 16185 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 5038 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5038 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" false ) -//# 5038 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5038 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'ends_coming_soon_or_recover)); //# 16195 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 5039 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5039 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" false ) -//# 5039 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5039 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'ends_coming_soon_or_recover)); //# 16205 "pars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -16208,10 +16208,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 5040 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5040 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" _1 ) -//# 5040 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pars.fsy" +//# 5040 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pars.fsy" : 'ends_coming_soon_or_recover)); |] //# 16217 "pars.fs" diff --git a/src/fcs-fable/codegen/pplex.fs b/src/fcs-fable/codegen/pplex.fs index aec7f5ddc0..82aff5872f 100644 --- a/src/fcs-fable/codegen/pplex.fs +++ b/src/fcs-fable/codegen/pplex.fs @@ -1,4 +1,4 @@ -//# 3 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pplex.fsl" +//# 3 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pplex.fsl" module internal FSharp.Compiler.PPLexer @@ -81,95 +81,91 @@ let trans : uint16[] array = let actions : uint16[] = [|65535us; 0us; 1us; 65535us; 11us; 2us; 3us; 11us; 11us; 6us; 7us; 8us; 11us; 11us; 12us; 9us; 9us; 10us; 10us; 5us; 4us; 2us; 65535us; 65535us; 65535us; 65535us; 1us; 0us; |] let _fslex_tables = Internal.Utilities.Text.Lexing.UnicodeTables.Create(trans,actions) let rec _fslex_dummy () = _fslex_dummy() -(* Rule tokenstream *) -and inline tokenstream args (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_tokenstream args 3 lexbuf -(* Rule rest *) -and inline rest (lexbuf : Internal.Utilities.Text.Lexing.LexBuffer<_>) = _fslex_rest 0 lexbuf -(* Rule tokenstream *) -and _fslex_tokenstream args _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with +// Rule tokenstream +and tokenstream args lexbuf = + match _fslex_tables.Interpret(3,lexbuf) with | 0 -> ( -//# 47 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pplex.fsl" +//# 47 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pplex.fsl" PPParser.PRELUDE -//# 94 "pplex.fs" +//# 90 "pplex.fs" ) | 1 -> ( -//# 48 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pplex.fsl" +//# 48 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pplex.fsl" PPParser.PRELUDE -//# 99 "pplex.fs" +//# 95 "pplex.fs" ) | 2 -> ( -//# 49 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pplex.fsl" +//# 49 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pplex.fsl" PPParser.ID(lexeme lexbuf) -//# 104 "pplex.fs" +//# 100 "pplex.fs" ) | 3 -> ( -//# 51 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pplex.fsl" +//# 51 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pplex.fsl" PPParser.OP_NOT -//# 109 "pplex.fs" +//# 105 "pplex.fs" ) | 4 -> ( -//# 52 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pplex.fsl" +//# 52 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pplex.fsl" PPParser.OP_AND -//# 114 "pplex.fs" +//# 110 "pplex.fs" ) | 5 -> ( -//# 53 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pplex.fsl" +//# 53 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pplex.fsl" PPParser.OP_OR -//# 119 "pplex.fs" +//# 115 "pplex.fs" ) | 6 -> ( -//# 54 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pplex.fsl" +//# 54 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pplex.fsl" PPParser.LPAREN -//# 124 "pplex.fs" +//# 120 "pplex.fs" ) | 7 -> ( -//# 55 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pplex.fsl" +//# 55 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pplex.fsl" PPParser.RPAREN -//# 129 "pplex.fs" +//# 125 "pplex.fs" ) | 8 -> ( -//# 57 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pplex.fsl" +//# 57 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pplex.fsl" tokenstream args lexbuf -//# 134 "pplex.fs" +//# 130 "pplex.fs" ) | 9 -> ( -//# 59 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pplex.fsl" +//# 59 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pplex.fsl" PPParser.EOF -//# 139 "pplex.fs" +//# 135 "pplex.fs" ) | 10 -> ( -//# 60 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pplex.fsl" +//# 60 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pplex.fsl" fail args lexbuf (FSComp.SR.pplexExpectedSingleLineComment()) -//# 144 "pplex.fs" +//# 140 "pplex.fs" ) | 11 -> ( -//# 61 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pplex.fsl" +//# 61 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pplex.fsl" let lex = lexeme lexbuf let _ = rest lexbuf fail args lexbuf (FSComp.SR.pplexUnexpectedChar(lex)) -//# 153 "pplex.fs" +//# 149 "pplex.fs" ) | 12 -> ( -//# 66 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pplex.fsl" +//# 66 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pplex.fsl" PPParser.EOF -//# 158 "pplex.fs" +//# 154 "pplex.fs" ) | _ -> failwith "tokenstream" -(* Rule rest *) -and _fslex_rest _fslex_state lexbuf = - match _fslex_tables.Interpret(_fslex_state,lexbuf) with +// Rule rest +and rest lexbuf = + match _fslex_tables.Interpret(0,lexbuf) with | 0 -> ( -//# 69 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pplex.fsl" +//# 69 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pplex.fsl" rest lexbuf -//# 167 "pplex.fs" +//# 163 "pplex.fs" ) | 1 -> ( -//# 70 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pplex.fsl" +//# 70 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pplex.fsl" () -//# 172 "pplex.fs" +//# 168 "pplex.fs" ) | _ -> failwith "rest" diff --git a/src/fcs-fable/codegen/pppars.fs b/src/fcs-fable/codegen/pppars.fs index 869cb7cb38..8b70fdbca0 100644 --- a/src/fcs-fable/codegen/pppars.fs +++ b/src/fcs-fable/codegen/pppars.fs @@ -4,7 +4,7 @@ module internal FSharp.Compiler.PPParser open FSharp.Compiler open Internal.Utilities.Text.Lexing open Internal.Utilities.Text.Parsing.ParseHelpers -//# 3 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 3 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" open FSharp.Compiler.Ast open FSharp.Compiler.ErrorLogger @@ -154,20 +154,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 37 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 37 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" _1 ) -//# 37 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 37 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" : LexerIfdefExpression )); //# 162 "pppars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 40 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 40 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" doNothing parseState () ) -//# 40 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 40 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" : 'Recover)); //# 172 "pppars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -175,10 +175,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 43 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 43 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" _2 ) -//# 43 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 43 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" : 'Full)); //# 183 "pppars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -186,10 +186,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 44 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 44 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" fail parseState 1 (FSComp.SR.ppparsMissingToken("#if/#elif")) ) -//# 44 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 44 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" : 'Full)); //# 194 "pppars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -197,10 +197,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 47 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 47 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" _2 ) -//# 47 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 47 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" : 'Expr)); //# 205 "pppars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -208,10 +208,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 48 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 48 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" IfdefId(_1) ) -//# 48 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 48 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" : 'Expr)); //# 216 "pppars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -219,10 +219,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 49 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 49 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" IfdefNot(_2) ) -//# 49 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 49 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" : 'Expr)); //# 227 "pppars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -231,10 +231,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 50 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 50 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" IfdefAnd(_1,_3) ) -//# 50 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 50 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" : 'Expr)); //# 239 "pppars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -243,10 +243,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 51 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 51 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" IfdefOr(_1,_3) ) -//# 51 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 51 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" : 'Expr)); //# 251 "pppars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -254,10 +254,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 53 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 53 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" fail parseState 1 (FSComp.SR.ppparsUnexpectedToken("&&")) ) -//# 53 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 53 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" : 'Expr)); //# 262 "pppars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -265,10 +265,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 54 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 54 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" fail parseState 1 (FSComp.SR.ppparsUnexpectedToken("||")) ) -//# 54 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 54 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" : 'Expr)); //# 273 "pppars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -276,20 +276,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 55 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 55 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" fail parseState 1 (FSComp.SR.ppparsUnexpectedToken("!")) ) -//# 55 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 55 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" : 'Expr)); //# 284 "pppars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 56 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 56 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" doNothing parseState dummy ) -//# 56 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 56 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" : 'Expr)); //# 294 "pppars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -298,10 +298,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 57 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 57 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" fail parseState 3 (FSComp.SR.ppparsMissingToken(")")) ) -//# 57 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 57 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" : 'Expr)); //# 306 "pppars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -309,10 +309,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 58 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 58 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" fail parseState 2 (FSComp.SR.ppparsIncompleteExpression()) ) -//# 58 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 58 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" : 'Expr)); //# 317 "pppars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -320,10 +320,10 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 59 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 59 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" fail parseState 1 (FSComp.SR.ppparsUnexpectedToken(")")) ) -//# 59 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 59 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" : 'Expr)); //# 328 "pppars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> @@ -332,20 +332,20 @@ let _fsyacc_reductions () = [| Microsoft.FSharp.Core.Operators.box ( ( -//# 60 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 60 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" fail parseState 2 (FSComp.SR.ppparsIncompleteExpression()) ) -//# 60 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 60 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" : 'Expr)); //# 340 "pppars.fs" (fun (parseState : Internal.Utilities.Text.Parsing.IParseState) -> Microsoft.FSharp.Core.Operators.box ( ( -//# 61 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 61 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" fail parseState 1 (FSComp.SR.ppparsIncompleteExpression()) ) -//# 61 "C:\Users\alfon\dev\FSharp.Compiler.Service_fable\fcs\fcs-fable\codegen\..\..\..\src\fsharp\pppars.fsy" +//# 61 "/Users/alfonsogarciacaronunez/dev/FSharp.Compiler.Service_fable/fcs/fcs-fable/codegen/../../../src/fsharp/pppars.fsy" : 'Expr)); |] //# 351 "pppars.fs" diff --git a/src/fcs-fable/fcs-fable.fsproj b/src/fcs-fable/fcs-fable.fsproj index b189896d58..51f46c5446 100644 --- a/src/fcs-fable/fcs-fable.fsproj +++ b/src/fcs-fable/fcs-fable.fsproj @@ -16,6 +16,7 @@ $(DefineConstants);NO_EXTENSIONTYPING $(DefineConstants);NO_INLINE_IL_PARSER $(OtherFlags) --warnon:1182 + true @@ -219,7 +220,7 @@ - + diff --git a/src/fcs-fable/src/absil/il.fs b/src/fcs-fable/src/absil/il.fs index 7678031fe6..2507e882f1 100644 --- a/src/fcs-fable/src/absil/il.fs +++ b/src/fcs-fable/src/absil/il.fs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. module FSharp.Compiler.AbstractIL.IL @@ -6,7 +6,6 @@ module FSharp.Compiler.AbstractIL.IL #nowarn "343" // The type 'ILAssemblyRef' implements 'System.IComparable' explicitly but provides no corresponding override for 'Object.Equals'. #nowarn "346" // The struct, record or union type 'IlxExtensionType' has an explicit implementation of 'Object.Equals'. ... - open System open System.Diagnostics open System.IO @@ -50,9 +49,9 @@ let int_order = LanguagePrimitives.FastGenericComparer let notlazy v = Lazy<_>.CreateFromValue v /// A little ugly, but the idea is that if a data structure does not -/// contain lazy values then we don't add laziness. So if the thing to map +/// contain lazy values then we don't add laziness. So if the thing to map /// is already evaluated then immediately apply the function. -let lazyMap f (x:Lazy<_>) = +let lazyMap f (x: Lazy<_>) = if x.IsValueCreated then notlazy (f (x.Force())) else lazy (f (x.Force())) [] @@ -75,14 +74,14 @@ type PrimaryAssembly = // Utilities: type names // -------------------------------------------------------------------- -let splitNameAt (nm:string) idx = +let splitNameAt (nm: string) idx = if idx < 0 then failwith "splitNameAt: idx < 0" let last = nm.Length - 1 if idx > last then failwith "splitNameAt: idx > last" (nm.Substring(0, idx)), (if idx < last then nm.Substring (idx+1, last - idx) else "") -let rec splitNamespaceAux (nm:string) = +let rec splitNamespaceAux (nm: string) = match nm.IndexOf '.' with | -1 -> [nm] | idx -> @@ -111,7 +110,7 @@ let splitNamespaceToArray nm = let x = Array.ofList (splitNamespace nm) x) -let splitILTypeName (nm:string) = +let splitILTypeName (nm: string) = match nm.LastIndexOf '.' with | -1 -> [], nm | idx -> @@ -126,7 +125,7 @@ let emptyStringArray = ([| |] : string[]) // Foo.Bar,"1.0" // This is because the ImportSystemType code goes via Abstract IL type references. Ultimately this probably isn't // the best way to do things. -let splitILTypeNameWithPossibleStaticArguments (nm:string) = +let splitILTypeNameWithPossibleStaticArguments (nm: string) = let nm, suffix = match nm.IndexOf ',' with | -1 -> nm, None @@ -154,7 +153,7 @@ let unsplitTypeName (ns, n) = | [] -> String.concat "." ns + "." + n | _ -> n -let splitTypeNameRightAux (nm:string) = +let splitTypeNameRightAux (nm: string) = let idx = nm.LastIndexOf '.' if idx = -1 then None, nm else let s1, s2 = splitNameAt nm idx @@ -170,7 +169,7 @@ let splitTypeNameRight nm = /// This is used to store event, property and field maps. type LazyOrderedMultiMap<'Key, 'Data when 'Key : equality>(keyf : 'Data -> 'Key, lazyItems : Lazy<'Data list>) = - let quickMap= + let quickMap = lazyItems |> lazyMap (fun entries -> let t = new Dictionary<_, _>(entries.Length, HashIdentity.Structural) do entries |> List.iter (fun y -> @@ -196,20 +195,20 @@ type LazyOrderedMultiMap<'Key, 'Data when 'Key : equality>(keyf : 'Data -> 'Key, //--------------------------------------------------------------------- -// SHA1 hash-signing algorithm. Used to get the public key token from +// SHA1 hash-signing algorithm. Used to get the public key token from // the public key. //--------------------------------------------------------------------- -let b0 n = (n &&& 0xFF) -let b1 n = ((n >>> 8) &&& 0xFF) -let b2 n = ((n >>> 16) &&& 0xFF) -let b3 n = ((n >>> 24) &&& 0xFF) +let b0 n = (n &&& 0xFF) +let b1 n = ((n >>> 8) &&& 0xFF) +let b2 n = ((n >>> 16) &&& 0xFF) +let b3 n = ((n >>> 24) &&& 0xFF) module SHA1 = - let inline (>>>&) (x:int) (y:int) = int32 (uint32 x >>> y) + let inline (>>>&) (x: int) (y: int) = int32 (uint32 x >>> y) let f(t, b, c, d) = if t < 20 then (b &&& c) ||| ((~~~b) &&& d) @@ -232,19 +231,19 @@ module SHA1 = type SHAStream = { stream: byte[] mutable pos: int - mutable eof: bool } + mutable eof: bool } - let rotLeft32 x n = (x <<< n) ||| (x >>>& (32-n)) + let rotLeft32 x n = (x <<< n) ||| (x >>>& (32-n)) // padding and length (in bits!) recorded at end - let shaAfterEof sha = + let shaAfterEof sha = let n = sha.pos let len = sha.stream.Length if n = len then 0x80 else let padded_len = (((len + 9 + 63) / 64) * 64) - 8 - if n < padded_len - 8 then 0x0 + if n < padded_len - 8 then 0x0 elif (n &&& 63) = 56 then int32 ((int64 len * int64 8) >>> 56) &&& 0xff elif (n &&& 63) = 57 then int32 ((int64 len * int64 8) >>> 48) &&& 0xff elif (n &&& 63) = 58 then int32 ((int64 len * int64 8) >>> 40) &&& 0xff @@ -261,7 +260,7 @@ module SHA1 = sha.pos <- sha.pos + 1 b - let shaRead32 sha = + let shaRead32 sha = let b0 = shaRead8 sha let b1 = shaRead8 sha let b2 = shaRead8 sha @@ -307,11 +306,11 @@ module SHA1 = let sha1HashBytes s = let (_h0, _h1, _h2, h3, h4) = sha1Hash { stream = s; pos = 0; eof = false } // the result of the SHA algorithm is stored in registers 3 and 4 - Array.map byte [| b0 h4; b1 h4; b2 h4; b3 h4; b0 h3; b1 h3; b2 h3; b3 h3; |] + Array.map byte [| b0 h4; b1 h4; b2 h4; b3 h4; b0 h3; b1 h3; b2 h3; b3 h3; |] let sha1HashInt64 s = let (_h0,_h1,_h2,h3,h4) = sha1Hash { stream = s; pos = 0; eof = false } // the result of the SHA algorithm is stored in registers 3 and 4 - (int64 h3 <<< 32) ||| int64 h4 + (int64 h3 <<< 32) ||| int64 h4 let sha1HashBytes s = SHA1.sha1HashBytes s let sha1HashInt64 s = SHA1.sha1HashInt64 s @@ -362,7 +361,7 @@ let isMscorlib data = data.assemRefName = "mscorlib" [] -type ILAssemblyRef(data) = +type ILAssemblyRef(data) = let uniqueStamp = AssemblyRefUniqueStampGenerator.Encode(data) member x.Name=data.assemRefName @@ -396,14 +395,14 @@ type ILAssemblyRef(data) = assemRefLocale=locale } #if !FABLE_COMPILER - static member FromAssemblyName (aname:System.Reflection.AssemblyName) = + static member FromAssemblyName (aname: System.Reflection.AssemblyName) = let locale = None let publicKey = - match aname.GetPublicKey() with + match aname.GetPublicKey() with | null | [| |] -> - match aname.GetPublicKeyToken() with + match aname.GetPublicKeyToken() with | null | [| |] -> None | bytes -> Some (PublicKeyToken bytes) | bytes -> @@ -421,11 +420,11 @@ type ILAssemblyRef(data) = member aref.QualifiedName = let b = new System.Text.StringBuilder(100) - let add (s:string) = (b.Append(s) |> ignore) + let add (s: string) = b.Append(s) |> ignore #if FABLE_COMPILER - let addC (s:char) = (b.Append(string s) |> ignore) + let addC (s: char) = b.Append(string s) |> ignore #else - let addC (s:char) = (b.Append(s) |> ignore) + let addC (s: char) = b.Append(s) |> ignore #endif add(aref.Name) match aref.Version with @@ -451,7 +450,7 @@ type ILAssemblyRef(data) = let convDigit(digit) = let digitc = if digit < 10 - then System.Convert.ToInt32 '0' + digit + then System.Convert.ToInt32 '0' + digit else System.Convert.ToInt32 'a' + (digit - 10) System.Convert.ToChar(digitc) for i = 0 to pkt.Length-1 do @@ -488,15 +487,15 @@ type ILScopeRef = | Module of ILModuleRef | Assembly of ILAssemblyRef - member x.IsLocalRef = match x with ILScopeRef.Local -> true | _ -> false + member x.IsLocalRef = match x with ILScopeRef.Local -> true | _ -> false - member x.IsModuleRef = match x with ILScopeRef.Module _ -> true | _ -> false + member x.IsModuleRef = match x with ILScopeRef.Module _ -> true | _ -> false member x.IsAssemblyRef= match x with ILScopeRef.Assembly _ -> true | _ -> false - member x.ModuleRef = match x with ILScopeRef.Module x -> x | _ -> failwith "not a module reference" + member x.ModuleRef = match x with ILScopeRef.Module x -> x | _ -> failwith "not a module reference" - member x.AssemblyRef = match x with ILScopeRef.Assembly x -> x | _ -> failwith "not an assembly reference" + member x.AssemblyRef = match x with ILScopeRef.Assembly x -> x | _ -> failwith "not an assembly reference" member x.QualifiedName = match x with @@ -547,15 +546,15 @@ type ILCallingConv = | Callconv of ILThisConvention * ILArgConvention - member x.ThisConv = let (Callconv(a, _b)) = x in a + member x.ThisConv = let (Callconv(a, _b)) = x in a - member x.BasicConv = let (Callconv(_a, b)) = x in b + member x.BasicConv = let (Callconv(_a, b)) = x in b - member x.IsInstance = match x.ThisConv with ILThisConvention.Instance -> true | _ -> false + member x.IsInstance = match x.ThisConv with ILThisConvention.Instance -> true | _ -> false member x.IsInstanceExplicit = match x.ThisConv with ILThisConvention.InstanceExplicit -> true | _ -> false - member x.IsStatic = match x.ThisConv with ILThisConvention.Static -> true | _ -> false + member x.IsStatic = match x.ThisConv with ILThisConvention.Static -> true | _ -> false static member Instance = ILCallingConvStatics.Instance @@ -566,7 +565,7 @@ and ILCallingConvStatics() = static let instanceCallConv = Callconv(ILThisConvention.Instance, ILArgConvention.Default) - static let staticCallConv = Callconv(ILThisConvention.Static, ILArgConvention.Default) + static let staticCallConv = Callconv(ILThisConvention.Static, ILArgConvention.Default) static member Instance = instanceCallConv @@ -601,7 +600,7 @@ type ILTypeRef = member x.ApproxId = x.hashCode - member x.AsBoxedType (tspec:ILTypeSpec) = + member x.AsBoxedType (tspec: ILTypeSpec) = if isNil tspec.tspecInst then let v = x.asBoxedType match box v with @@ -693,13 +692,13 @@ and [] ILType = | Void - | Array of ILArrayShape * ILType - | Value of ILTypeSpec - | Boxed of ILTypeSpec - | Ptr of ILType - | Byref of ILType - | FunctionPointer of ILCallingSignature - | TypeVar of uint16 + | Array of ILArrayShape * ILType + | Value of ILTypeSpec + | Boxed of ILTypeSpec + | Ptr of ILType + | Byref of ILType + | FunctionPointer of ILCallingSignature + | TypeVar of uint16 | Modified of bool * ILTypeRef * ILType member x.BasicQualifiedName = @@ -775,7 +774,7 @@ and ILTypes = list let mkILCallSig (cc, args, ret) = { ArgTypes=args; CallingConv=cc; ReturnType=ret} -let mkILBoxedType (tspec:ILTypeSpec) = tspec.TypeRef.AsBoxedType tspec +let mkILBoxedType (tspec: ILTypeSpec) = tspec.TypeRef.AsBoxedType tspec [] type ILMethodRef = @@ -861,9 +860,9 @@ type ILFieldSpec = { FieldRef: ILFieldRef DeclaringType: ILType } - member x.FormalType = x.FieldRef.Type + member x.FormalType = x.FieldRef.Type - member x.Name = x.FieldRef.Name + member x.Name = x.FieldRef.Name member x.DeclaringTypeRef = x.FieldRef.DeclaringTypeRef @@ -877,7 +876,7 @@ type ILFieldSpec = // Debug info. // -------------------------------------------------------------------- -type ILGuid = byte[] +type ILGuid = byte[] type ILPlatform = | X86 @@ -936,7 +935,7 @@ type ILSourceMarker = override x.ToString() = sprintf "(%d, %d)-(%d, %d)" x.Line x.Column x.EndLine x.EndColumn type ILAttribElem = - | String of string option + | String of string option | Bool of bool | Char of char | SByte of int8 @@ -954,7 +953,7 @@ type ILAttribElem = | TypeRef of ILTypeRef option | Array of ILType * ILAttribElem list -type ILAttributeNamedArg = (string * ILType * bool * ILAttribElem) +type ILAttributeNamedArg = (string * ILType * bool * ILAttribElem) [] type ILAttribute = @@ -1011,7 +1010,7 @@ let mkILCustomAttrs l = match l with [] -> emptyILCustomAttrs | _ -> mkILCustomA let emptyILCustomAttrsStored = ILAttributesStored.Given emptyILCustomAttrs -let storeILCustomAttrs (attrs: ILAttributes) = if attrs.AsArray.Length = 0 then emptyILCustomAttrsStored else ILAttributesStored.Given attrs +let storeILCustomAttrs (attrs: ILAttributes) = if attrs.AsArray.Length = 0 then emptyILCustomAttrsStored else ILAttributesStored.Given attrs let mkILCustomAttrsReader f = ILAttributesStored.Reader f @@ -1099,9 +1098,9 @@ type ILInstr = | AI_cgt_un | AI_clt | AI_clt_un - | AI_conv of ILBasicType - | AI_conv_ovf of ILBasicType - | AI_conv_ovf_un of ILBasicType + | AI_conv of ILBasicType + | AI_conv_ovf of ILBasicType + | AI_conv_ovf_un of ILBasicType | AI_mul | AI_mul_ovf | AI_mul_ovf_un @@ -1123,66 +1122,66 @@ type ILInstr = | AI_ckfinite | AI_nop | AI_ldc of ILBasicType * ILConst - | I_ldarg of uint16 - | I_ldarga of uint16 - | I_ldind of ILAlignment * ILVolatility * ILBasicType - | I_ldloc of uint16 - | I_ldloca of uint16 - | I_starg of uint16 - | I_stind of ILAlignment * ILVolatility * ILBasicType - | I_stloc of uint16 - - | I_br of ILCodeLabel - | I_jmp of ILMethodSpec + | I_ldarg of uint16 + | I_ldarga of uint16 + | I_ldind of ILAlignment * ILVolatility * ILBasicType + | I_ldloc of uint16 + | I_ldloca of uint16 + | I_starg of uint16 + | I_stind of ILAlignment * ILVolatility * ILBasicType + | I_stloc of uint16 + + | I_br of ILCodeLabel + | I_jmp of ILMethodSpec | I_brcmp of ILComparisonInstr * ILCodeLabel - | I_switch of ILCodeLabel list + | I_switch of ILCodeLabel list | I_ret - | I_call of ILTailcall * ILMethodSpec * ILVarArgs + | I_call of ILTailcall * ILMethodSpec * ILVarArgs | I_callvirt of ILTailcall * ILMethodSpec * ILVarArgs | I_callconstraint of ILTailcall * ILType * ILMethodSpec * ILVarArgs - | I_calli of ILTailcall * ILCallingSignature * ILVarArgs - | I_ldftn of ILMethodSpec - | I_newobj of ILMethodSpec * ILVarArgs + | I_calli of ILTailcall * ILCallingSignature * ILVarArgs + | I_ldftn of ILMethodSpec + | I_newobj of ILMethodSpec * ILVarArgs | I_throw | I_endfinally | I_endfilter - | I_leave of ILCodeLabel + | I_leave of ILCodeLabel | I_rethrow - | I_ldsfld of ILVolatility * ILFieldSpec - | I_ldfld of ILAlignment * ILVolatility * ILFieldSpec - | I_ldsflda of ILFieldSpec - | I_ldflda of ILFieldSpec - | I_stsfld of ILVolatility * ILFieldSpec - | I_stfld of ILAlignment * ILVolatility * ILFieldSpec - | I_ldstr of string - | I_isinst of ILType - | I_castclass of ILType - | I_ldtoken of ILToken - | I_ldvirtftn of ILMethodSpec - - | I_cpobj of ILType - | I_initobj of ILType - | I_ldobj of ILAlignment * ILVolatility * ILType - | I_stobj of ILAlignment * ILVolatility * ILType - | I_box of ILType - | I_unbox of ILType - | I_unbox_any of ILType - | I_sizeof of ILType - - | I_ldelem of ILBasicType - | I_stelem of ILBasicType - | I_ldelema of ILReadonly * bool * ILArrayShape * ILType - | I_ldelem_any of ILArrayShape * ILType - | I_stelem_any of ILArrayShape * ILType - | I_newarr of ILArrayShape * ILType + | I_ldsfld of ILVolatility * ILFieldSpec + | I_ldfld of ILAlignment * ILVolatility * ILFieldSpec + | I_ldsflda of ILFieldSpec + | I_ldflda of ILFieldSpec + | I_stsfld of ILVolatility * ILFieldSpec + | I_stfld of ILAlignment * ILVolatility * ILFieldSpec + | I_ldstr of string + | I_isinst of ILType + | I_castclass of ILType + | I_ldtoken of ILToken + | I_ldvirtftn of ILMethodSpec + + | I_cpobj of ILType + | I_initobj of ILType + | I_ldobj of ILAlignment * ILVolatility * ILType + | I_stobj of ILAlignment * ILVolatility * ILType + | I_box of ILType + | I_unbox of ILType + | I_unbox_any of ILType + | I_sizeof of ILType + + | I_ldelem of ILBasicType + | I_stelem of ILBasicType + | I_ldelema of ILReadonly * bool * ILArrayShape * ILType + | I_ldelem_any of ILArrayShape * ILType + | I_stelem_any of ILArrayShape * ILType + | I_newarr of ILArrayShape * ILType | I_ldlen - | I_mkrefany of ILType + | I_mkrefany of ILType | I_refanytype - | I_refanyval of ILType + | I_refanyval of ILType | I_break | I_seqpoint of ILSourceMarker @@ -1191,17 +1190,17 @@ type ILInstr = | I_localloc | I_cpblk of ILAlignment * ILVolatility - | I_initblk of ILAlignment * ILVolatility + | I_initblk of ILAlignment * ILVolatility (* FOR EXTENSIONS, e.g. MS-ILX *) | EI_ilzero of ILType - | EI_ldlen_multi of int32 * int32 + | EI_ldlen_multi of int32 * int32 [] type ILExceptionClause = | Finally of (ILCodeLabel * ILCodeLabel) - | Fault of (ILCodeLabel * ILCodeLabel) + | Fault of (ILCodeLabel * ILCodeLabel) | FilterCatch of (ILCodeLabel * ILCodeLabel) * (ILCodeLabel * ILCodeLabel) | TypeCatch of ILType * (ILCodeLabel * ILCodeLabel) @@ -1226,7 +1225,7 @@ type ILLocalDebugInfo = [] type ILCode = { Labels: Dictionary - Instrs:ILInstr[] + Instrs: ILInstr[] Exceptions: ILExceptionSpec list Locals: ILLocalDebugInfo list } @@ -1245,7 +1244,7 @@ type ILMethodBody = NoInlining: bool AggressiveInlining: bool Locals: ILLocals - Code: ILCode + Code: ILCode SourceMarker: ILSourceMarker option } [] @@ -1425,7 +1424,7 @@ let storeILSecurityDecls (x: ILSecurityDecls) = if x.AsArray.Length = 0 then emp let mkILSecurityDeclsReader f = ILSecurityDeclsStored.Reader f [] -type PInvokeCharBestFit = +type PInvokeCharBestFit = | UseAssembly | Enabled | Disabled @@ -1473,7 +1472,7 @@ type ILParameter = IsOut: bool IsOptional: bool CustomAttrsStored: ILAttributesStored - MetadataIndex: int32 } + MetadataIndex: int32 } member x.CustomAttrs = x.CustomAttrsStored.GetCustomAttrs x.MetadataIndex @@ -1484,7 +1483,7 @@ type ILReturn = { Marshal: ILNativeType option Type: ILType CustomAttrsStored: ILAttributesStored - MetadataIndex: int32 } + MetadataIndex: int32 } member x.CustomAttrs = x.CustomAttrsStored.GetCustomAttrs x.MetadataIndex @@ -1513,7 +1512,7 @@ type MethodKind = [] type MethodBody = | IL of ILMethodBody - | PInvoke of PInvokeMethod (* platform invoke to native *) + | PInvoke of PInvokeMethod (* platform invoke to native *) | Abstract | Native | NotAvailable @@ -1533,7 +1532,7 @@ let mkMethBodyAux mb = ILLazyMethodBody (notlazy mb) let mkMethBodyLazyAux mb = ILLazyMethodBody mb -let typesOfILParams (ps:ILParameters) : ILTypes = ps |> List.map (fun p -> p.Type) +let typesOfILParams (ps: ILParameters) : ILTypes = ps |> List.map (fun p -> p.Type) [] type ILGenericVariance = @@ -1564,23 +1563,23 @@ type ILGenericParameterDefs = ILGenericParameterDef list let memberAccessOfFlags flags = let f = (flags &&& 0x00000007) - if f = 0x00000001 then ILMemberAccess.Private - elif f = 0x00000006 then ILMemberAccess.Public - elif f = 0x00000004 then ILMemberAccess.Family - elif f = 0x00000002 then ILMemberAccess.FamilyAndAssembly - elif f = 0x00000005 then ILMemberAccess.FamilyOrAssembly - elif f = 0x00000003 then ILMemberAccess.Assembly + if f = 0x00000001 then ILMemberAccess.Private + elif f = 0x00000006 then ILMemberAccess.Public + elif f = 0x00000004 then ILMemberAccess.Family + elif f = 0x00000002 then ILMemberAccess.FamilyAndAssembly + elif f = 0x00000005 then ILMemberAccess.FamilyOrAssembly + elif f = 0x00000003 then ILMemberAccess.Assembly else ILMemberAccess.CompilerControlled -let convertMemberAccess (ilMemberAccess:ILMemberAccess) = +let convertMemberAccess (ilMemberAccess: ILMemberAccess) = match ilMemberAccess with - | ILMemberAccess.Public -> MethodAttributes.Public - | ILMemberAccess.Private -> MethodAttributes.Private - | ILMemberAccess.Assembly -> MethodAttributes.Assembly - | ILMemberAccess.FamilyAndAssembly -> MethodAttributes.FamANDAssem - | ILMemberAccess.CompilerControlled -> MethodAttributes.PrivateScope - | ILMemberAccess.FamilyOrAssembly -> MethodAttributes.FamORAssem - | ILMemberAccess.Family -> MethodAttributes.Family + | ILMemberAccess.Public -> MethodAttributes.Public + | ILMemberAccess.Private -> MethodAttributes.Private + | ILMemberAccess.Assembly -> MethodAttributes.Assembly + | ILMemberAccess.FamilyAndAssembly -> MethodAttributes.FamANDAssem + | ILMemberAccess.CompilerControlled -> MethodAttributes.PrivateScope + | ILMemberAccess.FamilyOrAssembly -> MethodAttributes.FamORAssem + | ILMemberAccess.Family -> MethodAttributes.Family let inline conditionalAdd condition flagToAdd source = if condition then source ||| flagToAdd else source &&& ~~~flagToAdd @@ -1588,7 +1587,7 @@ let NoMetadataIdx = -1 [] type ILMethodDef (name: string, attributes: MethodAttributes, implAttributes: MethodImplAttributes, callingConv: ILCallingConv, - parameters: ILParameters, ret: ILReturn, body: ILLazyMethodBody, isEntryPoint:bool, genericParams: ILGenericParameterDefs, + parameters: ILParameters, ret: ILReturn, body: ILLazyMethodBody, isEntryPoint: bool, genericParams: ILGenericParameterDefs, securityDeclsStored: ILSecurityDeclsStored, customAttrsStored: ILAttributesStored, metadataIndex: int32) = static member CreateStored (name, attributes, implAttributes, callingConv, parameters, ret, body, isEntryPoint, genericParams, securityDeclsStored, customAttrsStored, metadataIndex) = @@ -1626,7 +1625,7 @@ type ILMethodDef (name: string, attributes: MethodAttributes, implAttributes: Me member x.With (?name: string, ?attributes: MethodAttributes, ?implAttributes: MethodImplAttributes, ?callingConv: ILCallingConv, ?parameters: ILParameters, ?ret: ILReturn, - ?body: ILLazyMethodBody, ?securityDecls: ILSecurityDecls, ?isEntryPoint:bool, + ?body: ILLazyMethodBody, ?securityDecls: ILSecurityDecls, ?isEntryPoint: bool, ?genericParams: ILGenericParameterDefs, ?customAttrs: ILAttributes) = ILMethodDef.Create (name = defaultArg name x.Name, @@ -1660,37 +1659,37 @@ type ILMethodDef (name: string, attributes: MethodAttributes, implAttributes: Me member x.SourceMarker = x.MethodBody.SourceMarker - member x.MaxStack = x.MethodBody.MaxStack + member x.MaxStack = x.MethodBody.MaxStack - member x.IsZeroInit = x.MethodBody.IsZeroInit + member x.IsZeroInit = x.MethodBody.IsZeroInit - member md.CallingSignature = mkILCallSig (md.CallingConv, md.ParameterTypes, md.Return.Type) + member md.CallingSignature = mkILCallSig (md.CallingConv, md.ParameterTypes, md.Return.Type) - member x.IsClassInitializer = x.Name = ".cctor" - member x.IsConstructor = x.Name = ".ctor" + member x.IsClassInitializer = x.Name = ".cctor" + member x.IsConstructor = x.Name = ".ctor" - member x.Access = memberAccessOfFlags (int x.Attributes) - member x.IsStatic = x.Attributes &&& MethodAttributes.Static <> enum 0 - member x.IsNonVirtualInstance = not x.IsStatic && not x.IsVirtual - member x.IsVirtual = x.Attributes &&& MethodAttributes.Virtual <> enum 0 - member x.IsFinal = x.Attributes &&& MethodAttributes.Final <> enum 0 - member x.IsNewSlot = x.Attributes &&& MethodAttributes.NewSlot <> enum 0 + member x.Access = memberAccessOfFlags (int x.Attributes) + member x.IsStatic = x.Attributes &&& MethodAttributes.Static <> enum 0 + member x.IsNonVirtualInstance = not x.IsStatic && not x.IsVirtual + member x.IsVirtual = x.Attributes &&& MethodAttributes.Virtual <> enum 0 + member x.IsFinal = x.Attributes &&& MethodAttributes.Final <> enum 0 + member x.IsNewSlot = x.Attributes &&& MethodAttributes.NewSlot <> enum 0 member x.IsCheckAccessOnOverride= x.Attributes &&& MethodAttributes.CheckAccessOnOverride <> enum 0 - member x.IsAbstract = x.Attributes &&& MethodAttributes.Abstract <> enum 0 - member x.IsHideBySig = x.Attributes &&& MethodAttributes.HideBySig <> enum 0 - member x.IsSpecialName = x.Attributes &&& MethodAttributes.SpecialName <> enum 0 - member x.IsUnmanagedExport = x.Attributes &&& MethodAttributes.UnmanagedExport <> enum 0 - member x.IsReqSecObj = x.Attributes &&& MethodAttributes.RequireSecObject <> enum 0 - member x.HasSecurity = x.Attributes &&& MethodAttributes.HasSecurity <> enum 0 - - member x.IsManaged = x.ImplAttributes &&& MethodImplAttributes.Managed <> enum 0 - member x.IsForwardRef = x.ImplAttributes &&& MethodImplAttributes.ForwardRef <> enum 0 - member x.IsInternalCall = x.ImplAttributes &&& MethodImplAttributes.InternalCall <> enum 0 - member x.IsPreserveSig = x.ImplAttributes &&& MethodImplAttributes.PreserveSig <> enum 0 - member x.IsSynchronized = x.ImplAttributes &&& MethodImplAttributes.Synchronized <> enum 0 - member x.IsNoInline = x.ImplAttributes &&& MethodImplAttributes.NoInlining <> enum 0 + member x.IsAbstract = x.Attributes &&& MethodAttributes.Abstract <> enum 0 + member x.IsHideBySig = x.Attributes &&& MethodAttributes.HideBySig <> enum 0 + member x.IsSpecialName = x.Attributes &&& MethodAttributes.SpecialName <> enum 0 + member x.IsUnmanagedExport = x.Attributes &&& MethodAttributes.UnmanagedExport <> enum 0 + member x.IsReqSecObj = x.Attributes &&& MethodAttributes.RequireSecObject <> enum 0 + member x.HasSecurity = x.Attributes &&& MethodAttributes.HasSecurity <> enum 0 + + member x.IsManaged = x.ImplAttributes &&& MethodImplAttributes.Managed <> enum 0 + member x.IsForwardRef = x.ImplAttributes &&& MethodImplAttributes.ForwardRef <> enum 0 + member x.IsInternalCall = x.ImplAttributes &&& MethodImplAttributes.InternalCall <> enum 0 + member x.IsPreserveSig = x.ImplAttributes &&& MethodImplAttributes.PreserveSig <> enum 0 + member x.IsSynchronized = x.ImplAttributes &&& MethodImplAttributes.Synchronized <> enum 0 + member x.IsNoInline = x.ImplAttributes &&& MethodImplAttributes.NoInlining <> enum 0 member x.IsAggressiveInline= x.ImplAttributes &&& MethodImplAttributes.AggressiveInlining <> enum 0 - member x.IsMustRun = x.ImplAttributes &&& MethodImplAttributes.NoOptimization <> enum 0 + member x.IsMustRun = x.ImplAttributes &&& MethodImplAttributes.NoOptimization <> enum 0 member x.WithSpecialName = x.With(attributes = (x.Attributes ||| MethodAttributes.SpecialName)) member x.WithHideBySig() = @@ -1845,19 +1844,19 @@ type ILPropertyDefs = member x.AsList = let (ILProperties t) = x in t.Entries() member x.LookupByName s = let (ILProperties t) = x in t.[s] -let convertFieldAccess (ilMemberAccess:ILMemberAccess) = +let convertFieldAccess (ilMemberAccess: ILMemberAccess) = match ilMemberAccess with - | ILMemberAccess.Assembly -> FieldAttributes.Assembly - | ILMemberAccess.CompilerControlled -> enum(0) - | ILMemberAccess.FamilyAndAssembly -> FieldAttributes.FamANDAssem - | ILMemberAccess.FamilyOrAssembly -> FieldAttributes.FamORAssem - | ILMemberAccess.Family -> FieldAttributes.Family - | ILMemberAccess.Private -> FieldAttributes.Private - | ILMemberAccess.Public -> FieldAttributes.Public + | ILMemberAccess.Assembly -> FieldAttributes.Assembly + | ILMemberAccess.CompilerControlled -> enum(0) + | ILMemberAccess.FamilyAndAssembly -> FieldAttributes.FamANDAssem + | ILMemberAccess.FamilyOrAssembly -> FieldAttributes.FamORAssem + | ILMemberAccess.Family -> FieldAttributes.Family + | ILMemberAccess.Private -> FieldAttributes.Private + | ILMemberAccess.Public -> FieldAttributes.Public [] type ILFieldDef(name: string, fieldType: ILType, attributes: FieldAttributes, data: byte[] option, - literalValue: ILFieldInit option, offset: int32 option, marshal: ILNativeType option, + literalValue: ILFieldInit option, offset: int32 option, marshal: ILNativeType option, customAttrsStored: ILAttributesStored, metadataIndex: int32) = static member CreateStored (name, fieldType, attributes, data, literalValue, offset, marshal, customAttrsStored, metadataIndex) = @@ -1877,7 +1876,7 @@ type ILFieldDef(name: string, fieldType: ILType, attributes: FieldAttributes, da member x.CustomAttrs = customAttrsStored.GetCustomAttrs x.MetadataIndex member x.MetadataIndex = metadataIndex - member x.With(?name: string, ?fieldType: ILType, ?attributes: FieldAttributes, ?data: byte[] option, ?literalValue: ILFieldInit option, ?offset: int32 option, ?marshal: ILNativeType option, ?customAttrs: ILAttributes) = + member x.With(?name: string, ?fieldType: ILType, ?attributes: FieldAttributes, ?data: byte[] option, ?literalValue: ILFieldInit option, ?offset: int32 option, ?marshal: ILNativeType option, ?customAttrs: ILAttributes) = ILFieldDef.Create(name=defaultArg name x.Name, fieldType=defaultArg fieldType x.FieldType, attributes=defaultArg attributes x.Attributes, @@ -1901,7 +1900,7 @@ type ILFieldDef(name: string, fieldType: ILType, attributes: FieldAttributes, da member x.WithFieldMarshal(marshal) = x.With(marshal = marshal, attributes = (x.Attributes |> conditionalAdd marshal.IsSome FieldAttributes.HasFieldMarshal)) -// Index table by name. Keep a canonical list to make sure field order is not disturbed for binary manipulation. +// Index table by name. Keep a canonical list to make sure field order is not disturbed for binary manipulation. type ILFieldDefs = | ILFields of LazyOrderedMultiMap @@ -1928,7 +1927,7 @@ type ILTypeDefLayout = | Explicit of ILTypeDefLayoutInfo (* REVIEW: add field info here *) and ILTypeDefLayoutInfo = - { Size: int32 option; + { Size: int32 option Pack: uint16 option } [] @@ -1972,12 +1971,12 @@ type ILTypeDefKind = | Enum | Delegate -let typeKindOfFlags nm _mdefs _fdefs (super:ILType option) flags = +let typeKindOfFlags nm _mdefs _fdefs (super: ILType option) flags = if (flags &&& 0x00000020) <> 0x0 then ILTypeDefKind.Interface else let isEnum, isDelegate, isMulticastDelegate, isValueType = match super with - | None -> false , false, false, false + | None -> false, false, false, false | Some ty -> ty.TypeSpec.Name = "System.Enum", ty.TypeSpec.Name = "System.Delegate", @@ -1985,17 +1984,17 @@ let typeKindOfFlags nm _mdefs _fdefs (super:ILType option) flags = ty.TypeSpec.Name = "System.ValueType" && nm <> "System.Enum" let selfIsMulticastDelegate = nm = "System.MulticastDelegate" if isEnum then ILTypeDefKind.Enum - elif (isDelegate && not selfIsMulticastDelegate) || isMulticastDelegate then ILTypeDefKind.Delegate + elif (isDelegate && not selfIsMulticastDelegate) || isMulticastDelegate then ILTypeDefKind.Delegate elif isValueType then ILTypeDefKind.ValueType else ILTypeDefKind.Class let convertTypeAccessFlags access = match access with | ILTypeDefAccess.Public -> TypeAttributes.Public - | ILTypeDefAccess.Private -> TypeAttributes.NotPublic + | ILTypeDefAccess.Private -> TypeAttributes.NotPublic | ILTypeDefAccess.Nested ILMemberAccess.Public -> TypeAttributes.NestedPublic - | ILTypeDefAccess.Nested ILMemberAccess.Private -> TypeAttributes.NestedPrivate - | ILTypeDefAccess.Nested ILMemberAccess.Family -> TypeAttributes.NestedFamily + | ILTypeDefAccess.Nested ILMemberAccess.Private -> TypeAttributes.NestedPrivate + | ILTypeDefAccess.Nested ILMemberAccess.Family -> TypeAttributes.NestedFamily | ILTypeDefAccess.Nested ILMemberAccess.CompilerControlled -> TypeAttributes.NestedPrivate | ILTypeDefAccess.Nested ILMemberAccess.FamilyAndAssembly -> TypeAttributes.NestedFamANDAssem | ILTypeDefAccess.Nested ILMemberAccess.FamilyOrAssembly -> TypeAttributes.NestedFamORAssem @@ -2021,17 +2020,17 @@ let convertEncoding encoding = | ILDefaultPInvokeEncoding.Ansi -> TypeAttributes.AnsiClass | ILDefaultPInvokeEncoding.Unicode -> TypeAttributes.UnicodeClass -let convertToNestedTypeAccess (ilMemberAccess:ILMemberAccess) = +let convertToNestedTypeAccess (ilMemberAccess: ILMemberAccess) = match ilMemberAccess with - | ILMemberAccess.Assembly -> TypeAttributes.NestedAssembly - | ILMemberAccess.CompilerControlled -> failwith "Method access compiler controlled." - | ILMemberAccess.FamilyAndAssembly -> TypeAttributes.NestedFamANDAssem - | ILMemberAccess.FamilyOrAssembly -> TypeAttributes.NestedFamORAssem - | ILMemberAccess.Family -> TypeAttributes.NestedFamily - | ILMemberAccess.Private -> TypeAttributes.NestedPrivate - | ILMemberAccess.Public -> TypeAttributes.NestedPublic + | ILMemberAccess.Assembly -> TypeAttributes.NestedAssembly + | ILMemberAccess.CompilerControlled -> failwith "Method access compiler controlled." + | ILMemberAccess.FamilyAndAssembly -> TypeAttributes.NestedFamANDAssem + | ILMemberAccess.FamilyOrAssembly -> TypeAttributes.NestedFamORAssem + | ILMemberAccess.Family -> TypeAttributes.NestedFamily + | ILMemberAccess.Private -> TypeAttributes.NestedPrivate + | ILMemberAccess.Public -> TypeAttributes.NestedPublic -let convertInitSemantics (init:ILTypeInit) = +let convertInitSemantics (init: ILTypeInit) = match init with | ILTypeInit.BeforeField -> TypeAttributes.BeforeFieldInit | ILTypeInit.OnAny -> enum 0 @@ -2092,11 +2091,11 @@ type ILTypeDef(name: string, attributes: TypeAttributes, layout: ILTypeDefLayout member x.SecurityDecls = x.SecurityDeclsStored.GetSecurityDecls x.MetadataIndex - member x.IsClass = (typeKindOfFlags x.Name x.Methods x.Fields x.Extends (int x.Attributes)) = ILTypeDefKind.Class - member x.IsStruct = (typeKindOfFlags x.Name x.Methods x.Fields x.Extends (int x.Attributes)) = ILTypeDefKind.ValueType + member x.IsClass = (typeKindOfFlags x.Name x.Methods x.Fields x.Extends (int x.Attributes)) = ILTypeDefKind.Class + member x.IsStruct = (typeKindOfFlags x.Name x.Methods x.Fields x.Extends (int x.Attributes)) = ILTypeDefKind.ValueType member x.IsInterface = (typeKindOfFlags x.Name x.Methods x.Fields x.Extends (int x.Attributes)) = ILTypeDefKind.Interface - member x.IsEnum = (typeKindOfFlags x.Name x.Methods x.Fields x.Extends (int x.Attributes)) = ILTypeDefKind.Enum - member x.IsDelegate = (typeKindOfFlags x.Name x.Methods x.Fields x.Extends (int x.Attributes)) = ILTypeDefKind.Delegate + member x.IsEnum = (typeKindOfFlags x.Name x.Methods x.Fields x.Extends (int x.Attributes)) = ILTypeDefKind.Enum + member x.IsDelegate = (typeKindOfFlags x.Name x.Methods x.Fields x.Extends (int x.Attributes)) = ILTypeDefKind.Delegate member x.Access = typeAccessOfFlags (int x.Attributes) member x.IsAbstract = x.Attributes &&& TypeAttributes.Abstract <> enum 0 member x.IsSealed = x.Attributes &&& TypeAttributes.Sealed <> enum 0 @@ -2144,7 +2143,7 @@ and [] ILTypeDefs(f : unit -> ILPreTypeDef[]) = member x.AsArrayOfPreTypeDefs = array.Value - member x.FindByName nm = + member x.FindByName nm = let ns, n = splitILTypeName nm dict.Value.[(ns, n)].GetTypeDef() @@ -2344,17 +2343,17 @@ let emptyILGenericArgsList = ([]: ILType list) // -------------------------------------------------------------------- -let mkILNestedTyRef (scope, l, nm) = ILTypeRef.Create(scope, l, nm) +let mkILNestedTyRef (scope, l, nm) = ILTypeRef.Create(scope, l, nm) -let mkILTyRef (scope, nm) = mkILNestedTyRef (scope, [], nm) +let mkILTyRef (scope, nm) = mkILNestedTyRef (scope, [], nm) type ILGenericArgsList = ILType list -let mkILTySpec (tref, inst) = ILTypeSpec.Create(tref, inst) +let mkILTySpec (tref, inst) = ILTypeSpec.Create(tref, inst) -let mkILNonGenericTySpec tref = mkILTySpec (tref, []) +let mkILNonGenericTySpec tref = mkILTySpec (tref, []) -let mkILTyRefInTyRef (tref:ILTypeRef, nm) = +let mkILTyRefInTyRef (tref: ILTypeRef, nm) = mkILNestedTyRef (tref.Scope, tref.Enclosing@[tref.Name], nm) let mkILTy boxed tspec = @@ -2404,16 +2403,16 @@ let mkILMethSpec (mref, vc, tinst, minst) = mkILMethSpecForMethRefInTy (mref, mk let mkILMethSpecInTypeRef (tref, vc, cc, nm, args, rty, tinst, minst) = mkILMethSpec (mkILMethRef ( tref, cc, nm, List.length minst, args, rty), vc, tinst, minst) -let mkILMethSpecInTy (ty:ILType, cc, nm, args, rty, minst:ILGenericArgs) = +let mkILMethSpecInTy (ty: ILType, cc, nm, args, rty, minst: ILGenericArgs) = mkILMethSpecForMethRefInTy (mkILMethRef (ty.TypeRef, cc, nm, minst.Length, args, rty), ty, minst) let mkILNonGenericMethSpecInTy (ty, cc, nm, args, rty) = mkILMethSpecInTy (ty, cc, nm, args, rty, []) -let mkILInstanceMethSpecInTy (ty:ILType, nm, args, rty, minst) = +let mkILInstanceMethSpecInTy (ty: ILType, nm, args, rty, minst) = mkILMethSpecInTy (ty, ILCallingConv.Instance, nm, args, rty, minst) -let mkILNonGenericInstanceMethSpecInTy (ty:ILType, nm, args, rty) = +let mkILNonGenericInstanceMethSpecInTy (ty: ILType, nm, args, rty) = mkILInstanceMethSpecInTy (ty, nm, args, rty, []) let mkILStaticMethSpecInTy (ty, nm, args, rty, minst) = @@ -2439,7 +2438,7 @@ let mkILFieldRef(tref, nm, ty) = { DeclaringTypeRef=tref; Name=nm; Type=ty} let mkILFieldSpec (tref, ty) = { FieldRef= tref; DeclaringType=ty } -let mkILFieldSpecInTy (ty:ILType, nm, fty) = +let mkILFieldSpecInTy (ty: ILType, nm, fty) = mkILFieldSpec (mkILFieldRef (ty.TypeRef, nm, fty), ty) @@ -2450,7 +2449,7 @@ let andTailness x y = // Basic operations on code. // -------------------------------------------------------------------- -let formatCodeLabel (x:int) = "L"+string x +let formatCodeLabel (x: int) = "L"+string x // ++GLOBAL MUTABLE STATE (concurrency safe) let codeLabelCount = ref 0 @@ -2462,14 +2461,14 @@ let generateCodeLabel() = System.Threading.Interlocked.Increment(codeLabelCount) let instrIsRet i = match i with - | I_ret -> true + | I_ret -> true | _ -> false let nonBranchingInstrsToCode instrs : ILCode = let instrs = Array.ofList instrs let instrs = if instrs.Length <> 0 && instrIsRet (Array.last instrs) then instrs - else Array.append instrs [| I_ret |] + else Array.append instrs [| I_ret |] { Labels = Dictionary() Instrs = instrs @@ -2493,11 +2492,11 @@ let mkILSimpleTypar nm = CustomAttrsStored = storeILCustomAttrs emptyILCustomAttrs MetadataIndex = NoMetadataIdx } -let gparam_of_gactual (_ga:ILType) = mkILSimpleTypar "T" +let gparam_of_gactual (_ga: ILType) = mkILSimpleTypar "T" let mkILFormalTypars (x: ILGenericArgsList) = List.map gparam_of_gactual x -let mkILFormalGenericArgs numtypars (gparams:ILGenericParameterDefs) = +let mkILFormalGenericArgs numtypars (gparams: ILGenericParameterDefs) = List.mapi (fun n _gf -> mkILTyvarTy (uint16 (numtypars + n))) gparams let mkILFormalBoxedTy tref gparams = mkILBoxedTy tref (mkILFormalGenericArgs 0 gparams) @@ -2508,14 +2507,14 @@ let mkILFormalNamedTy bx tref gparams = mkILNamedTy bx tref (mkILFormalGenericAr // Operations on class etc. defs. // -------------------------------------------------------------------- -let mkRefForNestedILTypeDef scope (enc:ILTypeDef list, td:ILTypeDef) = +let mkRefForNestedILTypeDef scope (enc: ILTypeDef list, td: ILTypeDef) = mkILNestedTyRef(scope, (enc |> List.map (fun etd -> etd.Name)), td.Name) // -------------------------------------------------------------------- // Operations on type tables. // -------------------------------------------------------------------- -let mkILPreTypeDef (td:ILTypeDef) = +let mkILPreTypeDef (td: ILTypeDef) = let ns, n = splitILTypeName td.Name ILPreTypeDef(ns, n, NoMetadataIdx, ILTypeDefStored.Given td) let mkILPreTypeDefComputed (ns, n, f) = @@ -2525,8 +2524,8 @@ let mkILPreTypeDefRead (ns, n, idx, f) = let addILTypeDef td (tdefs: ILTypeDefs) = ILTypeDefs (fun () -> [| yield mkILPreTypeDef td; yield! tdefs.AsArrayOfPreTypeDefs |]) -let mkILTypeDefsFromArray (l: ILTypeDef[]) = ILTypeDefs (fun () -> Array.map mkILPreTypeDef l) -let mkILTypeDefs l = mkILTypeDefsFromArray (Array.ofList l) +let mkILTypeDefsFromArray (l: ILTypeDef[]) = ILTypeDefs (fun () -> Array.map mkILPreTypeDef l) +let mkILTypeDefs l = mkILTypeDefsFromArray (Array.ofList l) let mkILTypeDefsComputed f = ILTypeDefs f let emptyILTypeDefs = mkILTypeDefsFromArray [| |] @@ -2534,9 +2533,9 @@ let emptyILTypeDefs = mkILTypeDefsFromArray [| |] // Operations on method tables. // -------------------------------------------------------------------- -let mkILMethodsFromArray xs = ILMethodDefs (fun () -> xs) -let mkILMethods xs = xs |> Array.ofList |> mkILMethodsFromArray -let mkILMethodsComputed f = ILMethodDefs f +let mkILMethodsFromArray xs = ILMethodDefs (fun () -> xs) +let mkILMethods xs = xs |> Array.ofList |> mkILMethodsFromArray +let mkILMethodsComputed f = ILMethodDefs f let emptyILMethods = mkILMethodsFromArray [| |] let filterILMethodDefs f (mdefs: ILMethodDefs) = @@ -2646,26 +2645,26 @@ type ILGlobals(primaryScopeRef) = let m_typ_IntPtr = ILType.Value (mkILNonGenericTySpec (m_mkSysILTypeRef tname_IntPtr)) let m_typ_UIntPtr = ILType.Value (mkILNonGenericTySpec (m_mkSysILTypeRef tname_UIntPtr)) - member x.primaryAssemblyScopeRef = m_typ_Object.TypeRef.Scope - member x.primaryAssemblyName = m_typ_Object.TypeRef.Scope.AssemblyRef.Name - member x.typ_Object = m_typ_Object - member x.typ_String = m_typ_String - member x.typ_Array = m_typ_Array - member x.typ_Type = m_typ_Type - member x.typ_IntPtr = m_typ_IntPtr - member x.typ_UIntPtr = m_typ_UIntPtr - member x.typ_Byte = m_typ_Byte - member x.typ_Int16 = m_typ_Int16 - member x.typ_Int32 = m_typ_Int32 - member x.typ_Int64 = m_typ_Int64 - member x.typ_SByte = m_typ_SByte - member x.typ_UInt16 = m_typ_UInt16 - member x.typ_UInt32 = m_typ_UInt32 - member x.typ_UInt64 = m_typ_UInt64 - member x.typ_Single = m_typ_Single - member x.typ_Double = m_typ_Double - member x.typ_Bool = m_typ_Bool - member x.typ_Char = m_typ_Char + member x.primaryAssemblyScopeRef = m_typ_Object.TypeRef.Scope + member x.primaryAssemblyName = m_typ_Object.TypeRef.Scope.AssemblyRef.Name + member x.typ_Object = m_typ_Object + member x.typ_String = m_typ_String + member x.typ_Array = m_typ_Array + member x.typ_Type = m_typ_Type + member x.typ_IntPtr = m_typ_IntPtr + member x.typ_UIntPtr = m_typ_UIntPtr + member x.typ_Byte = m_typ_Byte + member x.typ_Int16 = m_typ_Int16 + member x.typ_Int32 = m_typ_Int32 + member x.typ_Int64 = m_typ_Int64 + member x.typ_SByte = m_typ_SByte + member x.typ_UInt16 = m_typ_UInt16 + member x.typ_UInt32 = m_typ_UInt32 + member x.typ_UInt64 = m_typ_UInt64 + member x.typ_Single = m_typ_Single + member x.typ_Double = m_typ_Double + member x.typ_Bool = m_typ_Bool + member x.typ_Char = m_typ_Char /// For debugging [] @@ -2681,12 +2680,12 @@ let mkNormalCallvirt mspec = I_callvirt (Normalcall, mspec, None) let mkNormalCallconstraint (ty, mspec) = I_callconstraint (Normalcall, ty, mspec, None) -let mkNormalNewobj mspec = I_newobj (mspec, None) +let mkNormalNewobj mspec = I_newobj (mspec, None) /// Comment on common object cache sizes: /// mkLdArg - I can't imagine any IL method we generate needing more than this /// mkLdLoc - I tried 256, and there were LdLoc allocations left, so I upped it o 512. I didn't check again. -/// mkStLoc - it should be the same as LdLoc (where there's a LdLoc there must be a StLoc) +/// mkStLoc - it should be the same as LdLoc (where there's a LdLoc there must be a StLoc) /// mkLdcInt32 - just a guess let ldargs = [| for i in 0 .. 128 -> I_ldarg (uint16 i) |] @@ -2718,7 +2717,7 @@ let isILBoxedTy = function ILType.Boxed _ -> true | _ -> false let isILValueTy = function ILType.Value _ -> true | _ -> false -let isPrimaryAssemblyTySpec (tspec:ILTypeSpec) n = +let isPrimaryAssemblyTySpec (tspec: ILTypeSpec) n = let tref = tspec.TypeRef let scoref = tref.Scope (tref.Name = n) && @@ -2727,45 +2726,45 @@ let isPrimaryAssemblyTySpec (tspec:ILTypeSpec) n = | ILScopeRef.Module _ -> false | ILScopeRef.Local -> true -let isILBoxedPrimaryAssemblyTy (ty:ILType) n = +let isILBoxedPrimaryAssemblyTy (ty: ILType) n = isILBoxedTy ty && isPrimaryAssemblyTySpec ty.TypeSpec n -let isILValuePrimaryAssemblyTy (ty:ILType) n = +let isILValuePrimaryAssemblyTy (ty: ILType) n = isILValueTy ty && isPrimaryAssemblyTySpec ty.TypeSpec n -let isILObjectTy ty = isILBoxedPrimaryAssemblyTy ty tname_Object +let isILObjectTy ty = isILBoxedPrimaryAssemblyTy ty tname_Object -let isILStringTy ty = isILBoxedPrimaryAssemblyTy ty tname_String +let isILStringTy ty = isILBoxedPrimaryAssemblyTy ty tname_String -let isILTypedReferenceTy ty = isILValuePrimaryAssemblyTy ty "System.TypedReference" +let isILTypedReferenceTy ty = isILValuePrimaryAssemblyTy ty "System.TypedReference" -let isILSByteTy ty = isILValuePrimaryAssemblyTy ty tname_SByte +let isILSByteTy ty = isILValuePrimaryAssemblyTy ty tname_SByte -let isILByteTy ty = isILValuePrimaryAssemblyTy ty tname_Byte +let isILByteTy ty = isILValuePrimaryAssemblyTy ty tname_Byte -let isILInt16Ty ty = isILValuePrimaryAssemblyTy ty tname_Int16 +let isILInt16Ty ty = isILValuePrimaryAssemblyTy ty tname_Int16 -let isILUInt16Ty ty = isILValuePrimaryAssemblyTy ty tname_UInt16 +let isILUInt16Ty ty = isILValuePrimaryAssemblyTy ty tname_UInt16 -let isILInt32Ty ty = isILValuePrimaryAssemblyTy ty tname_Int32 +let isILInt32Ty ty = isILValuePrimaryAssemblyTy ty tname_Int32 -let isILUInt32Ty ty = isILValuePrimaryAssemblyTy ty tname_UInt32 +let isILUInt32Ty ty = isILValuePrimaryAssemblyTy ty tname_UInt32 -let isILInt64Ty ty = isILValuePrimaryAssemblyTy ty tname_Int64 +let isILInt64Ty ty = isILValuePrimaryAssemblyTy ty tname_Int64 -let isILUInt64Ty ty = isILValuePrimaryAssemblyTy ty tname_UInt64 +let isILUInt64Ty ty = isILValuePrimaryAssemblyTy ty tname_UInt64 -let isILIntPtrTy ty = isILValuePrimaryAssemblyTy ty tname_IntPtr +let isILIntPtrTy ty = isILValuePrimaryAssemblyTy ty tname_IntPtr -let isILUIntPtrTy ty = isILValuePrimaryAssemblyTy ty tname_UIntPtr +let isILUIntPtrTy ty = isILValuePrimaryAssemblyTy ty tname_UIntPtr -let isILBoolTy ty = isILValuePrimaryAssemblyTy ty tname_Bool +let isILBoolTy ty = isILValuePrimaryAssemblyTy ty tname_Bool -let isILCharTy ty = isILValuePrimaryAssemblyTy ty tname_Char +let isILCharTy ty = isILValuePrimaryAssemblyTy ty tname_Char -let isILSingleTy ty = isILValuePrimaryAssemblyTy ty tname_Single +let isILSingleTy ty = isILValuePrimaryAssemblyTy ty tname_Single -let isILDoubleTy ty = isILValuePrimaryAssemblyTy ty tname_Double +let isILDoubleTy ty = isILValuePrimaryAssemblyTy ty tname_Double // -------------------------------------------------------------------- // Rescoping @@ -2779,16 +2778,16 @@ let rescopeILScopeRef scoref scoref1 = | ILScopeRef.Module _, _ -> scoref1 | _ -> scoref1 -let rescopeILTypeRef scoref (tref1:ILTypeRef) = +let rescopeILTypeRef scoref (tref1: ILTypeRef) = let scoref1 = tref1.Scope let scoref2 = rescopeILScopeRef scoref scoref1 if scoref1 === scoref2 then tref1 else ILTypeRef.Create(scoref2, tref1.Enclosing, tref1.Name) // ORIGINAL IMPLEMENTATION (too many allocations -// { tspecTypeRef=rescopeILTypeRef scoref tref; +// { tspecTypeRef=rescopeILTypeRef scoref tref // tspecInst=rescopeILTypes scoref tinst } -let rec rescopeILTypeSpec scoref (tspec1:ILTypeSpec) = +let rec rescopeILTypeSpec scoref (tspec1: ILTypeSpec) = let tref1 = tspec1.TypeRef let tinst1 = tspec1.GenericArgs let tref2 = rescopeILTypeRef scoref tref1 @@ -2827,10 +2826,10 @@ and rescopeILTypes scoref i = if isNil i then i else List.mapq (rescopeILType scoref) i -and rescopeILCallSig scoref csig = +and rescopeILCallSig scoref csig = mkILCallSig (csig.CallingConv, rescopeILTypes scoref csig.ArgTypes, rescopeILType scoref csig.ReturnType) -let rescopeILMethodRef scoref (x:ILMethodRef) = +let rescopeILMethodRef scoref (x: ILMethodRef) = { mrefParent = rescopeILTypeRef scoref x.DeclaringTypeRef mrefCallconv = x.mrefCallconv mrefGenericArity=x.mrefGenericArity @@ -2847,18 +2846,18 @@ let rescopeILFieldRef scoref x = // Instantiate polymorphism in types // -------------------------------------------------------------------- -let rec instILTypeSpecAux numFree inst (tspec:ILTypeSpec) = +let rec instILTypeSpecAux numFree inst (tspec: ILTypeSpec) = ILTypeSpec.Create(tspec.TypeRef, instILGenericArgsAux numFree inst tspec.GenericArgs) -and instILTypeAux numFree (inst:ILGenericArgs) ty = +and instILTypeAux numFree (inst: ILGenericArgs) ty = match ty with - | ILType.Ptr t -> ILType.Ptr (instILTypeAux numFree inst t) - | ILType.FunctionPointer t -> ILType.FunctionPointer (instILCallSigAux numFree inst t) + | ILType.Ptr t -> ILType.Ptr (instILTypeAux numFree inst t) + | ILType.FunctionPointer t -> ILType.FunctionPointer (instILCallSigAux numFree inst t) | ILType.Array (a, t) -> ILType.Array (a, instILTypeAux numFree inst t) - | ILType.Byref t -> ILType.Byref (instILTypeAux numFree inst t) - | ILType.Boxed cr -> mkILBoxedType (instILTypeSpecAux numFree inst cr) - | ILType.Value cr -> ILType.Value (instILTypeSpecAux numFree inst cr) - | ILType.TypeVar v -> + | ILType.Byref t -> ILType.Byref (instILTypeAux numFree inst t) + | ILType.Boxed cr -> mkILBoxedType (instILTypeSpecAux numFree inst cr) + | ILType.Value cr -> ILType.Value (instILTypeSpecAux numFree inst cr) + | ILType.TypeVar v -> let v = int v let top = inst.Length if v < numFree then ty else @@ -2870,10 +2869,10 @@ and instILTypeAux numFree (inst:ILGenericArgs) ty = and instILGenericArgsAux numFree inst i = List.map (instILTypeAux numFree inst) i -and instILCallSigAux numFree inst csig = - mkILCallSig (csig.CallingConv, List.map (instILTypeAux numFree inst) csig.ArgTypes, instILTypeAux numFree inst csig.ReturnType) +and instILCallSigAux numFree inst csig = + mkILCallSig (csig.CallingConv, List.map (instILTypeAux numFree inst) csig.ArgTypes, instILTypeAux numFree inst csig.ReturnType) -let instILType i t = instILTypeAux 0 i t +let instILType i t = instILTypeAux 0 i t // -------------------------------------------------------------------- // MS-IL: Parameters, Return types and Locals @@ -2888,7 +2887,7 @@ let mkILParam (name, ty) : ILParameter = IsOptional=false Type=ty CustomAttrsStored=storeILCustomAttrs emptyILCustomAttrs - MetadataIndex = NoMetadataIdx } + MetadataIndex = NoMetadataIdx } let mkILParamNamed (s, ty) = mkILParam (Some s, ty) @@ -3016,7 +3015,7 @@ let mkILClassCtor impl = // (i.e. overrides by name/signature) // -------------------------------------------------------------------- -let mk_ospec (ty:ILType, callconv, nm, genparams, formal_args, formal_ret) = +let mk_ospec (ty: ILType, callconv, nm, genparams, formal_args, formal_ret) = OverridesSpec (mkILMethRef (ty.TypeRef, callconv, nm, genparams, formal_args, formal_ret), ty) let mkILGenericVirtualMethod (nm, access, genparams, actual_args, actual_ret, impl) = @@ -3056,14 +3055,14 @@ let mkILNonGenericInstanceMethod (nm, access, args, ret, impl) = // -------------------------------------------------------------------- -// Add some code to the end of the .cctor for a type. Create a .cctor +// Add some code to the end of the .cctor for a type. Create a .cctor // if one doesn't exist already. // -------------------------------------------------------------------- -let ilmbody_code2code f (il: ILMethodBody) = +let ilmbody_code2code f (il: ILMethodBody) = {il with Code = f il.Code} -let mdef_code2code f (md: ILMethodDef) = +let mdef_code2code f (md: ILMethodDef) = let il = match md.Body.Contents with | MethodBody.IL il-> il @@ -3091,7 +3090,7 @@ let prependInstrsToCode (instrs: ILInstr list) (c2: ILCode) = { c2 with Labels = labels Instrs = Array.append instrs c2.Instrs } -let prependInstrsToMethod new_code md = +let prependInstrsToMethod new_code md = mdef_code2code (prependInstrsToCode new_code) md // Creates cctor if needed @@ -3107,7 +3106,7 @@ let cdef_cctorCode2CodeOrCreate tag f (cd: ILTypeDef) = cd.With(methods = methods) -let code_of_mdef (md:ILMethodDef) = +let code_of_mdef (md: ILMethodDef) = match md.Code with | Some x -> x | None -> failwith "code_of_mdef: not IL" @@ -3115,17 +3114,17 @@ let code_of_mdef (md:ILMethodDef) = let mkRefToILMethod (tref, md: ILMethodDef) = mkILMethRef (tref, md.CallingConv, md.Name, md.GenericParams.Length, md.ParameterTypes, md.Return.Type) -let mkRefToILField (tref, fdef:ILFieldDef) = mkILFieldRef (tref, fdef.Name, fdef.FieldType) +let mkRefToILField (tref, fdef: ILFieldDef) = mkILFieldRef (tref, fdef.Name, fdef.FieldType) let mkRefForILMethod scope (tdefs, tdef) mdef = mkRefToILMethod (mkRefForNestedILTypeDef scope (tdefs, tdef), mdef) -let mkRefForILField scope (tdefs, tdef) (fdef:ILFieldDef) = mkILFieldRef (mkRefForNestedILTypeDef scope (tdefs, tdef), fdef.Name, fdef.FieldType) +let mkRefForILField scope (tdefs, tdef) (fdef: ILFieldDef) = mkILFieldRef (mkRefForNestedILTypeDef scope (tdefs, tdef), fdef.Name, fdef.FieldType) // Creates cctor if needed let prependInstrsToClassCtor instrs tag cd = cdef_cctorCode2CodeOrCreate tag (prependInstrsToMethod instrs) cd -let mkILField (isStatic, nm, ty, (init:ILFieldInit option), (at: byte [] option), access, isLiteral) = +let mkILField (isStatic, nm, ty, (init: ILFieldInit option), (at: byte [] option), access, isLiteral) = ILFieldDef.Create(name=nm, fieldType=ty, attributes= @@ -3150,7 +3149,7 @@ let mkILLiteralField (nm, ty, init, at, access) = mkILField (true, nm, ty, Some // Scopes for allocating new temporary variables. // -------------------------------------------------------------------- -type ILLocalsAllocator(numPrealloc:int) = +type ILLocalsAllocator(numPrealloc: int) = let newLocals = ResizeArray() member tmps.AllocLocal loc = let locn = uint16(numPrealloc + newLocals.Count) @@ -3160,29 +3159,29 @@ type ILLocalsAllocator(numPrealloc:int) = member tmps.Close() = ResizeArray.toList newLocals -let mkILFieldsLazy l = ILFields (LazyOrderedMultiMap((fun (f:ILFieldDef) -> f.Name), l)) +let mkILFieldsLazy l = ILFields (LazyOrderedMultiMap((fun (f: ILFieldDef) -> f.Name), l)) -let mkILFields l = mkILFieldsLazy (notlazy l) +let mkILFields l = mkILFieldsLazy (notlazy l) let emptyILFields = mkILFields [] -let mkILEventsLazy l = ILEvents (LazyOrderedMultiMap((fun (e: ILEventDef) -> e.Name), l)) +let mkILEventsLazy l = ILEvents (LazyOrderedMultiMap((fun (e: ILEventDef) -> e.Name), l)) -let mkILEvents l = mkILEventsLazy (notlazy l) +let mkILEvents l = mkILEventsLazy (notlazy l) -let emptyILEvents = mkILEvents [] +let emptyILEvents = mkILEvents [] -let mkILPropertiesLazy l = ILProperties (LazyOrderedMultiMap((fun (p: ILPropertyDef) -> p.Name), l) ) +let mkILPropertiesLazy l = ILProperties (LazyOrderedMultiMap((fun (p: ILPropertyDef) -> p.Name), l) ) -let mkILProperties l = mkILPropertiesLazy (notlazy l) +let mkILProperties l = mkILPropertiesLazy (notlazy l) -let emptyILProperties = mkILProperties [] +let emptyILProperties = mkILProperties [] let addExportedTypeToTable (y: ILExportedTypeOrForwarder) tab = Map.add y.Name y tab -let mkILExportedTypes l = ILExportedTypesAndForwarders (notlazy (List.foldBack addExportedTypeToTable l Map.empty)) +let mkILExportedTypes l = ILExportedTypesAndForwarders (notlazy (List.foldBack addExportedTypeToTable l Map.empty)) -let mkILExportedTypesLazy (l:Lazy<_>) = ILExportedTypesAndForwarders (lazy (List.foldBack addExportedTypeToTable (l.Force()) Map.empty)) +let mkILExportedTypesLazy (l: Lazy<_>) = ILExportedTypesAndForwarders (lazy (List.foldBack addExportedTypeToTable (l.Force()) Map.empty)) let addNestedExportedTypeToTable (y: ILNestedExportedType) tab = Map.add y.Name y tab @@ -3198,24 +3197,24 @@ let mkTypeForwarder scopeRef name nested customAttrs access = let mkILNestedExportedTypes l = ILNestedExportedTypes (notlazy (List.foldBack addNestedExportedTypeToTable l Map.empty)) -let mkILNestedExportedTypesLazy (l:Lazy<_>) = +let mkILNestedExportedTypesLazy (l: Lazy<_>) = ILNestedExportedTypes (lazy (List.foldBack addNestedExportedTypeToTable (l.Force()) Map.empty)) -let mkILResources l = ILResources l +let mkILResources l = ILResources l let addMethodImplToTable y tab = let key = (y.Overrides.MethodRef.Name, y.Overrides.MethodRef.ArgTypes.Length) let prev = Map.tryFindMulti key tab Map.add key (y::prev) tab -let mkILMethodImpls l = ILMethodImpls (notlazy (List.foldBack addMethodImplToTable l Map.empty)) +let mkILMethodImpls l = ILMethodImpls (notlazy (List.foldBack addMethodImplToTable l Map.empty)) -let mkILMethodImplsLazy l = ILMethodImpls (lazy (List.foldBack addMethodImplToTable (Lazy.force l) Map.empty)) +let mkILMethodImplsLazy l = ILMethodImpls (lazy (List.foldBack addMethodImplToTable (Lazy.force l) Map.empty)) -let emptyILMethodImpls = mkILMethodImpls [] +let emptyILMethodImpls = mkILMethodImpls [] /// Make a constructor that simply takes its arguments and stuffs -/// them in fields. preblock is how to call the superclass constructor.... +/// them in fields. preblock is how to call the superclass constructor.... let mkILStorageCtorWithParamNames(tag, preblock, ty, extraParams, flds, access) = mkILCtor(access, (flds |> List.map (fun (pnm, _, ty) -> mkILParamNamed (pnm, ty))) @ extraParams, @@ -3229,7 +3228,7 @@ let mkILStorageCtorWithParamNames(tag, preblock, ty, extraParams, flds, access) [ mkLdarg0 mkLdarg (uint16 (n+1)) mkNormalStfld (mkILFieldSpecInTy (ty, nm, fieldTy)) - ]) flds) + ]) flds) end, tag)) let mkILSimpleStorageCtorWithParamNames(tag, baseTySpec, ty, extraParams, flds, access) = @@ -3257,7 +3256,7 @@ let mkILGenericClass (nm, access, genparams, extends, impl, methods, fields, nes implements = impl, layout=ILTypeDefLayout.Auto, extends = Some extends, - methods= methods , + methods= methods, fields= fields, nestedTypes=nestedTypes, customAttrs=attrs, @@ -3339,7 +3338,7 @@ let mkILSimpleModule assemblyName modname dll subsystemVersion useHighEntropyVA //----------------------------------------------------------------------- // [instructions_to_code] makes the basic block structure of code from -// a primitive array of instructions. We +// a primitive array of instructions. We // do this be iterating over the instructions, pushing new basic blocks // everytime we encounter an address that has been recorded // [bbstartToCodeLabelMap]. @@ -3349,7 +3348,7 @@ let mkILSimpleModule assemblyName modname dll subsystemVersion useHighEntropyVA // REVIEW: this function shows up on performance traces. If we eliminated the last ILX->IL rewrites from the // F# compiler we could get rid of this structured code representation from Abstract IL altogether and // never convert F# code into this form. -let buildILCode (_methName:string) lab2pc instrs tryspecs localspecs : ILCode = +let buildILCode (_methName: string) lab2pc instrs tryspecs localspecs : ILCode = { Labels = lab2pc Instrs = instrs Exceptions = tryspecs @@ -3360,7 +3359,7 @@ let buildILCode (_methName:string) lab2pc instrs tryspecs localspecs : ILCode = // Detecting Delegates // -------------------------------------------------------------------- -let mkILDelegateMethods (access) (ilg: ILGlobals) (iltyp_AsyncCallback, iltyp_IAsyncResult) (parms, rtv:ILReturn) = +let mkILDelegateMethods (access) (ilg: ILGlobals) (iltyp_AsyncCallback, iltyp_IAsyncResult) (parms, rtv: ILReturn) = let rty = rtv.Type let one nm args ret = let mdef = mkILNonGenericVirtualMethod (nm, access, args, mkILReturn ret, MethodBody.Abstract) @@ -3373,9 +3372,9 @@ let mkILDelegateMethods (access) (ilg: ILGlobals) (iltyp_AsyncCallback, iltyp_IA one "EndInvoke" [mkILParamNamed("result", iltyp_IAsyncResult)] rty ] -let mkCtorMethSpecForDelegate (ilg: ILGlobals) (ty:ILType, useUIntPtr) = +let mkCtorMethSpecForDelegate (ilg: ILGlobals) (ty: ILType, useUIntPtr) = let scoref = ty.TypeRef.Scope - mkILInstanceMethSpecInTy (ty, ".ctor", [rescopeILType scoref ilg.typ_Object; + mkILInstanceMethSpecInTy (ty, ".ctor", [rescopeILType scoref ilg.typ_Object rescopeILType scoref (if useUIntPtr then ilg.typ_UIntPtr else ilg.typ_IntPtr)], ILType.Void, emptyILGenericArgsList) @@ -3386,15 +3385,15 @@ type ILEnumInfo = let getTyOfILEnumInfo info = info.enumType let computeILEnumInfo (mdName, mdFields: ILFieldDefs) = - match (List.partition (fun (fd:ILFieldDef) -> fd.IsStatic) mdFields.AsList) with + match (List.partition (fun (fd: ILFieldDef) -> fd.IsStatic) mdFields.AsList) with | staticFields, [vfd] -> { enumType = vfd.FieldType - enumValues = staticFields |> List.map (fun fd -> (fd.Name, match fd.LiteralValue with Some i -> i | None -> failwith ("info_of_enum_tdef: badly formed enum "+mdName+": static field does not have an default value"))) } + enumValues = staticFields |> List.map (fun fd -> (fd.Name, match fd.LiteralValue with Some i -> i | None -> failwith ("info_of_enum_tdef: badly formed enum "+mdName+": static field does not have an default value"))) } | _, [] -> failwith ("info_of_enum_tdef: badly formed enum "+mdName+": no non-static field found") | _, _ -> failwith ("info_of_enum_tdef: badly formed enum "+mdName+": more than one non-static field found") //--------------------------------------------------------------------- -// Primitives to help read signatures. These do not use the file cursor, but +// Primitives to help read signatures. These do not use the file cursor, but // pass around an int index //--------------------------------------------------------------------- @@ -3403,7 +3402,7 @@ let sigptr_get_byte bytes sigptr = let sigptr_get_bool bytes sigptr = let b0, sigptr = sigptr_get_byte bytes sigptr - (b0 = 0x01) , sigptr + (b0 = 0x01), sigptr let sigptr_get_u8 bytes sigptr = let b0, sigptr = sigptr_get_byte bytes sigptr @@ -3450,9 +3449,9 @@ let sigptr_get_u64 bytes sigptr = let u, sigptr = sigptr_get_i64 bytes sigptr uint64 u, sigptr -let float32_of_bits (x:int32) = System.BitConverter.ToSingle(System.BitConverter.GetBytes(x), 0) +let float32_of_bits (x: int32) = System.BitConverter.ToSingle(System.BitConverter.GetBytes(x), 0) -let float_of_bits (x:int64) = System.BitConverter.Int64BitsToDouble(x) +let float_of_bits (x: int64) = System.BitConverter.Int64BitsToDouble(x) let sigptr_get_ieee32 bytes sigptr = let u, sigptr = sigptr_get_i32 bytes sigptr @@ -3462,7 +3461,7 @@ let sigptr_get_ieee64 bytes sigptr = let u, sigptr = sigptr_get_i64 bytes sigptr float_of_bits u, sigptr -let sigptr_get_intarray n (bytes:byte[]) sigptr = +let sigptr_get_intarray n (bytes: byte[]) sigptr = let res = Bytes.zeroCreate n for i = 0 to n - 1 do res.[i] <- bytes.[sigptr + i] @@ -3470,7 +3469,7 @@ let sigptr_get_intarray n (bytes:byte[]) sigptr = let sigptr_get_string n bytes sigptr = let intarray, sigptr = sigptr_get_intarray n bytes sigptr - System.Text.Encoding.UTF8.GetString(intarray , 0, intarray.Length), sigptr + System.Text.Encoding.UTF8.GetString(intarray, 0, intarray.Length), sigptr let sigptr_get_z_i32 bytes sigptr = let b0, sigptr = sigptr_get_byte bytes sigptr @@ -3486,15 +3485,15 @@ let sigptr_get_z_i32 bytes sigptr = let b3, sigptr = sigptr_get_byte bytes sigptr (b0 <<< 24) ||| (b1 <<< 16) ||| (b2 <<< 8) ||| b3, sigptr -let sigptr_get_serstring bytes sigptr = +let sigptr_get_serstring bytes sigptr = let len, sigptr = sigptr_get_z_i32 bytes sigptr sigptr_get_string ( len) bytes sigptr -let sigptr_get_serstring_possibly_null bytes sigptr = +let sigptr_get_serstring_possibly_null bytes sigptr = let b0, new_sigptr = sigptr_get_byte bytes sigptr if b0 = 0xFF then // null case None, new_sigptr - else // throw away new_sigptr, getting length & text advance + else // throw away new_sigptr, getting length & text advance let len, sigptr = sigptr_get_z_i32 bytes sigptr let s, sigptr = sigptr_get_string len bytes sigptr Some(s), sigptr @@ -3512,14 +3511,14 @@ let z_unsigned_int_size n = else 3 let z_unsigned_int n = - if n >= 0 && n <= 0x7F then [| byte n |] + if n >= 0 && n <= 0x7F then [| byte n |] elif n >= 0x80 && n <= 0x3FFF then [| byte (0x80 ||| (n >>>& 8)); byte (n &&& 0xFF) |] else [| byte (0xc0 ||| (n >>>& 24)) byte ((n >>>& 16) &&& 0xFF) byte ((n >>>& 8) &&& 0xFF) byte (n &&& 0xFF) |] -let string_as_utf8_bytes (s:string) = System.Text.Encoding.UTF8.GetBytes s +let string_as_utf8_bytes (s: string) = System.Text.Encoding.UTF8.GetBytes s (* Little-endian encoding of int64 *) let dw7 n = byte ((n >>> 56) &&& 0xFFL) @@ -3534,29 +3533,29 @@ let dw3 n = byte ((n >>> 24) &&& 0xFFL) let dw2 n = byte ((n >>> 16) &&& 0xFFL) -let dw1 n = byte ((n >>> 8) &&& 0xFFL) +let dw1 n = byte ((n >>> 8) &&& 0xFFL) -let dw0 n = byte (n &&& 0xFFL) +let dw0 n = byte (n &&& 0xFFL) -let u8AsBytes (i:byte) = [| i |] +let u8AsBytes (i: byte) = [| i |] -let u16AsBytes x = let n = (int x) in [| byte (b0 n); byte (b1 n) |] +let u16AsBytes x = let n = (int x) in [| byte (b0 n); byte (b1 n) |] let i32AsBytes i = [| byte (b0 i); byte (b1 i); byte (b2 i); byte (b3 i) |] let i64AsBytes i = [| dw0 i; dw1 i; dw2 i; dw3 i; dw4 i; dw5 i; dw6 i; dw7 i |] -let i8AsBytes (i:sbyte) = u8AsBytes (byte i) +let i8AsBytes (i: sbyte) = u8AsBytes (byte i) -let i16AsBytes (i:int16) = u16AsBytes (uint16 i) +let i16AsBytes (i: int16) = u16AsBytes (uint16 i) -let u32AsBytes (i:uint32) = i32AsBytes (int32 i) +let u32AsBytes (i: uint32) = i32AsBytes (int32 i) -let u64AsBytes (i:uint64) = i64AsBytes (int64 i) +let u64AsBytes (i: uint64) = i64AsBytes (int64 i) -let bits_of_float32 (x:float32) = System.BitConverter.ToInt32(System.BitConverter.GetBytes(x), 0) +let bits_of_float32 (x: float32) = System.BitConverter.ToInt32(System.BitConverter.GetBytes(x), 0) -let bits_of_float (x:float) = System.BitConverter.DoubleToInt64Bits(x) +let bits_of_float (x: float) = System.BitConverter.DoubleToInt64Bits(x) let ieee32AsBytes i = i32AsBytes (bits_of_float32 i) @@ -3579,20 +3578,20 @@ let et_R8 = 0x0Duy let et_STRING = 0x0Euy let et_PTR = 0x0Fuy let et_BYREF = 0x10uy -let et_VALUETYPE = 0x11uy -let et_CLASS = 0x12uy -let et_VAR = 0x13uy -let et_ARRAY = 0x14uy -let et_WITH = 0x15uy -let et_TYPEDBYREF = 0x16uy -let et_I = 0x18uy -let et_U = 0x19uy -let et_FNPTR = 0x1Buy -let et_OBJECT = 0x1Cuy -let et_SZARRAY = 0x1Duy -let et_MVAR = 0x1Euy -let et_CMOD_REQD = 0x1Fuy -let et_CMOD_OPT = 0x20uy +let et_VALUETYPE = 0x11uy +let et_CLASS = 0x12uy +let et_VAR = 0x13uy +let et_ARRAY = 0x14uy +let et_WITH = 0x15uy +let et_TYPEDBYREF = 0x16uy +let et_I = 0x18uy +let et_U = 0x19uy +let et_FNPTR = 0x1Buy +let et_OBJECT = 0x1Cuy +let et_SZARRAY = 0x1Duy +let et_MVAR = 0x1Euy +let et_CMOD_REQD = 0x1Fuy +let et_CMOD_OPT = 0x20uy let formatILVersion ((a, b, c, d):ILVersionInfo) = sprintf "%d.%d.%d.%d" (int a) (int b) (int c) (int d) @@ -3602,69 +3601,69 @@ let encodeCustomAttrString s = let rec encodeCustomAttrElemType x = match x with - | ILType.Value tspec when tspec.Name = tname_SByte -> [| et_I1 |] - | ILType.Value tspec when tspec.Name = tname_Byte -> [| et_U1 |] - | ILType.Value tspec when tspec.Name = tname_Int16 -> [| et_I2 |] - | ILType.Value tspec when tspec.Name = tname_UInt16 -> [| et_U2 |] - | ILType.Value tspec when tspec.Name = tname_Int32 -> [| et_I4 |] - | ILType.Value tspec when tspec.Name = tname_UInt32 -> [| et_U4 |] - | ILType.Value tspec when tspec.Name = tname_Int64 -> [| et_I8 |] - | ILType.Value tspec when tspec.Name = tname_UInt64 -> [| et_U8 |] - | ILType.Value tspec when tspec.Name = tname_Double -> [| et_R8 |] - | ILType.Value tspec when tspec.Name = tname_Single -> [| et_R4 |] - | ILType.Value tspec when tspec.Name = tname_Char -> [| et_CHAR |] - | ILType.Value tspec when tspec.Name = tname_Bool -> [| et_BOOLEAN |] - | ILType.Boxed tspec when tspec.Name = tname_String -> [| et_STRING |] - | ILType.Boxed tspec when tspec.Name = tname_Object -> [| 0x51uy |] - | ILType.Boxed tspec when tspec.Name = tname_Type -> [| 0x50uy |] - | ILType.Value tspec -> Array.append [| 0x55uy |] (encodeCustomAttrString tspec.TypeRef.QualifiedName) + | ILType.Value tspec when tspec.Name = tname_SByte -> [| et_I1 |] + | ILType.Value tspec when tspec.Name = tname_Byte -> [| et_U1 |] + | ILType.Value tspec when tspec.Name = tname_Int16 -> [| et_I2 |] + | ILType.Value tspec when tspec.Name = tname_UInt16 -> [| et_U2 |] + | ILType.Value tspec when tspec.Name = tname_Int32 -> [| et_I4 |] + | ILType.Value tspec when tspec.Name = tname_UInt32 -> [| et_U4 |] + | ILType.Value tspec when tspec.Name = tname_Int64 -> [| et_I8 |] + | ILType.Value tspec when tspec.Name = tname_UInt64 -> [| et_U8 |] + | ILType.Value tspec when tspec.Name = tname_Double -> [| et_R8 |] + | ILType.Value tspec when tspec.Name = tname_Single -> [| et_R4 |] + | ILType.Value tspec when tspec.Name = tname_Char -> [| et_CHAR |] + | ILType.Value tspec when tspec.Name = tname_Bool -> [| et_BOOLEAN |] + | ILType.Boxed tspec when tspec.Name = tname_String -> [| et_STRING |] + | ILType.Boxed tspec when tspec.Name = tname_Object -> [| 0x51uy |] + | ILType.Boxed tspec when tspec.Name = tname_Type -> [| 0x50uy |] + | ILType.Value tspec -> Array.append [| 0x55uy |] (encodeCustomAttrString tspec.TypeRef.QualifiedName) | ILType.Array (shape, elemType) when shape = ILArrayShape.SingleDimensional -> Array.append [| et_SZARRAY |] (encodeCustomAttrElemType elemType) - | _ -> failwith "encodeCustomAttrElemType: unrecognized custom element type" + | _ -> failwith "encodeCustomAttrElemType: unrecognized custom element type" /// Given a custom attribute element, work out the type of the .NET argument for that element. let rec encodeCustomAttrElemTypeForObject x = match x with - | ILAttribElem.String _ -> [| et_STRING |] - | ILAttribElem.Bool _ -> [| et_BOOLEAN |] - | ILAttribElem.Char _ -> [| et_CHAR |] - | ILAttribElem.SByte _ -> [| et_I1 |] - | ILAttribElem.Int16 _ -> [| et_I2 |] - | ILAttribElem.Int32 _ -> [| et_I4 |] - | ILAttribElem.Int64 _ -> [| et_I8 |] - | ILAttribElem.Byte _ -> [| et_U1 |] - | ILAttribElem.UInt16 _ -> [| et_U2 |] - | ILAttribElem.UInt32 _ -> [| et_U4 |] - | ILAttribElem.UInt64 _ -> [| et_U8 |] - | ILAttribElem.Type _ -> [| 0x50uy |] + | ILAttribElem.String _ -> [| et_STRING |] + | ILAttribElem.Bool _ -> [| et_BOOLEAN |] + | ILAttribElem.Char _ -> [| et_CHAR |] + | ILAttribElem.SByte _ -> [| et_I1 |] + | ILAttribElem.Int16 _ -> [| et_I2 |] + | ILAttribElem.Int32 _ -> [| et_I4 |] + | ILAttribElem.Int64 _ -> [| et_I8 |] + | ILAttribElem.Byte _ -> [| et_U1 |] + | ILAttribElem.UInt16 _ -> [| et_U2 |] + | ILAttribElem.UInt32 _ -> [| et_U4 |] + | ILAttribElem.UInt64 _ -> [| et_U8 |] + | ILAttribElem.Type _ -> [| 0x50uy |] | ILAttribElem.TypeRef _ -> [| 0x50uy |] - | ILAttribElem.Null _ -> [| et_STRING |]// yes, the 0xe prefix is used when passing a "null" to a property or argument of type "object" here - | ILAttribElem.Single _ -> [| et_R4 |] - | ILAttribElem.Double _ -> [| et_R8 |] + | ILAttribElem.Null _ -> [| et_STRING |]// yes, the 0xe prefix is used when passing a "null" to a property or argument of type "object" here + | ILAttribElem.Single _ -> [| et_R4 |] + | ILAttribElem.Double _ -> [| et_R8 |] | ILAttribElem.Array (elemTy, _) -> [| yield et_SZARRAY; yield! encodeCustomAttrElemType elemTy |] let rec decodeCustomAttrElemType (ilg: ILGlobals) bytes sigptr x = match x with - | x when x = et_I1 -> ilg.typ_SByte, sigptr + | x when x = et_I1 -> ilg.typ_SByte, sigptr | x when x = et_U1 -> ilg.typ_Byte, sigptr - | x when x = et_I2 -> ilg.typ_Int16, sigptr - | x when x = et_U2 -> ilg.typ_UInt16, sigptr - | x when x = et_I4 -> ilg.typ_Int32, sigptr - | x when x = et_U4 -> ilg.typ_UInt32, sigptr - | x when x = et_I8 -> ilg.typ_Int64, sigptr - | x when x = et_U8 -> ilg.typ_UInt64, sigptr - | x when x = et_R8 -> ilg.typ_Double, sigptr - | x when x = et_R4 -> ilg.typ_Single, sigptr + | x when x = et_I2 -> ilg.typ_Int16, sigptr + | x when x = et_U2 -> ilg.typ_UInt16, sigptr + | x when x = et_I4 -> ilg.typ_Int32, sigptr + | x when x = et_U4 -> ilg.typ_UInt32, sigptr + | x when x = et_I8 -> ilg.typ_Int64, sigptr + | x when x = et_U8 -> ilg.typ_UInt64, sigptr + | x when x = et_R8 -> ilg.typ_Double, sigptr + | x when x = et_R4 -> ilg.typ_Single, sigptr | x when x = et_CHAR -> ilg.typ_Char, sigptr - | x when x = et_BOOLEAN -> ilg.typ_Bool, sigptr - | x when x = et_STRING -> ilg.typ_String, sigptr - | x when x = et_OBJECT -> ilg.typ_Object, sigptr - | x when x = et_SZARRAY -> + | x when x = et_BOOLEAN -> ilg.typ_Bool, sigptr + | x when x = et_STRING -> ilg.typ_String, sigptr + | x when x = et_OBJECT -> ilg.typ_Object, sigptr + | x when x = et_SZARRAY -> let et, sigptr = sigptr_get_u8 bytes sigptr let elemTy, sigptr = decodeCustomAttrElemType ilg bytes sigptr et mkILArr1DTy elemTy, sigptr | x when x = 0x50uy -> ilg.typ_Type, sigptr - | _ -> failwithf "decodeCustomAttrElemType ilg: unrecognized custom element type: %A" x + | _ -> failwithf "decodeCustomAttrElemType ilg: unrecognized custom element type: %A" x /// Given a custom attribute element, encode it to a binary representation according to the rules in Ecma 335 Partition II. @@ -3676,7 +3675,7 @@ let rec encodeCustomAttrPrimValue ilg c = | ILAttribElem.TypeRef None | ILAttribElem.Null -> [| 0xFFuy |] | ILAttribElem.String (Some s) -> encodeCustomAttrString s - | ILAttribElem.Char x -> u16AsBytes (uint16 x) + | ILAttribElem.Char x -> u16AsBytes (uint16 x) | ILAttribElem.SByte x -> i8AsBytes x | ILAttribElem.Int16 x -> i16AsBytes x | ILAttribElem.Int32 x -> i32AsBytes x @@ -3709,7 +3708,7 @@ let encodeCustomAttrNamedArg ilg (nm, ty, prop, elem) = yield! encodeCustomAttrString nm yield! encodeCustomAttrValue ilg ty elem |] -let encodeCustomAttrArgs (ilg: ILGlobals) (mspec:ILMethodSpec) (fixedArgs: list<_>) (namedArgs: list<_>) = +let encodeCustomAttrArgs (ilg: ILGlobals) (mspec: ILMethodSpec) (fixedArgs: list<_>) (namedArgs: list<_>) = let argtys = mspec.MethodRef.ArgTypes [| yield! [| 0x01uy; 0x00uy; |] for (argty, fixedArg) in Seq.zip argtys fixedArgs do @@ -3718,11 +3717,11 @@ let encodeCustomAttrArgs (ilg: ILGlobals) (mspec:ILMethodSpec) (fixedArgs: list< for namedArg in namedArgs do yield! encodeCustomAttrNamedArg ilg namedArg |] -let encodeCustomAttr (ilg: ILGlobals) (mspec:ILMethodSpec, fixedArgs: list<_>, namedArgs: list<_>) = +let encodeCustomAttr (ilg: ILGlobals) (mspec: ILMethodSpec, fixedArgs: list<_>, namedArgs: list<_>) = let args = encodeCustomAttrArgs ilg mspec fixedArgs namedArgs ILAttribute.Encoded (mspec, args, fixedArgs @ (namedArgs |> List.map (fun (_, _, _, e) -> e))) -let mkILCustomAttribMethRef (ilg: ILGlobals) (mspec:ILMethodSpec, fixedArgs: list<_>, namedArgs: list<_>) = +let mkILCustomAttribMethRef (ilg: ILGlobals) (mspec: ILMethodSpec, fixedArgs: list<_>, namedArgs: list<_>) = encodeCustomAttr ilg (mspec, fixedArgs, namedArgs) let mkILCustomAttribute ilg (tref, argtys, argvs, propvs) = @@ -3750,7 +3749,7 @@ let mkPermissionSet (ilg: ILGlobals) (action, attributes: list<(ILTypeRef * (str let bytes = [| yield (byte '.') yield! z_unsigned_int attributes.Length - for (tref:ILTypeRef, props) in attributes do + for (tref: ILTypeRef, props) in attributes do yield! encodeCustomAttrString tref.QualifiedName let bytes = [| yield! z_unsigned_int props.Length @@ -3788,7 +3787,7 @@ type ILTypeSigParser(tstring : string) = s // The format we accept is - // "{`[, +]}{}{}" E.g., + // "{`[, +]}{}{}" E.g., // // System.Collections.Generic.Dictionary // `2[ @@ -3802,7 +3801,7 @@ type ILTypeSigParser(tstring : string) = // Still needs testing with jagged arrays and byref parameters member private x.ParseType() = - // Does the type name start with a leading '['? If so, ignore it + // Does the type name start with a leading '['? If so, ignore it // (if the specialization type is in another module, it will be wrapped in bracket) if here() = '[' then drop() @@ -3867,7 +3866,7 @@ type ILTypeSigParser(tstring : string) = ILScopeRef.Local // strip any extraneous trailing brackets or commas - if (here() = ']') then drop() + if (here() = ']') then drop() if (here() = ',') then drop() // build the IL type @@ -3980,10 +3979,10 @@ let decodeILAttribData (ilg: ILGlobals) (ca: ILAttribute) = parseElems (v ::acc) (n-1) sigptr let elems, sigptr = parseElems [] n sigptr ILAttribElem.Array(elemTy, elems), sigptr - | ILType.Value _ -> (* assume it is an enumeration *) + | ILType.Value _ -> (* assume it is an enumeration *) let n, sigptr = sigptr_get_i32 bytes sigptr ILAttribElem.Int32 n, sigptr - | _ -> failwith "decodeILAttribData: attribute data involves an enum or System.Type value" + | _ -> failwith "decodeILAttribData: attribute data involves an enum or System.Type value" let rec parseFixed argtys sigptr = match argtys with [] -> [], sigptr @@ -4031,7 +4030,7 @@ let decodeILAttribData (ilg: ILGlobals) (ca: ILAttribute) = // -------------------------------------------------------------------- // Functions to collect up all the references in a full module or -// assembly manifest. The process also allocates +// assembly manifest. The process also allocates // a unique name to each unique internal assembly reference. // -------------------------------------------------------------------- @@ -4048,8 +4047,9 @@ let emptyILRefs = ModuleReferences = [] } (* Now find references. *) -let refs_of_assemblyRef (s:ILReferencesAccumulator) x = s.refsA.Add x |> ignore -let refs_of_modref (s:ILReferencesAccumulator) x = s.refsM.Add x |> ignore +let refs_of_assemblyRef (s: ILReferencesAccumulator) x = s.refsA.Add x |> ignore + +let refs_of_modref (s: ILReferencesAccumulator) x = s.refsM.Add x |> ignore let refs_of_scoref s x = match x with @@ -4057,11 +4057,11 @@ let refs_of_scoref s x = | ILScopeRef.Assembly assemblyRef -> refs_of_assemblyRef s assemblyRef | ILScopeRef.Module modref -> refs_of_modref s modref -let refs_of_tref s (x:ILTypeRef) = refs_of_scoref s x.Scope +let refs_of_tref s (x: ILTypeRef) = refs_of_scoref s x.Scope let rec refs_of_typ s x = match x with - | ILType.Void | ILType.TypeVar _ -> () + | ILType.Void | ILType.TypeVar _ -> () | ILType.Modified(_, ty1, ty2) -> refs_of_tref s ty1; refs_of_typ s ty2 | ILType.Array (_, ty) | ILType.Ptr ty | ILType.Byref ty -> refs_of_typ s ty @@ -4069,20 +4069,26 @@ let rec refs_of_typ s x = | ILType.FunctionPointer mref -> refs_of_callsig s mref and refs_of_inst s i = refs_of_tys s i -and refs_of_tspec s (x:ILTypeSpec) = refs_of_tref s x.TypeRef; refs_of_inst s x.GenericArgs -and refs_of_callsig s csig = refs_of_tys s csig.ArgTypes; refs_of_typ s csig.ReturnType + +and refs_of_tspec s (x: ILTypeSpec) = refs_of_tref s x.TypeRef; refs_of_inst s x.GenericArgs + +and refs_of_callsig s csig = refs_of_tys s csig.ArgTypes; refs_of_typ s csig.ReturnType + and refs_of_genparam s x = refs_of_tys s x.Constraints + and refs_of_genparams s b = List.iter (refs_of_genparam s) b and refs_of_dloc s ts = refs_of_tref s ts -and refs_of_mref s (x:ILMethodRef) = +and refs_of_mref s (x: ILMethodRef) = refs_of_dloc s x.DeclaringTypeRef refs_of_tys s x.mrefArgs refs_of_typ s x.mrefReturn and refs_of_fref s x = refs_of_tref s x.DeclaringTypeRef; refs_of_typ s x.Type + and refs_of_ospec s (OverridesSpec(mref, ty)) = refs_of_mref s mref; refs_of_typ s ty + and refs_of_mspec s (x: ILMethodSpec) = refs_of_mref s x.MethodRef refs_of_typ s x.DeclaringType @@ -4103,7 +4109,9 @@ and refs_of_token s x = and refs_of_custom_attr s (cattr: ILAttribute) = refs_of_mspec s cattr.Method and refs_of_custom_attrs s (cas : ILAttributes) = Array.iter (refs_of_custom_attr s) cas.AsArray + and refs_of_varargs s tyso = Option.iter (refs_of_tys s) tyso + and refs_of_instr s x = match x with | I_call (_, mr, varargs) | I_newobj (mr, varargs) | I_callvirt (_, mr, varargs) -> @@ -4114,7 +4122,7 @@ and refs_of_instr s x = refs_of_mspec s mr refs_of_varargs s varargs | I_calli (_, callsig, varargs) -> - refs_of_callsig s callsig; refs_of_varargs s varargs + refs_of_callsig s callsig; refs_of_varargs s varargs | I_jmp mr | I_ldftn mr | I_ldvirtftn mr -> refs_of_mspec s mr | I_ldsfld (_, fr) | I_ldfld (_, _, fr) | I_ldsflda fr | I_ldflda fr | I_stsfld (_, fr) | I_stfld (_, _, fr) -> @@ -4123,7 +4131,7 @@ and refs_of_instr s x = | I_stobj (_, _, ty) | I_box ty |I_unbox ty | I_unbox_any ty | I_sizeof ty | I_ldelem_any (_, ty) | I_ldelema (_, _, _, ty) |I_stelem_any (_, ty) | I_newarr (_, ty) | I_mkrefany ty | I_refanyval ty - | EI_ilzero ty -> refs_of_typ s ty + | EI_ilzero ty -> refs_of_typ s ty | I_ldtoken token -> refs_of_token s token | I_stelem _|I_ldelem _|I_ldstr _|I_switch _|I_stloc _|I_stind _ | I_starg _|I_ldloca _|I_ldloc _|I_ldind _ @@ -4131,13 +4139,13 @@ and refs_of_instr s x = | I_brcmp _|I_rethrow|I_refanytype|I_ldlen|I_throw|I_initblk _ |I_cpblk _ | I_localloc|I_ret |I_endfilter|I_endfinally|I_arglist | I_break - | AI_add | AI_add_ovf | AI_add_ovf_un | AI_and | AI_div | AI_div_un | AI_ceq | AI_cgt | AI_cgt_un | AI_clt - | AI_clt_un | AI_conv _ | AI_conv_ovf _ | AI_conv_ovf_un _ | AI_mul | AI_mul_ovf | AI_mul_ovf_un | AI_rem | AI_rem_un - | AI_shl | AI_shr | AI_shr_un | AI_sub | AI_sub_ovf | AI_sub_ovf_un | AI_xor | AI_or | AI_neg | AI_not - | AI_ldnull | AI_dup | AI_pop | AI_ckfinite | AI_nop | AI_ldc _ - | I_seqpoint _ | EI_ldlen_multi _ -> () + | AI_add | AI_add_ovf | AI_add_ovf_un | AI_and | AI_div | AI_div_un | AI_ceq | AI_cgt | AI_cgt_un | AI_clt + | AI_clt_un | AI_conv _ | AI_conv_ovf _ | AI_conv_ovf_un _ | AI_mul | AI_mul_ovf | AI_mul_ovf_un | AI_rem | AI_rem_un + | AI_shl | AI_shr | AI_shr_un | AI_sub | AI_sub_ovf | AI_sub_ovf_un | AI_xor | AI_or | AI_neg | AI_not + | AI_ldnull | AI_dup | AI_pop | AI_ckfinite | AI_nop | AI_ldc _ + | I_seqpoint _ | EI_ldlen_multi _ -> () -and refs_of_il_code s (c: ILCode) = +and refs_of_il_code s (c: ILCode) = c.Instrs |> Array.iter (refs_of_instr s) c.Exceptions |> List.iter (fun e -> e.Clause |> (function | ILExceptionClause.TypeCatch (ilty, _) -> refs_of_typ s ilty @@ -4158,29 +4166,29 @@ and refs_of_mbody s x = and refs_of_mdef s (md: ILMethodDef) = List.iter (refs_of_param s) md.Parameters refs_of_return s md.Return - refs_of_mbody s md.Body.Contents - refs_of_custom_attrs s md.CustomAttrs - refs_of_genparams s md.GenericParams + refs_of_mbody s md.Body.Contents + refs_of_custom_attrs s md.CustomAttrs + refs_of_genparams s md.GenericParams and refs_of_param s p = refs_of_typ s p.Type -and refs_of_return s (rt:ILReturn) = refs_of_typ s rt.Type +and refs_of_return s (rt: ILReturn) = refs_of_typ s rt.Type -and refs_of_mdefs s x = Seq.iter (refs_of_mdef s) x +and refs_of_mdefs s x = Seq.iter (refs_of_mdef s) x and refs_of_event_def s (ed: ILEventDef) = - Option.iter (refs_of_typ s) ed.EventType + Option.iter (refs_of_typ s) ed.EventType refs_of_mref s ed.AddMethod refs_of_mref s ed.RemoveMethod Option.iter (refs_of_mref s) ed.FireMethod List.iter (refs_of_mref s) ed.OtherMethods refs_of_custom_attrs s ed.CustomAttrs -and refs_of_events s (x: ILEventDefs) = List.iter (refs_of_event_def s) x.AsList +and refs_of_events s (x: ILEventDefs) = List.iter (refs_of_event_def s) x.AsList and refs_of_property_def s (pd: ILPropertyDef) = - Option.iter (refs_of_mref s) pd.SetMethod - Option.iter (refs_of_mref s) pd.GetMethod + Option.iter (refs_of_mref s) pd.SetMethod + Option.iter (refs_of_mref s) pd.GetMethod refs_of_typ s pd.PropertyType refs_of_tys s pd.Args refs_of_custom_attrs s pd.CustomAttrs @@ -4188,35 +4196,35 @@ and refs_of_property_def s (pd: ILPropertyDef) = and refs_of_properties s (x: ILPropertyDefs) = List.iter (refs_of_property_def s) x.AsList and refs_of_fdef s (fd: ILFieldDef) = - refs_of_typ s fd.FieldType - refs_of_custom_attrs s fd.CustomAttrs + refs_of_typ s fd.FieldType + refs_of_custom_attrs s fd.CustomAttrs and refs_of_fields s fields = List.iter (refs_of_fdef s) fields -and refs_of_method_impls s mimpls = List.iter (refs_of_method_impl s) mimpls +and refs_of_method_impls s mimpls = List.iter (refs_of_method_impl s) mimpls and refs_of_method_impl s m = refs_of_ospec s m.Overrides refs_of_mspec s m.OverrideBy -and refs_of_tdef_kind _s _k = () +and refs_of_tdef_kind _s _k = () -and refs_of_tdef s (td : ILTypeDef) = +and refs_of_tdef s (td : ILTypeDef) = refs_of_types s td.NestedTypes - refs_of_genparams s td.GenericParams - refs_of_tys s td.Implements + refs_of_genparams s td.GenericParams + refs_of_tys s td.Implements Option.iter (refs_of_typ s) td.Extends - refs_of_mdefs s td.Methods - refs_of_fields s td.Fields.AsList + refs_of_mdefs s td.Methods + refs_of_fields s td.Fields.AsList refs_of_method_impls s td.MethodImpls.AsList - refs_of_events s td.Events - refs_of_tdef_kind s td + refs_of_events s td.Events + refs_of_tdef_kind s td refs_of_custom_attrs s td.CustomAttrs - refs_of_properties s td.Properties + refs_of_properties s td.Properties and refs_of_string _s _ = () -and refs_of_types s (types: ILTypeDefs) = Seq.iter (refs_of_tdef s) types +and refs_of_types s (types: ILTypeDefs) = Seq.iter (refs_of_tdef s) types and refs_of_exported_type s (c: ILExportedTypeOrForwarder) = refs_of_custom_attrs s c.CustomAttrs @@ -4252,7 +4260,7 @@ let computeILRefs modul = refs_of_modul s modul { AssemblyReferences = Seq.fold (fun acc x -> x::acc) [] s.refsA - ModuleReferences = Seq.fold (fun acc x -> x::acc) [] s.refsM } + ModuleReferences = Seq.fold (fun acc x -> x::acc) [] s.refsM } let tspan = System.TimeSpan(System.DateTime.UtcNow.Ticks - System.DateTime(2000, 1, 1).Ticks) @@ -4305,7 +4313,7 @@ let compareILVersions (a1, a2, a3, a4) ((b1, b2, b3, b4) : ILVersionInfo) = let unscopeILTypeRef (x: ILTypeRef) = ILTypeRef.Create(ILScopeRef.Local, x.Enclosing, x.Name) -let rec unscopeILTypeSpec (tspec:ILTypeSpec) = +let rec unscopeILTypeSpec (tspec: ILTypeSpec) = let tref = tspec.TypeRef let tinst = tspec.GenericArgs let tref = unscopeILTypeRef tref @@ -4329,7 +4337,7 @@ and unscopeILTypes i = and unscopeILCallSig csig = mkILCallSig (csig.CallingConv, unscopeILTypes csig.ArgTypes, unscopeILType csig.ReturnType) -let resolveILMethodRefWithRescope r (td: ILTypeDef) (mref:ILMethodRef) = +let resolveILMethodRefWithRescope r (td: ILTypeDef) (mref: ILMethodRef) = let args = mref.ArgTypes let nargs = args.Length let nm = mref.Name @@ -4340,12 +4348,12 @@ let resolveILMethodRefWithRescope r (td: ILTypeDef) (mref:ILMethodRef) = match possibles |> List.filter (fun md -> mref.CallingConv = md.CallingConv && - // REVIEW: this uses equality on ILType. For CMOD_OPTIONAL this is not going to be correct - (md.Parameters, argTypes) ||> List.lengthsEqAndForall2 (fun p1 p2 -> r p1.Type = p2) && - // REVIEW: this uses equality on ILType. For CMOD_OPTIONAL this is not going to be correct - r md.Return.Type = retType) with + // REVIEW: this uses equality on ILType. For CMOD_OPTIONAL this is not going to be correct + (md.Parameters, argTypes) ||> List.lengthsEqAndForall2 (fun p1 p2 -> r p1.Type = p2) && + // REVIEW: this uses equality on ILType. For CMOD_OPTIONAL this is not going to be correct + r md.Return.Type = retType) with | [] -> failwith ("no method named "+nm+" with appropriate argument types found in type "+td.Name) - | [mdef] -> mdef + | [mdef] -> mdef | _ -> failwith ("multiple methods named "+nm+" appear with identical argument types in type "+td.Name) let resolveILMethodRef td mref = resolveILMethodRefWithRescope id td mref diff --git a/src/fcs-fable/src/absil/ilascii.fs b/src/fcs-fable/src/absil/ilascii.fs index 41196df57a..cf8cef0a63 100755 --- a/src/fcs-fable/src/absil/ilascii.fs +++ b/src/fcs-fable/src/absil/ilascii.fs @@ -1,172 +1,155 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -module internal FSharp.Compiler.AbstractIL.Internal.AsciiConstants +module internal FSharp.Compiler.AbstractIL.Internal.AsciiConstants -open Internal.Utilities open Internal.Utilities.Collections -open FSharp.Compiler.AbstractIL -open FSharp.Compiler.AbstractIL.Internal -open FSharp.Compiler.AbstractIL.Internal.Library -open FSharp.Compiler.AbstractIL.Extensions.ILX.Types -open FSharp.Compiler.AbstractIL.IL +open FSharp.Compiler.AbstractIL.Internal.Library +open FSharp.Compiler.AbstractIL.IL // set to the proper value at CompileOps.fs (BuildFrameworkTcImports) +// Only reelvant when compiling FSharp.Core.dll let parseILGlobals = ref EcmaMscorlibILGlobals -// -------------------------------------------------------------------- -// Table of parsing and pretty printing data for instructions. -// - PP data is only used for instructions with no arguments -// -------------------------------------------------------------------- - -let noArgInstrs = - lazy [ - ["ldc";"i4";"0"], mkLdcInt32 0; - ["ldc";"i4";"1"], mkLdcInt32 1; - ["ldc";"i4";"2"], mkLdcInt32 2; - ["ldc";"i4";"3"], mkLdcInt32 3; - ["ldc";"i4";"4"], mkLdcInt32 4; - ["ldc";"i4";"5"], mkLdcInt32 5; - ["ldc";"i4";"6"], mkLdcInt32 6; - ["ldc";"i4";"7"], mkLdcInt32 7; - ["ldc";"i4";"8"], mkLdcInt32 8; - ["ldc";"i4";"M1"], mkLdcInt32 -1; - ["ldc";"i4";"m1"], mkLdcInt32 -1; - ["stloc";"0"], mkStloc (uint16 0); - ["stloc";"1"], mkStloc (uint16 1); - ["stloc";"2"], mkStloc (uint16 2); - ["stloc";"3"], mkStloc (uint16 3); - ["ldloc";"0"], mkLdloc (uint16 0); - ["ldloc";"1"], mkLdloc (uint16 1); - ["ldloc";"2"], mkLdloc (uint16 2); - ["ldloc";"3"], mkLdloc (uint16 3); - ["ldarg";"0"], (mkLdarg (uint16 ( 0))); - ["ldarg";"1"], (mkLdarg (uint16 ( 1))); - ["ldarg";"2"], (mkLdarg (uint16 ( 2))); - ["ldarg";"3"], (mkLdarg (uint16 ( 3))); - ["ret"], I_ret; - ["add"], AI_add; - ["add";"ovf"], AI_add_ovf; - ["add";"ovf";"un"], AI_add_ovf_un; - ["and"], AI_and; - ["div"], AI_div; - ["div";"un"], AI_div_un; - ["ceq"], AI_ceq; - ["cgt"], AI_cgt; - ["cgt";"un"], AI_cgt_un; - ["clt"], AI_clt; - ["clt";"un"], AI_clt_un; - ["conv";"i1"], AI_conv DT_I1; - ["conv";"i2"], AI_conv DT_I2; - ["conv";"i4"], AI_conv DT_I4; - ["conv";"i8"], AI_conv DT_I8; - ["conv";"i"], AI_conv DT_I; - ["conv";"r4"], AI_conv DT_R4; - ["conv";"r8"], AI_conv DT_R8; - ["conv";"u1"], AI_conv DT_U1; - ["conv";"u2"], AI_conv DT_U2; - ["conv";"u4"], AI_conv DT_U4; - ["conv";"u8"], AI_conv DT_U8; - ["conv";"u"], AI_conv DT_U; - ["conv";"r"; "un"], AI_conv DT_R; - ["conv";"ovf";"i1"], AI_conv_ovf DT_I1; - ["conv";"ovf";"i2"], AI_conv_ovf DT_I2; - ["conv";"ovf";"i4"], AI_conv_ovf DT_I4; - ["conv";"ovf";"i8"], AI_conv_ovf DT_I8; - ["conv";"ovf";"i"], AI_conv_ovf DT_I; - ["conv";"ovf";"u1"], AI_conv_ovf DT_U1; - ["conv";"ovf";"u2"], AI_conv_ovf DT_U2; - ["conv";"ovf";"u4"], AI_conv_ovf DT_U4; - ["conv";"ovf";"u8"], AI_conv_ovf DT_U8; - ["conv";"ovf";"u"], AI_conv_ovf DT_U; - ["conv";"ovf";"i1"; "un"], AI_conv_ovf_un DT_I1; - ["conv";"ovf";"i2"; "un"], AI_conv_ovf_un DT_I2; - ["conv";"ovf";"i4"; "un"], AI_conv_ovf_un DT_I4; - ["conv";"ovf";"i8"; "un"], AI_conv_ovf_un DT_I8; - ["conv";"ovf";"i"; "un"], AI_conv_ovf_un DT_I; - ["conv";"ovf";"u1"; "un"], AI_conv_ovf_un DT_U1; - ["conv";"ovf";"u2"; "un"], AI_conv_ovf_un DT_U2; - ["conv";"ovf";"u4"; "un"], AI_conv_ovf_un DT_U4; - ["conv";"ovf";"u8"; "un"], AI_conv_ovf_un DT_U8; - ["conv";"ovf";"u"; "un"], AI_conv_ovf_un DT_U; - ["stelem";"i1"], I_stelem DT_I1; - ["stelem";"i2"], I_stelem DT_I2; - ["stelem";"i4"], I_stelem DT_I4; - ["stelem";"i8"], I_stelem DT_I8; - ["stelem";"r4"], I_stelem DT_R4; - ["stelem";"r8"], I_stelem DT_R8; - ["stelem";"i"], I_stelem DT_I; - ["stelem";"u"], I_stelem DT_I; - ["stelem";"u8"], I_stelem DT_I8; - ["stelem";"ref"], I_stelem DT_REF; - ["ldelem";"i1"], I_ldelem DT_I1; - ["ldelem";"i2"], I_ldelem DT_I2; - ["ldelem";"i4"], I_ldelem DT_I4; - ["ldelem";"i8"], I_ldelem DT_I8; - ["ldelem";"u8"], I_ldelem DT_I8; - ["ldelem";"u1"], I_ldelem DT_U1; - ["ldelem";"u2"], I_ldelem DT_U2; - ["ldelem";"u4"], I_ldelem DT_U4; - ["ldelem";"r4"], I_ldelem DT_R4; - ["ldelem";"r8"], I_ldelem DT_R8; - ["ldelem";"u"], I_ldelem DT_I; // EQUIV - ["ldelem";"i"], I_ldelem DT_I; - ["ldelem";"ref"], I_ldelem DT_REF; - ["mul"], AI_mul ; - ["mul";"ovf"], AI_mul_ovf; - ["mul";"ovf";"un"], AI_mul_ovf_un; - ["rem"], AI_rem ; - ["rem";"un"], AI_rem_un ; - ["shl"], AI_shl ; - ["shr"], AI_shr ; - ["shr";"un"], AI_shr_un; - ["sub"], AI_sub ; - ["sub";"ovf"], AI_sub_ovf; - ["sub";"ovf";"un"], AI_sub_ovf_un; - ["xor"], AI_xor; - ["or"], AI_or; - ["neg"], AI_neg; - ["not"], AI_not; - ["ldnull"], AI_ldnull; - ["dup"], AI_dup; - ["pop"], AI_pop; - ["ckfinite"], AI_ckfinite; - ["nop"], AI_nop; - ["break"], I_break; - ["arglist"], I_arglist; - ["endfilter"], I_endfilter; - ["endfinally"], I_endfinally; - ["refanytype"], I_refanytype; - ["localloc"], I_localloc; - ["throw"], I_throw; - ["ldlen"], I_ldlen; - ["rethrow"], I_rethrow; - ];; - +/// Table of parsing and pretty printing data for instructions. +let noArgInstrs = + lazy [ + ["ldc";"i4";"0"], mkLdcInt32 0 + ["ldc";"i4";"1"], mkLdcInt32 1 + ["ldc";"i4";"2"], mkLdcInt32 2 + ["ldc";"i4";"3"], mkLdcInt32 3 + ["ldc";"i4";"4"], mkLdcInt32 4 + ["ldc";"i4";"5"], mkLdcInt32 5 + ["ldc";"i4";"6"], mkLdcInt32 6 + ["ldc";"i4";"7"], mkLdcInt32 7 + ["ldc";"i4";"8"], mkLdcInt32 8 + ["ldc";"i4";"M1"], mkLdcInt32 -1 + ["ldc";"i4";"m1"], mkLdcInt32 -1 + ["stloc";"0"], mkStloc (uint16 0) + ["stloc";"1"], mkStloc (uint16 1) + ["stloc";"2"], mkStloc (uint16 2) + ["stloc";"3"], mkStloc (uint16 3) + ["ldloc";"0"], mkLdloc (uint16 0) + ["ldloc";"1"], mkLdloc (uint16 1) + ["ldloc";"2"], mkLdloc (uint16 2) + ["ldloc";"3"], mkLdloc (uint16 3) + ["ldarg";"0"], mkLdarg (uint16 0) + ["ldarg";"1"], mkLdarg (uint16 1) + ["ldarg";"2"], mkLdarg (uint16 2) + ["ldarg";"3"], mkLdarg (uint16 3) + ["ret"], I_ret + ["add"], AI_add + ["add";"ovf"], AI_add_ovf + ["add";"ovf";"un"], AI_add_ovf_un + ["and"], AI_and + ["div"], AI_div + ["div";"un"], AI_div_un + ["ceq"], AI_ceq + ["cgt"], AI_cgt + ["cgt";"un"], AI_cgt_un + ["clt"], AI_clt + ["clt";"un"], AI_clt_un + ["conv";"i1"], AI_conv DT_I1 + ["conv";"i2"], AI_conv DT_I2 + ["conv";"i4"], AI_conv DT_I4 + ["conv";"i8"], AI_conv DT_I8 + ["conv";"i"], AI_conv DT_I + ["conv";"r4"], AI_conv DT_R4 + ["conv";"r8"], AI_conv DT_R8 + ["conv";"u1"], AI_conv DT_U1 + ["conv";"u2"], AI_conv DT_U2 + ["conv";"u4"], AI_conv DT_U4 + ["conv";"u8"], AI_conv DT_U8 + ["conv";"u"], AI_conv DT_U + ["conv";"r"; "un"], AI_conv DT_R + ["conv";"ovf";"i1"], AI_conv_ovf DT_I1 + ["conv";"ovf";"i2"], AI_conv_ovf DT_I2 + ["conv";"ovf";"i4"], AI_conv_ovf DT_I4 + ["conv";"ovf";"i8"], AI_conv_ovf DT_I8 + ["conv";"ovf";"i"], AI_conv_ovf DT_I + ["conv";"ovf";"u1"], AI_conv_ovf DT_U1 + ["conv";"ovf";"u2"], AI_conv_ovf DT_U2 + ["conv";"ovf";"u4"], AI_conv_ovf DT_U4 + ["conv";"ovf";"u8"], AI_conv_ovf DT_U8 + ["conv";"ovf";"u"], AI_conv_ovf DT_U + ["conv";"ovf";"i1"; "un"], AI_conv_ovf_un DT_I1 + ["conv";"ovf";"i2"; "un"], AI_conv_ovf_un DT_I2 + ["conv";"ovf";"i4"; "un"], AI_conv_ovf_un DT_I4 + ["conv";"ovf";"i8"; "un"], AI_conv_ovf_un DT_I8 + ["conv";"ovf";"i"; "un"], AI_conv_ovf_un DT_I + ["conv";"ovf";"u1"; "un"], AI_conv_ovf_un DT_U1 + ["conv";"ovf";"u2"; "un"], AI_conv_ovf_un DT_U2 + ["conv";"ovf";"u4"; "un"], AI_conv_ovf_un DT_U4 + ["conv";"ovf";"u8"; "un"], AI_conv_ovf_un DT_U8 + ["conv";"ovf";"u"; "un"], AI_conv_ovf_un DT_U + ["stelem";"i1"], I_stelem DT_I1 + ["stelem";"i2"], I_stelem DT_I2 + ["stelem";"i4"], I_stelem DT_I4 + ["stelem";"i8"], I_stelem DT_I8 + ["stelem";"r4"], I_stelem DT_R4 + ["stelem";"r8"], I_stelem DT_R8 + ["stelem";"i"], I_stelem DT_I + ["stelem";"u"], I_stelem DT_I + ["stelem";"u8"], I_stelem DT_I8 + ["stelem";"ref"], I_stelem DT_REF + ["ldelem";"i1"], I_ldelem DT_I1 + ["ldelem";"i2"], I_ldelem DT_I2 + ["ldelem";"i4"], I_ldelem DT_I4 + ["ldelem";"i8"], I_ldelem DT_I8 + ["ldelem";"u8"], I_ldelem DT_I8 + ["ldelem";"u1"], I_ldelem DT_U1 + ["ldelem";"u2"], I_ldelem DT_U2 + ["ldelem";"u4"], I_ldelem DT_U4 + ["ldelem";"r4"], I_ldelem DT_R4 + ["ldelem";"r8"], I_ldelem DT_R8 + ["ldelem";"u"], I_ldelem DT_I // EQUIV + ["ldelem";"i"], I_ldelem DT_I + ["ldelem";"ref"], I_ldelem DT_REF + ["mul"], AI_mul + ["mul";"ovf"], AI_mul_ovf + ["mul";"ovf";"un"], AI_mul_ovf_un + ["rem"], AI_rem + ["rem";"un"], AI_rem_un + ["shl"], AI_shl + ["shr"], AI_shr + ["shr";"un"], AI_shr_un + ["sub"], AI_sub + ["sub";"ovf"], AI_sub_ovf + ["sub";"ovf";"un"], AI_sub_ovf_un + ["xor"], AI_xor + ["or"], AI_or + ["neg"], AI_neg + ["not"], AI_not + ["ldnull"], AI_ldnull + ["dup"], AI_dup + ["pop"], AI_pop + ["ckfinite"], AI_ckfinite + ["nop"], AI_nop + ["break"], I_break + ["arglist"], I_arglist + ["endfilter"], I_endfilter + ["endfinally"], I_endfinally + ["refanytype"], I_refanytype + ["localloc"], I_localloc + ["throw"], I_throw + ["ldlen"], I_ldlen + ["rethrow"], I_rethrow + ] #if DEBUG -let wordsOfNoArgInstr, isNoArgInstr = - let t = - lazy +let wordsOfNoArgInstr, isNoArgInstr = + let t = + lazy (let t = HashMultiMap(300, HashIdentity.Structural) - noArgInstrs |> Lazy.force |> List.iter (fun (x, mk) -> t.Add(mk, x)) ; - t) - (fun s -> (Lazy.force t).[s]), + noArgInstrs |> Lazy.force |> List.iter (fun (x, mk) -> t.Add(mk, x)) + t) + (fun s -> (Lazy.force t).[s]), (fun s -> (Lazy.force t).ContainsKey s) #endif -// -------------------------------------------------------------------- -// Instructions are preceded by prefixes, e.g. ".tail" etc. -// -------------------------------------------------------------------- - let mk_stind (nm, dt) = (nm, (fun () -> I_stind(Aligned, Nonvolatile, dt))) let mk_ldind (nm, dt) = (nm, (fun () -> I_ldind(Aligned, Nonvolatile, dt))) -// -------------------------------------------------------------------- -// Parsing only... Tables of different types of instructions. -// First the different kinds of instructions. -// -------------------------------------------------------------------- - type NoArgInstr = (unit -> ILInstr) type Int32Instr = (int32 -> ILInstr) type Int32Int32Instr = (int32 * int32 -> ILInstr) @@ -180,96 +163,119 @@ type StringInstr = (string -> ILInstr) type TokenInstr = (ILToken -> ILInstr) type SwitchInstr = (ILCodeLabel list * ILCodeLabel -> ILInstr) -// -------------------------------------------------------------------- -// Now the generic code to make a table of instructions -// -------------------------------------------------------------------- - type InstrTable<'T> = (string list * 'T) list type LazyInstrTable<'T> = Lazy> -// -------------------------------------------------------------------- -// Now the tables of instructions -// -------------------------------------------------------------------- - -let NoArgInstrs = - lazy (((noArgInstrs |> Lazy.force |> List.map (fun (nm, i) -> (nm, (fun () -> i)))) @ - [ (mk_stind (["stind";"u"], DT_I)); - (mk_stind (["stind";"i"], DT_I)); - (mk_stind (["stind";"u1"], DT_I1));(* ILX EQUIVALENT *) - (mk_stind (["stind";"i1"], DT_I1)); - (mk_stind (["stind";"u2"], DT_I2)); - (mk_stind (["stind";"i2"], DT_I2)); - (mk_stind (["stind";"u4"], DT_I4)); (* ILX EQUIVALENT *) - (mk_stind (["stind";"i4"], DT_I4)); - (mk_stind (["stind";"u8"], DT_I8)); (* ILX EQUIVALENT *) - (mk_stind (["stind";"i8"], DT_I8)); - (mk_stind (["stind";"r4"], DT_R4)); - (mk_stind (["stind";"r8"], DT_R8)); - (mk_stind (["stind";"ref"], DT_REF)); - (mk_ldind (["ldind";"i"], DT_I)); - (mk_ldind (["ldind";"i1"], DT_I1)); - (mk_ldind (["ldind";"i2"], DT_I2)); - (mk_ldind (["ldind";"i4"], DT_I4)); - (mk_ldind (["ldind";"i8"], DT_I8)); - (mk_ldind (["ldind";"u1"], DT_U1)); - (mk_ldind (["ldind";"u2"], DT_U2)); - (mk_ldind (["ldind";"u4"], DT_U4)); - (mk_ldind (["ldind";"u8"], DT_I8)); - (mk_ldind (["ldind";"r4"], DT_R4)); - (mk_ldind (["ldind";"r8"], DT_R8)); - (mk_ldind (["ldind";"ref"], DT_REF)); - (["cpblk"], (fun () -> I_cpblk(Aligned, Nonvolatile))); - (["initblk"], (fun () -> I_initblk(Aligned, Nonvolatile))); - ] - ) : NoArgInstr InstrTable);; - -let Int64Instrs = - lazy ([ (["ldc";"i8"], (fun x ->(AI_ldc (DT_I8, ILConst.I8 x)))); ] : Int64Instr InstrTable) +/// Table of parsing and pretty printing data for instructions. +let NoArgInstrs : Lazy> = + lazy [ + for (nm, i) in noArgInstrs.Force() do + yield (nm, (fun () -> i)) + yield mk_stind (["stind";"u"], DT_I) + yield mk_stind (["stind";"i"], DT_I) + yield mk_stind (["stind";"u1"], DT_I1) + yield mk_stind (["stind";"i1"], DT_I1) + yield mk_stind (["stind";"u2"], DT_I2) + yield mk_stind (["stind";"i2"], DT_I2) + yield mk_stind (["stind";"u4"], DT_I4) + yield mk_stind (["stind";"i4"], DT_I4) + yield mk_stind (["stind";"u8"], DT_I8) + yield mk_stind (["stind";"i8"], DT_I8) + yield mk_stind (["stind";"r4"], DT_R4) + yield mk_stind (["stind";"r8"], DT_R8) + yield mk_stind (["stind";"ref"], DT_REF) + yield mk_ldind (["ldind";"i"], DT_I) + yield mk_ldind (["ldind";"i1"], DT_I1) + yield mk_ldind (["ldind";"i2"], DT_I2) + yield mk_ldind (["ldind";"i4"], DT_I4) + yield mk_ldind (["ldind";"i8"], DT_I8) + yield mk_ldind (["ldind";"u1"], DT_U1) + yield mk_ldind (["ldind";"u2"], DT_U2) + yield mk_ldind (["ldind";"u4"], DT_U4) + yield mk_ldind (["ldind";"u8"], DT_I8) + yield mk_ldind (["ldind";"r4"], DT_R4) + yield mk_ldind (["ldind";"r8"], DT_R8) + yield mk_ldind (["ldind";"ref"], DT_REF) + yield ["cpblk"], (fun () -> I_cpblk(Aligned, Nonvolatile)) + yield ["initblk"], (fun () -> I_initblk(Aligned, Nonvolatile)) + ] -let Int32Instrs = - lazy ([ (["ldc";"i4"], (fun x -> ((mkLdcInt32 x)))); - (["ldc";"i4";"s"], (fun x -> ((mkLdcInt32 x)))); ] : Int32Instr InstrTable) +/// Table of parsing and pretty printing data for instructions. +let Int64Instrs : Lazy> = + lazy [ + ["ldc";"i8"], (fun x -> AI_ldc (DT_I8, ILConst.I8 x)) + ] -let Int32Int32Instrs = - lazy ([ (["ldlen";"multi"], (fun (x, y) -> EI_ldlen_multi (x, y))); ] : Int32Int32Instr InstrTable) +/// Table of parsing and pretty printing data for instructions. +let Int32Instrs : Lazy> = + lazy [ + ["ldc";"i4"], mkLdcInt32 + ["ldc";"i4";"s"], mkLdcInt32 + ] -let DoubleInstrs = - lazy ([ (["ldc";"r4"], (fun x -> (AI_ldc (DT_R4, x)))); - (["ldc";"r8"], (fun x -> (AI_ldc (DT_R8, x)))); ] : DoubleInstr InstrTable) +/// Table of parsing and pretty printing data for instructions. +let Int32Int32Instrs : Lazy> = + lazy [ + ["ldlen";"multi"], EI_ldlen_multi + ] -let MethodSpecInstrs = - lazy ([ ( (["call"], (fun (mspec, y) -> I_call (Normalcall, mspec, y)))) ] : InstrTable) +/// Table of parsing and pretty printing data for instructions. +let DoubleInstrs : Lazy> = + lazy [ + ["ldc";"r4"], (fun x -> (AI_ldc (DT_R4, x))) + ["ldc";"r8"], (fun x -> (AI_ldc (DT_R8, x))) + ] -let StringInstrs = - lazy ([ (["ldstr"], (fun x -> I_ldstr x)); ] : InstrTable) +/// Table of parsing and pretty printing data for instructions. +let MethodSpecInstrs : Lazy> = + lazy [ + ["call"], (fun (mspec, y) -> I_call (Normalcall, mspec, y)) + ] -let TokenInstrs = - lazy ([ (["ldtoken"], (fun x -> I_ldtoken x)); ] : InstrTable) +/// Table of parsing and pretty printing data for instructions. +let StringInstrs : Lazy> = + lazy [ + ["ldstr"], I_ldstr + ] +/// Table of parsing and pretty printing data for instructions. +let TokenInstrs : Lazy> = + lazy [ + ["ldtoken"], I_ldtoken + ] -let TypeInstrs = - lazy ([ (["ldelema"], (fun x -> I_ldelema (NormalAddress, false, ILArrayShape.SingleDimensional, x))); - (["ldelem";"any"], (fun x -> I_ldelem_any (ILArrayShape.SingleDimensional, x))); - (["stelem";"any"], (fun x -> I_stelem_any (ILArrayShape.SingleDimensional, x))); - (["newarr"], (fun x -> I_newarr (ILArrayShape.SingleDimensional, x))); - (["castclass"], (fun x -> I_castclass x)); - (["ilzero"], (fun x -> EI_ilzero x)); - (["isinst"], (fun x -> I_isinst x)); - (["initobj";"any"], (fun x -> I_initobj x)); - (["unbox";"any"], (fun x -> I_unbox_any x)); ] : InstrTable) +/// Table of parsing and pretty printing data for instructions. +let TypeInstrs : Lazy> = + lazy [ + ["ldelema"], (fun x -> I_ldelema (NormalAddress, false, ILArrayShape.SingleDimensional, x)) + ["ldelem";"any"], (fun x -> I_ldelem_any (ILArrayShape.SingleDimensional, x)) + ["stelem";"any"], (fun x -> I_stelem_any (ILArrayShape.SingleDimensional, x)) + ["newarr"], (fun x -> I_newarr (ILArrayShape.SingleDimensional, x)) + ["castclass"], I_castclass + ["ilzero"], EI_ilzero + ["isinst"], I_isinst + ["initobj";"any"], I_initobj + ["unbox";"any"], I_unbox_any + ] -let IntTypeInstrs = - lazy ([ (["ldelem";"multi"], (fun (x, y) -> (I_ldelem_any (ILArrayShape.FromRank x, y)))); - (["stelem";"multi"], (fun (x, y) -> (I_stelem_any (ILArrayShape.FromRank x, y)))); - (["newarr";"multi"], (fun (x, y) -> (I_newarr (ILArrayShape.FromRank x, y)))); - (["ldelema";"multi"], (fun (x, y) -> (I_ldelema (NormalAddress, false, ILArrayShape.FromRank x, y)))); ] : InstrTable) +/// Table of parsing and pretty printing data for instructions. +let IntTypeInstrs : Lazy> = + lazy [ + ["ldelem";"multi"], (fun (x, y) -> (I_ldelem_any (ILArrayShape.FromRank x, y))) + ["stelem";"multi"], (fun (x, y) -> (I_stelem_any (ILArrayShape.FromRank x, y))) + ["newarr";"multi"], (fun (x, y) -> (I_newarr (ILArrayShape.FromRank x, y))) + ["ldelema";"multi"], (fun (x, y) -> (I_ldelema (NormalAddress, false, ILArrayShape.FromRank x, y))) + ] -let ValueTypeInstrs = - lazy ([ (["cpobj"], (fun x -> I_cpobj x)); - (["initobj"], (fun x -> I_initobj x)); - (["ldobj"], (fun z -> I_ldobj (Aligned, Nonvolatile, z))); - (["stobj"], (fun z -> I_stobj (Aligned, Nonvolatile, z))); - (["sizeof"], (fun x -> I_sizeof x)); - (["box"], (fun x -> I_box x)); - (["unbox"], (fun x -> I_unbox x)); ] : InstrTable) +/// Table of parsing and pretty printing data for instructions. +let ValueTypeInstrs : Lazy> = + lazy [ + ["cpobj"], I_cpobj + ["initobj"], I_initobj + ["ldobj"], (fun z -> I_ldobj (Aligned, Nonvolatile, z)) + ["stobj"], (fun z -> I_stobj (Aligned, Nonvolatile, z)) + ["sizeof"], I_sizeof + ["box"], I_box + ["unbox"], I_unbox + ] diff --git a/src/fcs-fable/src/absil/ilbinary.fs b/src/fcs-fable/src/absil/ilbinary.fs index 41297d117e..2b22b4cbab 100755 --- a/src/fcs-fable/src/absil/ilbinary.fs +++ b/src/fcs-fable/src/absil/ilbinary.fs @@ -508,155 +508,155 @@ let i_leave = 0xdd let i_leave_s = 0xde let i_stind_i = 0xdf let i_conv_u = 0xe0 -let i_arglist = 0xfe00 -let i_ceq = 0xfe01 -let i_cgt = 0xfe02 +let i_arglist = 0xfe00 +let i_ceq = 0xfe01 +let i_cgt = 0xfe02 let i_cgt_un = 0xfe03 -let i_clt = 0xfe04 +let i_clt = 0xfe04 let i_clt_un = 0xfe05 -let i_ldftn = 0xfe06 -let i_ldvirtftn = 0xfe07 -let i_ldarg = 0xfe09 -let i_ldarga = 0xfe0a -let i_starg = 0xfe0b -let i_ldloc = 0xfe0c -let i_ldloca = 0xfe0d -let i_stloc = 0xfe0e -let i_localloc = 0xfe0f -let i_endfilter = 0xfe11 -let i_unaligned = 0xfe12 -let i_volatile = 0xfe13 -let i_constrained = 0xfe16 -let i_readonly = 0xfe1e -let i_tail = 0xfe14 -let i_initobj = 0xfe15 -let i_cpblk = 0xfe17 -let i_initblk = 0xfe18 -let i_rethrow = 0xfe1a -let i_sizeof = 0xfe1c -let i_refanytype = 0xfe1d - -let i_ldelem_any = 0xa3 -let i_stelem_any = 0xa4 -let i_unbox_any = 0xa5 +let i_ldftn = 0xfe06 +let i_ldvirtftn = 0xfe07 +let i_ldarg = 0xfe09 +let i_ldarga = 0xfe0a +let i_starg = 0xfe0b +let i_ldloc = 0xfe0c +let i_ldloca = 0xfe0d +let i_stloc = 0xfe0e +let i_localloc = 0xfe0f +let i_endfilter = 0xfe11 +let i_unaligned = 0xfe12 +let i_volatile = 0xfe13 +let i_constrained = 0xfe16 +let i_readonly = 0xfe1e +let i_tail = 0xfe14 +let i_initobj = 0xfe15 +let i_cpblk = 0xfe17 +let i_initblk = 0xfe18 +let i_rethrow = 0xfe1a +let i_sizeof = 0xfe1c +let i_refanytype = 0xfe1d +let i_ldelem_any = 0xa3 +let i_stelem_any = 0xa4 +let i_unbox_any = 0xa5 let mk_ldc i = mkLdcInt32 i + let noArgInstrs = - lazy [ i_ldc_i4_0, mk_ldc 0 - i_ldc_i4_1, mk_ldc 1 - i_ldc_i4_2, mk_ldc 2 - i_ldc_i4_3, mk_ldc 3 - i_ldc_i4_4, mk_ldc 4 - i_ldc_i4_5, mk_ldc 5 - i_ldc_i4_6, mk_ldc 6 - i_ldc_i4_7, mk_ldc 7 - i_ldc_i4_8, mk_ldc 8 - i_ldc_i4_m1, mk_ldc -1 - 0x0a, mkStloc 0us - 0x0b, mkStloc 1us - 0x0c, mkStloc 2us - 0x0d, mkStloc 3us - 0x06, mkLdloc 0us - 0x07, mkLdloc 1us - 0x08, mkLdloc 2us - 0x09, mkLdloc 3us - 0x02, mkLdarg 0us - 0x03, mkLdarg 1us - 0x04, mkLdarg 2us - 0x05, mkLdarg 3us - 0x2a, I_ret - 0x58, AI_add - 0xd6, AI_add_ovf - 0xd7, AI_add_ovf_un - 0x5f, AI_and - 0x5b, AI_div - 0x5c, AI_div_un - 0xfe01, AI_ceq - 0xfe02, AI_cgt - 0xfe03, AI_cgt_un - 0xfe04, AI_clt - 0xfe05, AI_clt_un - 0x67, AI_conv DT_I1 - 0x68, AI_conv DT_I2 - 0x69, AI_conv DT_I4 - 0x6a, AI_conv DT_I8 - 0xd3, AI_conv DT_I - 0x6b, AI_conv DT_R4 - 0x6c, AI_conv DT_R8 - 0xd2, AI_conv DT_U1 - 0xd1, AI_conv DT_U2 - 0x6d, AI_conv DT_U4 - 0x6e, AI_conv DT_U8 - 0xe0, AI_conv DT_U - 0x76, AI_conv DT_R - 0xb3, AI_conv_ovf DT_I1 - 0xb5, AI_conv_ovf DT_I2 - 0xb7, AI_conv_ovf DT_I4 - 0xb9, AI_conv_ovf DT_I8 - 0xd4, AI_conv_ovf DT_I - 0xb4, AI_conv_ovf DT_U1 - 0xb6, AI_conv_ovf DT_U2 - 0xb8, AI_conv_ovf DT_U4 - 0xba, AI_conv_ovf DT_U8 - 0xd5, AI_conv_ovf DT_U - 0x82, AI_conv_ovf_un DT_I1 - 0x83, AI_conv_ovf_un DT_I2 - 0x84, AI_conv_ovf_un DT_I4 - 0x85, AI_conv_ovf_un DT_I8 - 0x8a, AI_conv_ovf_un DT_I - 0x86, AI_conv_ovf_un DT_U1 - 0x87, AI_conv_ovf_un DT_U2 - 0x88, AI_conv_ovf_un DT_U4 - 0x89, AI_conv_ovf_un DT_U8 - 0x8b, AI_conv_ovf_un DT_U - 0x9c, I_stelem DT_I1 - 0x9d, I_stelem DT_I2 - 0x9e, I_stelem DT_I4 - 0x9f, I_stelem DT_I8 - 0xa0, I_stelem DT_R4 - 0xa1, I_stelem DT_R8 - 0x9b, I_stelem DT_I - 0xa2, I_stelem DT_REF - 0x90, I_ldelem DT_I1 - 0x92, I_ldelem DT_I2 - 0x94, I_ldelem DT_I4 - 0x96, I_ldelem DT_I8 - 0x91, I_ldelem DT_U1 - 0x93, I_ldelem DT_U2 - 0x95, I_ldelem DT_U4 - 0x98, I_ldelem DT_R4 - 0x99, I_ldelem DT_R8 - 0x97, I_ldelem DT_I - 0x9a, I_ldelem DT_REF - 0x5a, AI_mul - 0xd8, AI_mul_ovf - 0xd9, AI_mul_ovf_un - 0x5d, AI_rem - 0x5e, AI_rem_un - 0x62, AI_shl - 0x63, AI_shr - 0x64, AI_shr_un - 0x59, AI_sub - 0xda, AI_sub_ovf - 0xdb, AI_sub_ovf_un - 0x61, AI_xor - 0x60, AI_or - 0x65, AI_neg - 0x66, AI_not - i_ldnull, AI_ldnull - i_dup, AI_dup - i_pop, AI_pop - i_ckfinite, AI_ckfinite - i_nop, AI_nop - i_break, I_break - i_arglist, I_arglist - i_endfilter, I_endfilter + lazy [ i_ldc_i4_0, mk_ldc 0 + i_ldc_i4_1, mk_ldc 1 + i_ldc_i4_2, mk_ldc 2 + i_ldc_i4_3, mk_ldc 3 + i_ldc_i4_4, mk_ldc 4 + i_ldc_i4_5, mk_ldc 5 + i_ldc_i4_6, mk_ldc 6 + i_ldc_i4_7, mk_ldc 7 + i_ldc_i4_8, mk_ldc 8 + i_ldc_i4_m1, mk_ldc -1 + 0x0a, mkStloc 0us + 0x0b, mkStloc 1us + 0x0c, mkStloc 2us + 0x0d, mkStloc 3us + 0x06, mkLdloc 0us + 0x07, mkLdloc 1us + 0x08, mkLdloc 2us + 0x09, mkLdloc 3us + 0x02, mkLdarg 0us + 0x03, mkLdarg 1us + 0x04, mkLdarg 2us + 0x05, mkLdarg 3us + 0x2a, I_ret + 0x58, AI_add + 0xd6, AI_add_ovf + 0xd7, AI_add_ovf_un + 0x5f, AI_and + 0x5b, AI_div + 0x5c, AI_div_un + 0xfe01, AI_ceq + 0xfe02, AI_cgt + 0xfe03, AI_cgt_un + 0xfe04, AI_clt + 0xfe05, AI_clt_un + 0x67, AI_conv DT_I1 + 0x68, AI_conv DT_I2 + 0x69, AI_conv DT_I4 + 0x6a, AI_conv DT_I8 + 0xd3, AI_conv DT_I + 0x6b, AI_conv DT_R4 + 0x6c, AI_conv DT_R8 + 0xd2, AI_conv DT_U1 + 0xd1, AI_conv DT_U2 + 0x6d, AI_conv DT_U4 + 0x6e, AI_conv DT_U8 + 0xe0, AI_conv DT_U + 0x76, AI_conv DT_R + 0xb3, AI_conv_ovf DT_I1 + 0xb5, AI_conv_ovf DT_I2 + 0xb7, AI_conv_ovf DT_I4 + 0xb9, AI_conv_ovf DT_I8 + 0xd4, AI_conv_ovf DT_I + 0xb4, AI_conv_ovf DT_U1 + 0xb6, AI_conv_ovf DT_U2 + 0xb8, AI_conv_ovf DT_U4 + 0xba, AI_conv_ovf DT_U8 + 0xd5, AI_conv_ovf DT_U + 0x82, AI_conv_ovf_un DT_I1 + 0x83, AI_conv_ovf_un DT_I2 + 0x84, AI_conv_ovf_un DT_I4 + 0x85, AI_conv_ovf_un DT_I8 + 0x8a, AI_conv_ovf_un DT_I + 0x86, AI_conv_ovf_un DT_U1 + 0x87, AI_conv_ovf_un DT_U2 + 0x88, AI_conv_ovf_un DT_U4 + 0x89, AI_conv_ovf_un DT_U8 + 0x8b, AI_conv_ovf_un DT_U + 0x9c, I_stelem DT_I1 + 0x9d, I_stelem DT_I2 + 0x9e, I_stelem DT_I4 + 0x9f, I_stelem DT_I8 + 0xa0, I_stelem DT_R4 + 0xa1, I_stelem DT_R8 + 0x9b, I_stelem DT_I + 0xa2, I_stelem DT_REF + 0x90, I_ldelem DT_I1 + 0x92, I_ldelem DT_I2 + 0x94, I_ldelem DT_I4 + 0x96, I_ldelem DT_I8 + 0x91, I_ldelem DT_U1 + 0x93, I_ldelem DT_U2 + 0x95, I_ldelem DT_U4 + 0x98, I_ldelem DT_R4 + 0x99, I_ldelem DT_R8 + 0x97, I_ldelem DT_I + 0x9a, I_ldelem DT_REF + 0x5a, AI_mul + 0xd8, AI_mul_ovf + 0xd9, AI_mul_ovf_un + 0x5d, AI_rem + 0x5e, AI_rem_un + 0x62, AI_shl + 0x63, AI_shr + 0x64, AI_shr_un + 0x59, AI_sub + 0xda, AI_sub_ovf + 0xdb, AI_sub_ovf_un + 0x61, AI_xor + 0x60, AI_or + 0x65, AI_neg + 0x66, AI_not + i_ldnull, AI_ldnull + i_dup, AI_dup + i_pop, AI_pop + i_ckfinite, AI_ckfinite + i_nop, AI_nop + i_break, I_break + i_arglist, I_arglist + i_endfilter, I_endfilter i_endfinally, I_endfinally i_refanytype, I_refanytype - i_localloc, I_localloc - i_throw, I_throw - i_ldlen, I_ldlen - i_rethrow, I_rethrow ] + i_localloc, I_localloc + i_throw, I_throw + i_ldlen, I_ldlen + i_rethrow, I_rethrow ] let isNoArgInstr i = match i with @@ -760,36 +760,36 @@ let isNoArgInstr i = let ILCmpInstrMap = lazy ( let dict = Dictionary.newWithSize 12 - dict.Add (BI_beq , i_beq ) - dict.Add (BI_bgt , i_bgt ) - dict.Add (BI_bgt_un , i_bgt_un ) - dict.Add (BI_bge , i_bge ) - dict.Add (BI_bge_un , i_bge_un ) - dict.Add (BI_ble , i_ble ) - dict.Add (BI_ble_un , i_ble_un ) - dict.Add (BI_blt , i_blt ) - dict.Add (BI_blt_un , i_blt_un ) - dict.Add (BI_bne_un , i_bne_un ) - dict.Add (BI_brfalse , i_brfalse ) - dict.Add (BI_brtrue , i_brtrue ) + dict.Add (BI_beq, i_beq ) + dict.Add (BI_bgt, i_bgt ) + dict.Add (BI_bgt_un, i_bgt_un ) + dict.Add (BI_bge, i_bge ) + dict.Add (BI_bge_un, i_bge_un ) + dict.Add (BI_ble, i_ble ) + dict.Add (BI_ble_un, i_ble_un ) + dict.Add (BI_blt, i_blt ) + dict.Add (BI_blt_un, i_blt_un ) + dict.Add (BI_bne_un, i_bne_un ) + dict.Add (BI_brfalse, i_brfalse ) + dict.Add (BI_brtrue, i_brtrue ) dict ) let ILCmpInstrRevMap = lazy ( let dict = Dictionary.newWithSize 12 - dict.Add ( BI_beq , i_beq_s ) - dict.Add ( BI_bgt , i_bgt_s ) - dict.Add ( BI_bgt_un , i_bgt_un_s ) - dict.Add ( BI_bge , i_bge_s ) - dict.Add ( BI_bge_un , i_bge_un_s ) - dict.Add ( BI_ble , i_ble_s ) - dict.Add ( BI_ble_un , i_ble_un_s ) - dict.Add ( BI_blt , i_blt_s ) - dict.Add ( BI_blt_un , i_blt_un_s ) - dict.Add ( BI_bne_un , i_bne_un_s ) - dict.Add ( BI_brfalse , i_brfalse_s ) - dict.Add ( BI_brtrue , i_brtrue_s ) + dict.Add ( BI_beq, i_beq_s ) + dict.Add ( BI_bgt, i_bgt_s ) + dict.Add ( BI_bgt_un, i_bgt_un_s ) + dict.Add ( BI_bge, i_bge_s ) + dict.Add ( BI_bge_un, i_bge_un_s ) + dict.Add ( BI_ble, i_ble_s ) + dict.Add ( BI_ble_un, i_ble_un_s ) + dict.Add ( BI_blt, i_blt_s ) + dict.Add ( BI_blt_un, i_blt_un_s ) + dict.Add ( BI_bne_un, i_bne_un_s ) + dict.Add ( BI_brfalse, i_brfalse_s ) + dict.Add ( BI_brtrue, i_brtrue_s ) dict ) @@ -890,106 +890,106 @@ let vt_BYREF = 0x4000 let ILNativeTypeMap = - lazy [ nt_CURRENCY , ILNativeType.Currency - nt_BSTR , (* COM interop *) ILNativeType.BSTR - nt_LPSTR , ILNativeType.LPSTR - nt_LPWSTR , ILNativeType.LPWSTR + lazy [ nt_CURRENCY, ILNativeType.Currency + nt_BSTR, (* COM interop *) ILNativeType.BSTR + nt_LPSTR, ILNativeType.LPSTR + nt_LPWSTR, ILNativeType.LPWSTR nt_LPTSTR, ILNativeType.LPTSTR nt_LPUTF8STR, ILNativeType.LPUTF8STR - nt_IUNKNOWN , (* COM interop *) ILNativeType.IUnknown - nt_IDISPATCH , (* COM interop *) ILNativeType.IDispatch - nt_BYVALSTR , ILNativeType.ByValStr - nt_TBSTR , ILNativeType.TBSTR - nt_LPSTRUCT , ILNativeType.LPSTRUCT - nt_INTF , (* COM interop *) ILNativeType.Interface - nt_STRUCT , ILNativeType.Struct - nt_ERROR , (* COM interop *) ILNativeType.Error - nt_VOID , ILNativeType.Void - nt_BOOLEAN , ILNativeType.Bool - nt_I1 , ILNativeType.Int8 - nt_I2 , ILNativeType.Int16 - nt_I4 , ILNativeType.Int32 + nt_IUNKNOWN, (* COM interop *) ILNativeType.IUnknown + nt_IDISPATCH, (* COM interop *) ILNativeType.IDispatch + nt_BYVALSTR, ILNativeType.ByValStr + nt_TBSTR, ILNativeType.TBSTR + nt_LPSTRUCT, ILNativeType.LPSTRUCT + nt_INTF, (* COM interop *) ILNativeType.Interface + nt_STRUCT, ILNativeType.Struct + nt_ERROR, (* COM interop *) ILNativeType.Error + nt_VOID, ILNativeType.Void + nt_BOOLEAN, ILNativeType.Bool + nt_I1, ILNativeType.Int8 + nt_I2, ILNativeType.Int16 + nt_I4, ILNativeType.Int32 nt_I8, ILNativeType.Int64 - nt_R4 , ILNativeType.Single - nt_R8 , ILNativeType.Double - nt_U1 , ILNativeType.Byte - nt_U2 , ILNativeType.UInt16 - nt_U4 , ILNativeType.UInt32 + nt_R4, ILNativeType.Single + nt_R8, ILNativeType.Double + nt_U1, ILNativeType.Byte + nt_U2, ILNativeType.UInt16 + nt_U4, ILNativeType.UInt32 nt_U8, ILNativeType.UInt64 - nt_INT , ILNativeType.Int + nt_INT, ILNativeType.Int nt_UINT, ILNativeType.UInt nt_ANSIBSTR, (* COM interop *) ILNativeType.ANSIBSTR nt_VARIANTBOOL, (* COM interop *) ILNativeType.VariantBool - nt_FUNC , ILNativeType.Method + nt_FUNC, ILNativeType.Method nt_ASANY, ILNativeType.AsAny ] let ILNativeTypeRevMap = lazy (List.map (fun (x,y) -> (y,x)) (Lazy.force ILNativeTypeMap)) let ILVariantTypeMap = - lazy [ ILNativeVariant.Empty , vt_EMPTY - ILNativeVariant.Null , vt_NULL - ILNativeVariant.Variant , vt_VARIANT - ILNativeVariant.Currency , vt_CY - ILNativeVariant.Decimal , vt_DECIMAL - ILNativeVariant.Date , vt_DATE - ILNativeVariant.BSTR , vt_BSTR - ILNativeVariant.LPSTR , vt_LPSTR - ILNativeVariant.LPWSTR , vt_LPWSTR - ILNativeVariant.IUnknown , vt_UNKNOWN - ILNativeVariant.IDispatch , vt_DISPATCH - ILNativeVariant.SafeArray , vt_SAFEARRAY - ILNativeVariant.Error , vt_ERROR - ILNativeVariant.HRESULT , vt_HRESULT - ILNativeVariant.CArray , vt_CARRAY - ILNativeVariant.UserDefined , vt_USERDEFINED - ILNativeVariant.Record , vt_RECORD - ILNativeVariant.FileTime , vt_FILETIME - ILNativeVariant.Blob , vt_BLOB - ILNativeVariant.Stream , vt_STREAM - ILNativeVariant.Storage , vt_STORAGE - ILNativeVariant.StreamedObject , vt_STREAMED_OBJECT - ILNativeVariant.StoredObject , vt_STORED_OBJECT - ILNativeVariant.BlobObject , vt_BLOB_OBJECT - ILNativeVariant.CF , vt_CF - ILNativeVariant.CLSID , vt_CLSID - ILNativeVariant.Void , vt_VOID - ILNativeVariant.Bool , vt_BOOL - ILNativeVariant.Int8 , vt_I1 - ILNativeVariant.Int16 , vt_I2 - ILNativeVariant.Int32 , vt_I4 - ILNativeVariant.Int64 , vt_I8 - ILNativeVariant.Single , vt_R4 - ILNativeVariant.Double , vt_R8 - ILNativeVariant.UInt8 , vt_UI1 - ILNativeVariant.UInt16 , vt_UI2 - ILNativeVariant.UInt32 , vt_UI4 - ILNativeVariant.UInt64 , vt_UI8 - ILNativeVariant.PTR , vt_PTR - ILNativeVariant.Int , vt_INT - ILNativeVariant.UInt , vt_UINT ] + lazy [ ILNativeVariant.Empty, vt_EMPTY + ILNativeVariant.Null, vt_NULL + ILNativeVariant.Variant, vt_VARIANT + ILNativeVariant.Currency, vt_CY + ILNativeVariant.Decimal, vt_DECIMAL + ILNativeVariant.Date, vt_DATE + ILNativeVariant.BSTR, vt_BSTR + ILNativeVariant.LPSTR, vt_LPSTR + ILNativeVariant.LPWSTR, vt_LPWSTR + ILNativeVariant.IUnknown, vt_UNKNOWN + ILNativeVariant.IDispatch, vt_DISPATCH + ILNativeVariant.SafeArray, vt_SAFEARRAY + ILNativeVariant.Error, vt_ERROR + ILNativeVariant.HRESULT, vt_HRESULT + ILNativeVariant.CArray, vt_CARRAY + ILNativeVariant.UserDefined, vt_USERDEFINED + ILNativeVariant.Record, vt_RECORD + ILNativeVariant.FileTime, vt_FILETIME + ILNativeVariant.Blob, vt_BLOB + ILNativeVariant.Stream, vt_STREAM + ILNativeVariant.Storage, vt_STORAGE + ILNativeVariant.StreamedObject, vt_STREAMED_OBJECT + ILNativeVariant.StoredObject, vt_STORED_OBJECT + ILNativeVariant.BlobObject, vt_BLOB_OBJECT + ILNativeVariant.CF, vt_CF + ILNativeVariant.CLSID, vt_CLSID + ILNativeVariant.Void, vt_VOID + ILNativeVariant.Bool, vt_BOOL + ILNativeVariant.Int8, vt_I1 + ILNativeVariant.Int16, vt_I2 + ILNativeVariant.Int32, vt_I4 + ILNativeVariant.Int64, vt_I8 + ILNativeVariant.Single, vt_R4 + ILNativeVariant.Double, vt_R8 + ILNativeVariant.UInt8, vt_UI1 + ILNativeVariant.UInt16, vt_UI2 + ILNativeVariant.UInt32, vt_UI4 + ILNativeVariant.UInt64, vt_UI8 + ILNativeVariant.PTR, vt_PTR + ILNativeVariant.Int, vt_INT + ILNativeVariant.UInt, vt_UINT ] let ILVariantTypeRevMap = lazy (List.map (fun (x,y) -> (y,x)) (Lazy.force ILVariantTypeMap)) let ILSecurityActionMap = lazy - [ ILSecurityAction.Request , 0x0001 - ILSecurityAction.Demand , 0x0002 - ILSecurityAction.Assert , 0x0003 - ILSecurityAction.Deny , 0x0004 - ILSecurityAction.PermitOnly , 0x0005 - ILSecurityAction.LinkCheck , 0x0006 - ILSecurityAction.InheritCheck , 0x0007 - ILSecurityAction.ReqMin , 0x0008 - ILSecurityAction.ReqOpt , 0x0009 - ILSecurityAction.ReqRefuse , 0x000a - ILSecurityAction.PreJitGrant , 0x000b - ILSecurityAction.PreJitDeny , 0x000c - ILSecurityAction.NonCasDemand , 0x000d - ILSecurityAction.NonCasLinkDemand , 0x000e - ILSecurityAction.NonCasInheritance , 0x000f - ILSecurityAction.LinkDemandChoice , 0x0010 - ILSecurityAction.InheritanceDemandChoice , 0x0011 - ILSecurityAction.DemandChoice , 0x0012 ] + [ ILSecurityAction.Request, 0x0001 + ILSecurityAction.Demand, 0x0002 + ILSecurityAction.Assert, 0x0003 + ILSecurityAction.Deny, 0x0004 + ILSecurityAction.PermitOnly, 0x0005 + ILSecurityAction.LinkCheck, 0x0006 + ILSecurityAction.InheritCheck, 0x0007 + ILSecurityAction.ReqMin, 0x0008 + ILSecurityAction.ReqOpt, 0x0009 + ILSecurityAction.ReqRefuse, 0x000a + ILSecurityAction.PreJitGrant, 0x000b + ILSecurityAction.PreJitDeny, 0x000c + ILSecurityAction.NonCasDemand, 0x000d + ILSecurityAction.NonCasLinkDemand, 0x000e + ILSecurityAction.NonCasInheritance, 0x000f + ILSecurityAction.LinkDemandChoice, 0x0010 + ILSecurityAction.InheritanceDemandChoice, 0x0011 + ILSecurityAction.DemandChoice, 0x0012 ] let ILSecurityActionRevMap = lazy (List.map (fun (x,y) -> (y,x)) (Lazy.force ILSecurityActionMap)) diff --git a/src/fcs-fable/src/absil/illib.fs b/src/fcs-fable/src/absil/illib.fs index ccc8a6bb4d..854ebf1c1c 100755 --- a/src/fcs-fable/src/absil/illib.fs +++ b/src/fcs-fable/src/absil/illib.fs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. module public FSharp.Compiler.AbstractIL.Internal.Library #nowarn "1178" // The struct, record or union type 'internal_instr_extension' is not structurally comparable because the type @@ -18,7 +18,7 @@ open Microsoft.FSharp.Core.ReflectionAdapters // Logical shift right treating int32 as unsigned integer. // Code that uses this should probably be adjusted to use unsigned integer types. -let (>>>&) (x:int32) (n:int32) = int32 (uint32 x >>> n) +let (>>>&) (x: int32) (n: int32) = int32 (uint32 x >>> n) let notlazy v = Lazy<_>.CreateFromValue v @@ -38,7 +38,9 @@ let inline isSingleton l = | _ -> false let inline isNonNull x = not (isNull x) + let inline nonNull msg x = if isNull x then failwith ("null: " + msg) else x + let inline (===) x y = LanguagePrimitives.PhysicalEquality x y /// Per the docs the threshold for the Large Object Heap is 85000 bytes: https://docs.microsoft.com/en-us/dotnet/standard/garbage-collection/large-object-heap#how-an-object-ends-up-on-the-large-object-heap-and-how-gc-handles-them @@ -76,6 +78,7 @@ type InlineDelayInit<'T when 'T : not struct> = new (f: unit -> 'T) = {store = Unchecked.defaultof<'T>; func = Func<_>(f) } val mutable store : 'T val mutable func : Func<'T> + member x.Value = match x.func with | null -> x.store @@ -95,15 +98,15 @@ let notFound() = raise (KeyNotFoundException()) module Order = let orderBy (p : 'T -> 'U) = - { new IComparer<'T> with member __.Compare(x,xx) = compare (p x) (p xx) } + { new IComparer<'T> with member __.Compare(x, xx) = compare (p x) (p xx) } let orderOn p (pxOrder: IComparer<'U>) = - { new IComparer<'T> with member __.Compare(x,xx) = pxOrder.Compare (p x, p xx) } + { new IComparer<'T> with member __.Compare(x, xx) = pxOrder.Compare (p x, p xx) } - let toFunction (pxOrder: IComparer<'U>) x y = pxOrder.Compare(x,y) + let toFunction (pxOrder: IComparer<'U>) x y = pxOrder.Compare(x, y) //------------------------------------------------------------------------- -// Library: arrays,lists,options,resizearrays +// Library: arrays, lists, options, resizearrays //------------------------------------------------------------------------- module Array = @@ -117,7 +120,7 @@ module Array = let mutable eq = true let mutable i = 0 while eq && i < len do - if not (inp.[i] === res.[i]) then eq <- false; + if not (inp.[i] === res.[i]) then eq <- false i <- i + 1 if eq then inp else res @@ -127,7 +130,7 @@ module Array = let order (eltOrder: IComparer<'T>) = { new IComparer> with - member __.Compare(xs,ys) = + member __.Compare(xs, ys) = let c = compare xs.Length ys.Length if c <> 0 then c else let rec loop i = @@ -148,7 +151,7 @@ module Array = loop p l 0 let existsTrue (arr: bool[]) = - let rec loop n = (n < arr.Length) && (arr.[n] || loop (n+1)) + let rec loop n = (n < arr.Length) && (arr.[n] || loop (n+1)) loop 0 let findFirstIndexWhereTrue (arr: _[]) p = @@ -251,12 +254,13 @@ module Array = isSubArray suffix whole (whole.Length-suffix.Length) module Option = + let mapFold f s opt = match opt with - | None -> None,s + | None -> None, s | Some x -> - let x',s' = f s x - Some x',s' + let x2, s2 = f s x + Some x2, s2 let attempt (f: unit -> 'T) = try Some (f()) with _ -> None @@ -271,7 +275,7 @@ module List = let sortWithOrder (c: IComparer<'T>) elements = List.sortWith (Order.toFunction c) elements let splitAfter n l = - let rec split_after_acc n l1 l2 = if n <= 0 then List.rev l1,l2 else split_after_acc (n-1) ((List.head l2):: l1) (List.tail l2) + let rec split_after_acc n l1 l2 = if n <= 0 then List.rev l1, l2 else split_after_acc (n-1) ((List.head l2):: l1) (List.tail l2) split_after_acc n [] l let existsi f xs = @@ -289,17 +293,17 @@ module List = let rec findi n f l = match l with | [] -> None - | h::t -> if f h then Some (h,n) else findi (n+1) f t + | h::t -> if f h then Some (h, n) else findi (n+1) f t let rec drop n l = match l with - | [] -> [] + | [] -> [] | _::xs -> if n=0 then l else drop (n-1) xs let splitChoose select l = let rec ch acc1 acc2 l = match l with - | [] -> List.rev acc1,List.rev acc2 + | [] -> List.rev acc1, List.rev acc2 | x::xs -> match select x with | Choice1Of2 sx -> ch (sx::acc1) acc2 xs @@ -308,8 +312,8 @@ module List = ch [] [] l let rec checkq l1 l2 = - match l1,l2 with - | h1::t1,h2::t2 -> h1 === h2 && checkq t1 t2 + match l1, l2 with + | h1::t1, h2::t2 -> h1 === h2 && checkq t1 t2 | _ -> true let mapq (f: 'T -> 'T) inp = @@ -340,8 +344,8 @@ module List = | [] -> Debug.Assert(false, "empty list") invalidArg "l" "empty list" - | [h] -> List.rev acc,h - | h::t -> loop (h::acc) t + | [h] -> List.rev acc, h + | h::t -> loop (h::acc) t loop [] l let tryRemove f inp = @@ -349,28 +353,25 @@ module List = match l with | [] -> None | h :: t -> if f h then Some (h, List.rev acc @ t) else loop (h::acc) t - loop [] inp - //tryRemove (fun x -> x = 2) [ 1;2;3] = Some (2, [1;3]) - //tryRemove (fun x -> x = 3) [ 1;2;3;4;5] = Some (3, [1;2;4;5]) - //tryRemove (fun x -> x = 3) [] = None + loop [] inp let headAndTail l = match l with | [] -> Debug.Assert(false, "empty list") failwith "List.headAndTail" - | h::t -> h,t + | h::t -> h, t let zip4 l1 l2 l3 l4 = - List.zip l1 (List.zip3 l2 l3 l4) |> List.map (fun (x1,(x2,x3,x4)) -> (x1,x2,x3,x4)) + List.zip l1 (List.zip3 l2 l3 l4) |> List.map (fun (x1, (x2, x3, x4)) -> (x1, x2, x3, x4)) let unzip4 l = - let a,b,cd = List.unzip3 (List.map (fun (x,y,z,w) -> (x,y,(z,w))) l) - let c,d = List.unzip cd - a,b,c,d + let a, b, cd = List.unzip3 (List.map (fun (x, y, z, w) -> (x, y, (z, w))) l) + let c, d = List.unzip cd + a, b, c, d let rec iter3 f l1 l2 l3 = - match l1,l2,l3 with + match l1, l2, l3 with | h1::t1, h2::t2, h3::t3 -> f h1 h2 h3; iter3 f t1 t2 t3 | [], [], [] -> () | _ -> failwith "iter3" @@ -378,20 +379,21 @@ module List = let takeUntil p l = let rec loop acc l = match l with - | [] -> List.rev acc,[] + | [] -> List.rev acc, [] | x::xs -> if p x then List.rev acc, l else loop (x::acc) xs loop [] l let order (eltOrder: IComparer<'T>) = { new IComparer> with - member __.Compare(xs,ys) = + member __.Compare(xs, ys) = let rec loop xs ys = - match xs,ys with - | [],[] -> 0 - | [],_ -> -1 - | _,[] -> 1 - | x::xs,y::ys -> let cxy = eltOrder.Compare(x,y) - if cxy=0 then loop xs ys else cxy + match xs, ys with + | [], [] -> 0 + | [], _ -> -1 + | _, [] -> 1 + | x::xs, y::ys -> + let cxy = eltOrder.Compare(x, y) + if cxy=0 then loop xs ys else cxy loop xs ys } module FrontAndBack = @@ -404,12 +406,12 @@ module List = let rec assoc x l = match l with | [] -> indexNotFound() - | ((h,r)::t) -> if x = h then r else assoc x t + | ((h, r)::t) -> if x = h then r else assoc x t let rec memAssoc x l = match l with | [] -> false - | ((h,_)::t) -> x = h || memAssoc x t + | ((h, _)::t) -> x = h || memAssoc x t let rec memq x l = match l with @@ -437,14 +439,22 @@ module List = let collect2 f xs ys = List.concat (List.map2 f xs ys) let toArraySquared xss = xss |> List.map List.toArray |> List.toArray + let iterSquared f xss = xss |> List.iter (List.iter f) + let collectSquared f xss = xss |> List.collect (List.collect f) + let mapSquared f xss = xss |> List.map (List.map f) + let mapFoldSquared f z xss = List.mapFold (List.mapFold f) z xss + let forallSquared f xss = xss |> List.forall (List.forall f) + let mapiSquared f xss = xss |> List.mapi (fun i xs -> xs |> List.mapi (fun j x -> f i j x)) + let existsSquared f xss = xss |> List.exists (fun xs -> xs |> List.exists (fun x -> f x)) - let mapiFoldSquared f z xss = mapFoldSquared f z (xss |> mapiSquared (fun i j x -> (i,j,x))) + + let mapiFoldSquared f z xss = mapFoldSquared f z (xss |> mapiSquared (fun i j x -> (i, j, x))) module ResizeArray = @@ -492,15 +502,11 @@ module ResizeArray = /// in order to prevent long-term storage of those values chunkBySize maxArrayItemCount f inp - -/// Because FSharp.Compiler.Service is a library that will target FSharp.Core 4.5.2 for the forseeable future, -/// we need to stick these functions in this module rather than using the module functions for ValueOption -/// that come after FSharp.Core 4.5.2. module ValueOptionInternal = + let inline ofOption x = match x with Some x -> ValueSome x | None -> ValueNone + let inline bind f x = match x with ValueSome x -> f x | ValueNone -> ValueNone - let inline isSome x = match x with ValueSome _ -> true | ValueNone -> false - let inline isNone x = match x with ValueSome _ -> false | ValueNone -> true type String with member inline x.StartsWithOrdinal(value) = @@ -512,34 +518,34 @@ type String with module String = let make (n: int) (c: char) : string = new String(c, n) - let get (str:string) i = str.[i] + let get (str: string) i = str.[i] - let sub (s:string) (start:int) (len:int) = s.Substring(start,len) + let sub (s: string) (start: int) (len: int) = s.Substring(start, len) - let contains (s:string) (c:char) = s.IndexOf(c) <> -1 + let contains (s: string) (c: char) = s.IndexOf(c) <> -1 let order = LanguagePrimitives.FastGenericComparer - let lowercase (s:string) = + let lowercase (s: string) = s.ToLowerInvariant() - let uppercase (s:string) = + let uppercase (s: string) = s.ToUpperInvariant() - let isUpper (s:string) = + let isUpper (s: string) = s.Length >= 1 && Char.IsUpper s.[0] && not (Char.IsLower s.[0]) - let capitalize (s:string) = + let capitalize (s: string) = if s.Length = 0 then s else uppercase s.[0..0] + s.[ 1.. s.Length - 1 ] - let uncapitalize (s:string) = - if s.Length = 0 then s + let uncapitalize (s: string) = + if s.Length = 0 then s else lowercase s.[0..0] + s.[ 1.. s.Length - 1 ] - let dropPrefix (s:string) (t:string) = s.[t.Length..s.Length - 1] + let dropPrefix (s: string) (t: string) = s.[t.Length..s.Length - 1] - let dropSuffix (s:string) (t:string) = s.[0..s.Length - t.Length - 1] + let dropSuffix (s: string) (t: string) = s.[0..s.Length - t.Length - 1] let inline toCharArray (str: string) = str.ToCharArray() @@ -572,7 +578,7 @@ module String = /// Splits a string into substrings based on the strings in the array separators let split options (separator: string []) (value: string) = - if isNull value then null else value.Split(separator, options) + if isNull value then null else value.Split(separator, options) let (|StartsWith|_|) (pattern: string) value = if String.IsNullOrWhiteSpace value then @@ -604,10 +610,11 @@ module String = #endif module Dictionary = - let inline newWithSize (size: int) = Dictionary<_,_>(size, HashIdentity.Structural) + let inline newWithSize (size: int) = Dictionary<_, _>(size, HashIdentity.Structural) [] type DictionaryExtensions() = + [] static member inline BagAdd(dic: Dictionary<'key, 'value list>, key: 'key, value: 'value) = match dic.TryGetValue key with @@ -638,13 +645,13 @@ type ExecutionToken = interface end /// the lifetime of stack-based calls. This is not checked, it is a discipline within the compiler code. type CompilationThreadToken() = interface ExecutionToken -/// Represents a place where we are stating that execution on the compilation thread is required. The +/// 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. let RequireCompilationThread (_ctok: CompilationThreadToken) = () /// Represents a place in the compiler codebase where we are passed a CompilationThreadToken unnecessarily. /// This reprents code that may potentially not need to be executed on the compilation thread. -let DoesNotRequireCompilerThreadTokenAndCouldPossiblyBeMadeConcurrent (_ctok: CompilationThreadToken) = () +let DoesNotRequireCompilerThreadTokenAndCouldPossiblyBeMadeConcurrent (_ctok: CompilationThreadToken) = () /// Represents a place in the compiler codebase where we assume we are executing on a compilation thread let AssumeCompilationThreadWithoutEvidence () = Unchecked.defaultof @@ -683,7 +690,7 @@ module ResultOrException = let success a = Result a - let raze (b:exn) = Exception b + let raze (b: exn) = Exception b // map let (|?>) res f = @@ -795,20 +802,20 @@ module Cancellable = ValueOrCancelled.Value (Choice2Of2 err)) /// Implement try/finally for a cancellable computation - let tryFinally e compensation = - catch e |> bind (fun res -> - compensation(); + let tryFinally e compensation = + catch e |> bind (fun res -> + compensation() match res with Choice1Of2 r -> ret r | Choice2Of2 err -> raise err) /// Implement try/with for a cancellable computation - let tryWith e handler = - catch e |> bind (fun res -> + let tryWith e handler = + catch e |> bind (fun res -> match res with Choice1Of2 r -> ret r | Choice2Of2 err -> handler err) - // Run the cancellable computation within an Async computation. This isn't actually used in the codebase, but left + // Run the cancellable computation within an Async computation. This isn't actually used in the codebase, but left // here in case we need it in the future // - // let toAsync e = + // let toAsync e = // async { // let! ct = Async.CancellationToken // return! @@ -822,14 +829,23 @@ module Cancellable = // } type CancellableBuilder() = - member x.Bind(e,k) = Cancellable.bind k e + + member x.Bind(e, k) = Cancellable.bind k e + member x.Return(v) = Cancellable.ret v + member x.ReturnFrom(v) = v - member x.Combine(e1,e2) = e1 |> Cancellable.bind (fun () -> e2) - member x.TryWith(e,handler) = Cancellable.tryWith e handler - member x.Using(resource,e) = Cancellable.tryFinally (e resource) (fun () -> (resource :> IDisposable).Dispose()) - member x.TryFinally(e,compensation) = Cancellable.tryFinally e compensation + + member x.Combine(e1, e2) = e1 |> Cancellable.bind (fun () -> e2) + + member x.TryWith(e, handler) = Cancellable.tryWith e handler + + member x.Using(resource, e) = Cancellable.tryFinally (e resource) (fun () -> (resource :> IDisposable).Dispose()) + + member x.TryFinally(e, compensation) = Cancellable.tryFinally e compensation + member x.Delay(f) = Cancellable.delay f + member x.Zero() = Cancellable.ret () let cancellable = CancellableBuilder() @@ -858,7 +874,7 @@ module Eventually = | Done x -> Done (Operators.box x) | NotYetDone (work) -> NotYetDone (fun ctok -> box (work ctok)) - let rec forceWhile ctok check e = + let rec forceWhile ctok check e = match e with | Done x -> Some(x) | NotYetDone (work) -> @@ -867,7 +883,6 @@ module Eventually = else forceWhile ctok check (work ctok) let force ctok e = Option.get (forceWhile ctok (fun () -> true) e) - #if !FABLE_COMPILER /// Keep running the computation bit by bit until a time limit is reached. @@ -879,13 +894,13 @@ module Eventually = let rec runTimeShare ctok e = runner ctok (fun ctok -> sw.Reset() - sw.Start(); + sw.Start() let rec loop ctok ev2 = match ev2 with | Done _ -> ev2 | NotYetDone work -> if ct.IsCancellationRequested || sw.ElapsedMilliseconds > timeShareInMilliseconds then - sw.Stop(); + sw.Stop() NotYetDone(fun ctok -> runTimeShare ctok ev2) else loop ctok (work ctok) @@ -912,7 +927,7 @@ module Eventually = | NotYetDone work -> NotYetDone (fun ctok -> bind k (work ctok)) let fold f acc seq = - (Done acc,seq) ||> Seq.fold (fun acc x -> acc |> bind (fun acc -> f acc x)) + (Done acc, seq) ||> Seq.fold (fun acc x -> acc |> bind (fun acc -> f acc x)) let rec catch e = match e with @@ -926,14 +941,15 @@ module Eventually = let delay (f: unit -> Eventually<'T>) = NotYetDone (fun _ctok -> f()) - let tryFinally e compensation = + let tryFinally e compensation = catch (e) - |> bind (fun res -> compensation(); - match res with - | Result v -> Eventually.Done v - | Exception e -> raise e) + |> bind (fun res -> + compensation() + match res with + | Result v -> Eventually.Done v + | Exception e -> raise e) - let tryWith e handler = + let tryWith e handler = catch e |> bind (function Result v -> Done v | Exception e -> handler e) @@ -942,15 +958,22 @@ module Eventually = NotYetDone (fun ctok -> Done ctok) type EventuallyBuilder() = - member x.Bind(e,k) = Eventually.bind k e + + member x.Bind(e, k) = Eventually.bind k e + member x.Return(v) = Eventually.Done v + member x.ReturnFrom(v) = v - member x.Combine(e1,e2) = e1 |> Eventually.bind (fun () -> e2) - member x.TryWith(e,handler) = Eventually.tryWith e handler - member x.TryFinally(e,compensation) = Eventually.tryFinally e compensation + + member x.Combine(e1, e2) = e1 |> Eventually.bind (fun () -> e2) + + member x.TryWith(e, handler) = Eventually.tryWith e handler + + member x.TryFinally(e, compensation) = Eventually.tryFinally e compensation + member x.Delay(f) = Eventually.delay f - member x.Zero() = Eventually.Done () + member x.Zero() = Eventually.Done () let eventually = new EventuallyBuilder() @@ -962,12 +985,9 @@ let _ = eventually { try return (failwith "") with _ -> return 1 } let _ = eventually { use x = null in return 1 } *) -//--------------------------------------------------------------------------- -// generate unique stamps -//--------------------------------------------------------------------------- - +/// Generates unique stamps type UniqueStampGenerator<'T when 'T : equality>() = - let encodeTab = new Dictionary<'T,int>(HashIdentity.Structural) + let encodeTab = new Dictionary<'T, int>(HashIdentity.Structural) let mutable nItems = 0 let encode str = match encodeTab.TryGetValue(str) with @@ -977,16 +997,16 @@ type UniqueStampGenerator<'T when 'T : equality>() = encodeTab.[str] <- idx nItems <- nItems + 1 idx - member this.Encode(str) = encode str + + member this.Encode(str) = encode str + member this.Table = encodeTab.Keys -//--------------------------------------------------------------------------- -// memoize tables (all entries cached, never collected) -//--------------------------------------------------------------------------- +/// memoize tables (all entries cached, never collected) +type MemoizationTable<'T, 'U>(compute: 'T -> 'U, keyComparer: IEqualityComparer<'T>, ?canMemoize) = -type MemoizationTable<'T,'U>(compute: 'T -> 'U, keyComparer: IEqualityComparer<'T>, ?canMemoize) = - - let table = new Dictionary<'T,'U>(keyComparer) + let table = new Dictionary<'T, 'U>(keyComparer) + member t.Apply(x) = if (match canMemoize with None -> true | Some f -> f x) then #if FABLE_COMPILER // no byref @@ -994,51 +1014,61 @@ type MemoizationTable<'T,'U>(compute: 'T -> 'U, keyComparer: IEqualityComparer<' let ok, res = table.TryGetValue(x) #else let mutable res = Unchecked.defaultof<'U> - let ok = table.TryGetValue(x,&res) + let ok = table.TryGetValue(x, &res) if ok then res else lock table (fun () -> let mutable res = Unchecked.defaultof<'U> - let ok = table.TryGetValue(x,&res) + let ok = table.TryGetValue(x, &res) #endif if ok then res else let res = compute x - table.[x] <- res; + table.[x] <- res res) else compute x exception UndefinedException -type LazyWithContextFailure(exn:exn) = +type LazyWithContextFailure(exn: exn) = + static let undefined = new LazyWithContextFailure(UndefinedException) + member x.Exception = exn + static member Undefined = undefined /// Just like "Lazy" but EVERY forcer must provide an instance of "ctxt", e.g. to help track errors /// on forcing back to at least one sensible user location [] [] -type LazyWithContext<'T,'ctxt> = +type LazyWithContext<'T, 'ctxt> = { /// This field holds the result of a successful computation. It's initial value is Unchecked.defaultof mutable value : 'T + /// This field holds either the function to run or a LazyWithContextFailure object recording the exception raised /// from running the function. It is null if the thunk has been evaluated successfully. - mutable funcOrException: obj; + mutable funcOrException: obj + /// A helper to ensure we rethrow the "original" exception findOriginalException : exn -> exn } - static member Create(f: ('ctxt->'T), findOriginalException) : LazyWithContext<'T,'ctxt> = - { value = Unchecked.defaultof<'T>; - funcOrException = box f; + + static member Create(f: ('ctxt->'T), findOriginalException) : LazyWithContext<'T, 'ctxt> = + { value = Unchecked.defaultof<'T> + funcOrException = box f findOriginalException = findOriginalException } - static member NotLazy(x:'T) : LazyWithContext<'T,'ctxt> = + + static member NotLazy(x:'T) : LazyWithContext<'T, 'ctxt> = { value = x funcOrException = null findOriginalException = id } + member x.IsDelayed = (match x.funcOrException with null -> false | :? LazyWithContextFailure -> false | _ -> true) + member x.IsForced = (match x.funcOrException with null -> true | _ -> false) - member x.Force(ctxt:'ctxt) = + + member x.Force(ctxt:'ctxt) = match x.funcOrException with | null -> x.value | _ -> @@ -1063,31 +1093,36 @@ type LazyWithContext<'T,'ctxt> = x.funcOrException <- box(LazyWithContextFailure.Undefined) try let res = f ctxt - x.value <- res; - x.funcOrException <- null; + x.value <- res + x.funcOrException <- null res with e -> - x.funcOrException <- box(new LazyWithContextFailure(e)); + x.funcOrException <- box(new LazyWithContextFailure(e)) reraise() | _ -> failwith "unreachable" - - -// -------------------------------------------------------------------- -// Intern tables to save space. -// -------------------------------------------------------------------- - +/// Intern tables to save space. module Tables = let memoize f = - let t = new Dictionary<_,_>(1000, HashIdentity.Structural) + let t = new Dictionary<_, _>(1000, HashIdentity.Structural) fun x -> - let ok, res = t.TryGetValue(x) - if ok then +#if FABLE_COMPILER + match t.TryGetValue(x) with + | true, res -> res + | _ -> + let res = f x + t.[x] <- res + res +#else + let mutable res = Unchecked.defaultof<_> + if t.TryGetValue(x, &res) then res else - let res = f x in t.[x] <- res; res - + res <- f x + t.[x] <- res + res +#endif /// Interface that defines methods for comparing objects using partial equality relation type IPartialEqualityComparer<'T> = @@ -1096,54 +1131,63 @@ type IPartialEqualityComparer<'T> = abstract InEqualityRelation : 'T -> bool module IPartialEqualityComparer = + let On f (c: IPartialEqualityComparer<_>) = { new IPartialEqualityComparer<_> with member __.InEqualityRelation x = c.InEqualityRelation (f x) member __.Equals(x, y) = c.Equals(f x, f y) member __.GetHashCode x = c.GetHashCode(f x) } - - // Wrapper type for use by the 'partialDistinctBy' function [] type private WrapType<'T> = Wrap of 'T // Like Seq.distinctBy but only filters out duplicates for some of the elements - let partialDistinctBy (per:IPartialEqualityComparer<'T>) seq = + let partialDistinctBy (per: IPartialEqualityComparer<'T>) seq = let wper = { new IPartialEqualityComparer> with member __.InEqualityRelation (Wrap x) = per.InEqualityRelation (x) member __.Equals(Wrap x, Wrap y) = per.Equals(x, y) member __.GetHashCode (Wrap x) = per.GetHashCode(x) } // Wrap a Wrap _ around all keys in case the key type is itself a type using null as a representation - let dict = Dictionary,obj>(wper) + let dict = Dictionary, obj>(wper) seq |> List.filter (fun v -> let key = Wrap(v) if (per.InEqualityRelation(v)) then if dict.ContainsKey(key) then false else (dict.[key] <- null; true) else true) - //------------------------------------------------------------------------- // Library: Name maps //------------------------------------------------------------------------ -type NameMap<'T> = Map +type NameMap<'T> = Map + type NameMultiMap<'T> = NameMap<'T list> -type MultiMap<'T,'U when 'T : comparison> = Map<'T,'U list> + +type MultiMap<'T, 'U when 'T : comparison> = Map<'T, 'U list> [] module NameMap = let empty = Map.empty + let range m = List.rev (Map.foldBack (fun _ x sofar -> x :: sofar) m []) - let foldBack f (m:NameMap<'T>) z = Map.foldBack f m z + + let foldBack f (m: NameMap<'T>) z = Map.foldBack f m z + let forall f m = Map.foldBack (fun x y sofar -> sofar && f x y) m true + let exists f m = Map.foldBack (fun x y sofar -> sofar || f x y) m false + let ofKeyedList f l = List.foldBack (fun x acc -> Map.add (f x) x acc) l Map.empty + let ofList l : NameMap<'T> = Map.ofList l + let ofSeq l : NameMap<'T> = Map.ofSeq l + let toList (l: NameMap<'T>) = Map.toList l + let layer (m1 : NameMap<'T>) m2 = Map.foldBack Map.add m1 m2 /// Not a very useful function - only called in one place - should be changed @@ -1153,8 +1197,8 @@ module NameMap = /// Union entries by identical key, using the provided function to union sets of values let union unionf (ms: NameMap<_> seq) = seq { for m in ms do yield! m } - |> Seq.groupBy (fun (KeyValue(k,_v)) -> k) - |> Seq.map (fun (k,es) -> (k,unionf (Seq.map (fun (KeyValue(_k,v)) -> v) es))) + |> Seq.groupBy (fun (KeyValue(k, _v)) -> k) + |> Seq.map (fun (k, es) -> (k, unionf (Seq.map (fun (KeyValue(_k, v)) -> v) es))) |> Map.ofSeq /// For every entry in m2 find an entry in m1 and fold @@ -1164,7 +1208,7 @@ module NameMap = let suball2 errf p m1 m2 = subfold2 errf (fun _ x1 x2 acc -> p x1 x2 && acc) m1 m2 true let mapFold f s (l: NameMap<'T>) = - Map.foldBack (fun x y (l',s') -> let y',s'' = f s' x y in Map.add x y' l',s'') l (Map.empty,s) + Map.foldBack (fun x y (l2, sx) -> let y2, sy = f sx x y in Map.add x y2 l2, sy) l (Map.empty, s) let foldBackRange f (l: NameMap<'T>) acc = Map.foldBack (fun _ y acc -> f y acc) l acc @@ -1186,9 +1230,9 @@ module NameMap = let add v x (m: NameMap<'T>) = Map.add v x m - let isEmpty (m: NameMap<'T>) = (Map.isEmpty m) + let isEmpty (m: NameMap<'T>) = (Map.isEmpty m) - let existsInRange p m = Map.foldBack (fun _ y acc -> acc || p y) m false + let existsInRange p m = Map.foldBack (fun _ y acc -> acc || p y) m false let tryFindInRange p m = Map.foldBack (fun _ y acc -> @@ -1198,50 +1242,77 @@ module NameMap = [] module NameMultiMap = + let existsInRange f (m: NameMultiMap<'T>) = NameMap.exists (fun _ l -> List.exists f l) m + let find v (m: NameMultiMap<'T>) = match m.TryGetValue v with true, r -> r | _ -> [] + let add v x (m: NameMultiMap<'T>) = NameMap.add v (x :: find v m) m + let range (m: NameMultiMap<'T>) = Map.foldBack (fun _ x sofar -> x @ sofar) m [] + let rangeReversingEachBucket (m: NameMultiMap<'T>) = Map.foldBack (fun _ x sofar -> List.rev x @ sofar) m [] let chooseRange f (m: NameMultiMap<'T>) = Map.foldBack (fun _ x sofar -> List.choose f x @ sofar) m [] + let map f (m: NameMultiMap<'T>) = NameMap.map (List.map f) m + let empty : NameMultiMap<'T> = Map.empty - let initBy f xs : NameMultiMap<'T> = xs |> Seq.groupBy f |> Seq.map (fun (k,v) -> (k,List.ofSeq v)) |> Map.ofSeq - let ofList (xs: (string * 'T) list) : NameMultiMap<'T> = xs |> Seq.groupBy fst |> Seq.map (fun (k,v) -> (k,List.ofSeq (Seq.map snd v))) |> Map.ofSeq + + let initBy f xs : NameMultiMap<'T> = xs |> Seq.groupBy f |> Seq.map (fun (k, v) -> (k, List.ofSeq v)) |> Map.ofSeq + + let ofList (xs: (string * 'T) list) : NameMultiMap<'T> = xs |> Seq.groupBy fst |> Seq.map (fun (k, v) -> (k, List.ofSeq (Seq.map snd v))) |> Map.ofSeq [] module MultiMap = - let existsInRange f (m: MultiMap<_,_>) = Map.exists (fun _ l -> List.exists f l) m - let find v (m: MultiMap<_,_>) = match m.TryGetValue v with true, r -> r | _ -> [] - let add v x (m: MultiMap<_,_>) = Map.add v (x :: find v m) m - let range (m: MultiMap<_,_>) = Map.foldBack (fun _ x sofar -> x @ sofar) m [] - let empty : MultiMap<_,_> = Map.empty - let initBy f xs : MultiMap<_,_> = xs |> Seq.groupBy f |> Seq.map (fun (k,v) -> (k,List.ofSeq v)) |> Map.ofSeq -type LayeredMap<'Key,'Value when 'Key : comparison> = Map<'Key,'Value> + let existsInRange f (m: MultiMap<_, _>) = Map.exists (fun _ l -> List.exists f l) m + + let find v (m: MultiMap<_, _>) = match m.TryGetValue v with true, r -> r | _ -> [] + + let add v x (m: MultiMap<_, _>) = Map.add v (x :: find v m) m + + let range (m: MultiMap<_, _>) = Map.foldBack (fun _ x sofar -> x @ sofar) m [] + + let empty : MultiMap<_, _> = Map.empty + + let initBy f xs : MultiMap<_, _> = xs |> Seq.groupBy f |> Seq.map (fun (k, v) -> (k, List.ofSeq v)) |> Map.ofSeq + +type LayeredMap<'Key, 'Value when 'Key : comparison> = Map<'Key, 'Value> + +type Map<'Key, 'Value when 'Key : comparison> with -type Map<'Key,'Value when 'Key : comparison> with - static member Empty : Map<'Key,'Value> = Map.empty + static member Empty : Map<'Key, 'Value> = Map.empty + + member x.Values = [ for (KeyValue(_, v)) in x -> v ] + + member x.AddAndMarkAsCollapsible (kvs: _[]) = (x, kvs) ||> Array.fold (fun x (KeyValue(k, v)) -> x.Add(k, v)) - member x.Values = [ for (KeyValue(_,v)) in x -> v ] - member x.AddAndMarkAsCollapsible (kvs: _[]) = (x,kvs) ||> Array.fold (fun x (KeyValue(k,v)) -> x.Add(k,v)) member x.LinearTryModifyThenLaterFlatten (key, f: 'Value option -> 'Value) = x.Add (key, f (x.TryFind key)) - member x.MarkAsCollapsible () = x + + member x.MarkAsCollapsible () = x /// Immutable map collection, with explicit flattening to a backing dictionary [] -type LayeredMultiMap<'Key,'Value when 'Key : equality and 'Key : comparison>(contents : LayeredMap<'Key,'Value list>) = - member x.Add (k,v) = LayeredMultiMap(contents.Add(k,v :: x.[k])) +type LayeredMultiMap<'Key, 'Value when 'Key : equality and 'Key : comparison>(contents : LayeredMap<'Key, 'Value list>) = + + member x.Add (k, v) = LayeredMultiMap(contents.Add(k, v :: x.[k])) + member x.Item with get k = match contents.TryGetValue k with true, l -> l | _ -> [] - member x.AddAndMarkAsCollapsible (kvs: _[]) = - let x = (x,kvs) ||> Array.fold (fun x (KeyValue(k,v)) -> x.Add(k,v)) + + member x.AddAndMarkAsCollapsible (kvs: _[]) = + let x = (x, kvs) ||> Array.fold (fun x (KeyValue(k, v)) -> x.Add(k, v)) x.MarkAsCollapsible() + member x.MarkAsCollapsible() = LayeredMultiMap(contents.MarkAsCollapsible()) + member x.TryFind k = contents.TryFind k + member x.TryGetValue k = contents.TryGetValue k + member x.Values = contents.Values |> List.concat - static member Empty : LayeredMultiMap<'Key,'Value> = LayeredMultiMap LayeredMap.Empty + + static member Empty : LayeredMultiMap<'Key, 'Value> = LayeredMultiMap LayeredMap.Empty [] module Shim = @@ -1255,28 +1326,28 @@ module Shim = #if !FABLE_COMPILER /// A shim over File.ReadAllBytes - abstract ReadAllBytesShim: fileName:string -> byte[] + abstract ReadAllBytesShim: fileName: string -> byte[] - /// A shim over FileStream with FileMode.Open,FileAccess.Read,FileShare.ReadWrite - abstract FileStreamReadShim: fileName:string -> Stream + /// A shim over FileStream with FileMode.Open, FileAccess.Read, FileShare.ReadWrite + abstract FileStreamReadShim: fileName: string -> Stream - /// A shim over FileStream with FileMode.Create,FileAccess.Write,FileShare.Read - abstract FileStreamCreateShim: fileName:string -> Stream + /// A shim over FileStream with FileMode.Create, FileAccess.Write, FileShare.Read + abstract FileStreamCreateShim: fileName: string -> Stream - /// A shim over FileStream with FileMode.Open,FileAccess.Write,FileShare.Read - abstract FileStreamWriteExistingShim: fileName:string -> Stream + /// A shim over FileStream with FileMode.Open, FileAccess.Write, FileShare.Read + abstract FileStreamWriteExistingShim: fileName: string -> Stream #endif /// Take in a filename with an absolute path, and return the same filename /// but canonicalized with respect to extra path separators (e.g. C:\\\\foo.txt) /// and '..' portions - abstract GetFullPathShim: fileName:string -> string + abstract GetFullPathShim: fileName: string -> string /// A shim over Path.IsPathRooted - abstract IsPathRootedShim: path:string -> bool + abstract IsPathRootedShim: path: string -> bool /// A shim over Path.IsInvalidPath - abstract IsInvalidPathShim: filename:string -> bool + abstract IsInvalidPathShim: filename: string -> bool #if !FABLE_COMPILER /// A shim over Path.GetTempPath @@ -1314,11 +1385,11 @@ module Shim = member __.ReadAllBytesShim (fileName: string) = File.ReadAllBytes fileName - member __.FileStreamReadShim (fileName: string) = new FileStream(fileName,FileMode.Open,FileAccess.Read,FileShare.ReadWrite) :> Stream + member __.FileStreamReadShim (fileName: string) = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite) :> Stream - member __.FileStreamCreateShim (fileName: string) = new FileStream(fileName,FileMode.Create,FileAccess.Write,FileShare.Read ,0x1000,false) :> Stream + member __.FileStreamCreateShim (fileName: string) = new FileStream(fileName, FileMode.Create, FileAccess.Write, FileShare.Read, 0x1000, false) :> Stream - member __.FileStreamWriteExistingShim (fileName: string) = new FileStream(fileName,FileMode.Open,FileAccess.Write,FileShare.Read ,0x1000,false) :> Stream + member __.FileStreamWriteExistingShim (fileName: string) = new FileStream(fileName, FileMode.Open, FileAccess.Write, FileShare.Read, 0x1000, false) :> Stream member __.GetFullPathShim (fileName: string) = System.IO.Path.GetFullPath fileName #else //FABLE_COMPILER @@ -1328,13 +1399,13 @@ module Shim = member __.IsPathRootedShim (path: string) = Path.IsPathRooted path member __.IsInvalidPathShim(path: string) = - let isInvalidPath(p:string) = + let isInvalidPath(p: string) = String.IsNullOrEmpty(p) || p.IndexOfAny(Path.GetInvalidPathChars()) <> -1 - let isInvalidFilename(p:string) = + let isInvalidFilename(p: string) = String.IsNullOrEmpty(p) || p.IndexOfAny(Path.GetInvalidFileNameChars()) <> -1 - let isInvalidDirectory(d:string) = + let isInvalidDirectory(d: string) = d=null || d.IndexOfAny(Path.GetInvalidPathChars()) <> -1 isInvalidPath (path) || @@ -1345,11 +1416,11 @@ module Shim = #if !FABLE_COMPILER member __.GetTempPathShim() = Path.GetTempPath() - member __.GetLastWriteTimeShim (fileName:string) = File.GetLastWriteTimeUtc fileName + member __.GetLastWriteTimeShim (fileName: string) = File.GetLastWriteTimeUtc fileName - member __.SafeExists (fileName:string) = File.Exists fileName + member __.SafeExists (fileName: string) = File.Exists fileName - member __.FileDelete (fileName:string) = File.Delete fileName + member __.FileDelete (fileName: string) = File.Delete fileName member __.IsStableFileHeuristic (fileName: string) = let directory = Path.GetDirectoryName(fileName) @@ -1365,6 +1436,7 @@ module Shim = #if !FABLE_COMPILER type File with + static member ReadBinaryChunk (fileName, start, len) = use stream = FileSystem.FileStreamReadShim fileName stream.Seek(int64 start, SeekOrigin.Begin) |> ignore diff --git a/src/fcs-fable/src/absil/ilmorph.fs b/src/fcs-fable/src/absil/ilmorph.fs index e0fe4cc749..ffd86aa504 100755 --- a/src/fcs-fable/src/absil/ilmorph.fs +++ b/src/fcs-fable/src/absil/ilmorph.fs @@ -59,7 +59,7 @@ let rec ty_tref2tref f x = | ILType.FunctionPointer x -> ILType.FunctionPointer { x with - ArgTypes=List.map (ty_tref2tref f) x.ArgTypes; + ArgTypes=List.map (ty_tref2tref f) x.ArgTypes ReturnType=ty_tref2tref f x.ReturnType} | ILType.Byref t -> ILType.Byref (ty_tref2tref f t) | ILType.Boxed cr -> mkILBoxedType (tspec_tref2tref f cr) @@ -85,7 +85,7 @@ and tspec_scoref2scoref_tyvar2ty fs (x:ILTypeSpec) = ILTypeSpec.Create(morphILScopeRefsInILTypeRef (fst fs) x.TypeRef,tys_scoref2scoref_tyvar2ty fs x.GenericArgs) and callsig_scoref2scoref_tyvar2ty f x = { x with - ArgTypes=List.map (ty_scoref2scoref_tyvar2ty f) x.ArgTypes; + ArgTypes=List.map (ty_scoref2scoref_tyvar2ty f) x.ArgTypes ReturnType=ty_scoref2scoref_tyvar2ty f x.ReturnType} and tys_scoref2scoref_tyvar2ty f i = List.map (ty_scoref2scoref_tyvar2ty f) i and gparams_scoref2scoref_tyvar2ty f i = List.map (gparam_scoref2scoref_tyvar2ty f) i @@ -95,8 +95,8 @@ and morphILScopeRefsInILTypeRef fscope (x:ILTypeRef) = let callsig_ty2ty f (x: ILCallingSignature) = - { CallingConv=x.CallingConv; - ArgTypes=List.map f x.ArgTypes; + { CallingConv=x.CallingConv + ArgTypes=List.map f x.ArgTypes ReturnType=f x.ReturnType} let gparam_ty2ty f gf = {gf with Constraints = List.map f gf.Constraints} @@ -113,17 +113,17 @@ let mref_ty2ty (f: ILType -> ILType) (x:ILMethodRef) = type formal_scopeCtxt = Choice -let mspec_ty2ty (((factualty : ILType -> ILType) , (fformalty: formal_scopeCtxt -> ILType -> ILType))) (x: ILMethodSpec) = +let mspec_ty2ty (((factualty : ILType -> ILType), (fformalty: formal_scopeCtxt -> ILType -> ILType))) (x: ILMethodSpec) = mkILMethSpecForMethRefInTy(mref_ty2ty (fformalty (Choice1Of2 x)) x.MethodRef, factualty x.DeclaringType, tys_ty2ty factualty x.GenericArgs) let fref_ty2ty (f: ILType -> ILType) x = - { x with DeclaringTypeRef = (f (mkILBoxedType (mkILNonGenericTySpec x.DeclaringTypeRef))).TypeRef; + { x with DeclaringTypeRef = (f (mkILBoxedType (mkILNonGenericTySpec x.DeclaringTypeRef))).TypeRef Type= f x.Type } let fspec_ty2ty ((factualty,(fformalty : formal_scopeCtxt -> ILType -> ILType))) x = - { FieldRef=fref_ty2ty (fformalty (Choice2Of2 x)) x.FieldRef; + { FieldRef=fref_ty2ty (fformalty (Choice2Of2 x)) x.FieldRef DeclaringType= factualty x.DeclaringType } let rec celem_ty2ty f celem = @@ -213,7 +213,7 @@ let locals_ty2ty f ls = List.map (local_ty2ty f) ls let ilmbody_instr2instr_ty2ty fs (il: ILMethodBody) = let (finstr,ftye) = fs - {il with Code=code_instr2instr_ty2ty (finstr,ftye) il.Code; + {il with Code=code_instr2instr_ty2ty (finstr,ftye) il.Code Locals = locals_ty2ty ftye il.Locals } let morphILMethodBody (filmbody) (x: ILLazyMethodBody) = @@ -240,7 +240,7 @@ let fdefs_ty2ty ilg f x = fdefs_fdef2fdef (fdef_ty2ty ilg f) x let mdefs_ty2ty_ilmbody2ilmbody ilg fs x = morphILMethodDefs (mdef_ty2ty_ilmbody2ilmbody ilg fs) x let mimpl_ty2ty f e = - { Overrides = ospec_ty2ty f e.Overrides; + { Overrides = ospec_ty2ty f e.Overrides OverrideBy = mspec_ty2ty (f,(fun _ -> f)) e.OverrideBy; } let edef_ty2ty ilg f (e: ILEventDef) = @@ -293,8 +293,8 @@ let morphILTypeInILModule_ilmbody2ilmbody_mdefs2mdefs ilg ((ftye: ILModuleDef -> let ftdefs = tdefs_ty2ty_ilmbody2ilmbody_mdefs2mdefs ilg [] (ftye m,fmdefs m) - { m with TypeDefs=ftdefs m.TypeDefs; - CustomAttrsStored= storeILCustomAttrs (cattrs_ty2ty ilg (ftye m None None) m.CustomAttrs); + { m with TypeDefs=ftdefs m.TypeDefs + CustomAttrsStored= storeILCustomAttrs (cattrs_ty2ty ilg (ftye m None None) m.CustomAttrs) Manifest=Option.map (manifest_ty2ty ilg (ftye m None None)) m.Manifest } let module_instr2instr_ty2ty ilg fs x = diff --git a/src/fcs-fable/src/absil/ilprint.fs b/src/fcs-fable/src/absil/ilprint.fs index c2d4e1d45d..5614522f02 100755 --- a/src/fcs-fable/src/absil/ilprint.fs +++ b/src/fcs-fable/src/absil/ilprint.fs @@ -31,14 +31,19 @@ let tyvar_generator = // depends on the gparams of the current scope. type ppenv = { ilGlobals: ILGlobals - ppenvClassFormals: int; + ppenvClassFormals: int ppenvMethodFormals: int } + let ppenv_enter_method mgparams env = {env with ppenvMethodFormals=mgparams} + let ppenv_enter_tdef gparams env = {env with ppenvClassFormals=List.length gparams; ppenvMethodFormals=0} + let mk_ppenv ilg = { ilGlobals = ilg; ppenvClassFormals = 0; ppenvMethodFormals = 0 } + let debug_ppenv = mk_ppenv + let ppenv_enter_modul env = { env with ppenvClassFormals=0; ppenvMethodFormals=0 } // -------------------------------------------------------------------- @@ -46,56 +51,59 @@ let ppenv_enter_modul env = { env with ppenvClassFormals=0; ppenvMethodFormals= // -------------------------------------------------------------------- let output_string (os: TextWriter) (s:string) = os.Write s + let output_char (os: TextWriter) (c:char) = os.Write c + let output_int os (i:int) = output_string os (string i) + let output_hex_digit os i = - assert (i >= 0 && i < 16); + assert (i >= 0 && i < 16) if i > 9 then output_char os (char (int32 'A' + (i-10))) else output_char os (char (int32 '0' + i)) let output_qstring os s = - output_char os '"'; + output_char os '"' for i = 0 to String.length s - 1 do let c = String.get s i if (c >= '\000' && c <= '\031') || (c >= '\127' && c <= '\255') then let c' = int32 c - output_char os '\\'; - output_int os (c'/64); - output_int os ((c' % 64) / 8); + output_char os '\\' + output_int os (c'/64) + output_int os ((c' % 64) / 8) output_int os (c' % 8) else if (c = '"') then - (output_char os '\\'; output_char os '"') + output_char os '\\'; output_char os '"' else if (c = '\\') then - (output_char os '\\'; output_char os '\\') + output_char os '\\'; output_char os '\\' else output_char os c - done; + done output_char os '"' let output_sqstring os s = - output_char os '\''; + output_char os '\'' for i = 0 to String.length s - 1 do let c = s.[i] if (c >= '\000' && c <= '\031') || (c >= '\127' && c <= '\255') then let c' = int32 c - output_char os '\\'; - output_int os (c'/64); - output_int os ((c' % 64) / 8); + output_char os '\\' + output_int os (c'/64) + output_int os ((c' % 64) / 8) output_int os (c' % 8) else if (c = '\\') then - (output_char os '\\'; output_char os '\\') + output_char os '\\'; output_char os '\\' else if (c = '\'') then - (output_char os '\\'; output_char os '\'') + output_char os '\\'; output_char os '\'' else output_char os c - done; + done output_char os '\'' let output_seq sep f os (a:seq<_>) = use e = a.GetEnumerator() if e.MoveNext() then - f os e.Current; + f os e.Current while e.MoveNext() do - output_string os sep; + output_string os sep f os e.Current let output_array sep f os (a:_ []) = @@ -106,7 +114,9 @@ let output_array sep f os (a:_ []) = f os (a.[a.Length - 1]) let output_parens f os a = output_string os "("; f os a; output_string os ")" + let output_angled f os a = output_string os "<"; f os a; output_string os ">" + let output_bracks f os a = output_string os "["; f os a; output_string os "]" let output_id os n = output_sqstring os n @@ -114,31 +124,42 @@ let output_id os n = output_sqstring os n let output_label os n = output_string os n let output_lid os lid = output_seq "." output_string os lid + let string_of_type_name (_,n) = n let output_byte os i = - output_hex_digit os (i / 16); + output_hex_digit os (i / 16) output_hex_digit os (i % 16) let output_bytes os (bytes:byte[]) = for i = 0 to bytes.Length - 1 do - output_byte os (Bytes.get bytes i); + output_byte os (Bytes.get bytes i) output_string os " " let bits_of_float32 (x:float32) = System.BitConverter.ToInt32(System.BitConverter.GetBytes(x),0) + let bits_of_float (x:float) = System.BitConverter.DoubleToInt64Bits(x) let output_u8 os (x:byte) = output_string os (string (int x)) + let output_i8 os (x:sbyte) = output_string os (string (int x)) + let output_u16 os (x:uint16) = output_string os (string (int x)) + let output_i16 os (x:int16) = output_string os (string (int x)) + let output_u32 os (x:uint32) = output_string os (string (int64 x)) + let output_i32 os (x:int32) = output_string os (string x) + let output_u64 os (x:uint64) = output_string os (string (int64 x)) + let output_i64 os (x:int64) = output_string os (string x) -let output_ieee32 os (x:float32) = (output_string os "float32 ("; output_string os (string (bits_of_float32 x)); output_string os ")") -let output_ieee64 os (x:float) = (output_string os "float64 ("; output_string os (string (bits_of_float x)); output_string os ")") + +let output_ieee32 os (x:float32) = output_string os "float32 ("; output_string os (string (bits_of_float32 x)); output_string os ")" + +let output_ieee64 os (x:float) = output_string os "float64 ("; output_string os (string (bits_of_float x)); output_string os ")" let rec goutput_scoref _env os = function | ILScopeRef.Local -> () @@ -148,62 +169,62 @@ let rec goutput_scoref _env os = function output_string os "[.module "; output_sqstring os mref.Name; output_string os "]" and goutput_type_name_ref env os (scoref,enc,n) = - goutput_scoref env os scoref; + goutput_scoref env os scoref output_seq "/" output_sqstring os (enc@[n]) and goutput_tref env os (x:ILTypeRef) = goutput_type_name_ref env os (x.Scope,x.Enclosing,x.Name) and goutput_typ env os ty = match ty with - | ILType.Boxed tr -> goutput_tspec env os tr - | ILType.TypeVar tv -> + | ILType.Boxed tr -> goutput_tspec env os tr + | ILType.TypeVar tv -> // Special rule to print method type variables in Generic EE preferred form // when an environment is available to help us do this. let cgparams = env.ppenvClassFormals let mgparams = env.ppenvMethodFormals if int tv < cgparams then - output_string os "!"; + output_string os "!" output_tyvar os tv - elif int tv - cgparams < mgparams then - output_string os "!!"; - output_int os (int tv - cgparams); + elif int tv - cgparams < mgparams then + output_string os "!!" + output_int os (int tv - cgparams) else - output_string os "!"; - output_tyvar os tv; + output_string os "!" + output_tyvar os tv output_int os (int tv) | ILType.Byref typ -> goutput_typ env os typ; output_string os "&" - | ILType.Ptr typ -> goutput_typ env os typ; output_string os "*" - | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_SByte.TypeSpec.Name -> output_string os "int8" - | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Int16.TypeSpec.Name -> output_string os "int16" - | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Int32.TypeSpec.Name -> output_string os "int32" - | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Int64.TypeSpec.Name -> output_string os "int64" - | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_IntPtr.TypeSpec.Name -> output_string os "native int" - | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Byte.TypeSpec.Name -> output_string os "unsigned int8" - | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_UInt16.TypeSpec.Name -> output_string os "unsigned int16" - | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_UInt32.TypeSpec.Name -> output_string os "unsigned int32" - | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_UInt64.TypeSpec.Name -> output_string os "unsigned int64" - | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_UIntPtr.TypeSpec.Name -> output_string os "native unsigned int" - | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Double.TypeSpec.Name -> output_string os "float64" - | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Single.TypeSpec.Name -> output_string os "float32" - | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Bool.TypeSpec.Name -> output_string os "bool" - | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Char.TypeSpec.Name -> output_string os "char" + | ILType.Ptr typ -> goutput_typ env os typ; output_string os "*" + | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_SByte.TypeSpec.Name -> output_string os "int8" + | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Int16.TypeSpec.Name -> output_string os "int16" + | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Int32.TypeSpec.Name -> output_string os "int32" + | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Int64.TypeSpec.Name -> output_string os "int64" + | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_IntPtr.TypeSpec.Name -> output_string os "native int" + | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Byte.TypeSpec.Name -> output_string os "unsigned int8" + | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_UInt16.TypeSpec.Name -> output_string os "unsigned int16" + | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_UInt32.TypeSpec.Name -> output_string os "unsigned int32" + | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_UInt64.TypeSpec.Name -> output_string os "unsigned int64" + | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_UIntPtr.TypeSpec.Name -> output_string os "native unsigned int" + | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Double.TypeSpec.Name -> output_string os "float64" + | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Single.TypeSpec.Name -> output_string os "float32" + | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Bool.TypeSpec.Name -> output_string os "bool" + | ILType.Value tspec when tspec.Name = EcmaMscorlibILGlobals.typ_Char.TypeSpec.Name -> output_string os "char" | ILType.Value tspec -> - output_string os "value class "; - goutput_tref env os tspec.TypeRef; - output_string os " "; + output_string os "value class " + goutput_tref env os tspec.TypeRef + output_string os " " goutput_gactuals env os tspec.GenericArgs - | ILType.Void -> output_string os "void" + | ILType.Void -> output_string os "void" | ILType.Array (bounds,ty) -> - goutput_typ env os ty; - output_string os "["; - output_arr_bounds os bounds; - output_string os "]"; + goutput_typ env os ty + output_string os "[" + output_arr_bounds os bounds + output_string os "]" | ILType.FunctionPointer csig -> - output_string os "method "; - goutput_typ env os csig.ReturnType; - output_string os " *("; - output_seq "," (goutput_typ env) os csig.ArgTypes; + output_string os "method " + goutput_typ env os csig.ReturnType + output_string os " *(" + output_seq "," (goutput_typ env) os csig.ArgTypes output_string os ")" | _ -> output_string os "NaT" @@ -229,10 +250,10 @@ and goutput_gactuals env os inst = and goutput_gactual env os ty = goutput_typ env os ty and goutput_tspec env os tspec = - output_string os "class "; - goutput_tref env os tspec.TypeRef; - output_string os " "; - goutput_gactuals env os tspec.GenericArgs; + output_string os "class " + goutput_tref env os tspec.TypeRef + output_string os " " + goutput_gactuals env os tspec.GenericArgs and output_arr_bounds os = function | bounds when bounds = ILArrayShape.SingleDimensional -> () @@ -243,40 +264,38 @@ and output_arr_bounds os = function | (None,Some sz) -> output_int os sz | (Some lower,None) -> - output_int os lower; + output_int os lower output_string os " ... " | (Some lower,Some d) -> - output_int os lower; - output_string os " ... "; + output_int os lower + output_string os " ... " output_int os d) os l and goutput_permission _env os p = - let output_security_action os x = + let output_security_action os x = output_string os (match x with - | ILSecurityAction.Request -> "request" - | ILSecurityAction.Demand -> "demand" - | ILSecurityAction.Assert-> "assert" - | ILSecurityAction.Deny-> "deny" - | ILSecurityAction.PermitOnly-> "permitonly" - | ILSecurityAction.LinkCheck-> "linkcheck" - | ILSecurityAction.InheritCheck-> "inheritcheck" - | ILSecurityAction.ReqMin-> "reqmin" - | ILSecurityAction.ReqOpt-> "reqopt" - | ILSecurityAction.ReqRefuse-> "reqrefuse" - | ILSecurityAction.PreJitGrant-> "prejitgrant" - | ILSecurityAction.PreJitDeny-> "prejitdeny" - | ILSecurityAction.NonCasDemand-> "noncasdemand" - | ILSecurityAction.NonCasLinkDemand-> "noncaslinkdemand" - | ILSecurityAction.NonCasInheritance-> "noncasinheritance" + | ILSecurityAction.Request -> "request" + | ILSecurityAction.Demand -> "demand" + | ILSecurityAction.Assert-> "assert" + | ILSecurityAction.Deny-> "deny" + | ILSecurityAction.PermitOnly-> "permitonly" + | ILSecurityAction.LinkCheck-> "linkcheck" + | ILSecurityAction.InheritCheck-> "inheritcheck" + | ILSecurityAction.ReqMin-> "reqmin" + | ILSecurityAction.ReqOpt-> "reqopt" + | ILSecurityAction.ReqRefuse-> "reqrefuse" + | ILSecurityAction.PreJitGrant-> "prejitgrant" + | ILSecurityAction.PreJitDeny-> "prejitdeny" + | ILSecurityAction.NonCasDemand-> "noncasdemand" + | ILSecurityAction.NonCasLinkDemand-> "noncaslinkdemand" + | ILSecurityAction.NonCasInheritance-> "noncasinheritance" | ILSecurityAction.LinkDemandChoice -> "linkdemandchoice" | ILSecurityAction.InheritanceDemandChoice -> "inheritancedemandchoice" | ILSecurityAction.DemandChoice -> "demandchoice") - - match p with | ILSecurityDecl (sa,b) -> output_string os " .permissionset " @@ -288,7 +307,7 @@ and goutput_permission _env os p = and goutput_security_decls env os (ps: ILSecurityDecls) = output_seq " " (goutput_permission env) os ps.AsList and goutput_gparam env os (gf: ILGenericParameterDef) = - output_string os (tyvar_generator gf.Name); + output_string os (tyvar_generator gf.Name) output_parens (output_seq "," (goutput_typ env)) os gf.Constraints and goutput_gparams env os b = @@ -310,7 +329,7 @@ and output_callconv os (Callconv (hasthis,cc)) = (match hasthis with ILThisConvention.Instance -> "instance " | ILThisConvention.InstanceExplicit -> "explicit " - | ILThisConvention.Static -> "") ; + | ILThisConvention.Static -> "") output_bcc os cc and goutput_dlocref env os (dref:ILType) = @@ -323,40 +342,40 @@ and goutput_dlocref env os (dref:ILType) = | dref when dref.IsNominal && isTypeNameForGlobalFunctions dref.TypeRef.Name -> - goutput_scoref env os dref.TypeRef.Scope; + goutput_scoref env os dref.TypeRef.Scope output_string os "::" | ty ->goutput_typ_with_shortened_class_syntax env os ty; output_string os "::" and goutput_callsig env os (csig:ILCallingSignature) = - output_callconv os csig.CallingConv; - output_string os " "; - goutput_typ env os csig.ReturnType; + output_callconv os csig.CallingConv + output_string os " " + goutput_typ env os csig.ReturnType output_parens (output_seq "," (goutput_typ env)) os csig.ArgTypes and goutput_mref env os (mref:ILMethodRef) = - output_callconv os mref.CallingConv; - output_string os " "; - goutput_typ_with_shortened_class_syntax env os mref.ReturnType; - output_string os " "; + output_callconv os mref.CallingConv + output_string os " " + goutput_typ_with_shortened_class_syntax env os mref.ReturnType + output_string os " " // no quotes for ".ctor" let name = mref.Name - if name = ".ctor" || name = ".cctor" then output_string os name else output_id os name; + if name = ".ctor" || name = ".cctor" then output_string os name else output_id os name output_parens (output_seq "," (goutput_typ env)) os mref.ArgTypes and goutput_mspec env os (mspec:ILMethodSpec) = let fenv = ppenv_enter_method mspec.GenericArity (ppenv_enter_tdef (mkILFormalTypars mspec.DeclaringType.GenericArgs) env) - output_callconv os mspec.CallingConv; - output_string os " "; - goutput_typ fenv os mspec.FormalReturnType; - output_string os " "; - goutput_dlocref env os mspec.DeclaringType; - output_string os " "; + output_callconv os mspec.CallingConv + output_string os " " + goutput_typ fenv os mspec.FormalReturnType + output_string os " " + goutput_dlocref env os mspec.DeclaringType + output_string os " " let name = mspec.Name - if name = ".ctor" || name = ".cctor" then output_string os name else output_id os name; - goutput_gactuals env os mspec.GenericArgs; - output_parens (output_seq "," (goutput_typ fenv)) os mspec.FormalArgTypes; + if name = ".ctor" || name = ".cctor" then output_string os name else output_id os name + goutput_gactuals env os mspec.GenericArgs + output_parens (output_seq "," (goutput_typ fenv)) os mspec.FormalArgTypes and goutput_vararg_mspec env os (mspec, varargs) = match varargs with @@ -365,38 +384,38 @@ and goutput_vararg_mspec env os (mspec, varargs) = let fenv = ppenv_enter_method mspec.GenericArity (ppenv_enter_tdef (mkILFormalTypars mspec.DeclaringType.GenericArgs) env) - output_callconv os mspec.CallingConv; - output_string os " "; - goutput_typ fenv os mspec.FormalReturnType; - output_string os " "; - goutput_dlocref env os mspec.DeclaringType; + output_callconv os mspec.CallingConv + output_string os " " + goutput_typ fenv os mspec.FormalReturnType + output_string os " " + goutput_dlocref env os mspec.DeclaringType let name = mspec.Name if name = ".ctor" || name = ".cctor" then output_string os name else output_id os name - goutput_gactuals env os mspec.GenericArgs; - output_string os "("; - output_seq "," (goutput_typ fenv) os mspec.FormalArgTypes; - output_string os ",...,"; - output_seq "," (goutput_typ fenv) os varargs'; - output_string os ")"; + goutput_gactuals env os mspec.GenericArgs + output_string os "(" + output_seq "," (goutput_typ fenv) os mspec.FormalArgTypes + output_string os ",...," + output_seq "," (goutput_typ fenv) os varargs' + output_string os ")" and goutput_vararg_sig env os (csig:ILCallingSignature,varargs:ILVarArgs) = match varargs with | None -> goutput_callsig env os csig; () | Some varargs' -> - goutput_typ env os csig.ReturnType; - output_string os " ("; + goutput_typ env os csig.ReturnType + output_string os " (" let argtys = csig.ArgTypes if argtys.Length <> 0 then output_seq ", " (goutput_typ env) os argtys - output_string os ",...,"; - output_seq "," (goutput_typ env) os varargs'; - output_string os ")"; + output_string os ",...," + output_seq "," (goutput_typ env) os varargs' + output_string os ")" and goutput_fspec env os (x:ILFieldSpec) = let fenv = ppenv_enter_tdef (mkILFormalTypars x.DeclaringType.GenericArgs) env - goutput_typ fenv os x.FormalType; - output_string os " "; - goutput_dlocref env os x.DeclaringType; + goutput_typ fenv os x.FormalType + output_string os " " + goutput_dlocref env os x.DeclaringType output_id os x.Name let output_member_access os access = @@ -443,26 +462,26 @@ let output_at os b = let output_option f os = function None -> () | Some x -> f os x let goutput_alternative_ref env os (alt: IlxUnionAlternative) = - output_id os alt.Name; + output_id os alt.Name alt.FieldDefs |> output_parens (output_array "," (fun os fdef -> goutput_typ env os fdef.Type)) os let goutput_curef env os (IlxUnionRef(_,tref,alts,_,_)) = - output_string os " .classunion import "; - goutput_tref env os tref; + output_string os " .classunion import " + goutput_tref env os tref output_parens (output_array "," (goutput_alternative_ref env)) os alts let goutput_cuspec env os (IlxUnionSpec(IlxUnionRef(_,tref,_,_,_),i)) = - output_string os "class /* classunion */ "; - goutput_tref env os tref; + output_string os "class /* classunion */ " + goutput_tref env os tref goutput_gactuals env os i let output_basic_type os x = output_string os (match x with - | DT_I1 -> "i1" - | DT_U1 -> "u1" - | DT_I2 -> "i2" - | DT_U2 -> "u2" + | DT_I1 -> "i1" + | DT_U1 -> "u1" + | DT_I2 -> "i2" + | DT_U2 -> "u2" | DT_I4 -> "i4" | DT_U4 -> "u4" | DT_I8 -> "i8" @@ -505,7 +524,6 @@ let goutput_fdef _tref env os (fd: ILFieldDef) = output_string os "\n" goutput_custom_attrs env os fd.CustomAttrs - let output_alignment os = function Aligned -> () | Unaligned1 -> output_string os "unaligned. 1 " @@ -523,37 +541,38 @@ let output_after_tailcall os = function | _ -> () let rec goutput_apps env os = function | Apps_tyapp (actual,cs) -> - output_angled (goutput_gactual env) os actual; - output_string os " "; - output_angled (goutput_gparam env) os (mkILSimpleTypar "T") ; - output_string os " "; + output_angled (goutput_gactual env) os actual + output_string os " " + output_angled (goutput_gparam env) os (mkILSimpleTypar "T") + output_string os " " goutput_apps env os cs - | Apps_app(ty,cs) -> - output_parens (goutput_typ env) os ty; - output_string os " "; + | Apps_app(ty,cs) -> + output_parens (goutput_typ env) os ty + output_string os " " goutput_apps env os cs - | Apps_done ty -> - output_string os "--> "; + | Apps_done ty -> + output_string os "--> " goutput_typ env os ty /// Print the short form of instructions let output_short_u16 os (x:uint16) = if int x < 256 then (output_string os ".s "; output_u16 os x) - else (output_string os " "; output_u16 os x) + else output_string os " "; output_u16 os x + let output_short_i32 os i32 = if i32 < 256 && 0 >= i32 then (output_string os ".s "; output_i32 os i32) - else (output_string os " "; output_i32 os i32 ) + else output_string os " "; output_i32 os i32 let output_code_label os lab = output_string os (formatCodeLabel lab) let goutput_local env os (l: ILLocal) = - goutput_typ env os l.Type; + goutput_typ env os l.Type if l.IsPinned then output_string os " pinned" let goutput_param env os (l: ILParameter) = match l.Name with - None -> goutput_typ env os l.Type; + None -> goutput_typ env os l.Type | Some n -> goutput_typ env os l.Type; output_string os " "; output_sqstring os n let goutput_params env os ps = @@ -567,17 +586,17 @@ let goutput_freevars env os ps = let output_source os (s:ILSourceMarker) = if s.Document.File <> "" then - output_string os " .line "; - output_int os s.Line; + output_string os " .line " + output_int os s.Line if s.Column <> -1 then - output_string os " : "; - output_int os s.Column; - output_string os " /* - "; - output_int os s.EndLine; + output_string os " : " + output_int os s.Column + output_string os " /* - " + output_int os s.EndLine if s.Column <> -1 then - output_string os " : "; - output_int os s.EndColumn; - output_string os "*/ "; + output_string os " : " + output_int os s.EndColumn + output_string os "*/ " output_sqstring os s.Document.File @@ -599,21 +618,21 @@ let rec goutput_instr env os inst = | BI_blt_un -> "blt.un" | BI_bne_un -> "bne.un" | BI_brfalse -> "brfalse" - | BI_brtrue -> "brtrue"); - output_string os " "; + | BI_brtrue -> "brtrue") + output_string os " " output_code_label os tg1 - | I_br tg -> output_string os "/* br "; output_code_label os tg; output_string os "*/"; + | I_br tg -> output_string os "/* br "; output_code_label os tg; output_string os "*/" | I_leave tg -> output_string os "leave "; output_code_label os tg | I_call (tl,mspec,varargs) -> - output_tailness os tl; - output_string os "call "; - goutput_vararg_mspec env os (mspec,varargs); - output_after_tailcall os tl; + output_tailness os tl + output_string os "call " + goutput_vararg_mspec env os (mspec,varargs) + output_after_tailcall os tl | I_calli (tl,mref,varargs) -> - output_tailness os tl; - output_string os "calli "; - goutput_vararg_sig env os (mref,varargs); - output_after_tailcall os tl; + output_tailness os tl + output_string os "calli " + goutput_vararg_sig env os (mref,varargs) + output_after_tailcall os tl | I_ldarg u16 -> output_string os "ldarg"; output_short_u16 os u16 | I_ldarga u16 -> output_string os "ldarga "; output_u16 os u16 | (AI_ldc (dt, ILConst.I4 x)) -> @@ -624,101 +643,101 @@ let rec goutput_instr env os inst = output_string os "ldc."; output_basic_type os dt; output_string os " "; output_ieee32 os x | (AI_ldc (dt, ILConst.R8 x)) -> output_string os "ldc."; output_basic_type os dt; output_string os " "; output_ieee64 os x - | I_ldftn mspec -> output_string os "ldftn "; goutput_mspec env os mspec + | I_ldftn mspec -> output_string os "ldftn "; goutput_mspec env os mspec | I_ldvirtftn mspec -> output_string os "ldvirtftn "; goutput_mspec env os mspec | I_ldind (al,vol,dt) -> - output_alignment os al; - output_volatility os vol; - output_string os "ldind."; + output_alignment os al + output_volatility os vol + output_string os "ldind." output_basic_type os dt | I_cpblk (al,vol) -> - output_alignment os al; - output_volatility os vol; + output_alignment os al + output_volatility os vol output_string os "cpblk" | I_initblk (al,vol) -> - output_alignment os al; - output_volatility os vol; + output_alignment os al + output_volatility os vol output_string os "initblk" | I_ldloc u16 -> output_string os "ldloc"; output_short_u16 os u16 | I_ldloca u16 -> output_string os "ldloca "; output_u16 os u16 | I_starg u16 -> output_string os "starg "; output_u16 os u16 | I_stind (al,vol,dt) -> - output_alignment os al; - output_volatility os vol; - output_string os "stind."; + output_alignment os al + output_volatility os vol + output_string os "stind." output_basic_type os dt | I_stloc u16 -> output_string os "stloc"; output_short_u16 os u16 | I_switch l -> output_string os "switch "; output_parens (output_seq "," output_code_label) os l | I_callvirt (tl,mspec,varargs) -> - output_tailness os tl; - output_string os "callvirt "; - goutput_vararg_mspec env os (mspec,varargs); - output_after_tailcall os tl; + output_tailness os tl + output_string os "callvirt " + goutput_vararg_mspec env os (mspec,varargs) + output_after_tailcall os tl | I_callconstraint (tl,ty,mspec,varargs) -> - output_tailness os tl; - output_string os "constraint. "; - goutput_typ env os ty; - output_string os " callvirt "; - goutput_vararg_mspec env os (mspec,varargs); - output_after_tailcall os tl; + output_tailness os tl + output_string os "constraint. " + goutput_typ env os ty + output_string os " callvirt " + goutput_vararg_mspec env os (mspec,varargs) + output_after_tailcall os tl | I_castclass ty -> output_string os "castclass "; goutput_typ env os ty | I_isinst ty -> output_string os "isinst "; goutput_typ env os ty | I_ldfld (al,vol,fspec) -> - output_alignment os al; - output_volatility os vol; - output_string os "ldfld "; + output_alignment os al + output_volatility os vol + output_string os "ldfld " goutput_fspec env os fspec | I_ldflda fspec -> - output_string os "ldflda " ; + output_string os "ldflda " goutput_fspec env os fspec | I_ldsfld (vol,fspec) -> - output_volatility os vol; - output_string os "ldsfld "; + output_volatility os vol + output_string os "ldsfld " goutput_fspec env os fspec | I_ldsflda fspec -> - output_string os "ldsflda "; + output_string os "ldsflda " goutput_fspec env os fspec | I_stfld (al,vol,fspec) -> - output_alignment os al; - output_volatility os vol; - output_string os "stfld "; + output_alignment os al + output_volatility os vol + output_string os "stfld " goutput_fspec env os fspec | I_stsfld (vol,fspec) -> - output_volatility os vol; - output_string os "stsfld "; + output_volatility os vol + output_string os "stsfld " goutput_fspec env os fspec | I_ldtoken tok -> output_string os "ldtoken "; goutput_ldtoken_info env os tok | I_refanyval ty -> output_string os "refanyval "; goutput_typ env os ty | I_refanytype -> output_string os "refanytype" | I_mkrefany typ -> output_string os "mkrefany "; goutput_typ env os typ | I_ldstr s -> - output_string os "ldstr "; + output_string os "ldstr " output_string os s | I_newobj (mspec,varargs) -> // newobj: IL has a special rule that the CC is always implicitly "instance" and need // not be mentioned explicitly - output_string os "newobj "; + output_string os "newobj " goutput_vararg_mspec env os (mspec,varargs) | I_stelem dt -> output_string os "stelem."; output_basic_type os dt | I_ldelem dt -> output_string os "ldelem."; output_basic_type os dt | I_newarr (shape,typ) -> if shape = ILArrayShape.SingleDimensional then - output_string os "newarr "; + output_string os "newarr " goutput_typ_with_shortened_class_syntax env os typ else - output_string os "newobj void "; - goutput_dlocref env os (mkILArrTy(typ,shape)); - output_string os ".ctor"; + output_string os "newobj void " + goutput_dlocref env os (mkILArrTy(typ,shape)) + output_string os ".ctor" let rank = shape.Rank output_parens (output_array "," (goutput_typ env)) os (Array.create ( rank) EcmaMscorlibILGlobals.typ_Int32) | I_stelem_any (shape,dt) -> if shape = ILArrayShape.SingleDimensional then output_string os "stelem.any "; goutput_typ env os dt else - output_string os "call instance void "; - goutput_dlocref env os (mkILArrTy(dt,shape)); - output_string os "Set"; + output_string os "call instance void " + goutput_dlocref env os (mkILArrTy(dt,shape)) + output_string os "Set" let rank = shape.Rank let arr = Array.create (rank + 1) EcmaMscorlibILGlobals.typ_Int32 arr.[rank] <- dt @@ -727,23 +746,23 @@ let rec goutput_instr env os inst = if shape = ILArrayShape.SingleDimensional then output_string os "ldelem.any "; goutput_typ env os tok else - output_string os "call instance "; - goutput_typ env os tok; - output_string os " "; - goutput_dlocref env os (mkILArrTy(tok,shape)); - output_string os "Get"; + output_string os "call instance " + goutput_typ env os tok + output_string os " " + goutput_dlocref env os (mkILArrTy(tok,shape)) + output_string os "Get" let rank = shape.Rank output_parens (output_array "," (goutput_typ env)) os (Array.create ( rank) EcmaMscorlibILGlobals.typ_Int32) | I_ldelema (ro,_,shape,tok) -> - if ro = ReadonlyAddress then output_string os "readonly. "; + if ro = ReadonlyAddress then output_string os "readonly. " if shape = ILArrayShape.SingleDimensional then output_string os "ldelema "; goutput_typ env os tok else - output_string os "call instance "; - goutput_typ env os (ILType.Byref tok); - output_string os " "; - goutput_dlocref env os (mkILArrTy(tok,shape)); - output_string os "Address"; + output_string os "call instance " + goutput_typ env os (ILType.Byref tok) + output_string os " " + goutput_dlocref env os (mkILArrTy(tok,shape)) + output_string os "Address" let rank = shape.Rank output_parens (output_array "," (goutput_typ env)) os (Array.create ( rank) EcmaMscorlibILGlobals.typ_Int32) @@ -752,14 +771,14 @@ let rec goutput_instr env os inst = | I_unbox_any tok -> output_string os "unbox.any "; goutput_typ env os tok | I_initobj tok -> output_string os "initobj "; goutput_typ env os tok | I_ldobj (al,vol,tok) -> - output_alignment os al; - output_volatility os vol; - output_string os "ldobj "; + output_alignment os al + output_volatility os vol + output_string os "ldobj " goutput_typ env os tok | I_stobj (al,vol,tok) -> - output_alignment os al; - output_volatility os vol; - output_string os "stobj "; + output_alignment os al + output_volatility os vol + output_string os "stobj " goutput_typ env os tok | I_cpobj tok -> output_string os "cpobj "; goutput_typ env os tok | I_sizeof tok -> output_string os "sizeof "; goutput_typ env os tok @@ -770,32 +789,31 @@ let rec goutput_instr env os inst = let goutput_ilmbody env os (il: ILMethodBody) = - if il.IsZeroInit then output_string os " .zeroinit\n"; - output_string os " .maxstack "; - output_i32 os il.MaxStack; - output_string os "\n"; + if il.IsZeroInit then output_string os " .zeroinit\n" + output_string os " .maxstack " + output_i32 os il.MaxStack + output_string os "\n" if il.Locals.Length <> 0 then - output_string os " .locals("; + output_string os " .locals(" output_seq ",\n " (goutput_local env) os il.Locals output_string os ")\n" - let goutput_mbody is_entrypoint env os (md: ILMethodDef) = if md.ImplAttributes &&& MethodImplAttributes.Native <> enum 0 then output_string os "native " elif md.ImplAttributes &&& MethodImplAttributes.IL <> enum 0 then output_string os "cil " else output_string os "runtime " - output_string os (if md.IsInternalCall then "internalcall " else " "); - output_string os (if md.IsManaged then "managed " else " "); - output_string os (if md.IsForwardRef then "forwardref " else " "); - output_string os " \n{ \n" ; - goutput_security_decls env os md.SecurityDecls; - goutput_custom_attrs env os md.CustomAttrs; + output_string os (if md.IsInternalCall then "internalcall " else " ") + output_string os (if md.IsManaged then "managed " else " ") + output_string os (if md.IsForwardRef then "forwardref " else " ") + output_string os " \n{ \n" + goutput_security_decls env os md.SecurityDecls + goutput_custom_attrs env os md.CustomAttrs match md.Body.Contents with | MethodBody.IL il -> goutput_ilmbody env os il | _ -> () - if is_entrypoint then output_string os " .entrypoint"; - output_string os "\n"; + if is_entrypoint then output_string os " .entrypoint" + output_string os "\n" output_string os "}\n" let goutput_mdef env os (md:ILMethodDef) = @@ -837,37 +855,37 @@ let goutput_mdef env os (md:ILMethodDef) = else "" let is_entrypoint = md.IsEntryPoint let menv = ppenv_enter_method (List.length md.GenericParams) env - output_string os " .method "; - if md.IsHideBySig then output_string os "hidebysig "; - if md.IsReqSecObj then output_string os "reqsecobj "; - if md.IsSpecialName then output_string os "specialname "; - if md.IsUnmanagedExport then output_string os "unmanagedexp "; - output_member_access os md.Access; - output_string os " "; - output_string os attrs; - output_string os " "; - output_callconv os md.CallingConv; - output_string os " "; - (goutput_typ menv) os md.Return.Type; - output_string os " "; - output_id os md.Name ; - output_string os " "; - (goutput_gparams env) os md.GenericParams; - output_string os " "; - (goutput_params menv) os md.Parameters; - output_string os " "; + output_string os " .method " + if md.IsHideBySig then output_string os "hidebysig " + if md.IsReqSecObj then output_string os "reqsecobj " + if md.IsSpecialName then output_string os "specialname " + if md.IsUnmanagedExport then output_string os "unmanagedexp " + output_member_access os md.Access + output_string os " " + output_string os attrs + output_string os " " + output_callconv os md.CallingConv + output_string os " " + (goutput_typ menv) os md.Return.Type + output_string os " " + output_id os md.Name + output_string os " " + (goutput_gparams env) os md.GenericParams + output_string os " " + (goutput_params menv) os md.Parameters + output_string os " " if md.IsSynchronized then output_string os "synchronized " if md.IsMustRun then output_string os "/* mustrun */ " if md.IsPreserveSig then output_string os "preservesig " if md.IsNoInline then output_string os "noinlining " if md.IsAggressiveInline then output_string os "aggressiveinlining " - (goutput_mbody is_entrypoint menv) os md; + (goutput_mbody is_entrypoint menv) os md output_string os "\n" let goutput_pdef env os (pd: ILPropertyDef) = - output_string os "property\n\tgetter: "; - (match pd.GetMethod with None -> () | Some mref -> goutput_mref env os mref); - output_string os "\n\tsetter: "; + output_string os "property\n\tgetter: " + (match pd.GetMethod with None -> () | Some mref -> goutput_mref env os mref) + output_string os "\n\tsetter: " (match pd.SetMethod with None -> () | Some mref -> goutput_mref env os mref) let goutput_superclass env os = function @@ -887,19 +905,20 @@ let goutput_implements env os (imp:ILTypes) = let the = function Some x -> x | None -> failwith "the" let output_type_layout_info os info = - if info.Size <> None then (output_string os " .size "; output_i32 os (the info.Size)); + if info.Size <> None then (output_string os " .size "; output_i32 os (the info.Size)) if info.Pack <> None then (output_string os " .pack "; output_u16 os (the info.Pack)) let splitTypeLayout = function | ILTypeDefLayout.Auto -> "auto",(fun _os () -> ()) - | ILTypeDefLayout.Sequential info -> "sequential", (fun os () -> output_type_layout_info os info) - | ILTypeDefLayout.Explicit info -> "explicit", (fun os () -> output_type_layout_info os info) - + | ILTypeDefLayout.Sequential info -> "sequential", (fun os () -> output_type_layout_info os info) + | ILTypeDefLayout.Explicit info -> "explicit", (fun os () -> output_type_layout_info os info) let goutput_fdefs tref env os (fdefs: ILFieldDefs) = List.iter (fun f -> (goutput_fdef tref env) os f; output_string os "\n" ) fdefs.AsList + let goutput_mdefs env os (mdefs: ILMethodDefs) = Array.iter (fun f -> (goutput_mdef env) os f; output_string os "\n" ) mdefs.AsArray + let goutput_pdefs env os (pdefs: ILPropertyDefs) = List.iter (fun f -> (goutput_pdef env) os f; output_string os "\n" ) pdefs.AsList @@ -909,41 +928,41 @@ let rec goutput_tdef enc env contents os (cd: ILTypeDef) = if isTypeNameForGlobalFunctions cd.Name then if contents then let tref = (mkILNestedTyRef (ILScopeRef.Local,enc,cd.Name)) - goutput_mdefs env os cd.Methods; - goutput_fdefs tref env os cd.Fields; - goutput_pdefs env os cd.Properties; + goutput_mdefs env os cd.Methods + goutput_fdefs tref env os cd.Fields + goutput_pdefs env os cd.Properties else - output_string os "\n"; + output_string os "\n" if cd.IsInterface then output_string os ".class interface " else output_string os ".class " - output_init_semantics os cd.Attributes; - output_string os " "; - output_type_access os cd.Access; - output_string os " "; - output_encoding os cd.Encoding; - output_string os " "; - output_string os layout_attr; - output_string os " "; - if cd.IsSealed then output_string os "sealed "; - if cd.IsAbstract then output_string os "abstract "; - if cd.IsSerializable then output_string os "serializable "; - if cd.IsComInterop then output_string os "import "; - output_sqstring os cd.Name ; - goutput_gparams env os cd.GenericParams; - output_string os "\n\t"; - goutput_superclass env os cd.Extends; - output_string os "\n\t"; - goutput_implements env os cd.Implements; - output_string os "\n{\n "; + output_init_semantics os cd.Attributes + output_string os " " + output_type_access os cd.Access + output_string os " " + output_encoding os cd.Encoding + output_string os " " + output_string os layout_attr + output_string os " " + if cd.IsSealed then output_string os "sealed " + if cd.IsAbstract then output_string os "abstract " + if cd.IsSerializable then output_string os "serializable " + if cd.IsComInterop then output_string os "import " + output_sqstring os cd.Name + goutput_gparams env os cd.GenericParams + output_string os "\n\t" + goutput_superclass env os cd.Extends + output_string os "\n\t" + goutput_implements env os cd.Implements + output_string os "\n{\n " if contents then let tref = (mkILNestedTyRef (ILScopeRef.Local,enc,cd.Name)) - goutput_custom_attrs env os cd.CustomAttrs; - goutput_security_decls env os cd.SecurityDecls; - pp_layout_decls os (); - goutput_fdefs tref env os cd.Fields; - goutput_mdefs env os cd.Methods; - goutput_tdefs contents (enc@[cd.Name]) env os cd.NestedTypes; - output_string os "\n}"; + goutput_custom_attrs env os cd.CustomAttrs + goutput_security_decls env os cd.SecurityDecls + pp_layout_decls os () + goutput_fdefs tref env os cd.Fields + goutput_mdefs env os cd.Methods + goutput_tdefs contents (enc@[cd.Name]) env os cd.NestedTypes + output_string os "\n}" and output_init_semantics os f = if f &&& TypeAttributes.BeforeFieldInit <> enum 0 then output_string os "beforefieldinit" @@ -954,8 +973,8 @@ and goutput_lambdas env os lambdas = output_angled (goutput_gparam env) os gf output_string os " " (goutput_lambdas env) os l - | Lambdas_lambda (ps,l) -> - output_parens (goutput_param env) os ps; + | Lambdas_lambda (ps,l) -> + output_parens (goutput_param env) os ps output_string os " " (goutput_lambdas env) os l | Lambdas_return typ -> output_string os "--> "; (goutput_typ env) os typ @@ -987,56 +1006,56 @@ let output_publickeyinfo os = function | PublicKeyToken k -> output_publickeytoken os k let output_assemblyRef os (aref:ILAssemblyRef) = - output_string os " .assembly extern "; - output_sqstring os aref.Name; - if aref.Retargetable then output_string os " retargetable "; - output_string os " { "; - (output_option output_hash) os aref.Hash; - (output_option output_publickeyinfo) os aref.PublicKey; - (output_option output_ver) os aref.Version; - (output_option output_locale) os aref.Locale; + output_string os " .assembly extern " + output_sqstring os aref.Name + if aref.Retargetable then output_string os " retargetable " + output_string os " { " + output_option output_hash os aref.Hash + output_option output_publickeyinfo os aref.PublicKey + output_option output_ver os aref.Version + output_option output_locale os aref.Locale output_string os " } " let output_modref os (modref:ILModuleRef) = - output_string os (if modref.HasMetadata then " .module extern " else " .file nometadata " ); - output_sqstring os modref.Name; - (output_option output_hash) os modref.Hash + output_string os (if modref.HasMetadata then " .module extern " else " .file nometadata " ) + output_sqstring os modref.Name + output_option output_hash os modref.Hash let goutput_resource env os r = - output_string os " .mresource "; - output_string os (match r.Access with ILResourceAccess.Public -> " public " | ILResourceAccess.Private -> " private "); - output_sqstring os r.Name; - output_string os " { "; - goutput_custom_attrs env os r.CustomAttrs; + output_string os " .mresource " + output_string os (match r.Access with ILResourceAccess.Public -> " public " | ILResourceAccess.Private -> " private ") + output_sqstring os r.Name + output_string os " { " + goutput_custom_attrs env os r.CustomAttrs match r.Location with | ILResourceLocation.LocalIn _ | ILResourceLocation.LocalOut _ -> - output_string os " /* loc nyi */ "; + output_string os " /* loc nyi */ " | ILResourceLocation.File (mref,off) -> - output_string os " .file "; - output_sqstring os mref.Name; - output_string os " at "; + output_string os " .file " + output_sqstring os mref.Name + output_string os " at " output_i32 os off | ILResourceLocation.Assembly aref -> - output_string os " .assembly extern "; + output_string os " .assembly extern " output_sqstring os aref.Name output_string os " }\n " let goutput_manifest env os m = - output_string os " .assembly "; + output_string os " .assembly " match m.AssemblyLongevity with | ILAssemblyLongevity.Unspecified -> () - | ILAssemblyLongevity.Library -> output_string os "library "; - | ILAssemblyLongevity.PlatformAppDomain -> output_string os "platformappdomain "; - | ILAssemblyLongevity.PlatformProcess -> output_string os "platformprocess "; - | ILAssemblyLongevity.PlatformSystem -> output_string os "platformmachine "; - output_sqstring os m.Name; - output_string os " { \n"; - output_string os ".hash algorithm "; output_i32 os m.AuxModuleHashAlgorithm; output_string os "\n"; + | ILAssemblyLongevity.Library -> output_string os "library " + | ILAssemblyLongevity.PlatformAppDomain -> output_string os "platformappdomain " + | ILAssemblyLongevity.PlatformProcess -> output_string os "platformprocess " + | ILAssemblyLongevity.PlatformSystem -> output_string os "platformmachine " + output_sqstring os m.Name + output_string os " { \n" + output_string os ".hash algorithm "; output_i32 os m.AuxModuleHashAlgorithm; output_string os "\n" goutput_custom_attrs env os m.CustomAttrs - (output_option output_publickey) os m.PublicKey - (output_option output_ver) os m.Version - (output_option output_locale) os m.Locale + output_option output_publickey os m.PublicKey + output_option output_ver os m.Version + output_option output_locale os m.Locale output_string os " } \n" @@ -1044,10 +1063,10 @@ let output_module_fragment_aux _refs os (ilg: ILGlobals) modul = try let env = mk_ppenv ilg let env = ppenv_enter_modul env - goutput_tdefs false ([]) env os modul.TypeDefs; - goutput_tdefs true ([]) env os modul.TypeDefs; - with e -> - output_string os "*** Error during printing : "; output_string os (e.ToString()); os.Flush(); + goutput_tdefs false ([]) env os modul.TypeDefs + goutput_tdefs true ([]) env os modul.TypeDefs + with e -> + output_string os "*** Error during printing : "; output_string os (e.ToString()); os.Flush() reraise() let output_module_fragment os (ilg: ILGlobals) modul = @@ -1056,30 +1075,30 @@ let output_module_fragment os (ilg: ILGlobals) modul = refs let output_module_refs os refs = - List.iter (fun x -> output_assemblyRef os x; output_string os "\n") refs.AssemblyReferences; + List.iter (fun x -> output_assemblyRef os x; output_string os "\n") refs.AssemblyReferences List.iter (fun x -> output_modref os x; output_string os "\n") refs.ModuleReferences let goutput_module_manifest env os modul = - output_string os " .module "; output_sqstring os modul.Name; - goutput_custom_attrs env os modul.CustomAttrs; - output_string os " .imagebase "; output_i32 os modul.ImageBase; - output_string os " .file alignment "; output_i32 os modul.PhysicalAlignment; - output_string os " .subsystem "; output_i32 os modul.SubSystemFlags; - output_string os " .corflags "; output_i32 os ((if modul.IsILOnly then 0x0001 else 0) ||| (if modul.Is32Bit then 0x0002 else 0) ||| (if modul.Is32BitPreferred then 0x00020003 else 0)); - List.iter (fun r -> goutput_resource env os r) modul.Resources.AsList; - output_string os "\n"; - (output_option (goutput_manifest env)) os modul.Manifest + output_string os " .module "; output_sqstring os modul.Name + goutput_custom_attrs env os modul.CustomAttrs + output_string os " .imagebase "; output_i32 os modul.ImageBase + output_string os " .file alignment "; output_i32 os modul.PhysicalAlignment + output_string os " .subsystem "; output_i32 os modul.SubSystemFlags + output_string os " .corflags "; output_i32 os ((if modul.IsILOnly then 0x0001 else 0) ||| (if modul.Is32Bit then 0x0002 else 0) ||| (if modul.Is32BitPreferred then 0x00020003 else 0)) + List.iter (fun r -> goutput_resource env os r) modul.Resources.AsList + output_string os "\n" + output_option (goutput_manifest env) os modul.Manifest let output_module os (ilg: ILGlobals) modul = try let refs = computeILRefs modul let env = mk_ppenv ilg let env = ppenv_enter_modul env - output_module_refs os refs; - goutput_module_manifest env os modul; - output_module_fragment_aux refs os ilg modul; - with e -> - output_string os "*** Error during printing : "; output_string os (e.ToString()); os.Flush(); + output_module_refs os refs + goutput_module_manifest env os modul + output_module_fragment_aux refs os ilg modul + with e -> + output_string os "*** Error during printing : "; output_string os (e.ToString()); os.Flush() raise e diff --git a/src/fcs-fable/src/absil/ilread.fs b/src/fcs-fable/src/absil/ilread.fs index 4fdf07d728..f712747a53 100755 --- a/src/fcs-fable/src/absil/ilread.fs +++ b/src/fcs-fable/src/absil/ilread.fs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. //--------------------------------------------------------------------- // The big binary reader @@ -33,7 +33,7 @@ open System.Reflection let checking = false let logging = false -let _ = if checking then dprintn "warning : ILBinaryReader.checking is on" +let _ = if checking then dprintn "warning: ILBinaryReader.checking is on" #if FABLE_COMPILER let noStableFileHeuristic = false let alwaysMemoryMapFSC = false @@ -46,8 +46,8 @@ let stronglyHeldReaderCacheSizeDefault = 30 let stronglyHeldReaderCacheSize = try (match System.Environment.GetEnvironmentVariable("FSharp_StronglyHeldBinaryReaderCacheSize") with null -> stronglyHeldReaderCacheSizeDefault | s -> int32 s) with _ -> stronglyHeldReaderCacheSizeDefault #endif -let singleOfBits (x:int32) = System.BitConverter.ToSingle(System.BitConverter.GetBytes(x), 0) -let doubleOfBits (x:int64) = System.BitConverter.Int64BitsToDouble(x) +let singleOfBits (x: int32) = System.BitConverter.ToSingle(System.BitConverter.GetBytes(x), 0) +let doubleOfBits (x: int64) = System.BitConverter.Int64BitsToDouble(x) //--------------------------------------------------------------------- // Utilities. @@ -55,9 +55,9 @@ let doubleOfBits (x:int64) = System.BitConverter.Int64BitsToDouble(x) let align alignment n = ((n + alignment - 0x1) / alignment) * alignment -let uncodedToken (tab:TableName) idx = ((tab.Index <<< 24) ||| idx) +let uncodedToken (tab: TableName) idx = ((tab.Index <<< 24) ||| idx) -let i32ToUncodedToken tok = +let i32ToUncodedToken tok = let idx = tok &&& 0xffffff let tab = tok >>>& 24 (TableName.FromIndex tab, idx) @@ -66,7 +66,7 @@ let i32ToUncodedToken tok = [] type TaggedIndex<'T> = val tag: 'T - val index : int32 + val index: int32 new(tag, index) = { tag=tag; index=index } let uncodedTokenToTypeDefOrRefOrSpec (tab, tok) = @@ -84,7 +84,7 @@ let uncodedTokenToMethodDefOrRef (tab, tok) = else failwith "bad table in uncodedTokenToMethodDefOrRef" TaggedIndex(tag, tok) -let (|TaggedIndex|) (x:TaggedIndex<'T>) = x.tag, x.index +let (|TaggedIndex|) (x: TaggedIndex<'T>) = x.tag, x.index let tokToTaggedIdx f nbits tok = let tagmask = if nbits = 1 then 1 @@ -98,11 +98,11 @@ let tokToTaggedIdx f nbits tok = TaggedIndex(f tag, idx) type Statistics = - { mutable rawMemoryFileCount : int - mutable memoryMapFileOpenedCount : int - mutable memoryMapFileClosedCount : int - mutable weakByteFileCount : int - mutable byteFileCount : int } + { mutable rawMemoryFileCount: int + mutable memoryMapFileOpenedCount: int + mutable memoryMapFileClosedCount: int + mutable weakByteFileCount: int + mutable byteFileCount: int } let stats = { rawMemoryFileCount = 0 @@ -114,41 +114,41 @@ let stats = let GetStatistics() = stats [] -/// An abstraction over how we access the contents of .NET binaries. May be backed by managed or unmanaged memory, -/// memory mapped file or by on-disk resources. These objects should never need explicit disposal - they must either +/// An abstraction over how we access the contents of .NET binaries. May be backed by managed or unmanaged memory, +/// memory mapped file or by on-disk resources. These objects should never need explicit disposal - they must either /// not hold resources of clean up after themselves when collected. type BinaryView() = /// Read a byte from the file - abstract ReadByte : addr:int -> byte + abstract ReadByte: addr: int -> byte /// Read a chunk of bytes from the file - abstract ReadBytes : addr:int -> int -> byte[] + abstract ReadBytes: addr: int -> int -> byte[] /// Read an Int32 from the file - abstract ReadInt32 : addr:int -> int + abstract ReadInt32: addr: int -> int /// Read a UInt16 from the file - abstract ReadUInt16 : addr:int -> uint16 + abstract ReadUInt16: addr: int -> uint16 /// Read a length of a UTF8 string from the file - abstract CountUtf8String : addr:int -> int + abstract CountUtf8String: addr: int -> int /// Read a UTF8 string from the file - abstract ReadUTF8String : addr: int -> string + abstract ReadUTF8String: addr: int -> string -/// An abstraction over how we access the contents of .NET binaries. May be backed by managed or unmanaged memory, +/// An abstraction over how we access the contents of .NET binaries. May be backed by managed or unmanaged memory, /// memory mapped file or by on-disk resources. type BinaryFile = /// Return a BinaryView for temporary use which eagerly holds any necessary memory resources for the duration of its lifetime, - /// and is faster to access byte-by-byte. The returned BinaryView should _not_ be captured in a closure that outlives the + /// and is faster to access byte-by-byte. The returned BinaryView should _not_ be captured in a closure that outlives the /// desired lifetime. - abstract GetView : unit -> BinaryView + abstract GetView: unit -> BinaryView #if !FABLE_COMPILER /// A view over a raw pointer to memory -type RawMemoryView(obj: obj, start:nativeint, len: int) = +type RawMemoryView(obj: obj, start: nativeint, len: int) = inherit BinaryView() override m.ReadByte i = @@ -200,7 +200,7 @@ type RawMemoryFile(fileName: string, obj: obj, addr: nativeint, length: int) = module MemoryMapping = type HANDLE = nativeint - type ADDR = nativeint + type ADDR = nativeint type SIZE_T = nativeint [] @@ -225,29 +225,29 @@ module MemoryMapping = [] extern ADDR MapViewOfFile (HANDLE _hFileMappingObject, - int _dwDesiredAccess, - int _dwFileOffsetHigh, - int _dwFileOffsetLow, + int _dwDesiredAccess, + int _dwFileOffsetHigh, + int _dwFileOffsetLow, SIZE_T _dwNumBytesToMap) [] extern bool UnmapViewOfFile (ADDR _lpBaseAddress) let INVALID_HANDLE = new IntPtr(-1) - let MAP_READ = 0x0004 + let MAP_READ = 0x0004 let GENERIC_READ = 0x80000000 let NULL_HANDLE = IntPtr.Zero let FILE_SHARE_NONE = 0x0000 let FILE_SHARE_READ = 0x0001 let FILE_SHARE_WRITE = 0x0002 let FILE_SHARE_READ_WRITE = 0x0003 - let CREATE_ALWAYS = 0x0002 - let OPEN_EXISTING = 0x0003 - let OPEN_ALWAYS = 0x0004 + let CREATE_ALWAYS = 0x0002 + let OPEN_EXISTING = 0x0003 + let OPEN_ALWAYS = 0x0004 /// A view over a raw pointer to memory given by a memory mapped file. /// NOTE: we should do more checking of validity here. -type MemoryMapView(start:nativeint) = +type MemoryMapView(start: nativeint) = inherit BinaryView() override m.ReadByte i = @@ -279,12 +279,12 @@ type MemoryMapView(start:nativeint) = /// lock on the file is only released when the object is disposed. /// For memory mapping we currently take one view and never release it. [] -type MemoryMapFile(fileName: string, view: MemoryMapView, hMap: MemoryMapping.HANDLE, hView:nativeint) = +type MemoryMapFile(fileName: string, view: MemoryMapView, hMap: MemoryMapping.HANDLE, hView: nativeint) = do stats.memoryMapFileOpenedCount <- stats.memoryMapFileOpenedCount + 1 let mutable closed = false - static member Create fileName = - let hFile = MemoryMapping.CreateFile (fileName, MemoryMapping.GENERIC_READ, MemoryMapping.FILE_SHARE_READ_WRITE, IntPtr.Zero, MemoryMapping.OPEN_EXISTING, 0, IntPtr.Zero ) + static member Create fileName = + let hFile = MemoryMapping.CreateFile (fileName, MemoryMapping.GENERIC_READ, MemoryMapping.FILE_SHARE_READ_WRITE, IntPtr.Zero, MemoryMapping.OPEN_EXISTING, 0, IntPtr.Zero ) if hFile.Equals(MemoryMapping.INVALID_HANDLE) then failwithf "CreateFile(0x%08x)" (Marshal.GetHRForLastWin32Error()) let protection = 0x00000002 @@ -317,7 +317,7 @@ type MemoryMapFile(fileName: string, view: MemoryMapView, hMap: MemoryMapping.HA #endif //!FABLE_COMPILER /// Read file from memory blocks -type ByteView(bytes:byte[]) = +type ByteView(bytes: byte[]) = inherit BinaryView() override __.ReadByte addr = bytes.[addr] @@ -348,7 +348,7 @@ type ByteView(bytes:byte[]) = /// A BinaryFile backed by an array of bytes held strongly as managed memory [] -type ByteFile(fileName: string, bytes:byte[]) = +type ByteFile(fileName: string, bytes: byte[]) = let view = ByteView(bytes) do stats.byteFileCount <- stats.byteFileCount + 1 member __.FileName = fileName @@ -358,7 +358,7 @@ type ByteFile(fileName: string, bytes:byte[]) = #if !FABLE_COMPILER /// Same as ByteFile but holds the bytes weakly. The bytes will be re-read from the backing file when a view is requested. -/// This is the default implementation used by F# Compiler Services when accessing "stable" binaries. It is not used +/// This is the default implementation used by F# Compiler Services when accessing "stable" binaries. It is not used /// by Visual Studio, where tryGetMetadataSnapshot provides a RawMemoryFile backed by Roslyn data. [] type WeakByteFile(fileName: string, chunk: (int * int) option) = @@ -397,12 +397,11 @@ type WeakByteFile(fileName: string, chunk: (int * int) option) = (ByteView(strongBytes) :> BinaryView) #endif //!FABLE_COMPILER - -let seekReadByte (mdv:BinaryView) addr = mdv.ReadByte addr -let seekReadBytes (mdv:BinaryView) addr len = mdv.ReadBytes addr len -let seekReadInt32 (mdv:BinaryView) addr = mdv.ReadInt32 addr -let seekReadUInt16 (mdv:BinaryView) addr = mdv.ReadUInt16 addr +let seekReadByte (mdv: BinaryView) addr = mdv.ReadByte addr +let seekReadBytes (mdv: BinaryView) addr len = mdv.ReadBytes addr len +let seekReadInt32 (mdv: BinaryView) addr = mdv.ReadInt32 addr +let seekReadUInt16 (mdv: BinaryView) addr = mdv.ReadUInt16 addr let seekReadByteAsInt32 mdv addr = int32 (seekReadByte mdv addr) @@ -457,32 +456,32 @@ let seekReadUserString mdv addr = let bytes = seekReadBytes mdv addr (len - 1) Encoding.Unicode.GetString(bytes, 0, bytes.Length) -let seekReadGuid mdv addr = seekReadBytes mdv addr 0x10 +let seekReadGuid mdv addr = seekReadBytes mdv addr 0x10 -let seekReadUncodedToken mdv addr = +let seekReadUncodedToken mdv addr = i32ToUncodedToken (seekReadInt32 mdv addr) //--------------------------------------------------------------------- -// Primitives to help read signatures. These do not use the file cursor +// Primitives to help read signatures. These do not use the file cursor //--------------------------------------------------------------------- -let sigptrCheck (bytes:byte[]) sigptr = +let sigptrCheck (bytes: byte[]) sigptr = if checking && sigptr >= bytes.Length then failwith "read past end of sig. " // All this code should be moved to use a mutable index into the signature // -//type SigPtr(bytes:byte[], sigptr:int) = +//type SigPtr(bytes: byte[], sigptr: int) = // let mutable curr = sigptr // member x.GetByte() = let res = bytes.[curr] in curr <- curr + 1; res -let sigptrGetByte (bytes:byte[]) sigptr = +let sigptrGetByte (bytes: byte[]) sigptr = sigptrCheck bytes sigptr bytes.[sigptr], sigptr + 1 let sigptrGetBool bytes sigptr = let b0, sigptr = sigptrGetByte bytes sigptr - (b0 = 0x01uy) , sigptr + (b0 = 0x01uy), sigptr let sigptrGetSByte bytes sigptr = let i, sigptr = sigptrGetByte bytes sigptr @@ -539,20 +538,20 @@ let sigptrGetZInt32 bytes sigptr = let b1, sigptr = sigptrGetByte bytes sigptr let b2, sigptr = sigptrGetByte bytes sigptr let b3, sigptr = sigptrGetByte bytes sigptr - (int b0 <<< 24) ||| (int b1 <<< 16) ||| (int b2 <<< 8) ||| int b3, sigptr + (int b0 <<< 24) ||| (int b1 <<< 16) ||| (int b2 <<< 8) ||| int b3, sigptr -let rec sigptrFoldAcc f n (bytes:byte[]) (sigptr:int) i acc = +let rec sigptrFoldAcc f n (bytes: byte[]) (sigptr: int) i acc = if i < n then let x, sp = f bytes sigptr sigptrFoldAcc f n bytes sp (i+1) (x::acc) else List.rev acc, sigptr -let sigptrFold f n (bytes:byte[]) (sigptr:int) = +let sigptrFold f n (bytes: byte[]) (sigptr: int) = sigptrFoldAcc f n bytes sigptr 0 [] -let sigptrGetBytes n (bytes:byte[]) sigptr = +let sigptrGetBytes n (bytes: byte[]) sigptr = if checking && sigptr + n >= bytes.Length then dprintn "read past end of sig. in sigptrGetString" Bytes.zeroCreate 0, sigptr @@ -633,8 +632,8 @@ type ILInstrDecoder = | I_r8_instr of (ILInstrPrefixesRegister -> double -> ILInstr) | I_field_instr of (ILInstrPrefixesRegister -> ILFieldSpec -> ILInstr) | I_method_instr of (ILInstrPrefixesRegister -> ILMethodSpec * ILVarArgs -> ILInstr) - | I_unconditional_i32_instr of (ILInstrPrefixesRegister -> ILCodeLabel -> ILInstr) - | I_unconditional_i8_instr of (ILInstrPrefixesRegister -> ILCodeLabel -> ILInstr) + | I_unconditional_i32_instr of (ILInstrPrefixesRegister -> ILCodeLabel -> ILInstr) + | I_unconditional_i8_instr of (ILInstrPrefixesRegister -> ILCodeLabel -> ILInstr) | I_conditional_i32_instr of (ILInstrPrefixesRegister -> ILCodeLabel -> ILInstr) | I_conditional_i8_instr of (ILInstrPrefixesRegister -> ILCodeLabel -> ILInstr) | I_string_instr of (ILInstrPrefixesRegister -> string -> ILInstr) @@ -648,19 +647,19 @@ let mkStind dt = volatileOrUnalignedPrefix (fun (x, y) -> I_stind(x, y, dt)) let mkLdind dt = volatileOrUnalignedPrefix (fun (x, y) -> I_ldind(x, y, dt)) let instrs () = - [ i_ldarg_s, I_u16_u8_instr (noPrefixes mkLdarg) - i_starg_s, I_u16_u8_instr (noPrefixes I_starg) + [ i_ldarg_s, I_u16_u8_instr (noPrefixes mkLdarg) + i_starg_s, I_u16_u8_instr (noPrefixes I_starg) i_ldarga_s, I_u16_u8_instr (noPrefixes I_ldarga) - i_stloc_s, I_u16_u8_instr (noPrefixes mkStloc) - i_ldloc_s, I_u16_u8_instr (noPrefixes mkLdloc) + i_stloc_s, I_u16_u8_instr (noPrefixes mkStloc) + i_ldloc_s, I_u16_u8_instr (noPrefixes mkLdloc) i_ldloca_s, I_u16_u8_instr (noPrefixes I_ldloca) - i_ldarg, I_u16_u16_instr (noPrefixes mkLdarg) - i_starg, I_u16_u16_instr (noPrefixes I_starg) - i_ldarga, I_u16_u16_instr (noPrefixes I_ldarga) - i_stloc, I_u16_u16_instr (noPrefixes mkStloc) - i_ldloc, I_u16_u16_instr (noPrefixes mkLdloc) - i_ldloca, I_u16_u16_instr (noPrefixes I_ldloca) - i_stind_i, I_none_instr (mkStind DT_I) + i_ldarg, I_u16_u16_instr (noPrefixes mkLdarg) + i_starg, I_u16_u16_instr (noPrefixes I_starg) + i_ldarga, I_u16_u16_instr (noPrefixes I_ldarga) + i_stloc, I_u16_u16_instr (noPrefixes mkStloc) + i_ldloc, I_u16_u16_instr (noPrefixes mkLdloc) + i_ldloca, I_u16_u16_instr (noPrefixes I_ldloca) + i_stind_i, I_none_instr (mkStind DT_I) i_stind_i1, I_none_instr (mkStind DT_I1) i_stind_i2, I_none_instr (mkStind DT_I2) i_stind_i4, I_none_instr (mkStind DT_I4) @@ -668,7 +667,7 @@ let instrs () = i_stind_r4, I_none_instr (mkStind DT_R4) i_stind_r8, I_none_instr (mkStind DT_R8) i_stind_ref, I_none_instr (mkStind DT_REF) - i_ldind_i, I_none_instr (mkLdind DT_I) + i_ldind_i, I_none_instr (mkLdind DT_I) i_ldind_i1, I_none_instr (mkLdind DT_I1) i_ldind_i2, I_none_instr (mkLdind DT_I2) i_ldind_i4, I_none_instr (mkLdind DT_I4) @@ -687,7 +686,7 @@ let instrs () = i_ldc_r4, I_r4_instr (noPrefixes (fun x -> (AI_ldc (DT_R4, ILConst.R4 x)))) i_ldc_r8, I_r8_instr (noPrefixes (fun x -> (AI_ldc (DT_R8, ILConst.R8 x)))) i_ldfld, I_field_instr (volatileOrUnalignedPrefix(fun (x, y) fspec -> I_ldfld(x, y, fspec))) - i_stfld, I_field_instr (volatileOrUnalignedPrefix(fun (x, y) fspec -> I_stfld(x, y, fspec))) + i_stfld, I_field_instr (volatileOrUnalignedPrefix(fun (x, y) fspec -> I_stfld(x, y, fspec))) i_ldsfld, I_field_instr (volatilePrefix (fun x fspec -> I_ldsfld (x, fspec))) i_stsfld, I_field_instr (volatilePrefix (fun x fspec -> I_stsfld (x, fspec))) i_ldflda, I_field_instr (noPrefixes I_ldflda) @@ -756,7 +755,7 @@ let fillInstrs () = let addInstr (i, f) = if i > 0xff then assert (i >>>& 8 = 0xfe) - let i = (i &&& 0xff) + let i = (i &&& 0xff) match twoByteInstrTable.[i] with | I_invalid_instr -> () | _ -> dprintn ("warning: duplicate decode entries for "+string i) @@ -788,7 +787,7 @@ let rec getTwoByteInstr i = type ImageChunk = { size: int32; addr: int32 } let chunk sz next = ({addr=next; size=sz}, next + sz) -let nochunk next = ({addr= 0x0;size= 0x0; } , next) +let nochunk next = ({addr= 0x0;size= 0x0; }, next) type RowElementKind = | UShort @@ -815,73 +814,73 @@ type RowElementKind = type RowKind = RowKind of RowElementKind list -let kindAssemblyRef = RowKind [ UShort; UShort; UShort; UShort; ULong; Blob; SString; SString; Blob; ] -let kindModuleRef = RowKind [ SString ] -let kindFileRef = RowKind [ ULong; SString; Blob ] -let kindTypeRef = RowKind [ ResolutionScope; SString; SString ] -let kindTypeSpec = RowKind [ Blob ] -let kindTypeDef = RowKind [ ULong; SString; SString; TypeDefOrRefOrSpec; SimpleIndex TableNames.Field; SimpleIndex TableNames.Method ] -let kindPropertyMap = RowKind [ SimpleIndex TableNames.TypeDef; SimpleIndex TableNames.Property ] -let kindEventMap = RowKind [ SimpleIndex TableNames.TypeDef; SimpleIndex TableNames.Event ] -let kindInterfaceImpl = RowKind [ SimpleIndex TableNames.TypeDef; TypeDefOrRefOrSpec ] -let kindNested = RowKind [ SimpleIndex TableNames.TypeDef; SimpleIndex TableNames.TypeDef ] -let kindCustomAttribute = RowKind [ HasCustomAttribute; CustomAttributeType; Blob ] -let kindDeclSecurity = RowKind [ UShort; HasDeclSecurity; Blob ] -let kindMemberRef = RowKind [ MemberRefParent; SString; Blob ] -let kindStandAloneSig = RowKind [ Blob ] -let kindFieldDef = RowKind [ UShort; SString; Blob ] -let kindFieldRVA = RowKind [ Data; SimpleIndex TableNames.Field ] -let kindFieldMarshal = RowKind [ HasFieldMarshal; Blob ] -let kindConstant = RowKind [ UShort;HasConstant; Blob ] -let kindFieldLayout = RowKind [ ULong; SimpleIndex TableNames.Field ] -let kindParam = RowKind [ UShort; UShort; SString ] -let kindMethodDef = RowKind [ ULong; UShort; UShort; SString; Blob; SimpleIndex TableNames.Param ] -let kindMethodImpl = RowKind [ SimpleIndex TableNames.TypeDef; MethodDefOrRef; MethodDefOrRef ] -let kindImplMap = RowKind [ UShort; MemberForwarded; SString; SimpleIndex TableNames.ModuleRef ] -let kindMethodSemantics = RowKind [ UShort; SimpleIndex TableNames.Method; HasSemantics ] -let kindProperty = RowKind [ UShort; SString; Blob ] -let kindEvent = RowKind [ UShort; SString; TypeDefOrRefOrSpec ] -let kindManifestResource = RowKind [ ULong; ULong; SString; Implementation ] -let kindClassLayout = RowKind [ UShort; ULong; SimpleIndex TableNames.TypeDef ] -let kindExportedType = RowKind [ ULong; ULong; SString; SString; Implementation ] -let kindAssembly = RowKind [ ULong; UShort; UShort; UShort; UShort; ULong; Blob; SString; SString ] -let kindGenericParam_v1_1 = RowKind [ UShort; UShort; TypeOrMethodDef; SString; TypeDefOrRefOrSpec ] -let kindGenericParam_v2_0 = RowKind [ UShort; UShort; TypeOrMethodDef; SString ] -let kindMethodSpec = RowKind [ MethodDefOrRef; Blob ] +let kindAssemblyRef = RowKind [ UShort; UShort; UShort; UShort; ULong; Blob; SString; SString; Blob; ] +let kindModuleRef = RowKind [ SString ] +let kindFileRef = RowKind [ ULong; SString; Blob ] +let kindTypeRef = RowKind [ ResolutionScope; SString; SString ] +let kindTypeSpec = RowKind [ Blob ] +let kindTypeDef = RowKind [ ULong; SString; SString; TypeDefOrRefOrSpec; SimpleIndex TableNames.Field; SimpleIndex TableNames.Method ] +let kindPropertyMap = RowKind [ SimpleIndex TableNames.TypeDef; SimpleIndex TableNames.Property ] +let kindEventMap = RowKind [ SimpleIndex TableNames.TypeDef; SimpleIndex TableNames.Event ] +let kindInterfaceImpl = RowKind [ SimpleIndex TableNames.TypeDef; TypeDefOrRefOrSpec ] +let kindNested = RowKind [ SimpleIndex TableNames.TypeDef; SimpleIndex TableNames.TypeDef ] +let kindCustomAttribute = RowKind [ HasCustomAttribute; CustomAttributeType; Blob ] +let kindDeclSecurity = RowKind [ UShort; HasDeclSecurity; Blob ] +let kindMemberRef = RowKind [ MemberRefParent; SString; Blob ] +let kindStandAloneSig = RowKind [ Blob ] +let kindFieldDef = RowKind [ UShort; SString; Blob ] +let kindFieldRVA = RowKind [ Data; SimpleIndex TableNames.Field ] +let kindFieldMarshal = RowKind [ HasFieldMarshal; Blob ] +let kindConstant = RowKind [ UShort;HasConstant; Blob ] +let kindFieldLayout = RowKind [ ULong; SimpleIndex TableNames.Field ] +let kindParam = RowKind [ UShort; UShort; SString ] +let kindMethodDef = RowKind [ ULong; UShort; UShort; SString; Blob; SimpleIndex TableNames.Param ] +let kindMethodImpl = RowKind [ SimpleIndex TableNames.TypeDef; MethodDefOrRef; MethodDefOrRef ] +let kindImplMap = RowKind [ UShort; MemberForwarded; SString; SimpleIndex TableNames.ModuleRef ] +let kindMethodSemantics = RowKind [ UShort; SimpleIndex TableNames.Method; HasSemantics ] +let kindProperty = RowKind [ UShort; SString; Blob ] +let kindEvent = RowKind [ UShort; SString; TypeDefOrRefOrSpec ] +let kindManifestResource = RowKind [ ULong; ULong; SString; Implementation ] +let kindClassLayout = RowKind [ UShort; ULong; SimpleIndex TableNames.TypeDef ] +let kindExportedType = RowKind [ ULong; ULong; SString; SString; Implementation ] +let kindAssembly = RowKind [ ULong; UShort; UShort; UShort; UShort; ULong; Blob; SString; SString ] +let kindGenericParam_v1_1 = RowKind [ UShort; UShort; TypeOrMethodDef; SString; TypeDefOrRefOrSpec ] +let kindGenericParam_v2_0 = RowKind [ UShort; UShort; TypeOrMethodDef; SString ] +let kindMethodSpec = RowKind [ MethodDefOrRef; Blob ] let kindGenericParamConstraint = RowKind [ SimpleIndex TableNames.GenericParam; TypeDefOrRefOrSpec ] -let kindModule = RowKind [ UShort; SString; GGuid; GGuid; GGuid ] -let kindIllegal = RowKind [ ] +let kindModule = RowKind [ UShort; SString; GGuid; GGuid; GGuid ] +let kindIllegal = RowKind [ ] //--------------------------------------------------------------------- -// Used for binary searches of sorted tables. Each function that reads +// Used for binary searches of sorted tables. Each function that reads // a table row returns a tuple that contains the elements of the row. -// One of these elements may be a key for a sorted table. These +// One of these elements may be a key for a sorted table. These // keys can be compared using the functions below depending on the // kind of element in that column. //--------------------------------------------------------------------- -let hcCompare (TaggedIndex((t1: HasConstantTag), (idx1:int))) (TaggedIndex((t2: HasConstantTag), idx2)) = +let hcCompare (TaggedIndex((t1: HasConstantTag), (idx1: int))) (TaggedIndex((t2: HasConstantTag), idx2)) = if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1.Tag t2.Tag -let hsCompare (TaggedIndex((t1:HasSemanticsTag), (idx1:int))) (TaggedIndex((t2:HasSemanticsTag), idx2)) = +let hsCompare (TaggedIndex((t1: HasSemanticsTag), (idx1: int))) (TaggedIndex((t2: HasSemanticsTag), idx2)) = if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1.Tag t2.Tag -let hcaCompare (TaggedIndex((t1:HasCustomAttributeTag), (idx1:int))) (TaggedIndex((t2:HasCustomAttributeTag), idx2)) = +let hcaCompare (TaggedIndex((t1: HasCustomAttributeTag), (idx1: int))) (TaggedIndex((t2: HasCustomAttributeTag), idx2)) = if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1.Tag t2.Tag -let mfCompare (TaggedIndex((t1:MemberForwardedTag), (idx1:int))) (TaggedIndex((t2:MemberForwardedTag), idx2)) = +let mfCompare (TaggedIndex((t1: MemberForwardedTag), (idx1: int))) (TaggedIndex((t2: MemberForwardedTag), idx2)) = if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1.Tag t2.Tag -let hdsCompare (TaggedIndex((t1:HasDeclSecurityTag), (idx1:int))) (TaggedIndex((t2:HasDeclSecurityTag), idx2)) = +let hdsCompare (TaggedIndex((t1: HasDeclSecurityTag), (idx1: int))) (TaggedIndex((t2: HasDeclSecurityTag), idx2)) = if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1.Tag t2.Tag -let hfmCompare (TaggedIndex((t1:HasFieldMarshalTag), idx1)) (TaggedIndex((t2:HasFieldMarshalTag), idx2)) = +let hfmCompare (TaggedIndex((t1: HasFieldMarshalTag), idx1)) (TaggedIndex((t2: HasFieldMarshalTag), idx2)) = if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1.Tag t2.Tag -let tomdCompare (TaggedIndex((t1:TypeOrMethodDefTag), idx1)) (TaggedIndex((t2:TypeOrMethodDefTag), idx2)) = +let tomdCompare (TaggedIndex((t1: TypeOrMethodDefTag), idx1)) (TaggedIndex((t2: TypeOrMethodDefTag), idx2)) = if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1.Tag t2.Tag -let simpleIndexCompare (idx1:int) (idx2:int) = +let simpleIndexCompare (idx1: int) (idx2: int) = compare idx1 idx2 //--------------------------------------------------------------------- @@ -894,8 +893,8 @@ type BlobAsMethodSigIdx = BlobAsMethodSigIdx of int * int32 type BlobAsFieldSigIdx = BlobAsFieldSigIdx of int * int32 type BlobAsPropSigIdx = BlobAsPropSigIdx of int * int32 type BlobAsLocalSigIdx = BlobAsLocalSigIdx of int * int32 -type MemberRefAsMspecIdx = MemberRefAsMspecIdx of int * int -type MethodSpecAsMspecIdx = MethodSpecAsMspecIdx of int * int +type MemberRefAsMspecIdx = MemberRefAsMspecIdx of int * int +type MethodSpecAsMspecIdx = MethodSpecAsMspecIdx of int * int type MemberRefAsFspecIdx = MemberRefAsFspecIdx of int * int type CustomAttrIdx = CustomAttrIdx of CustomAttributeTypeTag * int * int32 type GenericParamsIdx = GenericParamsIdx of int * TypeOrMethodDefTag * int @@ -904,17 +903,17 @@ type GenericParamsIdx = GenericParamsIdx of int * TypeOrMethodDefTag * int // Polymorphic caches for row and heap readers //--------------------------------------------------------------------- -let mkCacheInt32 lowMem _inbase _nm _sz = +let mkCacheInt32 lowMem _inbase _nm _sz = if lowMem then (fun f x -> f x) else let cache = ref null let count = ref 0 #if STATISTICS - addReport (fun oc -> if !count <> 0 then oc.WriteLine ((_inbase + string !count + " "+ _nm + " cache hits") : string)) + addReport (fun oc -> if !count <> 0 then oc.WriteLine ((_inbase + string !count + " "+ _nm + " cache hits"): string)) #endif - fun f (idx:int32) -> + fun f (idx: int32) -> let cache = match !cache with - | null -> cache := new Dictionary(11) + | null -> cache := new Dictionary(11) | _ -> () !cache #if FABLE_COMPILER @@ -931,17 +930,17 @@ let mkCacheInt32 lowMem _inbase _nm _sz = cache.[idx] <- res res -let mkCacheGeneric lowMem _inbase _nm _sz = +let mkCacheGeneric lowMem _inbase _nm _sz = if lowMem then (fun f x -> f x) else let cache = ref null let count = ref 0 #if STATISTICS - addReport (fun oc -> if !count <> 0 then oc.WriteLine ((_inbase + string !count + " " + _nm + " cache hits") : string)) + addReport (fun oc -> if !count <> 0 then oc.WriteLine ((_inbase + string !count + " " + _nm + " cache hits"): string)) #endif fun f (idx :'T) -> let cache = match !cache with - | null -> cache := new Dictionary<_, _>(11 (* sz:int *) ) + | null -> cache := new Dictionary<_, _>(11 (* sz: int *) ) | _ -> () !cache match cache.TryGetValue(idx) with @@ -959,7 +958,7 @@ let mkCacheGeneric lowMem _inbase _nm _sz = let seekFindRow numRows rowChooser = let mutable i = 1 - while (i <= numRows && not (rowChooser i)) do + while (i <= numRows && not (rowChooser i)) do i <- i + 1 if i > numRows then dprintn "warning: seekFindRow: row not found" i @@ -972,7 +971,7 @@ let seekReadIndexedRows (numRows, rowReader, keyFunc, keyComparer, binaryChop, r begin let mutable fin = false while not fin do - if high - low <= 1 then + if high - low <= 1 then fin <- true else let mid = (low + high) / 2 @@ -1073,19 +1072,19 @@ type PEReader = #endif entryPointToken: TableName * int pefile: BinaryFile - textSegmentPhysicalLoc : int32 - textSegmentPhysicalSize : int32 - dataSegmentPhysicalLoc : int32 - dataSegmentPhysicalSize : int32 - anyV2P : (string * int32) -> int32 + textSegmentPhysicalLoc: int32 + textSegmentPhysicalSize: int32 + dataSegmentPhysicalLoc: int32 + dataSegmentPhysicalSize: int32 + anyV2P: (string * int32) -> int32 metadataAddr: int32 - sectionHeaders : (int32 * int32 * int32) list - nativeResourcesAddr:int32 - nativeResourcesSize:int32 - resourcesAddr:int32 - strongnameAddr:int32 - vtableFixupsAddr:int32 - noFileOnDisk:bool + sectionHeaders: (int32 * int32 * int32) list + nativeResourcesAddr: int32 + nativeResourcesSize: int32 + resourcesAddr: int32 + strongnameAddr: int32 + vtableFixupsAddr: int32 + noFileOnDisk: bool } [] @@ -1096,7 +1095,7 @@ type ILMetadataReader = pectxtCaptured: PEReader option // only set when reading full PE including code etc. for static linking entryPointToken: TableName * int dataEndPoints: Lazy - fileName:string + fileName: string getNumRows: TableName -> int userStringsStreamPhysicalLoc: int32 stringsStreamPhysicalLoc: int32 @@ -1106,47 +1105,47 @@ type ILMetadataReader = memoizeString: string -> string readStringHeap: (int32 -> string) readBlobHeap: (int32 -> byte[]) - guidsStreamPhysicalLoc : int32 - rowAddr : (TableName -> int -> int32) - tableBigness : bool array - rsBigness : bool - tdorBigness : bool - tomdBigness : bool - hcBigness : bool - hcaBigness : bool - hfmBigness : bool - hdsBigness : bool - mrpBigness : bool - hsBigness : bool - mdorBigness : bool - mfBigness : bool - iBigness : bool - catBigness : bool + guidsStreamPhysicalLoc: int32 + rowAddr: (TableName -> int -> int32) + tableBigness: bool [] + rsBigness: bool + tdorBigness: bool + tomdBigness: bool + hcBigness: bool + hcaBigness: bool + hfmBigness: bool + hdsBigness: bool + mrpBigness: bool + hsBigness: bool + mdorBigness: bool + mfBigness: bool + iBigness: bool + catBigness: bool stringsBigness: bool guidsBigness: bool blobsBigness: bool - seekReadNestedRow : int -> int * int - seekReadConstantRow : int -> uint16 * TaggedIndex * int32 - seekReadMethodSemanticsRow : int -> int32 * int * TaggedIndex - seekReadTypeDefRow : int -> int32 * int32 * int32 * TaggedIndex * int * int - seekReadAssemblyRef : int -> ILAssemblyRef - seekReadMethodSpecAsMethodData : MethodSpecAsMspecIdx -> VarArgMethodData - seekReadMemberRefAsMethodData : MemberRefAsMspecIdx -> VarArgMethodData - seekReadMemberRefAsFieldSpec : MemberRefAsFspecIdx -> ILFieldSpec - seekReadCustomAttr : CustomAttrIdx -> ILAttribute - seekReadTypeRef : int ->ILTypeRef - seekReadTypeRefAsType : TypeRefAsTypIdx -> ILType - readBlobHeapAsPropertySig : BlobAsPropSigIdx -> ILThisConvention * ILType * ILTypes - readBlobHeapAsFieldSig : BlobAsFieldSigIdx -> ILType - readBlobHeapAsMethodSig : BlobAsMethodSigIdx -> bool * int32 * ILCallingConv * ILType * ILTypes * ILVarArgs - readBlobHeapAsLocalsSig : BlobAsLocalSigIdx -> ILLocal list - seekReadTypeDefAsType : TypeDefAsTypIdx -> ILType - seekReadMethodDefAsMethodData : int -> MethodData - seekReadGenericParams : GenericParamsIdx -> ILGenericParameterDef list - seekReadFieldDefAsFieldSpec : int -> ILFieldSpec - customAttrsReader_Module : ILAttributesStored - customAttrsReader_Assembly : ILAttributesStored - customAttrsReader_TypeDef : ILAttributesStored + seekReadNestedRow: int -> int * int + seekReadConstantRow: int -> uint16 * TaggedIndex * int32 + seekReadMethodSemanticsRow: int -> int32 * int * TaggedIndex + seekReadTypeDefRow: int -> int32 * int32 * int32 * TaggedIndex * int * int + seekReadAssemblyRef: int -> ILAssemblyRef + seekReadMethodSpecAsMethodData: MethodSpecAsMspecIdx -> VarArgMethodData + seekReadMemberRefAsMethodData: MemberRefAsMspecIdx -> VarArgMethodData + seekReadMemberRefAsFieldSpec: MemberRefAsFspecIdx -> ILFieldSpec + seekReadCustomAttr: CustomAttrIdx -> ILAttribute + seekReadTypeRef: int ->ILTypeRef + seekReadTypeRefAsType: TypeRefAsTypIdx -> ILType + readBlobHeapAsPropertySig: BlobAsPropSigIdx -> ILThisConvention * ILType * ILTypes + readBlobHeapAsFieldSig: BlobAsFieldSigIdx -> ILType + readBlobHeapAsMethodSig: BlobAsMethodSigIdx -> bool * int32 * ILCallingConv * ILType * ILTypes * ILVarArgs + readBlobHeapAsLocalsSig: BlobAsLocalSigIdx -> ILLocal list + seekReadTypeDefAsType: TypeDefAsTypIdx -> ILType + seekReadMethodDefAsMethodData: int -> MethodData + seekReadGenericParams: GenericParamsIdx -> ILGenericParameterDef list + seekReadFieldDefAsFieldSpec: int -> ILFieldSpec + customAttrsReader_Module: ILAttributesStored + customAttrsReader_Assembly: ILAttributesStored + customAttrsReader_TypeDef: ILAttributesStored customAttrsReader_GenericParam: ILAttributesStored customAttrsReader_FieldDef: ILAttributesStored customAttrsReader_MethodDef: ILAttributesStored @@ -1155,10 +1154,10 @@ type ILMetadataReader = customAttrsReader_Property: ILAttributesStored customAttrsReader_ManifestResource: ILAttributesStored customAttrsReader_ExportedType: ILAttributesStored - securityDeclsReader_TypeDef : ILSecurityDeclsStored - securityDeclsReader_MethodDef : ILSecurityDeclsStored - securityDeclsReader_Assembly : ILSecurityDeclsStored - typeDefReader : ILTypeDefStored } + securityDeclsReader_TypeDef: ILSecurityDeclsStored + securityDeclsReader_MethodDef: ILSecurityDeclsStored + securityDeclsReader_Assembly: ILSecurityDeclsStored + typeDefReader: ILTypeDefStored } #if FABLE_COMPILER // no byref parameters @@ -1211,22 +1210,22 @@ let seekReadTaggedIdx f nbits big mdv (addr: byref) = let seekReadIdx big mdv (addr: byref) = if big then seekReadInt32Adv mdv &addr else seekReadUInt16AsInt32Adv mdv &addr -let seekReadUntaggedIdx (tab:TableName) (ctxt: ILMetadataReader) mdv (addr: byref) = +let seekReadUntaggedIdx (tab: TableName) (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadIdx ctxt.tableBigness.[tab.Index] mdv &addr -let seekReadResolutionScopeIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkResolutionScopeTag 2 ctxt.rsBigness mdv &addr -let seekReadTypeDefOrRefOrSpecIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkTypeDefOrRefOrSpecTag 2 ctxt.tdorBigness mdv &addr -let seekReadTypeOrMethodDefIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkTypeOrMethodDefTag 1 ctxt.tomdBigness mdv &addr -let seekReadHasConstantIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasConstantTag 2 ctxt.hcBigness mdv &addr -let seekReadHasCustomAttributeIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasCustomAttributeTag 5 ctxt.hcaBigness mdv &addr -let seekReadHasFieldMarshalIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasFieldMarshalTag 1 ctxt.hfmBigness mdv &addr -let seekReadHasDeclSecurityIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasDeclSecurityTag 2 ctxt.hdsBigness mdv &addr -let seekReadMemberRefParentIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkMemberRefParentTag 3 ctxt.mrpBigness mdv &addr -let seekReadHasSemanticsIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasSemanticsTag 1 ctxt.hsBigness mdv &addr -let seekReadMethodDefOrRefIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkMethodDefOrRefTag 1 ctxt.mdorBigness mdv &addr -let seekReadMemberForwardedIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkMemberForwardedTag 1 ctxt.mfBigness mdv &addr -let seekReadImplementationIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkImplementationTag 2 ctxt.iBigness mdv &addr +let seekReadResolutionScopeIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkResolutionScopeTag 2 ctxt.rsBigness mdv &addr +let seekReadTypeDefOrRefOrSpecIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkTypeDefOrRefOrSpecTag 2 ctxt.tdorBigness mdv &addr +let seekReadTypeOrMethodDefIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkTypeOrMethodDefTag 1 ctxt.tomdBigness mdv &addr +let seekReadHasConstantIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasConstantTag 2 ctxt.hcBigness mdv &addr +let seekReadHasCustomAttributeIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasCustomAttributeTag 5 ctxt.hcaBigness mdv &addr +let seekReadHasFieldMarshalIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasFieldMarshalTag 1 ctxt.hfmBigness mdv &addr +let seekReadHasDeclSecurityIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasDeclSecurityTag 2 ctxt.hdsBigness mdv &addr +let seekReadMemberRefParentIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkMemberRefParentTag 3 ctxt.mrpBigness mdv &addr +let seekReadHasSemanticsIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasSemanticsTag 1 ctxt.hsBigness mdv &addr +let seekReadMethodDefOrRefIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkMethodDefOrRefTag 1 ctxt.mdorBigness mdv &addr +let seekReadMemberForwardedIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkMemberForwardedTag 1 ctxt.mfBigness mdv &addr +let seekReadImplementationIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkImplementationTag 2 ctxt.iBigness mdv &addr let seekReadCustomAttributeTypeIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkILCustomAttributeTypeTag 3 ctxt.catBigness mdv &addr let seekReadStringIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadIdx ctxt.stringsBigness mdv &addr let seekReadGuidIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadIdx ctxt.guidsBigness mdv &addr @@ -1251,9 +1250,9 @@ let seekReadTypeRefRow (ctxt: ILMetadataReader) mdv idx = (scopeIdx, nameIdx, namespaceIdx) /// Read Table ILTypeDef. -let seekReadTypeDefRow (ctxt: ILMetadataReader) idx = ctxt.seekReadTypeDefRow idx +let seekReadTypeDefRow (ctxt: ILMetadataReader) idx = ctxt.seekReadTypeDefRow idx let seekReadTypeDefRowUncached ctxtH idx = - let (ctxt : ILMetadataReader) = getHole ctxtH + let (ctxt: ILMetadataReader) = getHole ctxtH let mdv = ctxt.mdfile.GetView() let mutable addr = rowAddr ctxt TableNames.TypeDef idx let flags = seekReadInt32Adv mdv &addr @@ -1265,7 +1264,7 @@ let seekReadTypeDefRowUncached ctxtH idx = (flags, nameIdx, namespaceIdx, extendsIdx, fieldsIdx, methodsIdx) /// Read Table Field. -let seekReadFieldRow (ctxt: ILMetadataReader) mdv idx = +let seekReadFieldRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.Field idx let flags = seekReadUInt16AsInt32Adv mdv &addr let nameIdx = seekReadStringIdx ctxt mdv &addr @@ -1273,7 +1272,7 @@ let seekReadFieldRow (ctxt: ILMetadataReader) mdv idx = (flags, nameIdx, typeIdx) /// Read Table Method. -let seekReadMethodRow (ctxt: ILMetadataReader) mdv idx = +let seekReadMethodRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.Method idx let codeRVA = seekReadInt32Adv mdv &addr let implflags = seekReadUInt16AsInt32Adv mdv &addr @@ -1284,22 +1283,22 @@ let seekReadMethodRow (ctxt: ILMetadataReader) mdv idx = (codeRVA, implflags, flags, nameIdx, typeIdx, paramIdx) /// Read Table Param. -let seekReadParamRow (ctxt: ILMetadataReader) mdv idx = +let seekReadParamRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.Param idx let flags = seekReadUInt16AsInt32Adv mdv &addr - let seq = seekReadUInt16AsInt32Adv mdv &addr + let seq = seekReadUInt16AsInt32Adv mdv &addr let nameIdx = seekReadStringIdx ctxt mdv &addr (flags, seq, nameIdx) /// Read Table InterfaceImpl. -let seekReadInterfaceImplRow (ctxt: ILMetadataReader) mdv idx = +let seekReadInterfaceImplRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.InterfaceImpl idx let tidx = seekReadUntaggedIdx TableNames.TypeDef ctxt mdv &addr let intfIdx = seekReadTypeDefOrRefOrSpecIdx ctxt mdv &addr (tidx, intfIdx) /// Read Table MemberRef. -let seekReadMemberRefRow (ctxt: ILMetadataReader) mdv idx = +let seekReadMemberRefRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.MemberRef idx let mrpIdx = seekReadMemberRefParentIdx ctxt mdv &addr let nameIdx = seekReadStringIdx ctxt mdv &addr @@ -1307,9 +1306,9 @@ let seekReadMemberRefRow (ctxt: ILMetadataReader) mdv idx = (mrpIdx, nameIdx, typeIdx) /// Read Table Constant. -let seekReadConstantRow (ctxt: ILMetadataReader) idx = ctxt.seekReadConstantRow idx +let seekReadConstantRow (ctxt: ILMetadataReader) idx = ctxt.seekReadConstantRow idx let seekReadConstantRowUncached ctxtH idx = - let (ctxt: ILMetadataReader) = getHole ctxtH + let (ctxt: ILMetadataReader) = getHole ctxtH let mdv = ctxt.mdfile.GetView() let mutable addr = rowAddr ctxt TableNames.Constant idx let kind = seekReadUInt16Adv mdv &addr @@ -1318,7 +1317,7 @@ let seekReadConstantRowUncached ctxtH idx = (kind, parentIdx, valIdx) /// Read Table CustomAttribute. -let seekReadCustomAttributeRow (ctxt: ILMetadataReader) idx = +let seekReadCustomAttributeRow (ctxt: ILMetadataReader) idx = let mdv = ctxt.mdfile.GetView() let mutable addr = rowAddr ctxt TableNames.CustomAttribute idx let parentIdx = seekReadHasCustomAttributeIdx ctxt mdv &addr @@ -1327,14 +1326,14 @@ let seekReadCustomAttributeRow (ctxt: ILMetadataReader) idx = (parentIdx, typeIdx, valIdx) /// Read Table FieldMarshal. -let seekReadFieldMarshalRow (ctxt: ILMetadataReader) mdv idx = +let seekReadFieldMarshalRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.FieldMarshal idx let parentIdx = seekReadHasFieldMarshalIdx ctxt mdv &addr let typeIdx = seekReadBlobIdx ctxt mdv &addr (parentIdx, typeIdx) /// Read Table Permission. -let seekReadPermissionRow (ctxt: ILMetadataReader) mdv idx = +let seekReadPermissionRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.Permission idx let action = seekReadUInt16Adv mdv &addr let parentIdx = seekReadHasDeclSecurityIdx ctxt mdv &addr @@ -1342,7 +1341,7 @@ let seekReadPermissionRow (ctxt: ILMetadataReader) mdv idx = (action, parentIdx, typeIdx) /// Read Table ClassLayout. -let seekReadClassLayoutRow (ctxt: ILMetadataReader) mdv idx = +let seekReadClassLayoutRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.ClassLayout idx let pack = seekReadUInt16Adv mdv &addr let size = seekReadInt32Adv mdv &addr @@ -1350,27 +1349,27 @@ let seekReadClassLayoutRow (ctxt: ILMetadataReader) mdv idx = (pack, size, tidx) /// Read Table FieldLayout. -let seekReadFieldLayoutRow (ctxt: ILMetadataReader) mdv idx = +let seekReadFieldLayoutRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.FieldLayout idx let offset = seekReadInt32Adv mdv &addr let fidx = seekReadUntaggedIdx TableNames.Field ctxt mdv &addr (offset, fidx) //// Read Table StandAloneSig. -let seekReadStandAloneSigRow (ctxt: ILMetadataReader) mdv idx = +let seekReadStandAloneSigRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.StandAloneSig idx let sigIdx = seekReadBlobIdx ctxt mdv &addr sigIdx /// Read Table EventMap. -let seekReadEventMapRow (ctxt: ILMetadataReader) mdv idx = +let seekReadEventMapRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.EventMap idx let tidx = seekReadUntaggedIdx TableNames.TypeDef ctxt mdv &addr let eventsIdx = seekReadUntaggedIdx TableNames.Event ctxt mdv &addr (tidx, eventsIdx) /// Read Table Event. -let seekReadEventRow (ctxt: ILMetadataReader) mdv idx = +let seekReadEventRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.Event idx let flags = seekReadUInt16AsInt32Adv mdv &addr let nameIdx = seekReadStringIdx ctxt mdv &addr @@ -1378,14 +1377,14 @@ let seekReadEventRow (ctxt: ILMetadataReader) mdv idx = (flags, nameIdx, typIdx) /// Read Table PropertyMap. -let seekReadPropertyMapRow (ctxt: ILMetadataReader) mdv idx = +let seekReadPropertyMapRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.PropertyMap idx let tidx = seekReadUntaggedIdx TableNames.TypeDef ctxt mdv &addr let propsIdx = seekReadUntaggedIdx TableNames.Property ctxt mdv &addr (tidx, propsIdx) /// Read Table Property. -let seekReadPropertyRow (ctxt: ILMetadataReader) mdv idx = +let seekReadPropertyRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.Property idx let flags = seekReadUInt16AsInt32Adv mdv &addr let nameIdx = seekReadStringIdx ctxt mdv &addr @@ -1393,9 +1392,9 @@ let seekReadPropertyRow (ctxt: ILMetadataReader) mdv idx = (flags, nameIdx, typIdx) /// Read Table MethodSemantics. -let seekReadMethodSemanticsRow (ctxt: ILMetadataReader) idx = ctxt.seekReadMethodSemanticsRow idx +let seekReadMethodSemanticsRow (ctxt: ILMetadataReader) idx = ctxt.seekReadMethodSemanticsRow idx let seekReadMethodSemanticsRowUncached ctxtH idx = - let (ctxt: ILMetadataReader) = getHole ctxtH + let (ctxt: ILMetadataReader) = getHole ctxtH let mdv = ctxt.mdfile.GetView() let mutable addr = rowAddr ctxt TableNames.MethodSemantics idx let flags = seekReadUInt16AsInt32Adv mdv &addr @@ -1404,7 +1403,7 @@ let seekReadMethodSemanticsRowUncached ctxtH idx = (flags, midx, assocIdx) /// Read Table MethodImpl. -let seekReadMethodImplRow (ctxt: ILMetadataReader) mdv idx = +let seekReadMethodImplRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.MethodImpl idx let tidx = seekReadUntaggedIdx TableNames.TypeDef ctxt mdv &addr let mbodyIdx = seekReadMethodDefOrRefIdx ctxt mdv &addr @@ -1412,19 +1411,19 @@ let seekReadMethodImplRow (ctxt: ILMetadataReader) mdv idx = (tidx, mbodyIdx, mdeclIdx) /// Read Table ILModuleRef. -let seekReadModuleRefRow (ctxt: ILMetadataReader) mdv idx = +let seekReadModuleRefRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.ModuleRef idx let nameIdx = seekReadStringIdx ctxt mdv &addr nameIdx /// Read Table ILTypeSpec. -let seekReadTypeSpecRow (ctxt: ILMetadataReader) mdv idx = +let seekReadTypeSpecRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.TypeSpec idx let blobIdx = seekReadBlobIdx ctxt mdv &addr blobIdx /// Read Table ImplMap. -let seekReadImplMapRow (ctxt: ILMetadataReader) mdv idx = +let seekReadImplMapRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.ImplMap idx let flags = seekReadUInt16AsInt32Adv mdv &addr let forwrdedIdx = seekReadMemberForwardedIdx ctxt mdv &addr @@ -1433,14 +1432,14 @@ let seekReadImplMapRow (ctxt: ILMetadataReader) mdv idx = (flags, forwrdedIdx, nameIdx, scopeIdx) /// Read Table FieldRVA. -let seekReadFieldRVARow (ctxt: ILMetadataReader) mdv idx = +let seekReadFieldRVARow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.FieldRVA idx let rva = seekReadInt32Adv mdv &addr let fidx = seekReadUntaggedIdx TableNames.Field ctxt mdv &addr (rva, fidx) /// Read Table Assembly. -let seekReadAssemblyRow (ctxt: ILMetadataReader) mdv idx = +let seekReadAssemblyRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.Assembly idx let hash = seekReadInt32Adv mdv &addr let v1 = seekReadUInt16Adv mdv &addr @@ -1454,7 +1453,7 @@ let seekReadAssemblyRow (ctxt: ILMetadataReader) mdv idx = (hash, v1, v2, v3, v4, flags, publicKeyIdx, nameIdx, localeIdx) /// Read Table ILAssemblyRef. -let seekReadAssemblyRefRow (ctxt: ILMetadataReader) mdv idx = +let seekReadAssemblyRefRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.AssemblyRef idx let v1 = seekReadUInt16Adv mdv &addr let v2 = seekReadUInt16Adv mdv &addr @@ -1468,7 +1467,7 @@ let seekReadAssemblyRefRow (ctxt: ILMetadataReader) mdv idx = (v1, v2, v3, v4, flags, publicKeyOrTokenIdx, nameIdx, localeIdx, hashValueIdx) /// Read Table File. -let seekReadFileRow (ctxt: ILMetadataReader) mdv idx = +let seekReadFileRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.File idx let flags = seekReadInt32Adv mdv &addr let nameIdx = seekReadStringIdx ctxt mdv &addr @@ -1476,7 +1475,7 @@ let seekReadFileRow (ctxt: ILMetadataReader) mdv idx = (flags, nameIdx, hashValueIdx) /// Read Table ILExportedTypeOrForwarder. -let seekReadExportedTypeRow (ctxt: ILMetadataReader) mdv idx = +let seekReadExportedTypeRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.ExportedType idx let flags = seekReadInt32Adv mdv &addr let tok = seekReadInt32Adv mdv &addr @@ -1486,7 +1485,7 @@ let seekReadExportedTypeRow (ctxt: ILMetadataReader) mdv idx = (flags, tok, nameIdx, namespaceIdx, implIdx) /// Read Table ManifestResource. -let seekReadManifestResourceRow (ctxt: ILMetadataReader) mdv idx = +let seekReadManifestResourceRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.ManifestResource idx let offset = seekReadInt32Adv mdv &addr let flags = seekReadInt32Adv mdv &addr @@ -1495,9 +1494,9 @@ let seekReadManifestResourceRow (ctxt: ILMetadataReader) mdv idx = (offset, flags, nameIdx, implIdx) /// Read Table Nested. -let seekReadNestedRow (ctxt: ILMetadataReader) idx = ctxt.seekReadNestedRow idx +let seekReadNestedRow (ctxt: ILMetadataReader) idx = ctxt.seekReadNestedRow idx let seekReadNestedRowUncached ctxtH idx = - let (ctxt: ILMetadataReader) = getHole ctxtH + let (ctxt: ILMetadataReader) = getHole ctxtH let mdv = ctxt.mdfile.GetView() let mutable addr = rowAddr ctxt TableNames.Nested idx let nestedIdx = seekReadUntaggedIdx TableNames.TypeDef ctxt mdv &addr @@ -1505,7 +1504,7 @@ let seekReadNestedRowUncached ctxtH idx = (nestedIdx, enclIdx) /// Read Table GenericParam. -let seekReadGenericParamRow (ctxt: ILMetadataReader) mdv idx = +let seekReadGenericParamRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.GenericParam idx let seq = seekReadUInt16Adv mdv &addr let flags = seekReadUInt16Adv mdv &addr @@ -1514,58 +1513,59 @@ let seekReadGenericParamRow (ctxt: ILMetadataReader) mdv idx = (idx, seq, flags, ownerIdx, nameIdx) // Read Table GenericParamConstraint. -let seekReadGenericParamConstraintRow (ctxt: ILMetadataReader) mdv idx = +let seekReadGenericParamConstraintRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.GenericParamConstraint idx let pidx = seekReadUntaggedIdx TableNames.GenericParam ctxt mdv &addr let constraintIdx = seekReadTypeDefOrRefOrSpecIdx ctxt mdv &addr (pidx, constraintIdx) /// Read Table ILMethodSpec. -let seekReadMethodSpecRow (ctxt: ILMetadataReader) mdv idx = +let seekReadMethodSpecRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = rowAddr ctxt TableNames.MethodSpec idx let mdorIdx = seekReadMethodDefOrRefIdx ctxt mdv &addr let instIdx = seekReadBlobIdx ctxt mdv &addr (mdorIdx, instIdx) + let readUserStringHeapUncached ctxtH idx = - let (ctxt: ILMetadataReader) = getHole ctxtH + let (ctxt: ILMetadataReader) = getHole ctxtH let mdv = ctxt.mdfile.GetView() seekReadUserString mdv (ctxt.userStringsStreamPhysicalLoc + idx) -let readUserStringHeap (ctxt: ILMetadataReader) idx = ctxt.readUserStringHeap idx +let readUserStringHeap (ctxt: ILMetadataReader) idx = ctxt.readUserStringHeap idx let readStringHeapUncached ctxtH idx = - let (ctxt: ILMetadataReader) = getHole ctxtH + let (ctxt: ILMetadataReader) = getHole ctxtH let mdv = ctxt.mdfile.GetView() seekReadUTF8String mdv (ctxt.stringsStreamPhysicalLoc + idx) -let readStringHeap (ctxt: ILMetadataReader) idx = ctxt.readStringHeap idx +let readStringHeap (ctxt: ILMetadataReader) idx = ctxt.readStringHeap idx -let readStringHeapOption (ctxt: ILMetadataReader) idx = if idx = 0 then None else Some (readStringHeap ctxt idx) +let readStringHeapOption (ctxt: ILMetadataReader) idx = if idx = 0 then None else Some (readStringHeap ctxt idx) let emptyByteArray: byte[] = [||] let readBlobHeapUncached ctxtH idx = - let (ctxt: ILMetadataReader) = getHole ctxtH + let (ctxt: ILMetadataReader) = getHole ctxtH let mdv = ctxt.mdfile.GetView() // valid index lies in range [1..streamSize) // NOTE: idx cannot be 0 - Blob\String heap has first empty element that mdv one byte 0 if idx <= 0 || idx >= ctxt.blobsStreamSize then emptyByteArray else seekReadBlob mdv (ctxt.blobsStreamPhysicalLoc + idx) -let readBlobHeap (ctxt: ILMetadataReader) idx = ctxt.readBlobHeap idx +let readBlobHeap (ctxt: ILMetadataReader) idx = ctxt.readBlobHeap idx let readBlobHeapOption ctxt idx = if idx = 0 then None else Some (readBlobHeap ctxt idx) //let readGuidHeap ctxt idx = seekReadGuid ctxt.mdv (ctxt.guidsStreamPhysicalLoc + idx) // read a single value out of a blob heap using the given function -let readBlobHeapAsBool ctxt vidx = fst (sigptrGetBool (readBlobHeap ctxt vidx) 0) -let readBlobHeapAsSByte ctxt vidx = fst (sigptrGetSByte (readBlobHeap ctxt vidx) 0) -let readBlobHeapAsInt16 ctxt vidx = fst (sigptrGetInt16 (readBlobHeap ctxt vidx) 0) -let readBlobHeapAsInt32 ctxt vidx = fst (sigptrGetInt32 (readBlobHeap ctxt vidx) 0) -let readBlobHeapAsInt64 ctxt vidx = fst (sigptrGetInt64 (readBlobHeap ctxt vidx) 0) -let readBlobHeapAsByte ctxt vidx = fst (sigptrGetByte (readBlobHeap ctxt vidx) 0) +let readBlobHeapAsBool ctxt vidx = fst (sigptrGetBool (readBlobHeap ctxt vidx) 0) +let readBlobHeapAsSByte ctxt vidx = fst (sigptrGetSByte (readBlobHeap ctxt vidx) 0) +let readBlobHeapAsInt16 ctxt vidx = fst (sigptrGetInt16 (readBlobHeap ctxt vidx) 0) +let readBlobHeapAsInt32 ctxt vidx = fst (sigptrGetInt32 (readBlobHeap ctxt vidx) 0) +let readBlobHeapAsInt64 ctxt vidx = fst (sigptrGetInt64 (readBlobHeap ctxt vidx) 0) +let readBlobHeapAsByte ctxt vidx = fst (sigptrGetByte (readBlobHeap ctxt vidx) 0) let readBlobHeapAsUInt16 ctxt vidx = fst (sigptrGetUInt16 (readBlobHeap ctxt vidx) 0) let readBlobHeapAsUInt32 ctxt vidx = fst (sigptrGetUInt32 (readBlobHeap ctxt vidx) 0) let readBlobHeapAsUInt64 ctxt vidx = fst (sigptrGetUInt64 (readBlobHeap ctxt vidx) 0) @@ -1574,8 +1574,8 @@ let readBlobHeapAsDouble ctxt vidx = fst (sigptrGetDouble (readBlobHeap ctxt vid //----------------------------------------------------------------------- // Some binaries have raw data embedded their text sections, e.g. mscorlib, for -// field inits. And there is no information that definitively tells us the extent of -// the text section that may be interesting data. But we certainly don't want to duplicate +// field inits. And there is no information that definitively tells us the extent of +// the text section that may be interesting data. But we certainly don't want to duplicate // the entire text section as data! // // So, we assume: @@ -1593,7 +1593,7 @@ let readBlobHeapAsDouble ctxt vidx = fst (sigptrGetDouble (readBlobHeap ctxt vid // For example the assembly came from a type provider // In this case we eagerly read the native resources into memory let readNativeResources (pectxt: PEReader) = - [ if pectxt.nativeResourcesSize <> 0x0 && pectxt.nativeResourcesAddr <> 0x0 then + [ if pectxt.nativeResourcesSize <> 0x0 && pectxt.nativeResourcesAddr <> 0x0 then let start = pectxt.anyV2P (pectxt.fileName + ": native resources", pectxt.nativeResourcesAddr) if pectxt.noFileOnDisk then #if !FX_NO_LINKEDRESOURCES @@ -1610,7 +1610,7 @@ let readNativeResources (pectxt: PEReader) = let getDataEndPointsDelayed (pectxt: PEReader) ctxtH = lazy - let (ctxt: ILMetadataReader) = getHole ctxtH + let (ctxt: ILMetadataReader) = getHole ctxtH let mdv = ctxt.mdfile.GetView() let dataStartPoints = let res = ref [] @@ -1633,7 +1633,7 @@ let getDataEndPointsDelayed (pectxt: PEReader) ctxtH = let nm = readStringHeap ctxt nameIdx res := (nm, rva) :: !res !res - ([ pectxt.textSegmentPhysicalLoc + pectxt.textSegmentPhysicalSize ; + ([ pectxt.textSegmentPhysicalLoc + pectxt.textSegmentPhysicalSize pectxt.dataSegmentPhysicalLoc + pectxt.dataSegmentPhysicalSize ] @ (List.map pectxt.anyV2P @@ -1669,7 +1669,7 @@ let rvaToData (ctxt: ILMetadataReader) (pectxt: PEReader) nm rva = // Read the AbsIL structure (lazily) by reading off the relevant rows. // ---------------------------------------------------------------------- -let isSorted (ctxt: ILMetadataReader) (tab:TableName) = ((ctxt.sorted &&& (int64 1 <<< tab.Index)) <> int64 0x0) +let isSorted (ctxt: ILMetadataReader) (tab: TableName) = ((ctxt.sorted &&& (int64 1 <<< tab.Index)) <> int64 0x0) // Note, pectxtEager and pevEager must not be captured by the results of this function let rec seekReadModule (ctxt: ILMetadataReader) (pectxtEager: PEReader) pevEager peinfo ilMetadataVersion idx = @@ -1716,7 +1716,7 @@ and seekReadAssemblyManifest (ctxt: ILMetadataReader) pectxt idx = Locale= readStringHeapOption ctxt localeIdx CustomAttrsStored = ctxt.customAttrsReader_Assembly MetadataIndex = idx - AssemblyLongevity= + AssemblyLongevity = let masked = flags &&& 0x000e if masked = 0x0000 then ILAssemblyLongevity.Unspecified elif masked = 0x0002 then ILAssemblyLongevity.Library @@ -1733,9 +1733,9 @@ and seekReadAssemblyManifest (ctxt: ILMetadataReader) pectxt idx = JitTracking = 0 <> (flags &&& 0x8000) IgnoreSymbolStoreSequencePoints = 0 <> (flags &&& 0x2000) } -and seekReadAssemblyRef (ctxt: ILMetadataReader) idx = ctxt.seekReadAssemblyRef idx +and seekReadAssemblyRef (ctxt: ILMetadataReader) idx = ctxt.seekReadAssemblyRef idx and seekReadAssemblyRefUncached ctxtH idx = - let (ctxt: ILMetadataReader) = getHole ctxtH + let (ctxt: ILMetadataReader) = getHole ctxtH let mdv = ctxt.mdfile.GetView() let (v1, v2, v3, v4, flags, publicKeyOrTokenIdx, nameIdx, localeIdx, hashValueIdx) = seekReadAssemblyRefRow ctxt mdv idx let nm = readStringHeap ctxt nameIdx @@ -1752,15 +1752,15 @@ and seekReadAssemblyRefUncached ctxtH idx = version=Some(v1, v2, v3, v4), locale=readStringHeapOption ctxt localeIdx) -and seekReadModuleRef (ctxt: ILMetadataReader) mdv idx = +and seekReadModuleRef (ctxt: ILMetadataReader) mdv idx = let (nameIdx) = seekReadModuleRefRow ctxt mdv idx - ILModuleRef.Create(name = readStringHeap ctxt nameIdx, hasMetadata=true, hash=None) + ILModuleRef.Create(name = readStringHeap ctxt nameIdx, hasMetadata=true, hash=None) -and seekReadFile (ctxt: ILMetadataReader) mdv idx = +and seekReadFile (ctxt: ILMetadataReader) mdv idx = let (flags, nameIdx, hashValueIdx) = seekReadFileRow ctxt mdv idx - ILModuleRef.Create(name = readStringHeap ctxt nameIdx, hasMetadata= ((flags &&& 0x0001) = 0x0), hash= readBlobHeapOption ctxt hashValueIdx) + ILModuleRef.Create(name = readStringHeap ctxt nameIdx, hasMetadata= ((flags &&& 0x0001) = 0x0), hash= readBlobHeapOption ctxt hashValueIdx) -and seekReadClassLayout (ctxt: ILMetadataReader) mdv idx = +and seekReadClassLayout (ctxt: ILMetadataReader) mdv idx = match seekReadOptionalIndexedRow (ctxt.getNumRows TableNames.ClassLayout, seekReadClassLayoutRow ctxt mdv, (fun (_, _, tidx) -> tidx), simpleIndexCompare idx, isSorted ctxt TableNames.ClassLayout, (fun (pack, size, _) -> pack, size)) with | None -> { Size = None; Pack = None } | Some (pack, size) -> { Size = Some size; Pack = Some pack } @@ -1776,15 +1776,15 @@ and typeAccessOfFlags flags = elif f = 0x00000005 then ILTypeDefAccess.Nested ILMemberAccess.Assembly else ILTypeDefAccess.Private -and typeLayoutOfFlags (ctxt: ILMetadataReader) mdv flags tidx = +and typeLayoutOfFlags (ctxt: ILMetadataReader) mdv flags tidx = let f = (flags &&& 0x00000018) if f = 0x00000008 then ILTypeDefLayout.Sequential (seekReadClassLayout ctxt mdv tidx) - elif f = 0x00000010 then ILTypeDefLayout.Explicit (seekReadClassLayout ctxt mdv tidx) + elif f = 0x00000010 then ILTypeDefLayout.Explicit (seekReadClassLayout ctxt mdv tidx) else ILTypeDefLayout.Auto and isTopTypeDef flags = - (typeAccessOfFlags flags = ILTypeDefAccess.Private) || - typeAccessOfFlags flags = ILTypeDefAccess.Public + (typeAccessOfFlags flags = ILTypeDefAccess.Private) || + typeAccessOfFlags flags = ILTypeDefAccess.Public and seekIsTopTypeDefOfIdx ctxt idx = let (flags, _, _, _, _, _) = seekReadTypeDefRow ctxt idx @@ -1804,7 +1804,7 @@ and readBlobHeapAsTypeName ctxt (nameIdx, namespaceIdx) = | None -> name | Some ns -> ctxt.memoizeString (ns+"."+name) -and seekReadTypeDefRowExtents (ctxt: ILMetadataReader) _info (idx:int) = +and seekReadTypeDefRowExtents (ctxt: ILMetadataReader) _info (idx: int) = if idx >= ctxt.getNumRows TableNames.TypeDef then ctxt.getNumRows TableNames.Field + 1, ctxt.getNumRows TableNames.Method + 1 @@ -1812,11 +1812,11 @@ and seekReadTypeDefRowExtents (ctxt: ILMetadataReader) _info (idx:int) = let (_, _, _, _, fieldsIdx, methodsIdx) = seekReadTypeDefRow ctxt (idx + 1) fieldsIdx, methodsIdx -and seekReadTypeDefRowWithExtents ctxt (idx:int) = +and seekReadTypeDefRowWithExtents ctxt (idx: int) = let info= seekReadTypeDefRow ctxt idx info, seekReadTypeDefRowExtents ctxt info idx -and seekReadPreTypeDef ctxt toponly (idx:int) = +and seekReadPreTypeDef ctxt toponly (idx: int) = let (flags, nameIdx, namespaceIdx, _, _, _) = seekReadTypeDefRow ctxt idx if toponly && not (isTopTypeDef flags) then None else @@ -1824,7 +1824,7 @@ and seekReadPreTypeDef ctxt toponly (idx:int) = // Return the ILPreTypeDef Some (mkILPreTypeDefRead (ns, n, idx, ctxt.typeDefReader)) -and typeDefReader ctxtH : ILTypeDefStored = +and typeDefReader ctxtH: ILTypeDefStored = mkILTypeDefReader (fun idx -> let (ctxt: ILMetadataReader) = getHole ctxtH @@ -1843,12 +1843,12 @@ and typeDefReader ctxtH : ILTypeDefStored = let mdefs = seekReadMethods ctxt numtypars methodsIdx endMethodsIdx let fdefs = seekReadFields ctxt (numtypars, hasLayout) fieldsIdx endFieldsIdx let nested = seekReadNestedTypeDefs ctxt idx - let impls = seekReadInterfaceImpls ctxt mdv numtypars idx + let impls = seekReadInterfaceImpls ctxt mdv numtypars idx let mimpls = seekReadMethodImpls ctxt numtypars idx - let props = seekReadProperties ctxt numtypars idx + let props = seekReadProperties ctxt numtypars idx let events = seekReadEvents ctxt numtypars idx ILTypeDef.CreateStored(name=nm, - genericParams=typars , + genericParams=typars, attributes= enum(flags), layout = layout, nestedTypes= nested, @@ -1864,13 +1864,13 @@ and typeDefReader ctxtH : ILTypeDefStored = metadataIndex=idx) ) -and seekReadTopTypeDefs (ctxt: ILMetadataReader) = +and seekReadTopTypeDefs (ctxt: ILMetadataReader) = [| for i = 1 to ctxt.getNumRows TableNames.TypeDef do - match seekReadPreTypeDef ctxt true i with + match seekReadPreTypeDef ctxt true i with | None -> () | Some td -> yield td |] -and seekReadNestedTypeDefs (ctxt: ILMetadataReader) tidx = +and seekReadNestedTypeDefs (ctxt: ILMetadataReader) tidx = mkILTypeDefsComputed (fun () -> let nestedIdxs = seekReadIndexedRows (ctxt.getNumRows TableNames.Nested, seekReadNestedRow ctxt, snd, simpleIndexCompare tidx, false, fst) [| for i in nestedIdxs do @@ -1878,7 +1878,7 @@ and seekReadNestedTypeDefs (ctxt: ILMetadataReader) tidx = | None -> () | Some td -> yield td |]) -and seekReadInterfaceImpls (ctxt: ILMetadataReader) mdv numtypars tidx = +and seekReadInterfaceImpls (ctxt: ILMetadataReader) mdv numtypars tidx = seekReadIndexedRows (ctxt.getNumRows TableNames.InterfaceImpl, seekReadInterfaceImplRow ctxt mdv, fst, @@ -1886,11 +1886,11 @@ and seekReadInterfaceImpls (ctxt: ILMetadataReader) mdv numtypars tidx = isSorted ctxt TableNames.InterfaceImpl, (snd >> seekReadTypeDefOrRef ctxt numtypars AsObject (*ok*) List.empty)) -and seekReadGenericParams ctxt numtypars (a, b) : ILGenericParameterDefs = +and seekReadGenericParams ctxt numtypars (a, b): ILGenericParameterDefs = ctxt.seekReadGenericParams (GenericParamsIdx(numtypars, a, b)) and seekReadGenericParamsUncached ctxtH (GenericParamsIdx(numtypars, a, b)) = - let (ctxt: ILMetadataReader) = getHole ctxtH + let (ctxt: ILMetadataReader) = getHole ctxtH let mdv = ctxt.mdfile.GetView() let pars = seekReadIndexedRows @@ -1917,23 +1917,23 @@ and seekReadGenericParamsUncached ctxtH (GenericParamsIdx(numtypars, a, b)) = HasDefaultConstructorConstraint=(flags &&& 0x0010) <> 0 })) pars |> List.sortBy fst |> List.map snd -and seekReadGenericParamConstraints (ctxt: ILMetadataReader) mdv numtypars gpidx = +and seekReadGenericParamConstraints (ctxt: ILMetadataReader) mdv numtypars gpidx = seekReadIndexedRows (ctxt.getNumRows TableNames.GenericParamConstraint, seekReadGenericParamConstraintRow ctxt mdv, fst, simpleIndexCompare gpidx, isSorted ctxt TableNames.GenericParamConstraint, - (snd >> seekReadTypeDefOrRef ctxt numtypars AsObject (*ok*) List.empty)) + (snd >> seekReadTypeDefOrRef ctxt numtypars AsObject (*ok*) List.empty)) -and seekReadTypeDefAsType (ctxt: ILMetadataReader) boxity (ginst:ILTypes) idx = +and seekReadTypeDefAsType (ctxt: ILMetadataReader) boxity (ginst: ILTypes) idx = ctxt.seekReadTypeDefAsType (TypeDefAsTypIdx (boxity, ginst, idx)) and seekReadTypeDefAsTypeUncached ctxtH (TypeDefAsTypIdx (boxity, ginst, idx)) = let ctxt = getHole ctxtH mkILTy boxity (ILTypeSpec.Create(seekReadTypeDefAsTypeRef ctxt idx, ginst)) -and seekReadTypeDefAsTypeRef (ctxt: ILMetadataReader) idx = +and seekReadTypeDefAsTypeRef (ctxt: ILMetadataReader) idx = let enc = if seekIsTopTypeDefOfIdx ctxt idx then [] else @@ -1944,21 +1944,21 @@ and seekReadTypeDefAsTypeRef (ctxt: ILMetadataReader) idx = let nm = readBlobHeapAsTypeName ctxt (nameIdx, namespaceIdx) ILTypeRef.Create(scope=ILScopeRef.Local, enclosing=enc, name = nm ) -and seekReadTypeRef (ctxt: ILMetadataReader) idx = ctxt.seekReadTypeRef idx +and seekReadTypeRef (ctxt: ILMetadataReader) idx = ctxt.seekReadTypeRef idx and seekReadTypeRefUncached ctxtH idx = - let (ctxt: ILMetadataReader) = getHole ctxtH + let (ctxt: ILMetadataReader) = getHole ctxtH let mdv = ctxt.mdfile.GetView() let scopeIdx, nameIdx, namespaceIdx = seekReadTypeRefRow ctxt mdv idx let scope, enc = seekReadTypeRefScope ctxt mdv scopeIdx let nm = readBlobHeapAsTypeName ctxt (nameIdx, namespaceIdx) ILTypeRef.Create(scope=scope, enclosing=enc, name = nm) -and seekReadTypeRefAsType (ctxt: ILMetadataReader) boxity ginst idx = ctxt.seekReadTypeRefAsType (TypeRefAsTypIdx (boxity, ginst, idx)) +and seekReadTypeRefAsType (ctxt: ILMetadataReader) boxity ginst idx = ctxt.seekReadTypeRefAsType (TypeRefAsTypIdx (boxity, ginst, idx)) and seekReadTypeRefAsTypeUncached ctxtH (TypeRefAsTypIdx (boxity, ginst, idx)) = let ctxt = getHole ctxtH mkILTy boxity (ILTypeSpec.Create(seekReadTypeRef ctxt idx, ginst)) -and seekReadTypeDefOrRef (ctxt: ILMetadataReader) numtypars boxity (ginst:ILTypes) (TaggedIndex(tag, idx) ) = +and seekReadTypeDefOrRef (ctxt: ILMetadataReader) numtypars boxity (ginst: ILTypes) (TaggedIndex(tag, idx) ) = let mdv = ctxt.mdfile.GetView() match tag with | tag when tag = tdor_TypeDef -> seekReadTypeDefAsType ctxt boxity ginst idx @@ -1968,7 +1968,7 @@ and seekReadTypeDefOrRef (ctxt: ILMetadataReader) numtypars boxity (ginst:ILTyp readBlobHeapAsType ctxt numtypars (seekReadTypeSpecRow ctxt mdv idx) | _ -> failwith "seekReadTypeDefOrRef ctxt" -and seekReadTypeDefOrRefAsTypeRef (ctxt: ILMetadataReader) (TaggedIndex(tag, idx) ) = +and seekReadTypeDefOrRefAsTypeRef (ctxt: ILMetadataReader) (TaggedIndex(tag, idx) ) = match tag with | tag when tag = tdor_TypeDef -> seekReadTypeDefAsTypeRef ctxt idx | tag when tag = tdor_TypeRef -> seekReadTypeRef ctxt idx @@ -1977,7 +1977,7 @@ and seekReadTypeDefOrRefAsTypeRef (ctxt: ILMetadataReader) (TaggedIndex(tag, id ctxt.ilg.typ_Object.TypeRef | _ -> failwith "seekReadTypeDefOrRefAsTypeRef_readTypeDefOrRefOrSpec" -and seekReadMethodRefParent (ctxt: ILMetadataReader) mdv numtypars (TaggedIndex(tag, idx)) = +and seekReadMethodRefParent (ctxt: ILMetadataReader) mdv numtypars (TaggedIndex(tag, idx)) = match tag with | tag when tag = mrp_TypeRef -> seekReadTypeRefAsType ctxt AsObject (* not ok - no way to tell if a member ref parent is a value type or not *) List.empty idx | tag when tag = mrp_ModuleRef -> mkILTypeForGlobalFunctions (ILScopeRef.Module (seekReadModuleRef ctxt mdv idx)) @@ -1988,7 +1988,7 @@ and seekReadMethodRefParent (ctxt: ILMetadataReader) mdv numtypars (TaggedIndex | tag when tag = mrp_TypeSpec -> readBlobHeapAsType ctxt numtypars (seekReadTypeSpecRow ctxt mdv idx) | _ -> failwith "seekReadMethodRefParent" -and seekReadMethodDefOrRef (ctxt: ILMetadataReader) numtypars (TaggedIndex(tag, idx)) = +and seekReadMethodDefOrRef (ctxt: ILMetadataReader) numtypars (TaggedIndex(tag, idx)) = match tag with | tag when tag = mdor_MethodDef -> let (MethodData(enclTy, cc, nm, argtys, retty, minst)) = seekReadMethodDefAsMethodData ctxt idx @@ -1997,12 +1997,12 @@ and seekReadMethodDefOrRef (ctxt: ILMetadataReader) numtypars (TaggedIndex(tag, seekReadMemberRefAsMethodData ctxt numtypars idx | _ -> failwith "seekReadMethodDefOrRef" -and seekReadMethodDefOrRefNoVarargs (ctxt: ILMetadataReader) numtypars x = - let (VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, minst)) = seekReadMethodDefOrRef ctxt numtypars x +and seekReadMethodDefOrRefNoVarargs (ctxt: ILMetadataReader) numtypars x = + let (VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, minst)) = seekReadMethodDefOrRef ctxt numtypars x if varargs <> None then dprintf "ignoring sentinel and varargs in ILMethodDef token signature" MethodData(enclTy, cc, nm, argtys, retty, minst) -and seekReadCustomAttrType (ctxt: ILMetadataReader) (TaggedIndex(tag, idx) ) = +and seekReadCustomAttrType (ctxt: ILMetadataReader) (TaggedIndex(tag, idx) ) = match tag with | tag when tag = cat_MethodDef -> let (MethodData(enclTy, cc, nm, argtys, retty, minst)) = seekReadMethodDefAsMethodData ctxt idx @@ -2012,7 +2012,7 @@ and seekReadCustomAttrType (ctxt: ILMetadataReader) (TaggedIndex(tag, idx) ) = mkILMethSpecInTy (enclTy, cc, nm, argtys, retty, minst) | _ -> failwith "seekReadCustomAttrType ctxt" -and seekReadImplAsScopeRef (ctxt: ILMetadataReader) mdv (TaggedIndex(tag, idx) ) = +and seekReadImplAsScopeRef (ctxt: ILMetadataReader) mdv (TaggedIndex(tag, idx) ) = if idx = 0 then ILScopeRef.Local else match tag with @@ -2021,7 +2021,7 @@ and seekReadImplAsScopeRef (ctxt: ILMetadataReader) mdv (TaggedIndex(tag, idx) | tag when tag = i_ExportedType -> failwith "seekReadImplAsScopeRef" | _ -> failwith "seekReadImplAsScopeRef" -and seekReadTypeRefScope (ctxt: ILMetadataReader) mdv (TaggedIndex(tag, idx) ) = +and seekReadTypeRefScope (ctxt: ILMetadataReader) mdv (TaggedIndex(tag, idx) ) = match tag with | tag when tag = rs_Module -> ILScopeRef.Local, [] | tag when tag = rs_ModuleRef -> ILScopeRef.Module (seekReadModuleRef ctxt mdv idx), [] @@ -2031,11 +2031,11 @@ and seekReadTypeRefScope (ctxt: ILMetadataReader) mdv (TaggedIndex(tag, idx) ) tref.Scope, (tref.Enclosing@[tref.Name]) | _ -> failwith "seekReadTypeRefScope" -and seekReadOptionalTypeDefOrRef (ctxt: ILMetadataReader) numtypars boxity idx = +and seekReadOptionalTypeDefOrRef (ctxt: ILMetadataReader) numtypars boxity idx = if idx = TaggedIndex(tdor_TypeDef, 0) then None else Some (seekReadTypeDefOrRef ctxt numtypars boxity List.empty idx) -and seekReadField ctxt mdv (numtypars, hasLayout) (idx:int) = +and seekReadField ctxt mdv (numtypars, hasLayout) (idx: int) = let (flags, nameIdx, typeIdx) = seekReadFieldRow ctxt mdv idx let nm = readStringHeap ctxt nameIdx let isStatic = (flags &&& 0x0010) <> 0 @@ -2068,14 +2068,14 @@ and seekReadField ctxt mdv (numtypars, hasLayout) (idx:int) = customAttrsStored=ctxt.customAttrsReader_FieldDef, metadataIndex = idx) -and seekReadFields (ctxt: ILMetadataReader) (numtypars, hasLayout) fidx1 fidx2 = +and seekReadFields (ctxt: ILMetadataReader) (numtypars, hasLayout) fidx1 fidx2 = mkILFieldsLazy (lazy let mdv = ctxt.mdfile.GetView() [ for i = fidx1 to fidx2 - 1 do yield seekReadField ctxt mdv (numtypars, hasLayout) i ]) -and seekReadMethods (ctxt: ILMetadataReader) numtypars midx1 midx2 = +and seekReadMethods (ctxt: ILMetadataReader) numtypars midx1 midx2 = mkILMethodsComputed (fun () -> let mdv = ctxt.mdfile.GetView() [| for i = midx1 to midx2 - 1 do @@ -2088,9 +2088,9 @@ and sigptrGetTypeDefOrRefOrSpecIdx bytes sigptr = else (* Type Ref *) TaggedIndex(tdor_TypeRef, (n >>>& 2)), sigptr -and sigptrGetTy (ctxt: ILMetadataReader) numtypars bytes sigptr = +and sigptrGetTy (ctxt: ILMetadataReader) numtypars bytes sigptr = let b0, sigptr = sigptrGetByte bytes sigptr - if b0 = et_OBJECT then ctxt.ilg.typ_Object , sigptr + if b0 = et_OBJECT then ctxt.ilg.typ_Object, sigptr elif b0 = et_STRING then ctxt.ilg.typ_String, sigptr elif b0 = et_I1 then ctxt.ilg.typ_SByte, sigptr elif b0 = et_I2 then ctxt.ilg.typ_Int16, sigptr @@ -2144,8 +2144,8 @@ and sigptrGetTy (ctxt: ILMetadataReader) numtypars bytes sigptr = let lobounds, sigptr = sigptrFold sigptrGetZInt32 numLoBounded bytes sigptr let shape = let dim i = - (if i < numLoBounded then Some (List.item i lobounds) else None), - (if i < numSized then Some (List.item i sizes) else None) + (if i < numLoBounded then Some (List.item i lobounds) else None), + (if i < numSized then Some (List.item i sizes) else None) ILArrayShape (List.init rank dim) mkILArrTy (ty, shape), sigptr @@ -2153,7 +2153,7 @@ and sigptrGetTy (ctxt: ILMetadataReader) numtypars bytes sigptr = elif b0 = et_TYPEDBYREF then let t = mkILNonGenericValueTy(mkILTyRef(ctxt.ilg.primaryAssemblyScopeRef, "System.TypedReference")) t, sigptr - elif b0 = et_CMOD_REQD || b0 = et_CMOD_OPT then + elif b0 = et_CMOD_REQD || b0 = et_CMOD_OPT then let tdorIdx, sigptr = sigptrGetTypeDefOrRefOrSpecIdx bytes sigptr let ty, sigptr = sigptrGetTy ctxt numtypars bytes sigptr ILType.Modified((b0 = et_CMOD_REQD), seekReadTypeDefOrRefAsTypeRef ctxt tdorIdx, ty), sigptr @@ -2164,18 +2164,19 @@ and sigptrGetTy (ctxt: ILMetadataReader) numtypars bytes sigptr = let numparams, sigptr = sigptrGetZInt32 bytes sigptr let retty, sigptr = sigptrGetTy ctxt numtypars bytes sigptr let argtys, sigptr = sigptrFold (sigptrGetTy ctxt numtypars) ( numparams) bytes sigptr - ILType.FunctionPointer - { CallingConv=cc - ArgTypes = argtys - ReturnType=retty } - , sigptr + let typ = + ILType.FunctionPointer + { CallingConv=cc + ArgTypes = argtys + ReturnType=retty } + typ, sigptr elif b0 = et_SENTINEL then failwith "varargs NYI" - else ILType.Void , sigptr + else ILType.Void, sigptr -and sigptrGetVarArgTys (ctxt: ILMetadataReader) n numtypars bytes sigptr = +and sigptrGetVarArgTys (ctxt: ILMetadataReader) n numtypars bytes sigptr = sigptrFold (sigptrGetTy ctxt numtypars) n bytes sigptr -and sigptrGetArgTys (ctxt: ILMetadataReader) n numtypars bytes sigptr acc = +and sigptrGetArgTys (ctxt: ILMetadataReader) n numtypars bytes sigptr acc = if n <= 0 then (List.rev acc, None), sigptr else let b0, sigptr2 = sigptrGetByte bytes sigptr @@ -2186,7 +2187,7 @@ and sigptrGetArgTys (ctxt: ILMetadataReader) n numtypars bytes sigptr acc = let x, sigptr = sigptrGetTy ctxt numtypars bytes sigptr sigptrGetArgTys ctxt (n-1) numtypars bytes sigptr (x::acc) -and sigptrGetLocal (ctxt: ILMetadataReader) numtypars bytes sigptr = +and sigptrGetLocal (ctxt: ILMetadataReader) numtypars bytes sigptr = let pinned, sigptr = let b0, sigptr' = sigptrGetByte bytes sigptr if b0 = et_PINNED then @@ -2194,14 +2195,14 @@ and sigptrGetLocal (ctxt: ILMetadataReader) numtypars bytes sigptr = else false, sigptr let ty, sigptr = sigptrGetTy ctxt numtypars bytes sigptr - let loc : ILLocal = { IsPinned = pinned; Type = ty; DebugInfo = None } + let loc: ILLocal = { IsPinned = pinned; Type = ty; DebugInfo = None } loc, sigptr -and readBlobHeapAsMethodSig (ctxt: ILMetadataReader) numtypars blobIdx = +and readBlobHeapAsMethodSig (ctxt: ILMetadataReader) numtypars blobIdx = ctxt.readBlobHeapAsMethodSig (BlobAsMethodSigIdx (numtypars, blobIdx)) and readBlobHeapAsMethodSigUncached ctxtH (BlobAsMethodSigIdx (numtypars, blobIdx)) = - let (ctxt: ILMetadataReader) = getHole ctxtH + let (ctxt: ILMetadataReader) = getHole ctxtH let bytes = readBlobHeap ctxt blobIdx let sigptr = 0 let ccByte, sigptr = sigptrGetByte bytes sigptr @@ -2217,7 +2218,7 @@ and readBlobHeapAsType ctxt numtypars blobIdx = let ty, _sigptr = sigptrGetTy ctxt numtypars bytes 0 ty -and readBlobHeapAsFieldSig ctxt numtypars blobIdx = +and readBlobHeapAsFieldSig ctxt numtypars blobIdx = ctxt.readBlobHeapAsFieldSig (BlobAsFieldSigIdx (numtypars, blobIdx)) and readBlobHeapAsFieldSigUncached ctxtH (BlobAsFieldSigIdx (numtypars, blobIdx)) = @@ -2230,10 +2231,10 @@ and readBlobHeapAsFieldSigUncached ctxtH (BlobAsFieldSigIdx (numtypars, blobIdx) retty -and readBlobHeapAsPropertySig (ctxt: ILMetadataReader) numtypars blobIdx = +and readBlobHeapAsPropertySig (ctxt: ILMetadataReader) numtypars blobIdx = ctxt.readBlobHeapAsPropertySig (BlobAsPropSigIdx (numtypars, blobIdx)) -and readBlobHeapAsPropertySigUncached ctxtH (BlobAsPropSigIdx (numtypars, blobIdx)) = +and readBlobHeapAsPropertySigUncached ctxtH (BlobAsPropSigIdx (numtypars, blobIdx)) = let ctxt = getHole ctxtH let bytes = readBlobHeap ctxt blobIdx let sigptr = 0 @@ -2246,7 +2247,7 @@ and readBlobHeapAsPropertySigUncached ctxtH (BlobAsPropSigIdx (numtypars, blobId let argtys, _sigptr = sigptrFold (sigptrGetTy ctxt numtypars) ( numparams) bytes sigptr hasthis, retty, argtys -and readBlobHeapAsLocalsSig (ctxt: ILMetadataReader) numtypars blobIdx = +and readBlobHeapAsLocalsSig (ctxt: ILMetadataReader) numtypars blobIdx = ctxt.readBlobHeapAsLocalsSig (BlobAsLocalSigIdx (numtypars, blobIdx)) and readBlobHeapAsLocalsSigUncached ctxtH (BlobAsLocalSigIdx (numtypars, blobIdx)) = @@ -2268,30 +2269,30 @@ and byteAsHasThis b = and byteAsCallConv b = let cc = let ccMaxked = b &&& 0x0Fuy - if ccMaxked = e_IMAGE_CEE_CS_CALLCONV_FASTCALL then ILArgConvention.FastCall + if ccMaxked = e_IMAGE_CEE_CS_CALLCONV_FASTCALL then ILArgConvention.FastCall elif ccMaxked = e_IMAGE_CEE_CS_CALLCONV_STDCALL then ILArgConvention.StdCall elif ccMaxked = e_IMAGE_CEE_CS_CALLCONV_THISCALL then ILArgConvention.ThisCall elif ccMaxked = e_IMAGE_CEE_CS_CALLCONV_CDECL then ILArgConvention.CDecl elif ccMaxked = e_IMAGE_CEE_CS_CALLCONV_VARARG then ILArgConvention.VarArg - else ILArgConvention.Default + else ILArgConvention.Default let generic = (b &&& e_IMAGE_CEE_CS_CALLCONV_GENERIC) <> 0x0uy generic, Callconv (byteAsHasThis b, cc) -and seekReadMemberRefAsMethodData ctxt numtypars idx : VarArgMethodData = +and seekReadMemberRefAsMethodData ctxt numtypars idx: VarArgMethodData = ctxt.seekReadMemberRefAsMethodData (MemberRefAsMspecIdx (numtypars, idx)) and seekReadMemberRefAsMethodDataUncached ctxtH (MemberRefAsMspecIdx (numtypars, idx)) = - let (ctxt: ILMetadataReader) = getHole ctxtH + let (ctxt: ILMetadataReader) = getHole ctxtH let mdv = ctxt.mdfile.GetView() let (mrpIdx, nameIdx, typeIdx) = seekReadMemberRefRow ctxt mdv idx let nm = readStringHeap ctxt nameIdx let enclTy = seekReadMethodRefParent ctxt mdv numtypars mrpIdx let _generic, genarity, cc, retty, argtys, varargs = readBlobHeapAsMethodSig ctxt enclTy.GenericArgs.Length typeIdx - let minst = List.init genarity (fun n -> mkILTyvarTy (uint16 (numtypars+n))) + let minst = List.init genarity (fun n -> mkILTyvarTy (uint16 (numtypars+n))) (VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, minst)) -and seekReadMemberRefAsMethDataNoVarArgs ctxt numtypars idx : MethodData = - let (VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, minst)) = seekReadMemberRefAsMethodData ctxt numtypars idx +and seekReadMemberRefAsMethDataNoVarArgs ctxt numtypars idx: MethodData = + let (VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, minst)) = seekReadMemberRefAsMethodData ctxt numtypars idx if Option.isSome varargs then dprintf "ignoring sentinel and varargs in ILMethodDef token signature" (MethodData(enclTy, cc, nm, argtys, retty, minst)) @@ -2299,7 +2300,7 @@ and seekReadMethodSpecAsMethodData (ctxt: ILMetadataReader) numtypars idx = ctxt.seekReadMethodSpecAsMethodData (MethodSpecAsMspecIdx (numtypars, idx)) and seekReadMethodSpecAsMethodDataUncached ctxtH (MethodSpecAsMspecIdx (numtypars, idx)) = - let (ctxt: ILMetadataReader) = getHole ctxtH + let (ctxt: ILMetadataReader) = getHole ctxtH let mdv = ctxt.mdfile.GetView() let (mdorIdx, instIdx) = seekReadMethodSpecRow ctxt mdv idx let (VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, _)) = seekReadMethodDefOrRef ctxt numtypars mdorIdx @@ -2313,11 +2314,11 @@ and seekReadMethodSpecAsMethodDataUncached ctxtH (MethodSpecAsMspecIdx (numtypar argtys VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, minst) -and seekReadMemberRefAsFieldSpec (ctxt: ILMetadataReader) numtypars idx = +and seekReadMemberRefAsFieldSpec (ctxt: ILMetadataReader) numtypars idx = ctxt.seekReadMemberRefAsFieldSpec (MemberRefAsFspecIdx (numtypars, idx)) and seekReadMemberRefAsFieldSpecUncached ctxtH (MemberRefAsFspecIdx (numtypars, idx)) = - let (ctxt: ILMetadataReader) = getHole ctxtH + let (ctxt: ILMetadataReader) = getHole ctxtH let mdv = ctxt.mdfile.GetView() let (mrpIdx, nameIdx, typeIdx) = seekReadMemberRefRow ctxt mdv idx let nm = readStringHeap ctxt nameIdx @@ -2327,7 +2328,7 @@ and seekReadMemberRefAsFieldSpecUncached ctxtH (MemberRefAsFspecIdx (numtypars, // One extremely annoying aspect of the MD format is that given a // ILMethodDef token it is non-trivial to find which ILTypeDef it belongs -// to. So we do a binary chop through the ILTypeDef table +// to. So we do a binary chop through the ILTypeDef table // looking for which ILTypeDef has the ILMethodDef within its range. // Although the ILTypeDef table is not "sorted", it is effectively sorted by // method-range and field-range start/finish indexes @@ -2335,7 +2336,7 @@ and seekReadMethodDefAsMethodData ctxt idx = ctxt.seekReadMethodDefAsMethodData idx and seekReadMethodDefAsMethodDataUncached ctxtH idx = - let (ctxt: ILMetadataReader) = getHole ctxtH + let (ctxt: ILMetadataReader) = getHole ctxtH let mdv = ctxt.mdfile.GetView() // Look for the method def parent. let tidx = @@ -2343,7 +2344,7 @@ and seekReadMethodDefAsMethodDataUncached ctxtH idx = (fun i -> i, seekReadTypeDefRowWithExtents ctxt i), (fun r -> r), (fun (_, ((_, _, _, _, _, methodsIdx), - (_, endMethodsIdx))) -> + (_, endMethodsIdx))) -> if endMethodsIdx <= idx then 1 elif methodsIdx <= idx && idx < endMethodsIdx then 0 else -1), @@ -2371,11 +2372,11 @@ and seekReadMethodDefAsMethodDataUncached ctxtH idx = MethodData(enclTy, cc, nm, argtys, retty, minst) -and seekReadFieldDefAsFieldSpec (ctxt: ILMetadataReader) idx = +and seekReadFieldDefAsFieldSpec (ctxt: ILMetadataReader) idx = ctxt.seekReadFieldDefAsFieldSpec idx and seekReadFieldDefAsFieldSpecUncached ctxtH idx = - let (ctxt: ILMetadataReader) = getHole ctxtH + let (ctxt: ILMetadataReader) = getHole ctxtH let mdv = ctxt.mdfile.GetView() let (_flags, nameIdx, typeIdx) = seekReadFieldRow ctxt mdv idx let nm = readStringHeap ctxt nameIdx @@ -2384,7 +2385,7 @@ and seekReadFieldDefAsFieldSpecUncached ctxtH idx = seekReadIndexedRow (ctxt.getNumRows TableNames.TypeDef, (fun i -> i, seekReadTypeDefRowWithExtents ctxt i), (fun r -> r), - (fun (_, ((_, _, _, _, fieldsIdx, _), (endFieldsIdx, _))) -> + (fun (_, ((_, _, _, _, fieldsIdx, _), (endFieldsIdx, _))) -> if endFieldsIdx <= idx then 1 elif fieldsIdx <= idx && idx < endFieldsIdx then 0 else -1), @@ -2401,7 +2402,7 @@ and seekReadFieldDefAsFieldSpecUncached ctxtH idx = // Put it together. mkILFieldSpecInTy(enclTy, nm, retty) -and seekReadMethod (ctxt: ILMetadataReader) mdv numtypars (idx:int) = +and seekReadMethod (ctxt: ILMetadataReader) mdv numtypars (idx: int) = let (codeRVA, implflags, flags, nameIdx, typeIdx, paramIdx) = seekReadMethodRow ctxt mdv idx let nm = readStringHeap ctxt nameIdx let abstr = (flags &&& 0x0400) <> 0x0 @@ -2453,14 +2454,14 @@ and seekReadMethod (ctxt: ILMetadataReader) mdv numtypars (idx:int) = metadataIndex=idx) -and seekReadParams (ctxt: ILMetadataReader) mdv (retty, argtys) pidx1 pidx2 = +and seekReadParams (ctxt: ILMetadataReader) mdv (retty, argtys) pidx1 pidx2 = let retRes = ref (mkILReturn retty) let paramsRes = argtys |> List.toArray |> Array.map mkILParamAnon for i = pidx1 to pidx2 - 1 do seekReadParamExtras ctxt mdv (retRes, paramsRes) i !retRes, List.ofArray paramsRes -and seekReadParamExtras (ctxt: ILMetadataReader) mdv (retRes, paramsRes) (idx:int) = +and seekReadParamExtras (ctxt: ILMetadataReader) mdv (retRes, paramsRes) (idx: int) = let (flags, seq, nameIdx) = seekReadParamRow ctxt mdv idx let inOutMasked = (flags &&& 0x00FF) let hasMarshal = (flags &&& 0x2000) <> 0x0 @@ -2484,7 +2485,7 @@ and seekReadParamExtras (ctxt: ILMetadataReader) mdv (retRes, paramsRes) (idx:i CustomAttrsStored = ctxt.customAttrsReader_ParamDef MetadataIndex = idx } -and seekReadMethodImpls (ctxt: ILMetadataReader) numtypars tidx = +and seekReadMethodImpls (ctxt: ILMetadataReader) numtypars tidx = mkILMethodImplsLazy (lazy let mdv = ctxt.mdfile.GetView() @@ -2498,9 +2499,9 @@ and seekReadMethodImpls (ctxt: ILMetadataReader) numtypars tidx = let mspec = mkILMethSpecInTy (enclTy, cc, nm, argtys, retty, minst) OverridesSpec(mspec.MethodRef, mspec.DeclaringType) })) -and seekReadMultipleMethodSemantics (ctxt: ILMetadataReader) (flags, id) = +and seekReadMultipleMethodSemantics (ctxt: ILMetadataReader) (flags, id) = seekReadIndexedRows - (ctxt.getNumRows TableNames.MethodSemantics , + (ctxt.getNumRows TableNames.MethodSemantics, seekReadMethodSemanticsRow ctxt, (fun (_flags, _, c) -> c), hsCompare id, @@ -2536,7 +2537,7 @@ and seekReadEvent ctxt mdv numtypars idx = metadataIndex = idx ) (* REVIEW: can substantially reduce numbers of EventMap and PropertyMap reads by first checking if the whole table mdv sorted according to ILTypeDef tokens and then doing a binary chop *) -and seekReadEvents (ctxt: ILMetadataReader) numtypars tidx = +and seekReadEvents (ctxt: ILMetadataReader) numtypars tidx = mkILEventsLazy (lazy let mdv = ctxt.mdfile.GetView() @@ -2565,7 +2566,7 @@ and seekReadProperty ctxt mdv numtypars idx = | Some mref -> mref.CallingConv.ThisConv | None -> match setter with - | Some mref -> mref.CallingConv .ThisConv + | Some mref -> mref.CallingConv .ThisConv | None -> cc ILPropertyDef.CreateStored(name=readStringHeap ctxt nameIdx, @@ -2579,7 +2580,7 @@ and seekReadProperty ctxt mdv numtypars idx = customAttrsStored=ctxt.customAttrsReader_Property, metadataIndex = idx ) -and seekReadProperties (ctxt: ILMetadataReader) numtypars tidx = +and seekReadProperties (ctxt: ILMetadataReader) numtypars tidx = mkILPropertiesLazy (lazy let mdv = ctxt.mdfile.GetView() @@ -2596,7 +2597,7 @@ and seekReadProperties (ctxt: ILMetadataReader) numtypars tidx = yield seekReadProperty ctxt mdv numtypars i ]) -and customAttrsReader ctxtH tag : ILAttributesStored = +and customAttrsReader ctxtH tag: ILAttributesStored = mkILCustomAttrsReader (fun idx -> let (ctxt: ILMetadataReader) = getHole ctxtH @@ -2637,7 +2638,7 @@ and seekReadSecurityDecl ctxt (act, ty) = ILSecurityDecl ((if List.memAssoc (int act) (Lazy.force ILSecurityActionRevMap) then List.assoc (int act) (Lazy.force ILSecurityActionRevMap) else failwith "unknown security action"), readBlobHeap ctxt ty) -and seekReadConstant (ctxt: ILMetadataReader) idx = +and seekReadConstant (ctxt: ILMetadataReader) idx = let kind, vidx = seekReadIndexedRow (ctxt.getNumRows TableNames.Constant, seekReadConstantRow ctxt, (fun (_, key, _) -> key), @@ -2659,10 +2660,10 @@ and seekReadConstant (ctxt: ILMetadataReader) idx = | x when x = uint16 et_U8 -> ILFieldInit.UInt64 (readBlobHeapAsUInt64 ctxt vidx) | x when x = uint16 et_R4 -> ILFieldInit.Single (readBlobHeapAsSingle ctxt vidx) | x when x = uint16 et_R8 -> ILFieldInit.Double (readBlobHeapAsDouble ctxt vidx) - | x when x = uint16 et_CLASS || x = uint16 et_OBJECT -> ILFieldInit.Null + | x when x = uint16 et_CLASS || x = uint16 et_OBJECT -> ILFieldInit.Null | _ -> ILFieldInit.Null -and seekReadImplMap (ctxt: ILMetadataReader) nm midx = +and seekReadImplMap (ctxt: ILMetadataReader) nm midx = mkMethBodyLazyAux (lazy let mdv = ctxt.mdfile.GetView() @@ -2716,7 +2717,7 @@ and seekReadImplMap (ctxt: ILMetadataReader) nm midx = | Some nm2 -> nm2) Where = seekReadModuleRef ctxt mdv scopeIdx }) -and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz:int) start seqpoints = +and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz: int) start seqpoints = let labelsOfRawOffsets = new Dictionary<_, _>(sz/2) let ilOffsetsOfLabels = new Dictionary<_, _>(sz/2) let tryRawToLabel rawOffset = @@ -2762,7 +2763,7 @@ and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz:int) start s // Insert any sequence points into the instruction sequence while (match !seqPointsRemaining with - | (i, _tag) :: _rest when i <= !curr -> true + | (i, _tag) :: _rest when i <= !curr -> true | _ -> false) do // Emitting one sequence point @@ -2770,7 +2771,7 @@ and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz:int) start s seqPointsRemaining := List.tail !seqPointsRemaining ibuf.Add (I_seqpoint tag) - // Read the prefixes. Leave lastb and lastb2 holding the instruction byte(s) + // Read the prefixes. Leave lastb and lastb2 holding the instruction byte(s) begin prefixes.al <- Aligned prefixes.tl <- Normalcall @@ -2793,7 +2794,7 @@ and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz:int) start s if unal = 0x1 then Unaligned1 elif unal = 0x2 then Unaligned2 elif unal = 0x4 then Unaligned4 - else (dprintn "bad alignment for unaligned"; Aligned) + else (dprintn "bad alignment for unaligned"; Aligned) elif !b = (i_volatile &&& 0xff) then prefixes.vol <- Volatile elif !b = (i_readonly &&& 0xff) then prefixes.ro <- ReadonlyAddress elif !b = (i_constrained &&& 0xff) then @@ -2859,7 +2860,7 @@ and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz:int) start s let (tab, idx) = seekReadUncodedToken pev (start + (!curr)) curr := !curr + 4 - let (VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, minst)) = + let (VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, minst)) = if tab = TableNames.Method then seekReadMethodDefOrRef ctxt numtypars (TaggedIndex(mdor_MethodDef, idx)) elif tab = TableNames.MemberRef then @@ -2871,9 +2872,9 @@ and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz:int) start s | ILType.Array (shape, ty) -> match nm with | "Get" -> I_ldelem_any(shape, ty) - | "Set" -> I_stelem_any(shape, ty) - | "Address" -> I_ldelema(prefixes.ro, false, shape, ty) - | ".ctor" -> I_newarr(shape, ty) + | "Set" -> I_stelem_any(shape, ty) + | "Address" -> I_ldelema(prefixes.ro, false, shape, ty) + | ".ctor" -> I_newarr(shape, ty) | _ -> failwith "bad method on array type" | _ -> let mspec = mkILMethSpecInTy (enclTy, cc, nm, argtys, retty, minst) @@ -2890,7 +2891,7 @@ and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz:int) start s f prefixes (readUserStringHeap ctxt (idx)) | I_conditional_i32_instr f -> - let offsDest = (seekReadInt32 pev (start + (!curr))) + let offsDest = (seekReadInt32 pev (start + (!curr))) curr := !curr + 4 let dest = !curr + offsDest f prefixes (rawToLabel dest) @@ -2900,7 +2901,7 @@ and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz:int) start s let dest = !curr + offsDest f prefixes (rawToLabel dest) | I_unconditional_i32_instr f -> - let offsDest = (seekReadInt32 pev (start + (!curr))) + let offsDest = (seekReadInt32 pev (start + (!curr))) curr := !curr + 4 let dest = !curr + offsDest f prefixes (rawToLabel dest) @@ -2917,12 +2918,12 @@ and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz:int) start s curr := !curr + 4 (* REVIEW: this incorrectly labels all MemberRef tokens as ILMethod's: we should go look at the MemberRef sig to determine if it is a field or method *) let token_info = - if tab = TableNames.Method || tab = TableNames.MemberRef (* REVIEW:generics or tab = TableNames.MethodSpec *) then + if tab = TableNames.Method || tab = TableNames.MemberRef (* REVIEW: generics or tab = TableNames.MethodSpec *) then let (MethodData(enclTy, cc, nm, argtys, retty, minst)) = seekReadMethodDefOrRefNoVarargs ctxt numtypars (uncodedTokenToMethodDefOrRef (tab, idx)) ILToken.ILMethod (mkILMethSpecInTy (enclTy, cc, nm, argtys, retty, minst)) elif tab = TableNames.Field then ILToken.ILField (seekReadFieldDefAsFieldSpec ctxt idx) - elif tab = TableNames.TypeDef || tab = TableNames.TypeRef || tab = TableNames.TypeSpec then + elif tab = TableNames.TypeDef || tab = TableNames.TypeRef || tab = TableNames.TypeSpec then ILToken.ILType (seekReadTypeDefOrRef ctxt numtypars AsObject [] (uncodedTokenToTypeDefOrRefOrSpec (tab, idx))) else failwith "bad token for ldtoken" f prefixes token_info @@ -2934,11 +2935,11 @@ and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz:int) start s if generic then failwith "bad image: a generic method signature is begin used at a calli instruction" f prefixes (mkILCallSig (cc, argtys, retty), varargs) | I_switch_instr f -> - let n = (seekReadInt32 pev (start + (!curr))) + let n = (seekReadInt32 pev (start + (!curr))) curr := !curr + 4 let offsets = List.init n (fun _ -> - let i = (seekReadInt32 pev (start + (!curr))) + let i = (seekReadInt32 pev (start + (!curr))) curr := !curr + 4 i) let dests = List.map (fun offs -> rawToLabel (!curr + offs)) offsets @@ -2951,16 +2952,16 @@ and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz:int) start s let lab2pc = ilOffsetsOfLabels // Some offsets used in debug info refer to the end of an instruction, rather than the - // start of the subsequent instruction. But all labels refer to instruction starts, - // apart from a final label which refers to the end of the method. This function finds + // start of the subsequent instruction. But all labels refer to instruction starts, + // apart from a final label which refers to the end of the method. This function finds // the start of the next instruction referred to by the raw offset. let raw2nextLab rawOffset = let isInstrStart x = match tryRawToLabel x with | None -> false | Some lab -> ilOffsetsOfLabels.ContainsKey lab - if isInstrStart rawOffset then rawToLabel rawOffset - elif isInstrStart (rawOffset+1) then rawToLabel (rawOffset+1) + if isInstrStart rawOffset then rawToLabel rawOffset + elif isInstrStart (rawOffset+1) then rawToLabel (rawOffset+1) else failwith ("the bytecode raw offset "+string rawOffset+" did not refer either to the start or end of an instruction") let instrs = ibuf.ToArray() instrs, rawToLabel, lab2pc, raw2nextLab @@ -2991,12 +2992,12 @@ and seekReadMethodRVA (pectxt: PEReader) (ctxt: ILMetadataReader) (idx, nm, _int let pdbm = pdbReaderGetMethod pdbr (uncodedToken TableNames.Method idx) let sps = pdbMethodGetSequencePoints pdbm - (*dprintf "#sps for 0x%x = %d\n" (uncodedToken TableNames.Method idx) (Array.length sps) *) - (* let roota, rootb = pdbScopeGetOffsets rootScope in *) + (*dprintf "#sps for 0x%x = %d\n" (uncodedToken TableNames.Method idx) (Array.length sps) *) + (* let roota, rootb = pdbScopeGetOffsets rootScope in *) let seqpoints = let arr = sps |> Array.map (fun sp -> - (* It is VERY annoying to have to call GetURL for the document for each sequence point. This appears to be a short coming of the PDB reader API. They should return an index into the array of documents for the reader *) + (* It is VERY annoying to have to call GetURL for the document for each sequence point. This appears to be a short coming of the PDB reader API. They should return an index into the array of documents for the reader *) let sourcedoc = get_doc (pdbDocumentGetURL sp.pdbSeqPointDocument) let source = ILSourceMarker.Create(document = sourcedoc, @@ -3011,28 +3012,28 @@ and seekReadMethodRVA (pectxt: PEReader) (ctxt: ILMetadataReader) (idx, nm, _int Array.toList arr let rec scopes scp = let a, b = pdbScopeGetOffsets scp - let lvs = pdbScopeGetLocals scp + let lvs = pdbScopeGetLocals scp let ilvs = lvs |> Array.toList |> List.filter (fun l -> let k, _idx = pdbVariableGetAddressAttributes l k = 1 (* ADDR_IL_OFFSET *)) - let ilinfos : ILLocalDebugMapping list = + let ilinfos: ILLocalDebugMapping list = ilvs |> List.map (fun ilv -> let _k, idx = pdbVariableGetAddressAttributes ilv let n = pdbVariableGetName ilv - { LocalIndex= idx + { LocalIndex= idx LocalName=n}) let thisOne = (fun raw2nextLab -> { Range= (raw2nextLab a, raw2nextLab b) - DebugMappings = ilinfos } : ILLocalDebugInfo ) + DebugMappings = ilinfos }: ILLocalDebugInfo ) let others = List.foldBack (scopes >> (@)) (Array.toList (pdbScopeGetChildren scp)) [] thisOne :: others - let localPdbInfos = [] (* scopes fail for mscorlib scopes rootScope *) - // REVIEW: look through sps to get ranges? Use GetRanges?? Change AbsIL?? + let localPdbInfos = [] (* scopes fail for mscorlib scopes rootScope *) + // REVIEW: look through sps to get ranges? Use GetRanges?? Change AbsIL?? (localPdbInfos, None, seqpoints) with e -> // "* Warning: PDB info for method "+nm+" could not be read and will be ignored: "+e.Message @@ -3044,7 +3045,7 @@ and seekReadMethodRVA (pectxt: PEReader) (ctxt: ILMetadataReader) (idx, nm, _int let b = seekReadByte pev baseRVA if (b &&& e_CorILMethod_FormatMask) = e_CorILMethod_TinyFormat then let codeBase = baseRVA + 1 - let codeSize = (int32 b >>>& 2) + let codeSize = (int32 b >>>& 2) // tiny format for "+nm+", code size = " + string codeSize) let instrs, _, lab2pc, raw2nextLab = seekReadTopCode ctxt pev mdv numtypars codeSize codeBase seqpoints (* Convert the linear code format to the nested code format *) @@ -3093,9 +3094,9 @@ and seekReadMethodRVA (pectxt: PEReader) (ctxt: ILMetadataReader) (idx, nm, _int let clauses = if (sectionFlag &&& e_CorILMethod_Sect_EHTable) <> 0x0uy then // WORKAROUND: The ECMA spec says this should be - // let numClauses = ((bigSize - 4) / 24) in + // let numClauses = ((bigSize - 4) / 24) in // but the CCI IL generator generates multiples of 24 - let numClauses = (bigSize / 24) + let numClauses = (bigSize / 24) List.init numClauses (fun i -> let clauseBase = sectionBase + 4 + (i * 24) @@ -3113,9 +3114,9 @@ and seekReadMethodRVA (pectxt: PEReader) (ctxt: ILMetadataReader) (idx, nm, _int let clauses = if (sectionFlag &&& e_CorILMethod_Sect_EHTable) <> 0x0uy then // WORKAROUND: The ECMA spec says this should be - // let numClauses = ((smallSize - 4) / 12) in + // let numClauses = ((smallSize - 4) / 12) in // but the C# compiler (or some IL generator) generates multiples of 12 - let numClauses = (smallSize / 12) + let numClauses = (smallSize / 12) // dprintn (nm+" has " + string numClauses + " tiny seh clauses") List.init numClauses (fun i -> let clauseBase = sectionBase + 4 + (i * 12) @@ -3157,12 +3158,12 @@ and seekReadMethodRVA (pectxt: PEReader) (ctxt: ILMetadataReader) (idx, nm, _int ILExceptionClause.Finally(handlerStart, handlerFinish) end - let key = (tryStart, tryFinish) + let key = (tryStart, tryFinish) match sehMap.TryGetValue(key) with | true, prev -> sehMap.[key] <- prev @ [clause] | _ -> sehMap.[key] <- [clause]) clauses - ([], sehMap) ||> Seq.fold (fun acc (KeyValue(key, bs)) -> [ for b in bs -> {Range=key; Clause=b} : ILExceptionSpec ] @ acc) + ([], sehMap) ||> Seq.fold (fun acc (KeyValue(key, bs)) -> [ for b in bs -> {Range=key; Clause=b}: ILExceptionSpec ] @ acc) seh := sehClauses moreSections := (sectionFlag &&& e_CorILMethod_Sect_MoreSects) <> 0x0uy nextSectionBase := sectionBase + sectionSize @@ -3186,7 +3187,7 @@ and seekReadMethodRVA (pectxt: PEReader) (ctxt: ILMetadataReader) (idx, nm, _int if logging then failwith "unknown format" MethodBody.Abstract) -and int32AsILVariantType (ctxt: ILMetadataReader) (n:int32) = +and int32AsILVariantType (ctxt: ILMetadataReader) (n: int32) = if List.memAssoc n (Lazy.force ILVariantTypeRevMap) then List.assoc n (Lazy.force ILVariantTypeRevMap) elif (n &&& vt_ARRAY) <> 0x0 then ILNativeVariant.Array (int32AsILVariantType ctxt (n &&& (~~~ vt_ARRAY))) @@ -3207,24 +3208,24 @@ and sigptrGetILNativeType ctxt bytes sigptr = List.assoc ntbyte (Lazy.force ILNativeTypeMap), sigptr elif ntbyte = 0x0uy then ILNativeType.Empty, sigptr elif ntbyte = nt_CUSTOMMARSHALER then - // reading native type blob (CM1) , sigptr= "+string sigptr+ ", bytes.Length = "+string bytes.Length) + // reading native type blob (CM1), sigptr= "+string sigptr+ ", bytes.Length = "+string bytes.Length) let guidLen, sigptr = sigptrGetZInt32 bytes sigptr - // reading native type blob (CM2) , sigptr= "+string sigptr+", guidLen = "+string ( guidLen)) + // reading native type blob (CM2), sigptr= "+string sigptr+", guidLen = "+string ( guidLen)) let guid, sigptr = sigptrGetBytes ( guidLen) bytes sigptr - // reading native type blob (CM3) , sigptr= "+string sigptr) + // reading native type blob (CM3), sigptr= "+string sigptr) let nativeTypeNameLen, sigptr = sigptrGetZInt32 bytes sigptr - // reading native type blob (CM4) , sigptr= "+string sigptr+", nativeTypeNameLen = "+string ( nativeTypeNameLen)) + // reading native type blob (CM4), sigptr= "+string sigptr+", nativeTypeNameLen = "+string ( nativeTypeNameLen)) let nativeTypeName, sigptr = sigptrGetString ( nativeTypeNameLen) bytes sigptr - // reading native type blob (CM4) , sigptr= "+string sigptr+", nativeTypeName = "+nativeTypeName) - // reading native type blob (CM5) , sigptr= "+string sigptr) + // reading native type blob (CM4), sigptr= "+string sigptr+", nativeTypeName = "+nativeTypeName) + // reading native type blob (CM5), sigptr= "+string sigptr) let custMarshallerNameLen, sigptr = sigptrGetZInt32 bytes sigptr - // reading native type blob (CM6) , sigptr= "+string sigptr+", custMarshallerNameLen = "+string ( custMarshallerNameLen)) + // reading native type blob (CM6), sigptr= "+string sigptr+", custMarshallerNameLen = "+string ( custMarshallerNameLen)) let custMarshallerName, sigptr = sigptrGetString ( custMarshallerNameLen) bytes sigptr - // reading native type blob (CM7) , sigptr= "+string sigptr+", custMarshallerName = "+custMarshallerName) + // reading native type blob (CM7), sigptr= "+string sigptr+", custMarshallerName = "+custMarshallerName) let cookieStringLen, sigptr = sigptrGetZInt32 bytes sigptr - // reading native type blob (CM8) , sigptr= "+string sigptr+", cookieStringLen = "+string ( cookieStringLen)) + // reading native type blob (CM8), sigptr= "+string sigptr+", cookieStringLen = "+string ( cookieStringLen)) let cookieString, sigptr = sigptrGetBytes ( cookieStringLen) bytes sigptr - // reading native type blob (CM9) , sigptr= "+string sigptr) + // reading native type blob (CM9), sigptr= "+string sigptr) ILNativeType.Custom (guid, nativeTypeName, custMarshallerName, cookieString), sigptr elif ntbyte = nt_FIXEDSYSSTRING then let i, sigptr = sigptrGetZInt32 bytes sigptr @@ -3302,7 +3303,7 @@ and seekReadManifestResources (ctxt: ILMetadataReader) (mdv: BinaryView) (pectxt MetadataIndex = i } yield r ] -and seekReadNestedExportedTypes ctxt (exported: _ array) (nested: Lazy<_ array>) parentIdx = +and seekReadNestedExportedTypes ctxt (exported: _ []) (nested: Lazy<_ []>) parentIdx = mkILNestedExportedTypesLazy (lazy nested.Force().[parentIdx-1] @@ -3314,10 +3315,10 @@ and seekReadNestedExportedTypes ctxt (exported: _ array) (nested: Lazy<_ array>) | _ -> failwith "non-nested access for a nested type described as being in an auxiliary module") Nested = seekReadNestedExportedTypes ctxt exported nested i CustomAttrsStored = ctxt.customAttrsReader_ExportedType - MetadataIndex = i } + MetadataIndex = i } )) -and seekReadTopExportedTypes (ctxt: ILMetadataReader) = +and seekReadTopExportedTypes (ctxt: ILMetadataReader) = mkILExportedTypesLazy (lazy let mdv = ctxt.mdfile.GetView() @@ -3359,7 +3360,7 @@ let getPdbReader pdbDirPath fileName = let pdbdocs = pdbReaderGetDocuments pdbr let tab = new Dictionary<_, _>(Array.length pdbdocs) - pdbdocs |> Array.iter (fun pdbdoc -> + pdbdocs |> Array.iter (fun pdbdoc -> let url = pdbDocumentGetURL pdbdoc tab.[url] <- ILSourceDocument.Create(language=Some (pdbDocumentGetLanguage pdbdoc), @@ -3415,13 +3416,13 @@ let openMetadataReader (fileName, mdfile: BinaryFile, metadataPhysLoc, peinfo, p let findStream name = match tryFindStream name with | None -> (0x0, 0x0) - | Some positions -> positions + | Some positions -> positions let (tablesStreamPhysLoc, _tablesStreamSize) = match tryFindStream [| 0x23; 0x7e |] (* #~ *) with | Some res -> res | None -> - match tryFindStream [| 0x23; 0x2d |] (* #-: at least one DLL I've seen uses this! *) with + match tryFindStream [| 0x23; 0x2d |] (* #-: at least one DLL I've seen uses this! *) with | Some res -> res | None -> let firstStreamOffset = seekReadInt32 mdv (streamHeadersStart + 0) @@ -3434,70 +3435,70 @@ let openMetadataReader (fileName, mdfile: BinaryFile, metadataPhysLoc, peinfo, p let (blobsStreamPhysicalLoc, blobsStreamSize) = findStream [| 0x23; 0x42; 0x6c; 0x6f; 0x62; |] (* #Blob *) let tableKinds = - [|kindModule (* Table 0 *) - kindTypeRef (* Table 1 *) - kindTypeDef (* Table 2 *) - kindIllegal (* kindFieldPtr *) (* Table 3 *) - kindFieldDef (* Table 4 *) - kindIllegal (* kindMethodPtr *) (* Table 5 *) - kindMethodDef (* Table 6 *) - kindIllegal (* kindParamPtr *) (* Table 7 *) - kindParam (* Table 8 *) - kindInterfaceImpl (* Table 9 *) - kindMemberRef (* Table 10 *) - kindConstant (* Table 11 *) - kindCustomAttribute (* Table 12 *) - kindFieldMarshal (* Table 13 *) - kindDeclSecurity (* Table 14 *) - kindClassLayout (* Table 15 *) - kindFieldLayout (* Table 16 *) - kindStandAloneSig (* Table 17 *) - kindEventMap (* Table 18 *) - kindIllegal (* kindEventPtr *) (* Table 19 *) - kindEvent (* Table 20 *) - kindPropertyMap (* Table 21 *) - kindIllegal (* kindPropertyPtr *) (* Table 22 *) - kindProperty (* Table 23 *) - kindMethodSemantics (* Table 24 *) - kindMethodImpl (* Table 25 *) - kindModuleRef (* Table 26 *) - kindTypeSpec (* Table 27 *) - kindImplMap (* Table 28 *) - kindFieldRVA (* Table 29 *) - kindIllegal (* kindENCLog *) (* Table 30 *) - kindIllegal (* kindENCMap *) (* Table 31 *) - kindAssembly (* Table 32 *) - kindIllegal (* kindAssemblyProcessor *) (* Table 33 *) - kindIllegal (* kindAssemblyOS *) (* Table 34 *) - kindAssemblyRef (* Table 35 *) + [|kindModule (* Table 0 *) + kindTypeRef (* Table 1 *) + kindTypeDef (* Table 2 *) + kindIllegal (* kindFieldPtr *) (* Table 3 *) + kindFieldDef (* Table 4 *) + kindIllegal (* kindMethodPtr *) (* Table 5 *) + kindMethodDef (* Table 6 *) + kindIllegal (* kindParamPtr *) (* Table 7 *) + kindParam (* Table 8 *) + kindInterfaceImpl (* Table 9 *) + kindMemberRef (* Table 10 *) + kindConstant (* Table 11 *) + kindCustomAttribute (* Table 12 *) + kindFieldMarshal (* Table 13 *) + kindDeclSecurity (* Table 14 *) + kindClassLayout (* Table 15 *) + kindFieldLayout (* Table 16 *) + kindStandAloneSig (* Table 17 *) + kindEventMap (* Table 18 *) + kindIllegal (* kindEventPtr *) (* Table 19 *) + kindEvent (* Table 20 *) + kindPropertyMap (* Table 21 *) + kindIllegal (* kindPropertyPtr *) (* Table 22 *) + kindProperty (* Table 23 *) + kindMethodSemantics (* Table 24 *) + kindMethodImpl (* Table 25 *) + kindModuleRef (* Table 26 *) + kindTypeSpec (* Table 27 *) + kindImplMap (* Table 28 *) + kindFieldRVA (* Table 29 *) + kindIllegal (* kindENCLog *) (* Table 30 *) + kindIllegal (* kindENCMap *) (* Table 31 *) + kindAssembly (* Table 32 *) + kindIllegal (* kindAssemblyProcessor *) (* Table 33 *) + kindIllegal (* kindAssemblyOS *) (* Table 34 *) + kindAssemblyRef (* Table 35 *) kindIllegal (* kindAssemblyRefProcessor *) (* Table 36 *) - kindIllegal (* kindAssemblyRefOS *) (* Table 37 *) - kindFileRef (* Table 38 *) - kindExportedType (* Table 39 *) - kindManifestResource (* Table 40 *) - kindNested (* Table 41 *) - kindGenericParam_v2_0 (* Table 42 *) - kindMethodSpec (* Table 43 *) - kindGenericParamConstraint (* Table 44 *) - kindIllegal (* Table 45 *) - kindIllegal (* Table 46 *) - kindIllegal (* Table 47 *) - kindIllegal (* Table 48 *) - kindIllegal (* Table 49 *) - kindIllegal (* Table 50 *) - kindIllegal (* Table 51 *) - kindIllegal (* Table 52 *) - kindIllegal (* Table 53 *) - kindIllegal (* Table 54 *) - kindIllegal (* Table 55 *) - kindIllegal (* Table 56 *) - kindIllegal (* Table 57 *) - kindIllegal (* Table 58 *) - kindIllegal (* Table 59 *) - kindIllegal (* Table 60 *) - kindIllegal (* Table 61 *) - kindIllegal (* Table 62 *) - kindIllegal (* Table 63 *) + kindIllegal (* kindAssemblyRefOS *) (* Table 37 *) + kindFileRef (* Table 38 *) + kindExportedType (* Table 39 *) + kindManifestResource (* Table 40 *) + kindNested (* Table 41 *) + kindGenericParam_v2_0 (* Table 42 *) + kindMethodSpec (* Table 43 *) + kindGenericParamConstraint (* Table 44 *) + kindIllegal (* Table 45 *) + kindIllegal (* Table 46 *) + kindIllegal (* Table 47 *) + kindIllegal (* Table 48 *) + kindIllegal (* Table 49 *) + kindIllegal (* Table 50 *) + kindIllegal (* Table 51 *) + kindIllegal (* Table 52 *) + kindIllegal (* Table 53 *) + kindIllegal (* Table 54 *) + kindIllegal (* Table 55 *) + kindIllegal (* Table 56 *) + kindIllegal (* Table 57 *) + kindIllegal (* Table 58 *) + kindIllegal (* Table 59 *) + kindIllegal (* Table 60 *) + kindIllegal (* Table 61 *) + kindIllegal (* Table 62 *) + kindIllegal (* Table 63 *) |] let heapSizes = seekReadByteAsInt32 mdv (tablesStreamPhysLoc + 6) @@ -3508,13 +3509,13 @@ let openMetadataReader (fileName, mdfile: BinaryFile, metadataPhysLoc, peinfo, p let numRows = Array.create 64 0 let prevNumRowIdx = ref (tablesStreamPhysLoc + 24) for i = 0 to 63 do - if (valid &&& (int64 1 <<< i)) <> int64 0 then + if (valid &&& (int64 1 <<< i)) <> int64 0 then present := i :: !present - numRows.[i] <- (seekReadInt32 mdv !prevNumRowIdx) + numRows.[i] <- (seekReadInt32 mdv !prevNumRowIdx) prevNumRowIdx := !prevNumRowIdx + 4 List.rev !present, numRows, !prevNumRowIdx - let getNumRows (tab:TableName) = tableRowCount.[tab.Index] + let getNumRows (tab: TableName) = tableRowCount.[tab.Index] let numTables = tablesPresent.Length let stringsBigness = (heapSizes &&& 1) <> 0 let guidsBigness = (heapSizes &&& 2) <> 0 @@ -3547,7 +3548,7 @@ let openMetadataReader (fileName, mdfile: BinaryFile, metadataPhysLoc, peinfo, p let hcaBigness = codedBigness 5 TableNames.Method || codedBigness 5 TableNames.Field || - codedBigness 5 TableNames.TypeRef || + codedBigness 5 TableNames.TypeRef || codedBigness 5 TableNames.TypeDef || codedBigness 5 TableNames.Param || codedBigness 5 TableNames.InterfaceImpl || @@ -3608,7 +3609,7 @@ let openMetadataReader (fileName, mdfile: BinaryFile, metadataPhysLoc, peinfo, p let rsBigness = codedBigness 2 TableNames.Module || codedBigness 2 TableNames.ModuleRef || - codedBigness 2 TableNames.AssemblyRef || + codedBigness 2 TableNames.AssemblyRef || codedBigness 2 TableNames.TypeRef let rowKindSize (RowKind kinds) = @@ -3619,20 +3620,20 @@ let openMetadataReader (fileName, mdfile: BinaryFile, metadataPhysLoc, peinfo, p | Byte -> 1 | Data -> 4 | GGuid -> (if guidsBigness then 4 else 2) - | Blob -> (if blobsBigness then 4 else 2) - | SString -> (if stringsBigness then 4 else 2) + | Blob -> (if blobsBigness then 4 else 2) + | SString -> (if stringsBigness then 4 else 2) | SimpleIndex tab -> (if tableBigness.[tab.Index] then 4 else 2) | TypeDefOrRefOrSpec -> (if tdorBigness then 4 else 2) | TypeOrMethodDef -> (if tomdBigness then 4 else 2) - | HasConstant -> (if hcBigness then 4 else 2) + | HasConstant -> (if hcBigness then 4 else 2) | HasCustomAttribute -> (if hcaBigness then 4 else 2) - | HasFieldMarshal -> (if hfmBigness then 4 else 2) - | HasDeclSecurity -> (if hdsBigness then 4 else 2) - | MemberRefParent -> (if mrpBigness then 4 else 2) - | HasSemantics -> (if hsBigness then 4 else 2) + | HasFieldMarshal -> (if hfmBigness then 4 else 2) + | HasDeclSecurity -> (if hdsBigness then 4 else 2) + | MemberRefParent -> (if mrpBigness then 4 else 2) + | HasSemantics -> (if hsBigness then 4 else 2) | MethodDefOrRef -> (if mdorBigness then 4 else 2) | MemberForwarded -> (if mfBigness then 4 else 2) - | Implementation -> (if iBigness then 4 else 2) + | Implementation -> (if iBigness then 4 else 2) | CustomAttributeType -> (if catBigness then 4 else 2) | ResolutionScope -> (if rsBigness then 4 else 2)) @@ -3648,40 +3649,40 @@ let openMetadataReader (fileName, mdfile: BinaryFile, metadataPhysLoc, peinfo, p let inbase = Filename.fileNameOfPath fileName + ": " - // All the caches. The sizes are guesstimates for the rough sharing-density of the assembly - let cacheAssemblyRef = mkCacheInt32 reduceMemoryUsage inbase "ILAssemblyRef" (getNumRows TableNames.AssemblyRef) - let cacheMethodSpecAsMethodData = mkCacheGeneric reduceMemoryUsage inbase "MethodSpecAsMethodData" (getNumRows TableNames.MethodSpec / 20 + 1) - let cacheMemberRefAsMemberData = mkCacheGeneric reduceMemoryUsage inbase "MemberRefAsMemberData" (getNumRows TableNames.MemberRef / 20 + 1) - let cacheCustomAttr = mkCacheGeneric reduceMemoryUsage inbase "CustomAttr" (getNumRows TableNames.CustomAttribute / 50 + 1) - let cacheTypeRef = mkCacheInt32 reduceMemoryUsage inbase "ILTypeRef" (getNumRows TableNames.TypeRef / 20 + 1) - let cacheTypeRefAsType = mkCacheGeneric reduceMemoryUsage inbase "TypeRefAsType" (getNumRows TableNames.TypeRef / 20 + 1) - let cacheBlobHeapAsPropertySig = mkCacheGeneric reduceMemoryUsage inbase "BlobHeapAsPropertySig" (getNumRows TableNames.Property / 20 + 1) - let cacheBlobHeapAsFieldSig = mkCacheGeneric reduceMemoryUsage inbase "BlobHeapAsFieldSig" (getNumRows TableNames.Field / 20 + 1) - let cacheBlobHeapAsMethodSig = mkCacheGeneric reduceMemoryUsage inbase "BlobHeapAsMethodSig" (getNumRows TableNames.Method / 20 + 1) - let cacheTypeDefAsType = mkCacheGeneric reduceMemoryUsage inbase "TypeDefAsType" (getNumRows TableNames.TypeDef / 20 + 1) - let cacheMethodDefAsMethodData = mkCacheInt32 reduceMemoryUsage inbase "MethodDefAsMethodData" (getNumRows TableNames.Method / 20 + 1) - let cacheGenericParams = mkCacheGeneric reduceMemoryUsage inbase "GenericParams" (getNumRows TableNames.GenericParam / 20 + 1) - let cacheFieldDefAsFieldSpec = mkCacheInt32 reduceMemoryUsage inbase "FieldDefAsFieldSpec" (getNumRows TableNames.Field / 20 + 1) - let cacheUserStringHeap = mkCacheInt32 reduceMemoryUsage inbase "UserStringHeap" ( userStringsStreamSize / 20 + 1) + // All the caches. The sizes are guesstimates for the rough sharing-density of the assembly + let cacheAssemblyRef = mkCacheInt32 reduceMemoryUsage inbase "ILAssemblyRef" (getNumRows TableNames.AssemblyRef) + let cacheMethodSpecAsMethodData = mkCacheGeneric reduceMemoryUsage inbase "MethodSpecAsMethodData" (getNumRows TableNames.MethodSpec / 20 + 1) + let cacheMemberRefAsMemberData = mkCacheGeneric reduceMemoryUsage inbase "MemberRefAsMemberData" (getNumRows TableNames.MemberRef / 20 + 1) + let cacheCustomAttr = mkCacheGeneric reduceMemoryUsage inbase "CustomAttr" (getNumRows TableNames.CustomAttribute / 50 + 1) + let cacheTypeRef = mkCacheInt32 reduceMemoryUsage inbase "ILTypeRef" (getNumRows TableNames.TypeRef / 20 + 1) + let cacheTypeRefAsType = mkCacheGeneric reduceMemoryUsage inbase "TypeRefAsType" (getNumRows TableNames.TypeRef / 20 + 1) + let cacheBlobHeapAsPropertySig = mkCacheGeneric reduceMemoryUsage inbase "BlobHeapAsPropertySig" (getNumRows TableNames.Property / 20 + 1) + let cacheBlobHeapAsFieldSig = mkCacheGeneric reduceMemoryUsage inbase "BlobHeapAsFieldSig" (getNumRows TableNames.Field / 20 + 1) + let cacheBlobHeapAsMethodSig = mkCacheGeneric reduceMemoryUsage inbase "BlobHeapAsMethodSig" (getNumRows TableNames.Method / 20 + 1) + let cacheTypeDefAsType = mkCacheGeneric reduceMemoryUsage inbase "TypeDefAsType" (getNumRows TableNames.TypeDef / 20 + 1) + let cacheMethodDefAsMethodData = mkCacheInt32 reduceMemoryUsage inbase "MethodDefAsMethodData" (getNumRows TableNames.Method / 20 + 1) + let cacheGenericParams = mkCacheGeneric reduceMemoryUsage inbase "GenericParams" (getNumRows TableNames.GenericParam / 20 + 1) + let cacheFieldDefAsFieldSpec = mkCacheInt32 reduceMemoryUsage inbase "FieldDefAsFieldSpec" (getNumRows TableNames.Field / 20 + 1) + let cacheUserStringHeap = mkCacheInt32 reduceMemoryUsage inbase "UserStringHeap" ( userStringsStreamSize / 20 + 1) // nb. Lots and lots of cache hits on this cache, hence never optimize cache away - let cacheStringHeap = mkCacheInt32 false inbase "string heap" ( stringsStreamSize / 50 + 1) - let cacheBlobHeap = mkCacheInt32 reduceMemoryUsage inbase "blob heap" ( blobsStreamSize / 50 + 1) + let cacheStringHeap = mkCacheInt32 false inbase "string heap" ( stringsStreamSize / 50 + 1) + let cacheBlobHeap = mkCacheInt32 reduceMemoryUsage inbase "blob heap" ( blobsStreamSize / 50 + 1) // These tables are not required to enforce sharing fo the final data // structure, but are very useful as searching these tables gives rise to many reads // in standard applications. - let cacheNestedRow = mkCacheInt32 reduceMemoryUsage inbase "Nested Table Rows" (getNumRows TableNames.Nested / 20 + 1) - let cacheConstantRow = mkCacheInt32 reduceMemoryUsage inbase "Constant Rows" (getNumRows TableNames.Constant / 20 + 1) + let cacheNestedRow = mkCacheInt32 reduceMemoryUsage inbase "Nested Table Rows" (getNumRows TableNames.Nested / 20 + 1) + let cacheConstantRow = mkCacheInt32 reduceMemoryUsage inbase "Constant Rows" (getNumRows TableNames.Constant / 20 + 1) let cacheMethodSemanticsRow = mkCacheInt32 reduceMemoryUsage inbase "MethodSemantics Rows" (getNumRows TableNames.MethodSemantics / 20 + 1) - let cacheTypeDefRow = mkCacheInt32 reduceMemoryUsage inbase "ILTypeDef Rows" (getNumRows TableNames.TypeDef / 20 + 1) + let cacheTypeDefRow = mkCacheInt32 reduceMemoryUsage inbase "ILTypeDef Rows" (getNumRows TableNames.TypeDef / 20 + 1) - let rowAddr (tab:TableName) idx = tablePhysLocations.[tab.Index] + (idx - 1) * tableRowSizes.[tab.Index] + let rowAddr (tab: TableName) idx = tablePhysLocations.[tab.Index] + (idx - 1) * tableRowSizes.[tab.Index] // Build the reader context // Use an initialization hole let ctxtH = ref None - let ctxt : ILMetadataReader = + let ctxt: ILMetadataReader = { ilg=ilGlobals sorted=sorted getNumRows=getNumRows @@ -3690,33 +3691,33 @@ let openMetadataReader (fileName, mdfile: BinaryFile, metadataPhysLoc, peinfo, p pectxtCaptured=pectxtCaptured entryPointToken=pectxtEager.entryPointToken fileName=fileName - userStringsStreamPhysicalLoc = userStringsStreamPhysicalLoc - stringsStreamPhysicalLoc = stringsStreamPhysicalLoc - blobsStreamPhysicalLoc = blobsStreamPhysicalLoc - blobsStreamSize = blobsStreamSize - memoizeString = Tables.memoize id - readUserStringHeap = cacheUserStringHeap (readUserStringHeapUncached ctxtH) - readStringHeap = cacheStringHeap (readStringHeapUncached ctxtH) - readBlobHeap = cacheBlobHeap (readBlobHeapUncached ctxtH) - seekReadNestedRow = cacheNestedRow (seekReadNestedRowUncached ctxtH) - seekReadConstantRow = cacheConstantRow (seekReadConstantRowUncached ctxtH) - seekReadMethodSemanticsRow = cacheMethodSemanticsRow (seekReadMethodSemanticsRowUncached ctxtH) - seekReadTypeDefRow = cacheTypeDefRow (seekReadTypeDefRowUncached ctxtH) - seekReadAssemblyRef = cacheAssemblyRef (seekReadAssemblyRefUncached ctxtH) - seekReadMethodSpecAsMethodData = cacheMethodSpecAsMethodData (seekReadMethodSpecAsMethodDataUncached ctxtH) - seekReadMemberRefAsMethodData = cacheMemberRefAsMemberData (seekReadMemberRefAsMethodDataUncached ctxtH) - seekReadMemberRefAsFieldSpec = seekReadMemberRefAsFieldSpecUncached ctxtH - seekReadCustomAttr = cacheCustomAttr (seekReadCustomAttrUncached ctxtH) - seekReadTypeRef = cacheTypeRef (seekReadTypeRefUncached ctxtH) - readBlobHeapAsPropertySig = cacheBlobHeapAsPropertySig (readBlobHeapAsPropertySigUncached ctxtH) - readBlobHeapAsFieldSig = cacheBlobHeapAsFieldSig (readBlobHeapAsFieldSigUncached ctxtH) - readBlobHeapAsMethodSig = cacheBlobHeapAsMethodSig (readBlobHeapAsMethodSigUncached ctxtH) - readBlobHeapAsLocalsSig = readBlobHeapAsLocalsSigUncached ctxtH - seekReadTypeDefAsType = cacheTypeDefAsType (seekReadTypeDefAsTypeUncached ctxtH) - seekReadTypeRefAsType = cacheTypeRefAsType (seekReadTypeRefAsTypeUncached ctxtH) - seekReadMethodDefAsMethodData = cacheMethodDefAsMethodData (seekReadMethodDefAsMethodDataUncached ctxtH) - seekReadGenericParams = cacheGenericParams (seekReadGenericParamsUncached ctxtH) - seekReadFieldDefAsFieldSpec = cacheFieldDefAsFieldSpec (seekReadFieldDefAsFieldSpecUncached ctxtH) + userStringsStreamPhysicalLoc = userStringsStreamPhysicalLoc + stringsStreamPhysicalLoc = stringsStreamPhysicalLoc + blobsStreamPhysicalLoc = blobsStreamPhysicalLoc + blobsStreamSize = blobsStreamSize + memoizeString = Tables.memoize id + readUserStringHeap = cacheUserStringHeap (readUserStringHeapUncached ctxtH) + readStringHeap = cacheStringHeap (readStringHeapUncached ctxtH) + readBlobHeap = cacheBlobHeap (readBlobHeapUncached ctxtH) + seekReadNestedRow = cacheNestedRow (seekReadNestedRowUncached ctxtH) + seekReadConstantRow = cacheConstantRow (seekReadConstantRowUncached ctxtH) + seekReadMethodSemanticsRow = cacheMethodSemanticsRow (seekReadMethodSemanticsRowUncached ctxtH) + seekReadTypeDefRow = cacheTypeDefRow (seekReadTypeDefRowUncached ctxtH) + seekReadAssemblyRef = cacheAssemblyRef (seekReadAssemblyRefUncached ctxtH) + seekReadMethodSpecAsMethodData = cacheMethodSpecAsMethodData (seekReadMethodSpecAsMethodDataUncached ctxtH) + seekReadMemberRefAsMethodData = cacheMemberRefAsMemberData (seekReadMemberRefAsMethodDataUncached ctxtH) + seekReadMemberRefAsFieldSpec = seekReadMemberRefAsFieldSpecUncached ctxtH + seekReadCustomAttr = cacheCustomAttr (seekReadCustomAttrUncached ctxtH) + seekReadTypeRef = cacheTypeRef (seekReadTypeRefUncached ctxtH) + readBlobHeapAsPropertySig = cacheBlobHeapAsPropertySig (readBlobHeapAsPropertySigUncached ctxtH) + readBlobHeapAsFieldSig = cacheBlobHeapAsFieldSig (readBlobHeapAsFieldSigUncached ctxtH) + readBlobHeapAsMethodSig = cacheBlobHeapAsMethodSig (readBlobHeapAsMethodSigUncached ctxtH) + readBlobHeapAsLocalsSig = readBlobHeapAsLocalsSigUncached ctxtH + seekReadTypeDefAsType = cacheTypeDefAsType (seekReadTypeDefAsTypeUncached ctxtH) + seekReadTypeRefAsType = cacheTypeRefAsType (seekReadTypeRefAsTypeUncached ctxtH) + seekReadMethodDefAsMethodData = cacheMethodDefAsMethodData (seekReadMethodDefAsMethodDataUncached ctxtH) + seekReadGenericParams = cacheGenericParams (seekReadGenericParamsUncached ctxtH) + seekReadFieldDefAsFieldSpec = cacheFieldDefAsFieldSpec (seekReadFieldDefAsFieldSpecUncached ctxtH) customAttrsReader_Module = customAttrsReader ctxtH hca_Module customAttrsReader_Assembly = customAttrsReader ctxtH hca_Assembly customAttrsReader_TypeDef = customAttrsReader ctxtH hca_TypeDef @@ -3772,17 +3773,17 @@ let openPEFileReader (fileName, pefile: BinaryFile, pdbDirPath, noFileOnDisk) = let peFileHeaderPhysLoc = peSignaturePhysLoc + 0x04 let peOptionalHeaderPhysLoc = peFileHeaderPhysLoc + 0x14 let peSignature = seekReadInt32 pev (peSignaturePhysLoc + 0) - if peSignature <> 0x4550 then failwithf "not a PE file - bad magic PE number 0x%08x, is = %A" peSignature pev + if peSignature <> 0x4550 then failwithf "not a PE file - bad magic PE number 0x%08x, is = %A" peSignature pev (* PE SIGNATURE *) let machine = seekReadUInt16AsInt32 pev (peFileHeaderPhysLoc + 0) let numSections = seekReadUInt16AsInt32 pev (peFileHeaderPhysLoc + 2) let optHeaderSize = seekReadUInt16AsInt32 pev (peFileHeaderPhysLoc + 16) - if optHeaderSize <> 0xe0 && + if optHeaderSize <> 0xe0 && optHeaderSize <> 0xf0 then failwith "not a PE file - bad optional header size" let x64adjust = optHeaderSize - 0xe0 - let only64 = (optHeaderSize = 0xf0) (* May want to read in the optional header Magic number and check that as well... *) + let only64 = (optHeaderSize = 0xf0) (* May want to read in the optional header Magic number and check that as well... *) let platform = match machine with | 0x8664 -> Some(AMD64) | 0x200 -> Some(IA64) | _ -> Some(X86) let sectionHeadersStartPhysLoc = peOptionalHeaderPhysLoc + optHeaderSize @@ -3790,30 +3791,30 @@ let openPEFileReader (fileName, pefile: BinaryFile, pdbDirPath, noFileOnDisk) = let isDll = (flags &&& 0x2000) <> 0x0 (* OPTIONAL PE HEADER *) - let _textPhysSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 4) (* Size of the code (text) section, or the sum of all code sections if there are multiple sections. *) + let _textPhysSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 4) (* Size of the code (text) section, or the sum of all code sections if there are multiple sections. *) (* x86: 000000a0 *) - let _initdataPhysSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 8) (* Size of the initialized data section, or the sum of all such sections if there are multiple data sections. *) + let _initdataPhysSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 8) (* Size of the initialized data section, or the sum of all such sections if there are multiple data sections. *) let _uninitdataPhysSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 12) (* Size of the uninitialized data section, or the sum of all such sections if there are multiple data sections. *) - let _entrypointAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 16) (* RVA of entry point , needs to point to bytes 0xFF 0x25 followed by the RVA+!0x4000000 in a section marked execute/read for EXEs or 0 for DLLs e.g. 0x0000b57e *) - let _textAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 20) (* e.g. 0x0002000 *) + let _entrypointAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 16) (* RVA of entry point, needs to point to bytes 0xFF 0x25 followed by the RVA+!0x4000000 in a section marked execute/read for EXEs or 0 for DLLs e.g. 0x0000b57e *) + let _textAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 20) (* e.g. 0x0002000 *) (* x86: 000000b0 *) - let dataSegmentAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 24) (* e.g. 0x0000c000 *) - (* REVIEW: For now, we'll use the DWORD at offset 24 for x64. This currently ok since fsc doesn't support true 64-bit image bases, + let dataSegmentAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 24) (* e.g. 0x0000c000 *) + (* REVIEW: For now, we'll use the DWORD at offset 24 for x64. This currently ok since fsc doesn't support true 64-bit image bases, but we'll have to fix this up when such support is added. *) let imageBaseReal = if only64 then dataSegmentAddr else seekReadInt32 pev (peOptionalHeaderPhysLoc + 28) // Image Base Always 0x400000 (see Section 23.1). - let alignVirt = seekReadInt32 pev (peOptionalHeaderPhysLoc + 32) // Section Alignment Always 0x2000 (see Section 23.1). - let alignPhys = seekReadInt32 pev (peOptionalHeaderPhysLoc + 36) // File Alignment Either 0x200 or 0x1000. + let alignVirt = seekReadInt32 pev (peOptionalHeaderPhysLoc + 32) // Section Alignment Always 0x2000 (see Section 23.1). + let alignPhys = seekReadInt32 pev (peOptionalHeaderPhysLoc + 36) // File Alignment Either 0x200 or 0x1000. (* x86: 000000c0 *) - let _osMajor = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 40) // OS Major Always 4 (see Section 23.1). - let _osMinor = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 42) // OS Minor Always 0 (see Section 23.1). - let _userMajor = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 44) // User Major Always 0 (see Section 23.1). - let _userMinor = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 46) // User Minor Always 0 (see Section 23.1). + let _osMajor = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 40) // OS Major Always 4 (see Section 23.1). + let _osMinor = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 42) // OS Minor Always 0 (see Section 23.1). + let _userMajor = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 44) // User Major Always 0 (see Section 23.1). + let _userMinor = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 46) // User Minor Always 0 (see Section 23.1). let subsysMajor = seekReadUInt16AsInt32 pev (peOptionalHeaderPhysLoc + 48) // SubSys Major Always 4 (see Section 23.1). let subsysMinor = seekReadUInt16AsInt32 pev (peOptionalHeaderPhysLoc + 50) // SubSys Minor Always 0 (see Section 23.1). (* x86: 000000d0 *) - let _imageEndAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 56) // Image Size: Size, in bytes, of image, including all headers and padding; - let _headerPhysSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 60) // Header Size Combined size of MS-DOS Header, PE Header, PE Optional Header and padding; - let subsys = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 68) // SubSystem Subsystem required to run this image. + let _imageEndAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 56) // Image Size: Size, in bytes, of image, including all headers and padding + let _headerPhysSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 60) // Header Size Combined size of MS-DOS Header, PE Header, PE Optional Header and padding + let subsys = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 68) // SubSystem Subsystem required to run this image. let useHighEnthropyVA = let n = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 70) let highEnthropyVA = 0x20us @@ -3822,29 +3823,29 @@ let openPEFileReader (fileName, pefile: BinaryFile, pdbDirPath, noFileOnDisk) = (* x86: 000000e0 *) (* WARNING: THESE ARE 64 bit ON x64/ia64 *) - (* REVIEW: If we ever decide that we need these values for x64, we'll have to read them in as 64bit and fix up the rest of the offsets. + (* REVIEW: If we ever decide that we need these values for x64, we'll have to read them in as 64bit and fix up the rest of the offsets. Then again, it should suffice to just use the defaults, and still not bother... *) - (* let stackReserve = seekReadInt32 is (peOptionalHeaderPhysLoc + 72) in *) (* Stack Reserve Size Always 0x100000 (1Mb) (see Section 23.1). *) - (* let stackCommit = seekReadInt32 is (peOptionalHeaderPhysLoc + 76) in *) (* Stack Commit Size Always 0x1000 (4Kb) (see Section 23.1). *) - (* let heapReserve = seekReadInt32 is (peOptionalHeaderPhysLoc + 80) in *) (* Heap Reserve Size Always 0x100000 (1Mb) (see Section 23.1). *) - (* let heapCommit = seekReadInt32 is (peOptionalHeaderPhysLoc + 84) in *) (* Heap Commit Size Always 0x1000 (4Kb) (see Section 23.1). *) + (* let stackReserve = seekReadInt32 is (peOptionalHeaderPhysLoc + 72) in *) (* Stack Reserve Size Always 0x100000 (1Mb) (see Section 23.1). *) + (* let stackCommit = seekReadInt32 is (peOptionalHeaderPhysLoc + 76) in *) (* Stack Commit Size Always 0x1000 (4Kb) (see Section 23.1). *) + (* let heapReserve = seekReadInt32 is (peOptionalHeaderPhysLoc + 80) in *) (* Heap Reserve Size Always 0x100000 (1Mb) (see Section 23.1). *) + (* let heapCommit = seekReadInt32 is (peOptionalHeaderPhysLoc + 84) in *) (* Heap Commit Size Always 0x1000 (4Kb) (see Section 23.1). *) (* x86: 000000f0, x64: 00000100 *) - let _numDataDirectories = seekReadInt32 pev (peOptionalHeaderPhysLoc + 92 + x64adjust) (* Number of Data Directories: Always 0x10 (see Section 23.1). *) + let _numDataDirectories = seekReadInt32 pev (peOptionalHeaderPhysLoc + 92 + x64adjust) (* Number of Data Directories: Always 0x10 (see Section 23.1). *) (* 00000100 - these addresses are for x86 - for the x64 location, add x64adjust (0x10) *) - let _importTableAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 104 + x64adjust) (* Import Table RVA of Import Table, (see clause 24.3.1). e.g. 0000b530 *) - let _importTableSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 108 + x64adjust) (* Size of Import Table, (see clause 24.3.1). *) + let _importTableAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 104 + x64adjust) (* Import Table RVA of Import Table, (see clause 24.3.1). e.g. 0000b530 *) + let _importTableSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 108 + x64adjust) (* Size of Import Table, (see clause 24.3.1). *) let nativeResourcesAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 112 + x64adjust) let nativeResourcesSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 116 + x64adjust) (* 00000110 *) (* 00000120 *) - (* let base_relocTableNames.addr = seekReadInt32 is (peOptionalHeaderPhysLoc + 136) - let base_relocTableNames.size = seekReadInt32 is (peOptionalHeaderPhysLoc + 140) in *) + (* let base_relocTableNames.addr = seekReadInt32 is (peOptionalHeaderPhysLoc + 136) + let base_relocTableNames.size = seekReadInt32 is (peOptionalHeaderPhysLoc + 140) in *) (* 00000130 *) (* 00000140 *) (* 00000150 *) - let _importAddrTableAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 192 + x64adjust) (* RVA of Import Addr Table, (see clause 24.3.1). e.g. 0x00002000 *) - let _importAddrTableSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 196 + x64adjust) (* Size of Import Addr Table, (see clause 24.3.1). e.g. 0x00002000 *) + let _importAddrTableAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 192 + x64adjust) (* RVA of Import Addr Table, (see clause 24.3.1). e.g. 0x00002000 *) + let _importAddrTableSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 196 + x64adjust) (* Size of Import Addr Table, (see clause 24.3.1). e.g. 0x00002000 *) (* 00000160 *) let cliHeaderAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 208 + x64adjust) let _cliHeaderSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 212 + x64adjust) @@ -3873,7 +3874,7 @@ let openPEFileReader (fileName, pefile: BinaryFile, pdbDirPath, noFileOnDisk) = let textHeaderStart = findSectionHeader cliHeaderAddr let dataHeaderStart = findSectionHeader dataSegmentAddr - (* let relocHeaderStart = findSectionHeader base_relocTableNames.addr in *) + (* let relocHeaderStart = findSectionHeader base_relocTableNames.addr in *) let _textSize = if textHeaderStart = 0x0 then 0x0 else seekReadInt32 pev (textHeaderStart + 8) let _textAddr = if textHeaderStart = 0x0 then 0x0 else seekReadInt32 pev (textHeaderStart + 12) @@ -3901,21 +3902,21 @@ let openPEFileReader (fileName, pefile: BinaryFile, pdbDirPath, noFileOnDisk) = let _majorRuntimeVersion = seekReadUInt16 pev (cliHeaderPhysLoc + 4) let _minorRuntimeVersion = seekReadUInt16 pev (cliHeaderPhysLoc + 6) - let metadataAddr = seekReadInt32 pev (cliHeaderPhysLoc + 8) - let metadataSize = seekReadInt32 pev (cliHeaderPhysLoc + 12) - let cliFlags = seekReadInt32 pev (cliHeaderPhysLoc + 16) + let metadataAddr = seekReadInt32 pev (cliHeaderPhysLoc + 8) + let metadataSize = seekReadInt32 pev (cliHeaderPhysLoc + 12) + let cliFlags = seekReadInt32 pev (cliHeaderPhysLoc + 16) - let ilOnly = (cliFlags &&& 0x01) <> 0x00 - let only32 = (cliFlags &&& 0x02) <> 0x00 - let is32bitpreferred = (cliFlags &&& 0x00020003) <> 0x00 - let _strongnameSigned = (cliFlags &&& 0x08) <> 0x00 - let _trackdebugdata = (cliFlags &&& 0x010000) <> 0x00 + let ilOnly = (cliFlags &&& 0x01) <> 0x00 + let only32 = (cliFlags &&& 0x02) <> 0x00 + let is32bitpreferred = (cliFlags &&& 0x00020003) <> 0x00 + let _strongnameSigned = (cliFlags &&& 0x08) <> 0x00 + let _trackdebugdata = (cliFlags &&& 0x010000) <> 0x00 let entryPointToken = seekReadUncodedToken pev (cliHeaderPhysLoc + 20) - let resourcesAddr = seekReadInt32 pev (cliHeaderPhysLoc + 24) - let resourcesSize = seekReadInt32 pev (cliHeaderPhysLoc + 28) - let strongnameAddr = seekReadInt32 pev (cliHeaderPhysLoc + 32) - let _strongnameSize = seekReadInt32 pev (cliHeaderPhysLoc + 36) + let resourcesAddr = seekReadInt32 pev (cliHeaderPhysLoc + 24) + let resourcesSize = seekReadInt32 pev (cliHeaderPhysLoc + 28) + let strongnameAddr = seekReadInt32 pev (cliHeaderPhysLoc + 32) + let _strongnameSize = seekReadInt32 pev (cliHeaderPhysLoc + 36) let vtableFixupsAddr = seekReadInt32 pev (cliHeaderPhysLoc + 40) let _vtableFixupsSize = seekReadInt32 pev (cliHeaderPhysLoc + 44) @@ -3939,7 +3940,7 @@ let openPEFileReader (fileName, pefile: BinaryFile, pdbDirPath, noFileOnDisk) = getPdbReader pdbDirPath fileName #endif - let pectxt : PEReader = + let pectxt: PEReader = { pdb=pdb textSegmentPhysicalLoc=textSegmentPhysicalLoc textSegmentPhysicalSize=textSegmentPhysicalSize @@ -3997,11 +3998,11 @@ type ILReaderOptions = type ILModuleReader = - abstract ILModuleDef : ILModuleDef - abstract ILAssemblyRefs : ILAssemblyRef list + abstract ILModuleDef: ILModuleDef + abstract ILAssemblyRefs: ILAssemblyRef list /// ILModuleReader objects only need to be explicitly disposed if memory mapping is used, i.e. reduceMemoryUsage = false - inherit System.IDisposable + inherit System.IDisposable [] @@ -4099,7 +4100,7 @@ let OpenILModuleReader fileName opts = let mdfileOpt = match opts.tryGetMetadataSnapshot (fullPath, writeStamp) with | Some (obj, start, len) -> Some (RawMemoryFile(fullPath, obj, start, len) :> BinaryFile) - | None -> None + | None -> None // For metadata-only, always use a temporary, short-lived PE file reader, preferably over a memory mapped file. // Then use the metadata blob as the long-lived memory resource. @@ -4136,7 +4137,7 @@ let OpenILModuleReader fileName opts = // whole binary for the command-line compiler: address space is rarely an issue. // // We do however care about avoiding locks on files that prevent their deletion during a - // multi-proc build. So use memory mapping, but only for stable files. Other files + // multi-proc build. So use memory mapping, but only for stable files. Other files // still use an in-memory ByteFile let _disposer, pefile = if alwaysMemoryMapFSC || stableFileHeuristicApplies fullPath then @@ -4149,7 +4150,7 @@ let OpenILModuleReader fileName opts = let ilModule, ilAssemblyRefs, pdb = openPE (fullPath, pefile, opts.pdbDirPath, reduceMemoryUsage, opts.ilGlobals, false) let ilModuleReader = new ILModuleReaderImpl(ilModule, ilAssemblyRefs, (fun () -> ClosePdbReader pdb)) - // Readers with PDB reader disposal logic don't go in the cache. Note the PDB reader is only used in static linking. + // Readers with PDB reader disposal logic don't go in the cache. Note the PDB reader is only used in static linking. if keyOk && opts.pdbDirPath.IsNone then ilModuleReaderCacheLock.AcquireLock (fun ltok -> ilModuleReaderCache.Put(ltok, key, ilModuleReader)) diff --git a/src/fcs-fable/src/absil/ilreflect.fs b/src/fcs-fable/src/absil/ilreflect.fs index 2b6dd3d06d..474997be4e 100755 --- a/src/fcs-fable/src/absil/ilreflect.fs +++ b/src/fcs-fable/src/absil/ilreflect.fs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. //---------------------------------------------------------------------------- // Write Abstract IL structures at runtime using Reflection.Emit @@ -53,16 +53,16 @@ type System.Reflection.Emit.AssemblyBuilder with #endif modB - member asmB.SetCustomAttributeAndLog(cinfo, bytes) = + member asmB.SetCustomAttributeAndLog(cinfo, bytes) = if logRefEmitCalls then printfn "assemblyBuilder%d.SetCustomAttribute(%A, %A)" (abs <| hash asmB) cinfo bytes wrapCustomAttr asmB.SetCustomAttribute (cinfo, bytes) #if !FX_RESHAPED_REFEMIT - member asmB.AddResourceFileAndLog(nm1, nm2, attrs) = + member asmB.AddResourceFileAndLog(nm1, nm2, attrs) = if logRefEmitCalls then printfn "assemblyBuilder%d.AddResourceFile(%A, %A, enum %d)" (abs <| hash asmB) nm1 nm2 (LanguagePrimitives.EnumToValue attrs) asmB.AddResourceFile(nm1, nm2, attrs) #endif - member asmB.SetCustomAttributeAndLog(cab) = + member asmB.SetCustomAttributeAndLog(cab) = if logRefEmitCalls then printfn "assemblyBuilder%d.SetCustomAttribute(%A)" (abs <| hash asmB) cab asmB.SetCustomAttribute(cab) @@ -75,7 +75,7 @@ type System.Reflection.Emit.ModuleBuilder with #if !FX_RESHAPED_REFEMIT member modB.DefineDocumentAndLog(file, lang, vendor, doctype) = let symDoc = modB.DefineDocument(file, lang, vendor, doctype) - if logRefEmitCalls then printfn "let docWriter%d = moduleBuilder%d.DefineDocument(@%A, System.Guid(\"%A\"), System.Guid(\"%A\"), System.Guid(\"%A\"))" (abs <| hash symDoc) (abs <| hash modB) file lang vendor doctype + if logRefEmitCalls then printfn "let docWriter%d = moduleBuilder%d.DefineDocument(@%A, System.Guid(\"%A\"), System.Guid(\"%A\"), System.Guid(\"%A\"))" (abs <| hash symDoc) (abs <| hash modB) file lang vendor doctype symDoc #endif member modB.GetTypeAndLog(nameInModule, flag1, flag2) = @@ -92,7 +92,7 @@ type System.Reflection.Emit.ModuleBuilder with if logRefEmitCalls then printfn "moduleBuilder%d.DefineManifestResource(%A, %A, enum %d)" (abs <| hash modB) name stream (LanguagePrimitives.EnumToValue attrs) modB.DefineManifestResource(name, stream, attrs) #endif - member modB.SetCustomAttributeAndLog(cinfo, bytes) = + member modB.SetCustomAttributeAndLog(cinfo, bytes) = if logRefEmitCalls then printfn "moduleBuilder%d.SetCustomAttribute(%A, %A)" (abs <| hash modB) cinfo bytes wrapCustomAttr modB.SetCustomAttribute (cinfo, bytes) @@ -133,7 +133,7 @@ type System.Reflection.Emit.MethodBuilder with if logRefEmitCalls then printfn "let ilg%d = methodBuilder%d.GetILGenerator()" (abs <| hash ilG) (abs <| hash methB) ilG - member methB.SetCustomAttributeAndLog(cinfo, bytes) = + member methB.SetCustomAttributeAndLog(cinfo, bytes) = if logRefEmitCalls then printfn "methodBuilder%d.SetCustomAttribute(%A, %A)" (abs <| hash methB) cinfo bytes wrapCustomAttr methB.SetCustomAttribute (cinfo, bytes) @@ -164,20 +164,20 @@ type System.Reflection.Emit.TypeBuilder with if logRefEmitCalls then printfn "let constructorBuilder%d = typeBuilder%d.DefineConstructor(enum %d, CallingConventions.%A, %A)" (abs <| hash consB) (abs <| hash typB) (LanguagePrimitives.EnumToValue attrs) cconv parms consB - member typB.DefineFieldAndLog(nm, ty:System.Type, attrs) = + member typB.DefineFieldAndLog(nm, ty: System.Type, attrs) = let fieldB = typB.DefineField(nm, ty, attrs) if logRefEmitCalls then printfn "let fieldBuilder%d = typeBuilder%d.DefineField(\"%s\", typeof<%s>, enum %d)" (abs <| hash fieldB) (abs <| hash typB) nm ty.FullName (LanguagePrimitives.EnumToValue attrs) fieldB - member typB.DefinePropertyAndLog(nm, attrs, ty:System.Type, args) = + member typB.DefinePropertyAndLog(nm, attrs, ty: System.Type, args) = if logRefEmitCalls then printfn "typeBuilder%d.DefineProperty(\"%A\", enum %d, typeof<%s>, %A)" (abs <| hash typB) nm (LanguagePrimitives.EnumToValue attrs) ty.FullName args typB.DefineProperty(nm, attrs, ty, args) - member typB.DefineEventAndLog(nm, attrs, ty:System.Type) = + member typB.DefineEventAndLog(nm, attrs, ty: System.Type) = if logRefEmitCalls then printfn "typeBuilder%d.DefineEvent(\"%A\", enum %d, typeof<%A>)" (abs <| hash typB) nm (LanguagePrimitives.EnumToValue attrs) ty.FullName typB.DefineEvent(nm, attrs, ty) - member typB.SetParentAndLog(ty:System.Type) = + member typB.SetParentAndLog(ty: System.Type) = if logRefEmitCalls then printfn "typeBuilder%d.SetParent(typeof<%s>)" (abs <| hash typB) ty.FullName typB.SetParent(ty) @@ -204,10 +204,10 @@ type System.Reflection.Emit.TypeBuilder with type System.Reflection.Emit.OpCode with - member opcode.RefEmitName = (string (System.Char.ToUpper(opcode.Name.[0])) + opcode.Name.[1..]).Replace(".", "_").Replace("_i4", "_I4") + member opcode.RefEmitName = (string (System.Char.ToUpper(opcode.Name.[0])) + opcode.Name.[1..]).Replace(".", "_").Replace("_i4", "_I4") type System.Reflection.Emit.ILGenerator with - member ilG.DeclareLocalAndLog(ty:System.Type, isPinned) = + member ilG.DeclareLocalAndLog(ty: System.Type, isPinned) = if logRefEmitCalls then printfn "ilg%d.DeclareLocal(typeof<%s>, %b)" (abs <| hash ilG) ty.FullName isPinned ilG.DeclareLocal(ty, isPinned) @@ -233,7 +233,7 @@ type System.Reflection.Emit.ILGenerator with ilG.BeginFinallyBlock() member ilG.BeginCatchBlockAndLog(ty) = - if logRefEmitCalls then printfn "ilg%d.BeginCatchBlock(%A)" (abs <| hash ilG) ty + if logRefEmitCalls then printfn "ilg%d.BeginCatchBlock(%A)" (abs <| hash ilG) ty ilG.BeginCatchBlock(ty) member ilG.BeginExceptFilterBlockAndLog() = @@ -249,32 +249,32 @@ type System.Reflection.Emit.ILGenerator with if logRefEmitCalls then printfn "let label%d_%d = ilg%d.DefineLabel()" (abs <| hash ilG) (abs <| hash lab) (abs <| hash ilG) lab - member x.EmitAndLog (op:OpCode) = + member x.EmitAndLog (op: OpCode) = if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s)" (abs <| hash x) op.RefEmitName x.Emit(op) - member x.EmitAndLog (op:OpCode, v:Label) = - if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, label%d_%d)" (abs <| hash x) op.RefEmitName (abs <| hash x) (abs <| hash v); + member x.EmitAndLog (op: OpCode, v: Label) = + if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, label%d_%d)" (abs <| hash x) op.RefEmitName (abs <| hash x) (abs <| hash v) x.Emit(op, v) - member x.EmitAndLog (op:OpCode, v:int16) = - if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, int16 %d)" (abs <| hash x) op.RefEmitName v; + member x.EmitAndLog (op: OpCode, v: int16) = + if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, int16 %d)" (abs <| hash x) op.RefEmitName v x.Emit(op, v) - member x.EmitAndLog (op:OpCode, v:int32) = - if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, %d)" (abs <| hash x) op.RefEmitName v; + member x.EmitAndLog (op: OpCode, v: int32) = + if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, %d)" (abs <| hash x) op.RefEmitName v x.Emit(op, v) - member x.EmitAndLog (op:OpCode, v:MethodInfo) = - if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, methodBuilder%d) // method %s" (abs <| hash x) op.RefEmitName (abs <| hash v) v.Name; + member x.EmitAndLog (op: OpCode, v: MethodInfo) = + if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, methodBuilder%d) // method %s" (abs <| hash x) op.RefEmitName (abs <| hash v) v.Name x.Emit(op, v) - member x.EmitAndLog (op:OpCode, v:string) = - if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, \"@%s\")" (abs <| hash x) op.RefEmitName v; + member x.EmitAndLog (op: OpCode, v: string) = + if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, \"@%s\")" (abs <| hash x) op.RefEmitName v x.Emit(op, v) - member x.EmitAndLog (op:OpCode, v:Type) = - if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, typeof<%s>)" (abs <| hash x) op.RefEmitName v.FullName; + member x.EmitAndLog (op: OpCode, v: Type) = + if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, typeof<%s>)" (abs <| hash x) op.RefEmitName v.FullName x.Emit(op, v) - member x.EmitAndLog (op:OpCode, v:FieldInfo) = - if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, fieldBuilder%d) // field %s" (abs <| hash x) op.RefEmitName (abs <| hash v) v.Name; + member x.EmitAndLog (op: OpCode, v: FieldInfo) = + if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, fieldBuilder%d) // field %s" (abs <| hash x) op.RefEmitName (abs <| hash v) v.Name x.Emit(op, v) - member x.EmitAndLog (op:OpCode, v:ConstructorInfo) = - if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, constructor_%s)" (abs <| hash x) op.RefEmitName v.DeclaringType.Name; + member x.EmitAndLog (op: OpCode, v: ConstructorInfo) = + if logRefEmitCalls then printfn "ilg%d.Emit(OpCodes.%s, constructor_%s)" (abs <| hash x) op.RefEmitName v.DeclaringType.Name x.Emit(op, v) @@ -282,18 +282,18 @@ type System.Reflection.Emit.ILGenerator with // misc //---------------------------------------------------------------------------- -let inline flagsIf b x = if b then x else enum 0 +let inline flagsIf b x = if b then x else enum 0 module Zmap = let force x m str = match Zmap.tryFind x m with Some y -> y | None -> failwithf "Zmap.force: %s: x = %+A" str x -let equalTypes (s:Type) (t:Type) = s.Equals(t) +let equalTypes (s: Type) (t: Type) = s.Equals(t) let equalTypeLists ss tt = List.lengthsEqAndForall2 equalTypes ss tt let equalTypeArrays ss tt = Array.lengthsEqAndForall2 equalTypes ss tt -let getGenericArgumentsOfType (typT : Type) = - if typT.IsGenericType then typT.GetGenericArguments() else [| |] -let getGenericArgumentsOfMethod (methI : MethodInfo) = +let getGenericArgumentsOfType (typT: Type) = + if typT.IsGenericType then typT.GetGenericArguments() else [| |] +let getGenericArgumentsOfMethod (methI: MethodInfo) = if methI.IsGenericMethod then methI.GetGenericArguments() else [| |] let getTypeConstructor (ty: Type) = @@ -303,27 +303,27 @@ let getTypeConstructor (ty: Type) = // convAssemblyRef //---------------------------------------------------------------------------- -let convAssemblyRef (aref:ILAssemblyRef) = +let convAssemblyRef (aref: ILAssemblyRef) = let asmName = new System.Reflection.AssemblyName() - asmName.Name <- aref.Name; + asmName.Name <- aref.Name (match aref.PublicKey with | None -> () - | Some (PublicKey bytes) -> asmName.SetPublicKey(bytes) - | Some (PublicKeyToken bytes) -> asmName.SetPublicKeyToken(bytes)); + | Some (PublicKey bytes) -> asmName.SetPublicKey(bytes) + | Some (PublicKeyToken bytes) -> asmName.SetPublicKeyToken(bytes)) let setVersion (major, minor, build, rev) = asmName.Version <- System.Version (int32 major, int32 minor, int32 build, int32 rev) - Option.iter setVersion aref.Version; - // asmName.ProcessorArchitecture <- System.Reflection.ProcessorArchitecture.MSIL; + Option.iter setVersion aref.Version + // asmName.ProcessorArchitecture <- System.Reflection.ProcessorArchitecture.MSIL #if !FX_RESHAPED_GLOBALIZATION - //Option.iter (fun name -> asmName.CultureInfo <- System.Globalization.CultureInfo.CreateSpecificCulture(name)) aref.Locale; - asmName.CultureInfo <- System.Globalization.CultureInfo.InvariantCulture; + //Option.iter (fun name -> asmName.CultureInfo <- System.Globalization.CultureInfo.CreateSpecificCulture(name)) aref.Locale + asmName.CultureInfo <- System.Globalization.CultureInfo.InvariantCulture #endif asmName /// The global environment. type cenv = { ilg: ILGlobals - tryFindSysILTypeRef : string -> ILTypeRef option + tryFindSysILTypeRef: string -> ILTypeRef option generatePdb: bool resolveAssemblyRef: (ILAssemblyRef -> Choice option) } @@ -334,7 +334,7 @@ type cenv = // [] , name -> name // [ns] , name -> ns+name // [ns;typeA;typeB], name -> ns+typeA+typeB+name -let convTypeRefAux (cenv:cenv) (tref:ILTypeRef) = +let convTypeRefAux (cenv: cenv) (tref: ILTypeRef) = let qualifiedName = (String.concat "+" (tref.Enclosing @ [ tref.Name ])).Replace(",", @"\,") match tref.Scope with | ILScopeRef.Assembly asmref -> @@ -345,7 +345,7 @@ let convTypeRefAux (cenv:cenv) (tref:ILTypeRef) = | Some (Choice2Of2 assembly) -> assembly | None -> - let asmName = convAssemblyRef asmref + let asmName = convAssemblyRef asmref FileSystem.AssemblyLoad(asmName) let typT = assembly.GetType(qualifiedName) match typT with @@ -364,40 +364,40 @@ let convTypeRefAux (cenv:cenv) (tref:ILTypeRef) = /// and could be placed as hash tables in the global environment. [] type emEnv = - { emTypMap : Zmap ; - emConsMap : Zmap; - emMethMap : Zmap; - emFieldMap : Zmap; - emPropMap : Zmap; - emLocals : LocalBuilder[]; - emLabels : Zmap; - emTyvars : Type[] list; // stack - emEntryPts : (TypeBuilder * string) list - delayedFieldInits : (unit -> unit) list} + { emTypMap: Zmap + emConsMap: Zmap + emMethMap: Zmap + emFieldMap: Zmap + emPropMap: Zmap + emLocals: LocalBuilder[] + emLabels: Zmap + emTyvars: Type[] list; // stack + emEntryPts: (TypeBuilder * string) list + delayedFieldInits: (unit -> unit) list} -let orderILTypeRef = ComparisonIdentity.Structural -let orderILMethodRef = ComparisonIdentity.Structural -let orderILFieldRef = ComparisonIdentity.Structural -let orderILPropertyRef = ComparisonIdentity.Structural +let orderILTypeRef = ComparisonIdentity.Structural +let orderILMethodRef = ComparisonIdentity.Structural +let orderILFieldRef = ComparisonIdentity.Structural +let orderILPropertyRef = ComparisonIdentity.Structural let emEnv0 = - { emTypMap = Zmap.empty orderILTypeRef; - emConsMap = Zmap.empty orderILMethodRef; - emMethMap = Zmap.empty orderILMethodRef; - emFieldMap = Zmap.empty orderILFieldRef; - emPropMap = Zmap.empty orderILPropertyRef; - emLocals = [| |]; - emLabels = Zmap.empty codeLabelOrder; - emTyvars = []; + { emTypMap = Zmap.empty orderILTypeRef + emConsMap = Zmap.empty orderILMethodRef + emMethMap = Zmap.empty orderILMethodRef + emFieldMap = Zmap.empty orderILFieldRef + emPropMap = Zmap.empty orderILPropertyRef + emLocals = [| |] + emLabels = Zmap.empty codeLabelOrder + emTyvars = [] emEntryPts = [] delayedFieldInits = [] } -let envBindTypeRef emEnv (tref:ILTypeRef) (typT, typB, typeDef)= +let envBindTypeRef emEnv (tref: ILTypeRef) (typT, typB, typeDef) = match typT with - | null -> failwithf "binding null type in envBindTypeRef: %s\n" tref.Name; + | null -> failwithf "binding null type in envBindTypeRef: %s\n" tref.Name | _ -> {emEnv with emTypMap = Zmap.add tref (typT, typB, typeDef, None) emEnv.emTypMap} -let envUpdateCreatedTypeRef emEnv (tref:ILTypeRef) = +let envUpdateCreatedTypeRef emEnv (tref: ILTypeRef) = // The tref's TypeBuilder has been created, so we have a Type proper. // Update the tables to include this created type (the typT held prior to this is (i think) actually (TypeBuilder :> Type). // The (TypeBuilder :> Type) does not implement all the methods that a Type proper does. @@ -419,30 +419,30 @@ let envUpdateCreatedTypeRef emEnv (tref:ILTypeRef) = {emEnv with emTypMap = Zmap.add tref (typT, typB, typeDef, Some ty) emEnv.emTypMap} else #if DEBUG - printf "envUpdateCreatedTypeRef: expected type to be created\n"; + printf "envUpdateCreatedTypeRef: expected type to be created\n" #endif emEnv -let convTypeRef cenv emEnv preferCreated (tref:ILTypeRef) = +let convTypeRef cenv emEnv preferCreated (tref: ILTypeRef) = let res = match Zmap.tryFind tref emEnv.emTypMap with | Some (_typT, _typB, _typeDef, Some createdTy) when preferCreated -> createdTy - | Some (typT, _typB, _typeDef, _) -> typT - | None -> convTypeRefAux cenv tref + | Some (typT, _typB, _typeDef, _) -> typT + | None -> convTypeRefAux cenv tref match res with | null -> error(Error(FSComp.SR.itemNotFoundDuringDynamicCodeGen ("type", tref.QualifiedName, tref.Scope.QualifiedName), range0)) | _ -> res -let envBindConsRef emEnv (mref:ILMethodRef) consB = +let envBindConsRef emEnv (mref: ILMethodRef) consB = {emEnv with emConsMap = Zmap.add mref consB emEnv.emConsMap} -let envGetConsB emEnv (mref:ILMethodRef) = +let envGetConsB emEnv (mref: ILMethodRef) = Zmap.force mref emEnv.emConsMap "envGetConsB: failed" -let envBindMethodRef emEnv (mref:ILMethodRef) methB = +let envBindMethodRef emEnv (mref: ILMethodRef) methB = {emEnv with emMethMap = Zmap.add mref methB emEnv.emMethMap} -let envGetMethB emEnv (mref:ILMethodRef) = +let envGetMethB emEnv (mref: ILMethodRef) = Zmap.force mref emEnv.emMethMap "envGetMethB: failed" let envBindFieldRef emEnv fref fieldB = @@ -451,36 +451,36 @@ let envBindFieldRef emEnv fref fieldB = let envGetFieldB emEnv fref = Zmap.force fref emEnv.emFieldMap "- envGetMethB: failed" -let envBindPropRef emEnv (pref:ILPropertyRef) propB = +let envBindPropRef emEnv (pref: ILPropertyRef) propB = {emEnv with emPropMap = Zmap.add pref propB emEnv.emPropMap} let envGetPropB emEnv pref = Zmap.force pref emEnv.emPropMap "- envGetPropB: failed" -let envGetTypB emEnv (tref:ILTypeRef) = +let envGetTypB emEnv (tref: ILTypeRef) = Zmap.force tref emEnv.emTypMap "envGetTypB: failed" |> (fun (_typT, typB, _typeDef, _createdTypOpt) -> typB) -let envGetTypeDef emEnv (tref:ILTypeRef) = +let envGetTypeDef emEnv (tref: ILTypeRef) = Zmap.force tref emEnv.emTypMap "envGetTypeDef: failed" |> (fun (_typT, _typB, typeDef, _createdTypOpt) -> typeDef) let envSetLocals emEnv locs = assert (emEnv.emLocals.Length = 0); // check "locals" is not yet set (scopes once only) {emEnv with emLocals = locs} -let envGetLocal emEnv i = emEnv.emLocals.[i] // implicit bounds checking +let envGetLocal emEnv i = emEnv.emLocals.[i] // implicit bounds checking let envSetLabel emEnv name lab = - assert (not (Zmap.mem name emEnv.emLabels)); + assert (not (Zmap.mem name emEnv.emLabels)) {emEnv with emLabels = Zmap.add name lab emEnv.emLabels} let envGetLabel emEnv name = Zmap.find name emEnv.emLabels -let envPushTyvars emEnv tys = {emEnv with emTyvars = tys :: emEnv.emTyvars} -let envPopTyvars emEnv = {emEnv with emTyvars = List.tail emEnv.emTyvars} -let envGetTyvar emEnv u16 = +let envPushTyvars emEnv tys = {emEnv with emTyvars = tys :: emEnv.emTyvars} +let envPopTyvars emEnv = {emEnv with emTyvars = List.tail emEnv.emTyvars} +let envGetTyvar emEnv u16 = match emEnv.emTyvars with - | [] -> failwith "envGetTyvar: not scope of type vars" + | [] -> failwith "envGetTyvar: not scope of type vars" | tvs::_ -> let i = int32 u16 if i<0 || i>= Array.length tvs then @@ -490,23 +490,29 @@ let envGetTyvar emEnv u16 = let isEmittedTypeRef emEnv tref = Zmap.mem tref emEnv.emTypMap -let envAddEntryPt emEnv mref = {emEnv with emEntryPts = mref::emEnv.emEntryPts} -let envPopEntryPts emEnv = {emEnv with emEntryPts = []}, emEnv.emEntryPts +let envAddEntryPt emEnv mref = {emEnv with emEntryPts = mref::emEnv.emEntryPts} +let envPopEntryPts emEnv = {emEnv with emEntryPts = []}, emEnv.emEntryPts //---------------------------------------------------------------------------- // convCallConv //---------------------------------------------------------------------------- let convCallConv (Callconv (hasThis, basic)) = - let ccA = match hasThis with ILThisConvention.Static -> CallingConventions.Standard - | ILThisConvention.InstanceExplicit -> CallingConventions.ExplicitThis - | ILThisConvention.Instance -> CallingConventions.HasThis - let ccB = match basic with ILArgConvention.Default -> enum 0 - | ILArgConvention.CDecl -> enum 0 - | ILArgConvention.StdCall -> enum 0 - | ILArgConvention.ThisCall -> enum 0 // XXX: check all these - | ILArgConvention.FastCall -> enum 0 - | ILArgConvention.VarArg -> CallingConventions.VarArgs + let ccA = + match hasThis with + | ILThisConvention.Static -> CallingConventions.Standard + | ILThisConvention.InstanceExplicit -> CallingConventions.ExplicitThis + | ILThisConvention.Instance -> CallingConventions.HasThis + + let ccB = + match basic with + | ILArgConvention.Default -> enum 0 + | ILArgConvention.CDecl -> enum 0 + | ILArgConvention.StdCall -> enum 0 + | ILArgConvention.ThisCall -> enum 0 // XXX: check all these + | ILArgConvention.FastCall -> enum 0 + | ILArgConvention.VarArg -> CallingConventions.VarArgs + ccA ||| ccB @@ -514,25 +520,25 @@ let convCallConv (Callconv (hasThis, basic)) = // convType //---------------------------------------------------------------------------- -let rec convTypeSpec cenv emEnv preferCreated (tspec:ILTypeSpec) = - let typT = convTypeRef cenv emEnv preferCreated tspec.TypeRef +let rec convTypeSpec cenv emEnv preferCreated (tspec: ILTypeSpec) = + let typT = convTypeRef cenv emEnv preferCreated tspec.TypeRef let tyargs = List.map (convTypeAux cenv emEnv preferCreated) tspec.GenericArgs let res = match isNil tyargs, typT.IsGenericType with - | _ , true -> typT.MakeGenericType(List.toArray tyargs) + | _, true -> typT.MakeGenericType(List.toArray tyargs) | true, false -> typT - | _ , false -> null + | _, false -> null match res with | null -> error(Error(FSComp.SR.itemNotFoundDuringDynamicCodeGen ("type", tspec.TypeRef.QualifiedName, tspec.Scope.QualifiedName), range0)) | _ -> res and convTypeAux cenv emEnv preferCreated ty = match ty with - | ILType.Void -> Type.GetType("System.Void") + | ILType.Void -> Type.GetType("System.Void") | ILType.Array (shape, eltType) -> let baseT = convTypeAux cenv emEnv preferCreated eltType let nDims = shape.Rank - // MakeArrayType() returns "eltType[]" + // MakeArrayType() returns "eltType[]" // MakeArrayType(1) returns "eltType[*]" // MakeArrayType(2) returns "eltType[, ]" // MakeArrayType(3) returns "eltType[, , ]" @@ -540,17 +546,17 @@ and convTypeAux cenv emEnv preferCreated ty = if nDims=1 then baseT.MakeArrayType() else baseT.MakeArrayType shape.Rank - | ILType.Value tspec -> convTypeSpec cenv emEnv preferCreated tspec - | ILType.Boxed tspec -> convTypeSpec cenv emEnv preferCreated tspec - | ILType.Ptr eltType -> + | ILType.Value tspec -> convTypeSpec cenv emEnv preferCreated tspec + | ILType.Boxed tspec -> convTypeSpec cenv emEnv preferCreated tspec + | ILType.Ptr eltType -> let baseT = convTypeAux cenv emEnv preferCreated eltType baseT.MakePointerType() - | ILType.Byref eltType -> + | ILType.Byref eltType -> let baseT = convTypeAux cenv emEnv preferCreated eltType baseT.MakeByRefType() - | ILType.TypeVar tv -> envGetTyvar emEnv tv + | ILType.TypeVar tv -> envGetTyvar emEnv tv // Consider completing the following cases: - | ILType.Modified (_, _, modifiedTy) -> + | ILType.Modified (_, _, modifiedTy) -> // Note, "modreq" are not being emitted. This is convTypeAux cenv emEnv preferCreated modifiedTy @@ -582,9 +588,9 @@ let convTypeOrTypeDef cenv emEnv ty = | ILType.Boxed tspec when tspec.GenericArgs.IsEmpty -> convTypeRef cenv emEnv false tspec.TypeRef | _ -> convType cenv emEnv ty -let convTypes cenv emEnv (tys:ILTypes) = List.map (convType cenv emEnv) tys +let convTypes cenv emEnv (tys: ILTypes) = List.map (convType cenv emEnv) tys -let convTypesToArray cenv emEnv (tys:ILTypes) = convTypes cenv emEnv tys |> List.toArray +let convTypesToArray cenv emEnv (tys: ILTypes) = convTypes cenv emEnv tys |> List.toArray /// Uses the .CreateType() for emitted type if available. let convCreatedType cenv emEnv ty = convTypeAux cenv emEnv true ty @@ -592,7 +598,7 @@ let convCreatedTypeRef cenv emEnv ty = convTypeRef cenv emEnv true ty let rec convParamModifiersOfType cenv emEnv (pty: ILType) = [| match pty with - | ILType.Modified (modreq, ty, modifiedTy) -> + | ILType.Modified (modreq, ty, modifiedTy) -> yield (modreq, convTypeRef cenv emEnv false ty) yield! convParamModifiersOfType cenv emEnv modifiedTy | _ -> () |] @@ -616,27 +622,27 @@ let convReturnModifiers cenv emEnv (p: ILReturn) = let convFieldInit x = match x with - | ILFieldInit.String s -> box s - | ILFieldInit.Bool bool -> box bool - | ILFieldInit.Char u16 -> box (char (int u16)) - | ILFieldInit.Int8 i8 -> box i8 - | ILFieldInit.Int16 i16 -> box i16 - | ILFieldInit.Int32 i32 -> box i32 - | ILFieldInit.Int64 i64 -> box i64 - | ILFieldInit.UInt8 u8 -> box u8 - | ILFieldInit.UInt16 u16 -> box u16 - | ILFieldInit.UInt32 u32 -> box u32 - | ILFieldInit.UInt64 u64 -> box u64 + | ILFieldInit.String s -> box s + | ILFieldInit.Bool bool -> box bool + | ILFieldInit.Char u16 -> box (char (int u16)) + | ILFieldInit.Int8 i8 -> box i8 + | ILFieldInit.Int16 i16 -> box i16 + | ILFieldInit.Int32 i32 -> box i32 + | ILFieldInit.Int64 i64 -> box i64 + | ILFieldInit.UInt8 u8 -> box u8 + | ILFieldInit.UInt16 u16 -> box u16 + | ILFieldInit.UInt32 u32 -> box u32 + | ILFieldInit.UInt64 u64 -> box u64 | ILFieldInit.Single ieee32 -> box ieee32 | ILFieldInit.Double ieee64 -> box ieee64 - | ILFieldInit.Null -> (null :> Object) + | ILFieldInit.Null -> (null :> Object) //---------------------------------------------------------------------------- // Some types require hard work... //---------------------------------------------------------------------------- // This is gross. TypeBuilderInstantiation should really be a public type, since we -// have to use alternative means for various Method/Field/Constructor lookups. However since +// have to use alternative means for various Method/Field/Constructor lookups. However since // it isn't we resort to this technique... let TypeBuilderInstantiationT = let ty = @@ -653,7 +659,7 @@ let TypeBuilderInstantiationT = assert (not (isNull ty)) ty -let typeIsNotQueryable (ty : Type) = +let typeIsNotQueryable (ty: Type) = #if FX_RESHAPED_REFLECTION let ty = ty.GetTypeInfo() #endif @@ -662,13 +668,13 @@ let typeIsNotQueryable (ty : Type) = // convFieldSpec //---------------------------------------------------------------------------- -let queryableTypeGetField _emEnv (parentT:Type) (fref: ILFieldRef) = +let queryableTypeGetField _emEnv (parentT: Type) (fref: ILFieldRef) = let res = parentT.GetField(fref.Name, BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.Instance ||| BindingFlags.Static ) match res with | null -> error(Error(FSComp.SR.itemNotFoundInTypeDuringDynamicCodeGen ("field", fref.Name, fref.DeclaringTypeRef.FullName, fref.DeclaringTypeRef.Scope.QualifiedName), range0)) | _ -> res -let nonQueryableTypeGetField (parentTI:Type) (fieldInfo : FieldInfo) : FieldInfo = +let nonQueryableTypeGetField (parentTI: Type) (fieldInfo: FieldInfo) : FieldInfo = let res = if parentTI.IsGenericType then TypeBuilder.GetField(parentTI, fieldInfo) else fieldInfo @@ -689,7 +695,7 @@ let convFieldSpec cenv emEnv fspec = // Prior type. if typeIsNotQueryable parentTI then let parentT = getTypeConstructor parentTI - let fieldInfo = queryableTypeGetField emEnv parentT fref + let fieldInfo = queryableTypeGetField emEnv parentT fref nonQueryableTypeGetField parentTI fieldInfo else queryableTypeGetField emEnv parentTI fspec.FieldRef @@ -697,7 +703,7 @@ let convFieldSpec cenv emEnv fspec = //---------------------------------------------------------------------------- // convMethodRef //---------------------------------------------------------------------------- -let queryableTypeGetMethodBySearch cenv emEnv parentT (mref:ILMethodRef) = +let queryableTypeGetMethodBySearch cenv emEnv parentT (mref: ILMethodRef) = assert(not (typeIsNotQueryable(parentT))) let cconv = (if mref.CallingConv.IsStatic then BindingFlags.Static else BindingFlags.Instance) let methInfos = parentT.GetMethods(cconv ||| BindingFlags.Public ||| BindingFlags.NonPublic) |> Array.toList @@ -721,7 +727,7 @@ let queryableTypeGetMethodBySearch cenv emEnv parentT (mref:ILMethodRef) = elif // both are generic p.IsGenericType && a.IsGenericType - // non obvious due to contravariance: Action where T : IFoo accepts Action (for FooImpl : IFoo) + // non obvious due to contravariance: Action where T: IFoo accepts Action (for FooImpl: IFoo) && p.GetGenericTypeDefinition().IsAssignableFrom(a.GetGenericTypeDefinition()) then true else false @@ -730,7 +736,7 @@ let queryableTypeGetMethodBySearch cenv emEnv parentT (mref:ILMethodRef) = if Array.length args <> Array.length ps then false else Array.forall2 satisfiesParameter args ps - let select (methInfo:MethodInfo) = + let select (methInfo: MethodInfo) = (* mref implied Types *) let mtyargTIs = getGenericArgumentsOfMethod methInfo @@ -754,29 +760,29 @@ let queryableTypeGetMethodBySearch cenv emEnv parentT (mref:ILMethodRef) = let argTs, resT = let emEnv = envPushTyvars emEnv (Array.append tyargTs mtyargTIs) let argTs = convTypes cenv emEnv mref.ArgTypes - let resT = convType cenv emEnv mref.ReturnType + let resT = convType cenv emEnv mref.ReturnType argTs, resT - let haveResT = methInfo.ReturnType + let haveResT = methInfo.ReturnType (* check for match *) if argTs.Length <> methodParameters.Length then false (* method argument length mismatch *) else let res = equalTypes resT haveResT && equalTypeLists argTs (haveArgTs |> Array.toList) res match List.tryFind select methInfos with - | None -> + | None -> let methNames = methInfos |> List.map (fun m -> m.Name) |> List.distinct failwithf "convMethodRef: could not bind to method '%A' of type '%s'" (System.String.Join(", ", methNames)) parentT.AssemblyQualifiedName | Some methInfo -> methInfo (* return MethodInfo for (generic) type's (generic) method *) -let queryableTypeGetMethod cenv emEnv parentT (mref:ILMethodRef) = +let queryableTypeGetMethod cenv emEnv parentT (mref: ILMethodRef) = assert(not (typeIsNotQueryable(parentT))) if mref.GenericArity = 0 then let tyargTs = getGenericArgumentsOfType parentT let argTs, resT = let emEnv = envPushTyvars emEnv tyargTs let argTs = convTypesToArray cenv emEnv mref.ArgTypes - let resT = convType cenv emEnv mref.ReturnType + let resT = convType cenv emEnv mref.ReturnType argTs, resT let stat = mref.CallingConv.IsStatic let cconv = (if stat then BindingFlags.Static else BindingFlags.Instance) @@ -786,9 +792,9 @@ let queryableTypeGetMethod cenv emEnv parentT (mref:ILMethodRef) = null, argTs, #if FX_RESHAPED_REFLECTION - (null:obj[])) + (null: obj[])) #else - (null:ParameterModifier[])) + (null: ParameterModifier[])) #endif // This can fail if there is an ambiguity w.r.t. return type with _ -> null @@ -799,13 +805,13 @@ let queryableTypeGetMethod cenv emEnv parentT (mref:ILMethodRef) = else queryableTypeGetMethodBySearch cenv emEnv parentT mref -let nonQueryableTypeGetMethod (parentTI:Type) (methInfo : MethodInfo) : MethodInfo = +let nonQueryableTypeGetMethod (parentTI: Type) (methInfo: MethodInfo) : MethodInfo = if (parentTI.IsGenericType && not (equalTypes parentTI (getTypeConstructor parentTI))) then TypeBuilder.GetMethod(parentTI, methInfo ) else methInfo -let convMethodRef cenv emEnv (parentTI:Type) (mref:ILMethodRef) = +let convMethodRef cenv emEnv (parentTI: Type) (mref: ILMethodRef) = let parent = mref.DeclaringTypeRef let res = if isEmittedTypeRef emEnv parent then @@ -829,14 +835,14 @@ let convMethodRef cenv emEnv (parentTI:Type) (mref:ILMethodRef) = // convMethodSpec //---------------------------------------------------------------------------- -let convMethodSpec cenv emEnv (mspec:ILMethodSpec) = - let typT = convType cenv emEnv mspec.DeclaringType (* (instanced) parent Type *) - let methInfo = convMethodRef cenv emEnv typT mspec.MethodRef (* (generic) method of (generic) parent *) +let convMethodSpec cenv emEnv (mspec: ILMethodSpec) = + let typT = convType cenv emEnv mspec.DeclaringType (* (instanced) parent Type *) + let methInfo = convMethodRef cenv emEnv typT mspec.MethodRef (* (generic) method of (generic) parent *) let methInfo = if isNil mspec.GenericArgs then methInfo // non generic else - let minstTs = convTypesToArray cenv emEnv mspec.GenericArgs + let minstTs = convTypesToArray cenv emEnv mspec.GenericArgs let methInfo = methInfo.MakeGenericMethod minstTs // instantiate method methInfo methInfo @@ -845,9 +851,9 @@ let convMethodSpec cenv emEnv (mspec:ILMethodSpec) = // - QueryableTypeGetConstructors: get a constructor on a non-TypeBuilder type //---------------------------------------------------------------------------- -let queryableTypeGetConstructor cenv emEnv (parentT:Type) (mref:ILMethodRef) = - let tyargTs = getGenericArgumentsOfType parentT - let reqArgTs = +let queryableTypeGetConstructor cenv emEnv (parentT: Type) (mref: ILMethodRef) = + let tyargTs = getGenericArgumentsOfType parentT + let reqArgTs = let emEnv = envPushTyvars emEnv tyargTs convTypesToArray cenv emEnv mref.ArgTypes let res = parentT.GetConstructor(BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.Instance, null, reqArgTs, null) @@ -856,15 +862,15 @@ let queryableTypeGetConstructor cenv emEnv (parentT:Type) (mref:ILMethodRef) = | _ -> res -let nonQueryableTypeGetConstructor (parentTI:Type) (consInfo : ConstructorInfo) : ConstructorInfo = +let nonQueryableTypeGetConstructor (parentTI: Type) (consInfo: ConstructorInfo) : ConstructorInfo = if parentTI.IsGenericType then TypeBuilder.GetConstructor(parentTI, consInfo) else consInfo //---------------------------------------------------------------------------- // convConstructorSpec (like convMethodSpec) //---------------------------------------------------------------------------- -let convConstructorSpec cenv emEnv (mspec:ILMethodSpec) = - let mref = mspec.MethodRef +let convConstructorSpec cenv emEnv (mspec: ILMethodSpec) = + let mref = mspec.MethodRef let parentTI = convType cenv emEnv mspec.DeclaringType let res = if isEmittedTypeRef emEnv mref.DeclaringTypeRef then @@ -873,7 +879,7 @@ let convConstructorSpec cenv emEnv (mspec:ILMethodSpec) = else // Prior type. if typeIsNotQueryable parentTI then - let parentT = getTypeConstructor parentTI + let parentT = getTypeConstructor parentTI let ctorG = queryableTypeGetConstructor cenv emEnv parentT mref nonQueryableTypeGetConstructor parentTI ctorG else @@ -886,7 +892,7 @@ let convConstructorSpec cenv emEnv (mspec:ILMethodSpec) = // emitLabelMark //---------------------------------------------------------------------------- -let emitLabelMark emEnv (ilG:ILGenerator) (label:ILCodeLabel) = +let emitLabelMark emEnv (ilG: ILGenerator) (label: ILCodeLabel) = let lab = envGetLabel emEnv label ilG.MarkLabelAndLog(lab) @@ -895,55 +901,55 @@ let emitLabelMark emEnv (ilG:ILGenerator) (label:ILCodeLabel) = //---------------------------------------------------------------------------- ///Emit comparison instructions. -let emitInstrCompare emEnv (ilG:ILGenerator) comp targ = +let emitInstrCompare emEnv (ilG: ILGenerator) comp targ = match comp with - | BI_beq -> ilG.EmitAndLog(OpCodes.Beq, envGetLabel emEnv targ) - | BI_bge -> ilG.EmitAndLog(OpCodes.Bge , envGetLabel emEnv targ) - | BI_bge_un -> ilG.EmitAndLog(OpCodes.Bge_Un , envGetLabel emEnv targ) - | BI_bgt -> ilG.EmitAndLog(OpCodes.Bgt , envGetLabel emEnv targ) - | BI_bgt_un -> ilG.EmitAndLog(OpCodes.Bgt_Un , envGetLabel emEnv targ) - | BI_ble -> ilG.EmitAndLog(OpCodes.Ble , envGetLabel emEnv targ) - | BI_ble_un -> ilG.EmitAndLog(OpCodes.Ble_Un , envGetLabel emEnv targ) - | BI_blt -> ilG.EmitAndLog(OpCodes.Blt , envGetLabel emEnv targ) - | BI_blt_un -> ilG.EmitAndLog(OpCodes.Blt_Un , envGetLabel emEnv targ) - | BI_bne_un -> ilG.EmitAndLog(OpCodes.Bne_Un , envGetLabel emEnv targ) + | BI_beq -> ilG.EmitAndLog(OpCodes.Beq, envGetLabel emEnv targ) + | BI_bge -> ilG.EmitAndLog(OpCodes.Bge, envGetLabel emEnv targ) + | BI_bge_un -> ilG.EmitAndLog(OpCodes.Bge_Un, envGetLabel emEnv targ) + | BI_bgt -> ilG.EmitAndLog(OpCodes.Bgt, envGetLabel emEnv targ) + | BI_bgt_un -> ilG.EmitAndLog(OpCodes.Bgt_Un, envGetLabel emEnv targ) + | BI_ble -> ilG.EmitAndLog(OpCodes.Ble, envGetLabel emEnv targ) + | BI_ble_un -> ilG.EmitAndLog(OpCodes.Ble_Un, envGetLabel emEnv targ) + | BI_blt -> ilG.EmitAndLog(OpCodes.Blt, envGetLabel emEnv targ) + | BI_blt_un -> ilG.EmitAndLog(OpCodes.Blt_Un, envGetLabel emEnv targ) + | BI_bne_un -> ilG.EmitAndLog(OpCodes.Bne_Un, envGetLabel emEnv targ) | BI_brfalse -> ilG.EmitAndLog(OpCodes.Brfalse, envGetLabel emEnv targ) - | BI_brtrue -> ilG.EmitAndLog(OpCodes.Brtrue , envGetLabel emEnv targ) + | BI_brtrue -> ilG.EmitAndLog(OpCodes.Brtrue, envGetLabel emEnv targ) /// Emit the volatile. prefix -let emitInstrVolatile (ilG:ILGenerator) = function - | Volatile -> ilG.EmitAndLog(OpCodes.Volatile) +let emitInstrVolatile (ilG: ILGenerator) = function + | Volatile -> ilG.EmitAndLog(OpCodes.Volatile) | Nonvolatile -> () /// Emit the align. prefix -let emitInstrAlign (ilG:ILGenerator) = function - | Aligned -> () +let emitInstrAlign (ilG: ILGenerator) = function + | Aligned -> () | Unaligned1 -> ilG.Emit(OpCodes.Unaligned, 1L) // note: doc says use "long" overload! | Unaligned2 -> ilG.Emit(OpCodes.Unaligned, 2L) | Unaligned4 -> ilG.Emit(OpCodes.Unaligned, 3L) /// Emit the tail. prefix if necessary -let emitInstrTail (ilG:ILGenerator) tail emitTheCall = +let emitInstrTail (ilG: ILGenerator) tail emitTheCall = match tail with - | Tailcall -> ilG.EmitAndLog(OpCodes.Tailcall); emitTheCall(); ilG.EmitAndLog(OpCodes.Ret) + | Tailcall -> ilG.EmitAndLog(OpCodes.Tailcall); emitTheCall(); ilG.EmitAndLog(OpCodes.Ret) | Normalcall -> emitTheCall() -let emitInstrNewobj cenv emEnv (ilG:ILGenerator) mspec varargs = +let emitInstrNewobj cenv emEnv (ilG: ILGenerator) mspec varargs = match varargs with - | None -> ilG.EmitAndLog(OpCodes.Newobj, convConstructorSpec cenv emEnv mspec) + | None -> ilG.EmitAndLog(OpCodes.Newobj, convConstructorSpec cenv emEnv mspec) | Some _varargTys -> failwith "emit: pending new varargs" // XXX - gap -let emitSilverlightCheck (ilG:ILGenerator) = +let emitSilverlightCheck (ilG: ILGenerator) = ignore ilG () -let emitInstrCall cenv emEnv (ilG:ILGenerator) opCall tail (mspec:ILMethodSpec) varargs = +let emitInstrCall cenv emEnv (ilG: ILGenerator) opCall tail (mspec: ILMethodSpec) varargs = emitInstrTail ilG tail (fun () -> if mspec.MethodRef.Name = ".ctor" || mspec.MethodRef.Name = ".cctor" then let cinfo = convConstructorSpec cenv emEnv mspec match varargs with - | None -> ilG.EmitAndLog (opCall, cinfo) + | None -> ilG.EmitAndLog (opCall, cinfo) | Some _varargTys -> failwith "emitInstrCall: .ctor and varargs" else let minfo = convMethodSpec cenv emEnv mspec @@ -952,7 +958,7 @@ let emitInstrCall cenv emEnv (ilG:ILGenerator) opCall tail (mspec:ILMethodSpec) | Some varargTys -> ilG.EmitCall (opCall, minfo, convTypesToArray cenv emEnv varargTys) ) -let getGenericMethodDefinition q (ty:Type) = +let getGenericMethodDefinition q (ty: Type) = let gminfo = match q with | Quotations.Patterns.Call(_, minfo, _) -> minfo.GetGenericMethodDefinition() @@ -971,151 +977,151 @@ let setArrayMethInfo n ty = | 2 -> getGenericMethodDefinition <@@ LanguagePrimitives.IntrinsicFunctions.SetArray2D null 0 0 0 @@> ty | 3 -> getGenericMethodDefinition <@@ LanguagePrimitives.IntrinsicFunctions.SetArray3D null 0 0 0 0 @@> ty | 4 -> getGenericMethodDefinition <@@ LanguagePrimitives.IntrinsicFunctions.SetArray4D null 0 0 0 0 0 @@> ty - | _ -> invalidArg "n" "not expecting array dimension > 4" + | _ -> invalidArg "n" "not expecting array dimension > 4" //---------------------------------------------------------------------------- // emitInstr cenv //---------------------------------------------------------------------------- -let rec emitInstr cenv (modB : ModuleBuilder) emEnv (ilG:ILGenerator) instr = +let rec emitInstr cenv (modB: ModuleBuilder) emEnv (ilG: ILGenerator) instr = match instr with - | AI_add -> ilG.EmitAndLog(OpCodes.Add) - | AI_add_ovf -> ilG.EmitAndLog(OpCodes.Add_Ovf) - | AI_add_ovf_un -> ilG.EmitAndLog(OpCodes.Add_Ovf_Un) - | AI_and -> ilG.EmitAndLog(OpCodes.And) - | AI_div -> ilG.EmitAndLog(OpCodes.Div) - | AI_div_un -> ilG.EmitAndLog(OpCodes.Div_Un) - | AI_ceq -> ilG.EmitAndLog(OpCodes.Ceq) - | AI_cgt -> ilG.EmitAndLog(OpCodes.Cgt) - | AI_cgt_un -> ilG.EmitAndLog(OpCodes.Cgt_Un) - | AI_clt -> ilG.EmitAndLog(OpCodes.Clt) - | AI_clt_un -> ilG.EmitAndLog(OpCodes.Clt_Un) + | AI_add -> ilG.EmitAndLog(OpCodes.Add) + | AI_add_ovf -> ilG.EmitAndLog(OpCodes.Add_Ovf) + | AI_add_ovf_un -> ilG.EmitAndLog(OpCodes.Add_Ovf_Un) + | AI_and -> ilG.EmitAndLog(OpCodes.And) + | AI_div -> ilG.EmitAndLog(OpCodes.Div) + | AI_div_un -> ilG.EmitAndLog(OpCodes.Div_Un) + | AI_ceq -> ilG.EmitAndLog(OpCodes.Ceq) + | AI_cgt -> ilG.EmitAndLog(OpCodes.Cgt) + | AI_cgt_un -> ilG.EmitAndLog(OpCodes.Cgt_Un) + | AI_clt -> ilG.EmitAndLog(OpCodes.Clt) + | AI_clt_un -> ilG.EmitAndLog(OpCodes.Clt_Un) // conversion - | AI_conv dt -> + | AI_conv dt -> match dt with - | DT_I -> ilG.EmitAndLog(OpCodes.Conv_I) - | DT_I1 -> ilG.EmitAndLog(OpCodes.Conv_I1) - | DT_I2 -> ilG.EmitAndLog(OpCodes.Conv_I2) - | DT_I4 -> ilG.EmitAndLog(OpCodes.Conv_I4) - | DT_I8 -> ilG.EmitAndLog(OpCodes.Conv_I8) - | DT_U -> ilG.EmitAndLog(OpCodes.Conv_U) - | DT_U1 -> ilG.EmitAndLog(OpCodes.Conv_U1) - | DT_U2 -> ilG.EmitAndLog(OpCodes.Conv_U2) - | DT_U4 -> ilG.EmitAndLog(OpCodes.Conv_U4) - | DT_U8 -> ilG.EmitAndLog(OpCodes.Conv_U8) - | DT_R -> ilG.EmitAndLog(OpCodes.Conv_R_Un) - | DT_R4 -> ilG.EmitAndLog(OpCodes.Conv_R4) - | DT_R8 -> ilG.EmitAndLog(OpCodes.Conv_R8) + | DT_I -> ilG.EmitAndLog(OpCodes.Conv_I) + | DT_I1 -> ilG.EmitAndLog(OpCodes.Conv_I1) + | DT_I2 -> ilG.EmitAndLog(OpCodes.Conv_I2) + | DT_I4 -> ilG.EmitAndLog(OpCodes.Conv_I4) + | DT_I8 -> ilG.EmitAndLog(OpCodes.Conv_I8) + | DT_U -> ilG.EmitAndLog(OpCodes.Conv_U) + | DT_U1 -> ilG.EmitAndLog(OpCodes.Conv_U1) + | DT_U2 -> ilG.EmitAndLog(OpCodes.Conv_U2) + | DT_U4 -> ilG.EmitAndLog(OpCodes.Conv_U4) + | DT_U8 -> ilG.EmitAndLog(OpCodes.Conv_U8) + | DT_R -> ilG.EmitAndLog(OpCodes.Conv_R_Un) + | DT_R4 -> ilG.EmitAndLog(OpCodes.Conv_R4) + | DT_R8 -> ilG.EmitAndLog(OpCodes.Conv_R8) | DT_REF -> failwith "AI_conv DT_REF?" // XXX - check // conversion - ovf checks - | AI_conv_ovf dt -> + | AI_conv_ovf dt -> match dt with - | DT_I -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I) - | DT_I1 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I1) - | DT_I2 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I2) - | DT_I4 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I4) - | DT_I8 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I8) - | DT_U -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U) - | DT_U1 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U1) - | DT_U2 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U2) - | DT_U4 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U4) - | DT_U8 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U8) - | DT_R -> failwith "AI_conv_ovf DT_R?" // XXX - check - | DT_R4 -> failwith "AI_conv_ovf DT_R4?" // XXX - check - | DT_R8 -> failwith "AI_conv_ovf DT_R8?" // XXX - check + | DT_I -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I) + | DT_I1 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I1) + | DT_I2 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I2) + | DT_I4 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I4) + | DT_I8 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I8) + | DT_U -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U) + | DT_U1 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U1) + | DT_U2 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U2) + | DT_U4 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U4) + | DT_U8 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U8) + | DT_R -> failwith "AI_conv_ovf DT_R?" // XXX - check + | DT_R4 -> failwith "AI_conv_ovf DT_R4?" // XXX - check + | DT_R8 -> failwith "AI_conv_ovf DT_R8?" // XXX - check | DT_REF -> failwith "AI_conv_ovf DT_REF?" // XXX - check // conversion - ovf checks and unsigned - | AI_conv_ovf_un dt -> + | AI_conv_ovf_un dt -> match dt with - | DT_I -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I_Un) - | DT_I1 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I1_Un) - | DT_I2 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I2_Un) - | DT_I4 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I4_Un) - | DT_I8 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I8_Un) - | DT_U -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U_Un) - | DT_U1 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U1_Un) - | DT_U2 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U2_Un) - | DT_U4 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U4_Un) - | DT_U8 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U8_Un) - | DT_R -> failwith "AI_conv_ovf_un DT_R?" // XXX - check - | DT_R4 -> failwith "AI_conv_ovf_un DT_R4?" // XXX - check - | DT_R8 -> failwith "AI_conv_ovf_un DT_R8?" // XXX - check + | DT_I -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I_Un) + | DT_I1 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I1_Un) + | DT_I2 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I2_Un) + | DT_I4 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I4_Un) + | DT_I8 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_I8_Un) + | DT_U -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U_Un) + | DT_U1 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U1_Un) + | DT_U2 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U2_Un) + | DT_U4 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U4_Un) + | DT_U8 -> ilG.EmitAndLog(OpCodes.Conv_Ovf_U8_Un) + | DT_R -> failwith "AI_conv_ovf_un DT_R?" // XXX - check + | DT_R4 -> failwith "AI_conv_ovf_un DT_R4?" // XXX - check + | DT_R8 -> failwith "AI_conv_ovf_un DT_R8?" // XXX - check | DT_REF -> failwith "AI_conv_ovf_un DT_REF?" // XXX - check - | AI_mul -> ilG.EmitAndLog(OpCodes.Mul) - | AI_mul_ovf -> ilG.EmitAndLog(OpCodes.Mul_Ovf) - | AI_mul_ovf_un -> ilG.EmitAndLog(OpCodes.Mul_Ovf_Un) - | AI_rem -> ilG.EmitAndLog(OpCodes.Rem) - | AI_rem_un -> ilG.EmitAndLog(OpCodes.Rem_Un) - | AI_shl -> ilG.EmitAndLog(OpCodes.Shl) - | AI_shr -> ilG.EmitAndLog(OpCodes.Shr) - | AI_shr_un -> ilG.EmitAndLog(OpCodes.Shr_Un) - | AI_sub -> ilG.EmitAndLog(OpCodes.Sub) - | AI_sub_ovf -> ilG.EmitAndLog(OpCodes.Sub_Ovf) - | AI_sub_ovf_un -> ilG.EmitAndLog(OpCodes.Sub_Ovf_Un) - | AI_xor -> ilG.EmitAndLog(OpCodes.Xor) - | AI_or -> ilG.EmitAndLog(OpCodes.Or) - | AI_neg -> ilG.EmitAndLog(OpCodes.Neg) - | AI_not -> ilG.EmitAndLog(OpCodes.Not) - | AI_ldnull -> ilG.EmitAndLog(OpCodes.Ldnull) - | AI_dup -> ilG.EmitAndLog(OpCodes.Dup) - | AI_pop -> ilG.EmitAndLog(OpCodes.Pop) - | AI_ckfinite -> ilG.EmitAndLog(OpCodes.Ckfinite) - | AI_nop -> ilG.EmitAndLog(OpCodes.Nop) - | AI_ldc (DT_I4, ILConst.I4 i32) -> ilG.EmitAndLog(OpCodes.Ldc_I4, i32) - | AI_ldc (DT_I8, ILConst.I8 i64) -> ilG.Emit(OpCodes.Ldc_I8, i64) - | AI_ldc (DT_R4, ILConst.R4 r32) -> ilG.Emit(OpCodes.Ldc_R4, r32) - | AI_ldc (DT_R8, ILConst.R8 r64) -> ilG.Emit(OpCodes.Ldc_R8, r64) - | AI_ldc (_ , _ ) -> failwith "emitInstrI_arith (AI_ldc (ty, const)) iltyped" - | I_ldarg u16 -> ilG.EmitAndLog(OpCodes.Ldarg , int16 u16) - | I_ldarga u16 -> ilG.EmitAndLog(OpCodes.Ldarga, int16 u16) - | I_ldind (align, vol, dt) -> + | AI_mul -> ilG.EmitAndLog(OpCodes.Mul) + | AI_mul_ovf -> ilG.EmitAndLog(OpCodes.Mul_Ovf) + | AI_mul_ovf_un -> ilG.EmitAndLog(OpCodes.Mul_Ovf_Un) + | AI_rem -> ilG.EmitAndLog(OpCodes.Rem) + | AI_rem_un -> ilG.EmitAndLog(OpCodes.Rem_Un) + | AI_shl -> ilG.EmitAndLog(OpCodes.Shl) + | AI_shr -> ilG.EmitAndLog(OpCodes.Shr) + | AI_shr_un -> ilG.EmitAndLog(OpCodes.Shr_Un) + | AI_sub -> ilG.EmitAndLog(OpCodes.Sub) + | AI_sub_ovf -> ilG.EmitAndLog(OpCodes.Sub_Ovf) + | AI_sub_ovf_un -> ilG.EmitAndLog(OpCodes.Sub_Ovf_Un) + | AI_xor -> ilG.EmitAndLog(OpCodes.Xor) + | AI_or -> ilG.EmitAndLog(OpCodes.Or) + | AI_neg -> ilG.EmitAndLog(OpCodes.Neg) + | AI_not -> ilG.EmitAndLog(OpCodes.Not) + | AI_ldnull -> ilG.EmitAndLog(OpCodes.Ldnull) + | AI_dup -> ilG.EmitAndLog(OpCodes.Dup) + | AI_pop -> ilG.EmitAndLog(OpCodes.Pop) + | AI_ckfinite -> ilG.EmitAndLog(OpCodes.Ckfinite) + | AI_nop -> ilG.EmitAndLog(OpCodes.Nop) + | AI_ldc (DT_I4, ILConst.I4 i32) -> ilG.EmitAndLog(OpCodes.Ldc_I4, i32) + | AI_ldc (DT_I8, ILConst.I8 i64) -> ilG.Emit(OpCodes.Ldc_I8, i64) + | AI_ldc (DT_R4, ILConst.R4 r32) -> ilG.Emit(OpCodes.Ldc_R4, r32) + | AI_ldc (DT_R8, ILConst.R8 r64) -> ilG.Emit(OpCodes.Ldc_R8, r64) + | AI_ldc (_, _ ) -> failwith "emitInstrI_arith (AI_ldc (ty, const)) iltyped" + | I_ldarg u16 -> ilG.EmitAndLog(OpCodes.Ldarg, int16 u16) + | I_ldarga u16 -> ilG.EmitAndLog(OpCodes.Ldarga, int16 u16) + | I_ldind (align, vol, dt) -> emitInstrAlign ilG align emitInstrVolatile ilG vol match dt with - | DT_I -> ilG.EmitAndLog(OpCodes.Ldind_I) - | DT_I1 -> ilG.EmitAndLog(OpCodes.Ldind_I1) - | DT_I2 -> ilG.EmitAndLog(OpCodes.Ldind_I2) - | DT_I4 -> ilG.EmitAndLog(OpCodes.Ldind_I4) - | DT_I8 -> ilG.EmitAndLog(OpCodes.Ldind_I8) - | DT_R -> failwith "emitInstr cenv: ldind R" - | DT_R4 -> ilG.EmitAndLog(OpCodes.Ldind_R4) - | DT_R8 -> ilG.EmitAndLog(OpCodes.Ldind_R8) - | DT_U -> failwith "emitInstr cenv: ldind U" - | DT_U1 -> ilG.EmitAndLog(OpCodes.Ldind_U1) - | DT_U2 -> ilG.EmitAndLog(OpCodes.Ldind_U2) - | DT_U4 -> ilG.EmitAndLog(OpCodes.Ldind_U4) - | DT_U8 -> failwith "emitInstr cenv: ldind U8" + | DT_I -> ilG.EmitAndLog(OpCodes.Ldind_I) + | DT_I1 -> ilG.EmitAndLog(OpCodes.Ldind_I1) + | DT_I2 -> ilG.EmitAndLog(OpCodes.Ldind_I2) + | DT_I4 -> ilG.EmitAndLog(OpCodes.Ldind_I4) + | DT_I8 -> ilG.EmitAndLog(OpCodes.Ldind_I8) + | DT_R -> failwith "emitInstr cenv: ldind R" + | DT_R4 -> ilG.EmitAndLog(OpCodes.Ldind_R4) + | DT_R8 -> ilG.EmitAndLog(OpCodes.Ldind_R8) + | DT_U -> failwith "emitInstr cenv: ldind U" + | DT_U1 -> ilG.EmitAndLog(OpCodes.Ldind_U1) + | DT_U2 -> ilG.EmitAndLog(OpCodes.Ldind_U2) + | DT_U4 -> ilG.EmitAndLog(OpCodes.Ldind_U4) + | DT_U8 -> failwith "emitInstr cenv: ldind U8" | DT_REF -> ilG.EmitAndLog(OpCodes.Ldind_Ref) - | I_ldloc u16 -> ilG.EmitAndLog(OpCodes.Ldloc , int16 u16) + | I_ldloc u16 -> ilG.EmitAndLog(OpCodes.Ldloc, int16 u16) | I_ldloca u16 -> ilG.EmitAndLog(OpCodes.Ldloca, int16 u16) - | I_starg u16 -> ilG.EmitAndLog(OpCodes.Starg , int16 u16) - | I_stind (align, vol, dt) -> + | I_starg u16 -> ilG.EmitAndLog(OpCodes.Starg, int16 u16) + | I_stind (align, vol, dt) -> emitInstrAlign ilG align emitInstrVolatile ilG vol match dt with - | DT_I -> ilG.EmitAndLog(OpCodes.Stind_I) - | DT_I1 -> ilG.EmitAndLog(OpCodes.Stind_I1) - | DT_I2 -> ilG.EmitAndLog(OpCodes.Stind_I2) - | DT_I4 -> ilG.EmitAndLog(OpCodes.Stind_I4) - | DT_I8 -> ilG.EmitAndLog(OpCodes.Stind_I8) - | DT_R -> failwith "emitInstr cenv: stind R" - | DT_R4 -> ilG.EmitAndLog(OpCodes.Stind_R4) - | DT_R8 -> ilG.EmitAndLog(OpCodes.Stind_R8) - | DT_U -> ilG.EmitAndLog(OpCodes.Stind_I) // NOTE: unsigned -> int conversion - | DT_U1 -> ilG.EmitAndLog(OpCodes.Stind_I1) // NOTE: follows code ilwrite.fs - | DT_U2 -> ilG.EmitAndLog(OpCodes.Stind_I2) // NOTE: is it ok? - | DT_U4 -> ilG.EmitAndLog(OpCodes.Stind_I4) // NOTE: it is generated by bytearray tests - | DT_U8 -> ilG.EmitAndLog(OpCodes.Stind_I8) // NOTE: unsigned -> int conversion + | DT_I -> ilG.EmitAndLog(OpCodes.Stind_I) + | DT_I1 -> ilG.EmitAndLog(OpCodes.Stind_I1) + | DT_I2 -> ilG.EmitAndLog(OpCodes.Stind_I2) + | DT_I4 -> ilG.EmitAndLog(OpCodes.Stind_I4) + | DT_I8 -> ilG.EmitAndLog(OpCodes.Stind_I8) + | DT_R -> failwith "emitInstr cenv: stind R" + | DT_R4 -> ilG.EmitAndLog(OpCodes.Stind_R4) + | DT_R8 -> ilG.EmitAndLog(OpCodes.Stind_R8) + | DT_U -> ilG.EmitAndLog(OpCodes.Stind_I) // NOTE: unsigned -> int conversion + | DT_U1 -> ilG.EmitAndLog(OpCodes.Stind_I1) // NOTE: follows code ilwrite.fs + | DT_U2 -> ilG.EmitAndLog(OpCodes.Stind_I2) // NOTE: is it ok? + | DT_U4 -> ilG.EmitAndLog(OpCodes.Stind_I4) // NOTE: it is generated by bytearray tests + | DT_U8 -> ilG.EmitAndLog(OpCodes.Stind_I8) // NOTE: unsigned -> int conversion | DT_REF -> ilG.EmitAndLog(OpCodes.Stind_Ref) - | I_stloc u16 -> ilG.EmitAndLog(OpCodes.Stloc, int16 u16) - | I_br targ -> ilG.EmitAndLog(OpCodes.Br, envGetLabel emEnv targ) + | I_stloc u16 -> ilG.EmitAndLog(OpCodes.Stloc, int16 u16) + | I_br targ -> ilG.EmitAndLog(OpCodes.Br, envGetLabel emEnv targ) | I_jmp mspec -> ilG.EmitAndLog(OpCodes.Jmp, convMethodSpec cenv emEnv mspec) | I_brcmp (comp, targ) -> emitInstrCompare emEnv ilG comp targ - | I_switch labels -> ilG.Emit(OpCodes.Switch, Array.ofList (List.map (envGetLabel emEnv) labels)); + | I_switch labels -> ilG.Emit(OpCodes.Switch, Array.ofList (List.map (envGetLabel emEnv) labels)) | I_ret -> ilG.EmitAndLog(OpCodes.Ret) - | I_call (tail, mspec, varargs) -> + | I_call (tail, mspec, varargs) -> emitSilverlightCheck ilG emitInstrCall cenv emEnv ilG OpCodes.Call tail mspec varargs @@ -1124,10 +1130,10 @@ let rec emitInstr cenv (modB : ModuleBuilder) emEnv (ilG:ILGenerator) instr = emitInstrCall cenv emEnv ilG OpCodes.Callvirt tail mspec varargs | I_callconstraint (tail, ty, mspec, varargs) -> - ilG.Emit(OpCodes.Constrained, convType cenv emEnv ty); + ilG.Emit(OpCodes.Constrained, convType cenv emEnv ty) emitInstrCall cenv emEnv ilG OpCodes.Callvirt tail mspec varargs - | I_calli (tail, callsig, None) -> + | I_calli (tail, callsig, None) -> emitInstrTail ilG tail (fun () -> ilG.EmitCalli(OpCodes.Calli, convCallConv callsig.CallingConv, @@ -1149,49 +1155,49 @@ let rec emitInstr cenv (modB : ModuleBuilder) emEnv (ilG:ILGenerator) instr = | I_newobj (mspec, varargs) -> emitInstrNewobj cenv emEnv ilG mspec varargs - | I_throw -> ilG.EmitAndLog(OpCodes.Throw) - | I_endfinally -> ilG.EmitAndLog(OpCodes.Endfinally) - | I_endfilter -> ilG.EmitAndLog(OpCodes.Endfilter) - | I_leave label -> ilG.EmitAndLog(OpCodes.Leave, envGetLabel emEnv label) - | I_ldsfld (vol, fspec) -> emitInstrVolatile ilG vol; ilG.EmitAndLog(OpCodes.Ldsfld , convFieldSpec cenv emEnv fspec) - | I_ldfld (align, vol, fspec) -> emitInstrAlign ilG align; emitInstrVolatile ilG vol; ilG.EmitAndLog(OpCodes.Ldfld , convFieldSpec cenv emEnv fspec) - | I_ldsflda fspec -> ilG.EmitAndLog(OpCodes.Ldsflda, convFieldSpec cenv emEnv fspec) - | I_ldflda fspec -> ilG.EmitAndLog(OpCodes.Ldflda , convFieldSpec cenv emEnv fspec) + | I_throw -> ilG.EmitAndLog(OpCodes.Throw) + | I_endfinally -> ilG.EmitAndLog(OpCodes.Endfinally) + | I_endfilter -> ilG.EmitAndLog(OpCodes.Endfilter) + | I_leave label -> ilG.EmitAndLog(OpCodes.Leave, envGetLabel emEnv label) + | I_ldsfld (vol, fspec) -> emitInstrVolatile ilG vol; ilG.EmitAndLog(OpCodes.Ldsfld, convFieldSpec cenv emEnv fspec) + | I_ldfld (align, vol, fspec) -> emitInstrAlign ilG align; emitInstrVolatile ilG vol; ilG.EmitAndLog(OpCodes.Ldfld, convFieldSpec cenv emEnv fspec) + | I_ldsflda fspec -> ilG.EmitAndLog(OpCodes.Ldsflda, convFieldSpec cenv emEnv fspec) + | I_ldflda fspec -> ilG.EmitAndLog(OpCodes.Ldflda, convFieldSpec cenv emEnv fspec) - | I_stsfld (vol, fspec) -> + | I_stsfld (vol, fspec) -> emitInstrVolatile ilG vol ilG.EmitAndLog(OpCodes.Stsfld, convFieldSpec cenv emEnv fspec) - | I_stfld (align, vol, fspec) -> + | I_stfld (align, vol, fspec) -> emitInstrAlign ilG align - emitInstrVolatile ilG vol; + emitInstrVolatile ilG vol ilG.EmitAndLog(OpCodes.Stfld, convFieldSpec cenv emEnv fspec) - | I_ldstr s -> ilG.EmitAndLog(OpCodes.Ldstr, s) - | I_isinst ty -> ilG.EmitAndLog(OpCodes.Isinst, convType cenv emEnv ty) - | I_castclass ty -> ilG.EmitAndLog(OpCodes.Castclass, convType cenv emEnv ty) - | I_ldtoken (ILToken.ILType ty) -> ilG.EmitAndLog(OpCodes.Ldtoken, convTypeOrTypeDef cenv emEnv ty) + | I_ldstr s -> ilG.EmitAndLog(OpCodes.Ldstr, s) + | I_isinst ty -> ilG.EmitAndLog(OpCodes.Isinst, convType cenv emEnv ty) + | I_castclass ty -> ilG.EmitAndLog(OpCodes.Castclass, convType cenv emEnv ty) + | I_ldtoken (ILToken.ILType ty) -> ilG.EmitAndLog(OpCodes.Ldtoken, convTypeOrTypeDef cenv emEnv ty) | I_ldtoken (ILToken.ILMethod mspec) -> ilG.EmitAndLog(OpCodes.Ldtoken, convMethodSpec cenv emEnv mspec) - | I_ldtoken (ILToken.ILField fspec) -> ilG.EmitAndLog(OpCodes.Ldtoken, convFieldSpec cenv emEnv fspec) - | I_ldvirtftn mspec -> ilG.EmitAndLog(OpCodes.Ldvirtftn, convMethodSpec cenv emEnv mspec) + | I_ldtoken (ILToken.ILField fspec) -> ilG.EmitAndLog(OpCodes.Ldtoken, convFieldSpec cenv emEnv fspec) + | I_ldvirtftn mspec -> ilG.EmitAndLog(OpCodes.Ldvirtftn, convMethodSpec cenv emEnv mspec) // Value type instructions - | I_cpobj ty -> ilG.EmitAndLog(OpCodes.Cpobj , convType cenv emEnv ty) - | I_initobj ty -> ilG.EmitAndLog(OpCodes.Initobj , convType cenv emEnv ty) + | I_cpobj ty -> ilG.EmitAndLog(OpCodes.Cpobj, convType cenv emEnv ty) + | I_initobj ty -> ilG.EmitAndLog(OpCodes.Initobj, convType cenv emEnv ty) | I_ldobj (align, vol, ty) -> emitInstrAlign ilG align emitInstrVolatile ilG vol - ilG.EmitAndLog(OpCodes.Ldobj , convType cenv emEnv ty) + ilG.EmitAndLog(OpCodes.Ldobj, convType cenv emEnv ty) | I_stobj (align, vol, ty) -> emitInstrAlign ilG align emitInstrVolatile ilG vol - ilG.EmitAndLog(OpCodes.Stobj , convType cenv emEnv ty) + ilG.EmitAndLog(OpCodes.Stobj, convType cenv emEnv ty) - | I_box ty -> ilG.EmitAndLog(OpCodes.Box , convType cenv emEnv ty) - | I_unbox ty -> ilG.EmitAndLog(OpCodes.Unbox , convType cenv emEnv ty) - | I_unbox_any ty -> ilG.EmitAndLog(OpCodes.Unbox_Any, convType cenv emEnv ty) - | I_sizeof ty -> ilG.EmitAndLog(OpCodes.Sizeof , convType cenv emEnv ty) + | I_box ty -> ilG.EmitAndLog(OpCodes.Box, convType cenv emEnv ty) + | I_unbox ty -> ilG.EmitAndLog(OpCodes.Unbox, convType cenv emEnv ty) + | I_unbox_any ty -> ilG.EmitAndLog(OpCodes.Unbox_Any, convType cenv emEnv ty) + | I_sizeof ty -> ilG.EmitAndLog(OpCodes.Sizeof, convType cenv emEnv ty) // Generalized array instructions. // In AbsIL these instructions include @@ -1205,55 +1211,55 @@ let rec emitInstr cenv (modB : ModuleBuilder) emEnv (ilG:ILGenerator) instr = // generalized instruction with the corresponding ILArrayShape // argument. This is done to simplify the IL and make it more uniform. // The IL writer then reverses this when emitting the binary. - | I_ldelem dt -> + | I_ldelem dt -> match dt with - | DT_I -> ilG.EmitAndLog(OpCodes.Ldelem_I) - | DT_I1 -> ilG.EmitAndLog(OpCodes.Ldelem_I1) - | DT_I2 -> ilG.EmitAndLog(OpCodes.Ldelem_I2) - | DT_I4 -> ilG.EmitAndLog(OpCodes.Ldelem_I4) - | DT_I8 -> ilG.EmitAndLog(OpCodes.Ldelem_I8) - | DT_R -> failwith "emitInstr cenv: ldelem R" - | DT_R4 -> ilG.EmitAndLog(OpCodes.Ldelem_R4) - | DT_R8 -> ilG.EmitAndLog(OpCodes.Ldelem_R8) - | DT_U -> failwith "emitInstr cenv: ldelem U" - | DT_U1 -> ilG.EmitAndLog(OpCodes.Ldelem_U1) - | DT_U2 -> ilG.EmitAndLog(OpCodes.Ldelem_U2) - | DT_U4 -> ilG.EmitAndLog(OpCodes.Ldelem_U4) - | DT_U8 -> failwith "emitInstr cenv: ldelem U8" + | DT_I -> ilG.EmitAndLog(OpCodes.Ldelem_I) + | DT_I1 -> ilG.EmitAndLog(OpCodes.Ldelem_I1) + | DT_I2 -> ilG.EmitAndLog(OpCodes.Ldelem_I2) + | DT_I4 -> ilG.EmitAndLog(OpCodes.Ldelem_I4) + | DT_I8 -> ilG.EmitAndLog(OpCodes.Ldelem_I8) + | DT_R -> failwith "emitInstr cenv: ldelem R" + | DT_R4 -> ilG.EmitAndLog(OpCodes.Ldelem_R4) + | DT_R8 -> ilG.EmitAndLog(OpCodes.Ldelem_R8) + | DT_U -> failwith "emitInstr cenv: ldelem U" + | DT_U1 -> ilG.EmitAndLog(OpCodes.Ldelem_U1) + | DT_U2 -> ilG.EmitAndLog(OpCodes.Ldelem_U2) + | DT_U4 -> ilG.EmitAndLog(OpCodes.Ldelem_U4) + | DT_U8 -> failwith "emitInstr cenv: ldelem U8" | DT_REF -> ilG.EmitAndLog(OpCodes.Ldelem_Ref) | I_stelem dt -> match dt with - | DT_I -> ilG.EmitAndLog(OpCodes.Stelem_I) - | DT_I1 -> ilG.EmitAndLog(OpCodes.Stelem_I1) - | DT_I2 -> ilG.EmitAndLog(OpCodes.Stelem_I2) - | DT_I4 -> ilG.EmitAndLog(OpCodes.Stelem_I4) - | DT_I8 -> ilG.EmitAndLog(OpCodes.Stelem_I8) - | DT_R -> failwith "emitInstr cenv: stelem R" - | DT_R4 -> ilG.EmitAndLog(OpCodes.Stelem_R4) - | DT_R8 -> ilG.EmitAndLog(OpCodes.Stelem_R8) - | DT_U -> failwith "emitInstr cenv: stelem U" - | DT_U1 -> failwith "emitInstr cenv: stelem U1" - | DT_U2 -> failwith "emitInstr cenv: stelem U2" - | DT_U4 -> failwith "emitInstr cenv: stelem U4" - | DT_U8 -> failwith "emitInstr cenv: stelem U8" + | DT_I -> ilG.EmitAndLog(OpCodes.Stelem_I) + | DT_I1 -> ilG.EmitAndLog(OpCodes.Stelem_I1) + | DT_I2 -> ilG.EmitAndLog(OpCodes.Stelem_I2) + | DT_I4 -> ilG.EmitAndLog(OpCodes.Stelem_I4) + | DT_I8 -> ilG.EmitAndLog(OpCodes.Stelem_I8) + | DT_R -> failwith "emitInstr cenv: stelem R" + | DT_R4 -> ilG.EmitAndLog(OpCodes.Stelem_R4) + | DT_R8 -> ilG.EmitAndLog(OpCodes.Stelem_R8) + | DT_U -> failwith "emitInstr cenv: stelem U" + | DT_U1 -> failwith "emitInstr cenv: stelem U1" + | DT_U2 -> failwith "emitInstr cenv: stelem U2" + | DT_U4 -> failwith "emitInstr cenv: stelem U4" + | DT_U8 -> failwith "emitInstr cenv: stelem U8" | DT_REF -> ilG.EmitAndLog(OpCodes.Stelem_Ref) - | I_ldelema (ro, _isNativePtr, shape, ty) -> - if (ro = ReadonlyAddress) then ilG.EmitAndLog(OpCodes.Readonly); + | I_ldelema (ro, _isNativePtr, shape, ty) -> + if (ro = ReadonlyAddress) then ilG.EmitAndLog(OpCodes.Readonly) if (shape = ILArrayShape.SingleDimensional) - then ilG.EmitAndLog(OpCodes.Ldelema, convType cenv emEnv ty) + then ilG.EmitAndLog(OpCodes.Ldelema, convType cenv emEnv ty) else - let aty = convType cenv emEnv (ILType.Array(shape, ty)) + let aty = convType cenv emEnv (ILType.Array(shape, ty)) let ety = aty.GetElementType() let rty = ety.MakeByRefType() let meth = modB.GetArrayMethodAndLog(aty, "Address", System.Reflection.CallingConventions.HasThis, rty, Array.create shape.Rank (typeof) ) ilG.EmitAndLog(OpCodes.Call, meth) - | I_ldelem_any (shape, ty) -> - if (shape = ILArrayShape.SingleDimensional) then ilG.EmitAndLog(OpCodes.Ldelem, convType cenv emEnv ty) + | I_ldelem_any (shape, ty) -> + if (shape = ILArrayShape.SingleDimensional) then ilG.EmitAndLog(OpCodes.Ldelem, convType cenv emEnv ty) else - let aty = convType cenv emEnv (ILType.Array(shape, ty)) + let aty = convType cenv emEnv (ILType.Array(shape, ty)) let ety = aty.GetElementType() let meth = #if ENABLE_MONO_SUPPORT @@ -1265,10 +1271,10 @@ let rec emitInstr cenv (modB : ModuleBuilder) emEnv (ilG:ILGenerator) instr = modB.GetArrayMethodAndLog(aty, "Get", System.Reflection.CallingConventions.HasThis, ety, Array.create shape.Rank (typeof) ) ilG.EmitAndLog(OpCodes.Call, meth) - | I_stelem_any (shape, ty) -> - if (shape = ILArrayShape.SingleDimensional) then ilG.EmitAndLog(OpCodes.Stelem, convType cenv emEnv ty) + | I_stelem_any (shape, ty) -> + if (shape = ILArrayShape.SingleDimensional) then ilG.EmitAndLog(OpCodes.Stelem, convType cenv emEnv ty) else - let aty = convType cenv emEnv (ILType.Array(shape, ty)) + let aty = convType cenv emEnv (ILType.Array(shape, ty)) let ety = aty.GetElementType() let meth = #if ENABLE_MONO_SUPPORT @@ -1277,57 +1283,57 @@ let rec emitInstr cenv (modB : ModuleBuilder) emEnv (ilG:ILGenerator) instr = setArrayMethInfo shape.Rank ety else #endif - modB.GetArrayMethodAndLog(aty, "Set", System.Reflection.CallingConventions.HasThis, (null:Type), Array.append (Array.create shape.Rank (typeof)) (Array.ofList [ ety ])) + modB.GetArrayMethodAndLog(aty, "Set", System.Reflection.CallingConventions.HasThis, (null: Type), Array.append (Array.create shape.Rank (typeof)) (Array.ofList [ ety ])) ilG.EmitAndLog(OpCodes.Call, meth) - | I_newarr (shape, ty) -> + | I_newarr (shape, ty) -> if (shape = ILArrayShape.SingleDimensional) - then ilG.EmitAndLog(OpCodes.Newarr, convType cenv emEnv ty) + then ilG.EmitAndLog(OpCodes.Newarr, convType cenv emEnv ty) else - let aty = convType cenv emEnv (ILType.Array(shape, ty)) - let meth = modB.GetArrayMethodAndLog(aty, ".ctor", System.Reflection.CallingConventions.HasThis, (null:Type), Array.create shape.Rank (typeof)) + let aty = convType cenv emEnv (ILType.Array(shape, ty)) + let meth = modB.GetArrayMethodAndLog(aty, ".ctor", System.Reflection.CallingConventions.HasThis, (null: Type), Array.create shape.Rank (typeof)) ilG.EmitAndLog(OpCodes.Newobj, meth) - | I_ldlen -> ilG.EmitAndLog(OpCodes.Ldlen) - | I_mkrefany ty -> ilG.EmitAndLog(OpCodes.Mkrefany, convType cenv emEnv ty) - | I_refanytype -> ilG.EmitAndLog(OpCodes.Refanytype) - | I_refanyval ty -> ilG.EmitAndLog(OpCodes.Refanyval, convType cenv emEnv ty) - | I_rethrow -> ilG.EmitAndLog(OpCodes.Rethrow) - | I_break -> ilG.EmitAndLog(OpCodes.Break) - | I_seqpoint src -> + | I_ldlen -> ilG.EmitAndLog(OpCodes.Ldlen) + | I_mkrefany ty -> ilG.EmitAndLog(OpCodes.Mkrefany, convType cenv emEnv ty) + | I_refanytype -> ilG.EmitAndLog(OpCodes.Refanytype) + | I_refanyval ty -> ilG.EmitAndLog(OpCodes.Refanyval, convType cenv emEnv ty) + | I_rethrow -> ilG.EmitAndLog(OpCodes.Rethrow) + | I_break -> ilG.EmitAndLog(OpCodes.Break) + | I_seqpoint src -> #if FX_RESHAPED_REFEMIT ignore src () #else if cenv.generatePdb && not (src.Document.File.EndsWithOrdinal("stdin")) then - let guid x = match x with None -> Guid.Empty | Some g -> Guid(g:byte[]) in + let guid x = match x with None -> Guid.Empty | Some g -> Guid(g: byte[]) in let symDoc = modB.DefineDocumentAndLog(src.Document.File, guid src.Document.Language, guid src.Document.Vendor, guid src.Document.DocumentType) ilG.MarkSequencePointAndLog(symDoc, src.Line, src.Column, src.EndLine, src.EndColumn) #endif - | I_arglist -> ilG.EmitAndLog(OpCodes.Arglist) - | I_localloc -> ilG.EmitAndLog(OpCodes.Localloc) + | I_arglist -> ilG.EmitAndLog(OpCodes.Arglist) + | I_localloc -> ilG.EmitAndLog(OpCodes.Localloc) | I_cpblk (align, vol) -> emitInstrAlign ilG align emitInstrVolatile ilG vol ilG.EmitAndLog(OpCodes.Cpblk) - | I_initblk (align, vol) -> - emitInstrAlign ilG align; + | I_initblk (align, vol) -> + emitInstrAlign ilG align emitInstrVolatile ilG vol ilG.EmitAndLog(OpCodes.Initblk) | EI_ldlen_multi (_, m) -> - emitInstr cenv modB emEnv ilG (mkLdcInt32 m); + emitInstr cenv modB emEnv ilG (mkLdcInt32 m) emitInstr cenv modB emEnv ilG (mkNormalCall(mkILNonGenericMethSpecInTy(cenv.ilg.typ_Array, ILCallingConv.Instance, "GetLength", [cenv.ilg.typ_Int32], cenv.ilg.typ_Int32))) | i -> failwithf "the IL instruction %s cannot be emitted" (i.ToString()) -let emitCode cenv modB emEnv (ilG:ILGenerator) (code: ILCode) = +let emitCode cenv modB emEnv (ilG: ILGenerator) (code: ILCode) = // Pre-define the labels pending determining their actual marks let pc2lab = Dictionary() - let emEnv = + let emEnv = (emEnv, code.Labels) ||> Seq.fold (fun emEnv (KeyValue(label, pc)) -> let lab = ilG.DefineLabelAndLog() pc2lab.[pc] <- @@ -1366,7 +1372,7 @@ let emitCode cenv modB emEnv (ilG:ILGenerator) (code: ILCode) = add endHandler ilG.EndExceptionBlockAndLog | ILExceptionClause.TypeCatch(ty, (startHandler, endHandler)) -> - add startHandler (fun () -> ilG.BeginCatchBlockAndLog (convType cenv emEnv ty)) + add startHandler (fun () -> ilG.BeginCatchBlockAndLog (convType cenv emEnv ty)) add endHandler ilG.EndExceptionBlockAndLog // Emit the instructions @@ -1391,8 +1397,8 @@ let emitCode cenv modB emEnv (ilG:ILGenerator) (code: ILCode) = | i -> emitInstr cenv modB emEnv ilG i -let emitLocal cenv emEnv (ilG : ILGenerator) (local: ILLocal) = - let ty = convType cenv emEnv local.Type +let emitLocal cenv emEnv (ilG: ILGenerator) (local: ILLocal) = + let ty = convType cenv emEnv local.Type let locBuilder = ilG.DeclareLocalAndLog(ty, local.IsPinned) #if !FX_NO_PDB_WRITER match local.DebugInfo with @@ -1401,7 +1407,7 @@ let emitLocal cenv emEnv (ilG : ILGenerator) (local: ILLocal) = #endif locBuilder -let emitILMethodBody cenv modB emEnv (ilG:ILGenerator) (ilmbody: ILMethodBody) = +let emitILMethodBody cenv modB emEnv (ilG: ILGenerator) (ilmbody: ILMethodBody) = let localBs = Array.map (emitLocal cenv emEnv ilG) (List.toArray ilmbody.Locals) let emEnv = envSetLocals emEnv localBs emitCode cenv modB emEnv ilG ilmbody.Code @@ -1409,11 +1415,11 @@ let emitILMethodBody cenv modB emEnv (ilG:ILGenerator) (ilmbody: ILMethodBody) = let emitMethodBody cenv modB emEnv ilG _name (mbody: ILLazyMethodBody) = match mbody.Contents with - | MethodBody.IL ilmbody -> emitILMethodBody cenv modB emEnv (ilG()) ilmbody - | MethodBody.PInvoke _pinvoke -> () - | MethodBody.Abstract -> () - | MethodBody.Native -> failwith "emitMethodBody: native" - | MethodBody.NotAvailable -> failwith "emitMethodBody: metadata only" + | MethodBody.IL ilmbody -> emitILMethodBody cenv modB emEnv (ilG()) ilmbody + | MethodBody.PInvoke _pinvoke -> () + | MethodBody.Abstract -> () + | MethodBody.Native -> failwith "emitMethodBody: native" + | MethodBody.NotAvailable -> failwith "emitMethodBody: metadata only" let convCustomAttr cenv emEnv (cattr: ILAttribute) = let methInfo = @@ -1423,38 +1429,38 @@ let convCustomAttr cenv emEnv (cattr: ILAttribute) = let data = getCustomAttrData cenv.ilg cattr (methInfo, data) -let emitCustomAttr cenv emEnv add cattr = add (convCustomAttr cenv emEnv cattr) -let emitCustomAttrs cenv emEnv add (cattrs : ILAttributes) = Array.iter (emitCustomAttr cenv emEnv add) cattrs.AsArray +let emitCustomAttr cenv emEnv add cattr = add (convCustomAttr cenv emEnv cattr) +let emitCustomAttrs cenv emEnv add (cattrs: ILAttributes) = Array.iter (emitCustomAttr cenv emEnv add) cattrs.AsArray //---------------------------------------------------------------------------- // buildGenParams //---------------------------------------------------------------------------- -let buildGenParamsPass1 _emEnv defineGenericParameters (gps : ILGenericParameterDefs) = +let buildGenParamsPass1 _emEnv defineGenericParameters (gps: ILGenericParameterDefs) = match gps with | [] -> () | gps -> let gpsNames = gps |> List.map (fun gp -> gp.Name) - defineGenericParameters (Array.ofList gpsNames) |> ignore + defineGenericParameters (Array.ofList gpsNames) |> ignore -let buildGenParamsPass1b cenv emEnv (genArgs : Type array) (gps : ILGenericParameterDefs) = +let buildGenParamsPass1b cenv emEnv (genArgs: Type array) (gps: ILGenericParameterDefs) = #if FX_RESHAPED_REFLECTION - let genpBs = genArgs |> Array.map (fun x -> (x.GetTypeInfo() :?> GenericTypeParameterBuilder)) + let genpBs = genArgs |> Array.map (fun x -> (x.GetTypeInfo() :?> GenericTypeParameterBuilder)) #else - let genpBs = genArgs |> Array.map (fun x -> (x :?> GenericTypeParameterBuilder)) + let genpBs = genArgs |> Array.map (fun x -> (x :?> GenericTypeParameterBuilder)) #endif - gps |> List.iteri (fun i (gp:ILGenericParameterDef) -> + gps |> List.iteri (fun i (gp: ILGenericParameterDef) -> let gpB = genpBs.[i] // the Constraints are either the parent (base) type or interfaces. let constraintTs = convTypes cenv emEnv gp.Constraints - let interfaceTs, baseTs = List.partition (fun (ty:System.Type) -> ty.IsInterface) constraintTs + let interfaceTs, baseTs = List.partition (fun (ty: System.Type) -> ty.IsInterface) constraintTs // set base type constraint (match baseTs with - [ ] -> () // Q: should a baseType be set? It is in some samples. Should this be a failure case? + [ ] -> () // Q: should a baseType be set? It is in some samples. Should this be a failure case? | [ baseT ] -> gpB.SetBaseTypeConstraint(baseT) - | _ -> failwith "buildGenParam: multiple base types" - ); + | _ -> failwith "buildGenParam: multiple base types" + ) // set interface constraints (interfaces that instances of gp must meet) gpB.SetInterfaceConstraints(Array.ofList interfaceTs) gp.CustomAttrs |> emitCustomAttrs cenv emEnv (wrapCustomAttr gpB.SetCustomAttribute) @@ -1462,13 +1468,13 @@ let buildGenParamsPass1b cenv emEnv (genArgs : Type array) (gps : ILGenericParam let flags = GenericParameterAttributes.None let flags = match gp.Variance with - | NonVariant -> flags - | CoVariant -> flags ||| GenericParameterAttributes.Covariant + | NonVariant -> flags + | CoVariant -> flags ||| GenericParameterAttributes.Covariant | ContraVariant -> flags ||| GenericParameterAttributes.Contravariant - let flags = if gp.HasReferenceTypeConstraint then flags ||| GenericParameterAttributes.ReferenceTypeConstraint else flags + let flags = if gp.HasReferenceTypeConstraint then flags ||| GenericParameterAttributes.ReferenceTypeConstraint else flags let flags = if gp.HasNotNullableValueTypeConstraint then flags ||| GenericParameterAttributes.NotNullableValueTypeConstraint else flags - let flags = if gp.HasDefaultConstructorConstraint then flags ||| GenericParameterAttributes.DefaultConstructorConstraint else flags + let flags = if gp.HasDefaultConstructorConstraint then flags ||| GenericParameterAttributes.DefaultConstructorConstraint else flags gpB.SetGenericParameterAttributes(flags) ) @@ -1476,17 +1482,17 @@ let buildGenParamsPass1b cenv emEnv (genArgs : Type array) (gps : ILGenericParam // emitParameter //---------------------------------------------------------------------------- -let emitParameter cenv emEnv (defineParameter : int * ParameterAttributes * string -> ParameterBuilder) i (param: ILParameter) = - // -Type: ty; - // -Default: ILFieldInit option; +let emitParameter cenv emEnv (defineParameter: int * ParameterAttributes * string -> ParameterBuilder) i (param: ILParameter) = + // -Type: ty + // -Default: ILFieldInit option // -Marshal: NativeType option; (* Marshalling map for parameters. COM Interop only. *) - let attrs = flagsIf param.IsIn ParameterAttributes.In ||| - flagsIf param.IsOut ParameterAttributes.Out ||| + let attrs = flagsIf param.IsIn ParameterAttributes.In ||| + flagsIf param.IsOut ParameterAttributes.Out ||| flagsIf param.IsOptional ParameterAttributes.Optional let name = match param.Name with | Some name -> name - | None -> "X" + string(i+1) + | None -> "X" + string(i+1) let parB = defineParameter(i, attrs, name) emitCustomAttrs cenv emEnv (wrapCustomAttr parB.SetCustomAttribute) param.CustomAttrs @@ -1495,7 +1501,7 @@ let emitParameter cenv emEnv (defineParameter : int * ParameterAttributes * stri // buildMethodPass2 //---------------------------------------------------------------------------- -let rec buildMethodPass2 cenv tref (typB:TypeBuilder) emEnv (mdef : ILMethodDef) = +let rec buildMethodPass2 cenv tref (typB: TypeBuilder) emEnv (mdef: ILMethodDef) = let attrs = mdef.Attributes let implflags = mdef.ImplAttributes let cconv = convCallConv mdef.CallingConv @@ -1507,9 +1513,9 @@ let rec buildMethodPass2 cenv tref (typB:TypeBuilder) emEnv (mdef : ILMethodDef) emEnv match mdef.Body.Contents with #if !FX_RESHAPED_REFEMIT - | MethodBody.PInvoke p -> + | MethodBody.PInvoke p -> let argtys = convTypesToArray cenv emEnv mdef.ParameterTypes - let rty = convType cenv emEnv mdef.Return.Type + let rty = convType cenv emEnv mdef.Return.Type let pcc = match p.CallingConv with @@ -1530,7 +1536,7 @@ let rec buildMethodPass2 cenv tref (typB:TypeBuilder) emEnv (mdef : ILMethodDef) (* p.NoMangle *) let methB = typB.DefinePInvokeMethod(mdef.Name, p.Where.Name, p.Name, attrs, cconv, rty, null, null, argtys, null, null, pcc, pcs) - methB.SetImplementationFlagsAndLog(implflags); + methB.SetImplementationFlagsAndLog(implflags) envBindMethodRef emEnv mref methB #endif @@ -1539,17 +1545,17 @@ let rec buildMethodPass2 cenv tref (typB:TypeBuilder) emEnv (mdef : ILMethodDef) | ".cctor" | ".ctor" -> let consB = typB.DefineConstructorAndLog(attrs, cconv, convTypesToArray cenv emEnv mdef.ParameterTypes) - consB.SetImplementationFlagsAndLog(implflags); + consB.SetImplementationFlagsAndLog(implflags) envBindConsRef emEnv mref consB - | _name -> + | _name -> // The return/argument types may involve the generic parameters let methB = typB.DefineMethodAndLog(mdef.Name, attrs, cconv) // Method generic type parameters - buildGenParamsPass1 emEnv methB.DefineGenericParametersAndLog mdef.GenericParams; + buildGenParamsPass1 emEnv methB.DefineGenericParametersAndLog mdef.GenericParams let genArgs = getGenericArgumentsOfMethod methB let emEnv = envPushTyvars emEnv (Array.append (getGenericArgumentsOfType (typB.AsType())) genArgs) - buildGenParamsPass1b cenv emEnv genArgs mdef.GenericParams; + buildGenParamsPass1b cenv emEnv genArgs mdef.GenericParams // Set parameter and return types (may depend on generic args) let parameterTypes = convTypesToArray cenv emEnv mdef.ParameterTypes @@ -1560,9 +1566,9 @@ let rec buildMethodPass2 cenv tref (typB:TypeBuilder) emEnv (mdef : ILMethodDef) |> Array.unzip let returnTypeRequiredCustomModifiers, returnTypeOptionalCustomModifiers = mdef.Return |> convReturnModifiers cenv emEnv - let returnType = convType cenv emEnv mdef.Return.Type + let returnType = convType cenv emEnv mdef.Return.Type - methB.SetSignatureAndLog(returnType, returnTypeRequiredCustomModifiers, returnTypeOptionalCustomModifiers, parameterTypes, parameterTypeRequiredCustomModifiers,parameterTypeOptionalCustomModifiers); + methB.SetSignatureAndLog(returnType, returnTypeRequiredCustomModifiers, returnTypeOptionalCustomModifiers, parameterTypes, parameterTypeRequiredCustomModifiers,parameterTypeOptionalCustomModifiers) let emEnv = envPopTyvars emEnv methB.SetImplementationFlagsAndLog(implflags) @@ -1573,11 +1579,11 @@ let rec buildMethodPass2 cenv tref (typB:TypeBuilder) emEnv (mdef : ILMethodDef) // buildMethodPass3 cenv //---------------------------------------------------------------------------- -let rec buildMethodPass3 cenv tref modB (typB:TypeBuilder) emEnv (mdef : ILMethodDef) = - let mref = mkRefToILMethod (tref, mdef) +let rec buildMethodPass3 cenv tref modB (typB: TypeBuilder) emEnv (mdef: ILMethodDef) = + let mref = mkRefToILMethod (tref, mdef) let isPInvoke = match mdef.Body.Contents with - | MethodBody.PInvoke _p -> true + | MethodBody.PInvoke _p -> true | _ -> false match mdef.Name with | ".cctor" | ".ctor" -> @@ -1586,10 +1592,10 @@ let rec buildMethodPass3 cenv tref modB (typB:TypeBuilder) emEnv (mdef : ILMetho assert isNil mdef.GenericParams // Value parameters let defineParameter (i, attr, name) = consB.DefineParameterAndLog(i+1, attr, name) - mdef.Parameters |> List.iteri (emitParameter cenv emEnv defineParameter); + mdef.Parameters |> List.iteri (emitParameter cenv emEnv defineParameter) // Body - emitMethodBody cenv modB emEnv consB.GetILGenerator mdef.Name mdef.Body; - emitCustomAttrs cenv emEnv (wrapCustomAttr consB.SetCustomAttribute) mdef.CustomAttrs; + emitMethodBody cenv modB emEnv consB.GetILGenerator mdef.Name mdef.Body + emitCustomAttrs cenv emEnv (wrapCustomAttr consB.SetCustomAttribute) mdef.CustomAttrs () | _name -> @@ -1604,10 +1610,10 @@ let rec buildMethodPass3 cenv tref modB (typB:TypeBuilder) emEnv (mdef : ILMetho // Value parameters let defineParameter (i, attr, name) = methB.DefineParameterAndLog(i+1, attr, name) - mdef.Parameters |> List.iteri (fun a b -> emitParameter cenv emEnv defineParameter a b); + mdef.Parameters |> List.iteri (fun a b -> emitParameter cenv emEnv defineParameter a b) // Body if not isPInvoke then - emitMethodBody cenv modB emEnv methB.GetILGeneratorAndLog mdef.Name mdef.Body; + emitMethodBody cenv modB emEnv methB.GetILGeneratorAndLog mdef.Name mdef.Body let emEnv = envPopTyvars emEnv // case fold later... emitCustomAttrs cenv emEnv methB.SetCustomAttributeAndLog mdef.CustomAttrs @@ -1615,10 +1621,10 @@ let rec buildMethodPass3 cenv tref modB (typB:TypeBuilder) emEnv (mdef : ILMetho // buildFieldPass2 //---------------------------------------------------------------------------- -let buildFieldPass2 cenv tref (typB:TypeBuilder) emEnv (fdef : ILFieldDef) = +let buildFieldPass2 cenv tref (typB: TypeBuilder) emEnv (fdef: ILFieldDef) = let attrs = fdef.Attributes - let fieldT = convType cenv emEnv fdef.FieldType + let fieldT = convType cenv emEnv fdef.FieldType let fieldB = match fdef.Data with | Some d -> typB.DefineInitializedData(fdef.Name, d, attrs) @@ -1642,13 +1648,13 @@ let buildFieldPass2 cenv tref (typB:TypeBuilder) emEnv (fdef : ILFieldDef) = // => here we cannot detect if underlying type is already set so as a conservative solution we delay initialization of fields // to the end of pass2 (types and members are already created but method bodies are yet not emitted) { emEnv with delayedFieldInits = (fun() -> fieldB.SetConstant(convFieldInit initial))::emEnv.delayedFieldInits } - fdef.Offset |> Option.iter (fun offset -> fieldB.SetOffset(offset)); + fdef.Offset |> Option.iter (fun offset -> fieldB.SetOffset(offset)) // custom attributes: done on pass 3 as they may reference attribute constructors generated on // pass 2. let fref = mkILFieldRef (tref, fdef.Name, fdef.FieldType) envBindFieldRef emEnv fref fieldB -let buildFieldPass3 cenv tref (_typB:TypeBuilder) emEnv (fdef : ILFieldDef) = +let buildFieldPass3 cenv tref (_typB: TypeBuilder) emEnv (fdef: ILFieldDef) = let fref = mkILFieldRef (tref, fdef.Name, fdef.FieldType) let fieldB = envGetFieldB emEnv fref emitCustomAttrs cenv emEnv (wrapCustomAttr fieldB.SetCustomAttribute) fdef.CustomAttrs @@ -1657,21 +1663,21 @@ let buildFieldPass3 cenv tref (_typB:TypeBuilder) emEnv (fdef : ILFieldDef) = // buildPropertyPass2, 3 //---------------------------------------------------------------------------- -let buildPropertyPass2 cenv tref (typB:TypeBuilder) emEnv (prop : ILPropertyDef) = +let buildPropertyPass2 cenv tref (typB: TypeBuilder) emEnv (prop: ILPropertyDef) = let attrs = flagsIf prop.IsRTSpecialName PropertyAttributes.RTSpecialName ||| - flagsIf prop.IsSpecialName PropertyAttributes.SpecialName + flagsIf prop.IsSpecialName PropertyAttributes.SpecialName - let propB = typB.DefinePropertyAndLog(prop.Name, attrs, convType cenv emEnv prop.PropertyType, convTypesToArray cenv emEnv prop.Args) + let propB = typB.DefinePropertyAndLog(prop.Name, attrs, convType cenv emEnv prop.PropertyType, convTypesToArray cenv emEnv prop.Args) - prop.SetMethod |> Option.iter (fun mref -> propB.SetSetMethod(envGetMethB emEnv mref)); - prop.GetMethod |> Option.iter (fun mref -> propB.SetGetMethod(envGetMethB emEnv mref)); + prop.SetMethod |> Option.iter (fun mref -> propB.SetSetMethod(envGetMethB emEnv mref)) + prop.GetMethod |> Option.iter (fun mref -> propB.SetGetMethod(envGetMethB emEnv mref)) // set default value - prop.Init |> Option.iter (fun initial -> propB.SetConstant(convFieldInit initial)); + prop.Init |> Option.iter (fun initial -> propB.SetConstant(convFieldInit initial)) // custom attributes let pref = ILPropertyRef.Create (tref, prop.Name) envBindPropRef emEnv pref propB -let buildPropertyPass3 cenv tref (_typB:TypeBuilder) emEnv (prop : ILPropertyDef) = +let buildPropertyPass3 cenv tref (_typB: TypeBuilder) emEnv (prop: ILPropertyDef) = let pref = ILPropertyRef.Create (tref, prop.Name) let propB = envGetPropB emEnv pref emitCustomAttrs cenv emEnv (wrapCustomAttr propB.SetCustomAttribute) prop.CustomAttrs @@ -1681,28 +1687,28 @@ let buildPropertyPass3 cenv tref (_typB:TypeBuilder) emEnv (prop : ILPropertyDef //---------------------------------------------------------------------------- -let buildEventPass3 cenv (typB:TypeBuilder) emEnv (eventDef : ILEventDef) = +let buildEventPass3 cenv (typB: TypeBuilder) emEnv (eventDef: ILEventDef) = let attrs = flagsIf eventDef.IsSpecialName EventAttributes.SpecialName ||| flagsIf eventDef.IsRTSpecialName EventAttributes.RTSpecialName assert eventDef.EventType.IsSome - let eventB = typB.DefineEventAndLog(eventDef.Name, attrs, convType cenv emEnv eventDef.EventType.Value) + let eventB = typB.DefineEventAndLog(eventDef.Name, attrs, convType cenv emEnv eventDef.EventType.Value) - eventDef.AddMethod |> (fun mref -> eventB.SetAddOnMethod(envGetMethB emEnv mref)); - eventDef.RemoveMethod |> (fun mref -> eventB.SetRemoveOnMethod(envGetMethB emEnv mref)); - eventDef.FireMethod |> Option.iter (fun mref -> eventB.SetRaiseMethod(envGetMethB emEnv mref)); - eventDef.OtherMethods |> List.iter (fun mref -> eventB.AddOtherMethod(envGetMethB emEnv mref)); + eventDef.AddMethod |> (fun mref -> eventB.SetAddOnMethod(envGetMethB emEnv mref)) + eventDef.RemoveMethod |> (fun mref -> eventB.SetRemoveOnMethod(envGetMethB emEnv mref)) + eventDef.FireMethod |> Option.iter (fun mref -> eventB.SetRaiseMethod(envGetMethB emEnv mref)) + eventDef.OtherMethods |> List.iter (fun mref -> eventB.AddOtherMethod(envGetMethB emEnv mref)) emitCustomAttrs cenv emEnv (wrapCustomAttr eventB.SetCustomAttribute) eventDef.CustomAttrs //---------------------------------------------------------------------------- // buildMethodImplsPass3 //---------------------------------------------------------------------------- -let buildMethodImplsPass3 cenv _tref (typB:TypeBuilder) emEnv (mimpl : IL.ILMethodImplDef) = +let buildMethodImplsPass3 cenv _tref (typB: TypeBuilder) emEnv (mimpl: IL.ILMethodImplDef) = let bodyMethInfo = convMethodRef cenv emEnv (typB.AsType()) mimpl.OverrideBy.MethodRef // doc: must be MethodBuilder let (OverridesSpec (mref, dtyp)) = mimpl.Overrides - let declMethTI = convType cenv emEnv dtyp + let declMethTI = convType cenv emEnv dtyp let declMethInfo = convMethodRef cenv emEnv declMethTI mref - typB.DefineMethodOverride(bodyMethInfo, declMethInfo); + typB.DefineMethodOverride(bodyMethInfo, declMethInfo) emEnv //---------------------------------------------------------------------------- @@ -1712,31 +1718,31 @@ let buildMethodImplsPass3 cenv _tref (typB:TypeBuilder) emEnv (mimpl : IL.ILMeth let typeAttrbutesOfTypeDefKind x = match x with // required for a TypeBuilder - | ILTypeDefKind.Class -> TypeAttributes.Class - | ILTypeDefKind.ValueType -> TypeAttributes.Class - | ILTypeDefKind.Interface -> TypeAttributes.Interface - | ILTypeDefKind.Enum -> TypeAttributes.Class - | ILTypeDefKind.Delegate -> TypeAttributes.Class + | ILTypeDefKind.Class -> TypeAttributes.Class + | ILTypeDefKind.ValueType -> TypeAttributes.Class + | ILTypeDefKind.Interface -> TypeAttributes.Interface + | ILTypeDefKind.Enum -> TypeAttributes.Class + | ILTypeDefKind.Delegate -> TypeAttributes.Class let typeAttrbutesOfTypeAccess x = match x with - | ILTypeDefAccess.Public -> TypeAttributes.Public - | ILTypeDefAccess.Private -> TypeAttributes.NotPublic - | ILTypeDefAccess.Nested macc -> + | ILTypeDefAccess.Public -> TypeAttributes.Public + | ILTypeDefAccess.Private -> TypeAttributes.NotPublic + | ILTypeDefAccess.Nested macc -> match macc with - | ILMemberAccess.Assembly -> TypeAttributes.NestedAssembly - | ILMemberAccess.CompilerControlled -> failwith "Nested compiler controled." - | ILMemberAccess.FamilyAndAssembly -> TypeAttributes.NestedFamANDAssem - | ILMemberAccess.FamilyOrAssembly -> TypeAttributes.NestedFamORAssem - | ILMemberAccess.Family -> TypeAttributes.NestedFamily - | ILMemberAccess.Private -> TypeAttributes.NestedPrivate - | ILMemberAccess.Public -> TypeAttributes.NestedPublic + | ILMemberAccess.Assembly -> TypeAttributes.NestedAssembly + | ILMemberAccess.CompilerControlled -> failwith "Nested compiler controled." + | ILMemberAccess.FamilyAndAssembly -> TypeAttributes.NestedFamANDAssem + | ILMemberAccess.FamilyOrAssembly -> TypeAttributes.NestedFamORAssem + | ILMemberAccess.Family -> TypeAttributes.NestedFamily + | ILMemberAccess.Private -> TypeAttributes.NestedPrivate + | ILMemberAccess.Public -> TypeAttributes.NestedPublic let typeAttributesOfTypeEncoding x = match x with - | ILDefaultPInvokeEncoding.Ansi -> TypeAttributes.AnsiClass + | ILDefaultPInvokeEncoding.Ansi -> TypeAttributes.AnsiClass | ILDefaultPInvokeEncoding.Auto -> TypeAttributes.AutoClass - | ILDefaultPInvokeEncoding.Unicode -> TypeAttributes.UnicodeClass + | ILDefaultPInvokeEncoding.Unicode -> TypeAttributes.UnicodeClass let typeAttributesOfTypeLayout cenv emEnv x = @@ -1750,12 +1756,12 @@ let typeAttributesOfTypeLayout cenv emEnv x = (tref1, [mkILNonGenericValueTy tref2 ], [ ILAttribElem.Int32 x ], - (p.Pack |> Option.toList |> List.map (fun x -> ("Pack", cenv.ilg.typ_Int32, false, ILAttribElem.Int32 (int32 x)))) @ + (p.Pack |> Option.toList |> List.map (fun x -> ("Pack", cenv.ilg.typ_Int32, false, ILAttribElem.Int32 (int32 x)))) @ (p.Size |> Option.toList |> List.map (fun x -> ("Size", cenv.ilg.typ_Int32, false, ILAttribElem.Int32 x)))))) | _ -> None match x with - | ILTypeDefLayout.Auto -> None - | ILTypeDefLayout.Explicit p -> (attr 0x02 p) + | ILTypeDefLayout.Auto -> None + | ILTypeDefLayout.Explicit p -> (attr 0x02 p) | ILTypeDefLayout.Sequential p -> (attr 0x00 p) @@ -1763,20 +1769,20 @@ let typeAttributesOfTypeLayout cenv emEnv x = // buildTypeDefPass1 cenv //---------------------------------------------------------------------------- -let rec buildTypeDefPass1 cenv emEnv (modB:ModuleBuilder) rootTypeBuilder nesting (tdef : ILTypeDef) = +let rec buildTypeDefPass1 cenv emEnv (modB: ModuleBuilder) rootTypeBuilder nesting (tdef: ILTypeDef) = // -IsComInterop: bool; (* Class or interface generated for COM interop *) - // -SecurityDecls: Permissions; - // -InitSemantics: ILTypeInit; + // -SecurityDecls: Permissions + // -InitSemantics: ILTypeInit // TypeAttributes let cattrsLayout = typeAttributesOfTypeLayout cenv emEnv tdef.Layout let attrsType = tdef.Attributes // TypeBuilder from TypeAttributes. - let typB : TypeBuilder = rootTypeBuilder (tdef.Name, attrsType) - cattrsLayout |> Option.iter typB.SetCustomAttributeAndLog; + let typB: TypeBuilder = rootTypeBuilder (tdef.Name, attrsType) + cattrsLayout |> Option.iter typB.SetCustomAttributeAndLog - buildGenParamsPass1 emEnv typB.DefineGenericParametersAndLog tdef.GenericParams; + buildGenParamsPass1 emEnv typB.DefineGenericParametersAndLog tdef.GenericParams // bind tref -> (typT, typB) let tref = mkRefForNestedILTypeDef ILScopeRef.Local (nesting, tdef) let typT = @@ -1792,23 +1798,23 @@ let rec buildTypeDefPass1 cenv emEnv (modB:ModuleBuilder) rootTypeBuilder nestin let emEnv = List.fold buildNestedType emEnv tdef.NestedTypes.AsList emEnv -and buildTypeTypeDef cenv emEnv modB (typB : TypeBuilder) nesting tdef = +and buildTypeTypeDef cenv emEnv modB (typB: TypeBuilder) nesting tdef = buildTypeDefPass1 cenv emEnv modB typB.DefineNestedTypeAndLog nesting tdef //---------------------------------------------------------------------------- // buildTypeDefPass1b //---------------------------------------------------------------------------- -let rec buildTypeDefPass1b cenv nesting emEnv (tdef : ILTypeDef) = +let rec buildTypeDefPass1b cenv nesting emEnv (tdef: ILTypeDef) = let tref = mkRefForNestedILTypeDef ILScopeRef.Local (nesting, tdef) - let typB = envGetTypB emEnv tref + let typB = envGetTypB emEnv tref let genArgs = getGenericArgumentsOfType (typB.AsType()) let emEnv = envPushTyvars emEnv genArgs // Parent may reference types being defined, so has to come after it's Pass1 creation - tdef.Extends |> Option.iter (fun ty -> typB.SetParentAndLog(convType cenv emEnv ty)); - // build constraints on ILGenericParameterDefs. Constraints may reference types being defined, + tdef.Extends |> Option.iter (fun ty -> typB.SetParentAndLog(convType cenv emEnv ty)) + // build constraints on ILGenericParameterDefs. Constraints may reference types being defined, // so have to come after all types are created - buildGenParamsPass1b cenv emEnv genArgs tdef.GenericParams; + buildGenParamsPass1b cenv emEnv genArgs tdef.GenericParams let emEnv = envPopTyvars emEnv let nesting = nesting @ [tdef] List.iter (buildTypeDefPass1b cenv nesting emEnv) tdef.NestedTypes.AsList @@ -1817,16 +1823,16 @@ let rec buildTypeDefPass1b cenv nesting emEnv (tdef : ILTypeDef) = // buildTypeDefPass2 //---------------------------------------------------------------------------- -let rec buildTypeDefPass2 cenv nesting emEnv (tdef : ILTypeDef) = +let rec buildTypeDefPass2 cenv nesting emEnv (tdef: ILTypeDef) = let tref = mkRefForNestedILTypeDef ILScopeRef.Local (nesting, tdef) - let typB = envGetTypB emEnv tref + let typB = envGetTypB emEnv tref let emEnv = envPushTyvars emEnv (getGenericArgumentsOfType (typB.AsType())) // add interface impls - tdef.Implements |> convTypes cenv emEnv |> List.iter (fun implT -> typB.AddInterfaceImplementationAndLog(implT)); + tdef.Implements |> convTypes cenv emEnv |> List.iter (fun implT -> typB.AddInterfaceImplementationAndLog(implT)) // add methods, properties - let emEnv = Array.fold (buildMethodPass2 cenv tref typB) emEnv tdef.Methods.AsArray - let emEnv = List.fold (buildFieldPass2 cenv tref typB) emEnv tdef.Fields.AsList - let emEnv = List.fold (buildPropertyPass2 cenv tref typB) emEnv tdef.Properties.AsList + let emEnv = Array.fold (buildMethodPass2 cenv tref typB) emEnv tdef.Methods.AsArray + let emEnv = List.fold (buildFieldPass2 cenv tref typB) emEnv tdef.Fields.AsList + let emEnv = List.fold (buildPropertyPass2 cenv tref typB) emEnv tdef.Properties.AsList let emEnv = envPopTyvars emEnv // nested types let nesting = nesting @ [tdef] @@ -1837,17 +1843,17 @@ let rec buildTypeDefPass2 cenv nesting emEnv (tdef : ILTypeDef) = // buildTypeDefPass3 cenv //---------------------------------------------------------------------------- -let rec buildTypeDefPass3 cenv nesting modB emEnv (tdef : ILTypeDef) = +let rec buildTypeDefPass3 cenv nesting modB emEnv (tdef: ILTypeDef) = let tref = mkRefForNestedILTypeDef ILScopeRef.Local (nesting, tdef) let typB = envGetTypB emEnv tref let emEnv = envPushTyvars emEnv (getGenericArgumentsOfType (typB.AsType())) // add method bodies, properties, events - tdef.Methods |> Seq.iter (buildMethodPass3 cenv tref modB typB emEnv); - tdef.Properties.AsList |> List.iter (buildPropertyPass3 cenv tref typB emEnv); - tdef.Events.AsList |> List.iter (buildEventPass3 cenv typB emEnv); - tdef.Fields.AsList |> List.iter (buildFieldPass3 cenv tref typB emEnv); + tdef.Methods |> Seq.iter (buildMethodPass3 cenv tref modB typB emEnv) + tdef.Properties.AsList |> List.iter (buildPropertyPass3 cenv tref typB emEnv) + tdef.Events.AsList |> List.iter (buildEventPass3 cenv typB emEnv) + tdef.Fields.AsList |> List.iter (buildFieldPass3 cenv tref typB emEnv) let emEnv = List.fold (buildMethodImplsPass3 cenv tref typB) emEnv tdef.MethodImpls.AsList - tdef.CustomAttrs |> emitCustomAttrs cenv emEnv typB.SetCustomAttributeAndLog ; + tdef.CustomAttrs |> emitCustomAttrs cenv emEnv typB.SetCustomAttributeAndLog // custom attributes let emEnv = envPopTyvars emEnv // nested types @@ -1861,9 +1867,9 @@ let rec buildTypeDefPass3 cenv nesting modB emEnv (tdef : ILTypeDef) = // The code in this phase is fragile. // // THe background is that System.Reflection.Emit implementations can be finnickity about the -// order that CreateType calls are made when types refer to each other. Some of these restrictions +// order that CreateType calls are made when types refer to each other. Some of these restrictions // are not well documented, or are related to historical bugs where the F# emit code worked around the -// underlying problems. Ideally the SRE implementation would just "work this out as it goes along" but +// underlying problems. Ideally the SRE implementation would just "work this out as it goes along" but // unfortunately that's not been the case. // // Here are some known cases: @@ -1888,13 +1894,13 @@ let rec buildTypeDefPass3 cenv nesting modB emEnv (tdef : ILTypeDef) = // // // There is also a case where generic parameter constraints were being checked before -// a generic method was called. This forced the loading of the types involved in the +// a generic method was called. This forced the loading of the types involved in the // constraints very early. // //---------------------------------------------------------------------------- -let getEnclosingTypeRefs (tref:ILTypeRef) = +let getEnclosingTypeRefs (tref: ILTypeRef) = match tref.Enclosing with | [] -> [] | h :: t -> List.scan (fun tr nm -> mkILTyRefInTyRef (tr, nm)) (mkILTyRef(tref.Scope, h)) t @@ -1906,7 +1912,7 @@ type CollectTypes = ValueTypesOnly | All let rec getTypeRefsInType (allTypes: CollectTypes) ty acc = match ty with | ILType.Void - | ILType.TypeVar _ -> acc + | ILType.TypeVar _ -> acc | ILType.Ptr eltType | ILType.Byref eltType -> getTypeRefsInType allTypes eltType acc | ILType.Array (_, eltType) -> @@ -1922,13 +1928,13 @@ let rec getTypeRefsInType (allTypes: CollectTypes) ty acc = | CollectTypes.ValueTypesOnly -> acc | CollectTypes.All -> tspec.TypeRef :: List.foldBack (getTypeRefsInType allTypes) tspec.GenericArgs acc | ILType.FunctionPointer _callsig -> failwith "getTypeRefsInType: fptr" - | ILType.Modified _ -> failwith "getTypeRefsInType: modified" + | ILType.Modified _ -> failwith "getTypeRefsInType: modified" let verbose2 = false -let createTypeRef (visited : Dictionary<_, _>, created : Dictionary<_, _>) emEnv tref = +let createTypeRef (visited: Dictionary<_, _>, created: Dictionary<_, _>) emEnv tref = - let rec traverseTypeDef (tref:ILTypeRef) (tdef:ILTypeDef) = + let rec traverseTypeDef (tref: ILTypeRef) (tdef: ILTypeDef) = if verbose2 then dprintf "buildTypeDefPass4: Creating Enclosing Types of %s\n" tdef.Name for enc in getEnclosingTypeRefs tref do traverseTypeRef enc @@ -1986,11 +1992,11 @@ let createTypeRef (visited : Dictionary<_, _>, created : Dictionary<_, _>) emEnv let typeName = r.Name let typeRef = ILTypeRef.Create(ILScopeRef.Local, nestingToProbe, typeName) match emEnv.emTypMap.TryFind typeRef with - | Some(_, tb, _, _) -> + | Some(_, tb, _, _) -> if not (tb.IsCreated()) then tb.CreateTypeAndLog() |> ignore tb.Assembly - | None -> null + | None -> null ) // For some reason, the handler is installed while running 'traverseTypeDef' but not while defining the type // itself. @@ -2001,18 +2007,18 @@ let createTypeRef (visited : Dictionary<_, _>, created : Dictionary<_, _>) emEnv System.AppDomain.CurrentDomain.remove_TypeResolve typeCreationHandler #endif // At this point, we've done everything we can to prepare the type for loading by eagerly forcing the - // load of other types. Everything else is up to the implementation of System.Reflection.Emit. + // load of other types. Everything else is up to the implementation of System.Reflection.Emit. if not (created.ContainsKey(tref)) then created.[tref] <- true if verbose2 then dprintf "- creating type %s\n" typB.FullName - typB.CreateTypeAndLog() |> ignore + typB.CreateTypeAndLog() |> ignore traverseTypeRef tref -let rec buildTypeDefPass4 (visited, created) nesting emEnv (tdef : ILTypeDef) = - if verbose2 then dprintf "buildTypeDefPass4 %s\n" tdef.Name; +let rec buildTypeDefPass4 (visited, created) nesting emEnv (tdef: ILTypeDef) = + if verbose2 then dprintf "buildTypeDefPass4 %s\n" tdef.Name let tref = mkRefForNestedILTypeDef ILScopeRef.Local (nesting, tdef) - createTypeRef (visited, created) emEnv tref; + createTypeRef (visited, created) emEnv tref // nested types @@ -2023,19 +2029,19 @@ let rec buildTypeDefPass4 (visited, created) nesting emEnv (tdef : ILTypeDef) = // buildModuleType //---------------------------------------------------------------------------- -let buildModuleTypePass1 cenv (modB:ModuleBuilder) emEnv (tdef:ILTypeDef) = +let buildModuleTypePass1 cenv (modB: ModuleBuilder) emEnv (tdef: ILTypeDef) = buildTypeDefPass1 cenv emEnv modB modB.DefineTypeAndLog [] tdef -let buildModuleTypePass1b cenv emEnv tdef = buildTypeDefPass1b cenv [] emEnv tdef -let buildModuleTypePass2 cenv emEnv tdef = buildTypeDefPass2 cenv [] emEnv tdef +let buildModuleTypePass1b cenv emEnv tdef = buildTypeDefPass1b cenv [] emEnv tdef +let buildModuleTypePass2 cenv emEnv tdef = buildTypeDefPass2 cenv [] emEnv tdef let buildModuleTypePass3 cenv modB emEnv tdef = buildTypeDefPass3 cenv [] modB emEnv tdef -let buildModuleTypePass4 visited emEnv tdef = buildTypeDefPass4 visited [] emEnv tdef +let buildModuleTypePass4 visited emEnv tdef = buildTypeDefPass4 visited [] emEnv tdef //---------------------------------------------------------------------------- // buildModuleFragment - only the types the fragment get written //---------------------------------------------------------------------------- -let buildModuleFragment cenv emEnv (asmB : AssemblyBuilder) (modB : ModuleBuilder) (m: ILModuleDef) = +let buildModuleFragment cenv emEnv (asmB: AssemblyBuilder) (modB: ModuleBuilder) (m: ILModuleDef) = let tdefs = m.TypeDefs.AsList let emEnv = (emEnv, tdefs) ||> List.fold (buildModuleTypePass1 cenv modB) @@ -2050,9 +2056,9 @@ let buildModuleFragment cenv emEnv (asmB : AssemblyBuilder) (modB : ModuleBuilde let emEnv = (emEnv, tdefs) ||> List.fold (buildModuleTypePass3 cenv modB) let visited = new Dictionary<_, _>(10) let created = new Dictionary<_, _>(10) - tdefs |> List.iter (buildModuleTypePass4 (visited, created) emEnv) + tdefs |> List.iter (buildModuleTypePass4 (visited, created) emEnv) let emEnv = Seq.fold envUpdateCreatedTypeRef emEnv created.Keys // update typT with the created typT - emitCustomAttrs cenv emEnv modB.SetCustomAttributeAndLog m.CustomAttrs; + emitCustomAttrs cenv emEnv modB.SetCustomAttributeAndLog m.CustomAttrs #if FX_RESHAPED_REFEMIT ignore asmB #else @@ -2067,18 +2073,18 @@ let buildModuleFragment cenv emEnv (asmB : AssemblyBuilder) (modB : ModuleBuilde | ILResourceLocation.File (mr, _) -> asmB.AddResourceFileAndLog(r.Name, mr.Name, attribs) | ILResourceLocation.Assembly _ -> - failwith "references to resources other assemblies may not be emitted using System.Reflection"); + failwith "references to resources other assemblies may not be emitted using System.Reflection") #endif emEnv //---------------------------------------------------------------------------- // test hook //---------------------------------------------------------------------------- -let defineDynamicAssemblyAndLog(asmName, flags, asmDir:string) = +let defineDynamicAssemblyAndLog(asmName, flags, asmDir: string) = #if FX_NO_APP_DOMAINS let asmB = AssemblyBuilder.DefineDynamicAssembly(asmName, flags) #else - let currentDom = System.AppDomain.CurrentDomain + let currentDom = System.AppDomain.CurrentDomain let asmB = currentDom.DefineDynamicAssembly(asmName, flags, asmDir) #endif if logRefEmitCalls then @@ -2090,9 +2096,9 @@ let defineDynamicAssemblyAndLog(asmName, flags, asmDir:string) = let mkDynamicAssemblyAndModule (assemblyName, optimize, debugInfo, collectible) = let filename = assemblyName + ".dll" - let asmDir = "." + let asmDir = "." let asmName = new AssemblyName() - asmName.Name <- assemblyName; + asmName.Name <- assemblyName let asmAccess = if collectible then AssemblyBuilderAccess.RunAndCollect #if FX_RESHAPED_REFEMIT @@ -2102,15 +2108,15 @@ let mkDynamicAssemblyAndModule (assemblyName, optimize, debugInfo, collectible) #endif let asmB = defineDynamicAssemblyAndLog(asmName, asmAccess, asmDir) if not optimize then - let daType = typeof; + let daType = typeof let daCtor = daType.GetConstructor [| typeof |] - let daBuilder = new CustomAttributeBuilder(daCtor, [| System.Diagnostics.DebuggableAttribute.DebuggingModes.DisableOptimizations ||| System.Diagnostics.DebuggableAttribute.DebuggingModes.Default |]) - asmB.SetCustomAttributeAndLog(daBuilder); + let daBuilder = new CustomAttributeBuilder(daCtor, [| System.Diagnostics.DebuggableAttribute.DebuggingModes.DisableOptimizations ||| System.Diagnostics.DebuggableAttribute.DebuggingModes.Default |]) + asmB.SetCustomAttributeAndLog(daBuilder) let modB = asmB.DefineDynamicModuleAndLog(assemblyName, filename, debugInfo) asmB, modB -let emitModuleFragment (ilg, emEnv, asmB : AssemblyBuilder, modB : ModuleBuilder, modul : IL.ILModuleDef, debugInfo : bool, resolveAssemblyRef, tryFindSysILTypeRef) = +let emitModuleFragment (ilg, emEnv, asmB: AssemblyBuilder, modB: ModuleBuilder, modul: IL.ILModuleDef, debugInfo: bool, resolveAssemblyRef, tryFindSysILTypeRef) = let cenv = { ilg = ilg ; generatePdb = debugInfo; resolveAssemblyRef=resolveAssemblyRef; tryFindSysILTypeRef=tryFindSysILTypeRef } let emEnv = buildModuleFragment cenv emEnv asmB modB modul @@ -2118,11 +2124,11 @@ let emitModuleFragment (ilg, emEnv, asmB : AssemblyBuilder, modB : ModuleBuilder | None -> () | Some mani -> // REVIEW: remainder of manifest - emitCustomAttrs cenv emEnv asmB.SetCustomAttributeAndLog mani.CustomAttrs; + emitCustomAttrs cenv emEnv asmB.SetCustomAttributeAndLog mani.CustomAttrs // invoke entry point methods - let execEntryPtFun ((typB : TypeBuilder), methodName) () = + let execEntryPtFun ((typB: TypeBuilder), methodName) () = try - ignore (typB.InvokeMemberAndLog(methodName, BindingFlags.InvokeMethod ||| BindingFlags.Public ||| BindingFlags.Static, [| |])); + ignore (typB.InvokeMemberAndLog(methodName, BindingFlags.InvokeMethod ||| BindingFlags.Public ||| BindingFlags.Static, [| |])) None with | :? System.Reflection.TargetInvocationException as e -> @@ -2141,13 +2147,13 @@ let emitModuleFragment (ilg, emEnv, asmB : AssemblyBuilder, modB : ModuleBuilder // However, casting TypeBuilder to Type is not the same as getting Type proper. // The builder version does not implement all methods on the parent. // -// The emEnv stores (typT:Type) for each tref. +// The emEnv stores (typT: Type) for each tref. // Once the emitted type is created this typT is updated to ensure it is the Type proper. // So Type lookup will return the proper Type not TypeBuilder. -let LookupTypeRef cenv emEnv tref = convCreatedTypeRef cenv emEnv tref -let LookupType cenv emEnv ty = convCreatedType cenv emEnv ty +let LookupTypeRef cenv emEnv tref = convCreatedTypeRef cenv emEnv tref +let LookupType cenv emEnv ty = convCreatedType cenv emEnv ty // Lookups of ILFieldRef and MethodRef may require a similar non-Builder-fixup post Type-creation. -let LookupFieldRef emEnv fref = Zmap.tryFind fref emEnv.emFieldMap |> Option.map (fun fieldBuilder -> fieldBuilder :> FieldInfo) -let LookupMethodRef emEnv mref = Zmap.tryFind mref emEnv.emMethMap |> Option.map (fun methodBuilder -> methodBuilder :> MethodInfo) +let LookupFieldRef emEnv fref = Zmap.tryFind fref emEnv.emFieldMap |> Option.map (fun fieldBuilder -> fieldBuilder :> FieldInfo) +let LookupMethodRef emEnv mref = Zmap.tryFind mref emEnv.emMethMap |> Option.map (fun methodBuilder -> methodBuilder :> MethodInfo) diff --git a/src/fcs-fable/src/absil/ilsign.fs b/src/fcs-fable/src/absil/ilsign.fs index 4608a9f9d5..6b51af598d 100644 --- a/src/fcs-fable/src/absil/ilsign.fs +++ b/src/fcs-fable/src/absil/ilsign.fs @@ -44,7 +44,7 @@ open System.Runtime.InteropServices val UnderlyingArray: byte[] []val ImmutableArray: ImmutableArray - new (immutableArray:ImmutableArray) = { UnderlyingArray = Array.empty ; ImmutableArray = immutableArray} + new (immutableArray:ImmutableArray) = { UnderlyingArray = Array.empty; ImmutableArray = immutableArray} end let getUnderlyingArray (array:ImmutableArray) =ByteArrayUnion(array).UnderlyingArray @@ -53,8 +53,8 @@ open System.Runtime.InteropServices // remain static (skip checksum, Authenticode signatures and strong name signature blob) let hashAssembly (peReader:PEReader) (hashAlgorithm:IncrementalHash ) = // Hash content of all headers - let peHeaders = peReader.PEHeaders; - let peHeaderOffset = peHeaders.PEHeaderStartOffset; + let peHeaders = peReader.PEHeaders + let peHeaderOffset = peHeaders.PEHeaderStartOffset // Even though some data in OptionalHeader is different for 32 and 64, this field is the same let checkSumOffset = peHeaderOffset + 0x40; // offsetof(IMAGE_OPTIONAL_HEADER, CheckSum) @@ -67,7 +67,7 @@ open System.Runtime.InteropServices let allHeadersSize = peHeaderOffset + peHeaderSize + int(peHeaders.CoffHeader.NumberOfSections) * 0x28; // sizeof(IMAGE_SECTION_HEADER) let allHeaders = let array:byte[] = Array.zeroCreate allHeadersSize - peReader.GetEntireImage().GetContent().CopyTo(0, array, 0, allHeadersSize); + peReader.GetEntireImage().GetContent().CopyTo(0, array, 0, allHeadersSize) array // Clear checksum and security data directory @@ -117,7 +117,7 @@ open System.Runtime.InteropServices member x.ReadBigInteger (length:int):byte[] = let arr:byte[] = Array.zeroCreate length Array.Copy(x._blob, x._offset, arr, 0, length) |> ignore - x._offset <- x._offset + length; + x._offset <- x._offset + length arr |> Array.rev let RSAParamatersFromBlob (blob:byte[]) keyType = diff --git a/src/fcs-fable/src/absil/ilsupp.fs b/src/fcs-fable/src/absil/ilsupp.fs index 6fbdc5bb72..5f9932662d 100755 --- a/src/fcs-fable/src/absil/ilsupp.fs +++ b/src/fcs-fable/src/absil/ilsupp.fs @@ -45,20 +45,20 @@ let MAX_PATH = 260 let E_FAIL = 0x80004005 -let bytesToWord ((b0 : byte) , (b1 : byte)) = +let bytesToWord ((b0: byte), (b1: byte)) = (int16)b0 ||| ((int16)b1 <<< 8) -let bytesToDWord ((b0 : byte) , (b1 : byte) , (b2 : byte) , (b3 : byte)) = +let bytesToDWord ((b0: byte), (b1: byte), (b2: byte), (b3: byte)) = (int)b0 ||| ((int)b1 <<< 8) ||| ((int)b2 <<< 16) ||| ((int)b3 <<< 24) -let bytesToQWord ((b0 : byte) , (b1 : byte) , (b2 : byte) , (b3 : byte) , (b4 : byte) , (b5 : byte) , (b6 : byte) , (b7 : byte)) = +let bytesToQWord ((b0: byte), (b1: byte), (b2: byte), (b3: byte), (b4: byte), (b5: byte), (b6: byte), (b7: byte)) = (int64)b0 ||| ((int64)b1 <<< 8) ||| ((int64)b2 <<< 16) ||| ((int64)b3 <<< 24) ||| ((int64)b4 <<< 32) ||| ((int64)b5 <<< 40) ||| ((int64)b6 <<< 48) ||| ((int64)b7 <<< 56) let dwToBytes n = [| (byte)(n &&& 0xff) ; (byte)((n >>> 8) &&& 0xff) ; (byte)((n >>> 16) &&& 0xff) ; (byte)((n >>> 24) &&& 0xff) |], 4 -let wToBytes (n : int16) = [| (byte)(n &&& 0xffs) ; (byte)((n >>> 8) &&& 0xffs) |], 2 +let wToBytes (n: int16) = [| (byte)(n &&& 0xffs) ; (byte)((n >>> 8) &&& 0xffs) |], 2 #if !FX_NO_LINKEDRESOURCES // REVIEW: factor these classes under one hierarchy, use reflection for creation from buffer and toBytes() // Though, everything I'd like to unify is static - metaclasses? -type IMAGE_FILE_HEADER (m:int16, secs:int16, tds:int32, ptst:int32, nos:int32, soh:int16, c:int16) = +type IMAGE_FILE_HEADER (m: int16, secs: int16, tds: int32, ptst: int32, nos: int32, soh: int16, c: int16) = let mutable machine = m let mutable numberOfSections = secs let mutable timeDateStamp = tds @@ -109,7 +109,7 @@ type IMAGE_FILE_HEADER (m:int16, secs:int16, tds:int32, ptst:int32, nos:int32, s buf.EmitUInt16 ((uint16)characteristics) buf.Close() -let bytesToIFH (buffer : byte[]) (offset : int) = +let bytesToIFH (buffer: byte[]) (offset: int) = if (buffer.Length - offset) < IMAGE_FILE_HEADER.Width then invalidArg "buffer" "buffer too small to fit an IMAGE_FILE_HEADER" IMAGE_FILE_HEADER( bytesToWord(buffer.[offset], buffer.[offset+1]), // Machine @@ -120,7 +120,7 @@ let bytesToIFH (buffer : byte[]) (offset : int) = bytesToWord(buffer.[offset+16], buffer.[offset+17]), // SizeOfOptionalHeader bytesToWord(buffer.[offset+18], buffer.[offset+19])) // Characteristics -type IMAGE_SECTION_HEADER(n:int64, ai:int32, va:int32, srd:int32, prd:int32, pr:int32, pln:int32, nr:int16, nl:int16, c:int32) = +type IMAGE_SECTION_HEADER(n: int64, ai: int32, va: int32, srd: int32, prd: int32, pr: int32, pln: int32, nr: int16, nl: int16, c: int32) = let mutable name = n let mutable addressInfo = ai // PhysicalAddress / VirtualSize let mutable virtualAddress = va @@ -194,7 +194,7 @@ type IMAGE_SECTION_HEADER(n:int64, ai:int32, va:int32, srd:int32, prd:int32, pr: buf.Close() -let bytesToISH (buffer : byte[]) (offset : int) = +let bytesToISH (buffer: byte[]) (offset: int) = if (buffer.Length - offset) < IMAGE_SECTION_HEADER.Width then invalidArg "buffer" "buffer too small to fit an IMAGE_SECTION_HEADER" IMAGE_SECTION_HEADER(bytesToQWord(buffer.[offset], buffer.[offset+1], buffer.[offset+2], buffer.[offset+3], buffer.[offset+4], buffer.[offset+5], buffer.[offset+6], buffer.[offset+7]), // Name @@ -208,7 +208,7 @@ let bytesToISH (buffer : byte[]) (offset : int) = bytesToWord(buffer.[offset+34], buffer.[offset+35]), // NumberOfLineNumbers bytesToDWord(buffer.[offset+36], buffer.[offset+37], buffer.[offset+38], buffer.[offset+39])) // Characteristics -type IMAGE_SYMBOL(n:int64, v:int32, sn:int16, t:int16, sc:byte, nas:byte) = +type IMAGE_SYMBOL(n: int64, v: int32, sn: int16, t: int16, sc: byte, nas: byte) = let mutable name = n let mutable value = v let mutable sectionNumber = sn @@ -253,7 +253,7 @@ type IMAGE_SYMBOL(n:int64, v:int32, sn:int16, t:int16, sc:byte, nas:byte) = buf.EmitByte numberOfAuxSymbols buf.Close() -let bytesToIS (buffer : byte[]) (offset : int) = +let bytesToIS (buffer: byte[]) (offset: int) = if (buffer.Length - offset) < IMAGE_SYMBOL.Width then invalidArg "buffer" "buffer too small to fit an IMAGE_SYMBOL" IMAGE_SYMBOL( bytesToQWord(buffer.[offset], buffer.[offset+1], buffer.[offset+2], buffer.[offset+3], buffer.[offset+4], buffer.[offset+5], buffer.[offset+6], buffer.[offset+7]), // Name @@ -263,7 +263,7 @@ let bytesToIS (buffer : byte[]) (offset : int) = buffer.[offset+16], // StorageClass buffer.[offset+17]) // NumberOfAuxSymbols -type IMAGE_RELOCATION(va:int32, sti:int32, t:int16) = +type IMAGE_RELOCATION(va: int32, sti: int32, t: int16) = let mutable virtualAddress = va // Also RelocCount let mutable symbolTableIndex = sti let mutable ty = t // type @@ -294,14 +294,14 @@ type IMAGE_RELOCATION(va:int32, sti:int32, t:int16) = buf.EmitUInt16 ((uint16)ty) buf.Close() -let bytesToIR (buffer : byte[]) (offset : int) = +let bytesToIR (buffer: byte[]) (offset: int) = if (buffer.Length - offset) < IMAGE_RELOCATION.Width then invalidArg "buffer" "buffer too small to fit an IMAGE_RELOCATION" IMAGE_RELOCATION( bytesToDWord(buffer.[offset], buffer.[offset+1], buffer.[offset+2], buffer.[offset+3]), bytesToDWord(buffer.[offset+4], buffer.[offset+5], buffer.[offset+6], buffer.[offset+7]), bytesToWord(buffer.[offset+8], buffer.[offset+9])) -type IMAGE_RESOURCE_DIRECTORY(c:int32, tds:int32, mjv:int16, mnv:int16, nne:int16, nie:int16) = +type IMAGE_RESOURCE_DIRECTORY(c: int32, tds: int32, mjv: int16, mnv: int16, nne: int16, nie: int16) = let mutable characteristics = c let mutable timeDateStamp = tds let mutable majorVersion = mjv @@ -345,7 +345,7 @@ type IMAGE_RESOURCE_DIRECTORY(c:int32, tds:int32, mjv:int16, mnv:int16, nne:int1 buf.EmitUInt16 ((uint16)numberOfIdEntries) buf.Close() -let bytesToIRD (buffer:byte[]) (offset:int) = +let bytesToIRD (buffer: byte[]) (offset: int) = if (buffer.Length - offset) < IMAGE_RESOURCE_DIRECTORY.Width then invalidArg "buffer" "buffer too small to fit an IMAGE_RESOURCE_DIRECTORY" IMAGE_RESOURCE_DIRECTORY( bytesToDWord(buffer.[offset], buffer.[offset+1], buffer.[offset+2], buffer.[offset+3]), // Characteristics @@ -355,7 +355,7 @@ let bytesToIRD (buffer:byte[]) (offset:int) = bytesToWord(buffer.[offset+12], buffer.[offset+13]), // NumberOfNamedEntries bytesToWord(buffer.[offset+14], buffer.[offset+15])) // NumberOfIdEntries -type IMAGE_RESOURCE_DIRECTORY_ENTRY(n:int32, o:int32) = +type IMAGE_RESOURCE_DIRECTORY_ENTRY(n: int32, o: int32) = let mutable name = n let mutable offset = o @@ -381,13 +381,13 @@ type IMAGE_RESOURCE_DIRECTORY_ENTRY(n:int32, o:int32) = buf.EmitInt32 offset buf.Close() -let bytesToIRDE (buffer:byte[]) (offset:int) = +let bytesToIRDE (buffer: byte[]) (offset: int) = if (buffer.Length - offset) < IMAGE_RESOURCE_DIRECTORY_ENTRY.Width then invalidArg "buffer" "buffer too small to fit an IMAGE_RESOURCE_DIRECTORY_ENTRY" IMAGE_RESOURCE_DIRECTORY_ENTRY( bytesToDWord(buffer.[offset], buffer.[offset+1], buffer.[offset+2], buffer.[offset+3]), // Name bytesToDWord(buffer.[offset+4], buffer.[offset+5], buffer.[offset+6], buffer.[offset+7])) // Offset -type IMAGE_RESOURCE_DATA_ENTRY(o:int32, s:int32, c:int32, r:int32) = +type IMAGE_RESOURCE_DATA_ENTRY(o: int32, s: int32, c: int32, r: int32) = let mutable offsetToData = o let mutable size = s let mutable codePage = c @@ -415,7 +415,7 @@ type IMAGE_RESOURCE_DATA_ENTRY(o:int32, s:int32, c:int32, r:int32) = buf.EmitInt32 codePage buf.EmitInt32 reserved -let bytesToIRDataE (buffer:byte[]) (offset:int) = +let bytesToIRDataE (buffer: byte[]) (offset: int) = if (buffer.Length - offset) < IMAGE_RESOURCE_DATA_ENTRY.Width then invalidArg "buffer" "buffer too small to fit an IMAGE_RESOURCE_DATA_ENTRY" IMAGE_RESOURCE_DATA_ENTRY(bytesToDWord(buffer.[offset], buffer.[offset+1], buffer.[offset+2], buffer.[offset+3]), // OffsetToData @@ -478,7 +478,7 @@ type ResFormatHeader() = buf.EmitInt32 dwCharacteristics buf.Close() -type ResFormatNode(tid:int32, nid:int32, lid:int32, dataOffset:int32, pbLinkedResource:byte[]) = +type ResFormatNode(tid: int32, nid: int32, lid: int32, dataOffset: int32, pbLinkedResource: byte[]) = let mutable resHdr = ResFormatHeader() let mutable dataEntry = Unchecked.defaultof let mutable cType = 0 @@ -488,25 +488,25 @@ type ResFormatNode(tid:int32, nid:int32, lid:int32, dataOffset:int32, pbLinkedRe do if (tid &&& 0x80000000) <> 0 then // REVIEW: Are names and types mutually exclusive? The C++ code didn't seem to think so, but I can't find any documentation - resHdr.TypeID <- 0 ; + resHdr.TypeID <- 0 let mtid = tid &&& 0x7fffffff - cType <- bytesToDWord(pbLinkedResource.[mtid], pbLinkedResource.[mtid+1], pbLinkedResource.[mtid+2], pbLinkedResource.[mtid+3]) ; - wzType <- Bytes.zeroCreate ((cType + 1) * 2) ; + cType <- bytesToDWord(pbLinkedResource.[mtid], pbLinkedResource.[mtid+1], pbLinkedResource.[mtid+2], pbLinkedResource.[mtid+3]) + wzType <- Bytes.zeroCreate ((cType + 1) * 2) Bytes.blit pbLinkedResource 4 wzType 0 (cType * 2) else - resHdr.TypeID <- (0xffff ||| ((tid &&& 0xffff) <<< 16)) ; + resHdr.TypeID <- (0xffff ||| ((tid &&& 0xffff) <<< 16)) if (nid &&& 0x80000000) <> 0 then - resHdr.NameID <- 0 ; + resHdr.NameID <- 0 let mnid = nid &&& 0x7fffffff - cName <- bytesToDWord(pbLinkedResource.[mnid], pbLinkedResource.[mnid+1], pbLinkedResource.[mnid+2], pbLinkedResource.[mnid+3]) ; - wzName <- Bytes.zeroCreate ((cName + 1) * 2) ; + cName <- bytesToDWord(pbLinkedResource.[mnid], pbLinkedResource.[mnid+1], pbLinkedResource.[mnid+2], pbLinkedResource.[mnid+3]) + wzName <- Bytes.zeroCreate ((cName + 1) * 2) Bytes.blit pbLinkedResource 4 wzName 0 (cName * 2) else resHdr.NameID <- (0xffff ||| ((nid &&& 0xffff) <<< 16)) - resHdr.LangID <- (int16)lid ; - dataEntry <- bytesToIRDataE pbLinkedResource dataOffset ; + resHdr.LangID <- (int16)lid + dataEntry <- bytesToIRDataE pbLinkedResource dataOffset resHdr.DataSize <- dataEntry.Size member x.ResHdr @@ -518,7 +518,7 @@ type ResFormatNode(tid:int32, nid:int32, lid:int32, dataOffset:int32, pbLinkedRe member x.Name with get() = wzName - member x.Save(ulLinkedResourceBaseRVA:int32, pbLinkedResource:byte[], pUnlinkedResource:byte[], offset:int) = + member x.Save(ulLinkedResourceBaseRVA: int32, pbLinkedResource: byte[], pUnlinkedResource: byte[], offset: int) = // Dump them to pUnlinkedResource // For each resource write header and data let size = ref 0 @@ -529,7 +529,7 @@ type ResFormatNode(tid:int32, nid:int32, lid:int32, dataOffset:int32, pbLinkedRe if Unchecked.defaultof <> wzName then resHdr.HeaderSize <- resHdr.HeaderSize + ((cName + 1) * 2) - 4 - let SaveChunk(p : byte[], sz : int) = + let SaveChunk(p: byte[], sz: int) = if Unchecked.defaultof <> pUnlinkedResource then Bytes.blit p 0 pUnlinkedResource (!unlinkedResourceOffset + offset) sz unlinkedResourceOffset := !unlinkedResourceOffset + sz @@ -537,7 +537,7 @@ type ResFormatNode(tid:int32, nid:int32, lid:int32, dataOffset:int32, pbLinkedRe () - // ---- Constant part of the header : DWORD, DWORD + // ---- Constant part of the header: DWORD, DWORD SaveChunk(dwToBytes resHdr.DataSize) SaveChunk(dwToBytes resHdr.HeaderSize) @@ -572,16 +572,16 @@ type ResFormatNode(tid:int32, nid:int32, lid:int32, dataOffset:int32, pbLinkedRe let pbData = pbLinkedResource.[(dataEntry.OffsetToData - ulLinkedResourceBaseRVA) ..] SaveChunk(pbData, dataEntry.Size) - dwFiller <- dataEntry.Size &&& 0x3 ; + dwFiller <- dataEntry.Size &&& 0x3 if dwFiller <> 0 then SaveChunk(bNil, 4 - dwFiller) !size -let linkNativeResources (unlinkedResources:byte[] list) (ulLinkedResourceBaseRVA:int32) (fileType:PEFileType) (outputFilePath:string) = +let linkNativeResources (unlinkedResources: byte[] list) (ulLinkedResourceBaseRVA: int32) (fileType: PEFileType) (outputFilePath: string) = let nPEFileType = match fileType with X86 -> 0 | X64 -> 2 - let mutable tempResFiles : string list = [] - let mutable objBytes : byte[] = [||] + let mutable tempResFiles: string list = [] + let mutable objBytes: byte[] = [||] let unlinkedResources = unlinkedResources |> List.filter (fun arr -> arr.Length > 0) if isNil unlinkedResources then // bail if there's nothing to link @@ -619,11 +619,11 @@ let linkNativeResources (unlinkedResources:byte[] list) (ulLinkedResourceBaseRV let createCvtresArgs path = let tempObjFileName = GetUniqueRandomFileName(path) let mutable cmdLineArgs = sprintf "%s \"/Out:%s\"" cmdLineArgsPreamble tempObjFileName - let mutable resFiles : string list = [] + let mutable resFiles: string list = [] for _ulr in unlinkedResources do let tempResFileName = GetUniqueRandomFileName(path) - resFiles <- tempResFileName :: resFiles ; + resFiles <- tempResFileName :: resFiles cmdLineArgs <- cmdLineArgs + " \"" + tempResFileName + "\"" let trf = resFiles let cmd = cmdLineArgs @@ -633,7 +633,7 @@ let linkNativeResources (unlinkedResources:byte[] list) (ulLinkedResourceBaseRV let attempts = outputFilePaths |> List.map (fun path -> createCvtresArgs path) |> - List.filter (fun ((argstring:string),(_t:string),(_f:string list)) -> (cvtres.Length + argstring.Length) < MAX_PATH) + List.filter (fun ((argstring: string),(_t: string),(_f: string list)) -> (cvtres.Length + argstring.Length) < MAX_PATH) let invoc,tmp,files = match attempts with | [] -> createCvtresArgs ".\\" // hope for the best... @@ -649,7 +649,7 @@ let linkNativeResources (unlinkedResources:byte[] list) (ulLinkedResourceBaseRV for ulr in unlinkedResources do // REVIEW: What can go wrong here? What happens when the various file calls fail // dump the unlinked resource bytes into the temp file - System.IO.File.WriteAllBytes(tempResFileNames.[iFiles], ulr) ; + System.IO.File.WriteAllBytes(tempResFileNames.[iFiles], ulr) iFiles <- iFiles + 1 // call cvtres.exe using the full cmd line string we've generated @@ -660,9 +660,9 @@ let linkNativeResources (unlinkedResources:byte[] list) (ulLinkedResourceBaseRV // REVIEW: We really shouldn't be calling out to cvtres let mutable psi = System.Diagnostics.ProcessStartInfo(cvtres) - psi.Arguments <- cmdLineArgs ; + psi.Arguments <- cmdLineArgs psi.CreateNoWindow <- true ; // REVIEW: For some reason, this still creates a window unless WindowStyle is set to hidden - psi.WindowStyle <- System.Diagnostics.ProcessWindowStyle.Hidden ; + psi.WindowStyle <- System.Diagnostics.ProcessWindowStyle.Hidden let p = System.Diagnostics.Process.Start(psi) // Wait for the process to finish @@ -671,7 +671,7 @@ let linkNativeResources (unlinkedResources:byte[] list) (ulLinkedResourceBaseRV check "Process.Start" p.ExitCode // TODO: really need to check against 0 // Conversion was successful, so read the object file - objBytes <- FileSystem.ReadAllBytesShim(tempObjFileName) ; + objBytes <- FileSystem.ReadAllBytesShim(tempObjFileName) //Array.Copy(objBytes, pbUnlinkedResource, pbUnlinkedResource.Length) FileSystem.FileDelete(tempObjFileName) finally @@ -717,7 +717,7 @@ let linkNativeResources (unlinkedResources:byte[] list) (ulLinkedResourceBaseRV let IMAGE_SYM_CLASS_STATIC = 0x3uy let IMAGE_SYM_TYPE_NULL = 0x0s - let GetSymbolEntry (buffer : byte[]) (idx : int) = + let GetSymbolEntry (buffer: byte[]) (idx: int) = bytesToIS buffer (symbolTableHead + (idx * IMAGE_SYMBOL.Width) ) for iReloc = 0 to (int)(rsrc01.NumberOfRelocations - 1s) do @@ -746,7 +746,7 @@ let linkNativeResources (unlinkedResources:byte[] list) (ulLinkedResourceBaseRV // return the buffer pResBuffer -let unlinkResource (ulLinkedResourceBaseRVA:int32) (pbLinkedResource:byte[]) = +let unlinkResource (ulLinkedResourceBaseRVA: int32) (pbLinkedResource: byte[]) = let mutable nResNodes = 0 let pirdType = bytesToIRD pbLinkedResource 0 @@ -756,7 +756,7 @@ let unlinkResource (ulLinkedResourceBaseRVA:int32) (pbLinkedResource:byte[]) = // determine entry buffer size // TODO: coalesce these two loops for iEntry = 0 to ((int)nEntries - 1) do - pirdeType <- bytesToIRDE pbLinkedResource (IMAGE_RESOURCE_DIRECTORY.Width + (iEntry * IMAGE_RESOURCE_DIRECTORY_ENTRY.Width)) ; + pirdeType <- bytesToIRDE pbLinkedResource (IMAGE_RESOURCE_DIRECTORY.Width + (iEntry * IMAGE_RESOURCE_DIRECTORY_ENTRY.Width)) if pirdeType.DataIsDirectory then let nameBase = pirdeType.OffsetToDirectory @@ -765,25 +765,25 @@ let unlinkResource (ulLinkedResourceBaseRVA:int32) (pbLinkedResource:byte[]) = let nEntries2 = pirdName.NumberOfNamedEntries + pirdName.NumberOfIdEntries for iEntry2 = 0 to ((int)nEntries2 - 1) do - pirdeName <- bytesToIRDE pbLinkedResource (nameBase + (iEntry2 * IMAGE_RESOURCE_DIRECTORY_ENTRY.Width)) ; + pirdeName <- bytesToIRDE pbLinkedResource (nameBase + (iEntry2 * IMAGE_RESOURCE_DIRECTORY_ENTRY.Width)) if pirdeName.DataIsDirectory then let langBase = pirdeName.OffsetToDirectory let pirdLang = bytesToIRD pbLinkedResource langBase let nEntries3 = pirdLang.NumberOfNamedEntries + pirdLang.NumberOfIdEntries - nResNodes <- nResNodes + ((int)nEntries3) ; + nResNodes <- nResNodes + ((int)nEntries3) else - nResNodes <- nResNodes + 1 ; + nResNodes <- nResNodes + 1 else - nResNodes <- nResNodes + 1 ; + nResNodes <- nResNodes + 1 - let pResNodes : ResFormatNode [] = Array.zeroCreate nResNodes - nResNodes <- 0 ; + let pResNodes: ResFormatNode [] = Array.zeroCreate nResNodes + nResNodes <- 0 // fill out the entry buffer for iEntry = 0 to ((int)nEntries - 1) do - pirdeType <- bytesToIRDE pbLinkedResource (IMAGE_RESOURCE_DIRECTORY.Width + (iEntry * IMAGE_RESOURCE_DIRECTORY_ENTRY.Width)) ; + pirdeType <- bytesToIRDE pbLinkedResource (IMAGE_RESOURCE_DIRECTORY.Width + (iEntry * IMAGE_RESOURCE_DIRECTORY_ENTRY.Width)) let dwTypeID = pirdeType.Name // Need to skip VERSION and RT_MANIFEST resources // REVIEW: ideally we shouldn't allocate space for these, or rename properly so we don't get the naming conflict @@ -795,7 +795,7 @@ let unlinkResource (ulLinkedResourceBaseRVA:int32) (pbLinkedResource:byte[]) = let nEntries2 = pirdName.NumberOfNamedEntries + pirdName.NumberOfIdEntries for iEntry2 = 0 to ((int)nEntries2 - 1) do - pirdeName <- bytesToIRDE pbLinkedResource (nameBase + (iEntry2 * IMAGE_RESOURCE_DIRECTORY_ENTRY.Width)) ; + pirdeName <- bytesToIRDE pbLinkedResource (nameBase + (iEntry2 * IMAGE_RESOURCE_DIRECTORY_ENTRY.Width)) let dwNameID = pirdeName.Name if pirdeName.DataIsDirectory then @@ -805,7 +805,7 @@ let unlinkResource (ulLinkedResourceBaseRVA:int32) (pbLinkedResource:byte[]) = let nEntries3 = pirdLang.NumberOfNamedEntries + pirdLang.NumberOfIdEntries for iEntry3 = 0 to ((int)nEntries3 - 1) do - pirdeLang <- bytesToIRDE pbLinkedResource (langBase + (iEntry3 * IMAGE_RESOURCE_DIRECTORY_ENTRY.Width)) ; + pirdeLang <- bytesToIRDE pbLinkedResource (langBase + (iEntry3 * IMAGE_RESOURCE_DIRECTORY_ENTRY.Width)) let dwLangID = pirdeLang.Name if pirdeLang.DataIsDirectory then @@ -814,25 +814,25 @@ let unlinkResource (ulLinkedResourceBaseRVA:int32) (pbLinkedResource:byte[]) = else if (not skipResource) then let rfn = ResFormatNode(dwTypeID, dwNameID, dwLangID, pirdeLang.OffsetToData, pbLinkedResource) - pResNodes.[nResNodes] <- rfn ; - nResNodes <- nResNodes + 1 ; + pResNodes.[nResNodes] <- rfn + nResNodes <- nResNodes + 1 else if (not skipResource) then let rfn = ResFormatNode(dwTypeID, dwNameID, 0, pirdeName.OffsetToData, pbLinkedResource) - pResNodes.[nResNodes] <- rfn ; - nResNodes <- nResNodes + 1 ; + pResNodes.[nResNodes] <- rfn + nResNodes <- nResNodes + 1 else if (not skipResource) then let rfn = ResFormatNode(dwTypeID, 0, 0, pirdeType.OffsetToData, pbLinkedResource) // REVIEW: I believe these 0s are what's causing the duplicate res naming problems - pResNodes.[nResNodes] <- rfn ; - nResNodes <- nResNodes + 1 ; + pResNodes.[nResNodes] <- rfn + nResNodes <- nResNodes + 1 // Ok, all tree leaves are in ResFormatNode structs, and nResNodes ptrs are in pResNodes let mutable size = 0 if nResNodes <> 0 then size <- size + ResFormatHeader.Width ; // sizeof(ResFormatHeader) for i = 0 to (nResNodes - 1) do - size <- size + pResNodes.[i].Save(ulLinkedResourceBaseRVA, pbLinkedResource, Unchecked.defaultof, 0) ; + size <- size + pResNodes.[i].Save(ulLinkedResourceBaseRVA, pbLinkedResource, Unchecked.defaultof, 0) let pResBuffer = Bytes.zeroCreate size @@ -857,169 +857,169 @@ let unlinkResource (ulLinkedResourceBaseRVA:int32) (pbLinkedResource:byte[]) = [] [] type IMetaDataDispenser = - abstract DefineScope : unit -> unit // need this here to fill the first vtable slot - abstract OpenScope : [] szScope : string * [] dwOpenFlags:Int32 * [] riid : System.Guid byref * [] punk:Object byref -> unit + abstract DefineScope: unit -> unit // need this here to fill the first vtable slot + abstract OpenScope: [] szScope: string * [] dwOpenFlags: Int32 * [] riid: System.Guid byref * [] punk: Object byref -> unit [] [] [] type IMetadataImport = - abstract Placeholder : unit -> unit + abstract Placeholder: unit -> unit [] [] [] type IMetadataEmit = - abstract Placeholder : unit -> unit + abstract Placeholder: unit -> unit [] [< Guid("B01FAFEB-C450-3A4D-BEEC-B4CEEC01E006") ; InterfaceType(ComInterfaceType.InterfaceIsIUnknown) >] [< ComVisible(false) >] type ISymUnmanagedDocumentWriter = - abstract SetSource : sourceSize : int * [] source : byte[] -> unit - abstract SetCheckSum : algorithmId : System.Guid * checkSumSize : int * [] checkSum : byte [] -> unit + abstract SetSource: sourceSize: int * [] source: byte[] -> unit + abstract SetCheckSum: algorithmId: System.Guid * checkSumSize: int * [] checkSum: byte [] -> unit // Struct used to retrieve info on the debug output [] type ImageDebugDirectory = - val Characteristics : int32 - val TimeDateStamp : int32 - val MajorVersion : int16 - val MinorVersion : int16 - val Type : int32 - val SizeOfData : int32 - val AddressOfRawData : int32 - val PointerToRawData : int32 + val Characteristics: int32 + val TimeDateStamp: int32 + val MajorVersion: int16 + val MinorVersion: int16 + val Type: int32 + val SizeOfData: int32 + val AddressOfRawData: int32 + val PointerToRawData: int32 [] [] type ISymUnmanagedWriter2 = - abstract DefineDocument : [] url : string * - language : System.Guid byref * - languageVendor : System.Guid byref * - documentType : System.Guid byref * - [] RetVal : ISymUnmanagedDocumentWriter byref -> unit - abstract SetUserEntryPoint : entryMethod : uint32 -> unit - abstract OpenMethod : meth : int -> unit - abstract CloseMethod : unit -> unit - abstract OpenScope : startOffset : int * pRetVal : int byref -> unit - abstract CloseScope : endOffset : int -> unit - abstract SetScopeRange : scopeID : int * startOffset : int * endOffset : int -> unit - abstract DefineLocalVariable : [] varname : string * - attributes : int * - cSig : int * - []signature : byte[] * - addressKind : int * - addr1 : int * - addr2 : int * - addr3 : int * - startOffset : int * - endOffset : int -> unit - abstract DefineParameter : [] paramname : string * - attributes : int * - sequence : int * - addressKind : int * - addr1 : int * - addr2 : int * - addr3 : int -> unit - abstract DefineField : parent : int * - [] fieldname : string * - attributes : int * - cSig : int * - []signature : byte[] * - addressKind : int * - addr1 : int * - addr2 : int * - addr3 : int -> unit - abstract DefineGlobalVariable : [] globalvarname : string * - attributes : int * - cSig : int * - []signature : byte[] * - addressKind : int * - addr1 : int * - addr2 : int * - addr3 : int -> unit - abstract Close : unit -> unit - abstract SetSymAttribute : parent : int * - [] attname : string * - cData : int * - []data : byte[] -> unit - abstract OpenNamespace : [] nsname : string -> unit - abstract CloseNamespace : unit -> unit - abstract UsingNamespace : [] fullName : string -> unit - abstract SetMethodSourceRange : startDoc : ISymUnmanagedDocumentWriter * - startLine : int * - startColumn : int * - endDoc : ISymUnmanagedDocumentWriter * - endLine : int * - endColumn : int -> unit - abstract Initialize : emitter : nativeint * - [] filename : string * - stream : IStream * - fullBuild : bool -> unit - abstract GetDebugInfo : iDD : ImageDebugDirectory byref * - cData : int * - pcData : int byref * - []data : byte[] -> unit - abstract DefineSequencePoints : document : ISymUnmanagedDocumentWriter * - spCount : int * - []offsets : int [] * - []lines : int [] * - []columns : int [] * - []endLines : int [] * - []endColumns : int [] -> unit - abstract RemapToken : oldToken : int * newToken : int -> unit - abstract Initialize2 : emitter : nativeint * - [] tempfilename : string * - stream : IStream * - fullBuild : bool * - [] finalfilename : string -> unit - abstract DefineConstant : [] constname : string * - value : Object * - cSig : int * - []signature : byte[] -> unit - abstract Abort : unit -> unit - abstract DefineLocalVariable2 : [] localvarname2 : string * - attributes : int * - sigToken : int * - addressKind : int * - addr1 : int * - addr2 : int * - addr3 : int * - startOffset : int * - endOffset : int -> unit - abstract DefineGlobalVariable2 : [] globalvarname2 : string * - attributes : int * - sigToken : int * - addressKind : int * - addr1 : int * - addr2 : int * - addr3 : int -> unit - abstract DefineConstant2 : [] constantname2 : string * - value : Object * - sigToken : int -> unit - abstract OpenMethod2 : method2 : int * - isect : int * - offset : int -> unit - -type PdbWriter = { symWriter : ISymUnmanagedWriter2 } -type PdbDocumentWriter = { symDocWriter : ISymUnmanagedDocumentWriter } (* pointer to pDocumentWriter COM object *) + abstract DefineDocument: [] url: string * + language: System.Guid byref * + languageVendor: System.Guid byref * + documentType: System.Guid byref * + [] RetVal: ISymUnmanagedDocumentWriter byref -> unit + abstract SetUserEntryPoint: entryMethod: uint32 -> unit + abstract OpenMethod: meth: int -> unit + abstract CloseMethod: unit -> unit + abstract OpenScope: startOffset: int * pRetVal: int byref -> unit + abstract CloseScope: endOffset: int -> unit + abstract SetScopeRange: scopeID: int * startOffset: int * endOffset: int -> unit + abstract DefineLocalVariable: [] varname: string * + attributes: int * + cSig: int * + []signature: byte[] * + addressKind: int * + addr1: int * + addr2: int * + addr3: int * + startOffset: int * + endOffset: int -> unit + abstract DefineParameter: [] paramname: string * + attributes: int * + sequence: int * + addressKind: int * + addr1: int * + addr2: int * + addr3: int -> unit + abstract DefineField: parent: int * + [] fieldname: string * + attributes: int * + cSig: int * + []signature: byte[] * + addressKind: int * + addr1: int * + addr2: int * + addr3: int -> unit + abstract DefineGlobalVariable: [] globalvarname: string * + attributes: int * + cSig: int * + []signature: byte[] * + addressKind: int * + addr1: int * + addr2: int * + addr3: int -> unit + abstract Close: unit -> unit + abstract SetSymAttribute: parent: int * + [] attname: string * + cData: int * + []data: byte[] -> unit + abstract OpenNamespace: [] nsname: string -> unit + abstract CloseNamespace: unit -> unit + abstract UsingNamespace: [] fullName: string -> unit + abstract SetMethodSourceRange: startDoc: ISymUnmanagedDocumentWriter * + startLine: int * + startColumn: int * + endDoc: ISymUnmanagedDocumentWriter * + endLine: int * + endColumn: int -> unit + abstract Initialize: emitter: nativeint * + [] filename: string * + stream: IStream * + fullBuild: bool -> unit + abstract GetDebugInfo: iDD: ImageDebugDirectory byref * + cData: int * + pcData: int byref * + []data: byte[] -> unit + abstract DefineSequencePoints: document: ISymUnmanagedDocumentWriter * + spCount: int * + []offsets: int [] * + []lines: int [] * + []columns: int [] * + []endLines: int [] * + []endColumns: int [] -> unit + abstract RemapToken: oldToken: int * newToken: int -> unit + abstract Initialize2: emitter: nativeint * + [] tempfilename: string * + stream: IStream * + fullBuild: bool * + [] finalfilename: string -> unit + abstract DefineConstant: [] constname: string * + value: Object * + cSig: int * + []signature: byte[] -> unit + abstract Abort: unit -> unit + abstract DefineLocalVariable2: [] localvarname2: string * + attributes: int * + sigToken: int * + addressKind: int * + addr1: int * + addr2: int * + addr3: int * + startOffset: int * + endOffset: int -> unit + abstract DefineGlobalVariable2: [] globalvarname2: string * + attributes: int * + sigToken: int * + addressKind: int * + addr1: int * + addr2: int * + addr3: int -> unit + abstract DefineConstant2: [] constantname2: string * + value: Object * + sigToken: int -> unit + abstract OpenMethod2: method2: int * + isect: int * + offset: int -> unit + +type PdbWriter = { symWriter: ISymUnmanagedWriter2 } +type PdbDocumentWriter = { symDocWriter: ISymUnmanagedDocumentWriter } (* pointer to pDocumentWriter COM object *) type idd = - { iddCharacteristics: int32; + { iddCharacteristics: int32 iddMajorVersion: int32; (* actually u16 in IMAGE_DEBUG_DIRECTORY *) iddMinorVersion: int32; (* actually u16 in IMAGE_DEBUG_DIRECTORY *) - iddType: int32; - iddData: byte[];} + iddType: int32 + iddData: byte[] } #endif #if !FX_NO_PDB_WRITER -let pdbInitialize (binaryName:string) (pdbName:string) = +let pdbInitialize (binaryName: string) (pdbName: string) = // collect necessary COM types let CorMetaDataDispenser = System.Type.GetTypeFromProgID("CLRMetaData.CorMetaDataDispenser") // get the importer pointer let mdd = System.Activator.CreateInstance(CorMetaDataDispenser) :?> IMetaDataDispenser - let mutable IID_IMetaDataEmit = new Guid("BA3FEE4C-ECB9-4E41-83B7-183FA41CD859"); + let mutable IID_IMetaDataEmit = new Guid("BA3FEE4C-ECB9-4E41-83B7-183FA41CD859") let mutable o = Object() mdd.OpenScope(binaryName, 0x1, &IID_IMetaDataEmit, &o) // 0x1 = ofWrite let emitterPtr = Marshal.GetComInterfaceForObject(o, typeof) @@ -1036,15 +1036,15 @@ let pdbInitialize (binaryName:string) (pdbName:string) = { symWriter = writer } -[] +[] do() -let pdbCloseDocument(documentWriter : PdbDocumentWriter) = +let pdbCloseDocument(documentWriter: PdbDocumentWriter) = Marshal.ReleaseComObject (documentWriter.symDocWriter) |> ignore -[] -let pdbClose (writer:PdbWriter) dllFilename pdbFilename = +[] +let pdbClose (writer: PdbWriter) dllFilename pdbFilename = writer.symWriter.Close() // CorSymWriter objects (ISymUnmanagedWriter) lock the files they're operating // on (both the pdb and the binary). The locks are released only when their ref @@ -1073,7 +1073,7 @@ let pdbClose (writer:PdbWriter) dllFilename pdbFilename = System.GC.WaitForPendingFinalizers() attempts <- attempts + 1 -let pdbSetUserEntryPoint (writer:PdbWriter) (entryMethodToken:int32) = +let pdbSetUserEntryPoint (writer: PdbWriter) (entryMethodToken: int32) = writer.symWriter.SetUserEntryPoint((uint32)entryMethodToken) // Document checksum algorithms @@ -1084,7 +1084,7 @@ let hashSizeOfMD5 = 16 // If the FIPS algorithm policy is enabled on the computer (e.g., for US government employees and contractors) // then obtaining the MD5 implementation in BCL will throw. // In this case, catch the failure, and not set a checksum. -let internal setCheckSum (url:string, writer:ISymUnmanagedDocumentWriter) = +let internal setCheckSum (url: string, writer: ISymUnmanagedDocumentWriter) = try use file = FileSystem.FileStreamReadShim(url) use md5 = System.Security.Cryptography.MD5.Create() @@ -1093,7 +1093,7 @@ let internal setCheckSum (url:string, writer:ISymUnmanagedDocumentWriter) = writer.SetCheckSum (guidSourceHashMD5, hashSizeOfMD5, checkSum) with _ -> () -let pdbDefineDocument (writer:PdbWriter) (url:string) = +let pdbDefineDocument (writer: PdbWriter) (url: string) = //3F5162F8-07C6-11D3-9053-00C04FA302A1 //let mutable corSymLanguageTypeCSharp = System.Guid(0x3F5162F8u, 0x07C6us, 0x11D3us, 0x90uy, 0x53uy, 0x00uy, 0xC0uy, 0x4Fuy, 0xA3uy, 0x02uy, 0xA1uy) let mutable corSymLanguageTypeFSharp = System.Guid(0xAB4F38C9u, 0xB6E6us, 0x43baus, 0xBEuy, 0x3Buy, 0x58uy, 0x08uy, 0x0Buy, 0x2Cuy, 0xCCuy, 0xE3uy) @@ -1104,27 +1104,27 @@ let pdbDefineDocument (writer:PdbWriter) (url:string) = setCheckSum (url, docWriter) { symDocWriter = docWriter } -let pdbOpenMethod (writer:PdbWriter) (methodToken:int32) = +let pdbOpenMethod (writer: PdbWriter) (methodToken: int32) = writer.symWriter.OpenMethod(methodToken) -let pdbCloseMethod (writer:PdbWriter) = +let pdbCloseMethod (writer: PdbWriter) = writer.symWriter.CloseMethod() -let pdbOpenScope (writer:PdbWriter) (startOffset:int32) = +let pdbOpenScope (writer: PdbWriter) (startOffset: int32) = let mutable retInt = 0 writer.symWriter.OpenScope(startOffset, &retInt) check "action" (retInt) -let pdbCloseScope (writer:PdbWriter) (endOffset:int32) = +let pdbCloseScope (writer: PdbWriter) (endOffset: int32) = writer.symWriter.CloseScope(endOffset) -let pdbDefineLocalVariable (writer:PdbWriter) (name:string) (signature:byte[]) (addr1:int32) = +let pdbDefineLocalVariable (writer: PdbWriter) (name: string) (signature: byte[]) (addr1: int32) = writer.symWriter.DefineLocalVariable(name, 0, signature.Length, signature, (int)System.Diagnostics.SymbolStore.SymAddressKind.ILOffset, addr1, 0, 0, 0, 0) -let pdbSetMethodRange (writer:PdbWriter) (docWriter1: PdbDocumentWriter) (startLine:int) (startCol:int) (docWriter2: PdbDocumentWriter) (endLine:int) (endCol:int) = +let pdbSetMethodRange (writer: PdbWriter) (docWriter1: PdbDocumentWriter) (startLine: int) (startCol: int) (docWriter2: PdbDocumentWriter) (endLine: int) (endCol: int) = writer.symWriter.SetMethodSourceRange(docWriter1.symDocWriter, startLine, startCol, docWriter2.symDocWriter, endLine, endCol) -let pdbDefineSequencePoints (writer:PdbWriter) (docWriter: PdbDocumentWriter) (pts: (int * int * int * int * int) array) = +let pdbDefineSequencePoints (writer: PdbWriter) (docWriter: PdbDocumentWriter) (pts: (int * int * int * int * int)[]) = let offsets = (Array.map (fun (x,_,_,_,_) -> x) pts) let lines = (Array.map (fun (_,x,_,_,_) -> x) pts) let columns = (Array.map (fun (_,_,x,_,_) -> x) pts) @@ -1136,13 +1136,13 @@ let pdbWriteDebugInfo (writer: PdbWriter) = let mutable iDD = new ImageDebugDirectory() let mutable length = 0 writer.symWriter.GetDebugInfo(&iDD, 0, &length, null) - let mutable data : byte [] = Array.zeroCreate length + let mutable data: byte [] = Array.zeroCreate length writer.symWriter.GetDebugInfo(&iDD, length, &length, data) - { iddCharacteristics = iDD.Characteristics; - iddMajorVersion = (int32)iDD.MajorVersion; - iddMinorVersion = (int32)iDD.MinorVersion; - iddType = iDD.Type; + { iddCharacteristics = iDD.Characteristics + iddMajorVersion = (int32)iDD.MajorVersion + iddMinorVersion = (int32)iDD.MinorVersion + iddType = iDD.Type iddData = data} #endif @@ -1156,19 +1156,19 @@ type PdbVariable = { symVariable: ISymbolVariable } type PdbMethodScope = { symScope: ISymbolScope } type PdbSequencePoint = - { pdbSeqPointOffset: int; - pdbSeqPointDocument: PdbDocument; - pdbSeqPointLine: int; - pdbSeqPointColumn: int; - pdbSeqPointEndLine: int; - pdbSeqPointEndColumn: int; } - -let pdbReadOpen (moduleName:string) (path:string) : PdbReader = + { pdbSeqPointOffset: int + pdbSeqPointDocument: PdbDocument + pdbSeqPointLine: int + pdbSeqPointColumn: int + pdbSeqPointEndLine: int + pdbSeqPointEndColumn: int } + +let pdbReadOpen (moduleName: string) (path: string) : PdbReader = let CorMetaDataDispenser = System.Type.GetTypeFromProgID("CLRMetaData.CorMetaDataDispenser") - let mutable IID_IMetaDataImport = new Guid("7DAC8207-D3AE-4c75-9B67-92801A497D44"); + let mutable IID_IMetaDataImport = new Guid("7DAC8207-D3AE-4c75-9B67-92801A497D44") let mdd = System.Activator.CreateInstance(CorMetaDataDispenser) :?> IMetaDataDispenser - let mutable o : Object = new Object() - mdd.OpenScope(moduleName, 0, &IID_IMetaDataImport, &o) ; + let mutable o: Object = new Object() + mdd.OpenScope(moduleName, 0, &IID_IMetaDataImport, &o) let importerPtr = Marshal.GetComInterfaceForObject(o, typeof) try #if ENABLE_MONO_SUPPORT @@ -1193,44 +1193,44 @@ let pdbReadOpen (moduleName:string) (path:string) : PdbReader = // The symbol reader's finalize method will clean up any unmanaged resources. // If file locks persist, we may want to manually invoke finalize -let pdbReadClose (_reader:PdbReader) : unit = () +let pdbReadClose (_reader: PdbReader) : unit = () -let pdbReaderGetMethod (reader:PdbReader) (token:int32) : PdbMethod = +let pdbReaderGetMethod (reader: PdbReader) (token: int32) : PdbMethod = { symMethod = reader.symReader.GetMethod(System.Diagnostics.SymbolStore.SymbolToken(token)) } -let pdbReaderGetMethodFromDocumentPosition (reader:PdbReader) (document:PdbDocument) (line:int) (column:int) : PdbMethod = +let pdbReaderGetMethodFromDocumentPosition (reader: PdbReader) (document: PdbDocument) (line: int) (column: int) : PdbMethod = { symMethod = reader.symReader.GetMethodFromDocumentPosition(document.symDocument, line, column) } -let pdbReaderGetDocuments (reader:PdbReader) : PdbDocument array = +let pdbReaderGetDocuments (reader: PdbReader) : PdbDocument[] = let arr = reader.symReader.GetDocuments() Array.map (fun i -> { symDocument=i }) arr -let pdbReaderGetDocument (reader:PdbReader) (url:string) (language:byte[]) (languageVendor:byte[]) (documentType:byte[]) : PdbDocument = +let pdbReaderGetDocument (reader: PdbReader) (url: string) (language: byte[]) (languageVendor: byte[]) (documentType: byte[]) : PdbDocument = { symDocument = reader.symReader.GetDocument(url, System.Guid(language), System.Guid(languageVendor), System.Guid(documentType)) } -let pdbDocumentGetURL (document:PdbDocument) : string = +let pdbDocumentGetURL (document: PdbDocument) : string = document.symDocument.URL -let pdbDocumentGetType (document:PdbDocument) : byte[] (* guid *) = +let pdbDocumentGetType (document: PdbDocument) : byte[] (* guid *) = let guid = document.symDocument.DocumentType guid.ToByteArray() -let pdbDocumentGetLanguage (document:PdbDocument) : byte[] (* guid *) = +let pdbDocumentGetLanguage (document: PdbDocument) : byte[] (* guid *) = let guid = document.symDocument.Language guid.ToByteArray() -let pdbDocumentGetLanguageVendor (document:PdbDocument) : byte[] = +let pdbDocumentGetLanguageVendor (document: PdbDocument) : byte[] = let guid = document.symDocument.LanguageVendor guid.ToByteArray() -let pdbDocumentFindClosestLine (document:PdbDocument) (line:int) : int = +let pdbDocumentFindClosestLine (document: PdbDocument) (line: int) : int = document.symDocument.FindClosestLine(line) -let pdbMethodGetToken (meth:PdbMethod) : int32 = +let pdbMethodGetToken (meth: PdbMethod) : int32 = let token = meth.symMethod.Token token.GetToken() -let pdbMethodGetSequencePoints (meth:PdbMethod) : PdbSequencePoint array = +let pdbMethodGetSequencePoints (meth: PdbMethod) : PdbSequencePoint[] = let pSize = meth.symMethod.SequencePointCount let offsets = Array.zeroCreate pSize let docs = Array.zeroCreate pSize @@ -1242,32 +1242,32 @@ let pdbMethodGetSequencePoints (meth:PdbMethod) : PdbSequencePoint array = meth.symMethod.GetSequencePoints(offsets, docs, lines, cols, endLines, endColumns) Array.init pSize (fun i -> - { pdbSeqPointOffset = offsets.[i]; - pdbSeqPointDocument = { symDocument = docs.[i] }; - pdbSeqPointLine = lines.[i]; - pdbSeqPointColumn = cols.[i]; - pdbSeqPointEndLine = endLines.[i]; - pdbSeqPointEndColumn = endColumns.[i]; }) - -let pdbScopeGetChildren (scope:PdbMethodScope) : PdbMethodScope array = + { pdbSeqPointOffset = offsets.[i] + pdbSeqPointDocument = { symDocument = docs.[i] } + pdbSeqPointLine = lines.[i] + pdbSeqPointColumn = cols.[i] + pdbSeqPointEndLine = endLines.[i] + pdbSeqPointEndColumn = endColumns.[i] }) + +let pdbScopeGetChildren (scope: PdbMethodScope) : PdbMethodScope[] = let arr = scope.symScope.GetChildren() Array.map (fun i -> { symScope=i }) arr -let pdbScopeGetOffsets (scope:PdbMethodScope) : int * int = +let pdbScopeGetOffsets (scope: PdbMethodScope) : int * int = (scope.symScope.StartOffset, scope.symScope.EndOffset) -let pdbScopeGetLocals (scope:PdbMethodScope) : PdbVariable array = +let pdbScopeGetLocals (scope: PdbMethodScope) : PdbVariable[] = let arr = scope.symScope.GetLocals() Array.map (fun i -> { symVariable=i }) arr -let pdbVariableGetName (variable:PdbVariable) : string = +let pdbVariableGetName (variable: PdbVariable) : string = variable.symVariable.Name -let pdbVariableGetSignature (variable:PdbVariable) : byte[] = +let pdbVariableGetSignature (variable: PdbVariable) : byte[] = variable.symVariable.GetSignature() // The tuple is (AddressKind, AddressField1) -let pdbVariableGetAddressAttributes (variable:PdbVariable) : (int32 * int32) = +let pdbVariableGetAddressAttributes (variable: PdbVariable) : (int32 * int32) = (int32 variable.symVariable.AddressKind,variable.symVariable.AddressField1) #endif @@ -1283,23 +1283,23 @@ let signerOpenPublicKeyFile filePath = FileSystem.ReadAllBytesShim(filePath) let signerOpenKeyPairFile filePath = FileSystem.ReadAllBytesShim(filePath) -let signerGetPublicKeyForKeyPair (kp:keyPair) : pubkey = +let signerGetPublicKeyForKeyPair (kp: keyPair) : pubkey = let reply = (StrongNameSign.getPublicKeyForKeyPair kp) reply -let signerGetPublicKeyForKeyContainer (_kcName:keyContainerName) : pubkey = +let signerGetPublicKeyForKeyContainer (_kcName: keyContainerName) : pubkey = raise (NotImplementedException("signerGetPublicKeyForKeyContainer is not yet implemented")) -let signerCloseKeyContainer (_kc:keyContainerName) :unit = +let signerCloseKeyContainer (_kc: keyContainerName) : unit = raise (NotImplementedException("signerCloseKeyContainer is not yet implemented")) -let signerSignatureSize (pk:pubkey) : int = +let signerSignatureSize (pk: pubkey) : int = (StrongNameSign.signatureSize pk) -let signerSignFileWithKeyPair (fileName:string) (kp:keyPair) :unit = +let signerSignFileWithKeyPair (fileName: string) (kp: keyPair) : unit = (StrongNameSign.signFile fileName kp) -let signerSignFileWithKeyContainer (_fileName:string) (_kcName:keyContainerName) : unit = +let signerSignFileWithKeyContainer (_fileName: string) (_kcName: keyContainerName) : unit = raise (NotImplementedException("signerSignFileWithKeyContainer is not yet implemented")) #else @@ -1310,104 +1310,104 @@ type UnusedCOMMethod = unit -> unit [] type ICLRMetaHost = [] - abstract GetRuntime : - [] version : string * - [] interfaceId : System.Guid -> [] System.Object + abstract GetRuntime: + [] version: string * + [] interfaceId: System.Guid -> [] System.Object // Methods that we don't need are stubbed out for now... - abstract GetVersionFromFile : UnusedCOMMethod - abstract EnumerateInstalledRuntimes : UnusedCOMMethod - abstract EnumerateLoadedRuntimes : UnusedCOMMethod - abstract Reserved01 : UnusedCOMMethod + abstract GetVersionFromFile: UnusedCOMMethod + abstract EnumerateInstalledRuntimes: UnusedCOMMethod + abstract EnumerateLoadedRuntimes: UnusedCOMMethod + abstract Reserved01: UnusedCOMMethod // We don't currently support ComConversionLoss [] [] type ICLRStrongName = // Methods that we don't need are stubbed out for now... - abstract GetHashFromAssemblyFile : UnusedCOMMethod - abstract GetHashFromAssemblyFileW : UnusedCOMMethod - abstract GetHashFromBlob : UnusedCOMMethod - abstract GetHashFromFile : UnusedCOMMethod - abstract GetHashFromFileW : UnusedCOMMethod - abstract GetHashFromHandle : UnusedCOMMethod - abstract StrongNameCompareAssemblies : UnusedCOMMethod + abstract GetHashFromAssemblyFile: UnusedCOMMethod + abstract GetHashFromAssemblyFileW: UnusedCOMMethod + abstract GetHashFromBlob: UnusedCOMMethod + abstract GetHashFromFile: UnusedCOMMethod + abstract GetHashFromFileW: UnusedCOMMethod + abstract GetHashFromHandle: UnusedCOMMethod + abstract StrongNameCompareAssemblies: UnusedCOMMethod [] - abstract StrongNameFreeBuffer : [] pbMemory : nativeint -> unit + abstract StrongNameFreeBuffer: [] pbMemory: nativeint -> unit - abstract StrongNameGetBlob : UnusedCOMMethod - abstract StrongNameGetBlobFromImage : UnusedCOMMethod + abstract StrongNameGetBlob: UnusedCOMMethod + abstract StrongNameGetBlobFromImage: UnusedCOMMethod [] abstract StrongNameGetPublicKey : - [] pwzKeyContainer : string * - [] pbKeyBlob : byte[] * - [] cbKeyBlob : uint32 * - [] ppbPublicKeyBlob : nativeint byref * - [] pcbPublicKeyBlob : uint32 byref -> unit + [] pwzKeyContainer: string * + [] pbKeyBlob: byte[] * + [] cbKeyBlob: uint32 * + [] ppbPublicKeyBlob: nativeint byref * + [] pcbPublicKeyBlob: uint32 byref -> unit - abstract StrongNameHashSize : UnusedCOMMethod + abstract StrongNameHashSize: UnusedCOMMethod [] - abstract StrongNameKeyDelete : [] pwzKeyContainer : string -> unit + abstract StrongNameKeyDelete: [] pwzKeyContainer: string -> unit - abstract StrongNameKeyGen : UnusedCOMMethod - abstract StrongNameKeyGenEx : UnusedCOMMethod - abstract StrongNameKeyInstall : UnusedCOMMethod + abstract StrongNameKeyGen: UnusedCOMMethod + abstract StrongNameKeyGenEx: UnusedCOMMethod + abstract StrongNameKeyInstall: UnusedCOMMethod [] abstract StrongNameSignatureGeneration : - [] pwzFilePath : string * - [] pwzKeyContainer : string * - [] pbKeyBlob : byte [] * - [] cbKeyBlob : uint32 * - [] ppbSignatureBlob : nativeint * - [] pcbSignatureBlob : uint32 byref -> unit + [] pwzFilePath: string * + [] pwzKeyContainer: string * + [] pbKeyBlob: byte [] * + [] cbKeyBlob: uint32 * + [] ppbSignatureBlob: nativeint * + [] pcbSignatureBlob: uint32 byref -> unit - abstract StrongNameSignatureGenerationEx : UnusedCOMMethod + abstract StrongNameSignatureGenerationEx: UnusedCOMMethod [] abstract StrongNameSignatureSize : - [] pbPublicKeyBlob : byte[] * - [] cbPublicKeyBlob : uint32 * - [] pcbSize : uint32 byref -> unit + [] pbPublicKeyBlob: byte[] * + [] cbPublicKeyBlob: uint32 * + [] pcbSize: uint32 byref -> unit - abstract StrongNameSignatureVerification : UnusedCOMMethod + abstract StrongNameSignatureVerification: UnusedCOMMethod [] abstract StrongNameSignatureVerificationEx : - [] pwzFilePath : string * - [] fForceVerification : bool * - [] pfWasVerified : bool byref -> [] bool + [] pwzFilePath: string * + [] fForceVerification: bool * + [] pfWasVerified: bool byref -> [] bool - abstract StrongNameSignatureVerificationFromImage : UnusedCOMMethod - abstract StrongNameTokenFromAssembly : UnusedCOMMethod - abstract StrongNameTokenFromAssemblyEx : UnusedCOMMethod - abstract StrongNameTokenFromPublicKey : UnusedCOMMethod + abstract StrongNameSignatureVerificationFromImage: UnusedCOMMethod + abstract StrongNameTokenFromAssembly: UnusedCOMMethod + abstract StrongNameTokenFromAssemblyEx: UnusedCOMMethod + abstract StrongNameTokenFromPublicKey: UnusedCOMMethod [] [] type ICLRRuntimeInfo = // REVIEW: Methods that we don't need will be stubbed out for now... - abstract GetVersionString : unit -> unit - abstract GetRuntimeDirectory : unit -> unit - abstract IsLoaded : unit -> unit - abstract LoadErrorString : unit -> unit - abstract LoadLibrary : unit -> unit - abstract GetProcAddress : unit -> unit + abstract GetVersionString: unit -> unit + abstract GetRuntimeDirectory: unit -> unit + abstract IsLoaded: unit -> unit + abstract LoadErrorString: unit -> unit + abstract LoadLibrary: unit -> unit + abstract GetProcAddress: unit -> unit [] abstract GetInterface : - [] coClassId : System.Guid * - [] interfaceId : System.Guid -> []System.Object + [] coClassId: System.Guid * + [] interfaceId: System.Guid -> []System.Object [] [] let CreateInterface ( - ([] _clsidguid : System.Guid), - ([] _guid : System.Guid), + ([] _clsidguid: System.Guid), + ([] _guid: System.Guid), ([] _metaHost : ICLRMetaHost byref)) : unit = failwith "CreateInterface" @@ -1415,7 +1415,7 @@ let signerOpenPublicKeyFile filePath = FileSystem.ReadAllBytesShim(filePath) let signerOpenKeyPairFile filePath = FileSystem.ReadAllBytesShim(filePath) -let mutable iclrsn : ICLRStrongName option = None +let mutable iclrsn: ICLRStrongName option = None let getICLRStrongName () = match iclrsn with | None -> @@ -1445,11 +1445,11 @@ let signerGetPublicKeyForKeyPair kp = snt.InvokeMember("PublicKey", (BindingFlags.GetProperty ||| BindingFlags.Instance ||| BindingFlags.Public), null, sn, [| |], Globalization.CultureInfo.InvariantCulture) :?> byte[] else let mutable pSize = 0u - let mutable pBuffer : nativeint = (nativeint)0 + let mutable pBuffer: nativeint = (nativeint)0 let iclrSN = getICLRStrongName() iclrSN.StrongNameGetPublicKey(Unchecked.defaultof, kp, (uint32) kp.Length, &pBuffer, &pSize) |> ignore - let mutable keybuffer : byte [] = Bytes.zeroCreate ((int)pSize) + let mutable keybuffer: byte [] = Bytes.zeroCreate ((int)pSize) // Copy the marshalled data over - we'll have to free this ourselves Marshal.Copy(pBuffer, keybuffer, 0, (int)pSize) iclrSN.StrongNameFreeBuffer(pBuffer) |> ignore @@ -1457,10 +1457,10 @@ let signerGetPublicKeyForKeyPair kp = let signerGetPublicKeyForKeyContainer kc = let mutable pSize = 0u - let mutable pBuffer : nativeint = (nativeint)0 + let mutable pBuffer: nativeint = (nativeint)0 let iclrSN = getICLRStrongName() iclrSN.StrongNameGetPublicKey(kc, Unchecked.defaultof, 0u, &pBuffer, &pSize) |> ignore - let mutable keybuffer : byte [] = Bytes.zeroCreate ((int)pSize) + let mutable keybuffer: byte [] = Bytes.zeroCreate ((int)pSize) // Copy the marshalled data over - we'll have to free this ourselves later Marshal.Copy(pBuffer, keybuffer, 0, (int)pSize) iclrSN.StrongNameFreeBuffer(pBuffer) |> ignore @@ -1470,7 +1470,7 @@ let signerCloseKeyContainer kc = let iclrSN = getICLRStrongName() iclrSN.StrongNameKeyDelete(kc) |> ignore -let signerSignatureSize (pk:byte[]) = +let signerSignatureSize (pk: byte[]) = if IL.runningOnMono then if pk.Length > 32 then pk.Length - 32 else 128 else @@ -1483,7 +1483,7 @@ let signerSignFileWithKeyPair fileName kp = if IL.runningOnMono then let snt = System.Type.GetType("Mono.Security.StrongName") let sn = System.Activator.CreateInstance(snt, [| box kp |]) - let conv (x:obj) = if (unbox x : bool) then 0 else -1 + let conv (x: obj) = if (unbox x: bool) then 0 else -1 snt.InvokeMember("Sign", (BindingFlags.InvokeMethod ||| BindingFlags.Instance ||| BindingFlags.Public), null, sn, [| box fileName |], Globalization.CultureInfo.InvariantCulture) |> conv |> check "Sign" snt.InvokeMember("Verify", (BindingFlags.InvokeMethod ||| BindingFlags.Instance ||| BindingFlags.Public), null, sn, [| box fileName |], Globalization.CultureInfo.InvariantCulture) |> conv |> check "Verify" else diff --git a/src/fcs-fable/src/absil/ilwrite.fs b/src/fcs-fable/src/absil/ilwrite.fs index da7823ab92..3b00d55a9f 100755 --- a/src/fcs-fable/src/absil/ilwrite.fs +++ b/src/fcs-fable/src/absil/ilwrite.fs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. module internal FSharp.Compiler.AbstractIL.ILBinaryWriter @@ -34,10 +34,10 @@ let showEntryLookups = false //--------------------------------------------------------------------- // Little-endian encoding of int32 -let b0 n = byte (n &&& 0xFF) -let b1 n = byte ((n >>> 8) &&& 0xFF) -let b2 n = byte ((n >>> 16) &&& 0xFF) -let b3 n = byte ((n >>> 24) &&& 0xFF) +let b0 n = byte (n &&& 0xFF) +let b1 n = byte ((n >>> 8) &&& 0xFF) +let b2 n = byte ((n >>> 16) &&& 0xFF) +let b3 n = byte ((n >>> 24) &&& 0xFF) // Little-endian encoding of int64 let dw7 n = byte ((n >>> 56) &&& 0xFFL) @@ -46,11 +46,11 @@ let dw5 n = byte ((n >>> 40) &&& 0xFFL) let dw4 n = byte ((n >>> 32) &&& 0xFFL) let dw3 n = byte ((n >>> 24) &&& 0xFFL) let dw2 n = byte ((n >>> 16) &&& 0xFFL) -let dw1 n = byte ((n >>> 8) &&& 0xFFL) +let dw1 n = byte ((n >>> 8) &&& 0xFFL) let dw0 n = byte (n &&& 0xFFL) -let bitsOfSingle (x:float32) = System.BitConverter.ToInt32(System.BitConverter.GetBytes(x), 0) -let bitsOfDouble (x:float) = System.BitConverter.DoubleToInt64Bits(x) +let bitsOfSingle (x: float32) = System.BitConverter.ToInt32(System.BitConverter.GetBytes(x), 0) +let bitsOfDouble (x: float) = System.BitConverter.DoubleToInt64Bits(x) let emitBytesViaBuffer f = let bb = ByteBuffer.Create 10 in f bb; bb.Close() @@ -71,25 +71,31 @@ type ByteBuffer with /// Emit int32 as compressed unsigned integer member buf.EmitZ32 n = - if n >= 0 && n <= 0x7F then + if n >= 0 && n <= 0x7F then buf.EmitIntAsByte n elif n >= 0x80 && n <= 0x3FFF then buf.EmitIntAsByte (0x80 ||| (n >>> 8)) buf.EmitIntAsByte (n &&& 0xFF) else - buf.EmitIntAsByte (0xc0l ||| ((n >>> 24) &&& 0xFF)) - buf.EmitIntAsByte ( (n >>> 16) &&& 0xFF) - buf.EmitIntAsByte ( (n >>> 8) &&& 0xFF) - buf.EmitIntAsByte ( n &&& 0xFF) + buf.EmitIntAsByte (0xC0 ||| ((n >>> 24) &&& 0xFF)) + buf.EmitIntAsByte ((n >>> 16) &&& 0xFF) + buf.EmitIntAsByte ((n >>> 8) &&& 0xFF) + buf.EmitIntAsByte (n &&& 0xFF) member buf.EmitPadding n = for i = 0 to n-1 do buf.EmitByte 0x0uy // Emit compressed untagged integer - member buf.EmitZUntaggedIndex big idx = + member buf.EmitZUntaggedIndex nm sz big idx = if big then buf.EmitInt32 idx - elif idx > 0xffff then failwith "EmitZUntaggedIndex: too big for small address or simple index" + elif idx > 0xffff then +#if NETSTANDARD1_6 + let trace = "no stack trace on.NET Standard 1.6" +#else + let trace = (new System.Diagnostics.StackTrace()).ToString() +#endif + failwithf "EmitZUntaggedIndex: index into table '%d' is too big for small address or simple index, idx = %d, big = %A, size of table = %d, stack = %s" nm idx big sz trace else buf.EmitInt32AsUInt16 idx // Emit compressed tagged integer @@ -98,7 +104,7 @@ type ByteBuffer with if big then buf.EmitInt32 idx2 else buf.EmitInt32AsUInt16 idx2 -let getUncodedToken (tab:TableName) idx = ((tab.Index <<< 24) ||| idx) +let getUncodedToken (tab: TableName) idx = ((tab.Index <<< 24) ||| idx) // From ECMA for UserStrings: // This final byte holds the value 1 if and only if any UTF16 character within the string has any bit set in its top byte, or its low byte is any of the following: @@ -108,7 +114,7 @@ let getUncodedToken (tab:TableName) idx = ((tab.Index <<< 24) ||| idx) // HOWEVER, there is a discrepancy here between the ECMA spec and the Microsoft C# implementation. // The code below follows the latter. We've raised the issue with both teams. See Dev10 bug 850073 for details. -let markerForUnicodeBytes (b:byte[]) = +let markerForUnicodeBytes (b: byte[]) = let len = b.Length let rec scan i = i < len/2 && @@ -137,8 +143,8 @@ let checkFixup32 (data: byte[]) offset exp = if data.[offset + 1] <> b1 exp then failwith "fixup sanity check failed" if data.[offset] <> b0 exp then failwith "fixup sanity check failed" -let applyFixup32 (data:byte[]) offset v = - data.[offset] <- b0 v +let applyFixup32 (data: byte[]) offset v = + data.[offset] <- b0 v data.[offset+1] <- b1 v data.[offset+2] <- b2 v data.[offset+3] <- b3 v @@ -216,99 +222,99 @@ module RowElementTags = let [] Blob = 5 let [] String = 6 let [] SimpleIndexMin = 7 - let SimpleIndex (t : TableName) = assert (t.Index <= 112); SimpleIndexMin + t.Index + let SimpleIndex (t : TableName) = assert (t.Index <= 112); SimpleIndexMin + t.Index let [] SimpleIndexMax = 119 let [] TypeDefOrRefOrSpecMin = 120 - let TypeDefOrRefOrSpec (t: TypeDefOrRefTag) = assert (t.Tag <= 2); TypeDefOrRefOrSpecMin + t.Tag (* + 111 + 1 = 0x70 + 1 = max TableName.Tndex + 1 *) + let TypeDefOrRefOrSpec (t: TypeDefOrRefTag) = assert (t.Tag <= 2); TypeDefOrRefOrSpecMin + t.Tag (* + 111 + 1 = 0x70 + 1 = max TableName.Tndex + 1 *) let [] TypeDefOrRefOrSpecMax = 122 let [] TypeOrMethodDefMin = 123 - let TypeOrMethodDef (t: TypeOrMethodDefTag) = assert (t.Tag <= 1); TypeOrMethodDefMin + t.Tag (* + 2 + 1 = max TypeDefOrRefOrSpec.Tag + 1 *) + let TypeOrMethodDef (t: TypeOrMethodDefTag) = assert (t.Tag <= 1); TypeOrMethodDefMin + t.Tag (* + 2 + 1 = max TypeDefOrRefOrSpec.Tag + 1 *) let [] TypeOrMethodDefMax = 124 let [] HasConstantMin = 125 - let HasConstant (t: HasConstantTag) = assert (t.Tag <= 2); HasConstantMin + t.Tag (* + 1 + 1 = max TypeOrMethodDef.Tag + 1 *) + let HasConstant (t: HasConstantTag) = assert (t.Tag <= 2); HasConstantMin + t.Tag (* + 1 + 1 = max TypeOrMethodDef.Tag + 1 *) let [] HasConstantMax = 127 let [] HasCustomAttributeMin = 128 - let HasCustomAttribute (t: HasCustomAttributeTag) = assert (t.Tag <= 21); HasCustomAttributeMin + t.Tag (* + 2 + 1 = max HasConstant.Tag + 1 *) + let HasCustomAttribute (t: HasCustomAttributeTag) = assert (t.Tag <= 21); HasCustomAttributeMin + t.Tag (* + 2 + 1 = max HasConstant.Tag + 1 *) let [] HasCustomAttributeMax = 149 let [] HasFieldMarshalMin = 150 - let HasFieldMarshal (t: HasFieldMarshalTag) = assert (t.Tag <= 1); HasFieldMarshalMin + t.Tag (* + 21 + 1 = max HasCustomAttribute.Tag + 1 *) + let HasFieldMarshal (t: HasFieldMarshalTag) = assert (t.Tag <= 1); HasFieldMarshalMin + t.Tag (* + 21 + 1 = max HasCustomAttribute.Tag + 1 *) let [] HasFieldMarshalMax = 151 let [] HasDeclSecurityMin = 152 - let HasDeclSecurity (t: HasDeclSecurityTag) = assert (t.Tag <= 2); HasDeclSecurityMin + t.Tag (* + 1 + 1 = max HasFieldMarshal.Tag + 1 *) + let HasDeclSecurity (t: HasDeclSecurityTag) = assert (t.Tag <= 2); HasDeclSecurityMin + t.Tag (* + 1 + 1 = max HasFieldMarshal.Tag + 1 *) let [] HasDeclSecurityMax = 154 let [] MemberRefParentMin = 155 - let MemberRefParent (t: MemberRefParentTag) = assert (t.Tag <= 4); MemberRefParentMin + t.Tag (* + 2 + 1 = max HasDeclSecurity.Tag + 1 *) + let MemberRefParent (t: MemberRefParentTag) = assert (t.Tag <= 4); MemberRefParentMin + t.Tag (* + 2 + 1 = max HasDeclSecurity.Tag + 1 *) let [] MemberRefParentMax = 159 let [] HasSemanticsMin = 160 - let HasSemantics (t: HasSemanticsTag) = assert (t.Tag <= 1); HasSemanticsMin + t.Tag (* + 4 + 1 = max MemberRefParent.Tag + 1 *) + let HasSemantics (t: HasSemanticsTag) = assert (t.Tag <= 1); HasSemanticsMin + t.Tag (* + 4 + 1 = max MemberRefParent.Tag + 1 *) let [] HasSemanticsMax = 161 let [] MethodDefOrRefMin = 162 - let MethodDefOrRef (t: MethodDefOrRefTag) = assert (t.Tag <= 2); MethodDefOrRefMin + t.Tag (* + 1 + 1 = max HasSemantics.Tag + 1 *) + let MethodDefOrRef (t: MethodDefOrRefTag) = assert (t.Tag <= 2); MethodDefOrRefMin + t.Tag (* + 1 + 1 = max HasSemantics.Tag + 1 *) let [] MethodDefOrRefMax = 164 let [] MemberForwardedMin = 165 - let MemberForwarded (t: MemberForwardedTag) = assert (t.Tag <= 1); MemberForwardedMin + t.Tag (* + 2 + 1 = max MethodDefOrRef.Tag + 1 *) + let MemberForwarded (t: MemberForwardedTag) = assert (t.Tag <= 1); MemberForwardedMin + t.Tag (* + 2 + 1 = max MethodDefOrRef.Tag + 1 *) let [] MemberForwardedMax = 166 let [] ImplementationMin = 167 - let Implementation (t: ImplementationTag) = assert (t.Tag <= 2); ImplementationMin + t.Tag (* + 1 + 1 = max MemberForwarded.Tag + 1 *) + let Implementation (t: ImplementationTag) = assert (t.Tag <= 2); ImplementationMin + t.Tag (* + 1 + 1 = max MemberForwarded.Tag + 1 *) let [] ImplementationMax = 169 let [] CustomAttributeTypeMin = 170 - let CustomAttributeType (t: CustomAttributeTypeTag) = assert (t.Tag <= 3); CustomAttributeTypeMin + t.Tag (* + 2 + 1 = max Implementation.Tag + 1 *) + let CustomAttributeType (t: CustomAttributeTypeTag) = assert (t.Tag <= 3); CustomAttributeTypeMin + t.Tag (* + 2 + 1 = max Implementation.Tag + 1 *) let [] CustomAttributeTypeMax = 173 let [] ResolutionScopeMin = 174 - let ResolutionScope (t: ResolutionScopeTag) = assert (t.Tag <= 4); ResolutionScopeMin + t.Tag (* + 3 + 1 = max CustomAttributeType.Tag + 1 *) + let ResolutionScope (t: ResolutionScopeTag) = assert (t.Tag <= 4); ResolutionScopeMin + t.Tag (* + 3 + 1 = max CustomAttributeType.Tag + 1 *) let [] ResolutionScopeMax = 178 [] -type RowElement(tag:int32, idx: int32) = +type RowElement(tag: int32, idx: int32) = member x.Tag = tag member x.Val = idx // These create RowElements -let UShort (x:uint16) = RowElement(RowElementTags.UShort, int32 x) -let ULong (x:int32) = RowElement(RowElementTags.ULong, x) -/// Index into cenv.data or cenv.resources. Gets fixed up later once we known an overall -/// location for the data section. flag indicates if offset is relative to cenv.resources. -let Data (x:int, k:bool) = RowElement((if k then RowElementTags.DataResources else RowElementTags.Data ), x) +let UShort (x: uint16) = RowElement(RowElementTags.UShort, int32 x) +let ULong (x: int32) = RowElement(RowElementTags.ULong, x) +/// Index into cenv.data or cenv.resources. Gets fixed up later once we known an overall +/// location for the data section. flag indicates if offset is relative to cenv.resources. +let Data (x: int, k: bool) = RowElement((if k then RowElementTags.DataResources else RowElementTags.Data ), x) /// pos. in guid array -let Guid (x:int) = RowElement(RowElementTags.Guid, x) +let Guid (x: int) = RowElement(RowElementTags.Guid, x) /// pos. in blob array -let Blob (x:int) = RowElement(RowElementTags.Blob, x) +let Blob (x: int) = RowElement(RowElementTags.Blob, x) /// pos. in string array -let StringE (x:int) = RowElement(RowElementTags.String, x) +let StringE (x: int) = RowElement(RowElementTags.String, x) /// pos. in some table -let SimpleIndex (t, x:int) = RowElement(RowElementTags.SimpleIndex t, x) -let TypeDefOrRefOrSpec (t, x:int) = RowElement(RowElementTags.TypeDefOrRefOrSpec t, x) -let TypeOrMethodDef (t, x:int) = RowElement(RowElementTags.TypeOrMethodDef t, x) -let HasConstant (t, x:int) = RowElement(RowElementTags.HasConstant t, x) -let HasCustomAttribute (t, x:int) = RowElement(RowElementTags.HasCustomAttribute t, x) -let HasFieldMarshal (t, x:int) = RowElement(RowElementTags.HasFieldMarshal t, x) -let HasDeclSecurity (t, x:int) = RowElement(RowElementTags.HasDeclSecurity t, x) -let MemberRefParent (t, x:int) = RowElement(RowElementTags.MemberRefParent t, x) -let HasSemantics (t, x:int) = RowElement(RowElementTags.HasSemantics t, x) -let MethodDefOrRef (t, x:int) = RowElement(RowElementTags.MethodDefOrRef t, x) -let MemberForwarded (t, x:int) = RowElement(RowElementTags.MemberForwarded t, x) -let Implementation (t, x:int) = RowElement(RowElementTags.Implementation t, x) -let CustomAttributeType (t, x:int) = RowElement(RowElementTags.CustomAttributeType t, x) -let ResolutionScope (t, x:int) = RowElement(RowElementTags.ResolutionScope t, x) +let SimpleIndex (t, x: int) = RowElement(RowElementTags.SimpleIndex t, x) +let TypeDefOrRefOrSpec (t, x: int) = RowElement(RowElementTags.TypeDefOrRefOrSpec t, x) +let TypeOrMethodDef (t, x: int) = RowElement(RowElementTags.TypeOrMethodDef t, x) +let HasConstant (t, x: int) = RowElement(RowElementTags.HasConstant t, x) +let HasCustomAttribute (t, x: int) = RowElement(RowElementTags.HasCustomAttribute t, x) +let HasFieldMarshal (t, x: int) = RowElement(RowElementTags.HasFieldMarshal t, x) +let HasDeclSecurity (t, x: int) = RowElement(RowElementTags.HasDeclSecurity t, x) +let MemberRefParent (t, x: int) = RowElement(RowElementTags.MemberRefParent t, x) +let HasSemantics (t, x: int) = RowElement(RowElementTags.HasSemantics t, x) +let MethodDefOrRef (t, x: int) = RowElement(RowElementTags.MethodDefOrRef t, x) +let MemberForwarded (t, x: int) = RowElement(RowElementTags.MemberForwarded t, x) +let Implementation (t, x: int) = RowElement(RowElementTags.Implementation t, x) +let CustomAttributeType (t, x: int) = RowElement(RowElementTags.CustomAttributeType t, x) +let ResolutionScope (t, x: int) = RowElement(RowElementTags.ResolutionScope t, x) (* type RowElement = | UShort of uint16 | ULong of int32 - | Data of int * bool // Index into cenv.data or cenv.resources. Will be adjusted later in writing once we fix an overall location for the data section. flag indicates if offset is relative to cenv.resources. + | Data of int * bool // Index into cenv.data or cenv.resources. Will be adjusted later in writing once we fix an overall location for the data section. flag indicates if offset is relative to cenv.resources. | Guid of int // pos. in guid array | Blob of int // pos. in blob array | String of int // pos. in string array @@ -322,7 +328,7 @@ type RowElement = | MemberRefParent of MemberRefParentTag * int | HasSemantics of HasSemanticsTag * int | MethodDefOrRef of MethodDefOrRefTag * int - | MemberForwarded of MemberForwardedTag * int + | MemberForwarded of MemberForwardedTag * int | Implementation of ImplementationTag * int | CustomAttributeType of CustomAttributeTypeTag * int | ResolutionScope of ResolutionScopeTag * int @@ -331,19 +337,19 @@ type RowElement = type BlobIndex = int type StringIndex = int -let BlobIndex (x:BlobIndex) : int = x -let StringIndex (x:StringIndex) : int = x +let BlobIndex (x: BlobIndex) : int = x +let StringIndex (x: StringIndex) : int = x let inline combineHash x2 acc = 37 * acc + x2 // (acc <<< 6 + acc >>> 2 + x2 + 0x9e3779b9) -let hashRow (elems:RowElement[]) = +let hashRow (elems: RowElement[]) = let mutable acc = 0 for i in 0 .. elems.Length - 1 do acc <- (acc <<< 1) + elems.[i].Tag + elems.[i].Val + 631 acc -let equalRows (elems:RowElement[]) (elems2:RowElement[]) = - if elems.Length <> elems2.Length then false else +let equalRows (elems: RowElement[]) (elems2: RowElement[]) = + if elems.Length <> elems2.Length then false else let mutable ok = true let n = elems.Length let mutable i = 0 @@ -362,7 +368,7 @@ type GenericRow = RowElement[] type SharedRow(elems: RowElement[], hashCode: int) = member x.GenericRow = elems override x.GetHashCode() = hashCode - override x.Equals(obj:obj) = + override x.Equals(obj: obj) = match obj with | :? SharedRow as y -> equalRows elems y.GenericRow | _ -> false @@ -376,8 +382,8 @@ let AssemblyRefRow(s1, s2, s3, s4, l1, b1, nameIdx, str2, b2) = new SharedRow(genericRow, hashCode) /// Special representation the computes the hash more efficiently -let MemberRefRow(mrp:RowElement, nmIdx:StringIndex, blobIdx:BlobIndex) = - let hashCode = combineHash (hash blobIdx) (combineHash (hash nmIdx) (hash mrp)) +let MemberRefRow(mrp: RowElement, nmIdx: StringIndex, blobIdx: BlobIndex) = + let hashCode = combineHash (hash blobIdx) (combineHash (hash nmIdx) (hash mrp)) let genericRow = [| mrp; StringE nmIdx; Blob blobIdx |] new SharedRow(genericRow, hashCode) @@ -388,7 +394,7 @@ let MemberRefRow(mrp:RowElement, nmIdx:StringIndex, blobIdx:BlobIndex) = type UnsharedRow(elems: RowElement[]) = member x.GenericRow = elems override x.GetHashCode() = hashRow elems - override x.Equals(obj:obj) = + override x.Equals(obj: obj) = match obj with | :? UnsharedRow as y -> equalRows elems y.GenericRow | _ -> false @@ -403,11 +409,11 @@ type UnsharedRow(elems: RowElement[]) = // This environment keeps track of how many generic parameters are in scope. // This lets us translate AbsIL type variable number to IL type variable numbering type ILTypeWriterEnv = { EnclosingTyparCount: int } -let envForTypeDef (td:ILTypeDef) = { EnclosingTyparCount=td.GenericParams.Length } -let envForMethodRef env (ty:ILType) = { EnclosingTyparCount=(match ty with ILType.Array _ -> env.EnclosingTyparCount | _ -> ty.GenericArgs.Length) } -let envForNonGenericMethodRef _mref = { EnclosingTyparCount=System.Int32.MaxValue } -let envForFieldSpec (fspec:ILFieldSpec) = { EnclosingTyparCount=fspec.DeclaringType.GenericArgs.Length } -let envForOverrideSpec (ospec:ILOverridesSpec) = { EnclosingTyparCount=ospec.DeclaringType.GenericArgs.Length } +let envForTypeDef (td: ILTypeDef) = { EnclosingTyparCount=td.GenericParams.Length } +let envForMethodRef env (ty: ILType) = { EnclosingTyparCount=(match ty with ILType.Array _ -> env.EnclosingTyparCount | _ -> ty.GenericArgs.Length) } +let envForNonGenericMethodRef _mref = { EnclosingTyparCount=System.Int32.MaxValue } +let envForFieldSpec (fspec: ILFieldSpec) = { EnclosingTyparCount=fspec.DeclaringType.GenericArgs.Length } +let envForOverrideSpec (ospec: ILOverridesSpec) = { EnclosingTyparCount=ospec.DeclaringType.GenericArgs.Length } //--------------------------------------------------------------------- // TABLES @@ -420,7 +426,7 @@ type MetadataTable<'T> = #if DEBUG mutable lookups: int #endif - mutable rows: ResizeArray<'T> } + mutable rows: ResizeArray<'T> } member x.Count = x.rows.Count static member New(nm, hashEq) = @@ -486,7 +492,7 @@ type MetadataTable<'T> = //--------------------------------------------------------------------- /// We use this key type to help find ILMethodDefs for MethodRefs -type MethodDefKey(tidx:int, garity:int, nm:string, rty:ILType, argtys:ILTypes, isStatic:bool) = +type MethodDefKey(tidx: int, garity: int, nm: string, rty: ILType, argtys: ILTypes, isStatic: bool) = // Precompute the hash. The hash doesn't include the return type or // argument types (only argument type count). This is very important, since // hashing these is way too expensive @@ -503,7 +509,7 @@ type MethodDefKey(tidx:int, garity:int, nm:string, rty:ILType, argtys:ILTypes, i member key.ArgTypes = argtys member key.IsStatic = isStatic override x.GetHashCode() = hashCode - override x.Equals(obj:obj) = + override x.Equals(obj: obj) = match obj with | :? MethodDefKey as y -> tidx = y.TypeIdx && @@ -516,14 +522,14 @@ type MethodDefKey(tidx:int, garity:int, nm:string, rty:ILType, argtys:ILTypes, i | _ -> false /// We use this key type to help find ILFieldDefs for FieldRefs -type FieldDefKey(tidx:int, nm:string, ty:ILType) = +type FieldDefKey(tidx: int, nm: string, ty: ILType) = // precompute the hash. hash doesn't include the type let hashCode = hash tidx |> combineHash (hash nm) member key.TypeIdx = tidx member key.Name = nm member key.Type = ty override x.GetHashCode() = hashCode - override x.Equals(obj:obj) = + override x.Equals(obj: obj) = match obj with | :? FieldDefKey as y -> tidx = y.TypeIdx && @@ -559,7 +565,7 @@ type cenv = showTimes: bool desiredMetadataVersion: ILVersionInfo requiredDataFixups: (int32 * (int * bool)) list ref - /// References to strings in codestreams: offset of code and a (fixup-location , string token) list) + /// References to strings in codestreams: offset of code and a (fixup-location, string token) list) mutable requiredStringFixups: (int32 * (int * int) list) list codeChunks: ByteBuffer mutable nextCodeAddr: int32 @@ -582,8 +588,8 @@ type cenv = tables: MetadataTable[] AssemblyRefs: MetadataTable fieldDefs: MetadataTable - methodDefIdxsByKey: MetadataTable - methodDefIdxs: Dictionary + methodDefIdxsByKey: MetadataTable + methodDefIdxs: Dictionary propertyDefs: MetadataTable eventDefs: MetadataTable typeDefs: MetadataTable @@ -593,7 +599,7 @@ type cenv = userStrings: MetadataTable normalizeAssemblyRefs: ILAssemblyRef -> ILAssemblyRef } - member cenv.GetTable (tab:TableName) = cenv.tables.[tab.Index] + member cenv.GetTable (tab: TableName) = cenv.tables.[tab.Index] member cenv.AddCode ((reqdStringFixupsOffset, requiredStringFixups), code) = @@ -605,20 +611,20 @@ type cenv = member cenv.GetCode() = cenv.codeChunks.Close() -let FindOrAddSharedRow (cenv:cenv) tbl x = cenv.GetTable(tbl).FindOrAddSharedEntry x +let FindOrAddSharedRow (cenv: cenv) tbl x = cenv.GetTable(tbl).FindOrAddSharedEntry x // Shared rows must be hash-cons'd to be made unique (no duplicates according to contents) -let AddSharedRow (cenv:cenv) tbl x = cenv.GetTable(tbl).AddSharedEntry x +let AddSharedRow (cenv: cenv) tbl x = cenv.GetTable(tbl).AddSharedEntry x // Unshared rows correspond to definition elements (e.g. a ILTypeDef or a ILMethodDef) -let AddUnsharedRow (cenv:cenv) tbl (x:UnsharedRow) = cenv.GetTable(tbl).AddUnsharedEntry x +let AddUnsharedRow (cenv: cenv) tbl (x: UnsharedRow) = cenv.GetTable(tbl).AddUnsharedEntry x let metadataSchemaVersionSupportedByCLRVersion v = // Whidbey Beta 1 version numbers are between 2.0.40520.0 and 2.0.40607.0 // Later Whidbey versions are post 2.0.40607.0.. However we assume // internal builds such as 2.0.x86chk are Whidbey Beta 2 or later if compareILVersions v (parseILVersion ("2.0.40520.0")) >= 0 && - compareILVersions v (parseILVersion ("2.0.40608.0")) < 0 then 1, 1 + compareILVersions v (parseILVersion ("2.0.40608.0")) < 0 then 1, 1 elif compareILVersions v (parseILVersion ("2.0.0.0")) >= 0 then 2, 0 else 1, 0 @@ -626,7 +632,7 @@ let headerVersionSupportedByCLRVersion v = // The COM20HEADER version number // Whidbey version numbers are 2.5 // Earlier are 2.0 - // From an email from jeffschw: "Be built with a compiler that marks the COM20HEADER with Major >=2 and Minor >= 5. The V2.0 compilers produce images with 2.5, V1.x produces images with 2.0." + // From an email from jeffschw: "Be built with a compiler that marks the COM20HEADER with Major >=2 and Minor >= 5. The V2.0 compilers produce images with 2.5, V1.x produces images with 2.0." if compareILVersions v (parseILVersion ("2.0.0.0")) >= 0 then 2, 5 else 2, 0 @@ -648,7 +654,7 @@ type ILTokenMappings = EventTokenMap: ILTypeDef list * ILTypeDef -> ILEventDef -> int32 } let recordRequiredDataFixup requiredDataFixups (buf: ByteBuffer) pos lab = - requiredDataFixups := (pos, lab) :: !requiredDataFixups + requiredDataFixups := (pos, lab) :: !requiredDataFixups // Write a special value in that we check later when applying the fixup buf.EmitInt32 0xdeaddddd @@ -659,7 +665,7 @@ let recordRequiredDataFixup requiredDataFixups (buf: ByteBuffer) pos lab = let GetUserStringHeapIdx cenv s = cenv.userStrings.FindOrAddSharedEntry s -let GetBytesAsBlobIdx cenv (bytes:byte[]) = +let GetBytesAsBlobIdx cenv (bytes: byte[]) = if bytes.Length = 0 then 0 else cenv.blobs.FindOrAddSharedEntry bytes @@ -683,7 +689,7 @@ let GetTypeNameAsElemPair cenv n = // Pass 1 - allocate indexes for types //===================================================================== -let rec GenTypeDefPass1 enc cenv (td:ILTypeDef) = +let rec GenTypeDefPass1 enc cenv (td: ILTypeDef) = ignore (cenv.typeDefs.AddUniqueEntry "type index" (fun (TdKey (_, n)) -> n) (TdKey (enc, td.Name))) GenTypeDefsPass1 (enc@[td.Name]) cenv td.NestedTypes.AsList @@ -693,19 +699,19 @@ and GenTypeDefsPass1 enc cenv tds = List.iter (GenTypeDefPass1 enc cenv) tds // Pass 2 - allocate indexes for methods and fields and write rows for types //===================================================================== -let rec GetIdxForTypeDef cenv key = +let rec GetIdxForTypeDef cenv key = try cenv.typeDefs.GetTableEntry key with :? KeyNotFoundException -> let (TdKey (enc, n) ) = key - errorR(InternalError("One of your modules expects the type '"+String.concat "." (enc@[n])+"' to be defined within the module being emitted. You may be missing an input file", range0)) + errorR(InternalError("One of your modules expects the type '"+String.concat "." (enc@[n])+"' to be defined within the module being emitted. You may be missing an input file", range0)) 0 // -------------------------------------------------------------------- // Assembly and module references // -------------------------------------------------------------------- -let rec GetAssemblyRefAsRow cenv (aref:ILAssemblyRef) = +let rec GetAssemblyRefAsRow cenv (aref: ILAssemblyRef) = AssemblyRefRow ((match aref.Version with None -> 0us | Some (x, _, _, _) -> x), (match aref.Version with None -> 0us | Some (_, y, _, _) -> y), @@ -714,7 +720,7 @@ let rec GetAssemblyRefAsRow cenv (aref:ILAssemblyRef) = ((match aref.PublicKey with Some (PublicKey _) -> 0x0001 | _ -> 0x0000) ||| (if aref.Retargetable then 0x0100 else 0x0000)), BlobIndex (match aref.PublicKey with - | None -> 0 + | None -> 0 | Some (PublicKey b | PublicKeyToken b) -> GetBytesAsBlobIdx cenv b), StringIndex (GetStringHeapIdx cenv aref.Name), StringIndex (match aref.Locale with None -> 0 | Some s -> GetStringHeapIdx cenv s), @@ -723,15 +729,15 @@ let rec GetAssemblyRefAsRow cenv (aref:ILAssemblyRef) = and GetAssemblyRefAsIdx cenv aref = FindOrAddSharedRow cenv TableNames.AssemblyRef (GetAssemblyRefAsRow cenv (cenv.normalizeAssemblyRefs aref)) -and GetModuleRefAsRow cenv (mref:ILModuleRef) = +and GetModuleRefAsRow cenv (mref: ILModuleRef) = SharedRow [| StringE (GetStringHeapIdx cenv mref.Name) |] -and GetModuleRefAsFileRow cenv (mref:ILModuleRef) = +and GetModuleRefAsFileRow cenv (mref: ILModuleRef) = SharedRow - [| ULong (if mref.HasMetadata then 0x0000 else 0x0001) - StringE (GetStringHeapIdx cenv mref.Name) - (match mref.Hash with None -> Blob 0 | Some s -> Blob (GetBytesAsBlobIdx cenv s)) |] + [| ULong (if mref.HasMetadata then 0x0000 else 0x0001) + StringE (GetStringHeapIdx cenv mref.Name) + (match mref.Hash with None -> Blob 0 | Some s -> Blob (GetBytesAsBlobIdx cenv s)) |] and GetModuleRefAsIdx cenv mref = FindOrAddSharedRow cenv TableNames.ModuleRef (GetModuleRefAsRow cenv mref) @@ -744,8 +750,8 @@ and GetModuleRefAsFileIdx cenv mref = // -------------------------------------------------------------------- let isScopeRefLocal scoref = (scoref = ILScopeRef.Local) -let isTypeRefLocal (tref:ILTypeRef) = isScopeRefLocal tref.Scope -let isTypeLocal (ty:ILType) = ty.IsNominal && isNil ty.GenericArgs && isTypeRefLocal ty.TypeRef +let isTypeRefLocal (tref: ILTypeRef) = isScopeRefLocal tref.Scope +let isTypeLocal (ty: ILType) = ty.IsNominal && isNil ty.GenericArgs && isTypeRefLocal ty.TypeRef // -------------------------------------------------------------------- // Scopes to Implementation elements. @@ -753,7 +759,7 @@ let isTypeLocal (ty:ILType) = ty.IsNominal && isNil ty.GenericArgs && isTypeRefL let GetScopeRefAsImplementationElem cenv scoref = match scoref with - | ILScopeRef.Local -> (i_AssemblyRef, 0) + | ILScopeRef.Local -> (i_AssemblyRef, 0) | ILScopeRef.Assembly aref -> (i_AssemblyRef, GetAssemblyRefAsIdx cenv aref) | ILScopeRef.Module mref -> (i_File, GetModuleRefAsFileIdx cenv mref) @@ -761,7 +767,7 @@ let GetScopeRefAsImplementationElem cenv scoref = // Type references, types etc. // -------------------------------------------------------------------- -let rec GetTypeRefAsTypeRefRow cenv (tref:ILTypeRef) = +let rec GetTypeRefAsTypeRefRow cenv (tref: ILTypeRef) = let nselem, nelem = GetTypeNameAsElemPair cenv tref.Name let rs1, rs2 = GetResolutionScopeAsElem cenv (tref.Scope, tref.Enclosing) SharedRow [| ResolutionScope (rs1, rs2); nelem; nselem |] @@ -838,7 +844,7 @@ let callconvToByte ntypars (Callconv (hasthis, bcc)) = // REVIEW: write into an accumuating buffer -let rec EmitTypeSpec cenv env (bb: ByteBuffer) (et, tspec:ILTypeSpec) = +let rec EmitTypeSpec cenv env (bb: ByteBuffer) (et, tspec: ILTypeSpec) = if isNil tspec.GenericArgs then bb.EmitByte et emitTypeInfoAsTypeDefOrRefEncoded cenv bb (tspec.Scope, tspec.Enclosing, tspec.Name) @@ -849,7 +855,7 @@ let rec EmitTypeSpec cenv env (bb: ByteBuffer) (et, tspec:ILTypeSpec) = bb.EmitZ32 tspec.GenericArgs.Length EmitTypes cenv env bb tspec.GenericArgs -and GetTypeAsTypeDefOrRef cenv env (ty:ILType) = +and GetTypeAsTypeDefOrRef cenv env (ty: ILType) = if isTypeLocal ty then let tref = ty.TypeRef (tdor_TypeDef, GetIdxForTypeDef cenv (TdKey(tref.Enclosing, tref.Name))) @@ -861,12 +867,12 @@ and GetTypeAsTypeDefOrRef cenv env (ty:ILType) = and GetTypeAsBytes cenv env ty = emitBytesViaBuffer (fun bb -> EmitType cenv env bb ty) and GetTypeOfLocalAsBytes cenv env (l: ILLocal) = - emitBytesViaBuffer (fun bb -> EmitLocalInfo cenv env bb l) + emitBytesViaBuffer (fun bb -> EmitLocalInfo cenv env bb l) -and GetTypeAsBlobIdx cenv env (ty:ILType) = +and GetTypeAsBlobIdx cenv env (ty: ILType) = GetBytesAsBlobIdx cenv (GetTypeAsBytes cenv env ty) -and GetTypeAsTypeSpecRow cenv env (ty:ILType) = +and GetTypeAsTypeSpecRow cenv env (ty: ILType) = SharedRow [| Blob (GetTypeAsBlobIdx cenv env ty) |] and GetTypeAsTypeSpecIdx cenv env ty = @@ -875,39 +881,39 @@ and GetTypeAsTypeSpecIdx cenv env ty = and EmitType cenv env bb ty = match ty with // REVIEW: what are these doing here? - | ILType.Value tspec when tspec.Name = "System.String" -> bb.EmitByte et_STRING - | ILType.Value tspec when tspec.Name = "System.Object" -> bb.EmitByte et_OBJECT - | ty when isILSByteTy ty -> bb.EmitByte et_I1 - | ty when isILInt16Ty ty -> bb.EmitByte et_I2 - | ty when isILInt32Ty ty -> bb.EmitByte et_I4 - | ty when isILInt64Ty ty -> bb.EmitByte et_I8 - | ty when isILByteTy ty -> bb.EmitByte et_U1 - | ty when isILUInt16Ty ty -> bb.EmitByte et_U2 - | ty when isILUInt32Ty ty -> bb.EmitByte et_U4 - | ty when isILUInt64Ty ty -> bb.EmitByte et_U8 - | ty when isILDoubleTy ty -> bb.EmitByte et_R8 - | ty when isILSingleTy ty -> bb.EmitByte et_R4 - | ty when isILBoolTy ty -> bb.EmitByte et_BOOLEAN - | ty when isILCharTy ty -> bb.EmitByte et_CHAR - | ty when isILStringTy ty -> bb.EmitByte et_STRING - | ty when isILObjectTy ty -> bb.EmitByte et_OBJECT - | ty when isILIntPtrTy ty -> bb.EmitByte et_I - | ty when isILUIntPtrTy ty -> bb.EmitByte et_U - | ty when isILTypedReferenceTy ty -> bb.EmitByte et_TYPEDBYREF - - | ILType.Boxed tspec -> EmitTypeSpec cenv env bb (et_CLASS, tspec) - | ILType.Value tspec -> EmitTypeSpec cenv env bb (et_VALUETYPE, tspec) + | ILType.Value tspec when tspec.Name = "System.String" -> bb.EmitByte et_STRING + | ILType.Value tspec when tspec.Name = "System.Object" -> bb.EmitByte et_OBJECT + | ty when isILSByteTy ty -> bb.EmitByte et_I1 + | ty when isILInt16Ty ty -> bb.EmitByte et_I2 + | ty when isILInt32Ty ty -> bb.EmitByte et_I4 + | ty when isILInt64Ty ty -> bb.EmitByte et_I8 + | ty when isILByteTy ty -> bb.EmitByte et_U1 + | ty when isILUInt16Ty ty -> bb.EmitByte et_U2 + | ty when isILUInt32Ty ty -> bb.EmitByte et_U4 + | ty when isILUInt64Ty ty -> bb.EmitByte et_U8 + | ty when isILDoubleTy ty -> bb.EmitByte et_R8 + | ty when isILSingleTy ty -> bb.EmitByte et_R4 + | ty when isILBoolTy ty -> bb.EmitByte et_BOOLEAN + | ty when isILCharTy ty -> bb.EmitByte et_CHAR + | ty when isILStringTy ty -> bb.EmitByte et_STRING + | ty when isILObjectTy ty -> bb.EmitByte et_OBJECT + | ty when isILIntPtrTy ty -> bb.EmitByte et_I + | ty when isILUIntPtrTy ty -> bb.EmitByte et_U + | ty when isILTypedReferenceTy ty -> bb.EmitByte et_TYPEDBYREF + + | ILType.Boxed tspec -> EmitTypeSpec cenv env bb (et_CLASS, tspec) + | ILType.Value tspec -> EmitTypeSpec cenv env bb (et_VALUETYPE, tspec) | ILType.Array (shape, ty) -> if shape = ILArrayShape.SingleDimensional then (bb.EmitByte et_SZARRAY ; EmitType cenv env bb ty) else (bb.EmitByte et_ARRAY; EmitType cenv env bb ty; EmitArrayShape bb shape) | ILType.TypeVar tv -> let cgparams = env.EnclosingTyparCount - if int32 tv < cgparams then + if int32 tv < cgparams then bb.EmitByte et_VAR bb.EmitZ32 (int32 tv) else bb.EmitByte et_MVAR - bb.EmitZ32 (int32 tv - cgparams) + bb.EmitZ32 (int32 tv - cgparams) | ILType.Byref ty -> bb.EmitByte et_BYREF @@ -926,12 +932,12 @@ and EmitType cenv env bb ty = EmitType cenv env bb ty | _ -> failwith "EmitType" -and EmitLocalInfo cenv env (bb:ByteBuffer) (l:ILLocal) = +and EmitLocalInfo cenv env (bb: ByteBuffer) (l: ILLocal) = if l.IsPinned then bb.EmitByte et_PINNED EmitType cenv env bb l.Type -and EmitCallsig cenv env bb (callconv, args:ILTypes, ret, varargs:ILVarArgs, genarity) = +and EmitCallsig cenv env bb (callconv, args: ILTypes, ret, varargs: ILVarArgs, genarity) = bb.EmitByte (callconvToByte genarity callconv) if genarity > 0 then bb.EmitZ32 genarity bb.EmitZ32 ((args.Length + (match varargs with None -> 0 | Some l -> l.Length))) @@ -968,13 +974,13 @@ let rec GetVariantTypeAsInt32 ty = (List.assoc ty (Lazy.force ILVariantTypeMap )) else match ty with - | ILNativeVariant.Array vt -> vt_ARRAY ||| GetVariantTypeAsInt32 vt - | ILNativeVariant.Vector vt -> vt_VECTOR ||| GetVariantTypeAsInt32 vt - | ILNativeVariant.Byref vt -> vt_BYREF ||| GetVariantTypeAsInt32 vt + | ILNativeVariant.Array vt -> vt_ARRAY ||| GetVariantTypeAsInt32 vt + | ILNativeVariant.Vector vt -> vt_VECTOR ||| GetVariantTypeAsInt32 vt + | ILNativeVariant.Byref vt -> vt_BYREF ||| GetVariantTypeAsInt32 vt | _ -> failwith "Unexpected variant type" // based on information in ECMA and asmparse.y in the CLR codebase -let rec GetNativeTypeAsBlobIdx cenv (ty:ILNativeType) = +let rec GetNativeTypeAsBlobIdx cenv (ty: ILNativeType) = GetBytesAsBlobIdx cenv (GetNativeTypeAsBytes ty) and GetNativeTypeAsBytes ty = emitBytesViaBuffer (fun bb -> EmitNativeType bb ty) @@ -1010,8 +1016,8 @@ and EmitNativeType bb ty = | None -> () | Some n -> let u1 = Bytes.stringAsUtf8NullTerminated n - bb.EmitZ32 (Array.length u1) ; bb.EmitBytes u1 - | ILNativeType.Array (nt, sizeinfo) -> (* REVIEW: check if this corresponds to the ECMA spec *) + bb.EmitZ32 (Array.length u1) ; bb.EmitBytes u1 + | ILNativeType.Array (nt, sizeinfo) -> (* REVIEW: check if this corresponds to the ECMA spec *) bb.EmitByte nt_ARRAY match nt with | None -> bb.EmitZ32 (int nt_MAX) @@ -1027,24 +1033,24 @@ and EmitNativeType bb ty = bb.EmitZ32 pnum (* ElemMul *) (* z_u32 0x1l *) match additive with - | None -> () - | Some n -> (* NumElem *) bb.EmitZ32 n + | None -> () + | Some n -> (* NumElem *) bb.EmitZ32 n | _ -> failwith "Unexpected native type" // -------------------------------------------------------------------- // Native types // -------------------------------------------------------------------- -let rec GetFieldInitAsBlobIdx cenv (x:ILFieldInit) = +let rec GetFieldInitAsBlobIdx cenv (x: ILFieldInit) = GetBytesAsBlobIdx cenv (emitBytesViaBuffer (fun bb -> GetFieldInit bb x)) // REVIEW: write into an accumuating buffer and GetFieldInit (bb: ByteBuffer) x = match x with | ILFieldInit.String b -> bb.EmitBytes (System.Text.Encoding.Unicode.GetBytes b) - | ILFieldInit.Bool b -> bb.EmitByte (if b then 0x01uy else 0x00uy) + | ILFieldInit.Bool b -> bb.EmitByte (if b then 0x01uy else 0x00uy) | ILFieldInit.Char x -> bb.EmitUInt16 x - | ILFieldInit.Int8 x -> bb.EmitByte (byte x) + | ILFieldInit.Int8 x -> bb.EmitByte (byte x) | ILFieldInit.Int16 x -> bb.EmitUInt16 (uint16 x) | ILFieldInit.Int32 x -> bb.EmitInt32 x | ILFieldInit.Int64 x -> bb.EmitInt64 x @@ -1054,7 +1060,7 @@ and GetFieldInit (bb: ByteBuffer) x = | ILFieldInit.UInt64 x -> bb.EmitInt64 (int64 x) | ILFieldInit.Single x -> bb.EmitInt32 (bitsOfSingle x) | ILFieldInit.Double x -> bb.EmitInt64 (bitsOfDouble x) - | ILFieldInit.Null -> bb.EmitInt32 0 + | ILFieldInit.Null -> bb.EmitInt32 0 and GetFieldInitFlags i = UShort @@ -1082,26 +1088,26 @@ and GetFieldInitFlags i = let GetMemberAccessFlags access = match access with | ILMemberAccess.Public -> 0x00000006 - | ILMemberAccess.Private -> 0x00000001 - | ILMemberAccess.Family -> 0x00000004 + | ILMemberAccess.Private -> 0x00000001 + | ILMemberAccess.Family -> 0x00000004 | ILMemberAccess.CompilerControlled -> 0x00000000 | ILMemberAccess.FamilyAndAssembly -> 0x00000002 | ILMemberAccess.FamilyOrAssembly -> 0x00000005 | ILMemberAccess.Assembly -> 0x00000003 -let GetTypeAccessFlags access = +let GetTypeAccessFlags access = match access with | ILTypeDefAccess.Public -> 0x00000001 - | ILTypeDefAccess.Private -> 0x00000000 + | ILTypeDefAccess.Private -> 0x00000000 | ILTypeDefAccess.Nested ILMemberAccess.Public -> 0x00000002 - | ILTypeDefAccess.Nested ILMemberAccess.Private -> 0x00000003 - | ILTypeDefAccess.Nested ILMemberAccess.Family -> 0x00000004 + | ILTypeDefAccess.Nested ILMemberAccess.Private -> 0x00000003 + | ILTypeDefAccess.Nested ILMemberAccess.Family -> 0x00000004 | ILTypeDefAccess.Nested ILMemberAccess.CompilerControlled -> failwith "bad type acccess" | ILTypeDefAccess.Nested ILMemberAccess.FamilyAndAssembly -> 0x00000006 | ILTypeDefAccess.Nested ILMemberAccess.FamilyOrAssembly -> 0x00000007 | ILTypeDefAccess.Nested ILMemberAccess.Assembly -> 0x00000005 -let rec GetTypeDefAsRow cenv env _enc (td:ILTypeDef) = +let rec GetTypeDefAsRow cenv env _enc (td: ILTypeDef) = let nselem, nelem = GetTypeNameAsElemPair cenv td.Name let flags = if (isTypeNameForGlobalFunctions td.Name) then 0x00000000 @@ -1124,19 +1130,19 @@ and GetTypeOptionAsTypeDefOrRef cenv env tyOpt = and GetTypeDefAsPropertyMapRow cenv tidx = UnsharedRow - [| SimpleIndex (TableNames.TypeDef, tidx) + [| SimpleIndex (TableNames.TypeDef, tidx) SimpleIndex (TableNames.Property, cenv.propertyDefs.Count + 1) |] and GetTypeDefAsEventMapRow cenv tidx = UnsharedRow - [| SimpleIndex (TableNames.TypeDef, tidx) + [| SimpleIndex (TableNames.TypeDef, tidx) SimpleIndex (TableNames.Event, cenv.eventDefs.Count + 1) |] and GetKeyForFieldDef tidx (fd: ILFieldDef) = FieldDefKey (tidx, fd.Name, fd.FieldType) and GenFieldDefPass2 cenv tidx fd = - ignore (cenv.fieldDefs.AddUniqueEntry "field" (fun (fdkey:FieldDefKey) -> fdkey.Name) (GetKeyForFieldDef tidx fd)) + ignore (cenv.fieldDefs.AddUniqueEntry "field" (fun (fdkey: FieldDefKey) -> fdkey.Name) (GetKeyForFieldDef tidx fd)) and GetKeyForMethodDef tidx (md: ILMethodDef) = MethodDefKey (tidx, md.GenericParams.Length, md.Name, md.Return.Type, md.ParameterTypes, md.CallingConv.IsStatic) @@ -1145,18 +1151,18 @@ and GenMethodDefPass2 cenv tidx md = let idx = cenv.methodDefIdxsByKey.AddUniqueEntry "method" - (fun (key:MethodDefKey) -> + (fun (key: MethodDefKey) -> dprintn "Duplicate in method table is:" - dprintn (" Type index: "+string key.TypeIdx) - dprintn (" Method name: "+key.Name) - dprintn (" Method arity (num generic params): "+string key.GenericArity) + dprintn (" Type index: "+string key.TypeIdx) + dprintn (" Method name: "+key.Name) + dprintn (" Method arity (num generic params): "+string key.GenericArity) key.Name ) (GetKeyForMethodDef tidx md) cenv.methodDefIdxs.[md] <- idx -and GetKeyForPropertyDef tidx (x: ILPropertyDef) = +and GetKeyForPropertyDef tidx (x: ILPropertyDef) = PropKey (tidx, x.Name, x.PropertyType, x.Args) and GenPropertyDefPass2 cenv tidx x = @@ -1177,7 +1183,7 @@ and GetKeyForEvent tidx (x: ILEventDef) = and GenEventDefPass2 cenv tidx x = ignore (cenv.eventDefs.AddUniqueEntry "event" (fun (EventKey(_, b)) -> b) (GetKeyForEvent tidx x)) -and GenTypeDefPass2 pidx enc cenv (td:ILTypeDef) = +and GenTypeDefPass2 pidx enc cenv (td: ILTypeDef) = try let env = envForTypeDef td let tidx = GetIdxForTypeDef cenv (TdKey(enc, td.Name)) @@ -1224,14 +1230,14 @@ let FindMethodDefIdx cenv mdkey = let typeNameOfIdx i = match (cenv.typeDefs.dict - |> Seq.fold (fun sofar kvp -> + |> Seq.fold (fun sofar kvp -> let tkey2 = kvp.Key let tidx2 = kvp.Value if i = tidx2 then if sofar = None then Some tkey2 else failwith "multiple type names map to index" - else sofar) None) with + else sofar) None) with | Some x -> x | None -> raise MethodDefNotFound let (TdKey (tenc, tname)) = typeNameOfIdx mdkey.TypeIdx @@ -1265,7 +1271,7 @@ and GetFieldDefAsFieldDefIdx cenv tidx fd = // methods in the module being emitted. // -------------------------------------------------------------------- -let GetMethodRefAsMethodDefIdx cenv (mref:ILMethodRef) = +let GetMethodRefAsMethodDefIdx cenv (mref: ILMethodRef) = let tref = mref.DeclaringTypeRef try if not (isTypeRefLocal tref) then @@ -1274,7 +1280,7 @@ let GetMethodRefAsMethodDefIdx cenv (mref:ILMethodRef) = let mdkey = MethodDefKey (tidx, mref.GenericArity, mref.Name, mref.ReturnType, mref.ArgTypes, mref.CallingConv.IsStatic) FindMethodDefIdx cenv mdkey with e -> - failwithf "Error in GetMethodRefAsMethodDefIdx for mref = %A, error: %s" (mref.Name, tref.Name) e.Message + failwithf "Error in GetMethodRefAsMethodDefIdx for mref = %A, error: %s" (mref.Name, tref.Name) e.Message let rec MethodRefInfoAsMemberRefRow cenv env fenv (nm, ty, callconv, args, ret, varargs, genarity) = MemberRefRow(GetTypeAsMemberRefParent cenv env ty, @@ -1284,11 +1290,11 @@ let rec MethodRefInfoAsMemberRefRow cenv env fenv (nm, ty, callconv, args, ret, and GetMethodRefInfoAsBlobIdx cenv env info = GetBytesAsBlobIdx cenv (GetCallsigAsBytes cenv env info) -let GetMethodRefInfoAsMemberRefIdx cenv env ((_, ty, _, _, _, _, _) as minfo) = +let GetMethodRefInfoAsMemberRefIdx cenv env ((_, ty, _, _, _, _, _) as minfo) = let fenv = envForMethodRef env ty - FindOrAddSharedRow cenv TableNames.MemberRef (MethodRefInfoAsMemberRefRow cenv env fenv minfo) + FindOrAddSharedRow cenv TableNames.MemberRef (MethodRefInfoAsMemberRefRow cenv env fenv minfo) -let GetMethodRefInfoAsMethodRefOrDef isAlwaysMethodDef cenv env ((nm, ty:ILType, cc, args, ret, varargs, genarity) as minfo) = +let GetMethodRefInfoAsMethodRefOrDef isAlwaysMethodDef cenv env ((nm, ty: ILType, cc, args, ret, varargs, genarity) as minfo) = if Option.isNone varargs && (isAlwaysMethodDef || isTypeLocal ty) then if not ty.IsNominal then failwith "GetMethodRefInfoAsMethodRefOrDef: unexpected local tref-ty" try (mdor_MethodDef, GetMethodRefAsMethodDefIdx cenv (mkILMethRef (ty.TypeRef, cc, nm, genarity, args, ret))) @@ -1300,7 +1306,7 @@ let GetMethodRefInfoAsMethodRefOrDef isAlwaysMethodDef cenv env ((nm, ty:ILType, // ILMethodSpec --> ILMethodRef/ILMethodDef/ILMethodSpec // -------------------------------------------------------------------- -let rec GetMethodSpecInfoAsMethodSpecIdx cenv env (nm, ty, cc, args, ret, varargs, minst:ILGenericArgs) = +let rec GetMethodSpecInfoAsMethodSpecIdx cenv env (nm, ty, cc, args, ret, varargs, minst: ILGenericArgs) = let mdorTag, mdorRow = GetMethodRefInfoAsMethodRefOrDef false cenv env (nm, ty, cc, args, ret, varargs, minst.Length) let blob = emitBytesViaBuffer (fun bb -> @@ -1319,7 +1325,7 @@ and GetMethodDefOrRefAsUncodedToken (tag, idx) = else failwith "GetMethodDefOrRefAsUncodedToken" getUncodedToken tab idx -and GetMethodSpecInfoAsUncodedToken cenv env ((_, _, _, _, _, _, minst:ILGenericArgs) as minfo) = +and GetMethodSpecInfoAsUncodedToken cenv env ((_, _, _, _, _, _, minst: ILGenericArgs) as minfo) = if List.isEmpty minst then GetMethodDefOrRefAsUncodedToken (GetMethodRefInfoAsMethodRefOrDef false cenv env (GetMethodRefInfoOfMethodSpecInfo minfo)) else @@ -1328,7 +1334,7 @@ and GetMethodSpecInfoAsUncodedToken cenv env ((_, _, _, _, _, _, minst:ILGeneric and GetMethodSpecAsUncodedToken cenv env mspec = GetMethodSpecInfoAsUncodedToken cenv env (InfoOfMethodSpec mspec) -and GetMethodRefInfoOfMethodSpecInfo (nm, ty, cc, args, ret, varargs, minst:ILGenericArgs) = +and GetMethodRefInfoOfMethodSpecInfo (nm, ty, cc, args, ret, varargs, minst: ILGenericArgs) = (nm, ty, cc, args, ret, varargs, minst.Length) and GetMethodSpecAsMethodDefOrRef cenv env (mspec, varargs) = @@ -1337,7 +1343,7 @@ and GetMethodSpecAsMethodDefOrRef cenv env (mspec, varargs) = and GetMethodSpecAsMethodDef cenv env (mspec, varargs) = GetMethodRefInfoAsMethodRefOrDef true cenv env (GetMethodRefInfoOfMethodSpecInfo (InfoOfMethodSpec (mspec, varargs))) -and InfoOfMethodSpec (mspec:ILMethodSpec, varargs) = +and InfoOfMethodSpec (mspec: ILMethodSpec, varargs) = (mspec.Name, mspec.DeclaringType, mspec.CallingConv, @@ -1354,15 +1360,15 @@ and InfoOfMethodSpec (mspec:ILMethodSpec, varargs) = let rec GetOverridesSpecAsMemberRefIdx cenv env ospec = let fenv = envForOverrideSpec ospec - let row = MethodRefInfoAsMemberRefRow cenv env fenv (ospec.MethodRef.Name, ospec.DeclaringType, ospec.MethodRef.CallingConv, ospec.MethodRef.ArgTypes, ospec.MethodRef.ReturnType, None, ospec.MethodRef.GenericArity) - FindOrAddSharedRow cenv TableNames.MemberRef row + let row = MethodRefInfoAsMemberRefRow cenv env fenv (ospec.MethodRef.Name, ospec.DeclaringType, ospec.MethodRef.CallingConv, ospec.MethodRef.ArgTypes, ospec.MethodRef.ReturnType, None, ospec.MethodRef.GenericArity) + FindOrAddSharedRow cenv TableNames.MemberRef row -and GetOverridesSpecAsMethodDefOrRef cenv env (ospec:ILOverridesSpec) = +and GetOverridesSpecAsMethodDefOrRef cenv env (ospec: ILOverridesSpec) = let ty = ospec.DeclaringType if isTypeLocal ty then if not ty.IsNominal then failwith "GetOverridesSpecAsMethodDefOrRef: unexpected local tref-ty" try (mdor_MethodDef, GetMethodRefAsMethodDefIdx cenv ospec.MethodRef) - with MethodDefNotFound -> (mdor_MemberRef, GetOverridesSpecAsMemberRefIdx cenv env ospec) + with MethodDefNotFound -> (mdor_MemberRef, GetOverridesSpecAsMemberRefIdx cenv env ospec) else (mdor_MemberRef, GetOverridesSpecAsMemberRefIdx cenv env ospec) @@ -1372,11 +1378,11 @@ and GetOverridesSpecAsMethodDefOrRef cenv env (ospec:ILOverridesSpec) = // Used for Custom Attrs. // -------------------------------------------------------------------- -let rec GetMethodRefAsMemberRefIdx cenv env fenv (mref:ILMethodRef) = +let rec GetMethodRefAsMemberRefIdx cenv env fenv (mref: ILMethodRef) = let row = MethodRefInfoAsMemberRefRow cenv env fenv (mref.Name, mkILNonGenericBoxedTy mref.DeclaringTypeRef, mref.CallingConv, mref.ArgTypes, mref.ReturnType, None, mref.GenericArity) FindOrAddSharedRow cenv TableNames.MemberRef row -and GetMethodRefAsCustomAttribType cenv (mref:ILMethodRef) = +and GetMethodRefAsCustomAttribType cenv (mref: ILMethodRef) = let fenv = envForNonGenericMethodRef mref let tref = mref.DeclaringTypeRef if isTypeRefLocal tref then @@ -1389,7 +1395,7 @@ and GetMethodRefAsCustomAttribType cenv (mref:ILMethodRef) = // ILAttributes --> CustomAttribute rows // -------------------------------------------------------------------- -let rec GetCustomAttrDataAsBlobIdx cenv (data:byte[]) = +let rec GetCustomAttrDataAsBlobIdx cenv (data: byte[]) = if data.Length = 0 then 0 else GetBytesAsBlobIdx cenv data and GetCustomAttrRow cenv hca (attr: ILAttribute) = @@ -1398,12 +1404,12 @@ and GetCustomAttrRow cenv hca (attr: ILAttribute) = for element in attr.Elements do match element with | ILAttribElem.Type (Some ty) when ty.IsNominal -> GetTypeRefAsTypeRefIdx cenv ty.TypeRef |> ignore - | ILAttribElem.TypeRef (Some tref) -> GetTypeRefAsTypeRefIdx cenv tref |> ignore + | ILAttribElem.TypeRef (Some tref) -> GetTypeRefAsTypeRefIdx cenv tref |> ignore | _ -> () UnsharedRow - [| HasCustomAttribute (fst hca, snd hca); - CustomAttributeType (fst cat, snd cat); + [| HasCustomAttribute (fst hca, snd hca) + CustomAttributeType (fst cat, snd cat) Blob (GetCustomAttrDataAsBlobIdx cenv data) |] @@ -1430,10 +1436,10 @@ and GenSecurityDeclsPass3 cenv hds attrs = List.iter (GenSecurityDeclPass3 cenv hds) attrs // -------------------------------------------------------------------- -// ILFieldSpec --> FieldRef or ILFieldDef row +// ILFieldSpec --> FieldRef or ILFieldDef row // -------------------------------------------------------------------- -let rec GetFieldSpecAsMemberRefRow cenv env fenv (fspec:ILFieldSpec) = +let rec GetFieldSpecAsMemberRefRow cenv env fenv (fspec: ILFieldSpec) = MemberRefRow (GetTypeAsMemberRefParent cenv env fspec.DeclaringType, GetStringHeapIdx cenv fspec.Name, GetFieldSpecSigAsBlobIdx cenv fenv fspec) @@ -1443,7 +1449,7 @@ and GetFieldSpecAsMemberRefIdx cenv env fspec = FindOrAddSharedRow cenv TableNames.MemberRef (GetFieldSpecAsMemberRefRow cenv env fenv fspec) // REVIEW: write into an accumuating buffer -and EmitFieldSpecSig cenv env (bb: ByteBuffer) (fspec:ILFieldSpec) = +and EmitFieldSpecSig cenv env (bb: ByteBuffer) (fspec: ILFieldSpec) = bb.EmitByte e_IMAGE_CEE_CS_CALLCONV_FIELD EmitType cenv env bb fspec.FormalType @@ -1453,7 +1459,7 @@ and GetFieldSpecSigAsBytes cenv env x = and GetFieldSpecSigAsBlobIdx cenv env x = GetBytesAsBlobIdx cenv (GetFieldSpecSigAsBytes cenv env x) -and GetFieldSpecAsFieldDefOrRef cenv env (fspec:ILFieldSpec) = +and GetFieldSpecAsFieldDefOrRef cenv env (fspec: ILFieldSpec) = let ty = fspec.DeclaringType if isTypeLocal ty then if not ty.IsNominal then failwith "GetFieldSpecAsFieldDefOrRef: unexpected local tref-ty" @@ -1472,7 +1478,7 @@ and GetFieldDefOrRefAsUncodedToken (tag, idx) = // callsig --> StandAloneSig // -------------------------------------------------------------------- -let GetCallsigAsBlobIdx cenv env (callsig:ILCallingSignature, varargs) = +let GetCallsigAsBlobIdx cenv env (callsig: ILCallingSignature, varargs) = GetBytesAsBlobIdx cenv (GetCallsigAsBytes cenv env (callsig.CallingConv, callsig.ArgTypes, @@ -1512,7 +1518,7 @@ type ExceptionClauseSpec = (int * int * int * int * ExceptionClauseKind) type CodeBuffer = // -------------------------------------------------------------------- - // Buffer to write results of emitting code into. Also record: + // Buffer to write results of emitting code into. Also record: // - branch sources (where fixups will occur) // - possible branch destinations // - locations of embedded handles into the string table @@ -1539,7 +1545,7 @@ type CodeBuffer = member codebuf.EmitExceptionClause seh = codebuf.seh <- seh :: codebuf.seh - member codebuf.EmitSeqPoint cenv (m:ILSourceMarker) = + member codebuf.EmitSeqPoint cenv (m: ILSourceMarker) = if cenv.generatePdb then // table indexes are 1-based, document array indexes are 0-based let doc = (cenv.documents.FindOrAddSharedEntry m.Document) - 1 @@ -1578,8 +1584,8 @@ type CodeBuffer = module Codebuf = // -------------------------------------------------------------------- - // Applying branch fixups. Use short versions of instructions - // wherever possible. Sadly we can only determine if we can use a short + // Applying branch fixups. Use short versions of instructions + // wherever possible. Sadly we can only determine if we can use a short // version after we've layed out the code for all other instructions. // This in turn means that using a short version may change // the various offsets into the code. @@ -1594,13 +1600,13 @@ module Codebuf = if c = 0 then i elif c < 0 then go n (i-1) else go (i+1) m go 0 (Array.length arr) - let applyBrFixups (origCode :byte[]) origExnClauses origReqdStringFixups (origAvailBrFixups: Dictionary) origReqdBrFixups origSeqPoints origScopes = + let applyBrFixups (origCode : byte[]) origExnClauses origReqdStringFixups (origAvailBrFixups: Dictionary) origReqdBrFixups origSeqPoints origScopes = let orderedOrigReqdBrFixups = origReqdBrFixups |> List.sortBy (fun (_, fixuploc, _) -> fixuploc) let newCode = ByteBuffer.Create origCode.Length // Copy over all the code, working out whether the branches will be short - // or long and adjusting the branch destinations. Record an adjust function to adjust all the other + // or long and adjusting the branch destinations. Record an adjust function to adjust all the other // gumpf that refers to fixed offsets in the code stream. let newCode, newReqdBrFixups, adjuster = let remainingReqdFixups = ref orderedOrigReqdBrFixups @@ -1634,11 +1640,11 @@ module Codebuf = origWhere := origEndOfNoBranchBlock newWhere := !newWhere + nobranch_len - // Now do the branch instruction. Decide whether the fixup will be short or long in the new code + // Now do the branch instruction. Decide whether the fixup will be short or long in the new code if doingLast then doneLast := true else - let (i, origStartOfInstr, tgs:ILCodeLabel list) = List.head !remainingReqdFixups + let (i, origStartOfInstr, tgs: ILCodeLabel list) = List.head !remainingReqdFixups remainingReqdFixups := List.tail !remainingReqdFixups if origCode.[origStartOfInstr] <> 0x11uy then failwith "br fixup sanity check failed (1)" let i_length = if fst i = i_switch then 5 else 1 @@ -1652,7 +1658,7 @@ module Codebuf = match i, tgs with | (_, Some i_short), [tg] when - // Use the original offsets to compute if the branch is small or large. This is + // Use the original offsets to compute if the branch is small or large. This is // a safe approximation because code only gets smaller. (let origDest = match origAvailBrFixups.TryGetValue tg with @@ -1691,7 +1697,7 @@ module Codebuf = if !origWhere <> origEndOfInstr then dprintn "mismatch between origWhere and origEndOfInstr" - let adjuster = + let adjuster = let arr = Array.ofList (List.rev !adjustments) fun addr -> let i = @@ -1710,10 +1716,10 @@ module Codebuf = let newAvailBrFixups = let tab = Dictionary<_, _>(10, HashIdentity.Structural) for (KeyValue(tglab, origBrDest)) in origAvailBrFixups do - tab.[tglab] <- adjuster origBrDest + tab.[tglab] <- adjuster origBrDest tab let newReqdStringFixups = List.map (fun (origFixupLoc, stok) -> adjuster origFixupLoc, stok) origReqdStringFixups - let newSeqPoints = Array.map (fun (sp:PdbSequencePoint) -> {sp with Offset=adjuster sp.Offset}) origSeqPoints + let newSeqPoints = Array.map (fun (sp: PdbSequencePoint) -> {sp with Offset=adjuster sp.Offset}) origSeqPoints let newExnClauses = origExnClauses |> List.map (fun (st1, sz1, st2, sz2, kind) -> (adjuster st1, (adjuster (st1 + sz1) - adjuster st1), @@ -1777,7 +1783,7 @@ module Codebuf = let emitInstrCode (codebuf: CodeBuffer) i = if i > 0xFF then assert (i >>> 8 = 0xFE) - codebuf.EmitByte ((i >>> 8) &&& 0xFF) + codebuf.EmitByte ((i >>> 8) &&& 0xFF) codebuf.EmitByte (i &&& 0xFF) else codebuf.EmitByte i @@ -1839,49 +1845,49 @@ module Codebuf = match instr with | si when isNoArgInstr si -> emitInstrCode codebuf (encodingsOfNoArgInstr si) - | I_brcmp (cmp, tg1) -> + | I_brcmp (cmp, tg1) -> codebuf.RecordReqdBrFixup ((Lazy.force ILCmpInstrMap).[cmp], Some (Lazy.force ILCmpInstrRevMap).[cmp]) tg1 | I_br tg -> codebuf.RecordReqdBrFixup (i_br, Some i_br_s) tg - | I_seqpoint s -> codebuf.EmitSeqPoint cenv s + | I_seqpoint s -> codebuf.EmitSeqPoint cenv s | I_leave tg -> codebuf.RecordReqdBrFixup (i_leave, Some i_leave_s) tg - | I_call (tl, mspec, varargs) -> + | I_call (tl, mspec, varargs) -> emitTailness cenv codebuf tl emitMethodSpecInstr cenv codebuf env i_call (mspec, varargs) //emitAfterTailcall codebuf tl - | I_callvirt (tl, mspec, varargs) -> + | I_callvirt (tl, mspec, varargs) -> emitTailness cenv codebuf tl emitMethodSpecInstr cenv codebuf env i_callvirt (mspec, varargs) //emitAfterTailcall codebuf tl - | I_callconstraint (tl, ty, mspec, varargs) -> + | I_callconstraint (tl, ty, mspec, varargs) -> emitTailness cenv codebuf tl emitConstrained cenv codebuf env ty emitMethodSpecInstr cenv codebuf env i_callvirt (mspec, varargs) //emitAfterTailcall codebuf tl - | I_newobj (mspec, varargs) -> + | I_newobj (mspec, varargs) -> emitMethodSpecInstr cenv codebuf env i_newobj (mspec, varargs) - | I_ldftn mspec -> + | I_ldftn mspec -> emitMethodSpecInstr cenv codebuf env i_ldftn (mspec, None) - | I_ldvirtftn mspec -> + | I_ldvirtftn mspec -> emitMethodSpecInstr cenv codebuf env i_ldvirtftn (mspec, None) - | I_calli (tl, callsig, varargs) -> + | I_calli (tl, callsig, varargs) -> emitTailness cenv codebuf tl emitInstrCode codebuf i_calli codebuf.EmitUncodedToken (getUncodedToken TableNames.StandAloneSig (GetCallsigAsStandAloneSigIdx cenv env (callsig, varargs))) //emitAfterTailcall codebuf tl - | I_ldarg u16 -> emitShortUInt16Instr codebuf (i_ldarg_s, i_ldarg) u16 - | I_starg u16 -> emitShortUInt16Instr codebuf (i_starg_s, i_starg) u16 - | I_ldarga u16 -> emitShortUInt16Instr codebuf (i_ldarga_s, i_ldarga) u16 - | I_ldloc u16 -> emitShortUInt16Instr codebuf (i_ldloc_s, i_ldloc) u16 - | I_stloc u16 -> emitShortUInt16Instr codebuf (i_stloc_s, i_stloc) u16 - | I_ldloca u16 -> emitShortUInt16Instr codebuf (i_ldloca_s, i_ldloca) u16 + | I_ldarg u16 -> emitShortUInt16Instr codebuf (i_ldarg_s, i_ldarg) u16 + | I_starg u16 -> emitShortUInt16Instr codebuf (i_starg_s, i_starg) u16 + | I_ldarga u16 -> emitShortUInt16Instr codebuf (i_ldarga_s, i_ldarga) u16 + | I_ldloc u16 -> emitShortUInt16Instr codebuf (i_ldloc_s, i_ldloc) u16 + | I_stloc u16 -> emitShortUInt16Instr codebuf (i_stloc_s, i_stloc) u16 + | I_ldloca u16 -> emitShortUInt16Instr codebuf (i_ldloca_s, i_ldloca) u16 - | I_cpblk (al, vol) -> + | I_cpblk (al, vol) -> emitAlignment codebuf al emitVolatility codebuf vol emitInstrCode codebuf i_cpblk - | I_initblk (al, vol) -> + | I_initblk (al, vol) -> emitAlignment codebuf al emitVolatility codebuf vol emitInstrCode codebuf i_initblk @@ -1898,90 +1904,90 @@ module Codebuf = emitInstrCode codebuf i_ldc_r8 codebuf.EmitInt64 (bitsOfDouble x) - | I_ldind (al, vol, dt) -> + | I_ldind (al, vol, dt) -> emitAlignment codebuf al emitVolatility codebuf vol emitInstrCode codebuf (match dt with | DT_I -> i_ldind_i - | DT_I1 -> i_ldind_i1 - | DT_I2 -> i_ldind_i2 - | DT_I4 -> i_ldind_i4 - | DT_U1 -> i_ldind_u1 - | DT_U2 -> i_ldind_u2 - | DT_U4 -> i_ldind_u4 - | DT_I8 -> i_ldind_i8 - | DT_R4 -> i_ldind_r4 - | DT_R8 -> i_ldind_r8 - | DT_REF -> i_ldind_ref + | DT_I1 -> i_ldind_i1 + | DT_I2 -> i_ldind_i2 + | DT_I4 -> i_ldind_i4 + | DT_U1 -> i_ldind_u1 + | DT_U2 -> i_ldind_u2 + | DT_U4 -> i_ldind_u4 + | DT_I8 -> i_ldind_i8 + | DT_R4 -> i_ldind_r4 + | DT_R8 -> i_ldind_r8 + | DT_REF -> i_ldind_ref | _ -> failwith "ldind") - | I_stelem dt -> + | I_stelem dt -> emitInstrCode codebuf (match dt with | DT_I | DT_U -> i_stelem_i - | DT_U1 | DT_I1 -> i_stelem_i1 - | DT_I2 | DT_U2 -> i_stelem_i2 - | DT_I4 | DT_U4 -> i_stelem_i4 - | DT_I8 | DT_U8 -> i_stelem_i8 - | DT_R4 -> i_stelem_r4 - | DT_R8 -> i_stelem_r8 - | DT_REF -> i_stelem_ref + | DT_U1 | DT_I1 -> i_stelem_i1 + | DT_I2 | DT_U2 -> i_stelem_i2 + | DT_I4 | DT_U4 -> i_stelem_i4 + | DT_I8 | DT_U8 -> i_stelem_i8 + | DT_R4 -> i_stelem_r4 + | DT_R8 -> i_stelem_r8 + | DT_REF -> i_stelem_ref | _ -> failwith "stelem") - | I_ldelem dt -> + | I_ldelem dt -> emitInstrCode codebuf (match dt with | DT_I -> i_ldelem_i - | DT_I1 -> i_ldelem_i1 - | DT_I2 -> i_ldelem_i2 - | DT_I4 -> i_ldelem_i4 - | DT_I8 -> i_ldelem_i8 - | DT_U1 -> i_ldelem_u1 - | DT_U2 -> i_ldelem_u2 - | DT_U4 -> i_ldelem_u4 - | DT_R4 -> i_ldelem_r4 - | DT_R8 -> i_ldelem_r8 - | DT_REF -> i_ldelem_ref + | DT_I1 -> i_ldelem_i1 + | DT_I2 -> i_ldelem_i2 + | DT_I4 -> i_ldelem_i4 + | DT_I8 -> i_ldelem_i8 + | DT_U1 -> i_ldelem_u1 + | DT_U2 -> i_ldelem_u2 + | DT_U4 -> i_ldelem_u4 + | DT_R4 -> i_ldelem_r4 + | DT_R8 -> i_ldelem_r8 + | DT_REF -> i_ldelem_ref | _ -> failwith "ldelem") - | I_stind (al, vol, dt) -> + | I_stind (al, vol, dt) -> emitAlignment codebuf al emitVolatility codebuf vol emitInstrCode codebuf (match dt with | DT_U | DT_I -> i_stind_i - | DT_U1 | DT_I1 -> i_stind_i1 - | DT_U2 | DT_I2 -> i_stind_i2 - | DT_U4 | DT_I4 -> i_stind_i4 - | DT_U8 | DT_I8 -> i_stind_i8 - | DT_R4 -> i_stind_r4 - | DT_R8 -> i_stind_r8 - | DT_REF -> i_stind_ref + | DT_U1 | DT_I1 -> i_stind_i1 + | DT_U2 | DT_I2 -> i_stind_i2 + | DT_U4 | DT_I4 -> i_stind_i4 + | DT_U8 | DT_I8 -> i_stind_i8 + | DT_R4 -> i_stind_r4 + | DT_R8 -> i_stind_r8 + | DT_REF -> i_stind_ref | _ -> failwith "stelem") - | I_switch labs -> codebuf.RecordReqdBrFixups (i_switch, None) labs + | I_switch labs -> codebuf.RecordReqdBrFixups (i_switch, None) labs - | I_ldfld (al, vol, fspec) -> + | I_ldfld (al, vol, fspec) -> emitAlignment codebuf al emitVolatility codebuf vol emitFieldSpecInstr cenv codebuf env i_ldfld fspec - | I_ldflda fspec -> + | I_ldflda fspec -> emitFieldSpecInstr cenv codebuf env i_ldflda fspec - | I_ldsfld (vol, fspec) -> + | I_ldsfld (vol, fspec) -> emitVolatility codebuf vol emitFieldSpecInstr cenv codebuf env i_ldsfld fspec - | I_ldsflda fspec -> + | I_ldsflda fspec -> emitFieldSpecInstr cenv codebuf env i_ldsflda fspec - | I_stfld (al, vol, fspec) -> + | I_stfld (al, vol, fspec) -> emitAlignment codebuf al emitVolatility codebuf vol emitFieldSpecInstr cenv codebuf env i_stfld fspec - | I_stsfld (vol, fspec) -> + | I_stsfld (vol, fspec) -> emitVolatility codebuf vol emitFieldSpecInstr cenv codebuf env i_stsfld fspec - | I_ldtoken tok -> + | I_ldtoken tok -> emitInstrCode codebuf i_ldtoken codebuf.EmitUncodedToken (match tok with @@ -2000,14 +2006,14 @@ module Codebuf = | ILToken.ILField fspec -> match GetFieldSpecAsFieldDefOrRef cenv env fspec with | (true, idx) -> getUncodedToken TableNames.Field idx - | (false, idx) -> getUncodedToken TableNames.MemberRef idx) - | I_ldstr s -> + | (false, idx) -> getUncodedToken TableNames.MemberRef idx) + | I_ldstr s -> emitInstrCode codebuf i_ldstr codebuf.RecordReqdStringFixup (GetUserStringHeapIdx cenv s) - | I_box ty -> emitTypeInstr cenv codebuf env i_box ty - | I_unbox ty -> emitTypeInstr cenv codebuf env i_unbox ty - | I_unbox_any ty -> emitTypeInstr cenv codebuf env i_unbox_any ty + | I_box ty -> emitTypeInstr cenv codebuf env i_box ty + | I_unbox ty -> emitTypeInstr cenv codebuf env i_unbox ty + | I_unbox_any ty -> emitTypeInstr cenv codebuf env i_unbox_any ty | I_newarr (shape, ty) -> if (shape = ILArrayShape.SingleDimensional) then @@ -2020,7 +2026,7 @@ module Codebuf = if (shape = ILArrayShape.SingleDimensional) then emitTypeInstr cenv codebuf env i_stelem_any ty else - let args = List.init (shape.Rank+1) (fun i -> if i < shape.Rank then cenv.ilg.typ_Int32 else ty) + let args = List.init (shape.Rank+1) (fun i -> if i < shape.Rank then cenv.ilg.typ_Int32 else ty) emitMethodSpecInfoInstr cenv codebuf env i_call ("Set", mkILArrTy(ty, shape), ILCallingConv.Instance, args, ILType.Void, None, []) | I_ldelem_any (shape, ty) -> @@ -2030,7 +2036,7 @@ module Codebuf = let args = List.init shape.Rank (fun _ -> cenv.ilg.typ_Int32) emitMethodSpecInfoInstr cenv codebuf env i_call ("Get", mkILArrTy(ty, shape), ILCallingConv.Instance, args, ty, None, []) - | I_ldelema (ro, _isNativePtr, shape, ty) -> + | I_ldelema (ro, _isNativePtr, shape, ty) -> if (ro = ReadonlyAddress) then emitInstrCode codebuf i_readonly if (shape = ILArrayShape.SingleDimensional) then @@ -2039,26 +2045,26 @@ module Codebuf = let args = List.init shape.Rank (fun _ -> cenv.ilg.typ_Int32) emitMethodSpecInfoInstr cenv codebuf env i_call ("Address", mkILArrTy(ty, shape), ILCallingConv.Instance, args, ILType.Byref ty, None, []) - | I_castclass ty -> emitTypeInstr cenv codebuf env i_castclass ty - | I_isinst ty -> emitTypeInstr cenv codebuf env i_isinst ty - | I_refanyval ty -> emitTypeInstr cenv codebuf env i_refanyval ty - | I_mkrefany ty -> emitTypeInstr cenv codebuf env i_mkrefany ty - | I_initobj ty -> emitTypeInstr cenv codebuf env i_initobj ty - | I_ldobj (al, vol, ty) -> + | I_castclass ty -> emitTypeInstr cenv codebuf env i_castclass ty + | I_isinst ty -> emitTypeInstr cenv codebuf env i_isinst ty + | I_refanyval ty -> emitTypeInstr cenv codebuf env i_refanyval ty + | I_mkrefany ty -> emitTypeInstr cenv codebuf env i_mkrefany ty + | I_initobj ty -> emitTypeInstr cenv codebuf env i_initobj ty + | I_ldobj (al, vol, ty) -> emitAlignment codebuf al emitVolatility codebuf vol emitTypeInstr cenv codebuf env i_ldobj ty - | I_stobj (al, vol, ty) -> + | I_stobj (al, vol, ty) -> emitAlignment codebuf al emitVolatility codebuf vol emitTypeInstr cenv codebuf env i_stobj ty - | I_cpobj ty -> emitTypeInstr cenv codebuf env i_cpobj ty - | I_sizeof ty -> emitTypeInstr cenv codebuf env i_sizeof ty - | EI_ldlen_multi (_, m) -> + | I_cpobj ty -> emitTypeInstr cenv codebuf env i_cpobj ty + | I_sizeof ty -> emitTypeInstr cenv codebuf env i_sizeof ty + | EI_ldlen_multi (_, m) -> emitShortInt32Instr codebuf (i_ldc_i4_s, i_ldc_i4) m emitInstr cenv codebuf env (mkNormalCall(mkILNonGenericMethSpecInTy(cenv.ilg.typ_Array, ILCallingConv.Instance, "GetLength", [(cenv.ilg.typ_Int32)], (cenv.ilg.typ_Int32)))) - | _ -> failwith "an IL instruction cannot be emitted" + | _ -> failwith "an IL instruction cannot be emitted" let mkScopeNode cenv (localSigs: _[]) (startOffset, endOffset, ls: ILLocalDebugMapping list, childScopes) = @@ -2077,9 +2083,9 @@ module Codebuf = // Used to put local debug scopes and exception handlers into a tree form - let rangeInsideRange (start_pc1, end_pc1) (start_pc2, end_pc2) = - (start_pc1:int) >= start_pc2 && start_pc1 < end_pc2 && - (end_pc1:int) > start_pc2 && end_pc1 <= end_pc2 + let rangeInsideRange (start_pc1, end_pc1) (start_pc2, end_pc2) = + (start_pc1: int) >= start_pc2 && start_pc1 < end_pc2 && + (end_pc1: int) > start_pc2 && end_pc1 <= end_pc2 let lranges_of_clause cl = match cl with @@ -2202,7 +2208,7 @@ module Codebuf = let EmitTopCode cenv localSigs env nm code = let codebuf = CodeBuffer.Create nm - let origScopes = emitCode cenv localSigs codebuf env code + let origScopes = emitCode cenv localSigs codebuf env code let origCode = codebuf.code.Close() let origExnClauses = List.rev codebuf.seh let origReqdStringFixups = codebuf.reqdStringFixupsInMethod @@ -2247,7 +2253,7 @@ let GenILMethodBody mname cenv env (il: ILMethodBody) = if isNil il.Locals && il.MaxStack <= 8 && isNil seh && codeSize < 64 then // Use Tiny format let alignedCodeSize = align 4 (codeSize + 1) - let codePadding = (alignedCodeSize - (codeSize + 1)) + let codePadding = (alignedCodeSize - (codeSize + 1)) let requiredStringFixups' = (1, requiredStringFixups) methbuf.EmitByte (byte codeSize <<< 2 ||| e_CorILMethod_TinyFormat) methbuf.EmitBytes code @@ -2266,7 +2272,7 @@ let GenILMethodBody mname cenv env (il: ILMethodBody) = (FindOrAddSharedRow cenv TableNames.StandAloneSig (GetLocalSigAsStandAloneSigIdx cenv env il.Locals)) let alignedCodeSize = align 0x4 codeSize - let codePadding = (alignedCodeSize - codeSize) + let codePadding = (alignedCodeSize - codeSize) methbuf.EmitByte flags methbuf.EmitByte 0x30uy // last four bits record size of fat header in 4 byte chunks - this is always 12 bytes = 3 four word chunks @@ -2382,7 +2388,7 @@ and GenFieldDefPass3 cenv env fd = let rec GetGenericParamAsGenericParamRow cenv _env idx owner gp = let flags = - (match gp.Variance with + (match gp.Variance with | NonVariant -> 0x0000 | CoVariant -> 0x0001 | ContraVariant -> 0x0002) ||| @@ -2430,7 +2436,7 @@ and GenGenericParamPass4 cenv env idx owner gp = // param and return --> Param Row // -------------------------------------------------------------------- -let rec GetParamAsParamRow cenv _env seq (param: ILParameter) = +let rec GetParamAsParamRow cenv _env seq (param: ILParameter) = let flags = (if param.IsIn then 0x0001 else 0x0000) ||| (if param.IsOut then 0x0002 else 0x0000) ||| @@ -2523,7 +2529,7 @@ let GenMethodDefAsRow cenv env midx (md: ILMethodDef) = RootScope = Some rootScope Range= match ilmbody.SourceMarker with - | Some m when cenv.generatePdb -> + | Some m when cenv.generatePdb -> // table indexes are 1-based, document array indexes are 0-based let doc = (cenv.documents.FindOrAddSharedEntry m.Document) - 1 @@ -2552,10 +2558,10 @@ let GenMethodDefAsRow cenv env midx (md: ILMethodDef) = 0x0000 | MethodBody.Native -> failwith "cannot write body of native method - Abstract IL cannot roundtrip mixed native/managed binaries" - | _ -> 0x0000) + | _ -> 0x0000) UnsharedRow - [| ULong codeAddr + [| ULong codeAddr UShort (uint16 implflags) UShort (uint16 flags) StringE (GetStringHeapIdx cenv md.Name) @@ -2571,7 +2577,7 @@ let GenMethodImplPass3 cenv env _tgparams tidx mimpl = MethodDefOrRef (midxTag, midxRow) MethodDefOrRef (midx2Tag, midx2Row) |]) |> ignore -let GenMethodDefPass3 cenv env (md:ILMethodDef) = +let GenMethodDefPass3 cenv env (md: ILMethodDef) = let midx = GetMethodDefIdx cenv md let idx2 = AddUnsharedRow cenv TableNames.Method (GenMethodDefAsRow cenv env midx md) if midx <> idx2 then failwith "index of method def on pass 3 does not match index on pass 2" @@ -2584,27 +2590,27 @@ let GenMethodDefPass3 cenv env (md:ILMethodDef) = | MethodBody.PInvoke attr -> let flags = begin match attr.CallingConv with - | PInvokeCallingConvention.None -> 0x0000 - | PInvokeCallingConvention.Cdecl -> 0x0200 - | PInvokeCallingConvention.Stdcall -> 0x0300 + | PInvokeCallingConvention.None -> 0x0000 + | PInvokeCallingConvention.Cdecl -> 0x0200 + | PInvokeCallingConvention.Stdcall -> 0x0300 | PInvokeCallingConvention.Thiscall -> 0x0400 | PInvokeCallingConvention.Fastcall -> 0x0500 - | PInvokeCallingConvention.WinApi -> 0x0100 + | PInvokeCallingConvention.WinApi -> 0x0100 end ||| begin match attr.CharEncoding with - | PInvokeCharEncoding.None -> 0x0000 - | PInvokeCharEncoding.Ansi -> 0x0002 + | PInvokeCharEncoding.None -> 0x0000 + | PInvokeCharEncoding.Ansi -> 0x0002 | PInvokeCharEncoding.Unicode -> 0x0004 - | PInvokeCharEncoding.Auto -> 0x0006 + | PInvokeCharEncoding.Auto -> 0x0006 end ||| begin match attr.CharBestFit with | PInvokeCharBestFit.UseAssembly -> 0x0000 - | PInvokeCharBestFit.Enabled -> 0x0010 + | PInvokeCharBestFit.Enabled -> 0x0010 | PInvokeCharBestFit.Disabled -> 0x0020 end ||| begin match attr.ThrowOnUnmappableChar with | PInvokeThrowOnUnmappableChar.UseAssembly -> 0x0000 - | PInvokeThrowOnUnmappableChar.Enabled -> 0x1000 + | PInvokeThrowOnUnmappableChar.Enabled -> 0x1000 | PInvokeThrowOnUnmappableChar.Disabled -> 0x2000 end ||| (if attr.NoMangle then 0x0001 else 0x0000) ||| @@ -2617,7 +2623,7 @@ let GenMethodDefPass3 cenv env (md:ILMethodDef) = SimpleIndex (TableNames.ModuleRef, GetModuleRefAsIdx cenv attr.Where) |]) |> ignore | _ -> () -let GenMethodDefPass4 cenv env md = +let GenMethodDefPass4 cenv env md = let midx = GetMethodDefIdx cenv md List.iteri (fun n gp -> GenGenericParamPass4 cenv env n (tomd_MethodDef, midx) gp) md.GenericParams @@ -2635,13 +2641,13 @@ let rec GetPropertySigAsBlobIdx cenv env prop = and GetPropertySigAsBytes cenv env (prop: ILPropertyDef) = emitBytesViaBuffer (fun bb -> - let b = ((hasthisToByte prop.CallingConv) ||| e_IMAGE_CEE_CS_CALLCONV_PROPERTY) + let b = ((hasthisToByte prop.CallingConv) ||| e_IMAGE_CEE_CS_CALLCONV_PROPERTY) bb.EmitByte b bb.EmitZ32 prop.Args.Length EmitType cenv env bb prop.PropertyType prop.Args |> List.iter (EmitType cenv env bb)) -and GetPropertyAsPropertyRow cenv env (prop:ILPropertyDef) = +and GetPropertyAsPropertyRow cenv env (prop: ILPropertyDef) = let flags = prop.Attributes UnsharedRow [| UShort (uint16 flags) @@ -2696,17 +2702,17 @@ and GenEventPass3 cenv env (md: ILEventDef) = let rec GetResourceAsManifestResourceRow cenv r = let data, impl = - let embedManagedResources (bytes:byte[]) = - // Embedded managed resources must be word-aligned. However resource format is - // not specified in ECMA. Some mscorlib resources appear to be non-aligned - it seems it doesn't matter.. + let embedManagedResources (bytes: byte[]) = + // Embedded managed resources must be word-aligned. However resource format is + // not specified in ECMA. Some mscorlib resources appear to be non-aligned - it seems it doesn't matter.. let offset = cenv.resources.Position - let alignedOffset = (align 0x8 offset) + let alignedOffset = (align 0x8 offset) let pad = alignedOffset - offset let resourceSize = bytes.Length cenv.resources.EmitPadding pad cenv.resources.EmitInt32 resourceSize cenv.resources.EmitBytes bytes - Data (alignedOffset, true), (i_File, 0) + Data (alignedOffset, true), (i_File, 0) match r.Location with | ILResourceLocation.LocalIn _ -> embedManagedResources (r.GetBytes()) @@ -2728,7 +2734,7 @@ and GenResourcePass3 cenv r = // ILTypeDef --> generate ILFieldDef, ILMethodDef, ILPropertyDef etc. rows // -------------------------------------------------------------------- -let rec GenTypeDefPass3 enc cenv (td:ILTypeDef) = +let rec GenTypeDefPass3 enc cenv (td: ILTypeDef) = try let env = envForTypeDef td let tidx = GetIdxForTypeDef cenv (TdKey(enc, td.Name)) @@ -2736,7 +2742,7 @@ let rec GenTypeDefPass3 enc cenv (td:ILTypeDef) = td.Events.AsList |> List.iter (GenEventPass3 cenv env) td.Fields.AsList |> List.iter (GenFieldDefPass3 cenv env) td.Methods |> Seq.iter (GenMethodDefPass3 cenv env) - td.MethodImpls.AsList |> List.iter (GenMethodImplPass3 cenv env td.GenericParams.Length tidx) + td.MethodImpls.AsList |> List.iter (GenMethodImplPass3 cenv env td.GenericParams.Length tidx) // ClassLayout entry if needed match td.Layout with | ILTypeDefLayout.Auto -> () @@ -2753,7 +2759,7 @@ let rec GenTypeDefPass3 enc cenv (td:ILTypeDef) = td.GenericParams |> List.iteri (fun n gp -> GenGenericParamPass3 cenv env n (tomd_TypeDef, tidx) gp) td.NestedTypes.AsList |> GenTypeDefsPass3 (enc@[td.Name]) cenv with e -> - failwith ("Error in pass3 for type "+td.Name+", error: "+e.Message) + failwith ("Error in pass3 for type "+td.Name+", error: "+e.Message) reraise() raise e @@ -2763,7 +2769,7 @@ and GenTypeDefsPass3 enc cenv tds = /// ILTypeDef --> generate generic params on ILMethodDef: ensures /// GenericParam table is built sorted by owner. -let rec GenTypeDefPass4 enc cenv (td:ILTypeDef) = +let rec GenTypeDefPass4 enc cenv (td: ILTypeDef) = try let env = envForTypeDef td let tidx = GetIdxForTypeDef cenv (TdKey(enc, td.Name)) @@ -2786,7 +2792,7 @@ let timestamp = absilWriteGetTimeStamp () // -------------------------------------------------------------------- let rec GenNestedExportedTypePass3 cenv cidx (ce: ILNestedExportedType) = - let flags = GetMemberAccessFlags ce.Access + let flags = GetMemberAccessFlags ce.Access let nidx = AddUnsharedRow cenv TableNames.ExportedType (UnsharedRow @@ -2832,16 +2838,16 @@ and GetManifsetAsAssemblyRow cenv m = UShort (match m.Version with None -> 0us | Some (_, _, _, w) -> w) ULong ( (match m.AssemblyLongevity with - | ILAssemblyLongevity.Unspecified -> 0x0000 - | ILAssemblyLongevity.Library -> 0x0002 + | ILAssemblyLongevity.Unspecified -> 0x0000 + | ILAssemblyLongevity.Library -> 0x0002 | ILAssemblyLongevity.PlatformAppDomain -> 0x0004 - | ILAssemblyLongevity.PlatformProcess -> 0x0006 - | ILAssemblyLongevity.PlatformSystem -> 0x0008) ||| + | ILAssemblyLongevity.PlatformProcess -> 0x0006 + | ILAssemblyLongevity.PlatformSystem -> 0x0008) ||| (if m.Retargetable then 0x100 else 0x0) ||| // Setting these causes peverify errors. Hence both ilread and ilwrite ignore them and refuse to set them. // Any debugging customattributes will automatically propagate // REVIEW: No longer appears to be the case - (if m.JitTracking then 0x8000 else 0x0) ||| + (if m.JitTracking then 0x8000 else 0x0) ||| (match m.PublicKey with None -> 0x0000 | Some _ -> 0x0001) ||| 0x0000) (match m.PublicKey with None -> Blob 0 | Some x -> Blob (GetBytesAsBlobIdx cenv x)) StringE (GetStringHeapIdx cenv m.Name) @@ -2867,11 +2873,10 @@ and newGuid (modul: ILModuleDef) = and deterministicGuid (modul: ILModuleDef) = let n = 16909060 - let m = hash n - let m2 = hash modul.Name - [| b0 m; b1 m; b2 m; b3 m; b0 m2; b1 m2; b2 m2; b3 m2; 0xa7uy; 0x45uy; 0x03uy; 0x83uy; b0 n; b1 n; b2 n; b3 n |] + let m2 = Seq.sum (Seq.mapi (fun i x -> i + int x) modul.Name) // use a stable hash + [| b0 n; b1 n; b2 n; b3 n; b0 m2; b1 m2; b2 m2; b3 m2; 0xa7uy; 0x45uy; 0x03uy; 0x83uy; b0 n; b1 n; b2 n; b3 n |] -and GetModuleAsRow (cenv:cenv) (modul: ILModuleDef) = +and GetModuleAsRow (cenv: cenv) (modul: ILModuleDef) = // Store the generated MVID in the environment (needed for generating debug information) let modulGuid = if cenv.deterministic then deterministicGuid modul else newGuid modul cenv.moduleGuid <- modulGuid @@ -2891,7 +2896,7 @@ let rowElemCompare (e1: RowElement) (e2: RowElement) = let TableRequiresSorting tab = List.memAssoc tab sortedTableInfo -let SortTableRows tab (rows:GenericRow[]) = +let SortTableRows tab (rows: GenericRow[]) = assert (TableRequiresSorting tab) let col = List.assoc tab sortedTableInfo rows @@ -2916,13 +2921,13 @@ let GenModule (cenv : cenv) (modul: ILModuleDef) = GenCustomAttrsPass3Or4 cenv (hca_Module, midx) modul.CustomAttrs // GenericParam is the only sorted table indexed by Columns in other tables (GenericParamConstraint\CustomAttributes). // Hence we need to sort it before we emit any entries in GenericParamConstraint\CustomAttributes that are attached to generic params. - // Note this mutates the rows in a table. 'SetRowsOfTable' clears + // Note this mutates the rows in a table. 'SetRowsOfTable' clears // the key --> index map since it is no longer valid cenv.GetTable(TableNames.GenericParam).SetRowsOfSharedTable (SortTableRows TableNames.GenericParam (cenv.GetTable(TableNames.GenericParam).GenericRowsOfTable)) GenTypeDefsPass4 [] cenv tds reportTime cenv.showTimes "Module Generation Pass 4" -let generateIL requiredDataFixups (desiredMetadataVersion, generatePdb, ilg : ILGlobals, emitTailcalls, deterministic, showTimes) (m : ILModuleDef) cilStartAddress normalizeAssemblyRefs = +let generateIL requiredDataFixups (desiredMetadataVersion, generatePdb, ilg : ILGlobals, emitTailcalls, deterministic, showTimes) (m : ILModuleDef) cilStartAddress normalizeAssemblyRefs = let isDll = m.IsDLL let cenv = @@ -2974,9 +2979,9 @@ let generateIL requiredDataFixups (desiredMetadataVersion, generatePdb, ilg : IL normalizeAssemblyRefs = normalizeAssemblyRefs } // Now the main compilation step - GenModule cenv m + GenModule cenv m - // .exe files have a .entrypoint instruction. Do not write it to the entrypoint when writing dll. + // .exe files have a .entrypoint instruction. Do not write it to the entrypoint when writing dll. let entryPointToken = match cenv.entrypoint with | Some (epHere, tok) -> @@ -2994,16 +2999,16 @@ let generateIL requiredDataFixups (desiredMetadataVersion, generatePdb, ilg : IL Methods = cenv.pdbinfo.ToArray() TableRowCounts = cenv.tables |> Seq.map(fun t -> t.Count) |> Seq.toArray } - let idxForNextedTypeDef (tds:ILTypeDef list, td:ILTypeDef) = + let idxForNextedTypeDef (tds: ILTypeDef list, td: ILTypeDef) = let enc = tds |> List.map (fun td -> td.Name) GetIdxForTypeDef cenv (TdKey(enc, td.Name)) - let strings = Array.map Bytes.stringAsUtf8NullTerminated cenv.strings.EntriesAsArray + let strings = Array.map Bytes.stringAsUtf8NullTerminated cenv.strings.EntriesAsArray let userStrings = cenv.userStrings.EntriesAsArray |> Array.map System.Text.Encoding.Unicode.GetBytes - let blobs = cenv.blobs.EntriesAsArray - let guids = cenv.guids.EntriesAsArray - let tables = cenv.tables - let code = cenv.GetCode() + let blobs = cenv.blobs.EntriesAsArray + let guids = cenv.guids.EntriesAsArray + let tables = cenv.tables + let code = cenv.GetCode() // turn idx tbls into token maps let mappings = { TypeDefTokenMap = (fun t -> @@ -3031,7 +3036,7 @@ let generateIL requiredDataFixups (desiredMetadataVersion, generatePdb, ilg : IL // TABLES+BLOBS --> PHYSICAL METADATA+BLOBS //===================================================================== let chunk sz next = ({addr=next; size=sz}, next + sz) -let nochunk next = ({addr= 0x0;size= 0x0; } , next) +let nochunk next = ({addr= 0x0;size= 0x0; }, next) let count f arr = Array.fold (fun x y -> x + f y) 0x0 arr @@ -3106,26 +3111,26 @@ let writeILMetadataAndCode (generatePdb, desiredMetadataVersion, ilg, emitTailca // Most addresses after this point are measured from the MD root // Switch to md-rooted addresses let next = metadataHeaderStartChunk.size - let _metadataHeaderVersionChunk, next = chunk paddedVersionLength next - let _metadataHeaderEndChunk, next = chunk 0x04 next - let _tablesStreamHeaderChunk, next = chunk (0x08 + (align 4 ("#~".Length + 0x01))) next - let _stringsStreamHeaderChunk, next = chunk (0x08 + (align 4 ("#Strings".Length + 0x01))) next + let _metadataHeaderVersionChunk, next = chunk paddedVersionLength next + let _metadataHeaderEndChunk, next = chunk 0x04 next + let _tablesStreamHeaderChunk, next = chunk (0x08 + (align 4 ("#~".Length + 0x01))) next + let _stringsStreamHeaderChunk, next = chunk (0x08 + (align 4 ("#Strings".Length + 0x01))) next let _userStringsStreamHeaderChunk, next = chunk (0x08 + (align 4 ("#US".Length + 0x01))) next - let _guidsStreamHeaderChunk, next = chunk (0x08 + (align 4 ("#GUID".Length + 0x01))) next - let _blobsStreamHeaderChunk, next = chunk (0x08 + (align 4 ("#Blob".Length + 0x01))) next + let _guidsStreamHeaderChunk, next = chunk (0x08 + (align 4 ("#GUID".Length + 0x01))) next + let _blobsStreamHeaderChunk, next = chunk (0x08 + (align 4 ("#Blob".Length + 0x01))) next let tablesStreamStart = next - let stringsStreamUnpaddedSize = count (fun (s:byte[]) -> s.Length) strings + 1 + let stringsStreamUnpaddedSize = count (fun (s: byte[]) -> s.Length) strings + 1 let stringsStreamPaddedSize = align 4 stringsStreamUnpaddedSize - let userStringsStreamUnpaddedSize = count (fun (s:byte[]) -> let n = s.Length + 1 in n + ByteBuffer.Z32Size n) userStrings + 1 + let userStringsStreamUnpaddedSize = count (fun (s: byte[]) -> let n = s.Length + 1 in n + ByteBuffer.Z32Size n) userStrings + 1 let userStringsStreamPaddedSize = align 4 userStringsStreamUnpaddedSize let guidsStreamUnpaddedSize = (Array.length guids) * 0x10 let guidsStreamPaddedSize = align 4 guidsStreamUnpaddedSize - let blobsStreamUnpaddedSize = count (fun (blob:byte[]) -> let n = blob.Length in n + ByteBuffer.Z32Size n) blobs + 1 + let blobsStreamUnpaddedSize = count (fun (blob: byte[]) -> let n = blob.Length in n + ByteBuffer.Z32Size n) blobs + 1 let blobsStreamPaddedSize = align 4 blobsStreamUnpaddedSize let guidsBig = guidsStreamPaddedSize >= 0x10000 @@ -3136,8 +3141,8 @@ let writeILMetadataAndCode (generatePdb, desiredMetadataVersion, ilg, emitTailca let (valid1, valid2), _ = (((0, 0), 0), tables) ||> Array.fold (fun ((valid1, valid2) as valid, n) rows -> let valid = - if rows.Count = 0 then valid else - ( (if n < 32 then valid1 ||| (1 <<< n ) else valid1), + if rows.Count = 0 then valid else + ( (if n < 32 then valid1 ||| (1 <<< n ) else valid1), (if n >= 32 then valid2 ||| (1 <<< (n-32)) else valid2) ) (valid, n+1)) @@ -3146,7 +3151,7 @@ let writeILMetadataAndCode (generatePdb, desiredMetadataVersion, ilg, emitTailca let sorted1 = 0x3301fa00 let sorted2 = // If there are any generic parameters in the binary we're emitting then mark that - // table as sorted, otherwise don't. This maximizes the number of assemblies we emit + // table as sorted, otherwise don't. This maximizes the number of assemblies we emit // which have an ECMA-v.1. compliant set of sorted tables. (if tableSize (TableNames.GenericParam) > 0 then 0x00000400 else 0x00000000) ||| (if tableSize (TableNames.GenericParamConstraint) > 0 then 0x00001000 else 0x00000000) ||| @@ -3154,7 +3159,7 @@ let writeILMetadataAndCode (generatePdb, desiredMetadataVersion, ilg, emitTailca reportTime showTimes "Layout Header of Tables" - let guidAddress n = (if n = 0 then 0 else (n - 1) * 0x10 + 0x01) + let guidAddress n = (if n = 0 then 0 else (n - 1) * 0x10 + 0x01) let stringAddressTable = let tab = Array.create (strings.Length + 1) 0 @@ -3209,8 +3214,10 @@ let writeILMetadataAndCode (generatePdb, desiredMetadataVersion, ilg, emitTailca let codedTables = + let sizesTable = Array.map Array.length sortedTables let bignessTable = Array.map (fun rows -> Array.length rows >= 0x10000) sortedTables - let bigness (tab:int32) = bignessTable.[tab] + let bigness (tab: int32) = bignessTable.[tab] + let size (tab: int32) = sizesTable.[tab] let codedBigness nbits tab = (tableSize tab) >= (0x10000 >>> nbits) @@ -3232,7 +3239,7 @@ let writeILMetadataAndCode (generatePdb, desiredMetadataVersion, ilg, emitTailca let hcaBigness = codedBigness 5 TableNames.Method || codedBigness 5 TableNames.Field || - codedBigness 5 TableNames.TypeRef || + codedBigness 5 TableNames.TypeRef || codedBigness 5 TableNames.TypeDef || codedBigness 5 TableNames.Param || codedBigness 5 TableNames.InterfaceImpl || @@ -3248,7 +3255,7 @@ let writeILMetadataAndCode (generatePdb, desiredMetadataVersion, ilg, emitTailca codedBigness 5 TableNames.AssemblyRef || codedBigness 5 TableNames.File || codedBigness 5 TableNames.ExportedType || - codedBigness 5 TableNames.ManifestResource || + codedBigness 5 TableNames.ManifestResource || codedBigness 5 TableNames.GenericParam || codedBigness 5 TableNames.GenericParamConstraint || codedBigness 5 TableNames.MethodSpec @@ -3293,19 +3300,19 @@ let writeILMetadataAndCode (generatePdb, desiredMetadataVersion, ilg, emitTailca let rsBigness = codedBigness 2 TableNames.Module || codedBigness 2 TableNames.ModuleRef || - codedBigness 2 TableNames.AssemblyRef || + codedBigness 2 TableNames.AssemblyRef || codedBigness 2 TableNames.TypeRef - let tablesBuf = ByteBuffer.Create 20000 + let tablesBuf = ByteBuffer.Create 20000 - // Now the coded tables themselves - first the schemata header + // Now the coded tables themselves - first the schemata header tablesBuf.EmitIntsAsBytes - [| 0x00; 0x00; 0x00; 0x00; + [| 0x00; 0x00; 0x00; 0x00 mdtableVersionMajor // major version of table schemata mdtableVersionMinor // minor version of table schemata ((if stringsBig then 0x01 else 0x00) ||| // bit vector for heap size - (if guidsBig then 0x02 else 0x00) ||| + (if guidsBig then 0x02 else 0x00) ||| (if blobsBig then 0x04 else 0x00)) 0x01 (* reserved, always 1 *) |] @@ -3330,27 +3337,29 @@ let writeILMetadataAndCode (generatePdb, desiredMetadataVersion, ilg, emitTailca let t = x.Tag let n = x.Val match t with - | _ when t = RowElementTags.UShort -> tablesBuf.EmitUInt16 (uint16 n) - | _ when t = RowElementTags.ULong -> tablesBuf.EmitInt32 n - | _ when t = RowElementTags.Data -> recordRequiredDataFixup requiredDataFixups tablesBuf (tablesStreamStart + tablesBuf.Position) (n, false) + | _ when t = RowElementTags.UShort -> tablesBuf.EmitUInt16 (uint16 n) + | _ when t = RowElementTags.ULong -> tablesBuf.EmitInt32 n + | _ when t = RowElementTags.Data -> recordRequiredDataFixup requiredDataFixups tablesBuf (tablesStreamStart + tablesBuf.Position) (n, false) | _ when t = RowElementTags.DataResources -> recordRequiredDataFixup requiredDataFixups tablesBuf (tablesStreamStart + tablesBuf.Position) (n, true) - | _ when t = RowElementTags.Guid -> tablesBuf.EmitZUntaggedIndex guidsBig (guidAddress n) - | _ when t = RowElementTags.Blob -> tablesBuf.EmitZUntaggedIndex blobsBig (blobAddress n) - | _ when t = RowElementTags.String -> tablesBuf.EmitZUntaggedIndex stringsBig (stringAddress n) - | _ when t <= RowElementTags.SimpleIndexMax -> tablesBuf.EmitZUntaggedIndex (bigness (t - RowElementTags.SimpleIndexMin)) n - | _ when t <= RowElementTags.TypeDefOrRefOrSpecMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.TypeDefOrRefOrSpecMin) 2 tdorBigness n - | _ when t <= RowElementTags.TypeOrMethodDefMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.TypeOrMethodDefMin) 1 tomdBigness n - | _ when t <= RowElementTags.HasConstantMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.HasConstantMin) 2 hcBigness n - | _ when t <= RowElementTags.HasCustomAttributeMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.HasCustomAttributeMin) 5 hcaBigness n - | _ when t <= RowElementTags.HasFieldMarshalMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.HasFieldMarshalMin) 1 hfmBigness n - | _ when t <= RowElementTags.HasDeclSecurityMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.HasDeclSecurityMin) 2 hdsBigness n - | _ when t <= RowElementTags.MemberRefParentMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.MemberRefParentMin) 3 mrpBigness n - | _ when t <= RowElementTags.HasSemanticsMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.HasSemanticsMin) 1 hsBigness n - | _ when t <= RowElementTags.MethodDefOrRefMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.MethodDefOrRefMin) 1 mdorBigness n - | _ when t <= RowElementTags.MemberForwardedMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.MemberForwardedMin) 1 mfBigness n - | _ when t <= RowElementTags.ImplementationMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.ImplementationMin) 2 iBigness n - | _ when t <= RowElementTags.CustomAttributeTypeMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.CustomAttributeTypeMin) 3 catBigness n - | _ when t <= RowElementTags.ResolutionScopeMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.ResolutionScopeMin) 2 rsBigness n + | _ when t = RowElementTags.Guid -> tablesBuf.EmitZUntaggedIndex -3 guidsStreamPaddedSize guidsBig (guidAddress n) + | _ when t = RowElementTags.Blob -> tablesBuf.EmitZUntaggedIndex -2 blobsStreamPaddedSize blobsBig (blobAddress n) + | _ when t = RowElementTags.String -> tablesBuf.EmitZUntaggedIndex -1 stringsStreamPaddedSize stringsBig (stringAddress n) + | _ when t <= RowElementTags.SimpleIndexMax -> + let tnum = t - RowElementTags.SimpleIndexMin + tablesBuf.EmitZUntaggedIndex tnum (size tnum) (bigness tnum) n + | _ when t <= RowElementTags.TypeDefOrRefOrSpecMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.TypeDefOrRefOrSpecMin) 2 tdorBigness n + | _ when t <= RowElementTags.TypeOrMethodDefMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.TypeOrMethodDefMin) 1 tomdBigness n + | _ when t <= RowElementTags.HasConstantMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.HasConstantMin) 2 hcBigness n + | _ when t <= RowElementTags.HasCustomAttributeMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.HasCustomAttributeMin) 5 hcaBigness n + | _ when t <= RowElementTags.HasFieldMarshalMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.HasFieldMarshalMin) 1 hfmBigness n + | _ when t <= RowElementTags.HasDeclSecurityMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.HasDeclSecurityMin) 2 hdsBigness n + | _ when t <= RowElementTags.MemberRefParentMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.MemberRefParentMin) 3 mrpBigness n + | _ when t <= RowElementTags.HasSemanticsMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.HasSemanticsMin) 1 hsBigness n + | _ when t <= RowElementTags.MethodDefOrRefMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.MethodDefOrRefMin) 1 mdorBigness n + | _ when t <= RowElementTags.MemberForwardedMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.MemberForwardedMin) 1 mfBigness n + | _ when t <= RowElementTags.ImplementationMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.ImplementationMin) 2 iBigness n + | _ when t <= RowElementTags.CustomAttributeTypeMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.CustomAttributeTypeMin) 3 catBigness n + | _ when t <= RowElementTags.ResolutionScopeMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.ResolutionScopeMin) 2 rsBigness n | _ -> failwith "invalid tag in row element" tablesBuf.Close() @@ -3375,74 +3384,74 @@ let writeILMetadataAndCode (generatePdb, desiredMetadataVersion, ilg, emitTailca reportTime showTimes "Layout Metadata" let metadata, guidStart = - let mdbuf = ByteBuffer.Create 500000 + let mdbuf = ByteBuffer.Create 500000 mdbuf.EmitIntsAsBytes - [| 0x42; 0x53; 0x4a; 0x42; // Magic signature - 0x01; 0x00; // Major version - 0x01; 0x00; // Minor version - |]; - mdbuf.EmitInt32 0x0; // Reserved - - mdbuf.EmitInt32 paddedVersionLength; - mdbuf.EmitBytes version; + [| 0x42; 0x53; 0x4a; 0x42 // Magic signature + 0x01; 0x00 // Major version + 0x01; 0x00 // Minor version + |] + mdbuf.EmitInt32 0x0 // Reserved + + mdbuf.EmitInt32 paddedVersionLength + mdbuf.EmitBytes version for i = 1 to (paddedVersionLength - Array.length version) do - mdbuf.EmitIntAsByte 0x00; + mdbuf.EmitIntAsByte 0x00 mdbuf.EmitBytes - [| 0x00uy; 0x00uy; // flags, reserved - b0 numStreams; b1 numStreams; |]; - mdbuf.EmitInt32 tablesChunk.addr; - mdbuf.EmitInt32 tablesChunk.size; - mdbuf.EmitIntsAsBytes [| 0x23; 0x7e; 0x00; 0x00; (* #~00 *)|]; - mdbuf.EmitInt32 stringsChunk.addr; - mdbuf.EmitInt32 stringsChunk.size; - mdbuf.EmitIntsAsBytes [| 0x23; 0x53; 0x74; 0x72; 0x69; 0x6e; 0x67; 0x73; 0x00; 0x00; 0x00; 0x00 (* "#Strings0000" *)|]; - mdbuf.EmitInt32 userStringsChunk.addr; - mdbuf.EmitInt32 userStringsChunk.size; - mdbuf.EmitIntsAsBytes [| 0x23; 0x55; 0x53; 0x00; (* #US0*) |]; - mdbuf.EmitInt32 guidsChunk.addr; - mdbuf.EmitInt32 guidsChunk.size; - mdbuf.EmitIntsAsBytes [| 0x23; 0x47; 0x55; 0x49; 0x44; 0x00; 0x00; 0x00; (* #GUID000 *)|]; - mdbuf.EmitInt32 blobsChunk.addr; - mdbuf.EmitInt32 blobsChunk.size; - mdbuf.EmitIntsAsBytes [| 0x23; 0x42; 0x6c; 0x6f; 0x62; 0x00; 0x00; 0x00; (* #Blob000 *)|]; + [| 0x00uy; 0x00uy // flags, reserved + b0 numStreams; b1 numStreams; |] + mdbuf.EmitInt32 tablesChunk.addr + mdbuf.EmitInt32 tablesChunk.size + mdbuf.EmitIntsAsBytes [| 0x23; 0x7e; 0x00; 0x00; (* #~00 *)|] + mdbuf.EmitInt32 stringsChunk.addr + mdbuf.EmitInt32 stringsChunk.size + mdbuf.EmitIntsAsBytes [| 0x23; 0x53; 0x74; 0x72; 0x69; 0x6e; 0x67; 0x73; 0x00; 0x00; 0x00; 0x00 (* "#Strings0000" *)|] + mdbuf.EmitInt32 userStringsChunk.addr + mdbuf.EmitInt32 userStringsChunk.size + mdbuf.EmitIntsAsBytes [| 0x23; 0x55; 0x53; 0x00; (* #US0*) |] + mdbuf.EmitInt32 guidsChunk.addr + mdbuf.EmitInt32 guidsChunk.size + mdbuf.EmitIntsAsBytes [| 0x23; 0x47; 0x55; 0x49; 0x44; 0x00; 0x00; 0x00; (* #GUID000 *)|] + mdbuf.EmitInt32 blobsChunk.addr + mdbuf.EmitInt32 blobsChunk.size + mdbuf.EmitIntsAsBytes [| 0x23; 0x42; 0x6c; 0x6f; 0x62; 0x00; 0x00; 0x00; (* #Blob000 *)|] - reportTime showTimes "Write Metadata Header"; + reportTime showTimes "Write Metadata Header" // Now the coded tables themselves - mdbuf.EmitBytes codedTables; + mdbuf.EmitBytes codedTables for i = 1 to tablesStreamPadding do - mdbuf.EmitIntAsByte 0x00; - reportTime showTimes "Write Metadata Tables"; + mdbuf.EmitIntAsByte 0x00 + reportTime showTimes "Write Metadata Tables" // The string stream - mdbuf.EmitByte 0x00uy; + mdbuf.EmitByte 0x00uy for s in strings do - mdbuf.EmitBytes s; + mdbuf.EmitBytes s for i = 1 to stringsStreamPadding do - mdbuf.EmitIntAsByte 0x00; - reportTime showTimes "Write Metadata Strings"; + mdbuf.EmitIntAsByte 0x00 + reportTime showTimes "Write Metadata Strings" // The user string stream - mdbuf.EmitByte 0x00uy; + mdbuf.EmitByte 0x00uy for s in userStrings do - mdbuf.EmitZ32 (s.Length + 1); - mdbuf.EmitBytes s; + mdbuf.EmitZ32 (s.Length + 1) + mdbuf.EmitBytes s mdbuf.EmitIntAsByte (markerForUnicodeBytes s) for i = 1 to userStringsStreamPadding do - mdbuf.EmitIntAsByte 0x00; + mdbuf.EmitIntAsByte 0x00 - reportTime showTimes "Write Metadata User Strings"; + reportTime showTimes "Write Metadata User Strings" // The GUID stream let guidStart = mdbuf.Position - Array.iter mdbuf.EmitBytes guids; + Array.iter mdbuf.EmitBytes guids // The blob stream - mdbuf.EmitByte 0x00uy; + mdbuf.EmitByte 0x00uy for s in blobs do - mdbuf.EmitZ32 s.Length; + mdbuf.EmitZ32 s.Length mdbuf.EmitBytes s for i = 1 to blobsStreamPadding do - mdbuf.EmitIntAsByte 0x00; - reportTime showTimes "Write Blob Stream"; + mdbuf.EmitIntAsByte 0x00 + reportTime showTimes "Write Blob Stream" // Done - close the buffer and return the result. mdbuf.Close(), guidStart @@ -3451,14 +3460,14 @@ let writeILMetadataAndCode (generatePdb, desiredMetadataVersion, ilg, emitTailca // uses of strings in the code for (codeStartAddr, l) in requiredStringFixups do for (codeOffset, userStringIndex) in l do - if codeStartAddr < codep.addr || codeStartAddr >= codep.addr + codep.size then - failwith "strings-in-code fixup: a group of fixups is located outside the code array"; - let locInCode = ((codeStartAddr + codeOffset) - codep.addr) - checkFixup32 code locInCode 0xdeadbeef; + if codeStartAddr < codep.addr || codeStartAddr >= codep.addr + codep.size then + failwith "strings-in-code fixup: a group of fixups is located outside the code array" + let locInCode = ((codeStartAddr + codeOffset) - codep.addr) + checkFixup32 code locInCode 0xdeadbeef let token = getUncodedToken TableNames.UserStrings (userStringAddress userStringIndex) - if (Bytes.get code (locInCode-1) <> i_ldstr) then failwith "strings-in-code fixup: not at ldstr instruction!"; + if (Bytes.get code (locInCode-1) <> i_ldstr) then failwith "strings-in-code fixup: not at ldstr instruction!" applyFixup32 code locInCode token - reportTime showTimes "Fixup Metadata"; + reportTime showTimes "Fixup Metadata" entryPointToken, code, codePadding, metadata, data, resources, !requiredDataFixups, pdbData, mappings, guidStart @@ -3495,39 +3504,39 @@ let msdosHeader : byte[] = 0x24uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy |] let writeInt64 (os: BinaryWriter) x = - os.Write (dw0 x); - os.Write (dw1 x); - os.Write (dw2 x); - os.Write (dw3 x); - os.Write (dw4 x); - os.Write (dw5 x); - os.Write (dw6 x); + os.Write (dw0 x) + os.Write (dw1 x) + os.Write (dw2 x) + os.Write (dw3 x) + os.Write (dw4 x) + os.Write (dw5 x) + os.Write (dw6 x) os.Write (dw7 x) let writeInt32 (os: BinaryWriter) x = - os.Write (byte (b0 x)); - os.Write (byte (b1 x)); - os.Write (byte (b2 x)); - os.Write (byte (b3 x)) + os.Write (byte (b0 x)) + os.Write (byte (b1 x)) + os.Write (byte (b2 x)) + os.Write (byte (b3 x)) let writeInt32AsUInt16 (os: BinaryWriter) x = - os.Write (byte (b0 x)); - os.Write (byte (b1 x)) + os.Write (byte (b0 x)) + os.Write (byte (b1 x)) let writeDirectory os dict = - writeInt32 os (if dict.size = 0x0 then 0x0 else dict.addr); + writeInt32 os (if dict.size = 0x0 then 0x0 else dict.addr) writeInt32 os dict.size -let writeBytes (os: BinaryWriter) (chunk:byte[]) = os.Write(chunk, 0, chunk.Length) +let writeBytes (os: BinaryWriter) (chunk: byte[]) = os.Write(chunk, 0, chunk.Length) let writeBinaryAndReportMappings (outfile, ilg: ILGlobals, pdbfile: string option, signer: ILStrongNameSigner option, portablePDB, embeddedPDB, embedAllSource, embedSourceList, sourceLink, emitTailcalls, deterministic, showTimes, dumpDebugInfo ) modul normalizeAssemblyRefs = - // Store the public key from the signer into the manifest. This means it will be written + // Store the public key from the signer into the manifest. This means it will be written // to the binary and also acts as an indicator to leave space for delay sign - reportTime showTimes "Write Started"; + reportTime showTimes "Write Started" let isDll = modul.IsDLL let signer = @@ -3535,13 +3544,13 @@ let writeBinaryAndReportMappings (outfile, | Some _, _ -> signer | _, None -> signer | None, Some {PublicKey=Some pubkey} -> - (dprintn "Note: The output assembly will be delay-signed using the original public"; - dprintn "Note: key. In order to load it you will need to either sign it with"; - dprintn "Note: the original private key or to turn off strong-name verification"; - dprintn "Note: (use sn.exe from the .NET Framework SDK to do this, e.g. 'sn -Vr *')."; - dprintn "Note: Alternatively if this tool supports it you can provide the original"; - dprintn "Note: private key when converting the assembly, assuming you have access to"; - dprintn "Note: it."; + (dprintn "Note: The output assembly will be delay-signed using the original public" + dprintn "Note: key. In order to load it you will need to either sign it with" + dprintn "Note: the original private key or to turn off strong-name verification" + dprintn "Note: (use sn.exe from the .NET Framework SDK to do this, e.g. 'sn -Vr *')." + dprintn "Note: Alternatively if this tool supports it you can provide the original" + dprintn "Note: private key when converting the assembly, assuming you have access to" + dprintn "Note: it." Some (ILStrongNameSigner.OpenPublicKey pubkey)) | _ -> signer @@ -3552,14 +3561,14 @@ let writeBinaryAndReportMappings (outfile, | Some s -> try Some s.PublicKey with e -> - failwith ("A call to StrongNameGetPublicKey failed ("+e.Message+")"); + failwith ("A call to StrongNameGetPublicKey failed ("+e.Message+")") None begin match modul.Manifest with | None -> () | Some m -> if m.PublicKey <> None && m.PublicKey <> pubkey then dprintn "Warning: The output assembly is being signed or delay-signed with a strong name that is different to the original." - end; + end { modul with Manifest = match modul.Manifest with None -> None | Some m -> Some {m with PublicKey = pubkey} } let os = @@ -3615,7 +3624,7 @@ let writeBinaryAndReportMappings (outfile, let headerSectionPhysSize = nextPhys - headerSectionPhysLoc let next = align alignVirt (headerAddr + headerSize) - // TEXT SECTION: 8 bytes IAT table 72 bytes CLI header + // TEXT SECTION: 8 bytes IAT table 72 bytes CLI header let textSectionPhysLoc = nextPhys let textSectionAddr = next @@ -3642,7 +3651,7 @@ let writeBinaryAndReportMappings (outfile, let entryPointToken, code, codePadding, metadata, data, resources, requiredDataFixups, pdbData, mappings, guidStart = writeILMetadataAndCode ((pdbfile <> None), desiredMetadataVersion, ilg, emitTailcalls, deterministic, showTimes) modul next normalizeAssemblyRefs - reportTime showTimes "Generated IL and metadata"; + reportTime showTimes "Generated IL and metadata" let _codeChunk, next = chunk code.Length next let _codePaddingChunk, next = chunk codePadding.Length next @@ -3675,7 +3684,7 @@ let writeBinaryAndReportMappings (outfile, let pdbOpt = match portablePDB with - | true -> + | true -> let (uncompressedLength, contentId, stream) as pdbStream = generatePortablePdb embedAllSource embedSourceList sourceLink showTimes pdbData deterministic @@ -3693,7 +3702,7 @@ let writeBinaryAndReportMappings (outfile, sizeof_IMAGE_DEBUG_DIRECTORY ) next // The debug data is given to us by the PDB writer and appears to - // typically be the type of the data plus the PDB file name. We fill + // typically be the type of the data plus the PDB file name. We fill // this in after we've written the binary. We approximate the size according // to what PDB writers seem to require and leave extra space just in case... let debugDataJustInCase = 40 @@ -3719,7 +3728,7 @@ let writeBinaryAndReportMappings (outfile, let next = align alignVirt (textSectionAddr + textSectionSize) // .RSRC SECTION (DATA) - let dataSectionPhysLoc = nextPhys + let dataSectionPhysLoc = nextPhys let dataSectionAddr = next let dataSectionVirtToPhys v = v - dataSectionAddr + dataSectionPhysLoc @@ -3762,8 +3771,8 @@ let writeBinaryAndReportMappings (outfile, let dataSectionPhysSize = nextPhys - dataSectionPhysLoc let next = align alignVirt (dataSectionAddr + dataSectionSize) - // .RELOC SECTION base reloc table: 0x0c size - let relocSectionPhysLoc = nextPhys + // .RELOC SECTION base reloc table: 0x0c size + let relocSectionPhysLoc = nextPhys let relocSectionAddr = next let baseRelocTableChunk, next = chunk 0x0c next @@ -3777,63 +3786,63 @@ let writeBinaryAndReportMappings (outfile, begin requiredDataFixups |> List.iter (fun (metadataOffset32, (dataOffset, kind)) -> - let metadataOffset = metadataOffset32 - if metadataOffset < 0 || metadataOffset >= metadata.Length - 4 then failwith "data RVA fixup: fixup located outside metadata"; - checkFixup32 metadata metadataOffset 0xdeaddddd; + let metadataOffset = metadataOffset32 + if metadataOffset < 0 || metadataOffset >= metadata.Length - 4 then failwith "data RVA fixup: fixup located outside metadata" + checkFixup32 metadata metadataOffset 0xdeaddddd let dataRva = if kind then let res = dataOffset - if res >= resourcesChunk.size then dprintn ("resource offset bigger than resource data section"); + if res >= resourcesChunk.size then dprintn ("resource offset bigger than resource data section") res else let res = rawdataChunk.addr + dataOffset - if res < rawdataChunk.addr then dprintn ("data rva before data section"); + if res < rawdataChunk.addr then dprintn ("data rva before data section") if res >= rawdataChunk.addr + rawdataChunk.size then dprintn ("data rva after end of data section, dataRva = "+string res+", rawdataChunk.addr = "+string rawdataChunk.addr - + ", rawdataChunk.size = "+string rawdataChunk.size); + + ", rawdataChunk.size = "+string rawdataChunk.size) res - applyFixup32 metadata metadataOffset dataRva); - end; + applyFixup32 metadata metadataOffset dataRva) + end // IMAGE TOTAL SIZE - let imageEndSectionPhysLoc = nextPhys + let imageEndSectionPhysLoc = nextPhys let imageEndAddr = next - reportTime showTimes "Layout image"; + reportTime showTimes "Layout image" let write p (os: BinaryWriter) chunkName chunk = match p with | None -> () | Some pExpected -> - os.Flush(); - let pCurrent = int32 os.BaseStream.Position + os.Flush() + let pCurrent = int32 os.BaseStream.Position if pCurrent <> pExpected then failwith ("warning: "+chunkName+" not where expected, pCurrent = "+string pCurrent+", p.addr = "+string pExpected) writeBytes os chunk let writePadding (os: BinaryWriter) _comment sz = - if sz < 0 then failwith "writePadding: size < 0"; + if sz < 0 then failwith "writePadding: size < 0" for i = 0 to sz - 1 do os.Write 0uy // Now we've computed all the offsets, write the image - write (Some msdosHeaderChunk.addr) os "msdos header" msdosHeader; + write (Some msdosHeaderChunk.addr) os "msdos header" msdosHeader - write (Some peSignatureChunk.addr) os "pe signature" [| |]; + write (Some peSignatureChunk.addr) os "pe signature" [| |] - writeInt32 os 0x4550; + writeInt32 os 0x4550 - write (Some peFileHeaderChunk.addr) os "pe file header" [| |]; + write (Some peFileHeaderChunk.addr) os "pe file header" [| |] if (modul.Platform = Some(AMD64)) then writeInt32AsUInt16 os 0x8664 // Machine - IMAGE_FILE_MACHINE_AMD64 elif isItanium then writeInt32AsUInt16 os 0x200 else - writeInt32AsUInt16 os 0x014c; // Machine - IMAGE_FILE_MACHINE_I386 + writeInt32AsUInt16 os 0x014c // Machine - IMAGE_FILE_MACHINE_I386 - writeInt32AsUInt16 os numSections; + writeInt32AsUInt16 os numSections let pdbData = if deterministic then @@ -3845,7 +3854,7 @@ let writeBinaryAndReportMappings (outfile, let final = [| hCode; hData; hMeta |] |> Array.collect id |> sha.ComputeHash // Confirm we have found the correct data and aren't corrupting the metadata - if metadata.[ guidStart..guidStart+3] <> [| 4uy; 3uy; 2uy; 1uy |] then failwith "Failed to find MVID" + if metadata.[ guidStart..guidStart+3] <> [| 4uy; 3uy; 2uy; 1uy |] then failwith "Failed to find MVID" if metadata.[ guidStart+12..guidStart+15] <> [| 4uy; 3uy; 2uy; 1uy |] then failwith "Failed to find MVID" // Update MVID guid in metadata @@ -3854,65 +3863,65 @@ let writeBinaryAndReportMappings (outfile, // Use last 4 bytes for timestamp - High bit set, to stop tool chains becoming confused let timestamp = int final.[16] ||| (int final.[17] <<< 8) ||| (int final.[18] <<< 16) ||| (int (final.[19] ||| 128uy) <<< 24) writeInt32 os timestamp - // Update pdbData with new guid and timestamp. Portable and embedded PDBs don't need the ModuleID + // Update pdbData with new guid and timestamp. Portable and embedded PDBs don't need the ModuleID // Full and PdbOnly aren't supported under deterministic builds currently, they rely on non-determinsitic Windows native code { pdbData with ModuleID = final.[0..15] ; Timestamp = timestamp } else writeInt32 os timestamp // date since 1970 pdbData - writeInt32 os 0x00; // Pointer to Symbol Table Always 0 + writeInt32 os 0x00 // Pointer to Symbol Table Always 0 // 00000090 - writeInt32 os 0x00; // Number of Symbols Always 0 - writeInt32AsUInt16 os peOptionalHeaderSize; // Size of the optional header, the format is described below. + writeInt32 os 0x00 // Number of Symbols Always 0 + writeInt32AsUInt16 os peOptionalHeaderSize // Size of the optional header, the format is described below. // 64bit: IMAGE_FILE_32BIT_MACHINE ||| IMAGE_FILE_LARGE_ADDRESS_AWARE // 32bit: IMAGE_FILE_32BIT_MACHINE // Yes, 32BIT_MACHINE is set for AMD64... let iMachineCharacteristic = match modul.Platform with | Some IA64 -> 0x20 | Some AMD64 -> 0x0120 | _ -> 0x0100 - writeInt32AsUInt16 os ((if isDll then 0x2000 else 0x0000) ||| 0x0002 ||| 0x0004 ||| 0x0008 ||| iMachineCharacteristic); + writeInt32AsUInt16 os ((if isDll then 0x2000 else 0x0000) ||| 0x0002 ||| 0x0004 ||| 0x0008 ||| iMachineCharacteristic) // Now comes optional header let peOptionalHeaderByte = peOptionalHeaderByteByCLRVersion desiredMetadataVersion - write (Some peOptionalHeaderChunk.addr) os "pe optional header" [| |]; + write (Some peOptionalHeaderChunk.addr) os "pe optional header" [| |] if modul.Is64Bit then writeInt32AsUInt16 os 0x020B // Magic number is 0x020B for 64-bit else - writeInt32AsUInt16 os 0x010b; // Always 0x10B (see Section 23.1). - writeInt32AsUInt16 os peOptionalHeaderByte; // ECMA spec says 6, some binaries, e.g. fscmanaged.exe say 7, Whidbey binaries say 8 - writeInt32 os textSectionPhysSize; // Size of the code (text) section, or the sum of all code sections if there are multiple sections. + writeInt32AsUInt16 os 0x010b // Always 0x10B (see Section 23.1). + writeInt32AsUInt16 os peOptionalHeaderByte // ECMA spec says 6, some binaries, e.g. fscmanaged.exe say 7, Whidbey binaries say 8 + writeInt32 os textSectionPhysSize // Size of the code (text) section, or the sum of all code sections if there are multiple sections. // 000000a0 - writeInt32 os dataSectionPhysSize; // Size of the initialized data section - writeInt32 os 0x00; // Size of the uninitialized data section - writeInt32 os entrypointCodeChunk.addr; // RVA of entry point , needs to point to bytes 0xFF 0x25 followed by the RVA+!0x4000000 - writeInt32 os textSectionAddr; // e.g. 0x0002000 + writeInt32 os dataSectionPhysSize // Size of the initialized data section + writeInt32 os 0x00 // Size of the uninitialized data section + writeInt32 os entrypointCodeChunk.addr // RVA of entry point, needs to point to bytes 0xFF 0x25 followed by the RVA+!0x4000000 + writeInt32 os textSectionAddr // e.g. 0x0002000 // 000000b0 if modul.Is64Bit then writeInt64 os ((int64)imageBaseReal) // REVIEW: For 64-bit, we should use a 64-bit image base else - writeInt32 os dataSectionAddr; // e.g. 0x0000c000 - writeInt32 os imageBaseReal; // Image Base Always 0x400000 (see Section 23.1). - QUERY : no it's not always 0x400000, e.g. 0x034f0000 + writeInt32 os dataSectionAddr // e.g. 0x0000c000 + writeInt32 os imageBaseReal // Image Base Always 0x400000 (see Section 23.1). - QUERY : no it's not always 0x400000, e.g. 0x034f0000 - writeInt32 os alignVirt; // Section Alignment Always 0x2000 (see Section 23.1). - writeInt32 os alignPhys; // File Alignment Either 0x200 or 0x1000. + writeInt32 os alignVirt // Section Alignment Always 0x2000 (see Section 23.1). + writeInt32 os alignPhys // File Alignment Either 0x200 or 0x1000. // 000000c0 - writeInt32AsUInt16 os 0x04; // OS Major Always 4 (see Section 23.1). - writeInt32AsUInt16 os 0x00; // OS Minor Always 0 (see Section 23.1). - writeInt32AsUInt16 os 0x00; // User Major Always 0 (see Section 23.1). - writeInt32AsUInt16 os 0x00; // User Minor Always 0 (see Section 23.1). + writeInt32AsUInt16 os 0x04 // OS Major Always 4 (see Section 23.1). + writeInt32AsUInt16 os 0x00 // OS Minor Always 0 (see Section 23.1). + writeInt32AsUInt16 os 0x00 // User Major Always 0 (see Section 23.1). + writeInt32AsUInt16 os 0x00 // User Minor Always 0 (see Section 23.1). do let (major, minor) = modul.SubsystemVersion - writeInt32AsUInt16 os major; - writeInt32AsUInt16 os minor; - writeInt32 os 0x00; // Reserved Always 0 (see Section 23.1). + writeInt32AsUInt16 os major + writeInt32AsUInt16 os minor + writeInt32 os 0x00 // Reserved Always 0 (see Section 23.1). // 000000d0 - writeInt32 os imageEndAddr; // Image Size: Size, in bytes, of image, including all headers and padding; - writeInt32 os headerSectionPhysSize; // Header Size Combined size of MS-DOS Header, PE Header, PE Optional Header and padding; - writeInt32 os 0x00; // File Checksum Always 0 (see Section 23.1). QUERY: NOT ALWAYS ZERO - writeInt32AsUInt16 os modul.SubSystemFlags; // SubSystem Subsystem required to run this image. + writeInt32 os imageEndAddr // Image Size: Size, in bytes, of image, including all headers and padding + writeInt32 os headerSectionPhysSize // Header Size Combined size of MS-DOS Header, PE Header, PE Optional Header and padding + writeInt32 os 0x00 // File Checksum Always 0 (see Section 23.1). QUERY: NOT ALWAYS ZERO + writeInt32AsUInt16 os modul.SubSystemFlags // SubSystem Subsystem required to run this image. // DLL Flags Always 0x400 (no unmanaged windows exception handling - see Section 23.1). // Itanium: see notes at end of file // IMAGE_DLLCHARACTERISTICS_NX_COMPAT: See FSharp 1.0 bug 5019 and http://blogs.msdn.com/ed_maurer/archive/2007/12/14/nxcompat-and-the-c-compiler.aspx @@ -3920,7 +3929,7 @@ let writeBinaryAndReportMappings (outfile, // x86 : IMAGE_DLLCHARACTERISTICS_ NO_SEH | IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE | IMAGE_DLLCHARACTERISTICS_NX_COMPAT // x64 : IMAGE_DLLCHARACTERISTICS_ NO_SEH | IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE | IMAGE_DLLCHARACTERISTICS_NX_COMPAT let dllCharacteristics = - let flags = + let flags = if modul.Is64Bit then (if isItanium then 0x8540 else 0x540) else 0x540 if modul.UseHighEntropyVA then flags ||| 0x20 // IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA @@ -3983,7 +3992,7 @@ let writeBinaryAndReportMappings (outfile, write (Some textSectionHeaderChunk.addr) os "text section header" [| |] // 00000178 - writeBytes os [| 0x2euy; 0x74uy; 0x65uy; 0x78uy; 0x74uy; 0x00uy; 0x00uy; 0x00uy; |] // ".text\000\000\000" + writeBytes os [| 0x2euy; 0x74uy; 0x65uy; 0x78uy; 0x74uy; 0x00uy; 0x00uy; 0x00uy; |] // ".text\000\000\000" // 00000180 writeInt32 os textSectionSize // VirtualSize: Total size of the section when loaded into memory in bytes rounded to Section Alignment. writeInt32 os textSectionAddr // VirtualAddress For executable images this is the address of the first byte of the section @@ -4013,7 +4022,7 @@ let writeBinaryAndReportMappings (outfile, // 000001c0 writeInt32AsUInt16 os 0x00 // NumberOfRelocations Number of relocations, set to 0 if unused. writeInt32AsUInt16 os 0x00 // NumberOfLinenumbers Always 0 (see Section 23.1). - writeBytes os [| 0x40uy; 0x00uy; 0x00uy; 0x40uy |] // Characteristics Flags: IMAGE_SCN_MEM_READ | IMAGE_SCN_CNT_INITIALIZED_DATA + writeBytes os [| 0x40uy; 0x00uy; 0x00uy; 0x40uy |] // Characteristics Flags: IMAGE_SCN_MEM_READ | IMAGE_SCN_CNT_INITIALIZED_DATA write (Some relocSectionHeaderChunk.addr) os "reloc section header" [| |] // 000001a0 @@ -4040,7 +4049,7 @@ let writeBinaryAndReportMappings (outfile, // e.g. 0x0200 write (Some (textV2P importAddrTableChunk.addr)) os "import addr table" [| |] writeInt32 os importNameHintTableChunk.addr - writeInt32 os 0x00 // QUERY 4 bytes of zeros not 2 like ECMA 24.3.1 says + writeInt32 os 0x00 // QUERY 4 bytes of zeros not 2 like ECMA 24.3.1 says // e.g. 0x0208 @@ -4053,7 +4062,7 @@ let writeBinaryAndReportMappings (outfile, let headerVersionMajor, headerVersionMinor = headerVersionSupportedByCLRVersion desiredMetadataVersion writePadding os "pad to cli header" cliHeaderPadding - write (Some (textV2P cliHeaderChunk.addr)) os "cli header" [| |] + write (Some (textV2P cliHeaderChunk.addr)) os "cli header" [| |] writeInt32 os 0x48 // size of header writeInt32AsUInt16 os headerVersionMajor // Major part of minimum version of CLR reqd. writeInt32AsUInt16 os headerVersionMinor // Minor part of minimum version of CLR reqd. ... @@ -4119,12 +4128,12 @@ let writeBinaryAndReportMappings (outfile, // Two zero bytes of hint, then Case sensitive, null-terminated ASCII string containing name to import. // Shall _CorExeMain a .exe file _CorDllMain for a .dll file. if isDll then - writeBytes os [| 0x00uy; 0x00uy; 0x5fuy; 0x43uy ; 0x6fuy; 0x72uy; 0x44uy; 0x6cuy; 0x6cuy; 0x4duy; 0x61uy; 0x69uy; 0x6euy; 0x00uy |] + writeBytes os [| 0x00uy; 0x00uy; 0x5fuy; 0x43uy ; 0x6fuy; 0x72uy; 0x44uy; 0x6cuy; 0x6cuy; 0x4duy; 0x61uy; 0x69uy; 0x6euy; 0x00uy |] else - writeBytes os [| 0x00uy; 0x00uy; 0x5fuy; 0x43uy; 0x6fuy; 0x72uy; 0x45uy; 0x78uy; 0x65uy; 0x4duy; 0x61uy; 0x69uy; 0x6euy; 0x00uy |] + writeBytes os [| 0x00uy; 0x00uy; 0x5fuy; 0x43uy; 0x6fuy; 0x72uy; 0x45uy; 0x78uy; 0x65uy; 0x4duy; 0x61uy; 0x69uy; 0x6euy; 0x00uy |] write (Some (textV2P mscoreeStringChunk.addr)) os "mscoree string" - [| 0x6duy; 0x73uy; 0x63uy; 0x6fuy ; 0x72uy; 0x65uy ; 0x65uy; 0x2euy ; 0x64uy; 0x6cuy ; 0x6cuy; 0x00uy ; |] + [| 0x6duy; 0x73uy; 0x63uy; 0x6fuy ; 0x72uy; 0x65uy ; 0x65uy; 0x2euy ; 0x64uy; 0x6cuy ; 0x6cuy; 0x00uy ; |] writePadding os "end of import tab" importTableChunkPadding @@ -4176,9 +4185,9 @@ let writeBinaryAndReportMappings (outfile, 0xA000 ||| (globalpointerCodeChunk.addr - ((globalpointerCodeChunk.addr / 4096) * 4096)) write (Some (relocV2P baseRelocTableChunk.addr)) os "base reloc table" - [| b0 entrypointFixupBlock; b1 entrypointFixupBlock; b2 entrypointFixupBlock; b3 entrypointFixupBlock; - 0x0cuy; 0x00uy; 0x00uy; 0x00uy; - b0 reloc; b1 reloc; + [| b0 entrypointFixupBlock; b1 entrypointFixupBlock; b2 entrypointFixupBlock; b3 entrypointFixupBlock + 0x0cuy; 0x00uy; 0x00uy; 0x00uy + b0 reloc; b1 reloc b0 reloc2; b1 reloc2; |] writePadding os "end of .reloc" (imageEndSectionPhysLoc - relocSectionPhysLoc - relocSectionSize) @@ -4246,7 +4255,7 @@ let writeBinaryAndReportMappings (outfile, for i in idd do // write the debug raw data as given us by the PDB writer os2.BaseStream.Seek (int64 (textV2P i.iddChunk.addr), SeekOrigin.Begin) |> ignore - if i.iddChunk.size < i.iddData.Length then failwith "Debug data area is not big enough. Debug info may not be usable" + if i.iddChunk.size < i.iddData.Length then failwith "Debug data area is not big enough. Debug info may not be usable" writeBytes os2 i.iddData os2.Dispose() with e -> @@ -4261,7 +4270,7 @@ let writeBinaryAndReportMappings (outfile, ignore debugEmbeddedPdbChunk reportTime showTimes "Finalize PDB" - /// Sign the binary. No further changes to binary allowed past this point! + /// Sign the binary. No further changes to binary allowed past this point! match signer with | None -> () | Some s -> @@ -4279,7 +4288,7 @@ let writeBinaryAndReportMappings (outfile, mappings type options = - { ilg: ILGlobals; + { ilg: ILGlobals pdbfile: string option portablePDB: bool embeddedPDB: bool @@ -4290,7 +4299,7 @@ type options = emitTailcalls : bool deterministic : bool showTimes: bool - dumpDebugInfo:bool } + dumpDebugInfo: bool } let WriteILBinary (outfile, (args: options), modul, normalizeAssemblyRefs) = writeBinaryAndReportMappings (outfile, diff --git a/src/fcs-fable/src/absil/ilwritepdb.fs b/src/fcs-fable/src/absil/ilwritepdb.fs index 58dd9c241b..09c765ed41 100644 --- a/src/fcs-fable/src/absil/ilwritepdb.fs +++ b/src/fcs-fable/src/absil/ilwritepdb.fs @@ -31,17 +31,17 @@ type BlobBuildingStream () = override this.CanSeek = false override this.Length = int64(builder.Count) - override this.Write(buffer:byte array, offset:int, count:int) = builder.WriteBytes(buffer, offset, count) - override this.WriteByte(value:byte) = builder.WriteByte(value) - member this.WriteInt32(value:int) = builder.WriteInt32(value) + override this.Write(buffer: byte array, offset: int, count: int) = builder.WriteBytes(buffer, offset, count) + override this.WriteByte(value: byte) = builder.WriteByte(value) + member this.WriteInt32(value: int) = builder.WriteInt32(value) member this.ToImmutableArray() = builder.ToImmutableArray() - member this.TryWriteBytes(stream:Stream, length:int) = builder.TryWriteBytes(stream, length) + member this.TryWriteBytes(stream: Stream, length: int) = builder.TryWriteBytes(stream, length) override this.Flush() = () - override this.Dispose(_disposing:bool) = () - override this.Seek(_offset:int64, _origin:SeekOrigin) = raise (new NotSupportedException()) - override this.Read(_buffer:byte array, _offset:int, _count:int) = raise (new NotSupportedException()) - override this.SetLength(_value:int64) = raise (new NotSupportedException()) + override this.Dispose(_disposing: bool) = () + override this.Seek(_offset: int64, _origin: SeekOrigin) = raise (new NotSupportedException()) + override this.Read(_buffer: byte array, _offset: int, _count: int) = raise (new NotSupportedException()) + override this.SetLength(_value: int64) = raise (new NotSupportedException()) override val Position = 0L with get, set // -------------------------------------------------------------------- @@ -78,7 +78,7 @@ type PdbSequencePoint = type PdbMethodData = { MethToken: int32 - MethName:string + MethName: string LocalSignatureToken: int32 Params: PdbLocalVar array RootScope: PdbMethodScope option @@ -117,19 +117,19 @@ type BinaryChunk = addr: int32 } type idd = - { iddCharacteristics: int32; + { iddCharacteristics: int32 iddMajorVersion: int32; (* actually u16 in IMAGE_DEBUG_DIRECTORY *) iddMinorVersion: int32; (* actually u16 in IMAGE_DEBUG_DIRECTORY *) - iddType: int32; - iddTimestamp: int32; - iddData: byte[]; + iddType: int32 + iddTimestamp: int32 + iddData: byte[] iddChunk: BinaryChunk } //--------------------------------------------------------------------- // Portable PDB Writer //--------------------------------------------------------------------- let cvMagicNumber = 0x53445352L -let pdbGetCvDebugInfo (mvid:byte[]) (timestamp:int32) (filepath:string) (cvChunk:BinaryChunk) = +let pdbGetCvDebugInfo (mvid: byte[]) (timestamp: int32) (filepath: string) (cvChunk: BinaryChunk) = let iddCvBuffer = // Debug directory entry let path = (System.Text.Encoding.UTF8.GetBytes filepath) @@ -143,17 +143,17 @@ let pdbGetCvDebugInfo (mvid:byte[]) (timestamp:int32) (filepath:string) (cvChunk let (offset, size) = (offset + size, path.Length) // Path to pdb string Buffer.BlockCopy(path, 0, buffer, offset, size) buffer - { iddCharacteristics = 0; // Reserved - iddMajorVersion = 0x0100; // VersionMajor should be 0x0100 - iddMinorVersion = 0x504d; // VersionMinor should be 0x504d - iddType = 2; // IMAGE_DEBUG_TYPE_CODEVIEW - iddTimestamp = timestamp; - iddData = iddCvBuffer; // Path name to the pdb file when built - iddChunk = cvChunk; + { iddCharacteristics = 0 // Reserved + iddMajorVersion = 0x0100 // VersionMajor should be 0x0100 + iddMinorVersion = 0x504d // VersionMinor should be 0x504d + iddType = 2 // IMAGE_DEBUG_TYPE_CODEVIEW + iddTimestamp = timestamp + iddData = iddCvBuffer // Path name to the pdb file when built + iddChunk = cvChunk } let pdbMagicNumber= 0x4244504dL -let pdbGetPdbDebugInfo (embeddedPDBChunk:BinaryChunk) (uncompressedLength:int64) (stream:MemoryStream) = +let pdbGetPdbDebugInfo (embeddedPDBChunk: BinaryChunk) (uncompressedLength: int64) (stream: MemoryStream) = let iddPdbBuffer = let buffer = Array.zeroCreate (sizeof + sizeof + int(stream.Length)) let (offset, size) = (0, sizeof) // Magic Number dword: 0x4244504dL @@ -163,19 +163,19 @@ let pdbGetPdbDebugInfo (embeddedPDBChunk:BinaryChunk) (uncompressedLength:int64) let (offset, size) = (offset + size, int(stream.Length)) // Uncompressed size Buffer.BlockCopy(stream.ToArray(), 0, buffer, offset, size) buffer - { iddCharacteristics = 0; // Reserved - iddMajorVersion = 0; // VersionMajor should be 0 - iddMinorVersion = 0x0100; // VersionMinor should be 0x0100 - iddType = 17; // IMAGE_DEBUG_TYPE_EMBEDDEDPDB - iddTimestamp = 0; - iddData = iddPdbBuffer; // Path name to the pdb file when built - iddChunk = embeddedPDBChunk; + { iddCharacteristics = 0 // Reserved + iddMajorVersion = 0 // VersionMajor should be 0 + iddMinorVersion = 0x0100 // VersionMinor should be 0x0100 + iddType = 17 // IMAGE_DEBUG_TYPE_EMBEDDEDPDB + iddTimestamp = 0 + iddData = iddPdbBuffer // Path name to the pdb file when built + iddChunk = embeddedPDBChunk } -let pdbGetDebugInfo (mvid:byte[]) (timestamp:int32) (filepath:string) (cvChunk:BinaryChunk) (embeddedPDBChunk:BinaryChunk option) (uncompressedLength:int64) (stream:MemoryStream option)= +let pdbGetDebugInfo (mvid: byte[]) (timestamp: int32) (filepath: string) (cvChunk: BinaryChunk) (embeddedPDBChunk: BinaryChunk option) (uncompressedLength: int64) (stream: MemoryStream option) = match stream, embeddedPDBChunk with | None, _ | _, None -> [| pdbGetCvDebugInfo mvid timestamp filepath cvChunk |] - | Some s, Some chunk -> [| pdbGetCvDebugInfo mvid timestamp filepath cvChunk; pdbGetPdbDebugInfo chunk uncompressedLength s; |] + | Some s, Some chunk -> [| pdbGetCvDebugInfo mvid timestamp filepath cvChunk; pdbGetPdbDebugInfo chunk uncompressedLength s |] // Document checksum algorithms let guidSourceHashMD5 = System.Guid(0x406ea660u, 0x64cfus, 0x4c82us, 0xb6uy, 0xf0uy, 0x42uy, 0xd4uy, 0x81uy, 0x72uy, 0xa7uy, 0x99uy) //406ea660-64cf-4c82-b6f0-42d48172a799 @@ -184,7 +184,7 @@ let hashSizeOfMD5 = 16 // If the FIPS algorithm policy is enabled on the computer (e.g., for US government employees and contractors) // then obtaining the MD5 implementation in BCL will throw. // In this case, catch the failure, and not set a checksum. -let checkSum (url:string) = +let checkSum (url: string) = try use file = FileSystem.FileStreamReadShim(url) use md5 = System.Security.Cryptography.MD5.Create() @@ -219,7 +219,7 @@ let getRowCounts tableRowCounts = tableRowCounts |> Seq.iter(fun x -> builder.Add(x)) builder.MoveToImmutable() -let generatePortablePdb (embedAllSource:bool) (embedSourceList:string list) (sourceLink:string) showTimes (info:PdbData) isDeterministic = +let generatePortablePdb (embedAllSource: bool) (embedSourceList: string list) (sourceLink: string) showTimes (info: PdbData) isDeterministic = sortMethods showTimes info let externalRowCounts = getRowCounts info.TableRowCounts let docs = @@ -228,7 +228,7 @@ let generatePortablePdb (embedAllSource:bool) (embedSourceList:string list) (sou | _ -> info.Documents let metadata = MetadataBuilder() - let serializeDocumentName (name:string) = + let serializeDocumentName (name: string) = let count s c = s |> Seq.filter(fun ch -> if c = ch then true else false) |> Seq.length let s1, s2 = '/', '\\' @@ -407,7 +407,7 @@ let generatePortablePdb (embedAllSource:bool) (embedSourceList:string list) (sou // Write the scopes let nextHandle handle = MetadataTokens.LocalVariableHandle(MetadataTokens.GetRowNumber(LocalVariableHandle.op_Implicit(handle)) + 1) let writeMethodScope scope = - let scopeSorter (scope1:PdbMethodScope) (scope2:PdbMethodScope) = + let scopeSorter (scope1: PdbMethodScope) (scope2: PdbMethodScope) = if scope1.StartOffset > scope2.StartOffset then 1 elif scope1.StartOffset < scope2.StartOffset then -1 elif (scope1.EndOffset - scope1.StartOffset) > (scope2.EndOffset - scope2.StartOffset) then -1 @@ -452,7 +452,7 @@ let generatePortablePdb (embedAllSource:bool) (embedSourceList:string list) (sou match isDeterministic with | false -> null | true -> - let convert (content:IEnumerable) = + let convert (content: IEnumerable) = use sha = System.Security.Cryptography.SHA1.Create() // IncrementalHash is core only let hash = content |> Seq.collect (fun c -> c.GetBytes().Array |> sha.ComputeHash) @@ -468,20 +468,20 @@ let generatePortablePdb (embedAllSource:bool) (embedSourceList:string list) (sou reportTime showTimes "PDB: Created" (portablePdbStream.Length, contentId, portablePdbStream) -let compressPortablePdbStream (uncompressedLength:int64) (contentId:BlobContentId) (stream:MemoryStream) = +let compressPortablePdbStream (uncompressedLength: int64) (contentId: BlobContentId) (stream: MemoryStream) = let compressedStream = new MemoryStream() use compressionStream = new DeflateStream(compressedStream, CompressionMode.Compress,true) stream.WriteTo(compressionStream) (uncompressedLength, contentId, compressedStream) -let writePortablePdbInfo (contentId:BlobContentId) (stream:MemoryStream) showTimes fpdb cvChunk = +let writePortablePdbInfo (contentId: BlobContentId) (stream: MemoryStream) showTimes fpdb cvChunk = try FileSystem.FileDelete fpdb with _ -> () use pdbFile = new FileStream(fpdb, FileMode.Create, FileAccess.ReadWrite) stream.WriteTo(pdbFile) reportTime showTimes "PDB: Closed" pdbGetDebugInfo (contentId.Guid.ToByteArray()) (int32 (contentId.Stamp)) fpdb cvChunk None 0L None -let embedPortablePdbInfo (uncompressedLength:int64) (contentId:BlobContentId) (stream:MemoryStream) showTimes fpdb cvChunk pdbChunk = +let embedPortablePdbInfo (uncompressedLength: int64) (contentId: BlobContentId) (stream: MemoryStream) showTimes fpdb cvChunk pdbChunk = reportTime showTimes "PDB: Closed" let fn = Path.GetFileName(fpdb) pdbGetDebugInfo (contentId.Guid.ToByteArray()) (int32 (contentId.Stamp)) fn cvChunk (Some pdbChunk) uncompressedLength (Some stream) @@ -579,14 +579,14 @@ let writePdbInfo showTimes f fpdb info cvChunk = let res = pdbWriteDebugInfo !pdbw for pdbDoc in docs do pdbCloseDocument pdbDoc - pdbClose !pdbw f fpdb; + pdbClose !pdbw f fpdb reportTime showTimes "PDB: Closed" - [| { iddCharacteristics = res.iddCharacteristics; - iddMajorVersion = res.iddMajorVersion; - iddMinorVersion = res.iddMinorVersion; - iddType = res.iddType; - iddTimestamp = info.Timestamp; + [| { iddCharacteristics = res.iddCharacteristics + iddMajorVersion = res.iddMajorVersion + iddMinorVersion = res.iddMinorVersion + iddType = res.iddType + iddTimestamp = info.Timestamp iddData = res.iddData iddChunk = cvChunk } |] #endif @@ -622,15 +622,15 @@ let (?) this memb (args:'Args) : 'R = // Creating instances of needed classes from 'Mono.CompilerServices.SymbolWriter' assembly let monoCompilerSvc = new AssemblyName("Mono.CompilerServices.SymbolWriter, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756") -let ctor (asmName:AssemblyName) clsName (args:obj[]) = +let ctor (asmName: AssemblyName) clsName (args: obj[]) = let asm = Assembly.Load(asmName) let ty = asm.GetType(clsName) System.Activator.CreateInstance(ty, args) -let createSourceMethodImpl (name:string) (token:int) (namespaceID:int) = +let createSourceMethodImpl (name: string) (token: int) (namespaceID: int) = ctor monoCompilerSvc "Mono.CompilerServices.SymbolWriter.SourceMethodImpl" [| box name; box token; box namespaceID |] -let createWriter (f:string) = +let createWriter (f: string) = ctor monoCompilerSvc "Mono.CompilerServices.SymbolWriter.MonoSymbolWriter" [| box f |] //--------------------------------------------------------------------- @@ -675,7 +675,7 @@ let writeMdbInfo fmdb f info = wr?MarkSequencePoint(sp.Offset, cue?get_SourceFile(), sp.Line, sp.Column, false) // Walk through the tree of scopes and write all variables - let rec writeScope (scope:PdbMethodScope) = + let rec writeScope (scope: PdbMethodScope) = wr?OpenScope(scope.StartOffset) |> ignore for local in scope.Locals do wr?DefineLocalVariable(local.Index, local.Name) @@ -701,7 +701,7 @@ let writeMdbInfo fmdb f info = //--------------------------------------------------------------------- open Printf -let logDebugInfo (outfile:string) (info:PdbData) = +let logDebugInfo (outfile: string) (info: PdbData) = use sw = new StreamWriter(new FileStream(outfile + ".debuginfo", FileMode.Create)) fprintfn sw "ENTRYPOINT\r\n %b\r\n" info.EntryPoint.IsSome @@ -727,7 +727,7 @@ let logDebugInfo (outfile:string) (info:PdbData) = // Walk through the tree of scopes and write all variables fprintfn sw " Scopes:" - let rec writeScope offs (scope:PdbMethodScope) = + let rec writeScope offs (scope: PdbMethodScope) = fprintfn sw " %s- [%d-%d]" offs scope.StartOffset scope.EndOffset if scope.Locals.Length > 0 then fprintfn sw " %s Locals: %A" offs [ for p in scope.Locals -> sprintf "%d: %s" p.Index p.Name ] diff --git a/src/fcs-fable/src/absil/zmap.fs b/src/fcs-fable/src/absil/zmap.fs index 4702eec5c7..9644a135c1 100755 --- a/src/fcs-fable/src/absil/zmap.fs +++ b/src/fcs-fable/src/absil/zmap.fs @@ -13,35 +13,35 @@ module internal Zmap = let empty (ord: IComparer<'T>) = Map<_,_,_>.Empty(ord) - let add k v (m:Zmap<_,_>) = m.Add(k,v) - let find k (m:Zmap<_,_>) = m.[k] - let tryFind k (m:Zmap<_,_>) = m.TryFind(k) - let remove k (m:Zmap<_,_>) = m.Remove(k) - let mem k (m:Zmap<_,_>) = m.ContainsKey(k) - let iter f (m:Zmap<_,_>) = m.Iterate(f) - let first f (m:Zmap<_,_>) = m.First(fun k v -> if f k v then Some (k,v) else None) - let exists f (m:Zmap<_,_>) = m.Exists(f) - let forall f (m:Zmap<_,_>) = m.ForAll(f) - let map f (m:Zmap<_,_>) = m.MapRange(f) - let mapi f (m:Zmap<_,_>) = m.Map(f) - let fold f (m:Zmap<_,_>) x = m.Fold f x - let toList (m:Zmap<_,_>) = m.ToList() - let foldSection lo hi f (m:Zmap<_,_>) x = m.FoldSection lo hi f x - - let isEmpty (m:Zmap<_,_>) = m.IsEmpty - - let foldMap f z (m:Zmap<_,_>) = + let add k v (m: Zmap<_,_>) = m.Add(k,v) + let find k (m: Zmap<_,_>) = m.[k] + let tryFind k (m: Zmap<_,_>) = m.TryFind(k) + let remove k (m: Zmap<_,_>) = m.Remove(k) + let mem k (m: Zmap<_,_>) = m.ContainsKey(k) + let iter f (m: Zmap<_,_>) = m.Iterate(f) + let first f (m: Zmap<_,_>) = m.First(fun k v -> if f k v then Some (k,v) else None) + let exists f (m: Zmap<_,_>) = m.Exists(f) + let forall f (m: Zmap<_,_>) = m.ForAll(f) + let map f (m: Zmap<_,_>) = m.MapRange(f) + let mapi f (m: Zmap<_,_>) = m.Map(f) + let fold f (m: Zmap<_,_>) x = m.Fold f x + let toList (m: Zmap<_,_>) = m.ToList() + let foldSection lo hi f (m: Zmap<_,_>) x = m.FoldSection lo hi f x + + let isEmpty (m: Zmap<_,_>) = m.IsEmpty + + let foldMap f z (m: Zmap<_,_>) = let m,z = m.FoldAndMap (fun k v z -> let z,v' = f z k v in v',z) z in z,m - let choose f (m:Zmap<_,_>) = m.First(f) + let choose f (m: Zmap<_,_>) = m.First(f) - let chooseL f (m:Zmap<_,_>) = + let chooseL f (m: Zmap<_,_>) = m.Fold (fun k v s -> match f k v with None -> s | Some x -> x::s) [] let ofList ord xs = Internal.Utilities.Collections.Tagged.Map<_,_>.FromList(ord,xs) - let keys (m:Zmap<_,_>) = m.Fold (fun k _ s -> k::s) [] - let values (m:Zmap<_,_>) = m.Fold (fun _ v s -> v::s) [] + let keys (m: Zmap<_,_>) = m.Fold (fun k _ s -> k::s) [] + let values (m: Zmap<_,_>) = m.Fold (fun _ v s -> v::s) [] let memberOf m k = mem k m diff --git a/src/fcs-fable/src/absil/zset.fs b/src/fcs-fable/src/absil/zset.fs index 2f626674c8..5d6588a598 100755 --- a/src/fcs-fable/src/absil/zset.fs +++ b/src/fcs-fable/src/absil/zset.fs @@ -17,27 +17,40 @@ module internal Zset = let empty (ord : IComparer<'T>) = Internal.Utilities.Collections.Tagged.Set<_,_>.Empty(ord) - let isEmpty (s:Zset<_>) = s.IsEmpty + let isEmpty (s: Zset<_>) = s.IsEmpty + + let contains x (s: Zset<_>) = s.Contains(x) + + let add x (s: Zset<_>) = s.Add(x) - let contains x (s:Zset<_>) = s.Contains(x) - let add x (s:Zset<_>) = s.Add(x) let addList xs a = List.fold (fun a x -> add x a) a xs let singleton ord x = add x (empty ord) - let remove x (s:Zset<_>) = s.Remove(x) - - let fold (f : 'T -> 'b -> 'b) (s:Zset<_>) b = s.Fold f b - let iter f (s:Zset<_>) = s.Iterate f - let forall p (s:Zset<_>) = s.ForAll p - let count (s:Zset<_>) = s.Count - let exists p (s:Zset<_>) = s.Exists p - let subset (s1:Zset<_>) (s2:Zset<_>) = s1.IsSubsetOf s2 - let equal (s1:Zset<_>) (s2:Zset<_>) = Internal.Utilities.Collections.Tagged.Set<_,_>.Equality(s1,s2) - let elements (s:Zset<_>) = s.ToList() - let filter p (s:Zset<_>) = s.Filter p - - let union (s1:Zset<_>) (s2:Zset<_>) = Internal.Utilities.Collections.Tagged.Set<_,_>.Union(s1,s2) - let inter (s1:Zset<_>) (s2:Zset<_>) = Internal.Utilities.Collections.Tagged.Set<_,_>.Intersection(s1,s2) - let diff (s1:Zset<_>) (s2:Zset<_>) = Internal.Utilities.Collections.Tagged.Set<_,_>.Difference(s1,s2) + + let remove x (s: Zset<_>) = s.Remove(x) + + let fold (f : 'T -> 'b -> 'b) (s: Zset<_>) b = s.Fold f b + + let iter f (s: Zset<_>) = s.Iterate f + + let forall p (s: Zset<_>) = s.ForAll p + + let count (s: Zset<_>) = s.Count + + let exists p (s: Zset<_>) = s.Exists p + + let subset (s1: Zset<_>) (s2: Zset<_>) = s1.IsSubsetOf s2 + + let equal (s1: Zset<_>) (s2: Zset<_>) = Internal.Utilities.Collections.Tagged.Set<_,_>.Equality(s1,s2) + + let elements (s: Zset<_>) = s.ToList() + + let filter p (s: Zset<_>) = s.Filter p + + let union (s1: Zset<_>) (s2: Zset<_>) = Internal.Utilities.Collections.Tagged.Set<_,_>.Union(s1,s2) + + let inter (s1: Zset<_>) (s2: Zset<_>) = Internal.Utilities.Collections.Tagged.Set<_,_>.Intersection(s1,s2) + + let diff (s1: Zset<_>) (s2: Zset<_>) = Internal.Utilities.Collections.Tagged.Set<_,_>.Difference(s1,s2) let memberOf m k = contains k m diff --git a/src/fcs-fable/src/buildtools/buildtools.targets b/src/fcs-fable/src/buildtools/buildtools.targets index 9b00e18cf7..8aaf703ad0 100644 --- a/src/fcs-fable/src/buildtools/buildtools.targets +++ b/src/fcs-fable/src/buildtools/buildtools.targets @@ -1,10 +1,15 @@ - dotnet - dotnet.exe - + + dotnet + dotnet.exe + + $(DOTNET_HOST_PATH) $(DotNetExe) + + + $(DotNetExePath) @@ -15,14 +20,14 @@ BeforeTargets="CoreCompile"> - $(ArtifactsBinDir)\fslex\Proto\netcoreapp2.0\fslex.dll + $(ArtifactsDir)\bin\fslex\Proto\netcoreapp2.0\fslex.dll - + @@ -38,14 +43,14 @@ BeforeTargets="CoreCompile"> - $(ArtifactsBinDir)\fsyacc\Proto\netcoreapp2.0\fsyacc.dll + $(ArtifactsDir)\bin\fsyacc\Proto\netcoreapp2.0\fsyacc.dll - + diff --git a/src/fcs-fable/src/buildtools/fslex/fslex.fs b/src/fcs-fable/src/buildtools/fslex/fslex.fs index e35f955914..98966fdfaf 100644 --- a/src/fcs-fable/src/buildtools/fslex/fslex.fs +++ b/src/fcs-fable/src/buildtools/fslex/fslex.fs @@ -13,7 +13,7 @@ open System.Collections.Generic open System.IO //------------------------------------------------------------------ -// This code is duplicated from FSharp.Compiler.UnicodeLexing +// This code is duplicated from Microsoft.FSharp.Compiler.UnicodeLexing type Lexbuf = LexBuffer @@ -32,7 +32,7 @@ let UnicodeFileAsLexbuf (filename,codePage : int option) : FileStream * StreamRe | None -> new StreamReader(stream,true) | Some n -> new StreamReader(stream,System.Text.Encoding.GetEncoding(n)) let lexbuf = LexBuffer.FromFunction(reader.Read) - lexbuf.EndPos <- Position.FirstLine(filename); + lexbuf.EndPos <- Position.FirstLine(filename) stream, reader, lexbuf //------------------------------------------------------------------ @@ -43,15 +43,15 @@ let out = ref None let inputCodePage = ref None let light = ref None -let mutable lexlib = "Microsoft.FSharp.Text.Lexing" +let mutable lexlib = "FSharp.Text.Lexing" let usage = - [ ArgInfo ("-o", ArgType.String (fun s -> out := Some s), "Name the output file."); - ArgInfo ("--codepage", ArgType.Int (fun i -> inputCodePage := Some i), "Assume input lexer specification file is encoded with the given codepage."); - ArgInfo ("--light", ArgType.Unit (fun () -> light := Some true), "(ignored)"); - ArgInfo ("--light-off", ArgType.Unit (fun () -> light := Some false), "Add #light \"off\" to the top of the generated file"); - ArgInfo ("--lexlib", ArgType.String (fun s -> lexlib <- s), "Specify the namespace for the implementation of the lexer table interpreter (default Microsoft.FSharp.Text.Lexing)"); - ArgInfo ("--unicode", ArgType.Set unicode, "Produce a lexer for use with 16-bit unicode characters."); + [ ArgInfo ("-o", ArgType.String (fun s -> out := Some s), "Name the output file.") + ArgInfo ("--codepage", ArgType.Int (fun i -> inputCodePage := Some i), "Assume input lexer specification file is encoded with the given codepage.") + ArgInfo ("--light", ArgType.Unit (fun () -> light := Some true), "(ignored)") + ArgInfo ("--light-off", ArgType.Unit (fun () -> light := Some false), "Add #light \"off\" to the top of the generated file") + ArgInfo ("--lexlib", ArgType.String (fun s -> lexlib <- s), "Specify the namespace for the implementation of the lexer table interpreter (default FSharp.Text.Lexing)") + ArgInfo ("--unicode", ArgType.Set unicode, "Produce a lexer for use with 16-bit unicode characters.") ] let _ = ArgParser.Parse(usage, (fun x -> match !input with Some _ -> failwith "more than one input given" | None -> input := Some x), "fslex ") @@ -59,16 +59,15 @@ let _ = ArgParser.Parse(usage, (fun x -> match !input with Some _ -> failwith "m let outputInt (os: TextWriter) (n:int) = os.Write(string n) let outputCodedUInt16 (os: #TextWriter) (n:int) = - os.Write n; - os.Write "us; "; + os.Write n + os.Write "us; " let sentinel = 255 * 256 + 255 let lineCount = ref 0 let cfprintfn (os: #TextWriter) fmt = Printf.kfprintf (fun () -> incr lineCount; os.WriteLine()) os fmt -[] -let main(args: string[]) = +let main() = try let filename = (match !input with Some x -> x | None -> failwith "no input given") let domain = if !unicode then "Unicode" else "Ascii" @@ -82,14 +81,14 @@ let main(args: string[]) = eprintf "%s(%d,%d): error: %s" filename lexbuf.StartPos.Line lexbuf.StartPos.Column (match e with | Failure s -> s - | _ -> e.Message); + | _ -> e.Message) exit 1 - printfn "compiling to dfas (can take a while...)"; + printfn "compiling to dfas (can take a while...)" let perRuleData, dfaNodes = AST.Compile spec let dfaNodes = dfaNodes |> List.sortBy (fun n -> n.Id) - printfn "%d states" dfaNodes.Length; - printfn "writing output"; + printfn "%d states" dfaNodes.Length + printfn "writing output" let output = match !out with @@ -99,21 +98,21 @@ let main(args: string[]) = use os = System.IO.File.CreateText output if (!light = Some(false)) || (!light = None && (Path.HasExtension(output) && Path.GetExtension(output) = ".ml")) then - cfprintfn os "#light \"off\""; + cfprintfn os "#light \"off\"" let printLinesIfCodeDefined (code,pos:Position) = if pos <> Position.Empty // If bottom code is unspecified, then position is empty. then - cfprintfn os "# %d \"%s\"" pos.Line pos.FileName; - cfprintfn os "%s" code; + cfprintfn os "# %d \"%s\"" pos.Line pos.FileName + cfprintfn os "%s" code printLinesIfCodeDefined spec.TopCode let code = fst spec.TopCode - lineCount := !lineCount + code.Replace("\r","").Split([| '\n' |]).Length; - cfprintfn os "# %d \"%s\"" !lineCount output; + lineCount := !lineCount + code.Replace("\r","").Split([| '\n' |]).Length + cfprintfn os "# %d \"%s\"" !lineCount output - cfprintfn os "let trans : uint16[] array = "; - cfprintfn os " [| "; + cfprintfn os "let trans : uint16[] array = " + cfprintfn os " [| " if !unicode then let specificUnicodeChars = GetSpecificUnicodeChars() // This emits a (numLowUnicodeChars+NumUnicodeCategories+(2*#specificUnicodeChars)+1) * #states array of encoded UInt16 values @@ -128,8 +127,8 @@ let main(args: string[]) = // // For the SpecificUnicodeChars the entries are char/next-state pairs. for state in dfaNodes do - cfprintfn os " (* State %d *)" state.Id; - fprintf os " [| "; + cfprintfn os " (* State %d *)" state.Id + fprintf os " [| " let trans = let dict = new Dictionary<_,_>() state.Transitions |> List.iter dict.Add @@ -141,15 +140,15 @@ let main(args: string[]) = outputCodedUInt16 os sentinel for i = 0 to numLowUnicodeChars-1 do let c = char i - emit (EncodeChar c); + emit (EncodeChar c) for c in specificUnicodeChars do - outputCodedUInt16 os (int c); - emit (EncodeChar c); + outputCodedUInt16 os (int c) + emit (EncodeChar c) for i = 0 to NumUnicodeCategories-1 do - emit (EncodeUnicodeCategoryIndex i); - emit Eof; + emit (EncodeUnicodeCategoryIndex i) + emit Eof cfprintfn os "|];" - done; + done else // Each row for the ASCII table has format @@ -160,8 +159,8 @@ let main(args: string[]) = // This emits a (256+1) * #states array of encoded UInt16 values for state in dfaNodes do - cfprintfn os " (* State %d *)" state.Id; - fprintf os " [|"; + cfprintfn os " (* State %d *)" state.Id + fprintf os " [|" let trans = let dict = new Dictionary<_,_>() state.Transitions |> List.iter dict.Add @@ -173,52 +172,51 @@ let main(args: string[]) = outputCodedUInt16 os sentinel for i = 0 to 255 do let c = char i - emit (EncodeChar c); - emit Eof; + emit (EncodeChar c) + emit Eof cfprintfn os "|];" - done; + done - cfprintfn os " |] "; + cfprintfn os " |] " - fprintf os "let actions : uint16[] = [|"; + fprintf os "let actions : uint16[] = [|" for state in dfaNodes do if state.Accepted.Length > 0 then outputCodedUInt16 os (snd state.Accepted.Head) else outputCodedUInt16 os sentinel - done; - cfprintfn os "|]"; - cfprintfn os "let _fslex_tables = %s.%sTables.Create(trans,actions)" lexlib domain; + done + cfprintfn os "|]" + cfprintfn os "let _fslex_tables = %s.%sTables.Create(trans,actions)" lexlib domain - cfprintfn os "let rec _fslex_dummy () = _fslex_dummy() "; + cfprintfn os "let rec _fslex_dummy () = _fslex_dummy() " // These actions push the additional start state and come first, because they are then typically inlined into later // rules. This means more tailcalls are taken as direct branches, increasing efficiency and // improving stack usage on platforms that do not take tailcalls. for ((startNode, actions),(ident,args,_)) in List.zip perRuleData spec.Rules do - cfprintfn os "(* Rule %s *)" ident; - cfprintfn os "and %s %s (lexbuf : %s.LexBuffer<_>) = _fslex_%s %s %d lexbuf" ident (String.Join(" ",Array.ofList args)) lexlib ident (String.Join(" ",Array.ofList args)) startNode.Id; - for ((startNode, actions),(ident,args,_)) in List.zip perRuleData spec.Rules do - cfprintfn os "(* Rule %s *)" ident; - cfprintfn os "and _fslex_%s %s _fslex_state lexbuf =" ident (String.Join(" ",Array.ofList args)); - cfprintfn os " match _fslex_tables.Interpret(_fslex_state,lexbuf) with" ; - actions |> Seq.iteri (fun i (code,pos) -> - cfprintfn os " | %d -> ( " i; - cfprintfn os "# %d \"%s\"" pos.Line pos.FileName; + cfprintfn os "// Rule %s" ident + cfprintfn os "and %s %s lexbuf =" ident (String.Join(" ",Array.ofList args)) + cfprintfn os " match _fslex_tables.Interpret(%d,lexbuf) with" startNode.Id + actions |> Seq.iteri (fun i (code:string, pos) -> + cfprintfn os " | %d -> ( " i + cfprintfn os "# %d \"%s\"" pos.Line pos.FileName let lines = code.Split([| '\r'; '\n' |], StringSplitOptions.RemoveEmptyEntries) for line in lines do - cfprintfn os " %s" line; - cfprintfn os "# %d \"%s\"" !lineCount output; + cfprintfn os " %s" line + cfprintfn os "# %d \"%s\"" !lineCount output cfprintfn os " )") cfprintfn os " | _ -> failwith \"%s\"" ident - cfprintfn os ""; + cfprintfn os "" printLinesIfCodeDefined spec.BottomCode - cfprintfn os "# 3000000 \"%s\"" output; - 0 + cfprintfn os "# 3000000 \"%s\"" output with e -> - eprintf "FSLEX: error FSL000: %s" (match e with Failure s -> s | e -> e.ToString()); + eprintf "FSLEX: error FSL000: %s" (match e with Failure s -> s | e -> e.ToString()) exit 1 + + +let result = main() diff --git a/src/fcs-fable/src/buildtools/fslex/fslexast.fs b/src/fcs-fable/src/buildtools/fslex/fslexast.fs index db9727cb97..64e914a013 100644 --- a/src/fcs-fable/src/buildtools/fslex/fslexast.fs +++ b/src/fcs-fable/src/buildtools/fslex/fslexast.fs @@ -3,7 +3,7 @@ module internal FsLexYacc.FsLex.AST open System.Collections.Generic -open Microsoft.FSharp.Text +open FSharp.Text open Microsoft.FSharp.Collections open Internal.Utilities open Internal.Utilities.Text.Lexing diff --git a/src/fcs-fable/src/buildtools/fsyacc/fsyacc.fs b/src/fcs-fable/src/buildtools/fsyacc/fsyacc.fs index b4d0a39093..41d816794d 100644 --- a/src/fcs-fable/src/buildtools/fsyacc/fsyacc.fs +++ b/src/fcs-fable/src/buildtools/fsyacc/fsyacc.fs @@ -12,7 +12,7 @@ open FsLexYacc.FsYacc open FsLexYacc.FsYacc.AST //------------------------------------------------------------------ -// This code is duplicated from FSharp.Compiler.UnicodeLexing +// This code is duplicated from Microsoft.FSharp.Compiler.UnicodeLexing type Lexbuf = LexBuffer @@ -47,8 +47,8 @@ let compat = ref false let log = ref false let light = ref None let inputCodePage = ref None -let mutable lexlib = "Microsoft.FSharp.Text.Lexing" -let mutable parslib = "Microsoft.FSharp.Text.Parsing" +let mutable lexlib = "FSharp.Text.Lexing" +let mutable parslib = "FSharp.Text.Parsing" let usage = [ ArgInfo("-o", ArgType.String (fun s -> out := Some s), "Name the output file."); @@ -60,8 +60,8 @@ let usage = ArgInfo("--light-off", ArgType.Unit (fun () -> light := Some false), "Add #light \"off\" to the top of the generated file"); ArgInfo("--ml-compatibility", ArgType.Set compat, "Support the use of the global state from the 'Parsing' module in FSharp.PowerPack.dll."); ArgInfo("--tokens", ArgType.Set tokenize, "Simply tokenize the specification file itself."); - ArgInfo("--lexlib", ArgType.String (fun s -> lexlib <- s), "Specify the namespace for the implementation of the lexer (default: Microsoft.FSharp.Text.Lexing)"); - ArgInfo("--parslib", ArgType.String (fun s -> parslib <- s), "Specify the namespace for the implementation of the parser table interpreter (default: Microsoft.FSharp.Text.Parsing)"); + ArgInfo("--lexlib", ArgType.String (fun s -> lexlib <- s), "Specify the namespace for the implementation of the lexer (default: FSharp.Text.Lexing)"); + ArgInfo("--parslib", ArgType.String (fun s -> parslib <- s), "Specify the namespace for the implementation of the parser table interpreter (default: FSharp.Text.Parsing)"); ArgInfo("--codepage", ArgType.Int (fun i -> inputCodePage := Some i), "Assume input lexer specification file is encoded with the given codepage."); ] let _ = ArgParser.Parse(usage,(fun x -> match !input with Some _ -> failwith "more than one input given" | None -> input := Some x),"fsyacc ") @@ -523,11 +523,9 @@ let main() = logf (fun oso -> oso.Close()) -[] -let result(args: string[]) = - try - main() - 0 +let result = + try main() with e -> - eprintf "FSYACC: error FSY000: %s" (match e with Failure s -> s | e -> e.Message); - 1 + eprintf "FSYACC: error FSY000: %s" (match e with Failure s -> s | e -> e.Message); + exit 1 + diff --git a/src/fcs-fable/src/buildtools/fsyacc/fsyaccast.fs b/src/fcs-fable/src/buildtools/fsyacc/fsyaccast.fs index f4edc39972..deb2d3ef8a 100644 --- a/src/fcs-fable/src/buildtools/fsyacc/fsyaccast.fs +++ b/src/fcs-fable/src/buildtools/fsyacc/fsyaccast.fs @@ -39,7 +39,7 @@ type Symbols = Symbol list //--------------------------------------------------------------------- // Output Raw Parser Spec AST -let StringOfSym sym = match sym with Terminal s -> "'" + s + "'" | NonTerminal s -> s +let StringOfSym sym = match sym with Terminal s -> "'" ^ s ^ "'" | NonTerminal s -> s let OutputSym os sym = fprintf os "%s" (StringOfSym sym) @@ -353,7 +353,7 @@ let CompilerLalrParserSpec logf (spec : ProcessedParserSpec) = stopWatch.Start() // Augment the grammar - let fakeStartNonTerminals = spec.StartSymbols |> List.map(fun nt -> "_start" + nt) + let fakeStartNonTerminals = spec.StartSymbols |> List.map(fun nt -> "_start"^nt) let nonTerminals = fakeStartNonTerminals@spec.NonTerminals let endOfInputTerminal = "$$" let dummyLookahead = "#" @@ -466,7 +466,7 @@ let CompilerLalrParserSpec logf (spec : ProcessedParserSpec) = let IsStartItem item0 = fakeStartNonTerminalsSet.Contains(ntIdx_of_item0 item0) let IsKernelItem item0 = (IsStartItem item0 || dotIdx_of_item0 item0 <> 0) - let StringOfSym sym = match sym with PTerminal s -> "'" + termTab.OfIndex s + "'" | PNonTerminal s -> ntTab.OfIndex s + let StringOfSym sym = match sym with PTerminal s -> "'" ^ termTab.OfIndex s ^ "'" | PNonTerminal s -> ntTab.OfIndex s let OutputSym os sym = fprintf os "%s" (StringOfSym sym) diff --git a/src/fcs-fable/src/fsharp/AugmentWithHashCompare.fs b/src/fcs-fable/src/fsharp/AugmentWithHashCompare.fs index 70fc0df123..c859fb6388 100755 --- a/src/fcs-fable/src/fsharp/AugmentWithHashCompare.fs +++ b/src/fcs-fable/src/fsharp/AugmentWithHashCompare.fs @@ -14,28 +14,28 @@ open FSharp.Compiler.TcGlobals open FSharp.Compiler.Infos let mkIComparableCompareToSlotSig (g: TcGlobals) = - TSlotSig("CompareTo",g.mk_IComparable_ty, [],[], [[TSlotParam(Some("obj"),g.obj_ty,false,false,false,[])]],Some g.int_ty) + TSlotSig("CompareTo", g.mk_IComparable_ty, [], [], [[TSlotParam(Some("obj"), g.obj_ty, false, false, false, [])]], Some g.int_ty) let mkGenericIComparableCompareToSlotSig (g: TcGlobals) ty = - TSlotSig("CompareTo",(mkAppTy g.system_GenericIComparable_tcref [ty]),[],[], [[TSlotParam(Some("obj"),ty,false,false,false,[])]],Some g.int_ty) + TSlotSig("CompareTo", (mkAppTy g.system_GenericIComparable_tcref [ty]), [], [], [[TSlotParam(Some("obj"), ty, false, false, false, [])]], Some g.int_ty) let mkIStructuralComparableCompareToSlotSig (g: TcGlobals) = - TSlotSig("CompareTo",g.mk_IStructuralComparable_ty,[],[],[[TSlotParam(None,(mkRefTupledTy g [g.obj_ty ; g.IComparer_ty]),false,false,false,[])]], Some g.int_ty) + TSlotSig("CompareTo", g.mk_IStructuralComparable_ty, [], [], [[TSlotParam(None, (mkRefTupledTy g [g.obj_ty ; g.IComparer_ty]), false, false, false, [])]], Some g.int_ty) let mkGenericIEquatableEqualsSlotSig (g: TcGlobals) ty = - TSlotSig("Equals",(mkAppTy g.system_GenericIEquatable_tcref [ty]),[],[], [[TSlotParam(Some("obj"),ty,false,false,false,[])]],Some g.bool_ty) + TSlotSig("Equals", (mkAppTy g.system_GenericIEquatable_tcref [ty]), [], [], [[TSlotParam(Some("obj"), ty, false, false, false, [])]], Some g.bool_ty) let mkIStructuralEquatableEqualsSlotSig (g: TcGlobals) = - TSlotSig("Equals",g.mk_IStructuralEquatable_ty,[],[],[[TSlotParam(None,(mkRefTupledTy g [g.obj_ty ; g.IEqualityComparer_ty]),false,false,false,[])]], Some g.bool_ty) + TSlotSig("Equals", g.mk_IStructuralEquatable_ty, [], [], [[TSlotParam(None, (mkRefTupledTy g [g.obj_ty ; g.IEqualityComparer_ty]), false, false, false, [])]], Some g.bool_ty) let mkIStructuralEquatableGetHashCodeSlotSig (g: TcGlobals) = - TSlotSig("GetHashCode",g.mk_IStructuralEquatable_ty,[],[],[[TSlotParam(None,g.IEqualityComparer_ty,false,false,false,[])]], Some g.int_ty) + TSlotSig("GetHashCode", g.mk_IStructuralEquatable_ty, [], [], [[TSlotParam(None, g.IEqualityComparer_ty, false, false, false, [])]], Some g.int_ty) let mkGetHashCodeSlotSig (g: TcGlobals) = - TSlotSig("GetHashCode", g.obj_ty, [],[], [[]],Some g.int_ty) + TSlotSig("GetHashCode", g.obj_ty, [], [], [[]], Some g.int_ty) let mkEqualsSlotSig (g: TcGlobals) = - TSlotSig("Equals", g.obj_ty, [],[], [[TSlotParam(Some("obj"),g.obj_ty,false,false,false,[])]],Some g.bool_ty) + TSlotSig("Equals", g.obj_ty, [], [], [[TSlotParam(Some("obj"), g.obj_ty, false, false, false, [])]], Some g.bool_ty) //------------------------------------------------------------------------- // Helpers associated with code-generation of comparison/hash augmentations @@ -63,7 +63,7 @@ let mkHashWithComparerTy g ty = (mkThisTy g ty) --> (g.IEqualityComparer_ty --> // Polymorphic comparison //------------------------------------------------------------------------- -let mkRelBinOp (g: TcGlobals) op m e1 e2 = mkAsmExpr ([ op ],[], [e1; e2],[g.bool_ty],m) +let mkRelBinOp (g: TcGlobals) op m e1 e2 = mkAsmExpr ([ op ], [], [e1; e2], [g.bool_ty], m) let mkClt g m e1 e2 = mkRelBinOp g IL.AI_clt m e1 e2 @@ -80,21 +80,21 @@ let mkILLangPrimTy (g: TcGlobals) = mkILNonGenericBoxedTy g.tcref_LanguagePrimit let mkILCallGetComparer (g: TcGlobals) m = let ty = mkILNonGenericBoxedTy g.tcref_System_Collections_IComparer.CompiledRepresentationForNamedType - let mspec = mkILNonGenericStaticMethSpecInTy (mkILLangPrimTy g, "get_GenericComparer",[],ty) + let mspec = mkILNonGenericStaticMethSpecInTy (mkILLangPrimTy g, "get_GenericComparer", [], ty) mkAsmExpr([IL.mkNormalCall mspec], [], [], [g.IComparer_ty], m) let mkILCallGetEqualityComparer (g: TcGlobals) m = let ty = mkILNonGenericBoxedTy g.tcref_System_Collections_IEqualityComparer.CompiledRepresentationForNamedType - let mspec = mkILNonGenericStaticMethSpecInTy (mkILLangPrimTy g,"get_GenericEqualityComparer",[],ty) + let mspec = mkILNonGenericStaticMethSpecInTy (mkILLangPrimTy g, "get_GenericEqualityComparer", [], ty) mkAsmExpr([IL.mkNormalCall mspec], [], [], [g.IEqualityComparer_ty], m) let mkThisVar g m ty = mkCompGenLocal m "this" (mkThisTy g ty) -let mkShl g m acce n = mkAsmExpr([ IL.AI_shl ],[],[acce; mkInt g m n],[g.int_ty],m) +let mkShl g m acce n = mkAsmExpr([ IL.AI_shl ], [], [acce; mkInt g m n], [g.int_ty], m) -let mkShr g m acce n = mkAsmExpr([ IL.AI_shr ],[],[acce; mkInt g m n],[g.int_ty],m) +let mkShr g m acce n = mkAsmExpr([ IL.AI_shr ], [], [acce; mkInt g m n], [g.int_ty], m) -let mkAdd (g: TcGlobals) m e1 e2 = mkAsmExpr([ IL.AI_add ],[],[e1;e2],[g.int_ty],m) +let mkAdd (g: TcGlobals) m e1 e2 = mkAsmExpr([ IL.AI_add ], [], [e1;e2], [g.int_ty], m) let mkAddToHashAcc g m e accv acce = mkValSet m accv (mkAdd g m (mkInt g m 0x9e3779b9) @@ -103,7 +103,7 @@ let mkAddToHashAcc g m e accv acce = let mkCombineHashGenerators g m exprs accv acce = - (acce,exprs) ||> List.fold (fun tm e -> mkCompGenSequential m (mkAddToHashAcc g m e accv acce) tm) + (acce, exprs) ||> List.fold (fun tm e -> mkCompGenSequential m (mkAddToHashAcc g m e accv acce) tm) //------------------------------------------------------------------------- // Build comparison functions for union, record and exception types. @@ -115,18 +115,18 @@ let mkThatAddrLocalIfNeeded g m tcve ty = if isStructTy g ty then let thataddrv, thataddre = mkCompGenLocal m "obj" (mkThisTy g ty) Some thataddrv, thataddre - else None,tcve + else None, tcve let mkThisVarThatVar g m ty = - let thisv,thise = mkThisVar g m ty - let thataddrv,thataddre = mkThatAddrLocal g m ty - thisv,thataddrv,thise,thataddre + let thisv, thise = mkThisVar g m ty + let thataddrv, thataddre = mkThatAddrLocal g m ty + thisv, thataddrv, thise, thataddre let mkThatVarBind g m ty thataddrv expr = if isStructTy g ty then - let thatv2,_ = mkMutableCompGenLocal m "obj" ty - thatv2,mkCompGenLet m thataddrv (mkValAddr m false (mkLocalValRef thatv2)) expr - else thataddrv,expr + let thatv2, _ = mkMutableCompGenLocal m "obj" ty + thatv2, mkCompGenLet m thataddrv (mkValAddr m false (mkLocalValRef thatv2)) expr + else thataddrv, expr let mkBindThatAddr g m ty thataddrv thatv thate expr = if isStructTy g ty then @@ -152,9 +152,9 @@ let mkCompareTestConjuncts g m exprs = | [] -> mkZero g m | [h] -> h | l -> - let a,b = List.frontAndBack l - (a,b) ||> List.foldBack (fun e acc -> - let nv,ne = mkCompGenLocal m "n" g.int_ty + let a, b = List.frontAndBack l + (a, b) ||> List.foldBack (fun e acc -> + let nv, ne = mkCompGenLocal m "n" g.int_ty mkCompGenLet m nv e (mkCond NoSequencePointAtStickyBinding SuppressSequencePointAtTarget m g.int_ty (mkClt g m ne (mkZero g m)) @@ -169,10 +169,10 @@ let mkEqualsTestConjuncts g m exprs = | [] -> mkOne g m | [h] -> h | l -> - let a,b = List.frontAndBack l + let a, b = List.frontAndBack l List.foldBack (fun e acc -> mkCond NoSequencePointAtStickyBinding SuppressSequencePointAtTarget m g.bool_ty e acc (mkFalse g m)) a b -let mkMinimalTy (g: TcGlobals) (tcref:TyconRef) = +let mkMinimalTy (g: TcGlobals) (tcref: TyconRef) = if tcref.Deref.IsExceptionDecl then [], g.exn_ty else generalizeTyconRef tcref @@ -196,13 +196,13 @@ let mkBindNullHash g m thise expr = expr /// Build the comparison implementation for a record type -let mkRecdCompare g tcref (tycon:Tycon) = +let mkRecdCompare g tcref (tycon: Tycon) = let m = tycon.Range let fields = tycon.AllInstanceFieldsAsList - let tinst,ty = mkMinimalTy g tcref - let thisv,thataddrv,thise,thataddre = mkThisVarThatVar g m ty + let tinst, ty = mkMinimalTy g tcref + let thisv, thataddrv, thise, thataddre = mkThisVarThatVar g m ty let compe = mkILCallGetComparer g m - let mkTest (fspec:RecdField) = + let mkTest (fspec: RecdField) = let fty = fspec.FormalType let fref = tcref.MakeNestedRecdFieldRef fspec let m = fref.Range @@ -214,19 +214,19 @@ let mkRecdCompare g tcref (tycon:Tycon) = let expr = if tycon.IsStructOrEnumTycon then expr else mkBindNullComparison g m thise thataddre expr - let thatv,expr = mkThatVarBind g m ty thataddrv expr - thisv,thatv, expr + let thatv, expr = mkThatVarBind g m ty thataddrv expr + thisv, thatv, expr /// Build the comparison implementation for a record type when parameterized by a comparer -let mkRecdCompareWithComparer g tcref (tycon:Tycon) (_thisv,thise) (_,thate) compe = +let mkRecdCompareWithComparer g tcref (tycon: Tycon) (_thisv, thise) (_, thate) compe = let m = tycon.Range let fields = tycon.AllInstanceFieldsAsList - let tinst,ty = mkMinimalTy g tcref - let tcv,tce = mkCompGenLocal m "objTemp" ty // let tcv = thate - let thataddrv,thataddre = mkThatAddrLocal g m ty // let thataddrv = &tcv, if a struct + let tinst, ty = mkMinimalTy g tcref + let tcv, tce = mkCompGenLocal m "objTemp" ty // let tcv = thate + let thataddrv, thataddre = mkThatAddrLocal g m ty // let thataddrv = &tcv, if a struct - let mkTest (fspec:RecdField) = + let mkTest (fspec: RecdField) = let fty = fspec.FormalType let fref = tcref.MakeNestedRecdFieldRef fspec let m = fref.Range @@ -245,12 +245,12 @@ let mkRecdCompareWithComparer g tcref (tycon:Tycon) (_thisv,thise) (_,thate) com /// Build the .Equals(that) equality implementation wrapper for a record type -let mkRecdEquality g tcref (tycon:Tycon) = +let mkRecdEquality g tcref (tycon: Tycon) = let m = tycon.Range let fields = tycon.AllInstanceFieldsAsList - let tinst,ty = mkMinimalTy g tcref - let thisv,thataddrv,thise,thataddre = mkThisVarThatVar g m ty - let mkTest (fspec:RecdField) = + let tinst, ty = mkMinimalTy g tcref + let thisv, thataddrv, thise, thataddre = mkThisVarThatVar g m ty + let mkTest (fspec: RecdField) = let fty = fspec.FormalType let fref = tcref.MakeNestedRecdFieldRef fspec let m = fref.Range @@ -261,17 +261,17 @@ let mkRecdEquality g tcref (tycon:Tycon) = let expr = if tycon.IsStructOrEnumTycon then expr else mkBindThatNullEquals g m thise thataddre expr - let thatv,expr = mkThatVarBind g m ty thataddrv expr - thisv,thatv,expr + let thatv, expr = mkThatVarBind g m ty thataddrv expr + thisv, thatv, expr /// Build the equality implementation for a record type when parameterized by a comparer -let mkRecdEqualityWithComparer g tcref (tycon:Tycon) (_thisv,thise) thatobje (thatv,thate) compe = +let mkRecdEqualityWithComparer g tcref (tycon: Tycon) (_thisv, thise) thatobje (thatv, thate) compe = let m = tycon.Range let fields = tycon.AllInstanceFieldsAsList - let tinst,ty = mkMinimalTy g tcref - let thataddrv,thataddre = mkThatAddrLocal g m ty + let tinst, ty = mkMinimalTy g tcref + let thataddrv, thataddre = mkThatAddrLocal g m ty - let mkTest (fspec:RecdField) = + let mkTest (fspec: RecdField) = let fty = fspec.FormalType let fref = tcref.MakeNestedRecdFieldRef fspec let m = fref.Range @@ -290,34 +290,34 @@ let mkRecdEqualityWithComparer g tcref (tycon:Tycon) (_thisv,thise) thatobje (th expr /// Build the equality implementation for an exception definition -let mkExnEquality (g: TcGlobals) exnref (exnc:Tycon) = +let mkExnEquality (g: TcGlobals) exnref (exnc: Tycon) = let m = exnc.Range - let thatv,thate = mkCompGenLocal m "obj" g.exn_ty - let thisv,thise = mkThisVar g m g.exn_ty - let mkTest i (rfield:RecdField) = + let thatv, thate = mkCompGenLocal m "obj" g.exn_ty + let thisv, thise = mkThisVar g m g.exn_ty + let mkTest i (rfield: RecdField) = let fty = rfield.FormalType mkCallGenericEqualityEROuter g m fty (mkExnCaseFieldGet(thise, exnref, i, m)) (mkExnCaseFieldGet(thate, exnref, i, m)) let expr = mkEqualsTestConjuncts g m (List.mapi mkTest (exnc.AllInstanceFieldsAsList)) let expr = - let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding,m ) + let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding, m ) let cases = - [ mkCase(DecisionTreeTest.IsInst(g.exn_ty,mkAppTy exnref []), - mbuilder.AddResultTarget(expr,SuppressSequencePointAtTarget)) ] - let dflt = Some(mbuilder.AddResultTarget(mkFalse g m,SuppressSequencePointAtTarget)) - let dtree = TDSwitch(thate,cases,dflt,m) - mbuilder.Close(dtree,m,g.bool_ty) + [ mkCase(DecisionTreeTest.IsInst(g.exn_ty, mkAppTy exnref []), + mbuilder.AddResultTarget(expr, SuppressSequencePointAtTarget)) ] + let dflt = Some(mbuilder.AddResultTarget(mkFalse g m, SuppressSequencePointAtTarget)) + let dtree = TDSwitch(thate, cases, dflt, m) + mbuilder.Close(dtree, m, g.bool_ty) let expr = mkBindThatNullEquals g m thise thate expr - thisv,thatv, expr + thisv, thatv, expr /// Build the equality implementation for an exception definition when parameterized by a comparer -let mkExnEqualityWithComparer g exnref (exnc:Tycon) (_thisv,thise) thatobje (thatv,thate) compe = +let mkExnEqualityWithComparer g exnref (exnc: Tycon) (_thisv, thise) thatobje (thatv, thate) compe = let m = exnc.Range - let thataddrv,thataddre = mkThatAddrLocal g m g.exn_ty - let mkTest i (rfield:RecdField) = + let thataddrv, thataddre = mkThatAddrLocal g m g.exn_ty + let mkTest i (rfield: RecdField) = let fty = rfield.FormalType mkCallGenericEqualityWithComparerOuter g m fty compe @@ -325,36 +325,36 @@ let mkExnEqualityWithComparer g exnref (exnc:Tycon) (_thisv,thise) thatobje (tha (mkExnCaseFieldGet(thataddre, exnref, i, m)) let expr = mkEqualsTestConjuncts g m (List.mapi mkTest (exnc.AllInstanceFieldsAsList)) let expr = - let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding,m ) + let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding, m ) let cases = - [ mkCase(DecisionTreeTest.IsInst(g.exn_ty,mkAppTy exnref []), - mbuilder.AddResultTarget(expr,SuppressSequencePointAtTarget)) ] - let dflt = mbuilder.AddResultTarget(mkFalse g m,SuppressSequencePointAtTarget) - let dtree = TDSwitch(thate,cases,Some dflt,m) - mbuilder.Close(dtree,m,g.bool_ty) + [ mkCase(DecisionTreeTest.IsInst(g.exn_ty, mkAppTy exnref []), + mbuilder.AddResultTarget(expr, SuppressSequencePointAtTarget)) ] + let dflt = mbuilder.AddResultTarget(mkFalse g m, SuppressSequencePointAtTarget) + let dtree = TDSwitch(thate, cases, Some dflt, m) + mbuilder.Close(dtree, m, g.bool_ty) let expr = mkBindThatAddr g m g.exn_ty thataddrv thatv thate expr let expr = mkIsInstConditional g m g.exn_ty thatobje thatv expr (mkFalse g m) let expr = if exnc.IsStructOrEnumTycon then expr else mkBindThisNullEquals g m thise thatobje expr expr /// Build the comparison implementation for a union type -let mkUnionCompare g tcref (tycon:Tycon) = +let mkUnionCompare g tcref (tycon: Tycon) = let m = tycon.Range let ucases = tycon.UnionCasesAsList - let tinst,ty = mkMinimalTy g tcref - let thisv,thataddrv,thise,thataddre = mkThisVarThatVar g m ty - let thistagv,thistage = mkCompGenLocal m "thisTag" g.int_ty - let thattagv,thattage = mkCompGenLocal m "thatTag" g.int_ty + let tinst, ty = mkMinimalTy g tcref + let thisv, thataddrv, thise, thataddre = mkThisVarThatVar g m ty + let thistagv, thistage = mkCompGenLocal m "thisTag" g.int_ty + let thattagv, thattage = mkCompGenLocal m "thatTag" g.int_ty let compe = mkILCallGetComparer g m let expr = - let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding,m ) + let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding, m ) let mkCase ucase = let cref = tcref.MakeNestedUnionCaseRef ucase let m = cref.Range let rfields = ucase.RecdFields if isNil rfields then None else - let mkTest thise thataddre j (argty:RecdField) = + let mkTest thise thataddre j (argty: RecdField) = mkCallGenericComparisonWithComparerOuter g m argty.FormalType compe (mkUnionCaseFieldGetProvenViaExprAddr(thise, cref, tinst, j, m)) @@ -363,19 +363,19 @@ let mkUnionCompare g tcref (tycon:Tycon) = if cref.Tycon.IsStructOrEnumTycon then mkCompareTestConjuncts g m (List.mapi (mkTest thise thataddre) rfields) else - let thisucv,thisucve = mkCompGenLocal m "thisCast" (mkProvenUnionCaseTy cref tinst) - let thatucv,thatucve = mkCompGenLocal m "objCast" (mkProvenUnionCaseTy cref tinst) - mkCompGenLet m thisucv (mkUnionCaseProof (thise,cref,tinst,m)) - (mkCompGenLet m thatucv (mkUnionCaseProof (thataddre,cref,tinst,m)) + let thisucv, thisucve = mkCompGenLocal m "thisCast" (mkProvenUnionCaseTy cref tinst) + let thatucv, thatucve = mkCompGenLocal m "objCast" (mkProvenUnionCaseTy cref tinst) + mkCompGenLet m thisucv (mkUnionCaseProof (thise, cref, tinst, m)) + (mkCompGenLet m thatucv (mkUnionCaseProof (thataddre, cref, tinst, m)) (mkCompareTestConjuncts g m (List.mapi (mkTest thisucve thatucve) rfields))) - Some (mkCase(DecisionTreeTest.UnionCase(cref,tinst),mbuilder.AddResultTarget(test,SuppressSequencePointAtTarget))) + Some (mkCase(DecisionTreeTest.UnionCase(cref, tinst), mbuilder.AddResultTarget(test, SuppressSequencePointAtTarget))) - let nullary,nonNullary = List.partition Option.isNone (List.map mkCase ucases) + let nullary, nonNullary = List.partition Option.isNone (List.map mkCase ucases) if isNil nonNullary then mkZero g m else let cases = nonNullary |> List.map (function (Some c) -> c | None -> failwith "mkUnionCompare") - let dflt = if isNil nullary then None else Some (mbuilder.AddResultTarget(mkZero g m,SuppressSequencePointAtTarget)) - let dtree = TDSwitch(thise, cases, dflt,m) - mbuilder.Close(dtree,m,g.int_ty) + let dflt = if isNil nullary then None else Some (mbuilder.AddResultTarget(mkZero g m, SuppressSequencePointAtTarget)) + let dtree = TDSwitch(thise, cases, dflt, m) + mbuilder.Close(dtree, m, g.int_ty) let expr = if ucases.Length = 1 then expr else @@ -383,37 +383,37 @@ let mkUnionCompare g tcref (tycon:Tycon) = mkCond NoSequencePointAtStickyBinding SuppressSequencePointAtTarget m g.int_ty (mkILAsmCeq g m thistage thattage) expr - (mkAsmExpr ([ IL.AI_sub ],[], [thistage; thattage],[g.int_ty],m))in + (mkAsmExpr ([ IL.AI_sub ], [], [thistage; thattage], [g.int_ty], m))in mkCompGenLet m thistagv - (mkUnionCaseTagGetViaExprAddr (thise,tcref,tinst,m)) + (mkUnionCaseTagGetViaExprAddr (thise, tcref, tinst, m)) (mkCompGenLet m thattagv - (mkUnionCaseTagGetViaExprAddr (thataddre,tcref,tinst,m)) + (mkUnionCaseTagGetViaExprAddr (thataddre, tcref, tinst, m)) tagsEqTested) let expr = if tycon.IsStructOrEnumTycon then expr else mkBindNullComparison g m thise thataddre expr - let thatv,expr = mkThatVarBind g m ty thataddrv expr - thisv,thatv, expr + let thatv, expr = mkThatVarBind g m ty thataddrv expr + thisv, thatv, expr /// Build the comparison implementation for a union type when parameterized by a comparer -let mkUnionCompareWithComparer g tcref (tycon:Tycon) (_thisv,thise) (_thatobjv,thatcaste) compe = +let mkUnionCompareWithComparer g tcref (tycon: Tycon) (_thisv, thise) (_thatobjv, thatcaste) compe = let m = tycon.Range let ucases = tycon.UnionCasesAsList - let tinst,ty = mkMinimalTy g tcref - let tcv,tce = mkCompGenLocal m "objTemp" ty // let tcv = (thatobj :?> ty) - let thataddrvOpt,thataddre = mkThatAddrLocalIfNeeded g m tce ty // let thataddrv = &tcv if struct, otherwise thataddre is just tce - let thistagv,thistage = mkCompGenLocal m "thisTag" g.int_ty - let thattagv,thattage = mkCompGenLocal m "thatTag" g.int_ty + let tinst, ty = mkMinimalTy g tcref + let tcv, tce = mkCompGenLocal m "objTemp" ty // let tcv = (thatobj :?> ty) + let thataddrvOpt, thataddre = mkThatAddrLocalIfNeeded g m tce ty // let thataddrv = &tcv if struct, otherwise thataddre is just tce + let thistagv, thistage = mkCompGenLocal m "thisTag" g.int_ty + let thattagv, thattage = mkCompGenLocal m "thatTag" g.int_ty let expr = - let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding,m ) + let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding, m ) let mkCase ucase = let cref = tcref.MakeNestedUnionCaseRef ucase let m = cref.Range let rfields = ucase.RecdFields if isNil rfields then None else - let mkTest thise thataddre j (argty:RecdField) = + let mkTest thise thataddre j (argty: RecdField) = mkCallGenericComparisonWithComparerOuter g m argty.FormalType compe (mkUnionCaseFieldGetProvenViaExprAddr(thise, cref, tinst, j, m)) @@ -423,20 +423,20 @@ let mkUnionCompareWithComparer g tcref (tycon:Tycon) (_thisv,thise) (_thatobjv,t if cref.Tycon.IsStructOrEnumTycon then mkCompareTestConjuncts g m (List.mapi (mkTest thise thataddre) rfields) else - let thisucv,thisucve = mkCompGenLocal m "thisCastu" (mkProvenUnionCaseTy cref tinst) - let thatucv,thatucve = mkCompGenLocal m "thatCastu" (mkProvenUnionCaseTy cref tinst) - mkCompGenLet m thisucv (mkUnionCaseProof (thise,cref,tinst,m)) - (mkCompGenLet m thatucv (mkUnionCaseProof (thataddre,cref,tinst,m)) + let thisucv, thisucve = mkCompGenLocal m "thisCastu" (mkProvenUnionCaseTy cref tinst) + let thatucv, thatucve = mkCompGenLocal m "thatCastu" (mkProvenUnionCaseTy cref tinst) + mkCompGenLet m thisucv (mkUnionCaseProof (thise, cref, tinst, m)) + (mkCompGenLet m thatucv (mkUnionCaseProof (thataddre, cref, tinst, m)) (mkCompareTestConjuncts g m (List.mapi (mkTest thisucve thatucve) rfields))) - Some (mkCase(DecisionTreeTest.UnionCase(cref,tinst),mbuilder.AddResultTarget(test,SuppressSequencePointAtTarget))) + Some (mkCase(DecisionTreeTest.UnionCase(cref, tinst), mbuilder.AddResultTarget(test, SuppressSequencePointAtTarget))) - let nullary,nonNullary = List.partition Option.isNone (List.map mkCase ucases) + let nullary, nonNullary = List.partition Option.isNone (List.map mkCase ucases) if isNil nonNullary then mkZero g m else let cases = nonNullary |> List.map (function (Some c) -> c | None -> failwith "mkUnionCompare") - let dflt = if isNil nullary then None else Some (mbuilder.AddResultTarget(mkZero g m,SuppressSequencePointAtTarget)) - let dtree = TDSwitch(thise, cases, dflt,m) - mbuilder.Close(dtree,m,g.int_ty) + let dflt = if isNil nullary then None else Some (mbuilder.AddResultTarget(mkZero g m, SuppressSequencePointAtTarget)) + let dtree = TDSwitch(thise, cases, dflt, m) + mbuilder.Close(dtree, m, g.int_ty) let expr = if ucases.Length = 1 then expr else @@ -444,11 +444,11 @@ let mkUnionCompareWithComparer g tcref (tycon:Tycon) (_thisv,thise) (_thatobjv,t mkCond NoSequencePointAtStickyBinding SuppressSequencePointAtTarget m g.int_ty (mkILAsmCeq g m thistage thattage) expr - (mkAsmExpr ([ IL.AI_sub ],[], [thistage; thattage],[g.int_ty],m)) + (mkAsmExpr ([ IL.AI_sub ], [], [thistage; thattage], [g.int_ty], m)) mkCompGenLet m thistagv - (mkUnionCaseTagGetViaExprAddr (thise,tcref,tinst,m)) + (mkUnionCaseTagGetViaExprAddr (thise, tcref, tinst, m)) (mkCompGenLet m thattagv - (mkUnionCaseTagGetViaExprAddr (thataddre,tcref,tinst,m)) + (mkUnionCaseTagGetViaExprAddr (thataddre, tcref, tinst, m)) tagsEqTested) let expr = if tycon.IsStructOrEnumTycon then expr else mkBindNullComparison g m thise thatcaste expr @@ -458,23 +458,23 @@ let mkUnionCompareWithComparer g tcref (tycon:Tycon) (_thisv,thise) (_thatobjv,t /// Build the equality implementation for a union type -let mkUnionEquality g tcref (tycon:Tycon) = +let mkUnionEquality g tcref (tycon: Tycon) = let m = tycon.Range let ucases = tycon.UnionCasesAsList - let tinst,ty = mkMinimalTy g tcref - let thisv,thataddrv,thise,thataddre = mkThisVarThatVar g m ty - let thistagv,thistage = mkCompGenLocal m "thisTag" g.int_ty - let thattagv,thattage = mkCompGenLocal m "thatTag" g.int_ty + let tinst, ty = mkMinimalTy g tcref + let thisv, thataddrv, thise, thataddre = mkThisVarThatVar g m ty + let thistagv, thistage = mkCompGenLocal m "thisTag" g.int_ty + let thattagv, thattage = mkCompGenLocal m "thatTag" g.int_ty let expr = - let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding,m ) + let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding, m ) let mkCase ucase = let cref = tcref.MakeNestedUnionCaseRef ucase let m = cref.Range let rfields = ucase.RecdFields if isNil rfields then None else - let mkTest thise thataddre j (argty:RecdField) = + let mkTest thise thataddre j (argty: RecdField) = mkCallGenericEqualityEROuter g m argty.FormalType (mkUnionCaseFieldGetProvenViaExprAddr(thise, cref, tinst, j, m)) (mkUnionCaseFieldGetProvenViaExprAddr(thataddre, cref, tinst, j, m)) @@ -483,20 +483,20 @@ let mkUnionEquality g tcref (tycon:Tycon) = if cref.Tycon.IsStructOrEnumTycon then mkEqualsTestConjuncts g m (List.mapi (mkTest thise thataddre) rfields) else - let thisucv,thisucve = mkCompGenLocal m "thisCast" (mkProvenUnionCaseTy cref tinst) - let thatucv,thatucve = mkCompGenLocal m "objCast" (mkProvenUnionCaseTy cref tinst) - mkCompGenLet m thisucv (mkUnionCaseProof (thise,cref,tinst,m)) - (mkCompGenLet m thatucv (mkUnionCaseProof (thataddre,cref,tinst,m)) + let thisucv, thisucve = mkCompGenLocal m "thisCast" (mkProvenUnionCaseTy cref tinst) + let thatucv, thatucve = mkCompGenLocal m "objCast" (mkProvenUnionCaseTy cref tinst) + mkCompGenLet m thisucv (mkUnionCaseProof (thise, cref, tinst, m)) + (mkCompGenLet m thatucv (mkUnionCaseProof (thataddre, cref, tinst, m)) (mkEqualsTestConjuncts g m (List.mapi (mkTest thisucve thatucve) rfields))) - Some (mkCase(DecisionTreeTest.UnionCase(cref,tinst), mbuilder.AddResultTarget(test, SuppressSequencePointAtTarget))) + Some (mkCase(DecisionTreeTest.UnionCase(cref, tinst), mbuilder.AddResultTarget(test, SuppressSequencePointAtTarget))) - let nullary,nonNullary = List.partition Option.isNone (List.map mkCase ucases) + let nullary, nonNullary = List.partition Option.isNone (List.map mkCase ucases) if isNil nonNullary then mkTrue g m else let cases = List.map (function (Some c) -> c | None -> failwith "mkUnionEquality") nonNullary - let dflt = (if isNil nullary then None else Some (mbuilder.AddResultTarget(mkTrue g m,SuppressSequencePointAtTarget))) + let dflt = (if isNil nullary then None else Some (mbuilder.AddResultTarget(mkTrue g m, SuppressSequencePointAtTarget))) let dtree = TDSwitch(thise, cases, dflt, m) - mbuilder.Close(dtree,m,g.bool_ty) + mbuilder.Close(dtree, m, g.bool_ty) let expr = if ucases.Length = 1 then expr else @@ -507,26 +507,26 @@ let mkUnionEquality g tcref (tycon:Tycon) = (mkFalse g m) mkCompGenLet m thistagv - (mkUnionCaseTagGetViaExprAddr (thise,tcref,tinst,m)) + (mkUnionCaseTagGetViaExprAddr (thise, tcref, tinst, m)) (mkCompGenLet m thattagv - (mkUnionCaseTagGetViaExprAddr (thataddre,tcref,tinst,m)) + (mkUnionCaseTagGetViaExprAddr (thataddre, tcref, tinst, m)) tagsEqTested) - let thatv,expr = mkThatVarBind g m ty thataddrv expr + let thatv, expr = mkThatVarBind g m ty thataddrv expr let expr = if tycon.IsStructOrEnumTycon then expr else mkBindThatNullEquals g m thise thataddre expr - thisv,thatv,expr + thisv, thatv, expr /// Build the equality implementation for a union type when parameterized by a comparer -let mkUnionEqualityWithComparer g tcref (tycon:Tycon) (_thisv,thise) thatobje (thatv,thate) compe = +let mkUnionEqualityWithComparer g tcref (tycon: Tycon) (_thisv, thise) thatobje (thatv, thate) compe = let m = tycon.Range let ucases = tycon.UnionCasesAsList - let tinst,ty = mkMinimalTy g tcref - let thistagv,thistage = mkCompGenLocal m "thisTag" g.int_ty - let thattagv,thattage = mkCompGenLocal m "thatTag" g.int_ty - let thataddrv,thataddre = mkThatAddrLocal g m ty + let tinst, ty = mkMinimalTy g tcref + let thistagv, thistage = mkCompGenLocal m "thisTag" g.int_ty + let thattagv, thattage = mkCompGenLocal m "thatTag" g.int_ty + let thataddrv, thataddre = mkThatAddrLocal g m ty let expr = - let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding,m ) + let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding, m ) let mkCase ucase = let cref = tcref.MakeNestedUnionCaseRef ucase let m = cref.Range @@ -534,7 +534,7 @@ let mkUnionEqualityWithComparer g tcref (tycon:Tycon) (_thisv,thise) thatobje (t let rfields = ucase.RecdFields if isNil rfields then None else - let mkTest thise thataddre j (argty:RecdField) = + let mkTest thise thataddre j (argty: RecdField) = mkCallGenericEqualityWithComparerOuter g m argty.FormalType compe (mkUnionCaseFieldGetProvenViaExprAddr(thise, cref, tinst, j, m)) @@ -544,21 +544,21 @@ let mkUnionEqualityWithComparer g tcref (tycon:Tycon) (_thisv,thise) thatobje (t if cref.Tycon.IsStructOrEnumTycon then mkEqualsTestConjuncts g m (List.mapi (mkTest thise thataddre) rfields) else - let thisucv,thisucve = mkCompGenLocal m "thisCastu" (mkProvenUnionCaseTy cref tinst) - let thatucv,thatucve = mkCompGenLocal m "thatCastu" (mkProvenUnionCaseTy cref tinst) + let thisucv, thisucve = mkCompGenLocal m "thisCastu" (mkProvenUnionCaseTy cref tinst) + let thatucv, thatucve = mkCompGenLocal m "thatCastu" (mkProvenUnionCaseTy cref tinst) - mkCompGenLet m thisucv (mkUnionCaseProof (thise,cref,tinst,m)) - (mkCompGenLet m thatucv (mkUnionCaseProof (thataddre,cref,tinst,m)) + mkCompGenLet m thisucv (mkUnionCaseProof (thise, cref, tinst, m)) + (mkCompGenLet m thatucv (mkUnionCaseProof (thataddre, cref, tinst, m)) (mkEqualsTestConjuncts g m (List.mapi (mkTest thisucve thatucve) rfields))) - Some (mkCase(DecisionTreeTest.UnionCase(cref,tinst), mbuilder.AddResultTarget (test, SuppressSequencePointAtTarget))) + Some (mkCase(DecisionTreeTest.UnionCase(cref, tinst), mbuilder.AddResultTarget (test, SuppressSequencePointAtTarget))) - let nullary,nonNullary = List.partition Option.isNone (List.map mkCase ucases) + let nullary, nonNullary = List.partition Option.isNone (List.map mkCase ucases) if isNil nonNullary then mkTrue g m else let cases = List.map (function (Some c) -> c | None -> failwith "mkUnionEquality") nonNullary - let dflt = if isNil nullary then None else Some (mbuilder.AddResultTarget(mkTrue g m,SuppressSequencePointAtTarget)) + let dflt = if isNil nullary then None else Some (mbuilder.AddResultTarget(mkTrue g m, SuppressSequencePointAtTarget)) let dtree = TDSwitch(thise, cases, dflt, m) - mbuilder.Close(dtree,m,g.bool_ty) + mbuilder.Close(dtree, m, g.bool_ty) let expr = if ucases.Length = 1 then expr else @@ -569,9 +569,9 @@ let mkUnionEqualityWithComparer g tcref (tycon:Tycon) (_thisv,thise) thatobje (t (mkFalse g m) mkCompGenLet m thistagv - (mkUnionCaseTagGetViaExprAddr (thise,tcref,tinst,m)) + (mkUnionCaseTagGetViaExprAddr (thise, tcref, tinst, m)) (mkCompGenLet m thattagv - (mkUnionCaseTagGetViaExprAddr (thataddre,tcref,tinst,m)) + (mkUnionCaseTagGetViaExprAddr (thataddre, tcref, tinst, m)) tagsEqTested) let expr = mkBindThatAddr g m ty thataddrv thatv thate expr let expr = mkIsInstConditional g m ty thatobje thatv expr (mkFalse g m) @@ -584,12 +584,12 @@ let mkUnionEqualityWithComparer g tcref (tycon:Tycon) (_thisv,thise) thatobje (t //------------------------------------------------------------------------- /// Structural hash implementation for record types when parameterized by a comparer -let mkRecdHashWithComparer g tcref (tycon:Tycon) compe = +let mkRecdHashWithComparer g tcref (tycon: Tycon) compe = let m = tycon.Range let fields = tycon.AllInstanceFieldsAsList - let tinst,ty = mkMinimalTy g tcref - let thisv,thise = mkThisVar g m ty - let mkFieldHash (fspec:RecdField) = + let tinst, ty = mkMinimalTy g tcref + let thisv, thise = mkThisVar g m ty + let mkFieldHash (fspec: RecdField) = let fty = fspec.FormalType let fref = tcref.MakeNestedRecdFieldRef fspec let m = fref.Range @@ -597,43 +597,43 @@ let mkRecdHashWithComparer g tcref (tycon:Tycon) compe = mkCallGenericHashWithComparerOuter g m fty compe e - let accv,acce = mkMutableCompGenLocal m "i" g.int_ty + let accv, acce = mkMutableCompGenLocal m "i" g.int_ty let stmt = mkCombineHashGenerators g m (List.map mkFieldHash fields) (mkLocalValRef accv) acce let expr = mkCompGenLet m accv (mkZero g m) stmt let expr = if tycon.IsStructOrEnumTycon then expr else mkBindNullHash g m thise expr - thisv,expr + thisv, expr /// Structural hash implementation for exception types when parameterized by a comparer -let mkExnHashWithComparer g exnref (exnc:Tycon) compe = +let mkExnHashWithComparer g exnref (exnc: Tycon) compe = let m = exnc.Range - let thisv,thise = mkThisVar g m g.exn_ty + let thisv, thise = mkThisVar g m g.exn_ty - let mkHash i (rfield:RecdField) = + let mkHash i (rfield: RecdField) = let fty = rfield.FormalType let e = mkExnCaseFieldGet(thise, exnref, i, m) mkCallGenericHashWithComparerOuter g m fty compe e - let accv,acce = mkMutableCompGenLocal m "i" g.int_ty + let accv, acce = mkMutableCompGenLocal m "i" g.int_ty let stmt = mkCombineHashGenerators g m (List.mapi mkHash (exnc.AllInstanceFieldsAsList)) (mkLocalValRef accv) acce let expr = mkCompGenLet m accv (mkZero g m) stmt let expr = mkBindNullHash g m thise expr - thisv,expr + thisv, expr /// Structural hash implementation for union types when parameterized by a comparer -let mkUnionHashWithComparer g tcref (tycon:Tycon) compe = +let mkUnionHashWithComparer g tcref (tycon: Tycon) compe = let m = tycon.Range let ucases = tycon.UnionCasesAsList - let tinst,ty = mkMinimalTy g tcref - let thisv,thise = mkThisVar g m ty - let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding,m ) - let accv,acce = mkMutableCompGenLocal m "i" g.int_ty + let tinst, ty = mkMinimalTy g tcref + let thisv, thise = mkThisVar g m ty + let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding, m ) + let accv, acce = mkMutableCompGenLocal m "i" g.int_ty let mkCase i ucase1 = let c1ref = tcref.MakeNestedUnionCaseRef ucase1 let m = c1ref.Range if ucase1.IsNullary then None else - let mkHash thise j (rfield:RecdField) = + let mkHash thise j (rfield: RecdField) = let fty = rfield.FormalType let e = mkUnionCaseFieldGetProvenViaExprAddr(thise, c1ref, tinst, j, m) mkCallGenericHashWithComparerOuter g m fty compe e @@ -644,37 +644,37 @@ let mkUnionHashWithComparer g tcref (tycon:Tycon) compe = (mkValSet m (mkLocalValRef accv) (mkInt g m i)) (mkCombineHashGenerators g m (List.mapi (mkHash thise) ucase1.RecdFields) (mkLocalValRef accv) acce) else - let ucv,ucve = mkCompGenLocal m "unionCase" (mkProvenUnionCaseTy c1ref tinst) + let ucv, ucve = mkCompGenLocal m "unionCase" (mkProvenUnionCaseTy c1ref tinst) mkCompGenLet m ucv - (mkUnionCaseProof (thise,c1ref,tinst,m)) + (mkUnionCaseProof (thise, c1ref, tinst, m)) (mkCompGenSequential m (mkValSet m (mkLocalValRef accv) (mkInt g m i)) (mkCombineHashGenerators g m (List.mapi (mkHash ucve) ucase1.RecdFields) (mkLocalValRef accv) acce)) - Some(mkCase(DecisionTreeTest.UnionCase(c1ref,tinst),mbuilder.AddResultTarget(test,SuppressSequencePointAtTarget))) + Some(mkCase(DecisionTreeTest.UnionCase(c1ref, tinst), mbuilder.AddResultTarget(test, SuppressSequencePointAtTarget))) - let nullary,nonNullary = ucases + let nullary, nonNullary = ucases |> List.mapi mkCase |> List.partition (fun i -> i.IsNone) let cases = nonNullary |> List.map (function (Some c) -> c | None -> failwith "mkUnionHash") let dflt = if isNil nullary then None else - let tag = mkUnionCaseTagGetViaExprAddr (thise,tcref,tinst,m) - Some(mbuilder.AddResultTarget(tag,SuppressSequencePointAtTarget)) - let dtree = TDSwitch(thise, cases, dflt,m) - let stmt = mbuilder.Close(dtree,m,g.int_ty) + let tag = mkUnionCaseTagGetViaExprAddr (thise, tcref, tinst, m) + Some(mbuilder.AddResultTarget(tag, SuppressSequencePointAtTarget)) + let dtree = TDSwitch(thise, cases, dflt, m) + let stmt = mbuilder.Close(dtree, m, g.int_ty) let expr = mkCompGenLet m accv (mkZero g m) stmt let expr = if tycon.IsStructOrEnumTycon then expr else mkBindNullHash g m thise expr - thisv,expr + thisv, expr //------------------------------------------------------------------------- // The predicate that determines which types implement the // pre-baked IStructuralHash and IComparable semantics associated with F# -// types. Note abstract types are not _known_ to implement these interfaces, +// types. Note abstract types are not _known_ to implement these interfaces, // though the interfaces may be discoverable via type tests. //------------------------------------------------------------------------- -let isNominalExnc (exnc:Tycon) = +let isNominalExnc (exnc: Tycon) = match exnc.ExceptionInfo with | TExnAbbrevRepr _ | TExnNone | TExnAsmRepr _ -> false | TExnFresh _ -> true @@ -682,29 +682,29 @@ let isNominalExnc (exnc:Tycon) = let isTrueFSharpStructTycon _g (tycon: Tycon) = (tycon.IsFSharpStructOrEnumTycon && not tycon.IsFSharpEnumTycon) -let canBeAugmentedWithEquals g (tycon:Tycon) = +let canBeAugmentedWithEquals g (tycon: Tycon) = tycon.IsUnionTycon || tycon.IsRecordTycon || (tycon.IsExceptionDecl && isNominalExnc tycon) || isTrueFSharpStructTycon g tycon -let canBeAugmentedWithCompare g (tycon:Tycon) = +let canBeAugmentedWithCompare g (tycon: Tycon) = tycon.IsUnionTycon || tycon.IsRecordTycon || isTrueFSharpStructTycon g tycon -let getAugmentationAttribs g (tycon:Tycon) = - canBeAugmentedWithEquals g tycon, - canBeAugmentedWithCompare g tycon, - TryFindFSharpBoolAttribute g g.attrib_NoEqualityAttribute tycon.Attribs, - TryFindFSharpBoolAttribute g g.attrib_CustomEqualityAttribute tycon.Attribs, - TryFindFSharpBoolAttribute g g.attrib_ReferenceEqualityAttribute tycon.Attribs, - TryFindFSharpBoolAttribute g g.attrib_StructuralEqualityAttribute tycon.Attribs, - TryFindFSharpBoolAttribute g g.attrib_NoComparisonAttribute tycon.Attribs, - TryFindFSharpBoolAttribute g g.attrib_CustomComparisonAttribute tycon.Attribs, +let getAugmentationAttribs g (tycon: Tycon) = + canBeAugmentedWithEquals g tycon, + canBeAugmentedWithCompare g tycon, + TryFindFSharpBoolAttribute g g.attrib_NoEqualityAttribute tycon.Attribs, + TryFindFSharpBoolAttribute g g.attrib_CustomEqualityAttribute tycon.Attribs, + TryFindFSharpBoolAttribute g g.attrib_ReferenceEqualityAttribute tycon.Attribs, + TryFindFSharpBoolAttribute g g.attrib_StructuralEqualityAttribute tycon.Attribs, + TryFindFSharpBoolAttribute g g.attrib_NoComparisonAttribute tycon.Attribs, + TryFindFSharpBoolAttribute g g.attrib_CustomComparisonAttribute tycon.Attribs, TryFindFSharpBoolAttribute g g.attrib_StructuralComparisonAttribute tycon.Attribs -let CheckAugmentationAttribs isImplementation g amap (tycon:Tycon)= +let CheckAugmentationAttribs isImplementation g amap (tycon: Tycon) = let m = tycon.Range let attribs = getAugmentationAttribs g tycon match attribs with @@ -712,71 +712,71 @@ let CheckAugmentationAttribs isImplementation g amap (tycon:Tycon)= // THESE ARE THE LEGITIMATE CASES // [< >] on anything - | _, _ , None , None, None , None, None , None , None + | _, _, None, None, None, None, None, None, None // [] on union/record/struct - | true, _, None, Some(true), None , None , None , Some(true), None + | true, _, None, Some(true), None, None, None, Some(true), None // [] on union/record/struct - | true, _, None, Some(true), None , None , Some(true), None , None -> + | true, _, None, Some(true), None, None, Some(true), None, None -> () // [] on union/record/struct - | true, _, None, None , Some(true), None , Some(true), None , None + | true, _, None, None, Some(true), None, Some(true), None, None // [] on union/record/struct - | true, _, None, None , Some(true), None , None , None , None -> + | true, _, None, None, Some(true), None, None, None, None -> if isTrueFSharpStructTycon g tycon then errorR(Error(FSComp.SR.augNoRefEqualsOnStruct(), m)) else () // [] on union/record/struct - | true, true, None, None , None , Some(true), None , None , Some(true) + | true, true, None, None, None, Some(true), None, None, Some(true) // [] - | true, _, None, None , None , Some(true), Some(true), None , None + | true, _, None, None, None, Some(true), Some(true), None, None // [] - | true, _, None, None , None , Some(true), None , Some(true), None + | true, _, None, None, None, Some(true), None, Some(true), None // [] on anything - | _ , _, None, None , None , None , Some(true), None , None + | _, _, None, None, None, None, Some(true), None, None // [] on anything - | _ , _, Some(true), None, None , None , Some(true), None , None -> + | _, _, Some(true), None, None, None, Some(true), None, None -> () (* THESE ARE THE ERROR CASES *) // [] - | _, _, Some(true), _, _, _, None, _, _ -> + | _, _, Some(true), _, _, _, None, _, _ -> errorR(Error(FSComp.SR.augNoEqualityNeedsNoComparison(), m)) // [] - | true, true, _, _, _ , None , _, _, Some(true) -> + | true, true, _, _, _, None, _, _, Some(true) -> errorR(Error(FSComp.SR.augStructCompNeedsStructEquality(), m)) // [] - | true, _, _, _, _ , Some(true), None, _, None -> + | true, _, _, _, _, Some(true), None, _, None -> errorR(Error(FSComp.SR.augStructEqNeedsNoCompOrStructComp(), m)) // [] - | true, _, _, Some(true), _ , _, None, None, _ -> + | true, _, _, Some(true), _, _, None, None, _ -> errorR(Error(FSComp.SR.augCustomEqNeedsNoCompOrCustomComp(), m)) // [] - | true, _, _, _, Some(true) , Some(true) , _, _, _ + | true, _, _, _, Some(true), Some(true), _, _, _ // [] - | true, _, _, _, Some(true), _, _, _, Some(true) -> + | true, _, _, _, Some(true), _, _, _, Some(true) -> errorR(Error(FSComp.SR.augTypeCantHaveRefEqAndStructAttrs(), m)) // non augmented type, [] // non augmented type, [] // non augmented type, [] - | false, _, _, _, Some(true), _ , _ , _, _ - | false, _, _, _, _ , Some(true), _ , _, _ - | false, _, _, _, _ , _ , _ , _, Some(true) -> + | false, _, _, _, Some(true), _, _, _, _ + | false, _, _, _, _, Some(true), _, _, _ + | false, _, _, _, _, _, _, _, Some(true) -> errorR(Error(FSComp.SR.augOnlyCertainTypesCanHaveAttrs(), m)) // All other cases | _ -> @@ -805,7 +805,7 @@ let CheckAugmentationAttribs isImplementation g amap (tycon:Tycon)= | _, _, Some(true), _, _, _, _, _, _ when (hasExplicitEquals || hasExplicitGenericEquals) -> warning(Error(FSComp.SR.augNoEqNeedsNoObjEquals(), m)) // [] + any comparison semantics - | _, _, _, _, _, _, Some(true), _, _ when (hasExplicitICompare || hasExplicitIGenericCompare) -> + | _, _, _, _, _, _, Some(true), _, _ when (hasExplicitICompare || hasExplicitIGenericCompare) -> warning(Error(FSComp.SR.augNoCompCantImpIComp(), m)) // [] + no explicit override Object.Equals + no explicit IStructuralEquatable @@ -822,14 +822,14 @@ let CheckAugmentationAttribs isImplementation g amap (tycon:Tycon)= | _ -> () -let TyconIsCandidateForAugmentationWithCompare (g: TcGlobals) (tycon:Tycon) = +let TyconIsCandidateForAugmentationWithCompare (g: TcGlobals) (tycon: Tycon) = // This type gets defined in prim-types, before we can add attributes to F# type definitions let isUnit = g.compilingFslib && tycon.DisplayName = "Unit" not isUnit && not (TyconRefHasAttribute g tycon.Range g.attrib_IsByRefLikeAttribute (mkLocalTyconRef tycon)) && match getAugmentationAttribs g tycon with // [< >] - | true, true, None, None, None, None , None, None, None + | true, true, None, None, None, None, None, None, None // [] | true, true, None, None, None, Some(true), None, None, Some(true) // [] @@ -837,7 +837,7 @@ let TyconIsCandidateForAugmentationWithCompare (g: TcGlobals) (tycon:Tycon) = // other cases | _ -> false -let TyconIsCandidateForAugmentationWithEquals (g: TcGlobals) (tycon:Tycon) = +let TyconIsCandidateForAugmentationWithEquals (g: TcGlobals) (tycon: Tycon) = // This type gets defined in prim-types, before we can add attributes to F# type definitions let isUnit = g.compilingFslib && tycon.DisplayName = "Unit" not isUnit && @@ -845,7 +845,7 @@ let TyconIsCandidateForAugmentationWithEquals (g: TcGlobals) (tycon:Tycon) = match getAugmentationAttribs g tycon with // [< >] - | true, _, None, None, None, None , _, _, _ + | true, _, None, None, None, None, _, _, _ // [] // [] | true, _, None, None, None, Some(true), _, _, _ -> true @@ -859,7 +859,7 @@ let TyconIsCandidateForAugmentationWithHash g tycon = TyconIsCandidateForAugment // IComparable semantics associated with F# types. //------------------------------------------------------------------------- -let slotImplMethod (final,c,slotsig) : ValMemberInfo = +let slotImplMethod (final, c, slotsig) : ValMemberInfo = { ImplementedSlotSigs=[slotsig] MemberFlags= { IsInstance=true @@ -883,77 +883,77 @@ let nonVirtualMethod c : ValMemberInfo = let unitArg = ValReprInfo.unitArgData let unaryArg = [ ValReprInfo.unnamedTopArg ] let tupArg = [ [ ValReprInfo.unnamedTopArg1; ValReprInfo.unnamedTopArg1 ] ] -let mkValSpec g (tcref:TyconRef) tmty vis slotsig methn ty argData = +let mkValSpec g (tcref: TyconRef) tmty vis slotsig methn ty argData = let m = tcref.Range let tps = tcref.Typars(m) let final = isUnionTy g tmty || isRecdTy g tmty || isStructTy g tmty - let membInfo = match slotsig with None -> nonVirtualMethod tcref | Some(slotsig) -> slotImplMethod(final,tcref,slotsig) + let membInfo = match slotsig with None -> nonVirtualMethod tcref | Some(slotsig) -> slotImplMethod(final, tcref, slotsig) let inl = ValInline.Optional let args = ValReprInfo.unnamedTopArg :: argData let topValInfo = Some (ValReprInfo (ValReprInfo.InferTyparInfo tps, args, ValReprInfo.unnamedRetVal)) NewVal (methn, m, None, ty, Immutable, true, topValInfo, vis, ValNotInRecScope, Some(membInfo), NormalVal, [], inl, XmlDoc.Empty, true, false, false, false, false, false, None, Parent(tcref)) -let MakeValsForCompareAugmentation g (tcref:TyconRef) = +let MakeValsForCompareAugmentation g (tcref: TyconRef) = let m = tcref.Range - let _,tmty = mkMinimalTy g tcref + let _, tmty = mkMinimalTy g tcref let tps = tcref.Typars m let vis = tcref.TypeReprAccessibility mkValSpec g tcref tmty vis (Some(mkIComparableCompareToSlotSig g)) "CompareTo" (tps +-> (mkCompareObjTy g tmty)) unaryArg, mkValSpec g tcref tmty vis (Some(mkGenericIComparableCompareToSlotSig g tmty)) "CompareTo" (tps +-> (mkCompareTy g tmty)) unaryArg -let MakeValsForCompareWithComparerAugmentation g (tcref:TyconRef) = +let MakeValsForCompareWithComparerAugmentation g (tcref: TyconRef) = let m = tcref.Range - let _,tmty = mkMinimalTy g tcref + let _, tmty = mkMinimalTy g tcref let tps = tcref.Typars m let vis = tcref.TypeReprAccessibility mkValSpec g tcref tmty vis (Some(mkIStructuralComparableCompareToSlotSig g)) "CompareTo" (tps +-> (mkCompareWithComparerTy g tmty)) tupArg -let MakeValsForEqualsAugmentation g (tcref:TyconRef) = +let MakeValsForEqualsAugmentation g (tcref: TyconRef) = let m = tcref.Range - let _,tmty = mkMinimalTy g tcref + let _, tmty = mkMinimalTy g tcref let vis = tcref.TypeReprAccessibility let tps = tcref.Typars m let objEqualsVal = mkValSpec g tcref tmty vis (Some(mkEqualsSlotSig g)) "Equals" (tps +-> (mkEqualsObjTy g tmty)) unaryArg let nocEqualsVal = mkValSpec g tcref tmty vis (if tcref.Deref.IsExceptionDecl then None else Some(mkGenericIEquatableEqualsSlotSig g tmty)) "Equals" (tps +-> (mkEqualsTy g tmty)) unaryArg - objEqualsVal,nocEqualsVal + objEqualsVal, nocEqualsVal -let MakeValsForEqualityWithComparerAugmentation g (tcref:TyconRef) = - let _,tmty = mkMinimalTy g tcref +let MakeValsForEqualityWithComparerAugmentation g (tcref: TyconRef) = + let _, tmty = mkMinimalTy g tcref let vis = tcref.TypeReprAccessibility let tps = tcref.Typars(tcref.Range) let objGetHashCodeVal = mkValSpec g tcref tmty vis (Some(mkGetHashCodeSlotSig g)) "GetHashCode" (tps +-> (mkHashTy g tmty)) unitArg let withcGetHashCodeVal = mkValSpec g tcref tmty vis (Some(mkIStructuralEquatableGetHashCodeSlotSig g)) "GetHashCode" (tps +-> (mkHashWithComparerTy g tmty)) unaryArg let withcEqualsVal = mkValSpec g tcref tmty vis (Some(mkIStructuralEquatableEqualsSlotSig g)) "Equals" (tps +-> (mkEqualsWithComparerTy g tmty)) tupArg - objGetHashCodeVal,withcGetHashCodeVal,withcEqualsVal + objGetHashCodeVal, withcGetHashCodeVal, withcEqualsVal -let MakeBindingsForCompareAugmentation g (tycon:Tycon) = +let MakeBindingsForCompareAugmentation g (tycon: Tycon) = let tcref = mkLocalTyconRef tycon let m = tycon.Range let tps = tycon.Typars(tycon.Range) let mkCompare comparef = match tycon.GeneratedCompareToValues with | None -> [] - | Some (vref1,vref2) -> + | Some (vref1, vref2) -> let vspec1 = vref1.Deref let vspec2 = vref2.Deref (* this is the body of the override *) let rhs1 = - let tinst,ty = mkMinimalTy g tcref + let tinst, ty = mkMinimalTy g tcref - let thisv,thise = mkThisVar g m ty - let thatobjv,thatobje = mkCompGenLocal m "obj" g.obj_ty + let thisv, thise = mkThisVar g m ty + let thatobjv, thatobje = mkCompGenLocal m "obj" g.obj_ty let comparee = if isUnitTy g ty then mkZero g m else let thate = mkCoerceExpr (thatobje, ty, m, g.obj_ty) - mkApps g ((exprForValRef m vref2,vref2.Type), (if isNil tinst then [] else [tinst]), [thise;thate], m) + mkApps g ((exprForValRef m vref2, vref2.Type), (if isNil tinst then [] else [tinst]), [thise;thate], m) - mkLambdas m tps [thisv;thatobjv] (comparee,g.int_ty) + mkLambdas m tps [thisv;thatobjv] (comparee, g.int_ty) let rhs2 = - let thisv,thatv,comparee = comparef g tcref tycon - mkLambdas m tps [thisv;thatv] (comparee,g.int_ty) + let thisv, thatv, comparee = comparef g tcref tycon + mkLambdas m tps [thisv;thatv] (comparee, g.int_ty) [ // This one must come first because it may be inlined into the second mkCompGenBind vspec2 rhs2 mkCompGenBind vspec1 rhs1; ] @@ -961,7 +961,7 @@ let MakeBindingsForCompareAugmentation g (tycon:Tycon) = elif tycon.IsRecordTycon || tycon.IsStructOrEnumTycon then mkCompare mkRecdCompare else [] -let MakeBindingsForCompareWithComparerAugmentation g (tycon:Tycon) = +let MakeBindingsForCompareWithComparerAugmentation g (tycon: Tycon) = let tcref = mkLocalTyconRef tycon let m = tycon.Range let tps = tycon.Typars(tycon.Range) @@ -970,61 +970,61 @@ let MakeBindingsForCompareWithComparerAugmentation g (tycon:Tycon) = | None -> [] | Some (vref) -> let vspec = vref.Deref - let _,ty = mkMinimalTy g tcref + let _, ty = mkMinimalTy g tcref - let compv,compe = mkCompGenLocal m "comp" g.IComparer_ty + let compv, compe = mkCompGenLocal m "comp" g.IComparer_ty - let thisv,thise = mkThisVar g m ty - let thatobjv,thatobje = mkCompGenLocal m "obj" g.obj_ty + let thisv, thise = mkThisVar g m ty + let thatobjv, thatobje = mkCompGenLocal m "obj" g.obj_ty let thate = mkCoerceExpr (thatobje, ty, m, g.obj_ty) let rhs = - let comparee = comparef g tcref tycon (thisv,thise) (thatobjv,thate) compe + let comparee = comparef g tcref tycon (thisv, thise) (thatobjv, thate) compe let comparee = if isUnitTy g ty then mkZero g m else comparee - mkMultiLambdas m tps [[thisv];[thatobjv;compv]] (comparee,g.int_ty) + mkMultiLambdas m tps [[thisv];[thatobjv;compv]] (comparee, g.int_ty) [mkCompGenBind vspec rhs] if tycon.IsUnionTycon then mkCompare mkUnionCompareWithComparer elif tycon.IsRecordTycon || tycon.IsStructOrEnumTycon then mkCompare mkRecdCompareWithComparer else [] -let MakeBindingsForEqualityWithComparerAugmentation (g: TcGlobals) (tycon:Tycon) = +let MakeBindingsForEqualityWithComparerAugmentation (g: TcGlobals) (tycon: Tycon) = let tcref = mkLocalTyconRef tycon let m = tycon.Range let tps = tycon.Typars(tycon.Range) let mkStructuralEquatable hashf equalsf = match tycon.GeneratedHashAndEqualsWithComparerValues with | None -> [] - | Some (objGetHashCodeVal,withcGetHashCodeVal,withcEqualsVal) -> + | Some (objGetHashCodeVal, withcGetHashCodeVal, withcEqualsVal) -> // build the hash rhs let withcGetHashCodeExpr = - let compv,compe = mkCompGenLocal m "comp" g.IEqualityComparer_ty - let thisv,hashe = hashf g tcref tycon compe - mkLambdas m tps [thisv;compv] (hashe,g.int_ty) + let compv, compe = mkCompGenLocal m "comp" g.IEqualityComparer_ty + let thisv, hashe = hashf g tcref tycon compe + mkLambdas m tps [thisv;compv] (hashe, g.int_ty) // build the equals rhs let withcEqualsExpr = - let _tinst,ty = mkMinimalTy g tcref - let thisv,thise = mkThisVar g m ty - let thatobjv,thatobje = mkCompGenLocal m "obj" g.obj_ty - let thatv,thate = mkCompGenLocal m "that" ty - let compv,compe = mkCompGenLocal m "comp" g.IEqualityComparer_ty - let equalse = equalsf g tcref tycon (thisv,thise) thatobje (thatv,thate) compe - mkMultiLambdas m tps [[thisv];[thatobjv;compv]] (equalse,g.bool_ty) + let _tinst, ty = mkMinimalTy g tcref + let thisv, thise = mkThisVar g m ty + let thatobjv, thatobje = mkCompGenLocal m "obj" g.obj_ty + let thatv, thate = mkCompGenLocal m "that" ty + let compv, compe = mkCompGenLocal m "comp" g.IEqualityComparer_ty + let equalse = equalsf g tcref tycon (thisv, thise) thatobje (thatv, thate) compe + mkMultiLambdas m tps [[thisv];[thatobjv;compv]] (equalse, g.bool_ty) let objGetHashCodeExpr = - let tinst,ty = mkMinimalTy g tcref + let tinst, ty = mkMinimalTy g tcref - let thisv,thise = mkThisVar g m ty - let unitv,_ = mkCompGenLocal m "unitArg" g.unit_ty + let thisv, thise = mkThisVar g m ty + let unitv, _ = mkCompGenLocal m "unitArg" g.unit_ty let hashe = if isUnitTy g ty then mkZero g m else let compe = mkILCallGetEqualityComparer g m - mkApps g ((exprForValRef m withcGetHashCodeVal,withcGetHashCodeVal.Type), (if isNil tinst then [] else [tinst]), [thise; compe], m) + mkApps g ((exprForValRef m withcGetHashCodeVal, withcGetHashCodeVal.Type), (if isNil tinst then [] else [tinst]), [thise; compe], m) - mkLambdas m tps [thisv; unitv] (hashe,g.int_ty) + mkLambdas m tps [thisv; unitv] (hashe, g.int_ty) [(mkCompGenBind withcGetHashCodeVal.Deref withcGetHashCodeExpr) (mkCompGenBind objGetHashCodeVal.Deref objGetHashCodeExpr) @@ -1034,34 +1034,34 @@ let MakeBindingsForEqualityWithComparerAugmentation (g: TcGlobals) (tycon:Tycon) elif tycon.IsExceptionDecl then mkStructuralEquatable mkExnHashWithComparer mkExnEqualityWithComparer else [] -let MakeBindingsForEqualsAugmentation (g: TcGlobals) (tycon:Tycon) = +let MakeBindingsForEqualsAugmentation (g: TcGlobals) (tycon: Tycon) = let tcref = mkLocalTyconRef tycon let m = tycon.Range let tps = tycon.Typars(m) let mkEquals equalsf = match tycon.GeneratedHashAndEqualsValues with | None -> [] - | Some (objEqualsVal,nocEqualsVal) -> + | Some (objEqualsVal, nocEqualsVal) -> // this is the body of the real strongly typed implementation let nocEqualsExpr = - let thisv,thatv,equalse = equalsf g tcref tycon - mkLambdas m tps [thisv;thatv] (equalse,g.bool_ty) + let thisv, thatv, equalse = equalsf g tcref tycon + mkLambdas m tps [thisv;thatv] (equalse, g.bool_ty) // this is the body of the override let objEqualsExpr = - let tinst,ty = mkMinimalTy g tcref + let tinst, ty = mkMinimalTy g tcref - let thisv,thise = mkThisVar g m ty - let thatobjv,thatobje = mkCompGenLocal m "obj" g.obj_ty + let thisv, thise = mkThisVar g m ty + let thatobjv, thatobje = mkCompGenLocal m "obj" g.obj_ty let equalse = if isUnitTy g ty then mkTrue g m else - let thatv,thate = mkCompGenLocal m "that" ty + let thatv, thate = mkCompGenLocal m "that" ty mkIsInstConditional g m ty thatobje thatv - (mkApps g ((exprForValRef m nocEqualsVal,nocEqualsVal.Type), (if isNil tinst then [] else [tinst]), [thise;thate], m)) + (mkApps g ((exprForValRef m nocEqualsVal, nocEqualsVal.Type), (if isNil tinst then [] else [tinst]), [thise;thate], m)) (mkFalse g m) - mkLambdas m tps [thisv;thatobjv] (equalse,g.bool_ty) + mkLambdas m tps [thisv;thatobjv] (equalse, g.bool_ty) [ mkCompGenBind nocEqualsVal.Deref nocEqualsExpr @@ -1074,7 +1074,8 @@ let MakeBindingsForEqualsAugmentation (g: TcGlobals) (tycon:Tycon) = let rec TypeDefinitelyHasEquality g ty = if isAppTy g ty && HasFSharpAttribute g g.attrib_NoEqualityAttribute (tcrefOfAppTy g ty).Attribs then false - elif isTyparTy g ty && (destTyparTy g ty).Constraints |> List.exists (function TyparConstraint.SupportsEquality _ -> true | _ -> false) then + elif isTyparTy g ty && + (destTyparTy g ty).Constraints |> List.exists (function TyparConstraint.SupportsEquality _ -> true | _ -> false) then true else match ty with @@ -1085,7 +1086,7 @@ let rec TypeDefinitelyHasEquality g ty = | _ -> // The type is equatable because it has Object.Equals(...) isAppTy g ty && - let tcref,tinst = destAppTy g ty + let tcref, tinst = destAppTy g ty // Give a good error for structural types excluded from the equality relation because of their fields not (TyconIsCandidateForAugmentationWithEquals g tcref.Deref && Option.isNone tcref.GeneratedHashAndEqualsWithComparerValues) && // Check the (possibly inferred) structural dependencies diff --git a/src/fcs-fable/src/fsharp/CheckFormatStrings.fs b/src/fcs-fable/src/fsharp/CheckFormatStrings.fs index bf1f6bbcb3..7fd078de82 100755 --- a/src/fcs-fable/src/fsharp/CheckFormatStrings.fs +++ b/src/fcs-fable/src/fsharp/CheckFormatStrings.fs @@ -42,7 +42,7 @@ type FormatInfoRegister = mutable addZeros : bool mutable precision : bool} -let newInfo ()= +let newInfo () = { leftJustify = false numPrefixIfPos = None addZeros = false diff --git a/src/fcs-fable/src/fsharp/CompileOps.fs b/src/fcs-fable/src/fsharp/CompileOps.fs index 3b88502e30..64240b209b 100755 --- a/src/fcs-fable/src/fsharp/CompileOps.fs +++ b/src/fcs-fable/src/fsharp/CompileOps.fs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. /// Coordinating compiler operations - configuration, loading initial context, reporting errors etc. module internal FSharp.Compiler.CompileOps @@ -50,10 +50,6 @@ open FSharp.Compiler.ExtensionTyping open Microsoft.FSharp.Core.CompilerServices #endif -#if FX_RESHAPED_REFLECTION -open Microsoft.FSharp.Core.ReflectionAdapters -#endif - #if DEBUG [] module internal CompilerService = @@ -70,7 +66,7 @@ let FSharpImplFileSuffixes = [".ml";".fs";".fsscript";".fsx"] let resSuffixes = [".resx"] let FSharpScriptFileSuffixes = [".fsscript";".fsx"] let doNotRequireNamespaceOrModuleSuffixes = [".mli";".ml"] @ FSharpScriptFileSuffixes -let FSharpLightSyntaxFileSuffixes : string list = [ ".fs";".fsscript";".fsx";".fsi" ] +let FSharpLightSyntaxFileSuffixes: string list = [ ".fs";".fsscript";".fsx";".fsi" ] //---------------------------------------------------------------------------- @@ -94,7 +90,7 @@ exception HashLoadedSourceHasIssues of (*warnings*) exn list * (*errors*) exn li exception HashLoadedScriptConsideredSource of range -let GetRangeOfDiagnostic(err:PhasedDiagnostic) = +let GetRangeOfDiagnostic(err: PhasedDiagnostic) = let rec RangeFromException = function | ErrorFromAddingConstraint(_, err2, _) -> RangeFromException err2 #if !NO_EXTENSIONTYPING @@ -240,15 +236,15 @@ let GetRangeOfDiagnostic(err:PhasedDiagnostic) = RangeFromException err.Exception -let GetDiagnosticNumber(err:PhasedDiagnostic) = - let rec GetFromException(e:exn) = +let GetDiagnosticNumber(err: PhasedDiagnostic) = + let rec GetFromException(e: exn) = match e with (* DO NOT CHANGE THESE NUMBERS *) | ErrorFromAddingTypeEquation _ -> 1 | FunctionExpected _ -> 2 | NotAFunctionButIndexer _ -> 3217 - | NotAFunction _ -> 3 - | FieldNotMutable _ -> 5 + | NotAFunction _ -> 3 + | FieldNotMutable _ -> 5 | Recursion _ -> 6 | InvalidRuntimeCoercion _ -> 7 | IndeterminateRuntimeCoercion _ -> 8 @@ -256,19 +252,19 @@ let GetDiagnosticNumber(err:PhasedDiagnostic) = | SyntaxError _ -> 10 // 11 cannot be reused // 12 cannot be reused - | IndeterminateStaticCoercion _ -> 13 - | StaticCoercionShouldUseBox _ -> 14 + | IndeterminateStaticCoercion _ -> 13 + | StaticCoercionShouldUseBox _ -> 14 // 15 cannot be reused | RuntimeCoercionSourceSealed _ -> 16 | OverrideDoesntOverride _ -> 17 - | UnionPatternsBindDifferentNames _ -> 18 - | UnionCaseWrongArguments _ -> 19 - | UnitTypeExpected _ -> 20 - | UnitTypeExpectedWithEquality _ -> 20 - | UnitTypeExpectedWithPossiblePropertySetter _ -> 20 - | UnitTypeExpectedWithPossibleAssignment _ -> 20 - | RecursiveUseCheckedAtRuntime _ -> 21 - | LetRecEvaluatedOutOfOrder _ -> 22 + | UnionPatternsBindDifferentNames _ -> 18 + | UnionCaseWrongArguments _ -> 19 + | UnitTypeExpected _ -> 20 + | UnitTypeExpectedWithEquality _ -> 20 + | UnitTypeExpectedWithPossiblePropertySetter _ -> 20 + | UnitTypeExpectedWithPossibleAssignment _ -> 20 + | RecursiveUseCheckedAtRuntime _ -> 21 + | LetRecEvaluatedOutOfOrder _ -> 22 | NameClash _ -> 23 // 24 cannot be reused | PatternMatchCompilation.MatchIncomplete _ -> 25 @@ -277,14 +273,14 @@ let GetDiagnosticNumber(err:PhasedDiagnostic) = | ValNotLocal _ -> 28 | MissingFields _ -> 29 | ValueRestriction _ -> 30 - | LetRecUnsound _ -> 31 - | FieldsFromDifferentTypes _ -> 32 + | LetRecUnsound _ -> 31 + | FieldsFromDifferentTypes _ -> 32 | TyconBadArgs _ -> 33 | ValueNotContained _ -> 34 - | Deprecated _ -> 35 + | Deprecated _ -> 35 | ConstrNotContained _ -> 36 | Duplicate _ -> 37 - | VarBoundTwice _ -> 38 + | VarBoundTwice _ -> 38 | UndefinedName _ -> 39 | LetRecCheckedAtRuntime _ -> 40 | UnresolvedOverloading _ -> 41 @@ -382,9 +378,9 @@ let GetWarningLevel err = match err.Exception with // Level 5 warnings | RecursiveUseCheckedAtRuntime _ - | LetRecEvaluatedOutOfOrder _ + | LetRecEvaluatedOutOfOrder _ | DefensiveCopyWarning _ - | FullAbstraction _ -> 5 + | FullAbstraction _ -> 5 | NumberedError((n, _), _) | ErrorWithSuggestions((n, _), _, _, _) | Error((n, _), _) -> @@ -394,7 +390,7 @@ let GetWarningLevel err = // 1178, tcNoEqualityNeeded2, "The struct, record or union type '%s' does not support structural equality because the type '%s' does not satisfy the 'equality' constraint...." if (n = 1178) then 5 else 2 // Level 2 - | _ -> 2 + | _ -> 2 let warningOn err level specificWarnOn = let n = GetDiagnosticNumber err @@ -406,7 +402,7 @@ let warningOn err level specificWarnOn = | 3180 -> false // abImplicitHeapAllocation - off by default | _ -> level >= GetWarningLevel err -let SplitRelatedDiagnostics(err:PhasedDiagnostic) = +let SplitRelatedDiagnostics(err: PhasedDiagnostic) = let ToPhased(e) = {Exception=e; Phase = err.Phase} let rec SplitRelatedException = function | UnresolvedOverloading(a, overloads, b, c) -> @@ -607,7 +603,7 @@ let TargetInvocationExceptionWrapperE() = DeclareResourceString("TargetInvocatio let getErrorString key = SR.GetString key -let (|InvalidArgument|_|) (exn:exn) = match exn with :? ArgumentException as e -> Some e.Message | _ -> None +let (|InvalidArgument|_|) (exn: exn) = match exn with :? ArgumentException as e -> Some e.Message | _ -> None #if FABLE_COMPILER type StringBuilder() = @@ -621,9 +617,9 @@ module Printf = Printf.kprintf f #endif -let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = +let OutputPhasedErrorR (os: StringBuilder) (err: PhasedDiagnostic) = - let rec OutputExceptionR (os:StringBuilder) error = + let rec OutputExceptionR (os: StringBuilder) error = match error with | ConstraintSolverTupleDiffLengths(_, tl1, tl2, m, m2) -> @@ -634,7 +630,7 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = | ConstraintSolverInfiniteTypes(contextInfo, denv, t1, t2, m, m2) -> // REVIEW: consider if we need to show _cxs (the type parameter constraints) let t1, t2, _cxs = NicePrint.minimalStringsOfTwoTypes denv t1 t2 - os.Append(ConstraintSolverInfiniteTypesE().Format t1 t2) |> ignore + os.Append(ConstraintSolverInfiniteTypesE().Format t1 t2) |> ignore match contextInfo with | ContextInfo.ReturnInComputationExpression -> @@ -655,7 +651,7 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = // REVIEW: consider if we need to show _cxs (the type parameter constraints) let t1, t2, _cxs = NicePrint.minimalStringsOfTwoTypes denv t1 t2 - os.Append(ConstraintSolverTypesNotInEqualityRelation1E().Format t1 t2 ) |> ignore + os.Append(ConstraintSolverTypesNotInEqualityRelation1E().Format t1 t2 ) |> ignore if m.StartLine <> m2.StartLine then os.Append(SeeAlsoE().Format (stringOfRange m)) |> ignore @@ -697,9 +693,9 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = | _ -> () fopt |> Option.iter (Printf.bprintf os " %s") - | ErrorFromAddingTypeEquation(g, denv, t1, t2, ConstraintSolverTypesNotInEqualityRelation(_, t1', t2', m , _ , contextInfo), _) + | ErrorFromAddingTypeEquation(g, denv, t1, t2, ConstraintSolverTypesNotInEqualityRelation(_, t1', t2', m, _, contextInfo), _) when typeEquiv g t1 t1' - && typeEquiv g t2 t2' -> + && typeEquiv g t2 t2' -> let t1, t2, tpcs = NicePrint.minimalStringsOfTwoTypes denv t1 t2 match contextInfo with | ContextInfo.IfExpression range when range = m -> os.Append(FSComp.SR.ifExpression(t1, t2)) |> ignore @@ -838,7 +834,7 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = else os.Append(NameClash2E().Format k1 nm1 nm k2 nm2) |> ignore - | Duplicate(k, s, _) -> + | Duplicate(k, s, _) -> if k = "member" then os.Append(Duplicate1E().Format (DecompileOpName s)) |> ignore else @@ -855,7 +851,7 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = let _, errs = f(smr, ccuName, s) os.Append(errs) |> ignore - | FieldNotMutable _ -> + | FieldNotMutable _ -> os.Append(FieldNotMutableE().Format) |> ignore | FieldsFromDifferentTypes (_, fref1, fref2, _) -> @@ -898,9 +894,9 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = | Some tpnm -> match ty1 with | TType_measure _ -> - os.Append(NonRigidTypar2E().Format tpnm (NicePrint.stringOfTy denv ty)) |> ignore + os.Append(NonRigidTypar2E().Format tpnm (NicePrint.stringOfTy denv ty)) |> ignore | _ -> - os.Append(NonRigidTypar3E().Format tpnm (NicePrint.stringOfTy denv ty)) |> ignore + os.Append(NonRigidTypar3E().Format tpnm (NicePrint.stringOfTy denv ty)) |> ignore | SyntaxError (ctxt, _) -> let ctxt = unbox>(ctxt) @@ -939,57 +935,57 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = | Parser.TOKEN_INFIX_STAR_STAR_OP -> getErrorString("Parser.TOKEN.INFIX.STAR.STAR.OP") | Parser.TOKEN_INFIX_COMPARE_OP -> getErrorString("Parser.TOKEN.INFIX.COMPARE.OP") | Parser.TOKEN_COLON_GREATER -> getErrorString("Parser.TOKEN.COLON.GREATER") - | Parser.TOKEN_COLON_COLON ->getErrorString("Parser.TOKEN.COLON.COLON") + | Parser.TOKEN_COLON_COLON ->getErrorString("Parser.TOKEN.COLON.COLON") | Parser.TOKEN_PERCENT_OP -> getErrorString("Parser.TOKEN.PERCENT.OP") | Parser.TOKEN_INFIX_AT_HAT_OP -> getErrorString("Parser.TOKEN.INFIX.AT.HAT.OP") | Parser.TOKEN_INFIX_BAR_OP -> getErrorString("Parser.TOKEN.INFIX.BAR.OP") | Parser.TOKEN_PLUS_MINUS_OP -> getErrorString("Parser.TOKEN.PLUS.MINUS.OP") | Parser.TOKEN_PREFIX_OP -> getErrorString("Parser.TOKEN.PREFIX.OP") - | Parser.TOKEN_COLON_QMARK_GREATER -> getErrorString("Parser.TOKEN.COLON.QMARK.GREATER") + | Parser.TOKEN_COLON_QMARK_GREATER -> getErrorString("Parser.TOKEN.COLON.QMARK.GREATER") | Parser.TOKEN_INFIX_STAR_DIV_MOD_OP -> getErrorString("Parser.TOKEN.INFIX.STAR.DIV.MOD.OP") | Parser.TOKEN_INFIX_AMP_OP -> getErrorString("Parser.TOKEN.INFIX.AMP.OP") - | Parser.TOKEN_AMP -> getErrorString("Parser.TOKEN.AMP") - | Parser.TOKEN_AMP_AMP -> getErrorString("Parser.TOKEN.AMP.AMP") - | Parser.TOKEN_BAR_BAR -> getErrorString("Parser.TOKEN.BAR.BAR") - | Parser.TOKEN_LESS -> getErrorString("Parser.TOKEN.LESS") - | Parser.TOKEN_GREATER -> getErrorString("Parser.TOKEN.GREATER") - | Parser.TOKEN_QMARK -> getErrorString("Parser.TOKEN.QMARK") + | Parser.TOKEN_AMP -> getErrorString("Parser.TOKEN.AMP") + | Parser.TOKEN_AMP_AMP -> getErrorString("Parser.TOKEN.AMP.AMP") + | Parser.TOKEN_BAR_BAR -> getErrorString("Parser.TOKEN.BAR.BAR") + | Parser.TOKEN_LESS -> getErrorString("Parser.TOKEN.LESS") + | Parser.TOKEN_GREATER -> getErrorString("Parser.TOKEN.GREATER") + | Parser.TOKEN_QMARK -> getErrorString("Parser.TOKEN.QMARK") | Parser.TOKEN_QMARK_QMARK -> getErrorString("Parser.TOKEN.QMARK.QMARK") | Parser.TOKEN_COLON_QMARK-> getErrorString("Parser.TOKEN.COLON.QMARK") | Parser.TOKEN_INT32_DOT_DOT -> getErrorString("Parser.TOKEN.INT32.DOT.DOT") - | Parser.TOKEN_DOT_DOT -> getErrorString("Parser.TOKEN.DOT.DOT") - | Parser.TOKEN_QUOTE -> getErrorString("Parser.TOKEN.QUOTE") - | Parser.TOKEN_STAR -> getErrorString("Parser.TOKEN.STAR") - | Parser.TOKEN_HIGH_PRECEDENCE_TYAPP -> getErrorString("Parser.TOKEN.HIGH.PRECEDENCE.TYAPP") - | Parser.TOKEN_COLON -> getErrorString("Parser.TOKEN.COLON") - | Parser.TOKEN_COLON_EQUALS -> getErrorString("Parser.TOKEN.COLON.EQUALS") - | Parser.TOKEN_LARROW -> getErrorString("Parser.TOKEN.LARROW") + | Parser.TOKEN_DOT_DOT -> getErrorString("Parser.TOKEN.DOT.DOT") + | Parser.TOKEN_QUOTE -> getErrorString("Parser.TOKEN.QUOTE") + | Parser.TOKEN_STAR -> getErrorString("Parser.TOKEN.STAR") + | Parser.TOKEN_HIGH_PRECEDENCE_TYAPP -> getErrorString("Parser.TOKEN.HIGH.PRECEDENCE.TYAPP") + | Parser.TOKEN_COLON -> getErrorString("Parser.TOKEN.COLON") + | Parser.TOKEN_COLON_EQUALS -> getErrorString("Parser.TOKEN.COLON.EQUALS") + | Parser.TOKEN_LARROW -> getErrorString("Parser.TOKEN.LARROW") | Parser.TOKEN_EQUALS -> getErrorString("Parser.TOKEN.EQUALS") | Parser.TOKEN_GREATER_BAR_RBRACK -> getErrorString("Parser.TOKEN.GREATER.BAR.RBRACK") | Parser.TOKEN_MINUS -> getErrorString("Parser.TOKEN.MINUS") - | Parser.TOKEN_ADJACENT_PREFIX_OP -> getErrorString("Parser.TOKEN.ADJACENT.PREFIX.OP") + | Parser.TOKEN_ADJACENT_PREFIX_OP -> getErrorString("Parser.TOKEN.ADJACENT.PREFIX.OP") | Parser.TOKEN_FUNKY_OPERATOR_NAME -> getErrorString("Parser.TOKEN.FUNKY.OPERATOR.NAME") | Parser.TOKEN_COMMA-> getErrorString("Parser.TOKEN.COMMA") | Parser.TOKEN_DOT -> getErrorString("Parser.TOKEN.DOT") | Parser.TOKEN_BAR-> getErrorString("Parser.TOKEN.BAR") | Parser.TOKEN_HASH -> getErrorString("Parser.TOKEN.HASH") - | Parser.TOKEN_UNDERSCORE -> getErrorString("Parser.TOKEN.UNDERSCORE") - | Parser.TOKEN_SEMICOLON -> getErrorString("Parser.TOKEN.SEMICOLON") + | Parser.TOKEN_UNDERSCORE -> getErrorString("Parser.TOKEN.UNDERSCORE") + | Parser.TOKEN_SEMICOLON -> getErrorString("Parser.TOKEN.SEMICOLON") | Parser.TOKEN_SEMICOLON_SEMICOLON-> getErrorString("Parser.TOKEN.SEMICOLON.SEMICOLON") | Parser.TOKEN_LPAREN-> getErrorString("Parser.TOKEN.LPAREN") | Parser.TOKEN_RPAREN | Parser.TOKEN_RPAREN_COMING_SOON | Parser.TOKEN_RPAREN_IS_HERE -> getErrorString("Parser.TOKEN.RPAREN") - | Parser.TOKEN_LQUOTE -> getErrorString("Parser.TOKEN.LQUOTE") - | Parser.TOKEN_LBRACK -> getErrorString("Parser.TOKEN.LBRACK") - | Parser.TOKEN_LBRACE_BAR -> getErrorString("Parser.TOKEN.LBRACE.BAR") - | Parser.TOKEN_LBRACK_BAR -> getErrorString("Parser.TOKEN.LBRACK.BAR") - | Parser.TOKEN_LBRACK_LESS -> getErrorString("Parser.TOKEN.LBRACK.LESS") - | Parser.TOKEN_LBRACE -> getErrorString("Parser.TOKEN.LBRACE") - | Parser.TOKEN_BAR_RBRACK -> getErrorString("Parser.TOKEN.BAR.RBRACK") - | Parser.TOKEN_BAR_RBRACE -> getErrorString("Parser.TOKEN.BAR.RBRACE") - | Parser.TOKEN_GREATER_RBRACK -> getErrorString("Parser.TOKEN.GREATER.RBRACK") + | Parser.TOKEN_LQUOTE -> getErrorString("Parser.TOKEN.LQUOTE") + | Parser.TOKEN_LBRACK -> getErrorString("Parser.TOKEN.LBRACK") + | Parser.TOKEN_LBRACE_BAR -> getErrorString("Parser.TOKEN.LBRACE.BAR") + | Parser.TOKEN_LBRACK_BAR -> getErrorString("Parser.TOKEN.LBRACK.BAR") + | Parser.TOKEN_LBRACK_LESS -> getErrorString("Parser.TOKEN.LBRACK.LESS") + | Parser.TOKEN_LBRACE -> getErrorString("Parser.TOKEN.LBRACE") + | Parser.TOKEN_BAR_RBRACK -> getErrorString("Parser.TOKEN.BAR.RBRACK") + | Parser.TOKEN_BAR_RBRACE -> getErrorString("Parser.TOKEN.BAR.RBRACE") + | Parser.TOKEN_GREATER_RBRACK -> getErrorString("Parser.TOKEN.GREATER.RBRACK") | Parser.TOKEN_RQUOTE_DOT _ - | Parser.TOKEN_RQUOTE -> getErrorString("Parser.TOKEN.RQUOTE") - | Parser.TOKEN_RBRACK -> getErrorString("Parser.TOKEN.RBRACK") + | Parser.TOKEN_RQUOTE -> getErrorString("Parser.TOKEN.RQUOTE") + | Parser.TOKEN_RBRACK -> getErrorString("Parser.TOKEN.RBRACK") | Parser.TOKEN_RBRACE | Parser.TOKEN_RBRACE_COMING_SOON | Parser.TOKEN_RBRACE_IS_HERE -> getErrorString("Parser.TOKEN.RBRACE") | Parser.TOKEN_PUBLIC -> getErrorString("Parser.TOKEN.PUBLIC") | Parser.TOKEN_PRIVATE -> getErrorString("Parser.TOKEN.PRIVATE") @@ -1006,14 +1002,14 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = | Parser.TOKEN_MEMBER -> getErrorString("Parser.TOKEN.MEMBER") | Parser.TOKEN_STATIC -> getErrorString("Parser.TOKEN.STATIC") | Parser.TOKEN_NAMESPACE-> getErrorString("Parser.TOKEN.NAMESPACE") - | Parser.TOKEN_OBLOCKBEGIN -> getErrorString("Parser.TOKEN.OBLOCKBEGIN") + | Parser.TOKEN_OBLOCKBEGIN -> getErrorString("Parser.TOKEN.OBLOCKBEGIN") | EndOfStructuredConstructToken -> getErrorString("Parser.TOKEN.OBLOCKEND") | Parser.TOKEN_THEN | Parser.TOKEN_OTHEN -> getErrorString("Parser.TOKEN.OTHEN") | Parser.TOKEN_ELSE | Parser.TOKEN_OELSE -> getErrorString("Parser.TOKEN.OELSE") | Parser.TOKEN_LET(_) - | Parser.TOKEN_OLET(_) -> getErrorString("Parser.TOKEN.OLET") + | Parser.TOKEN_OLET(_) -> getErrorString("Parser.TOKEN.OLET") | Parser.TOKEN_OBINDER | Parser.TOKEN_BINDER -> getErrorString("Parser.TOKEN.BINDER") | Parser.TOKEN_ODO -> getErrorString("Parser.TOKEN.ODO") @@ -1025,50 +1021,50 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = | Parser.TOKEN_DO_BANG | Parser.TOKEN_ODO_BANG -> getErrorString("Parser.TOKEN.ODO.BANG") | Parser.TOKEN_YIELD -> getErrorString("Parser.TOKEN.YIELD") - | Parser.TOKEN_YIELD_BANG -> getErrorString("Parser.TOKEN.YIELD.BANG") + | Parser.TOKEN_YIELD_BANG -> getErrorString("Parser.TOKEN.YIELD.BANG") | Parser.TOKEN_OINTERFACE_MEMBER-> getErrorString("Parser.TOKEN.OINTERFACE.MEMBER") | Parser.TOKEN_ELIF -> getErrorString("Parser.TOKEN.ELIF") | Parser.TOKEN_RARROW -> getErrorString("Parser.TOKEN.RARROW") | Parser.TOKEN_SIG -> getErrorString("Parser.TOKEN.SIG") - | Parser.TOKEN_STRUCT -> getErrorString("Parser.TOKEN.STRUCT") - | Parser.TOKEN_UPCAST -> getErrorString("Parser.TOKEN.UPCAST") - | Parser.TOKEN_DOWNCAST -> getErrorString("Parser.TOKEN.DOWNCAST") - | Parser.TOKEN_NULL -> getErrorString("Parser.TOKEN.NULL") - | Parser.TOKEN_RESERVED -> getErrorString("Parser.TOKEN.RESERVED") - | Parser.TOKEN_MODULE | Parser.TOKEN_MODULE_COMING_SOON | Parser.TOKEN_MODULE_IS_HERE -> getErrorString("Parser.TOKEN.MODULE") - | Parser.TOKEN_AND -> getErrorString("Parser.TOKEN.AND") - | Parser.TOKEN_AS -> getErrorString("Parser.TOKEN.AS") - | Parser.TOKEN_ASSERT -> getErrorString("Parser.TOKEN.ASSERT") - | Parser.TOKEN_OASSERT -> getErrorString("Parser.TOKEN.ASSERT") + | Parser.TOKEN_STRUCT -> getErrorString("Parser.TOKEN.STRUCT") + | Parser.TOKEN_UPCAST -> getErrorString("Parser.TOKEN.UPCAST") + | Parser.TOKEN_DOWNCAST -> getErrorString("Parser.TOKEN.DOWNCAST") + | Parser.TOKEN_NULL -> getErrorString("Parser.TOKEN.NULL") + | Parser.TOKEN_RESERVED -> getErrorString("Parser.TOKEN.RESERVED") + | Parser.TOKEN_MODULE | Parser.TOKEN_MODULE_COMING_SOON | Parser.TOKEN_MODULE_IS_HERE -> getErrorString("Parser.TOKEN.MODULE") + | Parser.TOKEN_AND -> getErrorString("Parser.TOKEN.AND") + | Parser.TOKEN_AS -> getErrorString("Parser.TOKEN.AS") + | Parser.TOKEN_ASSERT -> getErrorString("Parser.TOKEN.ASSERT") + | Parser.TOKEN_OASSERT -> getErrorString("Parser.TOKEN.ASSERT") | Parser.TOKEN_ASR-> getErrorString("Parser.TOKEN.ASR") - | Parser.TOKEN_DOWNTO -> getErrorString("Parser.TOKEN.DOWNTO") - | Parser.TOKEN_EXCEPTION -> getErrorString("Parser.TOKEN.EXCEPTION") - | Parser.TOKEN_FALSE -> getErrorString("Parser.TOKEN.FALSE") - | Parser.TOKEN_FOR -> getErrorString("Parser.TOKEN.FOR") - | Parser.TOKEN_FUN -> getErrorString("Parser.TOKEN.FUN") + | Parser.TOKEN_DOWNTO -> getErrorString("Parser.TOKEN.DOWNTO") + | Parser.TOKEN_EXCEPTION -> getErrorString("Parser.TOKEN.EXCEPTION") + | Parser.TOKEN_FALSE -> getErrorString("Parser.TOKEN.FALSE") + | Parser.TOKEN_FOR -> getErrorString("Parser.TOKEN.FOR") + | Parser.TOKEN_FUN -> getErrorString("Parser.TOKEN.FUN") | Parser.TOKEN_FUNCTION-> getErrorString("Parser.TOKEN.FUNCTION") - | Parser.TOKEN_FINALLY -> getErrorString("Parser.TOKEN.FINALLY") - | Parser.TOKEN_LAZY -> getErrorString("Parser.TOKEN.LAZY") - | Parser.TOKEN_OLAZY -> getErrorString("Parser.TOKEN.LAZY") - | Parser.TOKEN_MATCH -> getErrorString("Parser.TOKEN.MATCH") + | Parser.TOKEN_FINALLY -> getErrorString("Parser.TOKEN.FINALLY") + | Parser.TOKEN_LAZY -> getErrorString("Parser.TOKEN.LAZY") + | Parser.TOKEN_OLAZY -> getErrorString("Parser.TOKEN.LAZY") + | Parser.TOKEN_MATCH -> getErrorString("Parser.TOKEN.MATCH") | Parser.TOKEN_MATCH_BANG -> getErrorString("Parser.TOKEN.MATCH.BANG") - | Parser.TOKEN_MUTABLE -> getErrorString("Parser.TOKEN.MUTABLE") - | Parser.TOKEN_NEW -> getErrorString("Parser.TOKEN.NEW") - | Parser.TOKEN_OF -> getErrorString("Parser.TOKEN.OF") - | Parser.TOKEN_OPEN -> getErrorString("Parser.TOKEN.OPEN") + | Parser.TOKEN_MUTABLE -> getErrorString("Parser.TOKEN.MUTABLE") + | Parser.TOKEN_NEW -> getErrorString("Parser.TOKEN.NEW") + | Parser.TOKEN_OF -> getErrorString("Parser.TOKEN.OF") + | Parser.TOKEN_OPEN -> getErrorString("Parser.TOKEN.OPEN") | Parser.TOKEN_OR -> getErrorString("Parser.TOKEN.OR") | Parser.TOKEN_VOID -> getErrorString("Parser.TOKEN.VOID") | Parser.TOKEN_EXTERN-> getErrorString("Parser.TOKEN.EXTERN") | Parser.TOKEN_INTERFACE -> getErrorString("Parser.TOKEN.INTERFACE") - | Parser.TOKEN_REC -> getErrorString("Parser.TOKEN.REC") - | Parser.TOKEN_TO -> getErrorString("Parser.TOKEN.TO") - | Parser.TOKEN_TRUE -> getErrorString("Parser.TOKEN.TRUE") - | Parser.TOKEN_TRY -> getErrorString("Parser.TOKEN.TRY") - | Parser.TOKEN_TYPE | Parser.TOKEN_TYPE_COMING_SOON | Parser.TOKEN_TYPE_IS_HERE -> getErrorString("Parser.TOKEN.TYPE") - | Parser.TOKEN_VAL -> getErrorString("Parser.TOKEN.VAL") - | Parser.TOKEN_INLINE -> getErrorString("Parser.TOKEN.INLINE") - | Parser.TOKEN_WHEN -> getErrorString("Parser.TOKEN.WHEN") - | Parser.TOKEN_WHILE -> getErrorString("Parser.TOKEN.WHILE") + | Parser.TOKEN_REC -> getErrorString("Parser.TOKEN.REC") + | Parser.TOKEN_TO -> getErrorString("Parser.TOKEN.TO") + | Parser.TOKEN_TRUE -> getErrorString("Parser.TOKEN.TRUE") + | Parser.TOKEN_TRY -> getErrorString("Parser.TOKEN.TRY") + | Parser.TOKEN_TYPE | Parser.TOKEN_TYPE_COMING_SOON | Parser.TOKEN_TYPE_IS_HERE -> getErrorString("Parser.TOKEN.TYPE") + | Parser.TOKEN_VAL -> getErrorString("Parser.TOKEN.VAL") + | Parser.TOKEN_INLINE -> getErrorString("Parser.TOKEN.INLINE") + | Parser.TOKEN_WHEN -> getErrorString("Parser.TOKEN.WHEN") + | Parser.TOKEN_WHILE -> getErrorString("Parser.TOKEN.WHILE") | Parser.TOKEN_WITH-> getErrorString("Parser.TOKEN.WITH") | Parser.TOKEN_IF -> getErrorString("Parser.TOKEN.IF") | Parser.TOKEN_DO -> getErrorString("Parser.TOKEN.DO") @@ -1077,13 +1073,13 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = | Parser.TOKEN_IN | Parser.TOKEN_JOIN_IN -> getErrorString("Parser.TOKEN.IN") | Parser.TOKEN_HIGH_PRECEDENCE_PAREN_APP-> getErrorString("Parser.TOKEN.HIGH.PRECEDENCE.PAREN.APP") | Parser.TOKEN_HIGH_PRECEDENCE_BRACK_APP-> getErrorString("Parser.TOKEN.HIGH.PRECEDENCE.BRACK.APP") - | Parser.TOKEN_BEGIN -> getErrorString("Parser.TOKEN.BEGIN") + | Parser.TOKEN_BEGIN -> getErrorString("Parser.TOKEN.BEGIN") | Parser.TOKEN_END -> getErrorString("Parser.TOKEN.END") | Parser.TOKEN_HASH_LIGHT | Parser.TOKEN_HASH_LINE | Parser.TOKEN_HASH_IF | Parser.TOKEN_HASH_ELSE - | Parser.TOKEN_HASH_ENDIF -> getErrorString("Parser.TOKEN.HASH.ENDIF") + | Parser.TOKEN_HASH_ENDIF -> getErrorString("Parser.TOKEN.HASH.ENDIF") | Parser.TOKEN_INACTIVECODE -> getErrorString("Parser.TOKEN.INACTIVECODE") | Parser.TOKEN_LEX_FAILURE-> getErrorString("Parser.TOKEN.LEX.FAILURE") | Parser.TOKEN_WHITESPACE -> getErrorString("Parser.TOKEN.WHITESPACE") @@ -1199,8 +1195,8 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = | [NONTERM_Category_Definition] -> os.Append(NONTERM_Category_DefinitionE().Format) |> ignore; true | [NONTERM_Category_SignatureFile] -> os.Append(NONTERM_Category_SignatureFileE().Format) |> ignore; true | [NONTERM_Category_Pattern] -> os.Append(NONTERM_Category_PatternE().Format) |> ignore; true - | [NONTERM_Category_Expr] -> os.Append(NONTERM_Category_ExprE().Format) |> ignore; true - | [NONTERM_Category_Type] -> os.Append(NONTERM_Category_TypeE().Format) |> ignore; true + | [NONTERM_Category_Expr] -> os.Append(NONTERM_Category_ExprE().Format) |> ignore; true + | [NONTERM_Category_Type] -> os.Append(NONTERM_Category_TypeE().Format) |> ignore; true | [Parser.NONTERM_typeArgsActual] -> os.Append(NONTERM_typeArgsActualE().Format) |> ignore; true | _ -> false) @@ -1211,14 +1207,14 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = #else foundInContext |> ignore // suppress unused variable warning in RELEASE #endif - let fix (s:string) = s.Replace(SR.GetString("FixKeyword"), "").Replace(SR.GetString("FixSymbol"), "").Replace(SR.GetString("FixReplace"), "") + let fix (s: string) = s.Replace(SR.GetString("FixKeyword"), "").Replace(SR.GetString("FixSymbol"), "").Replace(SR.GetString("FixReplace"), "") match (ctxt.ShiftTokens |> List.map Parser.tokenTagToTokenId |> List.filter (function Parser.TOKEN_error | Parser.TOKEN_EOF -> false | _ -> true) |> List.map tokenIdToText |> Set.ofList |> Set.toList) with - | [tokenName1] -> os.Append(TokenName1E().Format (fix tokenName1)) |> ignore + | [tokenName1] -> os.Append(TokenName1E().Format (fix tokenName1)) |> ignore | [tokenName1;tokenName2] -> os.Append(TokenName1TokenName2E().Format (fix tokenName1) (fix tokenName2)) |> ignore | [tokenName1;tokenName2;tokenName3] -> os.Append(TokenName1TokenName2TokenName3E().Format (fix tokenName1) (fix tokenName2) (fix tokenName3)) |> ignore | _ -> () @@ -1279,7 +1275,7 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = os.Append(OverrideDoesntOverride2E().Format sig1) |> ignore let sig2 = DispatchSlotChecking.FormatMethInfoSig g amap m denv minfoVirt if sig1 <> sig2 then - os.Append(OverrideDoesntOverride3E().Format sig2) |> ignore + os.Append(OverrideDoesntOverride3E().Format sig2) |> ignore | UnionCaseWrongArguments (_, n1, n2, _) -> os.Append(UnionCaseWrongArgumentsE().Format n2 n1) |> ignore @@ -1339,10 +1335,10 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = if isAlreadyMutable then UnitTypeExpectedWithPossibleAssignmentToMutableE().Format (NicePrint.stringOfTy denv ty) bindingName else - UnitTypeExpectedWithPossibleAssignmentE().Format (NicePrint.stringOfTy denv ty) bindingName + UnitTypeExpectedWithPossibleAssignmentE().Format (NicePrint.stringOfTy denv ty) bindingName os.Append warningText |> ignore - | RecursiveUseCheckedAtRuntime _ -> + | RecursiveUseCheckedAtRuntime _ -> os.Append(RecursiveUseCheckedAtRuntimeE().Format) |> ignore | LetRecUnsound (_, [v], _) -> @@ -1350,7 +1346,7 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = | LetRecUnsound (_, path, _) -> let bos = new StringBuilder() - (path.Tail @ [path.Head]) |> List.iter (fun (v:ValRef) -> bos.Append(LetRecUnsoundInnerE().Format v.DisplayName) |> ignore) + (path.Tail @ [path.Head]) |> List.iter (fun (v: ValRef) -> bos.Append(LetRecUnsoundInnerE().Format v.DisplayName) |> ignore) os.Append(LetRecUnsound2E().Format (List.head path).DisplayName (bos.ToString())) |> ignore | LetRecEvaluatedOutOfOrder (_, _, _, _) -> @@ -1396,7 +1392,7 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = | InvalidArgument s - | Failure s as exn -> + | Failure s as exn -> ignore exn // use the argument, even in non DEBUG let f1 = SR.GetString("Failure1") let f2 = SR.GetString("Failure2") @@ -1418,8 +1414,8 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = os.Append(MatchIncomplete1E().Format) |> ignore match cexOpt with | None -> () - | Some (cex, false) -> os.Append(MatchIncomplete2E().Format cex) |> ignore - | Some (cex, true) -> os.Append(MatchIncomplete3E().Format cex) |> ignore + | Some (cex, false) -> os.Append(MatchIncomplete2E().Format cex) |> ignore + | Some (cex, true) -> os.Append(MatchIncomplete3E().Format cex) |> ignore if isComp then os.Append(MatchIncomplete4E().Format) |> ignore @@ -1427,8 +1423,8 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = os.Append(EnumMatchIncomplete1E().Format) |> ignore match cexOpt with | None -> () - | Some (cex, false) -> os.Append(MatchIncomplete2E().Format cex) |> ignore - | Some (cex, true) -> os.Append(MatchIncomplete3E().Format cex) |> ignore + | Some (cex, false) -> os.Append(MatchIncomplete2E().Format cex) |> ignore + | Some (cex, true) -> os.Append(MatchIncomplete3E().Format cex) |> ignore if isComp then os.Append(MatchIncomplete4E().Format) |> ignore @@ -1477,7 +1473,7 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = | MemberKind.PropertyGet | MemberKind.PropertySet | MemberKind.Constructor -> true (* can't infer extra polymorphism *) - | _ -> false (* can infer extra polymorphism *) + | _ -> false (* can infer extra polymorphism *) end -> os.Append(ValueRestriction3E().Format (NicePrint.stringOfQualifiedValOrMember denv v)) |> ignore | _ -> @@ -1551,7 +1547,7 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = os.Append(FSComp.SR.buildUnexpectedFileNameCharacter(fileName, string invalidChar)|>snd) |> ignore | HashLoadedSourceHasIssues(warnings, errors, _) -> - let Emit(l:exn list) = + let Emit(l: exn list) = OutputExceptionR os (List.head l) if errors=[] then os.Append(HashLoadedSourceHasIssues1E().Format) |> ignore @@ -1566,7 +1562,7 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = | InvalidInternalsVisibleToAssemblyName(badName, fileNameOption) -> match fileNameOption with | Some file -> os.Append(InvalidInternalsVisibleToAssemblyName1E().Format badName file) |> ignore - | None -> os.Append(InvalidInternalsVisibleToAssemblyName2E().Format badName) |> ignore + | None -> os.Append(InvalidInternalsVisibleToAssemblyName2E().Format badName) |> ignore | LoadedSourceNotFoundIgnoring(filename, _) -> os.Append(LoadedSourceNotFoundIgnoringE().Format filename) |> ignore @@ -1605,7 +1601,7 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = // remove any newlines and tabs -let OutputPhasedDiagnostic (os:System.Text.StringBuilder) (err:PhasedDiagnostic) (flattenErrors:bool) = +let OutputPhasedDiagnostic (os: System.Text.StringBuilder) (err: PhasedDiagnostic) (flattenErrors: bool) = let buf = new StringBuilder() OutputPhasedErrorR buf err @@ -1618,7 +1614,7 @@ let SanitizeFileName fileName (implicitIncludeDir: string) = // - fsi.exe sometimes passes "stdin" as a dummy filename // - if you have a #line directive, e.g. // # 1000 "Line01.fs" - // then it also asserts. But these are edge cases that can be fixed later, e.g. in bug 4651. + // then it also asserts. But these are edge cases that can be fixed later, e.g. in bug 4651. //System.Diagnostics.Debug.Assert(FileSystem.IsPathRootedShim(fileName), sprintf "filename should be absolute: '%s'" fileName) try let fullPath = FileSystem.GetFullPathShim(fileName) @@ -1637,22 +1633,22 @@ let SanitizeFileName fileName (implicitIncludeDir: string) = [] type DiagnosticLocation = - { Range : range - File : string - TextRepresentation : string - IsEmpty : bool } + { Range: range + File: string + TextRepresentation: string + IsEmpty: bool } [] type DiagnosticCanonicalInformation = - { ErrorNumber : int - Subcategory : string - TextRepresentation : string } + { ErrorNumber: int + Subcategory: string + TextRepresentation: string } [] type DiagnosticDetailedInfo = - { Location : DiagnosticLocation option - Canonical : DiagnosticCanonicalInformation - Message : string } + { Location: DiagnosticLocation option + Canonical: DiagnosticCanonicalInformation + Message: string } [] type Diagnostic = @@ -1660,8 +1656,8 @@ type Diagnostic = | Long of bool * DiagnosticDetailedInfo /// returns sequence that contains Diagnostic for the given error + Diagnostic for all related errors -let CollectDiagnostic (implicitIncludeDir, showFullPaths, flattenErrors, errorStyle, isError, err:PhasedDiagnostic) = - let outputWhere (showFullPaths, errorStyle) m : DiagnosticLocation = +let CollectDiagnostic (implicitIncludeDir, showFullPaths, flattenErrors, errorStyle, isError, err: PhasedDiagnostic) = + let outputWhere (showFullPaths, errorStyle) m: DiagnosticLocation = if m = rangeStartup || m = rangeCmdArgs then { Range = m; TextRepresentation = ""; IsEmpty = true; File = "" } else @@ -1672,7 +1668,7 @@ let CollectDiagnostic (implicitIncludeDir, showFullPaths, flattenErrors, errorSt SanitizeFileName file implicitIncludeDir let text, m, file = match errorStyle with - | ErrorStyle.EmacsErrors -> + | ErrorStyle.EmacsErrors -> let file = file.Replace("\\", "/") (sprintf "File \"%s\", line %d, characters %d-%d: " file m.StartLine m.StartColumn m.EndColumn), m, file @@ -1683,20 +1679,20 @@ let CollectDiagnostic (implicitIncludeDir, showFullPaths, flattenErrors, errorSt (sprintf "%s(%d,%d): " file m.StartLine m.StartColumn), m, file // We may also want to change TestErrors to be 1-based - | ErrorStyle.TestErrors -> + | ErrorStyle.TestErrors -> let file = file.Replace("/", "\\") let m = mkRange m.FileName (mkPos m.StartLine (m.StartColumn + 1)) (mkPos m.EndLine (m.EndColumn + 1) ) sprintf "%s(%d,%d-%d,%d): " file m.StartLine m.StartColumn m.EndLine m.EndColumn, m, file - | ErrorStyle.GccErrors -> + | ErrorStyle.GccErrors -> let file = file.Replace('/', System.IO.Path.DirectorySeparatorChar) let m = mkRange m.FileName (mkPos m.StartLine (m.StartColumn + 1)) (mkPos m.EndLine (m.EndColumn + 1) ) sprintf "%s:%d:%d: " file m.StartLine m.StartColumn, m, file // Here, we want the complete range information so Project Systems can generate proper squiggles - | ErrorStyle.VSErrors -> + | ErrorStyle.VSErrors -> // Show prefix only for real files. Otherwise, we just want a truncated error like: - // parse error FS0031 : blah blah + // parse error FS0031: blah blah if m<>range0 && m<>rangeStartup && m<>rangeCmdArgs then let file = file.Replace("/", "\\") let m = mkRange m.FileName (mkPos m.StartLine (m.StartColumn + 1)) (mkPos m.EndLine (m.EndColumn + 1) ) @@ -1726,7 +1722,7 @@ let CollectDiagnostic (implicitIncludeDir, showFullPaths, flattenErrors, errorSt // Show the subcategory for --vserrors so that we can fish it out in Visual Studio and use it to determine error stickiness. | ErrorStyle.VSErrors -> sprintf "%s %s FS%04d: " subcategory (if isError then "error" else "warning") errorNumber | _ -> sprintf "%s FS%04d: " (if isError then "error" else "warning") errorNumber - { ErrorNumber = errorNumber; Subcategory = subcategory; TextRepresentation = text} + { ErrorNumber = errorNumber; Subcategory = subcategory; TextRepresentation = text} let mainError, relatedErrors = SplitRelatedDiagnostics err let where = OutputWhere(mainError) @@ -1736,11 +1732,11 @@ let CollectDiagnostic (implicitIncludeDir, showFullPaths, flattenErrors, errorSt OutputPhasedDiagnostic os mainError flattenErrors os.ToString() - let entry : DiagnosticDetailedInfo = { Location = where; Canonical = canonical; Message = message } + let entry: DiagnosticDetailedInfo = { Location = where; Canonical = canonical; Message = message } errors.Add ( Diagnostic.Long(isError, entry ) ) - let OutputRelatedError(err:PhasedDiagnostic) = + let OutputRelatedError(err: PhasedDiagnostic) = match errorStyle with // Give a canonical string when --vserror. | ErrorStyle.VSErrors -> @@ -1751,7 +1747,7 @@ let CollectDiagnostic (implicitIncludeDir, showFullPaths, flattenErrors, errorSt OutputPhasedDiagnostic os err flattenErrors os.ToString() - let entry : DiagnosticDetailedInfo = { Location = relWhere; Canonical = relCanonical; Message = relMessage} + let entry: DiagnosticDetailedInfo = { Location = relWhere; Canonical = relCanonical; Message = relMessage} errors.Add( Diagnostic.Long (isError, entry) ) | _ -> @@ -1771,11 +1767,11 @@ let CollectDiagnostic (implicitIncludeDir, showFullPaths, flattenErrors, errorSt #endif | x -> report x - errors :> seq<_> + errors:> seq<_> /// used by fsc.exe and fsi.exe, but not by VS /// prints error and related errors to the specified StringBuilder -let rec OutputDiagnostic (implicitIncludeDir, showFullPaths, flattenErrors, errorStyle, isError) os (err:PhasedDiagnostic) = +let rec OutputDiagnostic (implicitIncludeDir, showFullPaths, flattenErrors, errorStyle, isError) os (err: PhasedDiagnostic) = let errors = CollectDiagnostic (implicitIncludeDir, showFullPaths, flattenErrors, errorStyle, isError, err) for e in errors do @@ -1792,17 +1788,17 @@ let rec OutputDiagnostic (implicitIncludeDir, showFullPaths, flattenErrors, erro let OutputDiagnosticContext prefix fileLineFn os err = match GetRangeOfDiagnostic err with - | None -> () + | None -> () | Some m -> let filename = m.FileName let lineA = m.StartLine let lineB = m.EndLine - let line = fileLineFn filename lineA + let line = fileLineFn filename lineA if line<>"" then - let iA = m.StartColumn - let iB = m.EndColumn - let iLen = if lineA = lineB then max (iB - iA) 1 else 1 - Printf.bprintf os "%s%s\n" prefix line + let iA = m.StartColumn + let iB = m.EndColumn + let iLen = if lineA = lineB then max (iB - iA) 1 else 1 + Printf.bprintf os "%s%s\n" prefix line Printf.bprintf os "%s%s%s\n" prefix (String.make iA '-') (String.make iLen '^') #endif //!FABLE_COMPILER @@ -1819,7 +1815,7 @@ let GetDefaultFSharpCoreReference () = typeof>.Assembly.Location type private TypeInThisAssembly = class end // Use the ValueTuple that is executing with the compiler if it is from System.ValueTuple -// or the System.ValueTuple.dll that sits alongside the compiler. (Note we always ship one with the compiler) +// or the System.ValueTuple.dll that sits alongside the compiler. (Note we always ship one with the compiler) let GetDefaultSystemValueTupleReference () = try let asm = typeof>.Assembly @@ -1853,7 +1849,7 @@ let DefaultReferencesForScriptsAndOutOfProjectSources(assumeDotNetFramework) = yield "System.Drawing" yield "System.Core" - // These are the Portable-profile and .NET Standard 1.6 dependencies of FSharp.Core.dll. These are needed + // These are the Portable-profile and .NET Standard 1.6 dependencies of FSharp.Core.dll. These are needed // when an F# sript references an F# profile 7, 78, 259 or .NET Standard 1.6 component which in turn refers // to FSharp.Core for profile 7, 78, 259 or .NET Standard. yield "System.Runtime" // lots of types @@ -1898,8 +1894,8 @@ let DefaultReferencesForScriptsAndOutOfProjectSources(assumeDotNetFramework) = ] -// A set of assemblies to always consider to be system assemblies. A common set of these can be used a shared -// resources between projects in the compiler services. Also all assembles where well-known system types exist +// A set of assemblies to always consider to be system assemblies. A common set of these can be used a shared +// resources between projects in the compiler services. Also all assembles where well-known system types exist // referenced from TcGlobals must be listed here. let SystemAssemblies () = HashSet @@ -2036,14 +2032,14 @@ let (++) x s = x @ [s] /// Will return None if the filename is not found. let TryResolveFileUsingPaths(paths, m, name) = let () = - try FileSystem.IsPathRootedShim(name) |> ignore + try FileSystem.IsPathRootedShim(name) |> ignore with :? System.ArgumentException as e -> error(Error(FSComp.SR.buildProblemWithFilename(name, e.Message), m)) if FileSystem.IsPathRootedShim(name) && FileSystem.SafeExists name then Some name else let res = paths |> List.tryPick (fun path -> let n = Path.Combine (path, name) - if FileSystem.SafeExists n then Some n + if FileSystem.SafeExists n then Some n else None) res @@ -2057,7 +2053,7 @@ let ResolveFileUsingPaths(paths, m, name) = #endif //!FABLE_COMPILER -let GetWarningNumber(m, s:string) = +let GetWarningNumber(m, s: string) = try // Okay so ... // #pragma strips FS of the #pragma "FS0004" and validates the warning number @@ -2070,7 +2066,7 @@ let GetWarningNumber(m, s:string) = warning(Error(FSComp.SR.buildInvalidWarningNumber(s), m)) None -let ComputeMakePathAbsolute implicitIncludeDir (path : string) = +let ComputeMakePathAbsolute implicitIncludeDir (path: string) = try // remove any quotation marks from the path first let path = path.Replace("\"", "") @@ -2130,24 +2126,24 @@ type VersionFlag = /// reference backed by information generated by the the compiler service. type IRawFSharpAssemblyData = /// The raw list AutoOpenAttribute attributes in the assembly - abstract GetAutoOpenAttributes : ILGlobals -> string list + abstract GetAutoOpenAttributes: ILGlobals -> string list /// The raw list InternalsVisibleToAttribute attributes in the assembly - abstract GetInternalsVisibleToAttributes : ILGlobals -> string list + abstract GetInternalsVisibleToAttributes: ILGlobals -> string list /// The raw IL module definition in the assembly, if any. This is not present for cross-project references /// in the language service - abstract TryGetILModuleDef : unit -> ILModuleDef option + abstract TryGetILModuleDef: unit -> ILModuleDef option /// The raw F# signature data in the assembly, if any - abstract GetRawFSharpSignatureData : range * ilShortAssemName: string * fileName: string -> (string * (unit -> byte[])) list + abstract GetRawFSharpSignatureData: range * ilShortAssemName: string * fileName: string -> (string * (unit -> byte[])) list /// The raw F# optimization data in the assembly, if any - abstract GetRawFSharpOptimizationData : range * ilShortAssemName: string * fileName: string -> (string * (unit -> byte[])) list + abstract GetRawFSharpOptimizationData: range * ilShortAssemName: string * fileName: string -> (string * (unit -> byte[])) list /// The table of type forwarders in the assembly - abstract GetRawTypeForwarders : unit -> ILExportedTypesAndForwarders + abstract GetRawTypeForwarders: unit -> ILExportedTypesAndForwarders /// The identity of the module - abstract ILScopeRef : ILScopeRef - abstract ILAssemblyRefs : ILAssemblyRef list - abstract ShortAssemblyName : string - abstract HasAnyFSharpSignatureDataAttribute : bool - abstract HasMatchingFSharpSignatureDataAttribute : ILGlobals -> bool + abstract ILScopeRef: ILScopeRef + abstract ILAssemblyRefs: ILAssemblyRef list + abstract ShortAssemblyName: string + abstract HasAnyFSharpSignatureDataAttribute: bool + abstract HasMatchingFSharpSignatureDataAttribute: ILGlobals -> bool /// Cache of time stamps as we traverse a project description type TimeStampCache(defaultTimeStamp: DateTime) = @@ -2176,20 +2172,20 @@ type TimeStampCache(defaultTimeStamp: DateTime) = and IProjectReference = /// The name of the assembly file generated by the project - abstract FileName : string + abstract FileName: string /// Evaluate raw contents of the assembly file generated by the project - abstract EvaluateRawContents : CompilationThreadToken -> Cancellable + abstract EvaluateRawContents: CompilationThreadToken -> Cancellable /// 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. + /// 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. - abstract TryGetLogicalTimeStamp : TimeStampCache * CompilationThreadToken -> System.DateTime option + abstract TryGetLogicalTimeStamp: TimeStampCache * CompilationThreadToken -> System.DateTime option type AssemblyReference = | AssemblyReference of range * string * IProjectReference option @@ -2215,9 +2211,9 @@ type ImportedBinary = #if !NO_EXTENSIONTYPING ProviderGeneratedAssembly: System.Reflection.Assembly option IsProviderGenerated: bool - ProviderGeneratedStaticLinkMap : ProvidedAssemblyStaticLinkingMap option + ProviderGeneratedStaticLinkMap: ProvidedAssemblyStaticLinkingMap option #endif - ILAssemblyRefs : ILAssemblyRef list + ILAssemblyRefs: ILAssemblyRef list ILScopeRef: ILScopeRef } type ImportedAssembly = @@ -2229,7 +2225,7 @@ type ImportedAssembly = IsProviderGenerated: bool mutable TypeProviders: Tainted list #endif - FSharpOptimizationData : Microsoft.FSharp.Control.Lazy> } + FSharpOptimizationData: Microsoft.FSharp.Control.Lazy> } type AvailableImportedAssembly = | ResolvedImportedAssembly of ImportedAssembly @@ -2241,7 +2237,7 @@ type CcuLoadFailureAction = [] type TcConfigBuilder = - { mutable primaryAssembly : PrimaryAssembly + { mutable primaryAssembly: PrimaryAssembly mutable autoResolveOpenDirectivesToDlls: bool mutable noFeedback: bool mutable stackReserveSize: int32 option @@ -2257,144 +2253,144 @@ type TcConfigBuilder = mutable implicitOpens: string list mutable useFsiAuxLib: bool mutable framework: bool - mutable resolutionEnvironment : ReferenceResolver.ResolutionEnvironment + mutable resolutionEnvironment: ReferenceResolver.ResolutionEnvironment mutable implicitlyResolveAssemblies: bool mutable light: bool option mutable conditionalCompilationDefines: string list mutable loadedSources: (range * string) list - mutable referencedDLLs : AssemblyReference list - mutable projectReferences : IProjectReference list - mutable knownUnresolvedReferences : UnresolvedAssemblyReference list + mutable referencedDLLs: AssemblyReference list + mutable projectReferences: IProjectReference list + mutable knownUnresolvedReferences: UnresolvedAssemblyReference list reduceMemoryUsage: ReduceMemoryFlag - mutable subsystemVersion : int * int - mutable useHighEntropyVA : bool + mutable subsystemVersion: int * int + mutable useHighEntropyVA: bool mutable inputCodePage: int option - mutable embedResources : string list + mutable embedResources: string list mutable errorSeverityOptions: FSharpErrorSeverityOptions mutable mlCompatibility: bool mutable checkOverflow: bool - mutable showReferenceResolutions:bool - mutable outputFile : string option - mutable platform : ILPlatform option - mutable prefer32Bit : bool - mutable useSimpleResolution : bool - mutable target : CompilerTarget - mutable debuginfo : bool - mutable testFlagEmitFeeFeeAs100001 : bool - mutable dumpDebugInfo : bool - mutable debugSymbolFile : string option + mutable showReferenceResolutions: bool + mutable outputFile: string option + mutable platform: ILPlatform option + mutable prefer32Bit: bool + mutable useSimpleResolution: bool + mutable target: CompilerTarget + mutable debuginfo: bool + mutable testFlagEmitFeeFeeAs100001: bool + mutable dumpDebugInfo: bool + mutable debugSymbolFile: string option (* Backend configuration *) - mutable typeCheckOnly : bool - mutable parseOnly : bool - mutable importAllReferencesOnly : bool - mutable simulateException : string option - mutable printAst : bool - mutable tokenizeOnly : bool - mutable testInteractionParser : bool - mutable reportNumDecls : bool - mutable printSignature : bool - mutable printSignatureFile : string - mutable xmlDocOutputFile : string option - mutable stats : bool - mutable generateFilterBlocks : bool (* don't generate filter blocks due to bugs on Mono *) - - mutable signer : string option - mutable container : string option - - mutable delaysign : bool - mutable publicsign : bool - mutable version : VersionFlag - mutable metadataVersion : string option - mutable standalone : bool - mutable extraStaticLinkRoots : string list - mutable noSignatureData : bool - mutable onlyEssentialOptimizationData : bool - mutable useOptimizationDataFile : bool - mutable jitTracking : bool - mutable portablePDB : bool - mutable embeddedPDB : bool - mutable embedAllSource : bool - mutable embedSourceList : string list - mutable sourceLink : string - - mutable ignoreSymbolStoreSequencePoints : bool - mutable internConstantStrings : bool - mutable extraOptimizationIterations : int - - mutable win32res : string - mutable win32manifest : string - mutable includewin32manifest : bool - mutable linkResources : string list + mutable typeCheckOnly: bool + mutable parseOnly: bool + mutable importAllReferencesOnly: bool + mutable simulateException: string option + mutable printAst: bool + mutable tokenizeOnly: bool + mutable testInteractionParser: bool + mutable reportNumDecls: bool + mutable printSignature: bool + mutable printSignatureFile: string + mutable xmlDocOutputFile: string option + mutable stats: bool + mutable generateFilterBlocks: bool (* don't generate filter blocks due to bugs on Mono *) + + mutable signer: string option + mutable container: string option + + mutable delaysign: bool + mutable publicsign: bool + mutable version: VersionFlag + mutable metadataVersion: string option + mutable standalone: bool + mutable extraStaticLinkRoots: string list + mutable noSignatureData: bool + mutable onlyEssentialOptimizationData: bool + mutable useOptimizationDataFile: bool + mutable jitTracking: bool + mutable portablePDB: bool + mutable embeddedPDB: bool + mutable embedAllSource: bool + mutable embedSourceList: string list + mutable sourceLink: string + + mutable ignoreSymbolStoreSequencePoints: bool + mutable internConstantStrings: bool + mutable extraOptimizationIterations: int + + mutable win32res: string + mutable win32manifest: string + mutable includewin32manifest: bool + mutable linkResources: string list mutable legacyReferenceResolver: ReferenceResolver.Resolver - mutable showFullPaths : bool - mutable errorStyle : ErrorStyle - mutable utf8output : bool + mutable showFullPaths: bool + mutable errorStyle: ErrorStyle + mutable utf8output: bool mutable flatErrors: bool - mutable maxErrors : int - mutable abortOnError : bool (* intended for fsi scripts that should exit on first error *) - mutable baseAddress : int32 option + mutable maxErrors: int + mutable abortOnError: bool (* intended for fsi scripts that should exit on first error *) + mutable baseAddress: int32 option #if DEBUG - mutable showOptimizationData : bool + mutable showOptimizationData: bool #endif - mutable showTerms : bool (* show terms between passes? *) - mutable writeTermsToFiles : bool (* show terms to files? *) - mutable doDetuple : bool (* run detuple pass? *) - mutable doTLR : bool (* run TLR pass? *) - mutable doFinalSimplify : bool (* do final simplification pass *) - mutable optsOn : bool (* optimizations are turned on *) - mutable optSettings : Optimizer.OptimizationSettings - mutable emitTailcalls : bool - mutable deterministic : bool + mutable showTerms: bool (* show terms between passes? *) + mutable writeTermsToFiles: bool (* show terms to files? *) + mutable doDetuple: bool (* run detuple pass? *) + mutable doTLR: bool (* run TLR pass? *) + mutable doFinalSimplify: bool (* do final simplification pass *) + mutable optsOn: bool (* optimizations are turned on *) + mutable optSettings: Optimizer.OptimizationSettings + mutable emitTailcalls: bool + mutable deterministic: bool mutable preferredUiLang: string option - mutable lcid : int option - mutable productNameForBannerText : string + mutable lcid: int option + mutable productNameForBannerText: string /// show the MS (c) notice, e.g. with help or fsi? - mutable showBanner : bool + mutable showBanner: bool /// show times between passes? - mutable showTimes : bool - mutable showLoadedAssemblies : bool - mutable continueAfterParseFailure : bool + mutable showTimes: bool + mutable showLoadedAssemblies: bool + mutable continueAfterParseFailure: bool #if !NO_EXTENSIONTYPING /// show messages about extension type resolution? - mutable showExtensionTypeMessages : bool + mutable showExtensionTypeMessages: bool #endif /// pause between passes? - mutable pause : bool + mutable pause: bool /// whenever possible, emit callvirt instead of call - mutable alwaysCallVirt : bool + mutable alwaysCallVirt: bool /// if true, strip away data that would not be of use to end users, but is useful to us for debugging // REVIEW: "stripDebugData"? - mutable noDebugData : bool + mutable noDebugData: bool /// if true, indicates all type checking and code generation is in the context of fsi.exe - isInteractive : bool - isInvalidationSupported : bool + isInteractive: bool + isInvalidationSupported: bool /// used to log sqm data /// if true - every expression in quotations will be augmented with full debug info (filename, location in file) - mutable emitDebugInfoInQuotations : bool + mutable emitDebugInfoInQuotations: bool - mutable exename : string option + mutable exename: string option // If true - the compiler will copy FSharp.Core.dll along the produced binaries - mutable copyFSharpCore : CopyFSharpCoreFlag + mutable copyFSharpCore: CopyFSharpCoreFlag /// When false FSI will lock referenced assemblies requiring process restart, false = disable Shadow Copy false (*default*) - mutable shadowCopyReferences : bool + mutable shadowCopyReferences: bool /// 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. - mutable tryGetMetadataSnapshot : ILReaderTryGetMetadataSnapshot + mutable tryGetMetadataSnapshot: ILReaderTryGetMetadataSnapshot - mutable internalTestSpanStackReferring : bool + mutable internalTestSpanStackReferring: bool - mutable noConditionalErasure : bool + mutable noConditionalErasure: bool } static member Initial = @@ -2573,7 +2569,7 @@ type TcConfigBuilder = let outfile = match tcConfigB.outputFile, List.rev implFiles with | None, [] -> "out" + ext() - | None, h :: _ -> + | None, h :: _ -> let basic = fileNameOfPath h let modname = try Filename.chopExtension basic with _ -> basic modname+(ext()) @@ -2602,7 +2598,7 @@ type TcConfigBuilder = #endif //!FABLE_COMPILER - member tcConfigB.TurnWarningOff(m, s:string) = + member tcConfigB.TurnWarningOff(m, s: string) = use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parameter match GetWarningNumber(m, s) with | None -> () @@ -2612,7 +2608,7 @@ type TcConfigBuilder = tcConfigB.errorSeverityOptions <- { tcConfigB.errorSeverityOptions with WarnOff = ListSet.insert (=) n tcConfigB.errorSeverityOptions.WarnOff } - member tcConfigB.TurnWarningOn(m, s:string) = + member tcConfigB.TurnWarningOn(m, s: string) = use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parameter match GetWarningNumber(m, s) with | None -> () @@ -2672,14 +2668,14 @@ type TcConfigBuilder = member tcConfigB.AddReferencedAssemblyByPath (m, path) = if FileSystem.IsInvalidPathShim(path) then warning(Error(FSComp.SR.buildInvalidAssemblyName(path), m)) - elif not (tcConfigB.referencedDLLs |> List.exists (fun ar2 -> m=ar2.Range && path=ar2.Text)) then // NOTE: We keep same paths if range is different. + elif not (tcConfigB.referencedDLLs |> List.exists (fun ar2 -> m=ar2.Range && path=ar2.Text)) then // NOTE: We keep same paths if range is different. let projectReference = tcConfigB.projectReferences |> List.tryPick (fun pr -> if pr.FileName = path then Some pr else None) tcConfigB.referencedDLLs <- tcConfigB.referencedDLLs ++ AssemblyReference(m, path, projectReference) member tcConfigB.RemoveReferencedAssemblyByPath (m, path) = tcConfigB.referencedDLLs <- tcConfigB.referencedDLLs |> List.filter (fun ar-> ar.Range <> m || ar.Text <> path) - static member SplitCommandLineResourceInfo (ri:string) = + static member SplitCommandLineResourceInfo (ri: string) = let p = ri.IndexOf ',' if p <> -1 then let file = String.sub ri 0 p @@ -2699,7 +2695,7 @@ type TcConfigBuilder = #if !FABLE_COMPILER let OpenILBinary(filename, reduceMemoryUsage, ilGlobals, pdbDirPath, shadowCopyReferences, tryGetMetadataSnapshot) = - let opts : ILReaderOptions = + let opts: ILReaderOptions = { ilGlobals = ilGlobals metadataOnly = MetadataOnlyFlag.Yes reduceMemoryUsage = reduceMemoryUsage @@ -2707,7 +2703,7 @@ let OpenILBinary(filename, reduceMemoryUsage, ilGlobals, pdbDirPath, shadowCopyR tryGetMetadataSnapshot = tryGetMetadataSnapshot } let location = -#if !FX_RESHAPED_REFLECTION // shadow copy not supported +#if FX_NO_APP_DOMAINS // In order to use memory mapped files on the shadow copied version of the Assembly, we `preload the assembly // We swallow all exceptions so that we do not change the exception contract of this API if shadowCopyReferences then @@ -2727,11 +2723,11 @@ let OpenILBinary(filename, reduceMemoryUsage, ilGlobals, pdbDirPath, shadowCopyR [] #endif type AssemblyResolution = - { originalReference : AssemblyReference - resolvedPath : string - prepareToolTip : unit -> string - sysdir : bool - ilAssemblyRef : ILAssemblyRef option ref + { originalReference: AssemblyReference + resolvedPath: string + prepareToolTip: unit -> string + sysdir: bool + ilAssemblyRef: ILAssemblyRef option ref } override this.ToString() = sprintf "%s%s" (if this.sysdir then "[sys]" else "") this.resolvedPath @@ -2739,11 +2735,11 @@ type AssemblyResolution = member this.ProjectReference = this.originalReference.ProjectReference - /// Compute the ILAssemblyRef for a resolved assembly. This is done by reading the binary if necessary. The result + /// Compute the ILAssemblyRef for a resolved assembly. This is done by reading the binary if necessary. The result /// is cached. /// /// For project references in the language service, this would result in a build of the project. - /// This is because ``EvaluateRawContents(ctok)`` is used. However this path is only currently used + /// This is because ``EvaluateRawContents(ctok)`` is used. However this path is only currently used /// in fsi.fs, which does not use project references. // member this.GetILAssemblyRef(ctok, reduceMemoryUsage, tryGetMetadataSnapshot) = @@ -2761,14 +2757,14 @@ type AssemblyResolution = | Some contents -> match contents.ILScopeRef with | ILScopeRef.Assembly aref -> return Some aref - | _ -> return None + | _ -> return None | None -> return None } let assemblyRef = match assemblyRefOpt with | Some aref -> aref | None -> - let readerSettings : ILReaderOptions = + let readerSettings: ILReaderOptions = { pdbDirPath=None ilGlobals = EcmaMscorlibILGlobals reduceMemoryUsage = reduceMemoryUsage @@ -2797,7 +2793,7 @@ let MakeScopeRefForILModule (ilModule: ILModuleDef) = | Some m -> ILScopeRef.Assembly (mkRefToILAssembly m) | None -> ILScopeRef.Module (mkRefToILModule ilModule) -let GetCustomAttributesOfILModule (ilModule:ILModuleDef) = +let GetCustomAttributesOfILModule (ilModule: ILModuleDef) = (match ilModule.Manifest with Some m -> m.CustomAttrs | None -> ilModule.CustomAttrs).AsList let GetAutoOpenAttributes ilg ilModule = @@ -2812,7 +2808,7 @@ let GetInternalsVisibleToAttributes ilg ilModule = [] /// This type is immutable and must be kept as such. Do not extract or mutate the underlying data except by cloning it. -type TcConfig private (data : TcConfigBuilder, validate:bool) = +type TcConfig private (data: TcConfigBuilder, validate: bool) = #if FABLE_COMPILER let _ = validate @@ -2829,7 +2825,7 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = let computeKnownDllReference(libraryName) = let defaultCoreLibraryReference = AssemblyReference(range0, libraryName+".dll", None) - let nameOfDll(r:AssemblyReference) = + let nameOfDll(r: AssemblyReference) = let filename = ComputeMakePathAbsolute data.implicitIncludeDir r.Text if FileSystem.SafeExists(filename) then r, Some(filename) @@ -2871,7 +2867,7 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = // targetFrameworkVersion shouldn't matter since resolution has already happened. // In those cases where it does matter (e.g. --noframework is not being used or we are processing further // resolutions for a script) then it is correct to just use HighestInstalledNetFrameworkVersion(). - let clrRootValue, targetFrameworkVersionValue = + let clrRootValue, targetFrameworkVersionValue = match primaryAssemblyExplicitFilenameOpt with | Some primaryAssemblyFilename -> let filename = ComputeMakePathAbsolute data.implicitIncludeDir primaryAssemblyFilename @@ -2883,7 +2879,7 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = error(Error(FSComp.SR.buildErrorOpeningBinaryFile(filename, e.Message), rangeStartup)) | None -> #if !ENABLE_MONO_SUPPORT - // TODO: we have to get msbuild out of this + // TODO: we have to get msbuild out of this if data.useSimpleResolution then None, "" else @@ -2896,7 +2892,7 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = // FUTURE: remove this, we only read the binary for the exception it raises let fsharpBinariesDirValue = // NOTE: It's not clear why this behaviour has been changed for the NETSTANDARD compilations of the F# compiler -#if NETSTANDARD1_6 || NETSTANDARD2_0 +#if NETSTANDARD ignore ilGlobals data.defaultFSharpBinariesDir #else @@ -2946,87 +2942,87 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = member x.subsystemVersion = data.subsystemVersion member x.useHighEntropyVA = data.useHighEntropyVA member x.inputCodePage = data.inputCodePage - member x.embedResources = data.embedResources + member x.embedResources = data.embedResources member x.errorSeverityOptions = data.errorSeverityOptions member x.mlCompatibility = data.mlCompatibility member x.checkOverflow = data.checkOverflow member x.showReferenceResolutions = data.showReferenceResolutions - member x.outputFile = data.outputFile - member x.platform = data.platform + member x.outputFile = data.outputFile + member x.platform = data.platform member x.prefer32Bit = data.prefer32Bit - member x.useSimpleResolution = data.useSimpleResolution - member x.target = data.target - member x.debuginfo = data.debuginfo + member x.useSimpleResolution = data.useSimpleResolution + member x.target = data.target + member x.debuginfo = data.debuginfo member x.testFlagEmitFeeFeeAs100001 = data.testFlagEmitFeeFeeAs100001 member x.dumpDebugInfo = data.dumpDebugInfo - member x.debugSymbolFile = data.debugSymbolFile - member x.typeCheckOnly = data.typeCheckOnly - member x.parseOnly = data.parseOnly + member x.debugSymbolFile = data.debugSymbolFile + member x.typeCheckOnly = data.typeCheckOnly + member x.parseOnly = data.parseOnly member x.importAllReferencesOnly = data.importAllReferencesOnly member x.simulateException = data.simulateException - member x.printAst = data.printAst + member x.printAst = data.printAst member x.targetFrameworkVersion = targetFrameworkVersionValue - member x.tokenizeOnly = data.tokenizeOnly - member x.testInteractionParser = data.testInteractionParser - member x.reportNumDecls = data.reportNumDecls - member x.printSignature = data.printSignature - member x.printSignatureFile = data.printSignatureFile - member x.xmlDocOutputFile = data.xmlDocOutputFile - member x.stats = data.stats - member x.generateFilterBlocks = data.generateFilterBlocks - member x.signer = data.signer + member x.tokenizeOnly = data.tokenizeOnly + member x.testInteractionParser = data.testInteractionParser + member x.reportNumDecls = data.reportNumDecls + member x.printSignature = data.printSignature + member x.printSignatureFile = data.printSignatureFile + member x.xmlDocOutputFile = data.xmlDocOutputFile + member x.stats = data.stats + member x.generateFilterBlocks = data.generateFilterBlocks + member x.signer = data.signer member x.container = data.container - member x.delaysign = data.delaysign - member x.publicsign = data.publicsign - member x.version = data.version + member x.delaysign = data.delaysign + member x.publicsign = data.publicsign + member x.version = data.version member x.metadataVersion = data.metadataVersion - member x.standalone = data.standalone - member x.extraStaticLinkRoots = data.extraStaticLinkRoots - member x.noSignatureData = data.noSignatureData - member x.onlyEssentialOptimizationData = data.onlyEssentialOptimizationData - member x.useOptimizationDataFile = data.useOptimizationDataFile - member x.jitTracking = data.jitTracking - member x.portablePDB = data.portablePDB - member x.embeddedPDB = data.embeddedPDB - member x.embedAllSource = data.embedAllSource - member x.embedSourceList = data.embedSourceList - member x.sourceLink = data.sourceLink - member x.ignoreSymbolStoreSequencePoints = data.ignoreSymbolStoreSequencePoints - member x.internConstantStrings = data.internConstantStrings - member x.extraOptimizationIterations = data.extraOptimizationIterations - member x.win32res = data.win32res + member x.standalone = data.standalone + member x.extraStaticLinkRoots = data.extraStaticLinkRoots + member x.noSignatureData = data.noSignatureData + member x.onlyEssentialOptimizationData = data.onlyEssentialOptimizationData + member x.useOptimizationDataFile = data.useOptimizationDataFile + member x.jitTracking = data.jitTracking + member x.portablePDB = data.portablePDB + member x.embeddedPDB = data.embeddedPDB + member x.embedAllSource = data.embedAllSource + member x.embedSourceList = data.embedSourceList + member x.sourceLink = data.sourceLink + member x.ignoreSymbolStoreSequencePoints = data.ignoreSymbolStoreSequencePoints + member x.internConstantStrings = data.internConstantStrings + member x.extraOptimizationIterations = data.extraOptimizationIterations + member x.win32res = data.win32res member x.win32manifest = data.win32manifest member x.includewin32manifest = data.includewin32manifest - member x.linkResources = data.linkResources - member x.showFullPaths = data.showFullPaths - member x.errorStyle = data.errorStyle - member x.utf8output = data.utf8output + member x.linkResources = data.linkResources + member x.showFullPaths = data.showFullPaths + member x.errorStyle = data.errorStyle + member x.utf8output = data.utf8output member x.flatErrors = data.flatErrors - member x.maxErrors = data.maxErrors - member x.baseAddress = data.baseAddress + member x.maxErrors = data.maxErrors + member x.baseAddress = data.baseAddress #if DEBUG - member x.showOptimizationData = data.showOptimizationData + member x.showOptimizationData = data.showOptimizationData #endif - member x.showTerms = data.showTerms - member x.writeTermsToFiles = data.writeTermsToFiles - member x.doDetuple = data.doDetuple - member x.doTLR = data.doTLR - member x.doFinalSimplify = data.doFinalSimplify - member x.optSettings = data.optSettings - member x.emitTailcalls = data.emitTailcalls - member x.deterministic = data.deterministic - member x.preferredUiLang = data.preferredUiLang - member x.lcid = data.lcid - member x.optsOn = data.optsOn - member x.productNameForBannerText = data.productNameForBannerText - member x.showBanner = data.showBanner - member x.showTimes = data.showTimes + member x.showTerms = data.showTerms + member x.writeTermsToFiles = data.writeTermsToFiles + member x.doDetuple = data.doDetuple + member x.doTLR = data.doTLR + member x.doFinalSimplify = data.doFinalSimplify + member x.optSettings = data.optSettings + member x.emitTailcalls = data.emitTailcalls + member x.deterministic = data.deterministic + member x.preferredUiLang = data.preferredUiLang + member x.lcid = data.lcid + member x.optsOn = data.optsOn + member x.productNameForBannerText = data.productNameForBannerText + member x.showBanner = data.showBanner + member x.showTimes = data.showTimes member x.showLoadedAssemblies = data.showLoadedAssemblies member x.continueAfterParseFailure = data.continueAfterParseFailure #if !NO_EXTENSIONTYPING - member x.showExtensionTypeMessages = data.showExtensionTypeMessages + member x.showExtensionTypeMessages = data.showExtensionTypeMessages #endif - member x.pause = data.pause + member x.pause = data.pause member x.alwaysCallVirt = data.alwaysCallVirt member x.noDebugData = data.noDebugData member x.isInteractive = data.isInteractive @@ -3048,7 +3044,7 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = #if !FABLE_COMPILER - member tcConfig.ComputeCanContainEntryPoint(sourceFiles:string list) = + member tcConfig.ComputeCanContainEntryPoint(sourceFiles: string list) = let n = sourceFiles.Length in (sourceFiles |> List.mapi (fun i _ -> (i = n-1)), tcConfig.target.IsExe) @@ -3064,7 +3060,7 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = | None -> // "there is no really good notion of runtime directory on .NETCore" -#if NETSTANDARD1_6 || NETSTANDARD2_0 +#if NETSTANDARD let runtimeRoot = Path.GetDirectoryName(typeof.Assembly.Location) #else let runtimeRoot = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory() @@ -3138,7 +3134,7 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = |> List.distinct /// A closed set of assemblies where, for any subset S: - /// - the TcImports object built for S (and thus the F# Compiler CCUs for the assemblies in S) + /// - the TcImports object built for S (and thus the F# Compiler CCUs for the assemblies in S) /// is a resource that can be shared between any two IncrementalBuild objects that reference /// precisely S /// @@ -3146,7 +3142,7 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = /// /// Returning true may mean that the file is locked and/or placed into the /// 'framework' reference set that is potentially shared across multiple compilations. - member tcConfig.IsSystemAssembly (filename:string) = + member tcConfig.IsSystemAssembly (filename: string) = try FileSystem.SafeExists filename && ((tcConfig.GetTargetFrameworkDirectories() |> List.exists (fun clrRoot -> clrRoot = Path.GetDirectoryName filename)) || @@ -3166,7 +3162,7 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = let result = ComputeMakePathAbsolute tcConfig.implicitIncludeDir path result - member tcConfig.TryResolveLibWithDirectories (r:AssemblyReference) = + member tcConfig.TryResolveLibWithDirectories (r: AssemblyReference) = let m, nm = r.Range, r.Text use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parameter // Only want to resolve certain extensions (otherwise, 'System.Xml' is ambiguous). @@ -3194,7 +3190,7 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = let searchPaths = // if this is a #r reference (not from dummy range), make sure the directory of the declaring // file is included in the search path. This should ideally already be one of the search paths, but - // during some global checks it won't be. We append to the end of the search list so that this is the last + // during some global checks it won't be. We append to the end of the search list so that this is the last // place that is checked. if m <> range0 && m <> rangeStartup && m <> rangeCmdArgs && FileSystem.IsPathRootedShim m.FileName then tcConfig.GetSearchPathsForLibraryFiles() @ [Path.GetDirectoryName(m.FileName)] @@ -3210,14 +3206,14 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = resolvedPath = resolved prepareToolTip = (fun () -> let fusionName = System.Reflection.AssemblyName.GetAssemblyName(resolved).ToString() - let line(append:string) = append.Trim([|' '|])+"\n" + let line(append: string) = append.Trim([|' '|])+"\n" line(resolved) + line(fusionName)) sysdir = sysdir ilAssemblyRef = ref None } | None -> None else None - member tcConfig.ResolveLibWithDirectories (ccuLoadFaulureAction, r:AssemblyReference) = + member tcConfig.ResolveLibWithDirectories (ccuLoadFaulureAction, r: AssemblyReference) = let m, nm = r.Range, r.Text use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parameter // test for both libraries and executables @@ -3248,7 +3244,7 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = // it must return warnings and errors as data // // NOTE!! if mode=ReportErrors then this method must not raise exceptions. It must just report the errors and recover - static member TryResolveLibsUsingMSBuildRules (tcConfig:TcConfig, originalReferences:AssemblyReference list, errorAndWarningRange:range, mode:ResolveAssemblyReferenceMode) : AssemblyResolution list * UnresolvedAssemblyReference list = + static member TryResolveLibsUsingMSBuildRules (tcConfig: TcConfig, originalReferences: AssemblyReference list, errorAndWarningRange: range, mode: ResolveAssemblyReferenceMode) : AssemblyResolution list * UnresolvedAssemblyReference list = use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parameter if tcConfig.useSimpleResolution then failwith "MSBuild resolution is not supported." @@ -3267,8 +3263,8 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = assemblyName, highestPosition, assemblyGroup) |> Array.ofSeq - let logMessage showMessages = - if showMessages && tcConfig.showReferenceResolutions then (fun (message:string)->dprintf "%s\n" message) + let logMessage showMessages = + if showMessages && tcConfig.showReferenceResolutions then (fun (message: string)->dprintf "%s\n" message) else ignore let logDiagnostic showMessages = @@ -3357,7 +3353,7 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = |> List.concat // O(N^2) here over a small set of referenced assemblies. - let IsResolved(originalName:string) = + let IsResolved(originalName: string) = if resultingResolutions |> List.exists(fun resolution -> resolution.originalReference.Text = originalName) then true else // MSBuild resolution may have unified the result of two duplicate references. Try to re-resolve now. @@ -3422,7 +3418,7 @@ let GetScopedPragmasForInput input = // However this is indicative of a more systematic problem where source-line // sensitive operations (lexfilter and warning filtering) do not always // interact well with #line directives. -type ErrorLoggerFilteringByScopedPragmas (checkFile, scopedPragmas, errorLogger:ErrorLogger) = +type ErrorLoggerFilteringByScopedPragmas (checkFile, scopedPragmas, errorLogger: ErrorLogger) = inherit ErrorLogger("ErrorLoggerFilteringByScopedPragmas") override x.DiagnosticSink (phasedError, isError) = @@ -3478,7 +3474,7 @@ let QualFileNameOfSpecs filename specs = let QualFileNameOfImpls filename specs = match specs with | [SynModuleOrNamespace(modname, _, kind, _, _, _, _, m)] when kind.IsModule -> QualFileNameOfModuleName m filename modname - | [SynModuleOrNamespace(_, _, kind, _, _, _, _, m)] when not kind.IsModule -> QualFileNameOfFilename m filename + | [SynModuleOrNamespace(_, _, kind, _, _, _, _, m)] when not kind.IsModule -> QualFileNameOfFilename m filename | _ -> QualFileNameOfFilename (mkRange filename pos0 pos0) filename let PrepandPathToQualFileName x (QualifiedNameOfFile(q)) = ComputeQualifiedNameOfFileFromUniquePath (q.idRange, pathOfLid x@[q.idText]) @@ -3500,7 +3496,7 @@ let ComputeAnonModuleName check defaultNamespace filename (m: range) = | None -> modname | Some ns -> textOfPath [ns;modname] - let anonymousModuleNameRange = + let anonymousModuleNameRange = let filename = m.FileName mkRange filename pos0 pos0 pathToSynLid anonymousModuleNameRange (splitNamespace combined) @@ -3589,7 +3585,7 @@ let PostParseModuleImpls (defaultNamespace, filename, isLastCompiland, ParsedImp let PostParseModuleSpecs (defaultNamespace, filename, isLastCompiland, ParsedSigFile(hashDirectives, specs)) = match specs |> List.rev |> List.tryPick (function ParsedSigFileFragment.NamedModule(SynModuleOrNamespaceSig(lid, _, _, _, _, _, _, _)) -> Some(lid) | _ -> None) with - | Some lid when specs.Length > 1 -> + | Some lid when specs.Length > 1 -> errorR(Error(FSComp.SR.buildMultipleToplevelModules(), rangeOfLid lid)) | _ -> () @@ -3610,7 +3606,7 @@ let PostParseModuleSpecs (defaultNamespace, filename, isLastCompiland, ParsedSig type ModuleNamesDict = Map> /// Checks if a module name is already given and deduplicates the name if needed. -let DeduplicateModuleName (moduleNamesDict:ModuleNamesDict) fileName (qualNameOfFile: QualifiedNameOfFile) = +let DeduplicateModuleName (moduleNamesDict: ModuleNamesDict) fileName (qualNameOfFile: QualifiedNameOfFile) = let path = Path.GetDirectoryName fileName let path = if FileSystem.IsPathRootedShim path then try FileSystem.GetFullPathShim path with _ -> path else path match moduleNamesDict.TryGetValue qualNameOfFile.Text with @@ -3639,12 +3635,12 @@ let DeduplicateParsedInputModuleName (moduleNamesDict: ModuleNamesDict) input = let inputT = ParsedInput.SigFile (ParsedSigFileInput.ParsedSigFileInput(fileName, qualNameOfFileT, scopedPragmas, hashDirectives, modules)) inputT, moduleNamesDictT -let ParseInput (lexer, errorLogger:ErrorLogger, lexbuf:UnicodeLexing.Lexbuf, defaultNamespace, filename, isLastCompiland) = +let ParseInput (lexer, errorLogger: ErrorLogger, lexbuf: UnicodeLexing.Lexbuf, defaultNamespace, filename, isLastCompiland) = // The assert below is almost ok, but it fires in two cases: // - fsi.exe sometimes passes "stdin" as a dummy filename // - if you have a #line directive, e.g. // # 1000 "Line01.fs" - // then it also asserts. But these are edge cases that can be fixed later, e.g. in bug 4651. + // then it also asserts. But these are edge cases that can be fixed later, e.g. in bug 4651. //System.Diagnostics.Debug.Assert(System.IO.Path.IsPathRooted(filename), sprintf "should be absolute: '%s'" filename) let lower = String.lowercase filename // Delay sending errors and warnings until after the file is parsed. This gives us a chance to scrape the @@ -3652,16 +3648,16 @@ let ParseInput (lexer, errorLogger:ErrorLogger, lexbuf:UnicodeLexing.Lexbuf, def let delayLogger = CapturingErrorLogger("Parsing") use unwindEL = PushErrorLoggerPhaseUntilUnwind (fun _ -> delayLogger) use unwindBP = PushThreadBuildPhaseUntilUnwind BuildPhase.Parse - let mutable scopedPragmas = [] + let mutable scopedPragmas = [] try let input = - if mlCompatSuffixes |> List.exists (Filename.checkSuffix lower) then + if mlCompatSuffixes |> List.exists (Filename.checkSuffix lower) then mlCompatWarning (FSComp.SR.buildCompilingExtensionIsForML()) rangeStartup - if FSharpImplFileSuffixes |> List.exists (Filename.checkSuffix lower) then + if FSharpImplFileSuffixes |> List.exists (Filename.checkSuffix lower) then let impl = Parser.implementationFile lexer lexbuf PostParseModuleImpls (defaultNamespace, filename, isLastCompiland, impl) - elif FSharpSigFileSuffixes |> List.exists (Filename.checkSuffix lower) then + elif FSharpSigFileSuffixes |> List.exists (Filename.checkSuffix lower) then let intfs = Parser.signatureFile lexer lexbuf PostParseModuleSpecs (defaultNamespace, filename, isLastCompiland, intfs) else @@ -3679,7 +3675,7 @@ let ParseInput (lexer, errorLogger:ErrorLogger, lexbuf:UnicodeLexing.Lexbuf, def // parsing - ParseOneInputFile // Filename is (ml/mli/fs/fsi source). Parse it to AST. //---------------------------------------------------------------------------- -let ParseOneInputLexbuf (tcConfig:TcConfig, lexResourceManager, conditionalCompilationDefines, lexbuf, filename, isLastCompiland, errorLogger) = +let ParseOneInputLexbuf (tcConfig: TcConfig, lexResourceManager, conditionalCompilationDefines, lexbuf, filename, isLastCompiland, errorLogger) = use unwindbuildphase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parse try let skip = true in (* don't report whitespace from lexer *) @@ -3697,7 +3693,7 @@ let ParseOneInputLexbuf (tcConfig:TcConfig, lexResourceManager, conditionalCompi let t = tokenizer.Lexer lexbuf printf "tokenize - got %s @ %a\n" (Parser.token_to_string t) outputRange lexbuf.LexemeRange (match t with Parser.EOF _ -> exit 0 | _ -> ()) - if lexbuf.IsPastEndOfStream then printf "!!! at end of stream\n" + if lexbuf.IsPastEndOfStream then printf "!!! at end of stream\n" if tcConfig.testInteractionParser then while true do @@ -3731,7 +3727,7 @@ let ParseOneInputLexbuf (tcConfig:TcConfig, lexResourceManager, conditionalCompi let ParseOneInputFile (tcConfig: TcConfig, lexResourceManager, conditionalCompilationDefines, filename, isLastCompiland, errorLogger, retryLocked) = try let lower = String.lowercase filename - if List.exists (Filename.checkSuffix lower) (FSharpSigFileSuffixes@FSharpImplFileSuffixes) then + if List.exists (Filename.checkSuffix lower) (FSharpSigFileSuffixes@FSharpImplFileSuffixes) then if not(FileSystem.SafeExists(filename)) then error(Error(FSComp.SR.buildCouldNotFindSourceFile(filename), rangeStartup)) // bug 3155: if the file name is indirect, use a full path @@ -3742,10 +3738,10 @@ let ParseOneInputFile (tcConfig: TcConfig, lexResourceManager, conditionalCompil [] -type TcAssemblyResolutions(tcConfig: TcConfig, results: AssemblyResolution list, unresolved : UnresolvedAssemblyReference list) = +type TcAssemblyResolutions(tcConfig: TcConfig, results: AssemblyResolution list, unresolved: UnresolvedAssemblyReference list) = let originalReferenceToResolution = results |> List.map (fun r -> r.originalReference.Text, r) |> Map.ofList - let resolvedPathToResolution = results |> List.map (fun r -> r.resolvedPath, r) |> Map.ofList + let resolvedPathToResolution = results |> List.map (fun r -> r.resolvedPath, r) |> Map.ofList /// Add some resolutions to the map of resolution results. member tcResolutions.AddResolutionResults(newResults) = TcAssemblyResolutions(tcConfig, results @ newResults, unresolved) @@ -3756,7 +3752,7 @@ type TcAssemblyResolutions(tcConfig: TcConfig, results: AssemblyResolution list, /// Get information about referenced DLLs member tcResolutions.GetAssemblyResolutions() = results member tcResolutions.GetUnresolvedReferences() = unresolved - member tcResolutions.TryFindByOriginalReference(assemblyReference:AssemblyReference) = originalReferenceToResolution.TryFind assemblyReference.Text + member tcResolutions.TryFindByOriginalReference(assemblyReference: AssemblyReference) = originalReferenceToResolution.TryFind assemblyReference.Text /// This doesn't need to be cancellable, it is only used by F# Interactive member tcResolution.TryFindByExactILAssemblyRef (ctok, assemblyRef) = @@ -3773,7 +3769,7 @@ type TcAssemblyResolutions(tcConfig: TcConfig, results: AssemblyResolution list, member tcResolutions.TryFindByResolvedPath nm = resolvedPathToResolution.TryFind nm member tcResolutions.TryFindByOriginalReferenceText nm = originalReferenceToResolution.TryFind nm - static member ResolveAssemblyReferences (ctok, tcConfig:TcConfig, assemblyList:AssemblyReference list, knownUnresolved:UnresolvedAssemblyReference list) : TcAssemblyResolutions = + static member ResolveAssemblyReferences (ctok, tcConfig: TcConfig, assemblyList: AssemblyReference list, knownUnresolved: UnresolvedAssemblyReference list) : TcAssemblyResolutions = let resolved, unresolved = if tcConfig.useSimpleResolution then let resolutions = @@ -3793,7 +3789,7 @@ type TcAssemblyResolutions(tcConfig: TcConfig, results: AssemblyResolution list, TcAssemblyResolutions(tcConfig, resolved, unresolved @ knownUnresolved) - static member GetAllDllReferences (tcConfig:TcConfig) = + static member GetAllDllReferences (tcConfig: TcConfig) = [ let primaryReference = tcConfig.PrimaryAssemblyDllReference() yield primaryReference @@ -3813,7 +3809,7 @@ type TcAssemblyResolutions(tcConfig: TcConfig, results: AssemblyResolution list, yield! tcConfig.referencedDLLs ] - static member SplitNonFoundationalResolutions (ctok, tcConfig:TcConfig) = + static member SplitNonFoundationalResolutions (ctok, tcConfig: TcConfig) = let assemblyList = TcAssemblyResolutions.GetAllDllReferences tcConfig let resolutions = TcAssemblyResolutions.ResolveAssemblyReferences (ctok, tcConfig, assemblyList, tcConfig.knownUnresolvedReferences) let frameworkDLLs, nonFrameworkReferences = resolutions.GetAssemblyResolutions() |> List.partition (fun r -> r.sysdir) @@ -3845,7 +3841,7 @@ type TcAssemblyResolutions(tcConfig: TcConfig, results: AssemblyResolution list, #endif frameworkDLLs, nonFrameworkReferences, unresolved - static member BuildFromPriorResolutions (ctok, tcConfig:TcConfig, resolutions, knownUnresolved) = + static member BuildFromPriorResolutions (ctok, tcConfig: TcConfig, resolutions, knownUnresolved) = let references = resolutions |> List.map (fun r -> r.originalReference) TcAssemblyResolutions.ResolveAssemblyReferences (ctok, tcConfig, references, knownUnresolved) @@ -3855,15 +3851,15 @@ type TcAssemblyResolutions(tcConfig: TcConfig, results: AssemblyResolution list, // Typecheck and optimization environments on disk //-------------------------------------------------------------------------- -let IsSignatureDataResource (r: ILResource) = +let IsSignatureDataResource (r: ILResource) = r.Name.StartsWithOrdinal(FSharpSignatureDataResourceName) || r.Name.StartsWithOrdinal(FSharpSignatureDataResourceName2) -let IsOptimizationDataResource (r: ILResource) = +let IsOptimizationDataResource (r: ILResource) = r.Name.StartsWithOrdinal(FSharpOptimizationDataResourceName)|| r.Name.StartsWithOrdinal(FSharpOptimizationDataResourceName2) -let GetSignatureDataResourceName (r: ILResource) = +let GetSignatureDataResourceName (r: ILResource) = if r.Name.StartsWithOrdinal(FSharpSignatureDataResourceName) then String.dropPrefix r.Name FSharpSignatureDataResourceName elif r.Name.StartsWithOrdinal(FSharpSignatureDataResourceName2) then @@ -3954,7 +3950,7 @@ type RawFSharpAssemblyDataBackedByFileOnDisk (ilModule: ILModuleDef, ilAssemblyR let optDataReaders = if optDataReaders.IsEmpty && List.contains ilShortAssemName externalSigAndOptData then let optDataFile = Path.ChangeExtension(filename, "optdata") - if not (FileSystem.SafeExists optDataFile) then + if not (FileSystem.SafeExists optDataFile) then error(Error(FSComp.SR.buildExpectedFileAlongSideFSharpCore(optDataFile, FileSystem.GetFullPathShim optDataFile), m)) [ (ilShortAssemName, (fun () -> FileSystem.ReadAllBytesShim optDataFile))] else @@ -4009,10 +4005,10 @@ type TcConfigProvider = /// Represents a table of imported assemblies with their resolutions. [] -type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResolutions, importsBase:TcImports option, ilGlobalsOpt) = +type TcImports(tcConfigP: TcConfigProvider, initialResolutions: TcAssemblyResolutions, importsBase: TcImports option, ilGlobalsOpt) = let mutable resolutions = initialResolutions - let mutable importsBase : TcImports option = importsBase + let mutable importsBase: TcImports option = importsBase let mutable dllInfos: ImportedBinary list = [] let mutable dllTable: NameMap = NameMap.empty let mutable ccuInfos: ImportedAssembly list = [] @@ -4028,7 +4024,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti let CheckDisposed() = if disposed then assert false - static let ccuHasType (ccu : CcuThunk) (nsname : string list) (tname : string) = + static let ccuHasType (ccu: CcuThunk) (nsname: string list) (tname: string) = match (Some ccu.Contents, nsname) ||> List.fold (fun entityOpt n -> match entityOpt with None -> None | Some entity -> entity.ModuleOrNamespaceType.AllEntitiesByCompiledAndLogicalMangledNames.TryFind n) with | Some ns -> match Map.tryFind tname ns.ModuleOrNamespaceType.TypesByMangledName with @@ -4036,7 +4032,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti | None -> false | None -> false - member private tcImports.Base = + member private tcImports.Base = CheckDisposed() importsBase @@ -4074,7 +4070,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti member tcImports.TryFindDllInfo (ctok: CompilationThreadToken, m, assemblyName, lookupOnly) = CheckDisposed() - let rec look (t:TcImports) = + let rec look (t: TcImports) = match NameMap.tryFind assemblyName t.DllTable with | Some res -> Some(res) | None -> @@ -4096,7 +4092,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti member tcImports.GetImportedAssemblies() = CheckDisposed() match importsBase with - | Some(importsBase)-> List.append (importsBase.GetImportedAssemblies()) ccuInfos + | Some(importsBase)-> List.append (importsBase.GetImportedAssemblies()) ccuInfos | None -> ccuInfos member tcImports.GetCcusExcludingBase() = @@ -4110,7 +4106,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti // This is the main "assembly reference --> assembly" resolution routine. member tcImports.FindCcuInfo (ctok, m, assemblyName, lookupOnly) = CheckDisposed() - let rec look (t:TcImports) = + let rec look (t: TcImports) = match NameMap.tryFind assemblyName t.CcuTable with | Some res -> Some(res) | None -> @@ -4133,7 +4129,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti | ResolvedImportedAssembly(importedAssembly) -> ResolvedCcu(importedAssembly.FSharpViewOfMetadata) | UnresolvedImportedAssembly(assemblyName) -> UnresolvedCcu(assemblyName) - member tcImports.FindCcuFromAssemblyRef(ctok, m, assemblyRef:ILAssemblyRef) = + member tcImports.FindCcuFromAssemblyRef(ctok, m, assemblyRef: ILAssemblyRef) = CheckDisposed() match tcImports.FindCcuInfo(ctok, m, assemblyRef.Name, lookupOnly=false) with | ResolvedImportedAssembly(importedAssembly) -> ResolvedCcu(importedAssembly.FSharpViewOfMetadata) @@ -4162,7 +4158,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti let bytes = assembly.PApplyWithProvider((fun (assembly, provider) -> assembly.GetManifestModuleContents(provider)), m).PUntaint(id, m) let tcConfig = tcConfigP.Get(ctok) let ilModule, ilAssemblyRefs = - let opts : ILReaderOptions = + let opts: ILReaderOptions = { ilGlobals = g.ilg reduceMemoryUsage = tcConfig.reduceMemoryUsage pdbDirPath = None @@ -4181,7 +4177,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti ILScopeRef = ilScopeRef ILAssemblyRefs = ilAssemblyRefs } tcImports.RegisterDll(dllinfo) - let ccuData : CcuData = + let ccuData: CcuData = { IsFSharp=false UsesFSharp20PlusQuotations=false InvalidateEvent=(new Event<_>()).Publish @@ -4289,7 +4285,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti CheckDisposed() tcImports.GetDllInfos() |> List.exists (fun dll -> match dll.ILScopeRef with - | ILScopeRef.Assembly a -> a.Name = nm + | ILScopeRef.Assembly a -> a.Name = nm | _ -> false) member tcImports.GetImportMap() = @@ -4333,11 +4329,11 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti #if !NO_EXTENSIONTYPING member private tcImports.InjectProvidedNamespaceOrTypeIntoEntity (typeProviderEnvironment, - tcConfig:TcConfig, - m, entity:Entity, + tcConfig: TcConfig, + m, entity: Entity, injectedNamspace, remainingNamespace, provider, - st:Tainted option) = + st: Tainted option) = match remainingNamespace with | next::rest -> // Inject the namespace entity @@ -4379,11 +4375,11 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti | _ -> failwith "Unexpected representation in namespace entity referred to by a type provider" member tcImports.ImportTypeProviderExtensions - (ctok, tcConfig:TcConfig, + (ctok, tcConfig: TcConfig, fileNameOfRuntimeAssembly, ilScopeRefOfRuntimeAssembly, - runtimeAssemblyAttributes:ILAttribute list, - entityToInjectInto, invalidateCcu:Event<_>, m) = + runtimeAssemblyAttributes: ILAttribute list, + entityToInjectInto, invalidateCcu: Event<_>, m) = let startingErrorCount = CompileThreadStatic.ErrorLogger.ErrorCount @@ -4409,14 +4405,14 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti name.Version let typeProviderEnvironment = - { resolutionFolder = tcConfig.implicitIncludeDir - outputFile = tcConfig.outputFile + { resolutionFolder = tcConfig.implicitIncludeDir + outputFile = tcConfig.outputFile showResolutionMessages = tcConfig.showExtensionTypeMessages - referencedAssemblies = Array.distinct [| for r in tcImports.AllAssemblyResolutions() -> r.resolvedPath |] - temporaryFolder = FileSystem.GetTempPathShim() } + referencedAssemblies = Array.distinct [| for r in tcImports.AllAssemblyResolutions() -> r.resolvedPath |] + temporaryFolder = FileSystem.GetTempPathShim() } // The type provider should not hold strong references to disposed - // TcImport objects. So the callbacks provided in the type provider config + // TcImport objects. So the callbacks provided in the type provider config // dispatch via a thunk which gets set to a non-resource-capturing // failing function when the object is disposed. let systemRuntimeContainsType = @@ -4493,7 +4489,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti #endif /// Query information about types available in target system runtime library - member tcImports.SystemRuntimeContainsType (typeName : string) : bool = + member tcImports.SystemRuntimeContainsType (typeName: string) : bool = let ns, typeName = IL.splitILTypeName typeName let tcGlobals = tcImports.GetTcGlobals() tcGlobals.TryFindSysTyconRef ns typeName |> Option.isSome @@ -4505,7 +4501,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti // Compact Framework binaries must use this. However it is not // clear when else it is required, e.g. for Mono. - member tcImports.PrepareToImportReferencedILAssembly (ctok, m, filename, dllinfo:ImportedBinary) = + member tcImports.PrepareToImportReferencedILAssembly (ctok, m, filename, dllinfo: ImportedBinary) = CheckDisposed() let tcConfig = tcConfigP.Get(ctok) assert dllinfo.RawMetadata.TryGetILModuleDef().IsSome @@ -4542,7 +4538,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti [ResolvedImportedAssembly(ccuinfo)] phase2 - member tcImports.PrepareToImportReferencedFSharpAssembly (ctok, m, filename, dllinfo:ImportedBinary) = + member tcImports.PrepareToImportReferencedFSharpAssembly (ctok, m, filename, dllinfo: ImportedBinary) = CheckDisposed() #if !NO_EXTENSIONTYPING let tcConfig = tcConfigP.Get(ctok) @@ -4561,7 +4557,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti let optDatas = Map.ofList optDataReaders - let minfo : PickledCcuInfo = data.RawData + let minfo: PickledCcuInfo = data.RawData let mspec = minfo.mspec #if !NO_EXTENSIONTYPING @@ -4569,12 +4565,12 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti #endif let codeDir = minfo.compileTimeWorkingDir - let ccuData : CcuData = + let ccuData: CcuData = { ILScopeRef=ilScopeRef Stamp = newStamp() FileName = Some filename QualifiedName= Some(ilScopeRef.QualifiedName) - SourceCodeDirectory = codeDir (* note: in some cases we fix up this information later *) + SourceCodeDirectory = codeDir (* note: in some cases we fix up this information later *) IsFSharp=true Contents = mspec #if !NO_EXTENSIONTYPING @@ -4591,7 +4587,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti let optdata = lazy - (match Map.tryFind ccuName optDatas with + (match Map.tryFind ccuName optDatas with | None -> if verbose then dprintf "*** no optimization data for CCU %s, was DLL compiled with --no-optimization-data??\n" ccuName None @@ -4635,8 +4631,8 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti phase2 - // NOTE: When used in the Language Service this can cause the transitive checking of projects. Hence it must be cancellable. - member tcImports.RegisterAndPrepareToImportReferencedDll (ctok, r:AssemblyResolution) : Cancellable<_ * (unit -> AvailableImportedAssembly list)> = + // NOTE: When used in the Language Service this can cause the transitive checking of projects. Hence it must be cancellable. + member tcImports.RegisterAndPrepareToImportReferencedDll (ctok, r: AssemblyResolution) : Cancellable<_ * (unit -> AvailableImportedAssembly list)> = cancellable { CheckDisposed() let m = r.originalReference.Range @@ -4676,7 +4672,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti tcImports.RegisterDll(dllinfo) let ilg = defaultArg ilGlobalsOpt EcmaMscorlibILGlobals let phase2 = - if assemblyData.HasAnyFSharpSignatureDataAttribute then + if assemblyData.HasAnyFSharpSignatureDataAttribute then if not (assemblyData.HasMatchingFSharpSignatureDataAttribute(ilg)) then errorR(Error(FSComp.SR.buildDifferentVersionMustRecompile(filename), m)) tcImports.PrepareToImportReferencedILAssembly (ctok, m, filename, dllinfo) @@ -4689,8 +4685,8 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti return dllinfo, phase2 } - // NOTE: When used in the Language Service this can cause the transitive checking of projects. Hence it must be cancellable. - member tcImports.RegisterAndImportReferencedAssemblies (ctok, nms:AssemblyResolution list) = + // NOTE: When used in the Language Service this can cause the transitive checking of projects. Hence it must be cancellable. + member tcImports.RegisterAndImportReferencedAssemblies (ctok, nms: AssemblyResolution list) = cancellable { CheckDisposed() @@ -4711,7 +4707,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti } /// Note that implicit loading is not used for compilations from MSBuild, which passes ``--noframework`` - /// Implicit loading is done in non-cancellation mode. Implicit loading is never used in the language service, so + /// Implicit loading is done in non-cancellation mode. Implicit loading is never used in the language service, so /// no cancellation is needed. member tcImports.ImplicitLoadIfAllowed (ctok, m, assemblyName, lookupOnly) = CheckDisposed() @@ -4731,10 +4727,10 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti false if tryFile (assemblyName + ".dll") then () - else tryFile (assemblyName + ".exe") |> ignore + else tryFile (assemblyName + ".exe") |> ignore #if !NO_EXTENSIONTYPING - member tcImports.TryFindProviderGeneratedAssemblyByName(ctok, assemblyName:string) : System.Reflection.Assembly option = + member tcImports.TryFindProviderGeneratedAssemblyByName(ctok, assemblyName: string) : System.Reflection.Assembly option = // The assembly may not be in the resolutions, but may be in the load set including EST injected assemblies match tcImports.TryFindDllInfo (ctok, range0, assemblyName, lookupOnly=true) with | Some res -> @@ -4744,14 +4740,14 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti #endif /// This doesn't need to be cancellable, it is only used by F# Interactive - member tcImports.TryFindExistingFullyQualifiedPathBySimpleAssemblyName (ctok, simpleAssemName) : string option = + member tcImports.TryFindExistingFullyQualifiedPathBySimpleAssemblyName (ctok, simpleAssemName) : string option = resolutions.TryFindBySimpleAssemblyName (ctok, simpleAssemName) |> Option.map (fun r -> r.resolvedPath) /// This doesn't need to be cancellable, it is only used by F# Interactive - member tcImports.TryFindExistingFullyQualifiedPathByExactAssemblyRef(ctok, assemblyRef:ILAssemblyRef) : string option = - resolutions.TryFindByExactILAssemblyRef (ctok, assemblyRef) |> Option.map (fun r -> r.resolvedPath) + member tcImports.TryFindExistingFullyQualifiedPathByExactAssemblyRef(ctok, assemblyRef: ILAssemblyRef) : string option = + resolutions.TryFindByExactILAssemblyRef (ctok, assemblyRef) |> Option.map (fun r -> r.resolvedPath) - member tcImports.TryResolveAssemblyReference(ctok, assemblyReference:AssemblyReference, mode:ResolveAssemblyReferenceMode) : OperationResult = + member tcImports.TryResolveAssemblyReference(ctok, assemblyReference: AssemblyReference, mode: ResolveAssemblyReferenceMode) : OperationResult = let tcConfig = tcConfigP.Get(ctok) // First try to lookup via the original reference text. match resolutions.TryFindByOriginalReference assemblyReference with @@ -4785,10 +4781,10 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti // But don't cache resolution failures because the assembly may appear on the disk later. let resolved, unresolved = TcConfig.TryResolveLibsUsingMSBuildRules(tcConfig, [ assemblyReference ], assemblyReference.Range, mode) match resolved, unresolved with - | (assemblyResolution::_, _) -> + | (assemblyResolution::_, _) -> resolutions <- resolutions.AddResolutionResults resolved ResultD [assemblyResolution] - | (_, _::_) -> + | (_, _::_) -> resolutions <- resolutions.AddUnresolvedReferences unresolved ErrorD(AssemblyNotResolved(assemblyReference.Text, assemblyReference.Range)) | [], [] -> @@ -4807,7 +4803,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti // // If this ever changes then callers may need to begin disposing the TcImports (though remember, not before all derived // non-framework TcImports built related to this framework TcImports are disposed). - static member BuildFrameworkTcImports (ctok, tcConfigP:TcConfigProvider, frameworkDLLs, nonFrameworkDLLs) = + static member BuildFrameworkTcImports (ctok, tcConfigP: TcConfigProvider, frameworkDLLs, nonFrameworkDLLs) = cancellable { let tcConfig = tcConfigP.Get(ctok) @@ -4823,7 +4819,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti let primaryScopeRef = match primaryAssem with | (_, [ResolvedImportedAssembly(ccu)]) -> ccu.FSharpViewOfMetadata.ILScopeRef - | _ -> failwith "unexpected" + | _ -> failwith "unexpected" let ilGlobals = mkILGlobals primaryScopeRef frameworkTcImports.SetILGlobals ilGlobals @@ -4871,7 +4867,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti IlxSettings.ilxFsharpCoreLibAssemRef := (let scoref = fslibCcuInfo.ILScopeRef match scoref with - | ILScopeRef.Assembly aref -> Some aref + | ILScopeRef.Assembly aref -> Some aref | ILScopeRef.Local | ILScopeRef.Module _ -> error(InternalError("not ILScopeRef.Assembly", rangeStartup))) fslibCcuInfo.FSharpViewOfMetadata @@ -4894,7 +4890,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti member tcImports.ReportUnresolvedAssemblyReferences(knownUnresolved) = // Report that an assembly was not resolved. - let reportAssemblyNotResolved(file, originalReferences:AssemblyReference list) = + let reportAssemblyNotResolved(file, originalReferences: AssemblyReference list) = originalReferences |> List.iter(fun originalReference -> errorR(AssemblyNotResolved(file, originalReference.Range))) knownUnresolved |> List.map (function UnresolvedAssemblyReference(file, originalReferences) -> file, originalReferences) @@ -4902,7 +4898,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti // Note: This returns a TcImports object. TcImports are disposable - the caller owns the returned TcImports object // and when hosted in Visual Studio or another long-running process must dispose this object. - static member BuildNonFrameworkTcImports (ctok, tcConfigP:TcConfigProvider, tcGlobals:TcGlobals, baseTcImports, nonFrameworkReferences, knownUnresolved) = + static member BuildNonFrameworkTcImports (ctok, tcConfigP: TcConfigProvider, tcGlobals: TcGlobals, baseTcImports, nonFrameworkReferences, knownUnresolved) = cancellable { let tcConfig = tcConfigP.Get(ctok) let tcResolutions = TcAssemblyResolutions.BuildFromPriorResolutions(ctok, tcConfig, nonFrameworkReferences, knownUnresolved) @@ -4917,7 +4913,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti // and if hosted in Visual Studio or another long-running process must dispose this object. However this // function is currently only used from fsi.exe. If we move to a long-running hosted evaluation service API then // we should start disposing these objects. - static member BuildTcImports(ctok, tcConfigP:TcConfigProvider) = + static member BuildTcImports(ctok, tcConfigP: TcConfigProvider) = cancellable { let tcConfig = tcConfigP.Get(ctok) //let foundationalTcImports, tcGlobals = TcImports.BuildFoundationalTcImports(tcConfigP) @@ -4942,12 +4938,12 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti /// Process #r in F# Interactive. /// Adds the reference to the tcImports and add the ccu to the type checking environment. -let RequireDLL (ctok, tcImports:TcImports, tcEnv, thisAssemblyName, m, file) = +let RequireDLL (ctok, tcImports: TcImports, tcEnv, thisAssemblyName, m, file) = let resolutions = CommitOperationResult(tcImports.TryResolveAssemblyReference(ctok, AssemblyReference(m, file, None), ResolveAssemblyReferenceMode.ReportErrors)) let dllinfos, ccuinfos = tcImports.RegisterAndImportReferencedAssemblies(ctok, resolutions) |> Cancellable.runWithoutCancellation let asms = - ccuinfos |> List.map (function + ccuinfos |> List.map (function | ResolvedImportedAssembly(asm) -> asm | UnresolvedImportedAssembly(assemblyName) -> error(Error(FSComp.SR.buildCouldNotResolveAssemblyRequiredByFile(assemblyName, file), m))) @@ -4962,16 +4958,16 @@ let ProcessMetaCommandsFromInput (nowarnF: 'state -> range * string -> 'state, dllRequireF: 'state -> range * string -> 'state, loadSourceF: 'state -> range * string -> unit) - (tcConfig:TcConfigBuilder, inp, pathOfMetaCommandSource, state0) = + (tcConfig: TcConfigBuilder, inp, pathOfMetaCommandSource, state0) = use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parse let canHaveScriptMetaCommands = match inp with - | ParsedInput.SigFile(_) -> false + | ParsedInput.SigFile(_) -> false | ParsedInput.ImplFile(ParsedImplFileInput(isScript = isScript)) -> isScript - let ProcessMetaCommand state hash = + let ProcessMetaCommand state hash = let mutable matchedm = range0 try match hash with @@ -5068,7 +5064,7 @@ let ProcessMetaCommandsFromInput let state = List.fold ProcessMetaCommandsFromModuleImpl state impls state -let ApplyNoWarnsToTcConfig (tcConfig:TcConfig, inp:ParsedInput, pathOfMetaCommandSource) = +let ApplyNoWarnsToTcConfig (tcConfig: TcConfig, inp: ParsedInput, pathOfMetaCommandSource) = // Clone let tcConfigB = tcConfig.CloneOfOriginalBuilder let addNoWarn = fun () (m, s) -> tcConfigB.TurnWarningOff(m, s) @@ -5077,7 +5073,7 @@ let ApplyNoWarnsToTcConfig (tcConfig:TcConfig, inp:ParsedInput, pathOfMetaComman ProcessMetaCommandsFromInput (addNoWarn, addReferencedAssemblyByPath, addLoadedSource) (tcConfigB, inp, pathOfMetaCommandSource, ()) TcConfig.Create(tcConfigB, validate=false) -let ApplyMetaCommandsFromInputToTcConfig (tcConfig:TcConfig, inp:ParsedInput, pathOfMetaCommandSource) = +let ApplyMetaCommandsFromInputToTcConfig (tcConfig: TcConfig, inp: ParsedInput, pathOfMetaCommandSource) = // Clone let tcConfigB = tcConfig.CloneOfOriginalBuilder let getWarningNumber = fun () _ -> () @@ -5090,7 +5086,7 @@ let ApplyMetaCommandsFromInputToTcConfig (tcConfig:TcConfig, inp:ParsedInput, pa // Compute the load closure of a set of script files //-------------------------------------------------------------------------- -let GetAssemblyResolutionInformation(ctok, tcConfig : TcConfig) = +let GetAssemblyResolutionInformation(ctok, tcConfig: TcConfig) = use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parameter let assemblyList = TcAssemblyResolutions.GetAllDllReferences(tcConfig) let resolutions = TcAssemblyResolutions.ResolveAssemblyReferences (ctok, tcConfig, assemblyList, []) @@ -5141,7 +5137,7 @@ type LoadClosureInput = { FileName: string SyntaxTree: ParsedInput option ParseDiagnostics: (PhasedDiagnostic * bool) list - MetaCommandDiagnostics: (PhasedDiagnostic * bool) list } + MetaCommandDiagnostics: (PhasedDiagnostic * bool) list } [] type LoadClosure = @@ -5150,7 +5146,7 @@ type LoadClosure = /// The resolved references along with the ranges of the #r positions in each file. References: (string * AssemblyResolution list) list /// The list of references that were not resolved during load closure. These may still be extension references. - UnresolvedReferences : UnresolvedAssemblyReference list + UnresolvedReferences: UnresolvedAssemblyReference list /// The list of all sources in the closure with inputs when available Inputs: LoadClosureInput list /// The #load, including those that didn't resolve @@ -5158,11 +5154,11 @@ type LoadClosure = /// The #nowarns NoWarns: (string * range list) list /// Diagnostics seen while processing resolutions - ResolutionDiagnostics : (PhasedDiagnostic * bool) list + ResolutionDiagnostics: (PhasedDiagnostic * bool) list /// Diagnostics seen while parsing root of closure - AllRootFileDiagnostics : (PhasedDiagnostic * bool) list + AllRootFileDiagnostics: (PhasedDiagnostic * bool) list /// Diagnostics seen while processing the compiler options implied root of closure - LoadClosureRootFileDiagnostics : (PhasedDiagnostic * bool) list } + LoadClosureRootFileDiagnostics: (PhasedDiagnostic * bool) list } [] @@ -5180,7 +5176,7 @@ module private ScriptPreprocessClosure = type ClosureSource = ClosureSource of filename: string * referenceRange: range * sourceText: string * parseRequired: bool /// Represents an output of the closure finding process - type ClosureFile = ClosureFile of string * range * ParsedInput option * (PhasedDiagnostic * bool) list * (PhasedDiagnostic * bool) list * (string * range) list // filename, range, errors, warnings, nowarns + type ClosureFile = ClosureFile of string * range * ParsedInput option * (PhasedDiagnostic * bool) list * (PhasedDiagnostic * bool) list * (string * range) list // filename, range, errors, warnings, nowarns type Observed() = let seen = System.Collections.Generic.Dictionary<_, bool>() @@ -5193,8 +5189,8 @@ module private ScriptPreprocessClosure = /// Parse a script from source. let ParseScriptText - (filename:string, source:string, tcConfig:TcConfig, codeContext, - lexResourceManager:Lexhelp.LexResourceManager, errorLogger:ErrorLogger) = + (filename: string, source: string, tcConfig: TcConfig, codeContext, + lexResourceManager: Lexhelp.LexResourceManager, errorLogger: ErrorLogger) = // fsc.exe -- COMPILED\!INTERACTIVE // fsi.exe -- !COMPILED\INTERACTIVE @@ -5214,7 +5210,7 @@ module private ScriptPreprocessClosure = /// Create a TcConfig for load closure starting from a single .fsx file let CreateScriptTextTcConfig (legacyReferenceResolver, defaultFSharpBinariesDir, - filename:string, codeContext, + filename: string, codeContext, useSimpleResolution, useFsiAuxLib, basicReferences, applyCommandLineArgs, assumeDotNetFramework, tryGetMetadataSnapshot, @@ -5254,8 +5250,8 @@ module private ScriptPreprocessClosure = use stream = FileSystem.FileStreamReadShim filename use reader = match inputCodePage with - | None -> new StreamReader(stream, true) - | Some (n: int) -> new StreamReader(stream, Encoding.GetEncoding(n)) + | None -> new StreamReader(stream, true) + | Some (n: int) -> new StreamReader(stream, Encoding.GetEncoding(n)) let source = reader.ReadToEnd() [ClosureSource(filename, m, source, parseRequired)] with e -> @@ -5263,7 +5259,7 @@ module private ScriptPreprocessClosure = [] let ApplyMetaCommandsFromInputToTcConfigAndGatherNoWarn - (tcConfig:TcConfig, inp:ParsedInput, pathOfMetaCommandSource) = + (tcConfig: TcConfig, inp: ParsedInput, pathOfMetaCommandSource) = let tcConfigB = tcConfig.CloneOfOriginalBuilder let nowarns = ref [] @@ -5279,13 +5275,13 @@ module private ScriptPreprocessClosure = try TcConfig.Create(tcConfigB, validate=false), nowarns with ReportedError _ -> - // Recover by using a default TcConfig. + // Recover by using a default TcConfig. let tcConfigB = tcConfig.CloneOfOriginalBuilder TcConfig.Create(tcConfigB, validate=false), nowarns let FindClosureFiles - (closureSources, tcConfig:TcConfig, codeContext, - lexResourceManager:Lexhelp.LexResourceManager) = + (closureSources, tcConfig: TcConfig, codeContext, + lexResourceManager: Lexhelp.LexResourceManager) = let tcConfig = ref tcConfig @@ -5338,7 +5334,7 @@ module private ScriptPreprocessClosure = closureSources |> List.collect loop, !tcConfig /// Reduce the full directive closure into LoadClosure - let GetLoadClosure(ctok, rootFilename, closureFiles, tcConfig:TcConfig, codeContext) = + let GetLoadClosure(ctok, rootFilename, closureFiles, tcConfig: TcConfig, codeContext) = // Mark the last file as isLastCompiland. let closureFiles = @@ -5360,7 +5356,7 @@ module private ScriptPreprocessClosure = | _ -> closureFiles // Get all source files. - let sourceFiles = [ for (ClosureFile(filename, m, _, _, _, _)) in closureFiles -> (filename, m) ] + let sourceFiles = [ for (ClosureFile(filename, m, _, _, _, _)) in closureFiles -> (filename, m) ] let sourceInputs = [ for (ClosureFile(filename, _, input, parseDiagnostics, metaDiagnostics, _nowarns)) in closureFiles -> @@ -5377,7 +5373,7 @@ module private ScriptPreprocessClosure = use unwindEL = PushErrorLoggerPhaseUntilUnwind (fun _ -> errorLogger) let references, unresolvedReferences = GetAssemblyResolutionInformation(ctok, tcConfig) - let references = references |> List.map (fun ar -> ar.resolvedPath, ar) + let references = references |> List.map (fun ar -> ar.resolvedPath, ar) references, unresolvedReferences, errorLogger.Diagnostics // Root errors and warnings - look at the last item in the closureFiles list @@ -5400,12 +5396,12 @@ module private ScriptPreprocessClosure = // Filter out non-root errors and warnings let allRootDiagnostics = allRootDiagnostics |> List.filter (fst >> isRootRange) - let result : LoadClosure = + let result: LoadClosure = { SourceFiles = List.groupBy fst sourceFiles |> List.map (map2Of2 (List.map snd)) - References = List.groupBy fst references |> List.map (map2Of2 (List.map snd)) + References = List.groupBy fst references |> List.map (map2Of2 (List.map snd)) UnresolvedReferences = unresolvedReferences Inputs = sourceInputs - NoWarns = List.groupBy fst globalNoWarns |> List.map (map2Of2 (List.map snd)) + NoWarns = List.groupBy fst globalNoWarns |> List.map (map2Of2 (List.map snd)) OriginalLoadReferences = tcConfig.loadedSources ResolutionDiagnostics = resolutionDiagnostics AllRootFileDiagnostics = allRootDiagnostics @@ -5418,7 +5414,7 @@ module private ScriptPreprocessClosure = (ctok, legacyReferenceResolver, defaultFSharpBinariesDir, filename, source, codeContext, useSimpleResolution, useFsiAuxLib, - lexResourceManager:Lexhelp.LexResourceManager, + lexResourceManager: Lexhelp.LexResourceManager, applyCommmandLineArgs, assumeDotNetFramework, tryGetMetadataSnapshot, reduceMemoryUsage) = @@ -5434,7 +5430,7 @@ module private ScriptPreprocessClosure = tryGetMetadataSnapshot, reduceMemoryUsage) let resolutions0, _unresolvedReferences = GetAssemblyResolutionInformation(ctok, tcConfig) - let references0 = resolutions0 |> List.map (fun r->r.originalReference.Range, r.resolvedPath) |> Seq.distinct |> List.ofSeq + let references0 = resolutions0 |> List.map (fun r->r.originalReference.Range, r.resolvedPath) |> Seq.distinct |> List.ofSeq references0 let tcConfig = @@ -5449,10 +5445,10 @@ module private ScriptPreprocessClosure = /// Given source filename, find the full load closure /// Used from fsi.fs and fsc.fs, for #load and command line let GetFullClosureOfScriptFiles - (ctok, tcConfig:TcConfig, + (ctok, tcConfig: TcConfig, files:(string*range) list, codeContext, - lexResourceManager:Lexhelp.LexResourceManager) = + lexResourceManager: Lexhelp.LexResourceManager) = let mainFile = fst (List.last files) let closureSources = files |> List.collect (fun (filename, m) -> ClosureSourceOfFilename(filename, m, tcConfig.inputCodePage, true)) @@ -5463,8 +5459,8 @@ type LoadClosure with /// Analyze a script text and find the closure of its references. static member ComputeClosureOfScriptText (ctok, legacyReferenceResolver, defaultFSharpBinariesDir, - filename:string, source:string, codeContext, useSimpleResolution:bool, - useFsiAuxLib, lexResourceManager:Lexhelp.LexResourceManager, + filename: string, source: string, codeContext, useSimpleResolution: bool, + useFsiAuxLib, lexResourceManager: Lexhelp.LexResourceManager, applyCommmandLineArgs, assumeDotNetFramework, tryGetMetadataSnapshot, reduceMemoryUsage) = use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parse @@ -5475,8 +5471,8 @@ type LoadClosure with /// Analyze a set of script files and find the closure of their references. static member ComputeClosureOfScriptFiles - (ctok, tcConfig:TcConfig, files:(string*range) list, codeContext, - lexResourceManager:Lexhelp.LexResourceManager) = + (ctok, tcConfig: TcConfig, files:(string*range) list, codeContext, + lexResourceManager: Lexhelp.LexResourceManager) = use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parse ScriptPreprocessClosure.GetFullClosureOfScriptFiles (ctok, tcConfig, files, codeContext, lexResourceManager) @@ -5489,7 +5485,7 @@ type LoadClosure with //-------------------------------------------------------------------------- /// Build the initial type checking environment -let GetInitialTcEnv (thisAssemblyName:string, initm:range, tcConfig:TcConfig, tcImports:TcImports, tcGlobals) = +let GetInitialTcEnv (thisAssemblyName: string, initm: range, tcConfig: TcConfig, tcImports: TcImports, tcGlobals) = let initm = initm.StartRange let ccus = @@ -5512,7 +5508,7 @@ let GetInitialTcEnv (thisAssemblyName:string, initm:range, tcConfig:TcConfig, tc #if !FABLE_COMPILER /// Inject faults into checking -let CheckSimulateException(tcConfig:TcConfig) = +let CheckSimulateException(tcConfig: TcConfig) = match tcConfig.simulateException with | Some("tc-oom") -> raise(System.OutOfMemoryException()) | Some("tc-an") -> raise(System.ArgumentNullException("simulated")) @@ -5544,10 +5540,10 @@ let CheckSimulateException(tcConfig:TcConfig) = // Type-check sets of files //-------------------------------------------------------------------------- -type RootSigs = Zmap +type RootSigs = Zmap type RootImpls = Zset -let qnameOrder = Order.orderBy (fun (q:QualifiedNameOfFile) -> q.Text) +let qnameOrder = Order.orderBy (fun (q: QualifiedNameOfFile) -> q.Text) type TcState = { tcsCcu: CcuThunk @@ -5558,7 +5554,7 @@ type TcState = tcsCreatesGeneratedProvidedTypes: bool tcsRootSigs: RootSigs tcsRootImpls: RootImpls - tcsCcuSig: ModuleOrNamespaceType } + tcsCcuSig: ModuleOrNamespaceType } member x.NiceNameGenerator = x.tcsNiceNameGen @@ -5582,13 +5578,13 @@ type TcState = /// Create the initial type checking state for compiling an assembly -let GetInitialTcState(m, ccuName, tcConfig:TcConfig, tcGlobals, tcImports:TcImports, niceNameGen, tcEnv0) = +let GetInitialTcState(m, ccuName, tcConfig: TcConfig, tcGlobals, tcImports: TcImports, niceNameGen, tcEnv0) = ignore tcImports // Create a ccu to hold all the results of compilation let ccuType = NewCcuContents ILScopeRef.Local m ccuName (NewEmptyModuleOrNamespaceType Namespace) - let ccuData : CcuData = + let ccuData: CcuData = { IsFSharp=true UsesFSharp20PlusQuotations=false #if !NO_EXTENSIONTYPING @@ -5625,7 +5621,7 @@ let GetInitialTcState(m, ccuName, tcConfig:TcConfig, tcGlobals, tcImports:TcImpo /// Typecheck a single file (or interactive entry into F# Interactive) -let TypeCheckOneInputEventually (checkForErrors, tcConfig:TcConfig, tcImports:TcImports, tcGlobals, prefixPathOpt, tcSink, tcState: TcState, inp: ParsedInput) = +let TypeCheckOneInputEventually (checkForErrors, tcConfig: TcConfig, tcImports: TcImports, tcGlobals, prefixPathOpt, tcSink, tcState: TcState, inp: ParsedInput) = eventually { try @@ -5656,9 +5652,9 @@ let TypeCheckOneInputEventually (checkForErrors, tcConfig:TcConfig, tcImports:Tc let! (tcEnv, sigFileType, createsGeneratedProvidedTypes) = TypeCheckOneSigFile (tcGlobals, tcState.tcsNiceNameGen, amap, tcState.tcsCcu, checkForErrors, conditionalDefines, tcSink, tcConfig.internalTestSpanStackReferring) tcState.tcsTcSigEnv file - let rootSigs = Zmap.add qualNameOfFile sigFileType tcState.tcsRootSigs + let rootSigs = Zmap.add qualNameOfFile sigFileType tcState.tcsRootSigs - // Add the signature to the signature env (unless it had an explicit signature) + // Add the signature to the signature env (unless it had an explicit signature) let ccuSigForFile = CombineCcuContentFragments m [sigFileType; tcState.tcsCcuSig] // Open the prefixPath for fsi.exe @@ -5694,7 +5690,7 @@ let TypeCheckOneInputEventually (checkForErrors, tcConfig:TcConfig, tcImports:Tc // Typecheck the implementation file let! topAttrs, implFile, _implFileHiddenType, tcEnvAtEnd, createsGeneratedProvidedTypes = - TypeCheckOneImplFile (tcGlobals, tcState.tcsNiceNameGen, amap, tcState.tcsCcu, checkForErrors, conditionalDefines, tcSink, tcConfig.internalTestSpanStackReferring) tcImplEnv rootSigOpt file + TypeCheckOneImplFile (tcGlobals, tcState.tcsNiceNameGen, amap, tcState.tcsCcu, checkForErrors, conditionalDefines, tcSink, tcConfig.internalTestSpanStackReferring) tcImplEnv rootSigOpt file let hadSig = rootSigOpt.IsSome let implFileSigType = SigTypeOfImplFile implFile @@ -5743,7 +5739,7 @@ let TypeCheckOneInputEventually (checkForErrors, tcConfig:TcConfig, tcImports:Tc } /// Typecheck a single file (or interactive entry into F# Interactive) -let TypeCheckOneInput (ctok, checkForErrors, tcConfig, tcImports, tcGlobals, prefixPathOpt) tcState inp = +let TypeCheckOneInput (ctok, checkForErrors, tcConfig, tcImports, tcGlobals, prefixPathOpt) tcState inp = // 'use' ensures that the warning handler is restored at the end use unwindEL = PushErrorLoggerPhaseUntilUnwind(fun oldLogger -> GetErrorLoggerFilteringByScopedPragmas(false, GetScopedPragmasForInput(inp), oldLogger) ) use unwindBP = PushThreadBuildPhaseUntilUnwind BuildPhase.TypeCheck @@ -5762,7 +5758,7 @@ let TypeCheckMultipleInputsFinish(results, tcState: TcState) = let TypeCheckOneInputAndFinishEventually(checkForErrors, tcConfig: TcConfig, tcImports, tcGlobals, prefixPathOpt, tcSink, tcState, input) = eventually { Logger.LogBlockStart LogCompilerFunctionId.CompileOps_TypeCheckOneInputAndFinishEventually - let! results, tcState = TypeCheckOneInputEventually(checkForErrors, tcConfig, tcImports, tcGlobals, prefixPathOpt, tcSink, tcState, input) + let! results, tcState = TypeCheckOneInputEventually(checkForErrors, tcConfig, tcImports, tcGlobals, prefixPathOpt, tcSink, tcState, input) let result = TypeCheckMultipleInputsFinish([results], tcState) Logger.LogBlockStop LogCompilerFunctionId.CompileOps_TypeCheckOneInputAndFinishEventually return result @@ -5781,7 +5777,7 @@ let TypeCheckClosedInputSetFinish (declaredImpls: TypedImplFile list, tcState) = let TypeCheckClosedInputSet (ctok, checkForErrors, tcConfig, tcImports, tcGlobals, prefixPathOpt, tcState, inputs) = // tcEnvAtEndOfLastFile is the environment required by fsi.exe when incrementally adding definitions - let results, tcState = (tcState, inputs) ||> List.mapFold (TypeCheckOneInput (ctok, checkForErrors, tcConfig, tcImports, tcGlobals, prefixPathOpt)) + let results, tcState = (tcState, inputs) ||> List.mapFold (TypeCheckOneInput (ctok, checkForErrors, tcConfig, tcImports, tcGlobals, prefixPathOpt)) let (tcEnvAtEndOfLastFile, topAttrs, implFiles, _), tcState = TypeCheckMultipleInputsFinish(results, tcState) let tcState, declaredImpls = TypeCheckClosedInputSetFinish (implFiles, tcState) tcState, topAttrs, declaredImpls, tcEnvAtEndOfLastFile diff --git a/src/fcs-fable/src/fsharp/CompileOptions.fs b/src/fcs-fable/src/fsharp/CompileOptions.fs index b25c620efc..db87184d21 100755 --- a/src/fcs-fable/src/fsharp/CompileOptions.fs +++ b/src/fcs-fable/src/fsharp/CompileOptions.fs @@ -21,17 +21,11 @@ open FSharp.Compiler.Lib open FSharp.Compiler.Range open FSharp.Compiler.IlxGen -#if FX_RESHAPED_REFLECTION -open Microsoft.FSharp.Core.ReflectionAdapters -#endif - module Attributes = open System.Runtime.CompilerServices //[] -#if !FX_NO_DEFAULT_DEPENDENCY_TYPE - [] -#endif + [] do() //---------------------------------------------------------------------------- @@ -71,15 +65,15 @@ and CompilerOptionBlock = PublicOptions of string * CompilerOption list | Priv let GetOptionsOfBlock block = match block with - | PublicOptions (_,opts) -> opts + | PublicOptions (_, opts) -> opts | PrivateOptions opts -> opts let FilterCompilerOptionBlock pred block = match block with - | PublicOptions(heading,opts) -> PublicOptions(heading,List.filter pred opts) + | PublicOptions(heading, opts) -> PublicOptions(heading, List.filter pred opts) | PrivateOptions(opts) -> PrivateOptions(List.filter pred opts) -let compilerOptionUsage (CompilerOption(s,tag,spec,_,_)) = +let compilerOptionUsage (CompilerOption(s, tag, spec, _, _)) = let s = if s="--" then "" else s (* s="flag" for "--flag" options. s="--" for "--" option. Adjust printing here for "--" case. *) match spec with | (OptionUnit _ | OptionSet _ | OptionClear _ | OptionHelp _) -> sprintf "--%s" s @@ -94,7 +88,7 @@ let compilerOptionUsage (CompilerOption(s,tag,spec,_,_)) = | OptionRest _ -> sprintf "--%s ..." s | OptionGeneral _ -> if tag="" then sprintf "%s" s else sprintf "%s:%s" s tag (* still being decided *) -let PrintCompilerOption (CompilerOption(_s,_tag,_spec,_,help) as compilerOption) = +let PrintCompilerOption (CompilerOption(_s, _tag, _spec, _, help) as compilerOption) = let flagWidth = 42 // fixed width for printing of flags, e.g. --debug:{full|pdbonly|portable|embedded} let defaultLineWidth = 80 // the fallback width let lineWidth = @@ -127,7 +121,7 @@ let PrintCompilerOption (CompilerOption(_s,_tag,_spec,_,help) as compilerOption) let _finalColumn = Array.fold printWord flagWidth words printfn "" (* newline *) -let PrintPublicOptions (heading,opts) = +let PrintPublicOptions (heading, opts) = if not (isNil opts) then printfn "" printfn "" @@ -136,13 +130,13 @@ let PrintPublicOptions (heading,opts) = let PrintCompilerOptionBlocks blocks = let equals x y = x=y - let publicBlocks = List.choose (function PrivateOptions _ -> None | PublicOptions (heading,opts) -> Some (heading,opts)) blocks + let publicBlocks = List.choose (function PrivateOptions _ -> None | PublicOptions (heading, opts) -> Some (heading, opts)) blocks let consider doneHeadings (heading, _opts) = if Set.contains heading doneHeadings then doneHeadings else let headingOptions = List.filter (fst >> equals heading) publicBlocks |> List.collect snd - PrintPublicOptions (heading,headingOptions) + PrintPublicOptions (heading, headingOptions) Set.add heading doneHeadings List.fold consider Set.empty publicBlocks |> ignore> @@ -166,7 +160,7 @@ let dumpCompilerOption prefix (CompilerOption(str, _, spec, _, _)) = | OptionGeneral _ -> printf "OptionGeneral" printf "\n" let dumpCompilerOptionBlock = function - | PublicOptions (heading,opts) -> List.iter (dumpCompilerOption heading) opts + | PublicOptions (heading, opts) -> List.iter (dumpCompilerOption heading) opts | PrivateOptions opts -> List.iter (dumpCompilerOption "NoSection") opts let DumpCompilerOptionBlocks blocks = List.iter dumpCompilerOptionBlock blocks @@ -181,7 +175,7 @@ module ResponseFile = | Comment of string #if !FABLE_COMPILER - let parseFile path : Choice = + let parseFile path: Choice = let parseLine (l: string) = match l with | s when String.IsNullOrWhiteSpace(s) -> None @@ -201,13 +195,13 @@ module ResponseFile = #endif //!FABLE_COMPILER -let ParseCompilerOptions (collectOtherArgument : string -> unit, blocks: CompilerOptionBlock list, args) = +let ParseCompilerOptions (collectOtherArgument: string -> unit, blocks: CompilerOptionBlock list, args) = use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parameter let specs = List.collect GetOptionsOfBlock blocks // returns a tuple - the option token, the option argument string - let parseOption (s : string) = + let parseOption (s: string) = // grab the option token let opts = s.Split([|':'|]) let mutable opt = opts.[0] @@ -228,22 +222,22 @@ let ParseCompilerOptions (collectOtherArgument : string -> unit, blocks: Compile opt <- "" // get the argument string - let optArgs = if opts.Length > 1 then String.Join(":",opts.[1 ..]) else "" + let optArgs = if opts.Length > 1 then String.Join(":", opts.[1 ..]) else "" opt, optArgs - let getOptionArg compilerOption (argString : string) = + let getOptionArg compilerOption (argString: string) = if argString = "" then - errorR(Error(FSComp.SR.buildOptionRequiresParameter(compilerOptionUsage compilerOption),rangeCmdArgs)) + errorR(Error(FSComp.SR.buildOptionRequiresParameter(compilerOptionUsage compilerOption), rangeCmdArgs)) argString - let getOptionArgList compilerOption (argString : string) = + let getOptionArgList compilerOption (argString: string) = if argString = "" then - errorR(Error(FSComp.SR.buildOptionRequiresParameter(compilerOptionUsage compilerOption),rangeCmdArgs)) + errorR(Error(FSComp.SR.buildOptionRequiresParameter(compilerOptionUsage compilerOption), rangeCmdArgs)) [] else argString.Split([|',';';'|]) |> List.ofArray - let getSwitchOpt (opt : string) = + let getSwitchOpt (opt: string) = // if opt is a switch, strip the '+' or '-' if opt <> "--" && opt.Length > 1 && (opt.EndsWithOrdinal("+") || opt.EndsWithOrdinal("-")) then opt.[0 .. opt.Length - 2] @@ -271,15 +265,15 @@ let ParseCompilerOptions (collectOtherArgument : string -> unit, blocks: Compile match fullpath with | None -> - errorR(Error(FSComp.SR.optsResponseFileNameInvalid(rsp),rangeCmdArgs)) + errorR(Error(FSComp.SR.optsResponseFileNameInvalid(rsp), rangeCmdArgs)) [] | Some(path) when not (FileSystem.SafeExists path) -> - errorR(Error(FSComp.SR.optsResponseFileNotFound(rsp, path),rangeCmdArgs)) + errorR(Error(FSComp.SR.optsResponseFileNotFound(rsp, path), rangeCmdArgs)) [] | Some path -> match ResponseFile.parseFile path with | Choice2Of2 _ -> - errorR(Error(FSComp.SR.optsInvalidResponseFile(rsp, path),rangeCmdArgs)) + errorR(Error(FSComp.SR.optsInvalidResponseFile(rsp, path), rangeCmdArgs)) [] | Choice1Of2 rspData -> let onlyOptions l = @@ -328,7 +322,7 @@ let ParseCompilerOptions (collectOtherArgument : string -> unit, blocks: Compile let oa = getOptionArg compilerOption argString if oa <> "" then f (try int32 (oa) with _ -> - errorR(Error(FSComp.SR.buildArgInvalidInt(getOptionArg compilerOption argString),rangeCmdArgs)); 0) + errorR(Error(FSComp.SR.buildArgInvalidInt(getOptionArg compilerOption argString), rangeCmdArgs)); 0) t | (CompilerOption(s, _, OptionFloat f, d, _) as compilerOption :: _) when optToken = s -> reportDeprecatedOption d @@ -344,14 +338,14 @@ let ParseCompilerOptions (collectOtherArgument : string -> unit, blocks: Compile reportDeprecatedOption d let al = getOptionArgList compilerOption argString if al <> [] then - List.iter (fun i -> f (try int32 i with _ -> errorR(Error(FSComp.SR.buildArgInvalidInt(i),rangeCmdArgs)); 0)) al ; + List.iter (fun i -> f (try int32 i with _ -> errorR(Error(FSComp.SR.buildArgInvalidInt(i), rangeCmdArgs)); 0)) al t | (CompilerOption(s, _, OptionIntListSwitch f, d, _) as compilerOption :: _) when getSwitchOpt(optToken) = s -> reportDeprecatedOption d let al = getOptionArgList compilerOption argString if al <> [] then let switch = getSwitch(opt) - List.iter (fun i -> f (try int32 i with _ -> errorR(Error(FSComp.SR.buildArgInvalidInt(i),rangeCmdArgs)); 0) switch) al + List.iter (fun i -> f (try int32 i with _ -> errorR(Error(FSComp.SR.buildArgInvalidInt(i), rangeCmdArgs)); 0) switch) al t // here | (CompilerOption(s, _, OptionStringList f, d, _) as compilerOption :: _) when optToken = s -> @@ -367,7 +361,7 @@ let ParseCompilerOptions (collectOtherArgument : string -> unit, blocks: Compile let switch = getSwitch(opt) List.iter (fun s -> f s switch) (getOptionArgList compilerOption argString) t - | (CompilerOption(_, _, OptionGeneral (pred,exec), d, _) :: _) when pred args -> + | (CompilerOption(_, _, OptionGeneral (pred, exec), d, _) :: _) when pred args -> reportDeprecatedOption d let rest = exec args in rest // arguments taken, rest remaining | (_ :: more) -> attempt more @@ -376,7 +370,7 @@ let ParseCompilerOptions (collectOtherArgument : string -> unit, blocks: Compile then // want the whole opt token - delimiter and all let unrecOpt = (opt.Split([|':'|]).[0]) - errorR(Error(FSComp.SR.buildUnrecognizedOption(unrecOpt),rangeCmdArgs)) + errorR(Error(FSComp.SR.buildUnrecognizedOption(unrecOpt), rangeCmdArgs)) t else (collectOtherArgument opt; t) @@ -398,52 +392,52 @@ let setFlag r n = | 1 -> r true | _ -> raise (Failure "expected 0/1") -let SetOptimizeOff(tcConfigB : TcConfigBuilder) = +let SetOptimizeOff(tcConfigB: TcConfigBuilder) = tcConfigB.optSettings <- { tcConfigB.optSettings with jitOptUser = Some false } tcConfigB.optSettings <- { tcConfigB.optSettings with localOptUser = Some false } tcConfigB.optSettings <- { tcConfigB.optSettings with crossModuleOptUser = Some false } tcConfigB.optSettings <- { tcConfigB.optSettings with lambdaInlineThreshold = 0 } - tcConfigB.doDetuple <- false; - tcConfigB.doTLR <- false; - tcConfigB.doFinalSimplify <- false; + tcConfigB.doDetuple <- false + tcConfigB.doTLR <- false + tcConfigB.doFinalSimplify <- false -let SetOptimizeOn(tcConfigB : TcConfigBuilder) = +let SetOptimizeOn(tcConfigB: TcConfigBuilder) = tcConfigB.optSettings <- { tcConfigB.optSettings with jitOptUser = Some true } tcConfigB.optSettings <- { tcConfigB.optSettings with localOptUser = Some true } tcConfigB.optSettings <- { tcConfigB.optSettings with crossModuleOptUser = Some true } tcConfigB.optSettings <- { tcConfigB.optSettings with lambdaInlineThreshold = 6 } - tcConfigB.doDetuple <- true; - tcConfigB.doTLR <- true; - tcConfigB.doFinalSimplify <- true; + tcConfigB.doDetuple <- true + tcConfigB.doTLR <- true + tcConfigB.doFinalSimplify <- true -let SetOptimizeSwitch (tcConfigB : TcConfigBuilder) switch = +let SetOptimizeSwitch (tcConfigB: TcConfigBuilder) switch = if (switch = OptionSwitch.On) then SetOptimizeOn(tcConfigB) else SetOptimizeOff(tcConfigB) -let SetTailcallSwitch (tcConfigB : TcConfigBuilder) switch = +let SetTailcallSwitch (tcConfigB: TcConfigBuilder) switch = tcConfigB.emitTailcalls <- (switch = OptionSwitch.On) -let SetDeterministicSwitch (tcConfigB : TcConfigBuilder) switch = +let SetDeterministicSwitch (tcConfigB: TcConfigBuilder) switch = tcConfigB.deterministic <- (switch = OptionSwitch.On) -let jitoptimizeSwitch (tcConfigB : TcConfigBuilder) switch = +let jitoptimizeSwitch (tcConfigB: TcConfigBuilder) switch = tcConfigB.optSettings <- { tcConfigB.optSettings with jitOptUser = Some (switch = OptionSwitch.On) } -let localoptimizeSwitch (tcConfigB : TcConfigBuilder) switch = +let localoptimizeSwitch (tcConfigB: TcConfigBuilder) switch = tcConfigB.optSettings <- { tcConfigB.optSettings with localOptUser = Some (switch = OptionSwitch.On) } -let crossOptimizeSwitch (tcConfigB : TcConfigBuilder) switch = +let crossOptimizeSwitch (tcConfigB: TcConfigBuilder) switch = tcConfigB.optSettings <- { tcConfigB.optSettings with crossModuleOptUser = Some (switch = OptionSwitch.On) } -let splittingSwitch (tcConfigB : TcConfigBuilder) switch = +let splittingSwitch (tcConfigB: TcConfigBuilder) switch = tcConfigB.optSettings <- { tcConfigB.optSettings with abstractBigTargets = switch = OptionSwitch.On } -let callVirtSwitch (tcConfigB : TcConfigBuilder) switch = +let callVirtSwitch (tcConfigB: TcConfigBuilder) switch = tcConfigB.alwaysCallVirt <- switch = OptionSwitch.On -let useHighEntropyVASwitch (tcConfigB : TcConfigBuilder) switch = +let useHighEntropyVASwitch (tcConfigB: TcConfigBuilder) switch = tcConfigB.useHighEntropyVA <- switch = OptionSwitch.On -let subSystemVersionSwitch (tcConfigB : TcConfigBuilder) (text : string) = +let subSystemVersionSwitch (tcConfigB: TcConfigBuilder) (text: string) = let fail() = error(Error(FSComp.SR.optsInvalidSubSystemVersion(text), rangeCmdArgs)) // per spec for 357994: Validate input string, should be two positive integers x.y when x>=4 and y>=0 and both <= 65535 @@ -462,15 +456,15 @@ let subSystemVersionSwitch (tcConfigB : TcConfigBuilder) (text : string) = let (++) x s = x @ [s] -let SetTarget (tcConfigB : TcConfigBuilder)(s : string) = +let SetTarget (tcConfigB: TcConfigBuilder)(s: string) = match s.ToLowerInvariant() with | "exe" -> tcConfigB.target <- CompilerTarget.ConsoleExe | "winexe" -> tcConfigB.target <- CompilerTarget.WinExe | "library" -> tcConfigB.target <- CompilerTarget.Dll | "module" -> tcConfigB.target <- CompilerTarget.Module - | _ -> error(Error(FSComp.SR.optsUnrecognizedTarget(s),rangeCmdArgs)) + | _ -> error(Error(FSComp.SR.optsUnrecognizedTarget(s), rangeCmdArgs)) -let SetDebugSwitch (tcConfigB : TcConfigBuilder) (dtype : string option) (s : OptionSwitch) = +let SetDebugSwitch (tcConfigB: TcConfigBuilder) (dtype: string option) (s: OptionSwitch) = match dtype with | Some(s) -> match s with @@ -502,10 +496,10 @@ let SetDebugSwitch (tcConfigB : TcConfigBuilder) (dtype : string option) (s : Op #endif | _ -> error(Error(FSComp.SR.optsUnrecognizedDebugType(s), rangeCmdArgs)) - | None -> tcConfigB.portablePDB <- false; tcConfigB.embeddedPDB <- false; tcConfigB.jitTracking <- s = OptionSwitch.On; + | None -> tcConfigB.portablePDB <- false; tcConfigB.embeddedPDB <- false; tcConfigB.jitTracking <- s = OptionSwitch.On tcConfigB.debuginfo <- s = OptionSwitch.On -let SetEmbedAllSourceSwitch (tcConfigB : TcConfigBuilder) switch = +let SetEmbedAllSourceSwitch (tcConfigB: TcConfigBuilder) switch = if (switch = OptionSwitch.On) then tcConfigB.embedAllSource <- true else tcConfigB.embedAllSource <- false let setOutFileName tcConfigB s = @@ -563,12 +557,12 @@ let PrintOptionInfo (tcConfigB:TcConfigBuilder) = //------------------------- let inputFileFlagsBoth (tcConfigB : TcConfigBuilder) = - [ CompilerOption("reference", tagFile, OptionString (fun s -> tcConfigB.AddReferencedAssemblyByPath (rangeStartup,s)), None, - Some (FSComp.SR.optsReference()) ); + [ CompilerOption("reference", tagFile, OptionString (fun s -> tcConfigB.AddReferencedAssemblyByPath (rangeStartup, s)), None, + Some (FSComp.SR.optsReference()) ) ] -let referenceFlagAbbrev (tcConfigB : TcConfigBuilder) = - CompilerOption("r", tagFile, OptionString (fun s -> tcConfigB.AddReferencedAssemblyByPath (rangeStartup,s)), None, +let referenceFlagAbbrev (tcConfigB: TcConfigBuilder) = + CompilerOption("r", tagFile, OptionString (fun s -> tcConfigB.AddReferencedAssemblyByPath (rangeStartup, s)), None, Some(FSComp.SR.optsShortFormOf("--reference")) ) let inputFileFlagsFsi tcConfigB = inputFileFlagsBoth tcConfigB @@ -584,7 +578,7 @@ let errorsAndWarningsFlags (tcConfigB: TcConfigBuilder) = try Some (int32 (trimFS s)) with _ -> - errorR(Error(FSComp.SR.buildArgInvalidInt(s),rangeCmdArgs)) + errorR(Error(FSComp.SR.buildArgInvalidInt(s), rangeCmdArgs)) None [ CompilerOption("warnaserror", tagNone, OptionSwitch(fun switch -> @@ -627,62 +621,62 @@ let errorsAndWarningsFlags (tcConfigB: TcConfigBuilder) = // OptionBlock: Output files //-------------------------- -let outputFileFlagsFsi (_tcConfigB : TcConfigBuilder) = [] +let outputFileFlagsFsi (_tcConfigB: TcConfigBuilder) = [] -let outputFileFlagsFsc (tcConfigB : TcConfigBuilder) = +let outputFileFlagsFsc (tcConfigB: TcConfigBuilder) = [ CompilerOption - ("out", tagFile, + ("out", tagFile, OptionString (setOutFileName tcConfigB), None, - Some (FSComp.SR.optsNameOfOutputFile()) ); + Some (FSComp.SR.optsNameOfOutputFile()) ) CompilerOption - ("target", tagExe, + ("target", tagExe, OptionString (SetTarget tcConfigB), None, Some (FSComp.SR.optsBuildConsole())) CompilerOption - ("target", tagWinExe, + ("target", tagWinExe, OptionString (SetTarget tcConfigB), None, Some (FSComp.SR.optsBuildWindows())) CompilerOption - ("target", tagLibrary, + ("target", tagLibrary, OptionString (SetTarget tcConfigB), None, Some (FSComp.SR.optsBuildLibrary())) CompilerOption - ("target", tagModule, + ("target", tagModule, OptionString (SetTarget tcConfigB), None, Some (FSComp.SR.optsBuildModule())) CompilerOption - ("delaysign", tagNone, + ("delaysign", tagNone, OptionSwitch (fun s -> tcConfigB.delaysign <- (s = OptionSwitch.On)), None, Some (FSComp.SR.optsDelaySign())) CompilerOption - ("publicsign", tagNone, + ("publicsign", tagNone, OptionSwitch (fun s -> tcConfigB.publicsign <- (s = OptionSwitch.On)), None, Some (FSComp.SR.optsPublicSign())) CompilerOption - ("doc", tagFile, + ("doc", tagFile, OptionString (fun s -> tcConfigB.xmlDocOutputFile <- Some s), None, Some (FSComp.SR.optsWriteXml())) CompilerOption - ("keyfile", tagFile, - OptionString (fun s -> tcConfigB.signer <- Some(s)), None, + ("keyfile", tagFile, + OptionString (fun s -> tcConfigB.signer <- Some(s)), None, Some (FSComp.SR.optsStrongKeyFile())) CompilerOption - ("keycontainer", tagString, - OptionString(fun s -> tcConfigB.container <- Some(s)),None, + ("keycontainer", tagString, + OptionString(fun s -> tcConfigB.container <- Some(s)), None, Some(FSComp.SR.optsStrongKeyContainer())) CompilerOption - ("platform", tagString, + ("platform", tagString, OptionString (fun s -> tcConfigB.platform <- match s with @@ -693,27 +687,27 @@ let outputFileFlagsFsc (tcConfigB : TcConfigBuilder) = tcConfigB.prefer32Bit <- true None | "anycpu" -> None - | _ -> error(Error(FSComp.SR.optsUnknownPlatform(s),rangeCmdArgs))), None, + | _ -> error(Error(FSComp.SR.optsUnknownPlatform(s), rangeCmdArgs))), None, Some(FSComp.SR.optsPlatform())) CompilerOption - ("nooptimizationdata", tagNone, + ("nooptimizationdata", tagNone, OptionUnit (fun () -> tcConfigB.onlyEssentialOptimizationData <- true), None, Some (FSComp.SR.optsNoOpt())) CompilerOption - ("nointerfacedata", tagNone, + ("nointerfacedata", tagNone, OptionUnit (fun () -> tcConfigB.noSignatureData <- true), None, Some (FSComp.SR.optsNoInterface())) CompilerOption - ("sig", tagFile, + ("sig", tagFile, OptionString (setSignatureFile tcConfigB), None, Some (FSComp.SR.optsSig())) CompilerOption - ("nocopyfsharpcore", tagNone, - OptionUnit (fun () -> tcConfigB.copyFSharpCore <- CopyFSharpCoreFlag.No), None, + ("nocopyfsharpcore", tagNone, + OptionUnit (fun () -> tcConfigB.copyFSharpCore <- CopyFSharpCoreFlag.No), None, Some (FSComp.SR.optsNoCopyFsharpCore())) ] @@ -721,31 +715,31 @@ let outputFileFlagsFsc (tcConfigB : TcConfigBuilder) = // OptionBlock: Resources //----------------------- -let resourcesFlagsFsi (_tcConfigB : TcConfigBuilder) = [] -let resourcesFlagsFsc (tcConfigB : TcConfigBuilder) = +let resourcesFlagsFsi (_tcConfigB: TcConfigBuilder) = [] +let resourcesFlagsFsc (tcConfigB: TcConfigBuilder) = [ CompilerOption - ("win32res", tagFile, + ("win32res", tagFile, OptionString (fun s -> tcConfigB.win32res <- s), None, Some (FSComp.SR.optsWin32res())) CompilerOption - ("win32manifest", tagFile, + ("win32manifest", tagFile, OptionString (fun s -> tcConfigB.win32manifest <- s), None, Some (FSComp.SR.optsWin32manifest())) CompilerOption - ("nowin32manifest", tagNone, + ("nowin32manifest", tagNone, OptionUnit (fun () -> tcConfigB.includewin32manifest <- false), None, Some (FSComp.SR.optsNowin32manifest())) CompilerOption - ("resource", tagResInfo, + ("resource", tagResInfo, OptionString (fun s -> tcConfigB.AddEmbeddedResource s), None, Some (FSComp.SR.optsResource())) CompilerOption - ("linkresource", tagResInfo, + ("linkresource", tagResInfo, OptionString (fun s -> tcConfigB.linkResources <- tcConfigB.linkResources ++ s), None, Some (FSComp.SR.optsLinkresource())) ] @@ -754,53 +748,53 @@ let resourcesFlagsFsc (tcConfigB : TcConfigBuilder) = // OptionBlock: Code generation //----------------------------- -let codeGenerationFlags isFsi (tcConfigB : TcConfigBuilder) = +let codeGenerationFlags isFsi (tcConfigB: TcConfigBuilder) = let debug = [ CompilerOption - ("debug", tagNone, + ("debug", tagNone, OptionSwitch (SetDebugSwitch tcConfigB None), None, Some (FSComp.SR.optsDebugPM())) CompilerOption - ("debug", tagFullPDBOnlyPortable, + ("debug", tagFullPDBOnlyPortable, OptionString (fun s -> SetDebugSwitch tcConfigB (Some(s)) OptionSwitch.On), None, Some (FSComp.SR.optsDebug(if isFsi then "pdbonly" else "full"))) ] let embed = [ CompilerOption - ("embed", tagNone, - OptionSwitch (SetEmbedAllSourceSwitch tcConfigB) , None, + ("embed", tagNone, + OptionSwitch (SetEmbedAllSourceSwitch tcConfigB), None, Some (FSComp.SR.optsEmbedAllSource())) CompilerOption - ("embed", tagFileList, - OptionStringList (fun f -> tcConfigB.AddEmbeddedSourceFile f), None, + ("embed", tagFileList, + OptionStringList (fun f -> tcConfigB.AddEmbeddedSourceFile f), None, Some ( FSComp.SR.optsEmbedSource())) CompilerOption - ("sourcelink", tagFile, - OptionString (fun f -> tcConfigB.sourceLink <- f), None, + ("sourcelink", tagFile, + OptionString (fun f -> tcConfigB.sourceLink <- f), None, Some ( FSComp.SR.optsSourceLink())) ] let codegen = [ CompilerOption - ("optimize", tagNone, - OptionSwitch (SetOptimizeSwitch tcConfigB) , None, + ("optimize", tagNone, + OptionSwitch (SetOptimizeSwitch tcConfigB), None, Some (FSComp.SR.optsOptimize())) CompilerOption - ("tailcalls", tagNone, + ("tailcalls", tagNone, OptionSwitch (SetTailcallSwitch tcConfigB), None, Some (FSComp.SR.optsTailcalls())) CompilerOption - ("deterministic", tagNone, + ("deterministic", tagNone, OptionSwitch (SetDeterministicSwitch tcConfigB), None, Some (FSComp.SR.optsDeterministic())) CompilerOption - ("crossoptimize", tagNone, + ("crossoptimize", tagNone, OptionSwitch (crossOptimizeSwitch tcConfigB), None, Some (FSComp.SR.optsCrossoptimize())) ] @@ -812,22 +806,22 @@ let codeGenerationFlags isFsi (tcConfigB : TcConfigBuilder) = let defineSymbol tcConfigB s = tcConfigB.conditionalCompilationDefines <- s :: tcConfigB.conditionalCompilationDefines -let mlCompatibilityFlag (tcConfigB : TcConfigBuilder) = +let mlCompatibilityFlag (tcConfigB: TcConfigBuilder) = CompilerOption - ("mlcompatibility", tagNone, - OptionUnit (fun () -> tcConfigB.mlCompatibility<-true; tcConfigB.TurnWarningOff(rangeCmdArgs,"62")), None, + ("mlcompatibility", tagNone, + OptionUnit (fun () -> tcConfigB.mlCompatibility<-true; tcConfigB.TurnWarningOff(rangeCmdArgs, "62")), None, Some (FSComp.SR.optsMlcompatibility())) let languageFlags tcConfigB = [ CompilerOption - ("checked", tagNone, - OptionSwitch (fun switch -> tcConfigB.checkOverflow <- (switch = OptionSwitch.On)), None, + ("checked", tagNone, + OptionSwitch (fun switch -> tcConfigB.checkOverflow <- (switch = OptionSwitch.On)), None, Some (FSComp.SR.optsChecked())) CompilerOption - ("define", tagString, - OptionString (defineSymbol tcConfigB), None, + ("define", tagString, + OptionString (defineSymbol tcConfigB), None, Some (FSComp.SR.optsDefine())) mlCompatibilityFlag tcConfigB @@ -837,27 +831,27 @@ let languageFlags tcConfigB = // OptionBlock: Advanced user options //----------------------------------- -let libFlag (tcConfigB : TcConfigBuilder) = +let libFlag (tcConfigB: TcConfigBuilder) = CompilerOption - ("lib", tagDirList, - OptionStringList (fun s -> tcConfigB.AddIncludePath (rangeStartup,s,tcConfigB.implicitIncludeDir)), None, + ("lib", tagDirList, + OptionStringList (fun s -> tcConfigB.AddIncludePath (rangeStartup, s, tcConfigB.implicitIncludeDir)), None, Some (FSComp.SR.optsLib())) -let libFlagAbbrev (tcConfigB : TcConfigBuilder) = +let libFlagAbbrev (tcConfigB: TcConfigBuilder) = CompilerOption - ("I", tagDirList, - OptionStringList (fun s -> tcConfigB.AddIncludePath (rangeStartup,s,tcConfigB.implicitIncludeDir)), None, + ("I", tagDirList, + OptionStringList (fun s -> tcConfigB.AddIncludePath (rangeStartup, s, tcConfigB.implicitIncludeDir)), None, Some (FSComp.SR.optsShortFormOf("--lib"))) -let codePageFlag (tcConfigB : TcConfigBuilder) = +let codePageFlag (tcConfigB: TcConfigBuilder) = CompilerOption - ("codepage", tagInt, + ("codepage", tagInt, OptionInt (fun n -> #if !FABLE_COMPILER try System.Text.Encoding.GetEncoding(n) |> ignore with :? System.ArgumentException as err -> - error(Error(FSComp.SR.optsProblemWithCodepage(n,err.Message),rangeCmdArgs)) + error(Error(FSComp.SR.optsProblemWithCodepage(n, err.Message), rangeCmdArgs)) #endif tcConfigB.inputCodePage <- Some(n)), None, @@ -865,25 +859,25 @@ let codePageFlag (tcConfigB : TcConfigBuilder) = let preferredUiLang (tcConfigB: TcConfigBuilder) = CompilerOption - ("preferreduilang", tagString, - OptionString (fun s -> tcConfigB.preferredUiLang <- Some(s)), None, + ("preferreduilang", tagString, + OptionString (fun s -> tcConfigB.preferredUiLang <- Some(s)), None, Some(FSComp.SR.optsPreferredUiLang())) let utf8OutputFlag (tcConfigB: TcConfigBuilder) = CompilerOption - ("utf8output", tagNone, + ("utf8output", tagNone, OptionUnit (fun () -> tcConfigB.utf8output <- true), None, Some (FSComp.SR.optsUtf8output())) -let fullPathsFlag (tcConfigB : TcConfigBuilder) = +let fullPathsFlag (tcConfigB: TcConfigBuilder) = CompilerOption - ("fullpaths", tagNone, + ("fullpaths", tagNone, OptionUnit (fun () -> tcConfigB.showFullPaths <- true), None, Some (FSComp.SR.optsFullpaths())) -let cliRootFlag (_tcConfigB : TcConfigBuilder) = +let cliRootFlag (_tcConfigB: TcConfigBuilder) = CompilerOption - ("cliroot", tagString, + ("cliroot", tagString, OptionString (fun _ -> ()), Some(DeprecatedCommandLineOptionFull(FSComp.SR.optsClirootDeprecatedMsg(), rangeCmdArgs)), Some(FSComp.SR.optsClirootDescription())) @@ -906,20 +900,20 @@ let advancedFlagsBoth tcConfigB = yield fullPathsFlag tcConfigB yield libFlag tcConfigB yield CompilerOption - ("simpleresolution", - tagNone, - OptionUnit (fun () -> tcConfigB.useSimpleResolution<-true), None, + ("simpleresolution", + tagNone, + OptionUnit (fun () -> tcConfigB.useSimpleResolution<-true), None, Some (FSComp.SR.optsSimpleresolution())) yield CompilerOption - ("targetprofile", tagString, - OptionString (SetTargetProfile tcConfigB), None, + ("targetprofile", tagString, + OptionString (SetTargetProfile tcConfigB), None, Some(FSComp.SR.optsTargetProfile())) ] let noFrameworkFlag isFsc tcConfigB = CompilerOption - ("noframework", tagNone, + ("noframework", tagNone, OptionUnit (fun () -> tcConfigB.framework <- false if isFsc then @@ -936,14 +930,14 @@ let advancedFlagsFsc tcConfigB = advancedFlagsBoth tcConfigB @ [ yield CompilerOption - ("baseaddress", tagAddress, - OptionString (fun s -> tcConfigB.baseAddress <- Some(int32 s)), None, + ("baseaddress", tagAddress, + OptionString (fun s -> tcConfigB.baseAddress <- Some(int32 s)), None, Some (FSComp.SR.optsBaseaddress())) yield noFrameworkFlag true tcConfigB yield CompilerOption - ("standalone", tagNone, + ("standalone", tagNone, OptionUnit (fun _ -> tcConfigB.openDebugInformationForLaterStaticLinking <- true tcConfigB.standalone <- true @@ -951,36 +945,36 @@ let advancedFlagsFsc tcConfigB = Some (FSComp.SR.optsStandalone())) yield CompilerOption - ("staticlink", tagFile, + ("staticlink", tagFile, OptionString (fun s -> tcConfigB.extraStaticLinkRoots <- tcConfigB.extraStaticLinkRoots @ [s]), None, Some (FSComp.SR.optsStaticlink())) #if ENABLE_MONO_SUPPORT if runningOnMono then yield CompilerOption - ("resident", tagFile, + ("resident", tagFile, OptionUnit (fun () -> ()), None, Some (FSComp.SR.optsResident())) #endif yield CompilerOption - ("pdb", tagString, + ("pdb", tagString, OptionString (fun s -> tcConfigB.debugSymbolFile <- Some s), None, Some (FSComp.SR.optsPdb())) yield CompilerOption - ("highentropyva", tagNone, - OptionSwitch (useHighEntropyVASwitch tcConfigB), None, + ("highentropyva", tagNone, + OptionSwitch (useHighEntropyVASwitch tcConfigB), None, Some (FSComp.SR.optsUseHighEntropyVA())) yield CompilerOption - ("subsystemversion", tagString, - OptionString (subSystemVersionSwitch tcConfigB), None, + ("subsystemversion", tagString, + OptionString (subSystemVersionSwitch tcConfigB), None, Some (FSComp.SR.optsSubSystemVersion())) yield CompilerOption - ("quotations-debug", tagNone, - OptionSwitch(fun switch -> tcConfigB.emitDebugInfoInQuotations <- switch = OptionSwitch.On), None, + ("quotations-debug", tagNone, + OptionSwitch(fun switch -> tcConfigB.emitDebugInfoInQuotations <- switch = OptionSwitch.On), None, Some(FSComp.SR.optsEmitDebugInfoInQuotations())) ] @@ -990,12 +984,11 @@ let advancedFlagsFsc tcConfigB = let testFlag tcConfigB = CompilerOption - ("test", tagString, + ("test", tagString, OptionString (fun s -> match s with | "StackSpan" -> tcConfigB.internalTestSpanStackReferring <- true | "ErrorRanges" -> tcConfigB.errorStyle <- ErrorStyle.TestErrors - | "MemberBodyRanges" -> PostTypeCheckSemanticChecks.testFlagMemberBody := true | "Tracking" -> Lib.tracking := true (* general purpose on/off diagnostics flag *) | "NoNeedToTailcall" -> tcConfigB.optSettings <- { tcConfigB.optSettings with reportNoNeedToTailcall = true } | "FunctionSizes" -> tcConfigB.optSettings <- { tcConfigB.optSettings with reportFunctionSizes = true } @@ -1008,7 +1001,7 @@ let testFlag tcConfigB = | "DumpDebugInfo" -> tcConfigB.dumpDebugInfo <- true | "ShowLoadedAssemblies" -> tcConfigB.showLoadedAssemblies <- true | "ContinueAfterParseFailure" -> tcConfigB.continueAfterParseFailure <- true - | str -> warning(Error(FSComp.SR.optsUnknownArgumentToTheTestSwitch(str),rangeCmdArgs))), None, + | str -> warning(Error(FSComp.SR.optsUnknownArgumentToTheTestSwitch(str), rangeCmdArgs))), None, None) // Not shown in fsc.exe help, no warning on use, motivation is for use from tooling. @@ -1026,192 +1019,192 @@ let editorSpecificFlags (tcConfigB: TcConfigBuilder) = let internalFlags (tcConfigB:TcConfigBuilder) = [ CompilerOption - ("stamps", tagNone, - OptionUnit ignore, + ("stamps", tagNone, + OptionUnit ignore, Some(InternalCommandLineOption("--stamps", rangeCmdArgs)), None) CompilerOption - ("ranges", tagNone, - OptionSet Tastops.DebugPrint.layoutRanges, + ("ranges", tagNone, + OptionSet Tastops.DebugPrint.layoutRanges, Some(InternalCommandLineOption("--ranges", rangeCmdArgs)), None) CompilerOption - ("terms" , tagNone, - OptionUnit (fun () -> tcConfigB.showTerms <- true), + ("terms", tagNone, + OptionUnit (fun () -> tcConfigB.showTerms <- true), Some(InternalCommandLineOption("--terms", rangeCmdArgs)), None) CompilerOption - ("termsfile" , tagNone, - OptionUnit (fun () -> tcConfigB.writeTermsToFiles <- true), + ("termsfile", tagNone, + OptionUnit (fun () -> tcConfigB.writeTermsToFiles <- true), Some(InternalCommandLineOption("--termsfile", rangeCmdArgs)), None) #if DEBUG CompilerOption - ("debug-parse", tagNone, - OptionUnit (fun () -> Internal.Utilities.Text.Parsing.Flags.debug <- true), + ("debug-parse", tagNone, + OptionUnit (fun () -> Internal.Utilities.Text.Parsing.Flags.debug <- true), Some(InternalCommandLineOption("--debug-parse", rangeCmdArgs)), None) #endif CompilerOption - ("pause", tagNone, - OptionUnit (fun () -> tcConfigB.pause <- true), + ("pause", tagNone, + OptionUnit (fun () -> tcConfigB.pause <- true), Some(InternalCommandLineOption("--pause", rangeCmdArgs)), None) CompilerOption - ("detuple", tagNone, - OptionInt (setFlag (fun v -> tcConfigB.doDetuple <- v)), + ("detuple", tagNone, + OptionInt (setFlag (fun v -> tcConfigB.doDetuple <- v)), Some(InternalCommandLineOption("--detuple", rangeCmdArgs)), None) CompilerOption - ("simulateException", tagNone, - OptionString (fun s -> tcConfigB.simulateException <- Some(s)), + ("simulateException", tagNone, + OptionString (fun s -> tcConfigB.simulateException <- Some(s)), Some(InternalCommandLineOption("--simulateException", rangeCmdArgs)), Some "Simulate an exception from some part of the compiler") CompilerOption - ("stackReserveSize", tagNone, - OptionString (fun s -> tcConfigB.stackReserveSize <- Some(int32 s)), + ("stackReserveSize", tagNone, + OptionString (fun s -> tcConfigB.stackReserveSize <- Some(int32 s)), Some(InternalCommandLineOption("--stackReserveSize", rangeCmdArgs)), Some ("for an exe, set stack reserve size")) CompilerOption - ("tlr", tagInt, - OptionInt (setFlag (fun v -> tcConfigB.doTLR <- v)), + ("tlr", tagInt, + OptionInt (setFlag (fun v -> tcConfigB.doTLR <- v)), Some(InternalCommandLineOption("--tlr", rangeCmdArgs)), None) CompilerOption - ("finalSimplify", tagInt, - OptionInt (setFlag (fun v -> tcConfigB.doFinalSimplify <- v)), + ("finalSimplify", tagInt, + OptionInt (setFlag (fun v -> tcConfigB.doFinalSimplify <- v)), Some(InternalCommandLineOption("--finalSimplify", rangeCmdArgs)), None) CompilerOption - ("parseonly", tagNone, - OptionUnit (fun () -> tcConfigB.parseOnly <- true), + ("parseonly", tagNone, + OptionUnit (fun () -> tcConfigB.parseOnly <- true), Some(InternalCommandLineOption("--parseonly", rangeCmdArgs)), None) CompilerOption - ("typecheckonly", tagNone, - OptionUnit (fun () -> tcConfigB.typeCheckOnly <- true), + ("typecheckonly", tagNone, + OptionUnit (fun () -> tcConfigB.typeCheckOnly <- true), Some(InternalCommandLineOption("--typecheckonly", rangeCmdArgs)), None) CompilerOption - ("ast", tagNone, - OptionUnit (fun () -> tcConfigB.printAst <- true), + ("ast", tagNone, + OptionUnit (fun () -> tcConfigB.printAst <- true), Some(InternalCommandLineOption("--ast", rangeCmdArgs)), None) CompilerOption - ("tokenize", tagNone, - OptionUnit (fun () -> tcConfigB.tokenizeOnly <- true), + ("tokenize", tagNone, + OptionUnit (fun () -> tcConfigB.tokenizeOnly <- true), Some(InternalCommandLineOption("--tokenize", rangeCmdArgs)), None) CompilerOption - ("testInteractionParser", tagNone, - OptionUnit (fun () -> tcConfigB.testInteractionParser <- true), + ("testInteractionParser", tagNone, + OptionUnit (fun () -> tcConfigB.testInteractionParser <- true), Some(InternalCommandLineOption("--testInteractionParser", rangeCmdArgs)), None) CompilerOption - ("testparsererrorrecovery", tagNone, - OptionUnit (fun () -> tcConfigB.reportNumDecls <- true), + ("testparsererrorrecovery", tagNone, + OptionUnit (fun () -> tcConfigB.reportNumDecls <- true), Some(InternalCommandLineOption("--testparsererrorrecovery", rangeCmdArgs)), None) CompilerOption - ("inlinethreshold", tagInt, - OptionInt (fun n -> tcConfigB.optSettings <- { tcConfigB.optSettings with lambdaInlineThreshold = n }), + ("inlinethreshold", tagInt, + OptionInt (fun n -> tcConfigB.optSettings <- { tcConfigB.optSettings with lambdaInlineThreshold = n }), Some(InternalCommandLineOption("--inlinethreshold", rangeCmdArgs)), None) CompilerOption - ("extraoptimizationloops", tagNone, - OptionInt (fun n -> tcConfigB.extraOptimizationIterations <- n), + ("extraoptimizationloops", tagNone, + OptionInt (fun n -> tcConfigB.extraOptimizationIterations <- n), Some(InternalCommandLineOption("--extraoptimizationloops", rangeCmdArgs)), None) CompilerOption - ("abortonerror", tagNone, - OptionUnit (fun () -> tcConfigB.abortOnError <- true), + ("abortonerror", tagNone, + OptionUnit (fun () -> tcConfigB.abortOnError <- true), Some(InternalCommandLineOption("--abortonerror", rangeCmdArgs)), None) CompilerOption - ("implicitresolution", tagNone, - OptionUnit (fun _ -> tcConfigB.implicitlyResolveAssemblies <- true), + ("implicitresolution", tagNone, + OptionUnit (fun _ -> tcConfigB.implicitlyResolveAssemblies <- true), Some(InternalCommandLineOption("--implicitresolution", rangeCmdArgs)), None) // "Display assembly reference resolution information") CompilerOption - ("resolutions", tagNone, - OptionUnit (fun () -> tcConfigB.showReferenceResolutions <- true), + ("resolutions", tagNone, + OptionUnit (fun () -> tcConfigB.showReferenceResolutions <- true), Some(InternalCommandLineOption("", rangeCmdArgs)), None) // "The base registry key to use for assembly resolution. This part in brackets here: HKEY_LOCAL_MACHINE\[SOFTWARE\Microsoft\.NETFramework]\v2.0.50727\AssemblyFoldersEx") CompilerOption - ("resolutionframeworkregistrybase", tagString, - OptionString (fun _ -> ()), + ("resolutionframeworkregistrybase", tagString, + OptionString (fun _ -> ()), Some(InternalCommandLineOption("", rangeCmdArgs)), None) // "The base registry key to use for assembly resolution. This part in brackets here: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727\[AssemblyFoldersEx]") CompilerOption - ("resolutionassemblyfoldersuffix", tagString, - OptionString (fun _ -> ()), + ("resolutionassemblyfoldersuffix", tagString, + OptionString (fun _ -> ()), Some(InternalCommandLineOption("resolutionassemblyfoldersuffix", rangeCmdArgs)), None) - // "Additional reference resolution conditions. For example \"OSVersion=5.1.2600.0,PlatformID=id") + // "Additional reference resolution conditions. For example \"OSVersion=5.1.2600.0, PlatformID=id") CompilerOption - ("resolutionassemblyfoldersconditions", tagString, - OptionString (fun _ -> ()), + ("resolutionassemblyfoldersconditions", tagString, + OptionString (fun _ -> ()), Some(InternalCommandLineOption("resolutionassemblyfoldersconditions", rangeCmdArgs)), None) // "Resolve assembly references using MSBuild resolution rules rather than directory based (Default=true except when running fsc.exe under mono)") CompilerOption - ("msbuildresolution", tagNone, - OptionUnit (fun () -> tcConfigB.useSimpleResolution<-false), + ("msbuildresolution", tagNone, + OptionUnit (fun () -> tcConfigB.useSimpleResolution<-false), Some(InternalCommandLineOption("msbuildresolution", rangeCmdArgs)), None) CompilerOption - ("alwayscallvirt",tagNone, + ("alwayscallvirt", tagNone, OptionSwitch(callVirtSwitch tcConfigB), - Some(InternalCommandLineOption("alwayscallvirt",rangeCmdArgs)), None) + Some(InternalCommandLineOption("alwayscallvirt", rangeCmdArgs)), None) CompilerOption - ("nodebugdata",tagNone, + ("nodebugdata", tagNone, OptionUnit (fun () -> tcConfigB.noDebugData<-true), - Some(InternalCommandLineOption("--nodebugdata",rangeCmdArgs)), None) + Some(InternalCommandLineOption("--nodebugdata", rangeCmdArgs)), None) testFlag tcConfigB ] @ editorSpecificFlags tcConfigB @ [ CompilerOption - ("jit", tagNone, - OptionSwitch (jitoptimizeSwitch tcConfigB), + ("jit", tagNone, + OptionSwitch (jitoptimizeSwitch tcConfigB), Some(InternalCommandLineOption("jit", rangeCmdArgs)), None) CompilerOption - ("localoptimize", tagNone, + ("localoptimize", tagNone, OptionSwitch(localoptimizeSwitch tcConfigB), Some(InternalCommandLineOption("localoptimize", rangeCmdArgs)), None) CompilerOption - ("splitting", tagNone, + ("splitting", tagNone, OptionSwitch(splittingSwitch tcConfigB), Some(InternalCommandLineOption("splitting", rangeCmdArgs)), None) CompilerOption - ("versionfile", tagString, - OptionString (fun s -> tcConfigB.version <- VersionFile s), + ("versionfile", tagString, + OptionString (fun s -> tcConfigB.version <- VersionFile s), Some(InternalCommandLineOption("versionfile", rangeCmdArgs)), None) // "Display timing profiles for compilation" CompilerOption - ("times" , tagNone, - OptionUnit (fun () -> tcConfigB.showTimes <- true), + ("times", tagNone, + OptionUnit (fun () -> tcConfigB.showTimes <- true), Some(InternalCommandLineOption("times", rangeCmdArgs)), None) #if !NO_EXTENSIONTYPING // "Display information about extension type resolution") CompilerOption - ("showextensionresolution" , tagNone, - OptionUnit (fun () -> tcConfigB.showExtensionTypeMessages <- true), + ("showextensionresolution", tagNone, + OptionUnit (fun () -> tcConfigB.showExtensionTypeMessages <- true), Some(InternalCommandLineOption("showextensionresolution", rangeCmdArgs)), None) #endif CompilerOption - ("metadataversion", tagString, - OptionString (fun s -> tcConfigB.metadataVersion <- Some(s)), + ("metadataversion", tagString, + OptionString (fun s -> tcConfigB.metadataVersion <- Some(s)), Some(InternalCommandLineOption("metadataversion", rangeCmdArgs)), None) ] @@ -1219,61 +1212,61 @@ let internalFlags (tcConfigB:TcConfigBuilder) = // OptionBlock: Deprecated flags (fsc, service only) //-------------------------------------------------- -let compilingFsLibFlag (tcConfigB : TcConfigBuilder) = +let compilingFsLibFlag (tcConfigB: TcConfigBuilder) = CompilerOption - ("compiling-fslib", tagNone, + ("compiling-fslib", tagNone, OptionUnit (fun () -> tcConfigB.compilingFslib <- true - tcConfigB.TurnWarningOff(rangeStartup,"42") + tcConfigB.TurnWarningOff(rangeStartup, "42") ErrorLogger.reportLibraryOnlyFeatures <- false - IlxSettings.ilxCompilingFSharpCoreLib := true), + IlxSettings.ilxCompilingFSharpCoreLib := true), Some(InternalCommandLineOption("--compiling-fslib", rangeCmdArgs)), None) -let compilingFsLib20Flag (tcConfigB : TcConfigBuilder) = +let compilingFsLib20Flag (tcConfigB: TcConfigBuilder) = CompilerOption - ("compiling-fslib-20", tagNone, - OptionString (fun s -> tcConfigB.compilingFslib20 <- Some s ), + ("compiling-fslib-20", tagNone, + OptionString (fun s -> tcConfigB.compilingFslib20 <- Some s ), Some(InternalCommandLineOption("--compiling-fslib-20", rangeCmdArgs)), None) -let compilingFsLib40Flag (tcConfigB : TcConfigBuilder) = +let compilingFsLib40Flag (tcConfigB: TcConfigBuilder) = CompilerOption - ("compiling-fslib-40", tagNone, - OptionUnit (fun () -> tcConfigB.compilingFslib40 <- true ), + ("compiling-fslib-40", tagNone, + OptionUnit (fun () -> tcConfigB.compilingFslib40 <- true ), Some(InternalCommandLineOption("--compiling-fslib-40", rangeCmdArgs)), None) -let compilingFsLibNoBigIntFlag (tcConfigB : TcConfigBuilder) = +let compilingFsLibNoBigIntFlag (tcConfigB: TcConfigBuilder) = CompilerOption - ("compiling-fslib-nobigint", tagNone, - OptionUnit (fun () -> tcConfigB.compilingFslibNoBigInt <- true ), + ("compiling-fslib-nobigint", tagNone, + OptionUnit (fun () -> tcConfigB.compilingFslibNoBigInt <- true ), Some(InternalCommandLineOption("--compiling-fslib-nobigint", rangeCmdArgs)), None) let mlKeywordsFlag = CompilerOption - ("ml-keywords", tagNone, - OptionUnit (fun () -> ()), + ("ml-keywords", tagNone, + OptionUnit (fun () -> ()), Some(DeprecatedCommandLineOptionNoDescription("--ml-keywords", rangeCmdArgs)), None) let gnuStyleErrorsFlag tcConfigB = CompilerOption - ("gnu-style-errors", tagNone, - OptionUnit (fun () -> tcConfigB.errorStyle <- ErrorStyle.EmacsErrors), + ("gnu-style-errors", tagNone, + OptionUnit (fun () -> tcConfigB.errorStyle <- ErrorStyle.EmacsErrors), Some(DeprecatedCommandLineOptionNoDescription("--gnu-style-errors", rangeCmdArgs)), None) let deprecatedFlagsBoth tcConfigB = [ CompilerOption - ("light", tagNone, - OptionUnit (fun () -> tcConfigB.light <- Some(true)), + ("light", tagNone, + OptionUnit (fun () -> tcConfigB.light <- Some(true)), Some(DeprecatedCommandLineOptionNoDescription("--light", rangeCmdArgs)), None) CompilerOption - ("indentation-syntax", tagNone, - OptionUnit (fun () -> tcConfigB.light <- Some(true)), + ("indentation-syntax", tagNone, + OptionUnit (fun () -> tcConfigB.light <- Some(true)), Some(DeprecatedCommandLineOptionNoDescription("--indentation-syntax", rangeCmdArgs)), None) CompilerOption - ("no-indentation-syntax", tagNone, - OptionUnit (fun () -> tcConfigB.light <- Some(false)), + ("no-indentation-syntax", tagNone, + OptionUnit (fun () -> tcConfigB.light <- Some(false)), Some(DeprecatedCommandLineOptionNoDescription("--no-indentation-syntax", rangeCmdArgs)), None) ] @@ -1284,28 +1277,28 @@ let deprecatedFlagsFsc tcConfigB = [ cliRootFlag tcConfigB CompilerOption - ("jit-optimize", tagNone, - OptionUnit (fun _ -> tcConfigB.optSettings <- { tcConfigB.optSettings with jitOptUser = Some true }), + ("jit-optimize", tagNone, + OptionUnit (fun _ -> tcConfigB.optSettings <- { tcConfigB.optSettings with jitOptUser = Some true }), Some(DeprecatedCommandLineOptionNoDescription("--jit-optimize", rangeCmdArgs)), None) CompilerOption - ("no-jit-optimize", tagNone, - OptionUnit (fun _ -> tcConfigB.optSettings <- { tcConfigB.optSettings with jitOptUser = Some false }), + ("no-jit-optimize", tagNone, + OptionUnit (fun _ -> tcConfigB.optSettings <- { tcConfigB.optSettings with jitOptUser = Some false }), Some(DeprecatedCommandLineOptionNoDescription("--no-jit-optimize", rangeCmdArgs)), None) CompilerOption - ("jit-tracking", tagNone, - OptionUnit (fun _ -> (tcConfigB.jitTracking <- true) ), + ("jit-tracking", tagNone, + OptionUnit (fun _ -> (tcConfigB.jitTracking <- true) ), Some(DeprecatedCommandLineOptionNoDescription("--jit-tracking", rangeCmdArgs)), None) CompilerOption - ("no-jit-tracking", tagNone, - OptionUnit (fun _ -> (tcConfigB.jitTracking <- false) ), + ("no-jit-tracking", tagNone, + OptionUnit (fun _ -> (tcConfigB.jitTracking <- false) ), Some(DeprecatedCommandLineOptionNoDescription("--no-jit-tracking", rangeCmdArgs)), None) CompilerOption - ("progress", tagNone, - OptionUnit (fun () -> progress := true), + ("progress", tagNone, + OptionUnit (fun () -> progress := true), Some(DeprecatedCommandLineOptionNoDescription("--progress", rangeCmdArgs)), None) compilingFsLibFlag tcConfigB @@ -1314,68 +1307,68 @@ let deprecatedFlagsFsc tcConfigB = compilingFsLibNoBigIntFlag tcConfigB CompilerOption - ("version", tagString, - OptionString (fun s -> tcConfigB.version <- VersionString s), + ("version", tagString, + OptionString (fun s -> tcConfigB.version <- VersionString s), Some(DeprecatedCommandLineOptionNoDescription("--version", rangeCmdArgs)), None) CompilerOption - ("local-optimize", tagNone, - OptionUnit (fun _ -> tcConfigB.optSettings <- { tcConfigB.optSettings with localOptUser = Some true }), + ("local-optimize", tagNone, + OptionUnit (fun _ -> tcConfigB.optSettings <- { tcConfigB.optSettings with localOptUser = Some true }), Some(DeprecatedCommandLineOptionNoDescription("--local-optimize", rangeCmdArgs)), None) CompilerOption - ("no-local-optimize", tagNone, - OptionUnit (fun _ -> tcConfigB.optSettings <- { tcConfigB.optSettings with localOptUser = Some false }), + ("no-local-optimize", tagNone, + OptionUnit (fun _ -> tcConfigB.optSettings <- { tcConfigB.optSettings with localOptUser = Some false }), Some(DeprecatedCommandLineOptionNoDescription("--no-local-optimize", rangeCmdArgs)), None) CompilerOption - ("cross-optimize", tagNone, - OptionUnit (fun _ -> tcConfigB.optSettings <- { tcConfigB.optSettings with crossModuleOptUser = Some true }), + ("cross-optimize", tagNone, + OptionUnit (fun _ -> tcConfigB.optSettings <- { tcConfigB.optSettings with crossModuleOptUser = Some true }), Some(DeprecatedCommandLineOptionNoDescription("--cross-optimize", rangeCmdArgs)), None) CompilerOption - ("no-cross-optimize", tagNone, - OptionUnit (fun _ -> tcConfigB.optSettings <- { tcConfigB.optSettings with crossModuleOptUser = Some false }), + ("no-cross-optimize", tagNone, + OptionUnit (fun _ -> tcConfigB.optSettings <- { tcConfigB.optSettings with crossModuleOptUser = Some false }), Some(DeprecatedCommandLineOptionNoDescription("--no-cross-optimize", rangeCmdArgs)), None) CompilerOption - ("no-string-interning", tagNone, - OptionUnit (fun () -> tcConfigB.internConstantStrings <- false), + ("no-string-interning", tagNone, + OptionUnit (fun () -> tcConfigB.internConstantStrings <- false), Some(DeprecatedCommandLineOptionNoDescription("--no-string-interning", rangeCmdArgs)), None) CompilerOption - ("statistics", tagNone, - OptionUnit (fun () -> tcConfigB.stats <- true), + ("statistics", tagNone, + OptionUnit (fun () -> tcConfigB.stats <- true), Some(DeprecatedCommandLineOptionNoDescription("--statistics", rangeCmdArgs)), None) CompilerOption - ("generate-filter-blocks", tagNone, - OptionUnit (fun () -> tcConfigB.generateFilterBlocks <- true), + ("generate-filter-blocks", tagNone, + OptionUnit (fun () -> tcConfigB.generateFilterBlocks <- true), Some(DeprecatedCommandLineOptionNoDescription("--generate-filter-blocks", rangeCmdArgs)), None) //CompilerOption - // ("no-generate-filter-blocks", tagNone, - // OptionUnit (fun () -> tcConfigB.generateFilterBlocks <- false), + // ("no-generate-filter-blocks", tagNone, + // OptionUnit (fun () -> tcConfigB.generateFilterBlocks <- false), // Some(DeprecatedCommandLineOptionNoDescription("--generate-filter-blocks", rangeCmdArgs)), None) CompilerOption - ("max-errors", tagInt, - OptionInt (fun n -> tcConfigB.maxErrors <- n), - Some(DeprecatedCommandLineOptionSuggestAlternative("--max-errors", "--maxerrors", rangeCmdArgs)),None) + ("max-errors", tagInt, + OptionInt (fun n -> tcConfigB.maxErrors <- n), + Some(DeprecatedCommandLineOptionSuggestAlternative("--max-errors", "--maxerrors", rangeCmdArgs)), None) CompilerOption - ("debug-file", tagNone, - OptionString (fun s -> tcConfigB.debugSymbolFile <- Some s), + ("debug-file", tagNone, + OptionString (fun s -> tcConfigB.debugSymbolFile <- Some s), Some(DeprecatedCommandLineOptionSuggestAlternative("--debug-file", "--pdb", rangeCmdArgs)), None) CompilerOption - ("no-debug-file", tagNone, - OptionUnit (fun () -> tcConfigB.debuginfo <- false), + ("no-debug-file", tagNone, + OptionUnit (fun () -> tcConfigB.debuginfo <- false), Some(DeprecatedCommandLineOptionSuggestAlternative("--no-debug-file", "--debug-", rangeCmdArgs)), None) CompilerOption - ("Ooff", tagNone, - OptionUnit (fun () -> SetOptimizeOff(tcConfigB)), + ("Ooff", tagNone, + OptionUnit (fun () -> SetOptimizeOff(tcConfigB)), Some(DeprecatedCommandLineOptionSuggestAlternative("-Ooff", "--optimize-", rangeCmdArgs)), None) mlKeywordsFlag @@ -1419,7 +1412,7 @@ let miscFlagsFsi tcConfigB = miscFlagsBoth tcConfigB let abbreviatedFlagsBoth tcConfigB = [ CompilerOption("d", tagString, OptionString (defineSymbol tcConfigB), None, Some(FSComp.SR.optsShortFormOf("--define"))) - CompilerOption("O", tagNone, OptionSwitch (SetOptimizeSwitch tcConfigB) , None, Some(FSComp.SR.optsShortFormOf("--optimize[+|-]"))) + CompilerOption("O", tagNone, OptionSwitch (SetOptimizeSwitch tcConfigB), None, Some(FSComp.SR.optsShortFormOf("--optimize[+|-]"))) CompilerOption("g", tagNone, OptionSwitch (SetDebugSwitch tcConfigB None), None, Some(FSComp.SR.optsShortFormOf("--debug"))) CompilerOption("i", tagString, OptionUnit (fun () -> tcConfigB.printSignature <- true), None, Some(FSComp.SR.optsShortFormOf("--sig"))) referenceFlagAbbrev tcConfigB (* -r *) @@ -1432,48 +1425,48 @@ let abbreviatedFlagsFsc tcConfigB = abbreviatedFlagsBoth tcConfigB @ [ // FSC only abbreviated options CompilerOption - ("o", tagString, - OptionString (setOutFileName tcConfigB), None, + ("o", tagString, + OptionString (setOutFileName tcConfigB), None, Some(FSComp.SR.optsShortFormOf("--out"))) CompilerOption - ("a", tagString, - OptionUnit (fun () -> tcConfigB.target <- CompilerTarget.Dll), None, + ("a", tagString, + OptionUnit (fun () -> tcConfigB.target <- CompilerTarget.Dll), None, Some(FSComp.SR.optsShortFormOf("--target library"))) // FSC help abbreviations. FSI has it's own help options... CompilerOption - ("?" , tagNone, - OptionHelp (fun blocks -> displayHelpFsc tcConfigB blocks), None, + ("?", tagNone, + OptionHelp (fun blocks -> displayHelpFsc tcConfigB blocks), None, Some(FSComp.SR.optsShortFormOf("--help"))) CompilerOption - ("help" , tagNone, - OptionHelp (fun blocks -> displayHelpFsc tcConfigB blocks), None, + ("help", tagNone, + OptionHelp (fun blocks -> displayHelpFsc tcConfigB blocks), None, Some(FSComp.SR.optsShortFormOf("--help"))) CompilerOption - ("full-help", tagNone, - OptionHelp (fun blocks -> displayHelpFsc tcConfigB blocks), None, + ("full-help", tagNone, + OptionHelp (fun blocks -> displayHelpFsc tcConfigB blocks), None, Some(FSComp.SR.optsShortFormOf("--help"))) ] let GetAbbrevFlagSet tcConfigB isFsc = - let mutable argList : string list = [] + let mutable argList: string list = [] for c in ((if isFsc then abbreviatedFlagsFsc else abbreviatedFlagsFsi) tcConfigB) do match c with - | CompilerOption(arg,_,OptionString _,_,_) - | CompilerOption(arg,_,OptionStringList _,_,_) -> argList <- argList @ ["-"+arg;"/"+arg] + | CompilerOption(arg, _, OptionString _, _, _) + | CompilerOption(arg, _, OptionStringList _, _, _) -> argList <- argList @ ["-"+arg;"/"+arg] | _ -> () Set.ofList argList // check for abbreviated options that accept spaces instead of colons, and replace the spaces // with colons when necessary -let PostProcessCompilerArgs (abbrevArgs : string Set) (args : string []) = +let PostProcessCompilerArgs (abbrevArgs: string Set) (args: string []) = let mutable i = 0 let mutable idx = 0 let len = args.Length - let mutable arga : string[] = Array.create len "" + let mutable arga: string[] = Array.create len "" while i < len do if not(abbrevArgs.Contains(args.[i])) || i = (len - 1) then @@ -1491,8 +1484,8 @@ let PostProcessCompilerArgs (abbrevArgs : string Set) (args : string []) = let testingAndQAFlags _tcConfigB = [ CompilerOption - ("dumpAllCommandLineOptions", tagNone, - OptionHelp(fun blocks -> DumpCompilerOptionBlocks blocks), + ("dumpAllCommandLineOptions", tagNone, + OptionHelp(fun blocks -> DumpCompilerOptionBlocks blocks), None, None) // "Command line options") ] @@ -1531,13 +1524,13 @@ let testingAndQAFlags _tcConfigB = /// The core/common options used by fsc.exe. [not currently extended by fsc.fs]. let GetCoreFscCompilerOptions (tcConfigB: TcConfigBuilder) = - [ PublicOptions(FSComp.SR.optsHelpBannerOutputFiles(), outputFileFlagsFsc tcConfigB) - PublicOptions(FSComp.SR.optsHelpBannerInputFiles(), inputFileFlagsFsc tcConfigB) - PublicOptions(FSComp.SR.optsHelpBannerResources(), resourcesFlagsFsc tcConfigB) - PublicOptions(FSComp.SR.optsHelpBannerCodeGen(), codeGenerationFlags false tcConfigB) + [ PublicOptions(FSComp.SR.optsHelpBannerOutputFiles(), outputFileFlagsFsc tcConfigB) + PublicOptions(FSComp.SR.optsHelpBannerInputFiles(), inputFileFlagsFsc tcConfigB) + PublicOptions(FSComp.SR.optsHelpBannerResources(), resourcesFlagsFsc tcConfigB) + PublicOptions(FSComp.SR.optsHelpBannerCodeGen(), codeGenerationFlags false tcConfigB) PublicOptions(FSComp.SR.optsHelpBannerErrsAndWarns(), errorsAndWarningsFlags tcConfigB) - PublicOptions(FSComp.SR.optsHelpBannerLanguage(), languageFlags tcConfigB) - PublicOptions(FSComp.SR.optsHelpBannerMisc(), miscFlagsFsc tcConfigB) + PublicOptions(FSComp.SR.optsHelpBannerLanguage(), languageFlags tcConfigB) + PublicOptions(FSComp.SR.optsHelpBannerMisc(), miscFlagsFsc tcConfigB) PublicOptions(FSComp.SR.optsHelpBannerAdvanced(), advancedFlagsFsc tcConfigB) PrivateOptions(List.concat [ internalFlags tcConfigB abbreviatedFlagsFsc tcConfigB @@ -1548,20 +1541,20 @@ let GetCoreFscCompilerOptions (tcConfigB: TcConfigBuilder) = /// The core/common options used by the F# VS Language Service. /// Filter out OptionHelp which does printing then exit. This is not wanted in the context of VS!! let GetCoreServiceCompilerOptions (tcConfigB:TcConfigBuilder) = - let isHelpOption = function CompilerOption(_,_,OptionHelp _,_,_) -> true | _ -> false + let isHelpOption = function CompilerOption(_, _, OptionHelp _, _, _) -> true | _ -> false List.map (FilterCompilerOptionBlock (isHelpOption >> not)) (GetCoreFscCompilerOptions tcConfigB) /// The core/common options used by fsi.exe. [note, some additional options are added in fsi.fs]. let GetCoreFsiCompilerOptions (tcConfigB: TcConfigBuilder) = - [ PublicOptions(FSComp.SR.optsHelpBannerOutputFiles() , outputFileFlagsFsi tcConfigB) - PublicOptions(FSComp.SR.optsHelpBannerInputFiles() , inputFileFlagsFsi tcConfigB) - PublicOptions(FSComp.SR.optsHelpBannerResources() , resourcesFlagsFsi tcConfigB) - PublicOptions(FSComp.SR.optsHelpBannerCodeGen() , codeGenerationFlags true tcConfigB) - PublicOptions(FSComp.SR.optsHelpBannerErrsAndWarns() , errorsAndWarningsFlags tcConfigB) - PublicOptions(FSComp.SR.optsHelpBannerLanguage() , languageFlags tcConfigB) + [ PublicOptions(FSComp.SR.optsHelpBannerOutputFiles(), outputFileFlagsFsi tcConfigB) + PublicOptions(FSComp.SR.optsHelpBannerInputFiles(), inputFileFlagsFsi tcConfigB) + PublicOptions(FSComp.SR.optsHelpBannerResources(), resourcesFlagsFsi tcConfigB) + PublicOptions(FSComp.SR.optsHelpBannerCodeGen(), codeGenerationFlags true tcConfigB) + PublicOptions(FSComp.SR.optsHelpBannerErrsAndWarns(), errorsAndWarningsFlags tcConfigB) + PublicOptions(FSComp.SR.optsHelpBannerLanguage(), languageFlags tcConfigB) // Note: no HTML block for fsi.exe - PublicOptions(FSComp.SR.optsHelpBannerMisc() , miscFlagsFsi tcConfigB) - PublicOptions(FSComp.SR.optsHelpBannerAdvanced() , advancedFlagsFsi tcConfigB) + PublicOptions(FSComp.SR.optsHelpBannerMisc(), miscFlagsFsi tcConfigB) + PublicOptions(FSComp.SR.optsHelpBannerAdvanced(), advancedFlagsFsi tcConfigB) PrivateOptions(List.concat [ internalFlags tcConfigB abbreviatedFlagsFsi tcConfigB deprecatedFlagsFsi tcConfigB @@ -1655,7 +1648,7 @@ let ReportTime (tcConfig:TcConfig) descr = let wsNow = ptime.WorkingSet64/1000000L match !tPrev, !nPrev with - | Some (timePrev,gcPrev:int []),Some prevDescr -> + | Some (timePrev, gcPrev:int []), Some prevDescr -> let spanGC = [| for i in 0 .. maxGen -> System.GC.CollectionCount(i) - gcPrev.[i] |] dprintf "TIME: %4.1f Delta: %4.1f Mem: %3d" timeNow (timeNow - timePrev) @@ -1665,7 +1658,7 @@ let ReportTime (tcConfig:TcConfig) descr = prevDescr | _ -> () - tPrev := Some (timeNow,gcNow) + tPrev := Some (timeNow, gcNow) nPrev := Some descr @@ -1720,17 +1713,17 @@ let ApplyAllOptimizations (tcConfig:TcConfig, tcGlobals, tcVal, outfile:string, let optSettings = { optSettings with abstractBigTargets = tcConfig.doTLR } let optSettings = { optSettings with reportingPhase = true } - let results,(optEnvFirstLoop,_,_,_) = - ((optEnv0,optEnv0,optEnv0,SignatureHidingInfo.Empty),implFiles) + let results, (optEnvFirstLoop, _, _, _) = + ((optEnv0, optEnv0, optEnv0, SignatureHidingInfo.Empty), implFiles) - ||> List.mapFold (fun (optEnvFirstLoop,optEnvExtraLoop,optEnvFinalSimplify,hidden) implFile -> + ||> List.mapFold (fun (optEnvFirstLoop, optEnvExtraLoop, optEnvFinalSimplify, hidden) implFile -> //ReportTime tcConfig ("Initial simplify") - let (optEnvFirstLoop,implFile,implFileOptData,hidden), optimizeDuringCodeGen = + let (optEnvFirstLoop, implFile, implFileOptData, hidden), optimizeDuringCodeGen = Optimizer.OptimizeImplFile - (optSettings,ccu,tcGlobals,tcVal,importMap, - optEnvFirstLoop,isIncrementalFragment, - tcConfig.emitTailcalls,hidden,implFile) + (optSettings, ccu, tcGlobals, tcVal, importMap, + optEnvFirstLoop, isIncrementalFragment, + tcConfig.emitTailcalls, hidden, implFile) let implFile = AutoBox.TransformImplFile tcGlobals importMap implFile @@ -1741,20 +1734,20 @@ let ApplyAllOptimizations (tcConfig:TcConfig, tcGlobals, tcVal, outfile:string, dprintf "Optimization implFileOptData:\n%s\n" (Layout.showL (Layout.squashTo 192 (Optimizer.moduleInfoL tcGlobals implFileOptData))) #endif - let implFile,optEnvExtraLoop = + let implFile, optEnvExtraLoop = if tcConfig.extraOptimizationIterations > 0 then //ReportTime tcConfig ("Extra simplification loop") - let (optEnvExtraLoop,implFile, _, _), _ = + let (optEnvExtraLoop, implFile, _, _), _ = Optimizer.OptimizeImplFile - (optSettings,ccu,tcGlobals,tcVal, importMap, - optEnvExtraLoop,isIncrementalFragment, - tcConfig.emitTailcalls,hidden,implFile) + (optSettings, ccu, tcGlobals, tcVal, importMap, + optEnvExtraLoop, isIncrementalFragment, + tcConfig.emitTailcalls, hidden, implFile) //PrintWholeAssemblyImplementation tcConfig outfile (sprintf "extra-loop-%d" n) implFile - implFile,optEnvExtraLoop + implFile, optEnvExtraLoop else - implFile,optEnvExtraLoop + implFile, optEnvExtraLoop let implFile = if tcConfig.doDetuple then @@ -1772,23 +1765,23 @@ let ApplyAllOptimizations (tcConfig:TcConfig, tcGlobals, tcVal, outfile:string, let implFile = LowerCallsAndSeqs.LowerImplFile tcGlobals implFile - let implFile,optEnvFinalSimplify = + let implFile, optEnvFinalSimplify = if tcConfig.doFinalSimplify then //ReportTime tcConfig ("Final simplify pass") - let (optEnvFinalSimplify,implFile, _, _),_ = + let (optEnvFinalSimplify, implFile, _, _), _ = Optimizer.OptimizeImplFile - (optSettings,ccu,tcGlobals,tcVal, importMap,optEnvFinalSimplify, - isIncrementalFragment,tcConfig.emitTailcalls,hidden,implFile) + (optSettings, ccu, tcGlobals, tcVal, importMap, optEnvFinalSimplify, + isIncrementalFragment, tcConfig.emitTailcalls, hidden, implFile) //PrintWholeAssemblyImplementation tcConfig outfile "post-rec-opt" implFile - implFile,optEnvFinalSimplify + implFile, optEnvFinalSimplify else - implFile,optEnvFinalSimplify + implFile, optEnvFinalSimplify - ((implFile,optimizeDuringCodeGen),implFileOptData),(optEnvFirstLoop,optEnvExtraLoop,optEnvFinalSimplify,hidden)) + ((implFile, optimizeDuringCodeGen), implFileOptData), (optEnvFirstLoop, optEnvExtraLoop, optEnvFinalSimplify, hidden)) - let implFiles,implFileOptDatas = List.unzip results + let implFiles, implFileOptDatas = List.unzip results let assemblyOptData = Optimizer.UnionOptimizationInfos implFileOptDatas let tassembly = TypedAssemblyAfterOptimization(implFiles) #if !FABLE_COMPILER @@ -1803,15 +1796,15 @@ let ApplyAllOptimizations (tcConfig:TcConfig, tcGlobals, tcVal, outfile:string, // ILX generation //---------------------------------------------------------------------------- -let CreateIlxAssemblyGenerator (_tcConfig:TcConfig,tcImports:TcImports,tcGlobals, tcVal, generatedCcu) = +let CreateIlxAssemblyGenerator (_tcConfig:TcConfig, tcImports:TcImports, tcGlobals, tcVal, generatedCcu) = let ilxGenerator = new IlxGen.IlxAssemblyGenerator (tcImports.GetImportMap(), tcGlobals, tcVal, generatedCcu) let ccus = tcImports.GetCcusInDeclOrder() ilxGenerator.AddExternalCcus ccus ilxGenerator let GenerateIlxCode - (ilxBackend, isInteractiveItExpr, isInteractiveOnMono, - tcConfig:TcConfig, topAttrs: TypeChecker.TopAttribs, optimizedImpls, + (ilxBackend, isInteractiveItExpr, isInteractiveOnMono, + tcConfig:TcConfig, topAttrs: TypeChecker.TopAttribs, optimizedImpls, fragName, ilxGenerator: IlxAssemblyGenerator) = let mainMethodInfo = @@ -1819,7 +1812,7 @@ let GenerateIlxCode None else Some topAttrs.mainMethodAttrs - let ilxGenOpts : IlxGenOptions = + let ilxGenOpts: IlxGenOptions = { generateFilterBlocks = tcConfig.generateFilterBlocks emitConstantArraysUsingStaticDataBlobs = not isInteractiveOnMono workAroundReflectionEmitBugs=tcConfig.isInteractive // REVIEW: is this still required? @@ -1833,7 +1826,7 @@ let GenerateIlxCode isInteractiveItExpr = isInteractiveItExpr alwaysCallVirt = tcConfig.alwaysCallVirt } - ilxGenerator.GenerateCode (ilxGenOpts, optimizedImpls, topAttrs.assemblyAttrs,topAttrs.netModuleAttrs) + ilxGenerator.GenerateCode (ilxGenOpts, optimizedImpls, topAttrs.assemblyAttrs, topAttrs.netModuleAttrs) //---------------------------------------------------------------------------- // Assembly ref normalization: make sure all assemblies are referred to @@ -1860,7 +1853,7 @@ let foreBackColor () = try let c = Console.ForegroundColor // may fail, perhaps on Mac, and maybe ForegroundColor is Black let b = Console.BackgroundColor // may fail, perhaps on Mac, and maybe BackgroundColor is White - Some (c,b) + Some (c, b) with e -> None @@ -1870,7 +1863,7 @@ let DoWithColor newColor f = | true, None -> // could not get console colours, so no attempt to change colours, can not set them back f() - | true, Some (c,_) -> + | true, Some (c, _) -> try ignoreFailureOnMono1_1_16 (fun () -> Console.ForegroundColor <- newColor) f() diff --git a/src/fcs-fable/src/fsharp/ConstraintSolver.fs b/src/fcs-fable/src/fsharp/ConstraintSolver.fs index ab111ebd9c..c274939156 100755 --- a/src/fcs-fable/src/fsharp/ConstraintSolver.fs +++ b/src/fcs-fable/src/fsharp/ConstraintSolver.fs @@ -98,7 +98,7 @@ let NewInferenceTypes l = l |> List.map (fun _ -> NewInferenceType ()) // condition anyway, so we could get away with a non-rigid typar. This // would sort of be cleaner, though give errors later. let FreshenAndFixupTypars m rigid fctps tinst tpsorig = - let copy_tyvar (tp:Typar) = NewCompGenTypar (tp.Kind, rigid, tp.StaticReq, (if rigid=TyparRigidity.Rigid then TyparDynamicReq.Yes else TyparDynamicReq.No), false) + let copy_tyvar (tp: Typar) = NewCompGenTypar (tp.Kind, rigid, tp.StaticReq, (if rigid=TyparRigidity.Rigid then TyparDynamicReq.Yes else TyparDynamicReq.No), false) let tps = tpsorig |> List.map copy_tyvar let renaming, tinst = FixupNewTypars m fctps tinst tpsorig tps tps, renaming, tinst @@ -113,7 +113,7 @@ let FreshenTypars m tpsorig = let _, _, tptys = FreshenTypeInst m tpsorig tptys -let FreshenMethInfo m (minfo:MethInfo) = +let FreshenMethInfo m (minfo: MethInfo) = let _, _, tptys = FreshMethInst m (minfo.GetFormalTyparsOfDeclaringType m) minfo.DeclaringTypeInst minfo.FormalMethodTypars tptys @@ -311,14 +311,14 @@ type TraitConstraintSolution = let BakedInTraitConstraintNames = [ "op_Division" ; "op_Multiply"; "op_Addition" "op_Equality" ; "op_Inequality"; "op_GreaterThan" ; "op_LessThan"; "op_LessThanOrEqual"; "op_GreaterThanOrEqual" - "op_Subtraction"; "op_Modulus"; - "get_Zero"; "get_One"; - "DivideByInt";"get_Item"; "set_Item"; - "op_BitwiseAnd"; "op_BitwiseOr"; "op_ExclusiveOr"; "op_LeftShift"; + "op_Subtraction"; "op_Modulus" + "get_Zero"; "get_One" + "DivideByInt";"get_Item"; "set_Item" + "op_BitwiseAnd"; "op_BitwiseOr"; "op_ExclusiveOr"; "op_LeftShift" "op_RightShift"; "op_UnaryPlus"; "op_UnaryNegation"; "get_Sign"; "op_LogicalNot" - "op_OnesComplement"; "Abs"; "Sqrt"; "Sin"; "Cos"; "Tan"; - "Sinh"; "Cosh"; "Tanh"; "Atan"; "Acos"; "Asin"; "Exp"; "Ceiling"; "Floor"; "Round"; "Log10"; "Log"; "Sqrt"; - "Truncate"; "op_Explicit"; + "op_OnesComplement"; "Abs"; "Sqrt"; "Sin"; "Cos"; "Tan" + "Sinh"; "Cosh"; "Tanh"; "Atan"; "Acos"; "Asin"; "Exp"; "Ceiling"; "Floor"; "Round"; "Log10"; "Log"; "Sqrt" + "Truncate"; "op_Explicit" "Pow"; "Atan2" ] |> set @@ -355,8 +355,8 @@ type OptionalTrace = let res = f newTrace match predicate res, t with | false, _ -> newTrace.Undo() - | true , WithTrace t -> t.actions <- newTrace.actions @ t.actions - | true , NoTrace -> () + | true, WithTrace t -> t.actions <- newTrace.actions @ t.actions + | true, NoTrace -> () res let CollectThenUndo f = @@ -391,7 +391,7 @@ exception LocallyAbortOperationThatLosesAbbrevs let localAbortD = ErrorD LocallyAbortOperationThatLosesAbbrevs /// Return true if we would rather unify this variable v1 := v2 than vice versa -let PreferUnifyTypar (v1:Typar) (v2:Typar) = +let PreferUnifyTypar (v1: Typar) (v2: Typar) = match v1.Rigidity, v2.Rigidity with // Rigid > all | TyparRigidity.Rigid, _ -> false @@ -438,7 +438,7 @@ let FindPreferredTypar vs = let rec find vs = match vs with | [] -> vs - | (v:Typar, e)::vs -> + | (v: Typar, e)::vs -> match find vs with | [] -> [(v, e)] | (v', e')::vs' -> @@ -447,15 +447,15 @@ let FindPreferredTypar vs = else (v', e') :: (v, e) :: vs' find vs -let SubstMeasure (r:Typar) ms = - if r.Rigidity = TyparRigidity.Rigid then error(InternalError("SubstMeasure: rigid", r.Range)); - if r.Kind = TyparKind.Type then error(InternalError("SubstMeasure: kind=type", r.Range)); +let SubstMeasure (r: Typar) ms = + if r.Rigidity = TyparRigidity.Rigid then error(InternalError("SubstMeasure: rigid", r.Range)) + if r.Kind = TyparKind.Type then error(InternalError("SubstMeasure: kind=type", r.Range)) match r.typar_solution with | None -> r.typar_solution <- Some (TType_measure ms) - | Some _ -> error(InternalError("already solved", r.Range)); + | Some _ -> error(InternalError("already solved", r.Range)) -let rec TransactStaticReq (csenv:ConstraintSolverEnv) (trace:OptionalTrace) (tpr:Typar) req = +let rec TransactStaticReq (csenv: ConstraintSolverEnv) (trace: OptionalTrace) (tpr: Typar) req = let m = csenv.m if tpr.Rigidity.ErrorIfUnified && tpr.StaticReq <> req then ErrorD(ConstraintSolverError(FSComp.SR.csTypeCannotBeResolvedAtCompileTime(tpr.Name), m, m)) @@ -464,12 +464,12 @@ let rec TransactStaticReq (csenv:ConstraintSolverEnv) (trace:OptionalTrace) (tpr trace.Exec (fun () -> tpr.SetStaticReq req) (fun () -> tpr.SetStaticReq orig) CompleteD -and SolveTypStaticReqTypar (csenv:ConstraintSolverEnv) trace req (tpr:Typar) = +and SolveTypStaticReqTypar (csenv: ConstraintSolverEnv) trace req (tpr: Typar) = let orig = tpr.StaticReq let req2 = JoinTyparStaticReq req orig if orig <> req2 then TransactStaticReq csenv trace tpr req2 else CompleteD -and SolveTypStaticReq (csenv:ConstraintSolverEnv) trace req ty = +and SolveTypStaticReq (csenv: ConstraintSolverEnv) trace req ty = match req with | NoStaticReq -> CompleteD | HeadTypeStaticReq -> @@ -486,12 +486,12 @@ and SolveTypStaticReq (csenv:ConstraintSolverEnv) trace req ty = | ValueSome tpr -> SolveTypStaticReqTypar csenv trace req tpr | ValueNone -> CompleteD -let TransactDynamicReq (trace:OptionalTrace) (tpr:Typar) req = +let TransactDynamicReq (trace: OptionalTrace) (tpr: Typar) req = let orig = tpr.DynamicReq trace.Exec (fun () -> tpr.SetDynamicReq req) (fun () -> tpr.SetDynamicReq orig) CompleteD -let SolveTypDynamicReq (csenv:ConstraintSolverEnv) trace req ty = +let SolveTypDynamicReq (csenv: ConstraintSolverEnv) trace req ty = match req with | TyparDynamicReq.No -> CompleteD | TyparDynamicReq.Yes -> @@ -500,12 +500,12 @@ let SolveTypDynamicReq (csenv:ConstraintSolverEnv) trace req ty = TransactDynamicReq trace tpr TyparDynamicReq.Yes | _ -> CompleteD -let TransactIsCompatFlex (trace:OptionalTrace) (tpr:Typar) req = +let TransactIsCompatFlex (trace: OptionalTrace) (tpr: Typar) req = let orig = tpr.IsCompatFlex trace.Exec (fun () -> tpr.SetIsCompatFlex req) (fun () -> tpr.SetIsCompatFlex orig) CompleteD -let SolveTypIsCompatFlex (csenv:ConstraintSolverEnv) trace req ty = +let SolveTypIsCompatFlex (csenv: ConstraintSolverEnv) trace req ty = if req then match tryAnyParTy csenv.g ty with | ValueSome tpr when not tpr.IsCompatFlex -> TransactIsCompatFlex trace tpr req @@ -513,7 +513,7 @@ let SolveTypIsCompatFlex (csenv:ConstraintSolverEnv) trace req ty = else CompleteD -let SubstMeasureWarnIfRigid (csenv:ConstraintSolverEnv) trace (v:Typar) ms = trackErrors { +let SubstMeasureWarnIfRigid (csenv: ConstraintSolverEnv) trace (v: Typar) ms = trackErrors { if v.Rigidity.WarnIfUnified && not (isAnyParTy csenv.g (TType_measure ms)) then // NOTE: we grab the name eagerly to make sure the type variable prints as a type variable let tpnmOpt = if v.IsCompilerGenerated then None else Some v.Name @@ -536,7 +536,7 @@ let SubstMeasureWarnIfRigid (csenv:ConstraintSolverEnv) trace (v:Typar) ms = tra /// - ms contains no non-rigid unit variables, and so cannot be unified with 1 /// - ms has the form v^e * ms' for some non-rigid variable v, non-zero exponent e, and measure expression ms' /// the most general unifier is then simply v := ms' ^ -(1/e) -let UnifyMeasureWithOne (csenv:ConstraintSolverEnv) trace ms = +let UnifyMeasureWithOne (csenv: ConstraintSolverEnv) trace ms = // Gather the rigid and non-rigid unit variables in this measure expression together with their exponents let rigidVars, nonRigidVars = ListMeasureVarOccsWithNonZeroExponents ms @@ -555,7 +555,7 @@ let UnifyMeasureWithOne (csenv:ConstraintSolverEnv) trace ms = | [] -> if measureEquiv csenv.g ms Measure.One then CompleteD else localAbortD /// Imperatively unify unit-of-measure expression ms1 against ms2 -let UnifyMeasures (csenv:ConstraintSolverEnv) trace ms1 ms2 = +let UnifyMeasures (csenv: ConstraintSolverEnv) trace ms1 ms2 = UnifyMeasureWithOne csenv trace (Measure.Prod(ms1, Measure.Inv ms2)) /// Simplify a unit-of-measure expression ms that forms part of a type scheme. @@ -573,7 +573,7 @@ let SimplifyMeasure g vars ms = let remainingvars = ListSet.remove typarEq v vars let newvarExpr = if SignRational e < 0 then Measure.Inv (Measure.Var newvar) else Measure.Var newvar let newms = (ProdMeasures (List.map (fun (c, e') -> Measure.RationalPower (Measure.Con c, NegRational (DivRational e' e))) (ListMeasureConOccsWithNonZeroExponents g false ms) - @ List.map (fun (v', e') -> if typarEq v v' then newvarExpr else Measure.RationalPower (Measure.Var v', NegRational (DivRational e' e))) (ListMeasureVarOccsWithNonZeroExponents ms))); + @ List.map (fun (v', e') -> if typarEq v v' then newvarExpr else Measure.RationalPower (Measure.Var v', NegRational (DivRational e' e))) (ListMeasureVarOccsWithNonZeroExponents ms))) SubstMeasure v newms match vs with | [] -> (remainingvars, Some newvar) @@ -679,7 +679,7 @@ let NormalizeExponentsInTypeScheme uvars ty = // Essentially this is the *reduced row echelon* matrix from linear algebra, with adjustment to ensure that // exponents are integers where possible (in the reduced row echelon form, a1, b2, etc. would be 1, possibly // forcing other entries to be non-integers). -let SimplifyMeasuresInTypeScheme g resultFirst (generalizable:Typar list) ty constraints = +let SimplifyMeasuresInTypeScheme g resultFirst (generalizable: Typar list) ty constraints = // Only bother if we're generalizing over at least one unit-of-measure variable let uvars, vars = generalizable @@ -694,7 +694,7 @@ let SimplifyMeasuresInTypeScheme g resultFirst (generalizable:Typar list) ty con let freshMeasure () = Measure.Var (NewInferenceMeasurePar ()) -let CheckWarnIfRigid (csenv:ConstraintSolverEnv) ty1 (r:Typar) ty = +let CheckWarnIfRigid (csenv: ConstraintSolverEnv) ty1 (r: Typar) ty = let g = csenv.g let denv = csenv.DisplayEnv if not r.Rigidity.WarnIfUnified then CompleteD else @@ -716,7 +716,7 @@ let CheckWarnIfRigid (csenv:ConstraintSolverEnv) ty1 (r:Typar) ty = /// Add the constraint "ty1 = ty" to the constraint problem, where ty1 is a type variable. /// Propagate all effects of adding this constraint, e.g. to solve other variables -let rec SolveTyparEqualsType (csenv:ConstraintSolverEnv) ndeep m2 (trace:OptionalTrace) ty1 ty = trackErrors { +let rec SolveTyparEqualsType (csenv: ConstraintSolverEnv) ndeep m2 (trace: OptionalTrace) ty1 ty = trackErrors { let m = csenv.m do! DepthCheck ndeep m match ty1 with @@ -748,7 +748,7 @@ let rec SolveTyparEqualsType (csenv:ConstraintSolverEnv) ndeep m2 (trace:Optiona /// Apply the constraints on 'typar' to the type 'ty' -and solveTypMeetsTyparConstraints (csenv:ConstraintSolverEnv) ndeep m2 trace ty (r: Typar) = trackErrors { +and solveTypMeetsTyparConstraints (csenv: ConstraintSolverEnv) ndeep m2 trace ty (r: Typar) = trackErrors { let g = csenv.g // Propagate compat flex requirements from 'tp' to 'ty' do! SolveTypIsCompatFlex csenv trace r.IsCompatFlex ty @@ -786,7 +786,7 @@ and solveTypMeetsTyparConstraints (csenv:ConstraintSolverEnv) ndeep m2 trace ty } -and SolveAnonInfoEqualsAnonInfo (csenv:ConstraintSolverEnv) m2 (anonInfo1: AnonRecdTypeInfo) (anonInfo2: AnonRecdTypeInfo) = +and SolveAnonInfoEqualsAnonInfo (csenv: ConstraintSolverEnv) m2 (anonInfo1: AnonRecdTypeInfo) (anonInfo2: AnonRecdTypeInfo) = if evalTupInfoIsStruct anonInfo1.TupInfo <> evalTupInfoIsStruct anonInfo2.TupInfo then ErrorD (ConstraintSolverError(FSComp.SR.tcTupleStructMismatch(), csenv.m,m2)) else (match anonInfo1.Assembly, anonInfo2.Assembly with | ccu1, ccu2 -> if not (ccuEq ccu1 ccu2) then ErrorD (ConstraintSolverError(FSComp.SR.tcAnonRecdCcuMismatch(ccu1.AssemblyName, ccu2.AssemblyName), csenv.m,m2)) else ResultD () @@ -800,7 +800,7 @@ and SolveAnonInfoEqualsAnonInfo (csenv:ConstraintSolverEnv) m2 (anonInfo1: AnonR /// Add the constraint "ty1 = ty2" to the constraint problem. /// Propagate all effects of adding this constraint, e.g. to solve type variables -and SolveTypeEqualsType (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalTrace) (cxsln:(TraitConstraintInfo * TraitConstraintSln) option) ty1 ty2 = +and SolveTypeEqualsType (csenv: ConstraintSolverEnv) ndeep m2 (trace: OptionalTrace) (cxsln:(TraitConstraintInfo * TraitConstraintSln) option) ty1 ty2 = let ndeep = ndeep + 1 let aenv = csenv.EquivEnv let g = csenv.g @@ -833,16 +833,16 @@ and SolveTypeEqualsType (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalTra | (TType_app (tc2, [ms]), _) when (tc2.IsMeasureableReprTycon && typeEquiv csenv.g sty2 (reduceTyconRefMeasureableOrProvided csenv.g tc2 [ms])) -> SolveTypeEqualsType csenv ndeep m2 trace None ms (TType_measure Measure.One) - | TType_app (tc1, l1) , TType_app (tc2, l2) when tyconRefEq g tc1 tc2 -> SolveTypeEqualsTypeEqns csenv ndeep m2 trace None l1 l2 - | TType_app (_, _) , TType_app (_, _) -> localAbortD - | TType_tuple (tupInfo1, l1) , TType_tuple (tupInfo2, l2) -> + | TType_app (tc1, l1), TType_app (tc2, l2) when tyconRefEq g tc1 tc2 -> SolveTypeEqualsTypeEqns csenv ndeep m2 trace None l1 l2 + | TType_app (_, _), TType_app (_, _) -> localAbortD + | TType_tuple (tupInfo1, l1), TType_tuple (tupInfo2, l2) -> if evalTupInfoIsStruct tupInfo1 <> evalTupInfoIsStruct tupInfo2 then ErrorD (ConstraintSolverError(FSComp.SR.tcTupleStructMismatch(), csenv.m, m2)) else SolveTypeEqualsTypeEqns csenv ndeep m2 trace None l1 l2 | TType_anon (anonInfo1, l1),TType_anon (anonInfo2, l2) -> SolveAnonInfoEqualsAnonInfo csenv m2 anonInfo1 anonInfo2 ++ (fun () -> SolveTypeEqualsTypeEqns csenv ndeep m2 trace None l1 l2) - | TType_fun (d1, r1) , TType_fun (d2, r2) -> SolveFunTypeEqn csenv ndeep m2 trace None d1 d2 r1 r2 - | TType_measure ms1 , TType_measure ms2 -> UnifyMeasures csenv trace ms1 ms2 + | TType_fun (d1, r1), TType_fun (d2, r2) -> SolveFunTypeEqn csenv ndeep m2 trace None d1 d2 r1 r2 + | TType_measure ms1, TType_measure ms2 -> UnifyMeasures csenv trace ms1 ms2 | TType_forall(tps1, rty1), TType_forall(tps2, rty2) -> if tps1.Length <> tps2.Length then localAbortD else let aenv = aenv.BindEquivTypars tps1 tps2 @@ -850,7 +850,7 @@ and SolveTypeEqualsType (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalTra if not (typarsAEquiv g aenv tps1 tps2) then localAbortD else SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty1 rty2 - | TType_ucase (uc1, l1) , TType_ucase (uc2, l2) when g.unionCaseRefEq uc1 uc2 -> SolveTypeEqualsTypeEqns csenv ndeep m2 trace None l1 l2 + | TType_ucase (uc1, l1), TType_ucase (uc2, l2) when g.unionCaseRefEq uc1 uc2 -> SolveTypeEqualsTypeEqns csenv ndeep m2 trace None l1 l2 | _ -> localAbortD @@ -887,7 +887,7 @@ and SolveFunTypeEqn csenv ndeep m2 trace cxsln d1 d2 r1 r2 = trackErrors { // // "ty2 casts to ty1" // "a value of type ty2 can be used where a value of type ty1 is expected" -and SolveTypeSubsumesType (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalTrace) cxsln ty1 ty2 = +and SolveTypeSubsumesType (csenv: ConstraintSolverEnv) ndeep m2 (trace: OptionalTrace) cxsln ty1 ty2 = // 'a :> obj ---> let ndeep = ndeep + 1 let g = csenv.g @@ -911,13 +911,13 @@ and SolveTypeSubsumesType (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalT | _, TType_var r when not csenv.MatchingOnly -> SolveTyparSubtypeOfType csenv ndeep m2 trace r ty1 - | TType_tuple (tupInfo1, l1) , TType_tuple (tupInfo2, l2) -> + | TType_tuple (tupInfo1, l1), TType_tuple (tupInfo2, l2) -> if evalTupInfoIsStruct tupInfo1 <> evalTupInfoIsStruct tupInfo2 then ErrorD (ConstraintSolverError(FSComp.SR.tcTupleStructMismatch(), csenv.m, m2)) else SolveTypeEqualsTypeEqns csenv ndeep m2 trace cxsln l1 l2 (* nb. can unify since no variance *) | TType_anon (anonInfo1, l1), TType_anon (anonInfo2, l2) -> SolveAnonInfoEqualsAnonInfo csenv m2 anonInfo1 anonInfo2 ++ (fun () -> SolveTypeEqualsTypeEqns csenv ndeep m2 trace cxsln l1 l2) (* nb. can unify since no variance *) - | TType_fun (d1, r1) , TType_fun (d2, r2) -> SolveFunTypeEqn csenv ndeep m2 trace cxsln d1 d2 r1 r2 (* nb. can unify since no variance *) + | TType_fun (d1, r1), TType_fun (d2, r2) -> SolveFunTypeEqn csenv ndeep m2 trace cxsln d1 d2 r1 r2 (* nb. can unify since no variance *) | TType_measure ms1, TType_measure ms2 -> UnifyMeasures csenv trace ms1 ms2 // Enforce the identities float=float<1>, float32=float32<1> and decimal=decimal<1> @@ -927,7 +927,7 @@ and SolveTypeSubsumesType (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalT -> SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln ms (TType_measure Measure.One) // Special subsumption rule for byref tags - | TType_app (tc1, l1) , TType_app (tc2, l2) when tyconRefEq g tc1 tc2 && g.byref2_tcr.CanDeref && tyconRefEq g g.byref2_tcr tc1 -> + | TType_app (tc1, l1), TType_app (tc2, l2) when tyconRefEq g tc1 tc2 && g.byref2_tcr.CanDeref && tyconRefEq g g.byref2_tcr tc1 -> match l1, l2 with | [ h1; tag1 ], [ h2; tag2 ] -> trackErrors { do! SolveTypeEqualsType csenv ndeep m2 trace None h1 h2 @@ -939,10 +939,10 @@ and SolveTypeSubsumesType (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalT } | _ -> SolveTypeEqualsTypeEqns csenv ndeep m2 trace cxsln l1 l2 - | TType_app (tc1, l1) , TType_app (tc2, l2) when tyconRefEq g tc1 tc2 -> + | TType_app (tc1, l1), TType_app (tc2, l2) when tyconRefEq g tc1 tc2 -> SolveTypeEqualsTypeEqns csenv ndeep m2 trace cxsln l1 l2 - | TType_ucase (uc1, l1) , TType_ucase (uc2, l2) when g.unionCaseRefEq uc1 uc2 -> + | TType_ucase (uc1, l1), TType_ucase (uc2, l2) when g.unionCaseRefEq uc1 uc2 -> SolveTypeEqualsTypeEqns csenv ndeep m2 trace cxsln l1 l2 | _ -> @@ -992,7 +992,7 @@ and SolveTypeSubsumesTypeKeepAbbrevs csenv ndeep m2 trace cxsln ty1 ty2 = //------------------------------------------------------------------------- -and SolveTyparSubtypeOfType (csenv:ConstraintSolverEnv) ndeep m2 trace tp ty1 = +and SolveTyparSubtypeOfType (csenv: ConstraintSolverEnv) ndeep m2 trace tp ty1 = let g = csenv.g if isObjTy g ty1 then CompleteD elif typeEquiv g ty1 (mkTyparTy tp) then CompleteD @@ -1005,7 +1005,7 @@ and DepthCheck ndeep m = if ndeep > 300 then error(Error(FSComp.SR.csTypeInferenceMaxDepth(), m)) else CompleteD // If this is a type that's parameterized on a unit-of-measure (expected to be numeric), unify its measure with 1 -and SolveDimensionlessNumericType (csenv:ConstraintSolverEnv) ndeep m2 trace ty = +and SolveDimensionlessNumericType (csenv: ConstraintSolverEnv) ndeep m2 trace ty = match GetMeasureOfType csenv.g ty with | Some (tcref, _) -> SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace ty (mkAppTy tcref [TType_measure Measure.One]) @@ -1028,7 +1028,7 @@ and SolveDimensionlessNumericType (csenv:ConstraintSolverEnv) ndeep m2 trace ty /// permitWeakResolution also applies to resolutions of multi-type-variable constraints via method overloads. Method overloading gets applied even if /// only one of the two type variables is known /// -and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload permitWeakResolution ndeep m2 trace (TTrait(tys, nm, memFlags, argtys, rty, sln)): OperationResult = trackErrors { +and SolveMemberConstraint (csenv: ConstraintSolverEnv) ignoreUnresolvedOverload permitWeakResolution ndeep m2 trace (TTrait(tys, nm, memFlags, argtys, rty, sln)): OperationResult = trackErrors { // Do not re-solve if already solved if sln.Value.IsSome then return true else let g = csenv.g @@ -1388,7 +1388,7 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty rty2 return TTraitSolvedRecdProp(rfinfo, isSetProp) - | None, None, Some (calledMeth:CalledMeth<_>) -> + | None, None, Some (calledMeth: CalledMeth<_>) -> // OK, the constraint is solved. let minfo = calledMeth.Method @@ -1435,21 +1435,21 @@ and RecordMemberConstraintSolution css m trace traitInfo res = | TTraitSolved (minfo, minst) -> let sln = MemberConstraintSolutionOfMethInfo css m minfo minst - TransactMemberConstraintSolution traitInfo trace sln; + TransactMemberConstraintSolution traitInfo trace sln ResultD true | TTraitBuiltIn -> - TransactMemberConstraintSolution traitInfo trace BuiltInSln; + TransactMemberConstraintSolution traitInfo trace BuiltInSln ResultD true | TTraitSolvedRecdProp (rfinfo, isSet) -> let sln = FSRecdFieldSln(rfinfo.TypeInst,rfinfo.RecdFieldRef,isSet) - TransactMemberConstraintSolution traitInfo trace sln; + TransactMemberConstraintSolution traitInfo trace sln ResultD true | TTraitSolvedAnonRecdProp (anonInfo, tinst, i) -> let sln = FSAnonRecdFieldSln(anonInfo, tinst, i) - TransactMemberConstraintSolution traitInfo trace sln; + TransactMemberConstraintSolution traitInfo trace sln ResultD true /// Convert a MethInfo into the data we save in the TAST @@ -1494,13 +1494,13 @@ and MemberConstraintSolutionOfMethInfo css m minfo minst = #endif /// Write into the reference cell stored in the TAST and add to the undo trace if necessary -and TransactMemberConstraintSolution traitInfo (trace:OptionalTrace) sln = +and TransactMemberConstraintSolution traitInfo (trace: OptionalTrace) sln = let prev = traitInfo.Solution trace.Exec (fun () -> traitInfo.Solution <- Some sln) (fun () -> traitInfo.Solution <- prev) /// Only consider overload resolution if canonicalizing or all the types are now nominal. /// That is, don't perform resolution if more nominal information may influence the set of available overloads -and GetRelevantMethodsForTrait (csenv:ConstraintSolverEnv) permitWeakResolution nm (TTrait(tys, _, memFlags, argtys, rty, soln) as traitInfo): MethInfo list = +and GetRelevantMethodsForTrait (csenv: ConstraintSolverEnv) permitWeakResolution nm (TTrait(tys, _, memFlags, argtys, rty, soln) as traitInfo): MethInfo list = let results = if permitWeakResolution || MemberConstraintSupportIsReadyForDeterminingOverloads csenv traitInfo then let m = csenv.m @@ -1532,20 +1532,20 @@ and GetRelevantMethodsForTrait (csenv:ConstraintSolverEnv) permitWeakResolution /// The nominal support of the member constraint -and GetSupportOfMemberConstraint (csenv:ConstraintSolverEnv) (TTrait(tys, _, _, _, _, _)) = +and GetSupportOfMemberConstraint (csenv: ConstraintSolverEnv) (TTrait(tys, _, _, _, _, _)) = tys |> List.choose (tryAnyParTyOption csenv.g) /// Check if the support is fully solved. -and SupportOfMemberConstraintIsFullySolved (csenv:ConstraintSolverEnv) (TTrait(tys, _, _, _, _, _)) = +and SupportOfMemberConstraintIsFullySolved (csenv: ConstraintSolverEnv) (TTrait(tys, _, _, _, _, _)) = tys |> List.forall (isAnyParTy csenv.g >> not) // This may be relevant to future bug fixes, see https://github.com/Microsoft/visualfsharp/issues/3814 // /// Check if some part of the support is solved. -// and SupportOfMemberConstraintIsPartiallySolved (csenv:ConstraintSolverEnv) (TTrait(tys, _, _, _, _, _)) = +// and SupportOfMemberConstraintIsPartiallySolved (csenv: ConstraintSolverEnv) (TTrait(tys, _, _, _, _, _)) = // tys |> List.exists (isAnyParTy csenv.g >> not) /// Get all the unsolved typars (statically resolved or not) relevant to the member constraint -and GetFreeTyparsOfMemberConstraint (csenv:ConstraintSolverEnv) (TTrait(tys, _, _, argtys, rty, _)) = +and GetFreeTyparsOfMemberConstraint (csenv: ConstraintSolverEnv) (TTrait(tys, _, _, argtys, rty, _)) = freeInTypesLeftToRightSkippingConstraints csenv.g (tys@argtys@ Option.toList rty) and MemberConstraintIsReadyForWeakResolution csenv traitInfo = @@ -1560,7 +1560,7 @@ and MemberConstraintSupportIsReadyForDeterminingOverloads csenv traitInfo = /// Re-solve the global constraints involving any of the given type variables. /// Trait constraints can't always be solved using the pessimistic rules. We only canonicalize /// them forcefully (permitWeakResolution=true) prior to generalization. -and SolveRelevantMemberConstraints (csenv:ConstraintSolverEnv) ndeep permitWeakResolution trace tps = +and SolveRelevantMemberConstraints (csenv: ConstraintSolverEnv) ndeep permitWeakResolution trace tps = RepeatWhileD ndeep (fun ndeep -> tps @@ -1573,7 +1573,7 @@ and SolveRelevantMemberConstraints (csenv:ConstraintSolverEnv) ndeep permitWeakR | ValueNone -> ResultD false)) -and SolveRelevantMemberConstraintsForTypar (csenv:ConstraintSolverEnv) ndeep permitWeakResolution (trace:OptionalTrace) tp = +and SolveRelevantMemberConstraintsForTypar (csenv: ConstraintSolverEnv) ndeep permitWeakResolution (trace: OptionalTrace) tp = let cxst = csenv.SolverState.ExtraCxs let tpn = tp.Stamp let cxs = cxst.FindAll tpn @@ -1587,10 +1587,10 @@ and SolveRelevantMemberConstraintsForTypar (csenv:ConstraintSolverEnv) ndeep per let csenv = { csenv with m = m2 } SolveMemberConstraint csenv true permitWeakResolution (ndeep+1) m2 trace traitInfo) -and CanonicalizeRelevantMemberConstraints (csenv:ConstraintSolverEnv) ndeep trace tps = +and CanonicalizeRelevantMemberConstraints (csenv: ConstraintSolverEnv) ndeep trace tps = SolveRelevantMemberConstraints csenv ndeep true trace tps -and AddMemberConstraint (csenv:ConstraintSolverEnv) ndeep m2 trace traitInfo support frees = +and AddMemberConstraint (csenv: ConstraintSolverEnv) ndeep m2 trace traitInfo support frees = let g = csenv.g let aenv = csenv.EquivEnv let cxst = csenv.SolverState.ExtraCxs @@ -1618,7 +1618,7 @@ and AddMemberConstraint (csenv:ConstraintSolverEnv) ndeep m2 trace traitInfo sup /// Record a constraint on an inference type variable. -and AddConstraint (csenv:ConstraintSolverEnv) ndeep m2 trace tp newConstraint = +and AddConstraint (csenv: ConstraintSolverEnv) ndeep m2 trace tp newConstraint = let g = csenv.g let aenv = csenv.EquivEnv let amap = csenv.amap @@ -1680,7 +1680,7 @@ and AddConstraint (csenv:ConstraintSolverEnv) ndeep m2 trace tp newConstraint = } | TyparConstraint.SupportsComparison _, TyparConstraint.IsDelegate _ - | TyparConstraint.IsDelegate _ , TyparConstraint.SupportsComparison _ + | TyparConstraint.IsDelegate _, TyparConstraint.SupportsComparison _ | TyparConstraint.IsNonNullableStruct _, TyparConstraint.IsReferenceType _ | TyparConstraint.IsReferenceType _, TyparConstraint.IsNonNullableStruct _ -> ErrorD (Error(FSComp.SR.csStructConstraintInconsistent(), m)) @@ -1758,33 +1758,37 @@ and AddConstraint (csenv:ConstraintSolverEnv) ndeep m2 trace tp newConstraint = elif tp.Rigidity = TyparRigidity.Rigid then return! ErrorD (ConstraintSolverMissingConstraint(denv, tp, newConstraint, m, m2)) else - // It is important that we give a warning if a constraint is missing from a - // will-be-made-rigid type variable. This is because the existence of these warnings - // is relevant to the overload resolution rules (see 'candidateWarnCount' in the overload resolution - // implementation). See also FSharp 1.0 bug 5461 - if tp.Rigidity.WarnIfMissingConstraint then - do! WarnD (ConstraintSolverMissingConstraint(denv, tp, newConstraint, m, m2)) - let newConstraints = - // Eliminate any constraints where one constraint implies another - // Keep constraints in the left-to-right form according to the order they are asserted. - // NOTE: QUADRATIC - let rec eliminateRedundant cxs acc = - match cxs with - | [] -> acc - | cx :: rest -> - eliminateRedundant rest (if List.exists (fun cx2 -> implies cx2 cx) acc then acc else (cx::acc)) + // It is important that we give a warning if a constraint is missing from a + // will-be-made-rigid type variable. This is because the existence of these warnings + // is relevant to the overload resolution rules (see 'candidateWarnCount' in the overload resolution + // implementation). + if tp.Rigidity.WarnIfMissingConstraint then + do! WarnD (ConstraintSolverMissingConstraint(denv, tp, newConstraint, m, m2)) + + let newConstraints = + // Eliminate any constraints where one constraint implies another + // Keep constraints in the left-to-right form according to the order they are asserted. + // NOTE: QUADRATIC + let rec eliminateRedundant cxs acc = + match cxs with + | [] -> acc + | cx :: rest -> + let acc = + if List.exists (fun cx2 -> implies cx2 cx) acc then acc + else (cx::acc) + eliminateRedundant rest acc - eliminateRedundant allCxs [] + eliminateRedundant allCxs [] - // Write the constraint into the type variable - // Record a entry in the undo trace if one is provided - let orig = tp.Constraints - trace.Exec (fun () -> tp.SetConstraints newConstraints) (fun () -> tp.SetConstraints orig) - () + // Write the constraint into the type variable + // Record a entry in the undo trace if one is provided + let orig = tp.Constraints + trace.Exec (fun () -> tp.SetConstraints newConstraints) (fun () -> tp.SetConstraints orig) + () } -and SolveTypeSupportsNull (csenv:ConstraintSolverEnv) ndeep m2 trace ty = +and SolveTypeSupportsNull (csenv: ConstraintSolverEnv) ndeep m2 trace ty = let g = csenv.g let m = csenv.m let denv = csenv.DisplayEnv @@ -1799,7 +1803,7 @@ and SolveTypeSupportsNull (csenv:ConstraintSolverEnv) ndeep m2 trace ty = | _ -> ErrorD (ConstraintSolverError(FSComp.SR.csTypeDoesNotHaveNull(NicePrint.minimalStringOfType denv ty), m, m2)) -and SolveTypeSupportsComparison (csenv:ConstraintSolverEnv) ndeep m2 trace ty = +and SolveTypeSupportsComparison (csenv: ConstraintSolverEnv) ndeep m2 trace ty = let g = csenv.g let m = csenv.m let amap = csenv.amap @@ -1815,7 +1819,7 @@ and SolveTypeSupportsComparison (csenv:ConstraintSolverEnv) ndeep m2 trace ty = | _ -> match ty with | SpecialComparableHeadType g tinst -> - tinst |> IterateD (SolveTypeSupportsComparison (csenv:ConstraintSolverEnv) ndeep m2 trace) + tinst |> IterateD (SolveTypeSupportsComparison (csenv: ConstraintSolverEnv) ndeep m2 trace) | _ -> // Check the basic requirement - IComparable or IStructuralComparable or assumed if ExistsSameHeadTypeInHierarchy g amap m2 ty g.mk_IComparable_ty || @@ -1827,7 +1831,7 @@ and SolveTypeSupportsComparison (csenv:ConstraintSolverEnv) ndeep m2 trace ty = // Check the (possibly inferred) structural dependencies (tinst, tcref.TyparsNoRange) ||> Iterate2D (fun ty tp -> if tp.ComparisonConditionalOn then - SolveTypeSupportsComparison (csenv:ConstraintSolverEnv) ndeep m2 trace ty + SolveTypeSupportsComparison (csenv: ConstraintSolverEnv) ndeep m2 trace ty else CompleteD) | _ -> @@ -1844,7 +1848,7 @@ and SolveTypeSupportsComparison (csenv:ConstraintSolverEnv) ndeep m2 trace ty = else ErrorD (ConstraintSolverError(FSComp.SR.csTypeDoesNotSupportComparison2(NicePrint.minimalStringOfType denv ty), m, m2)) -and SolveTypeSupportsEquality (csenv:ConstraintSolverEnv) ndeep m2 trace ty = +and SolveTypeSupportsEquality (csenv: ConstraintSolverEnv) ndeep m2 trace ty = let g = csenv.g let m = csenv.m let denv = csenv.DisplayEnv @@ -1858,7 +1862,7 @@ and SolveTypeSupportsEquality (csenv:ConstraintSolverEnv) ndeep m2 trace ty = | _ -> match ty with | SpecialEquatableHeadType g tinst -> - tinst |> IterateD (SolveTypeSupportsEquality (csenv:ConstraintSolverEnv) ndeep m2 trace) + tinst |> IterateD (SolveTypeSupportsEquality (csenv: ConstraintSolverEnv) ndeep m2 trace) | SpecialNotEquatableHeadType g _ -> ErrorD (ConstraintSolverError(FSComp.SR.csTypeDoesNotSupportEquality2(NicePrint.minimalStringOfType denv ty), m, m2)) | _ -> @@ -1874,13 +1878,13 @@ and SolveTypeSupportsEquality (csenv:ConstraintSolverEnv) ndeep m2 trace ty = // Check the (possibly inferred) structural dependencies (tinst, tcref.TyparsNoRange) ||> Iterate2D (fun ty tp -> if tp.EqualityConditionalOn then - SolveTypeSupportsEquality (csenv:ConstraintSolverEnv) ndeep m2 trace ty + SolveTypeSupportsEquality (csenv: ConstraintSolverEnv) ndeep m2 trace ty else CompleteD) | _ -> CompleteD -and SolveTypeIsEnum (csenv:ConstraintSolverEnv) ndeep m2 trace ty underlying = +and SolveTypeIsEnum (csenv: ConstraintSolverEnv) ndeep m2 trace ty underlying = trackErrors { let g = csenv.g let m = csenv.m @@ -1896,7 +1900,7 @@ and SolveTypeIsEnum (csenv:ConstraintSolverEnv) ndeep m2 trace ty underlying = return! ErrorD (ConstraintSolverError(FSComp.SR.csTypeIsNotEnumType(NicePrint.minimalStringOfType denv ty), m, m2)) } -and SolveTypeIsDelegate (csenv:ConstraintSolverEnv) ndeep m2 trace ty aty bty = +and SolveTypeIsDelegate (csenv: ConstraintSolverEnv) ndeep m2 trace ty aty bty = trackErrors { let g = csenv.g let m = csenv.m @@ -1916,7 +1920,7 @@ and SolveTypeIsDelegate (csenv:ConstraintSolverEnv) ndeep m2 trace ty aty bty = return! ErrorD (ConstraintSolverError(FSComp.SR.csTypeIsNotDelegateType(NicePrint.minimalStringOfType denv ty), m, m2)) } -and SolveTypeIsNonNullableValueType (csenv:ConstraintSolverEnv) ndeep m2 trace ty = +and SolveTypeIsNonNullableValueType (csenv: ConstraintSolverEnv) ndeep m2 trace ty = trackErrors { let g = csenv.g let m = csenv.m @@ -1933,7 +1937,7 @@ and SolveTypeIsNonNullableValueType (csenv:ConstraintSolverEnv) ndeep m2 trace t return! ErrorD (ConstraintSolverError(FSComp.SR.csGenericConstructRequiresStructType(NicePrint.minimalStringOfType denv ty), m, m2)) } -and SolveTypeIsUnmanaged (csenv:ConstraintSolverEnv) ndeep m2 trace ty = +and SolveTypeIsUnmanaged (csenv: ConstraintSolverEnv) ndeep m2 trace ty = let g = csenv.g let m = csenv.m let denv = csenv.DisplayEnv @@ -1947,7 +1951,7 @@ and SolveTypeIsUnmanaged (csenv:ConstraintSolverEnv) ndeep m2 trace ty = ErrorD (ConstraintSolverError(FSComp.SR.csGenericConstructRequiresUnmanagedType(NicePrint.minimalStringOfType denv ty), m, m2)) -and SolveTypeChoice (csenv:ConstraintSolverEnv) ndeep m2 trace ty tys = +and SolveTypeChoice (csenv: ConstraintSolverEnv) ndeep m2 trace ty tys = let g = csenv.g let m = csenv.m let denv = csenv.DisplayEnv @@ -1959,7 +1963,7 @@ and SolveTypeChoice (csenv:ConstraintSolverEnv) ndeep m2 trace ty tys = else ErrorD (ConstraintSolverError(FSComp.SR.csTypeNotCompatibleBecauseOfPrintf((NicePrint.minimalStringOfType denv ty), (String.concat "," (List.map (NicePrint.prettyStringOfTy denv) tys))), m, m2)) -and SolveTypeIsReferenceType (csenv:ConstraintSolverEnv) ndeep m2 trace ty = +and SolveTypeIsReferenceType (csenv: ConstraintSolverEnv) ndeep m2 trace ty = let g = csenv.g let m = csenv.m let denv = csenv.DisplayEnv @@ -1970,7 +1974,7 @@ and SolveTypeIsReferenceType (csenv:ConstraintSolverEnv) ndeep m2 trace ty = if isRefTy g ty then CompleteD else ErrorD (ConstraintSolverError(FSComp.SR.csGenericConstructRequiresReferenceSemantics(NicePrint.minimalStringOfType denv ty), m, m)) -and SolveTypeRequiresDefaultConstructor (csenv:ConstraintSolverEnv) ndeep m2 trace origTy = +and SolveTypeRequiresDefaultConstructor (csenv: ConstraintSolverEnv) ndeep m2 trace origTy = let g = csenv.g let amap = csenv.amap let m = csenv.m @@ -2004,14 +2008,14 @@ and SolveTypeRequiresDefaultConstructor (csenv:ConstraintSolverEnv) ndeep m2 tra // Parameterized compatibility relation between member signatures. The real work // is done by "equateTypes" and "subsumeTypes" and "subsumeArg" and CanMemberSigsMatchUpToCheck - (csenv:ConstraintSolverEnv) + (csenv: ConstraintSolverEnv) permitOptArgs // are we allowed to supply optional and/or "param" arguments? alwaysCheckReturn // always check the return type? unifyTypes // used to equate the formal method instantiation with the actual method instantiation for a generic method, and the return types subsumeTypes // used to compare the "obj" type (subsumeArg: CalledArg -> CallerArg<_> -> OperationResult) // used to compare the arguments for compatibility reqdRetTyOpt - (calledMeth:CalledMeth<_>): ImperativeOperationResult = + (calledMeth: CalledMeth<_>): ImperativeOperationResult = trackErrors { let g = csenv.g let amap = csenv.amap @@ -2100,7 +2104,7 @@ and CanMemberSigsMatchUpToCheck // // "ty2 casts to ty1" // "a value of type ty2 can be used where a value of type ty1 is expected" -and private SolveTypeSubsumesTypeWithReport (csenv:ConstraintSolverEnv) ndeep m trace cxsln ty1 ty2 = +and private SolveTypeSubsumesTypeWithReport (csenv: ConstraintSolverEnv) ndeep m trace cxsln ty1 ty2 = TryD (fun () -> SolveTypeSubsumesTypeKeepAbbrevs csenv ndeep m trace cxsln ty1 ty2) (function | LocallyAbortOperationThatFailsToResolveOverload -> CompleteD @@ -2115,14 +2119,14 @@ and private SolveTypeSubsumesTypeWithReport (csenv:ConstraintSolverEnv) ndeep m // ty1: actual // ty2: expected -and private SolveTypeEqualsTypeWithReport (csenv:ConstraintSolverEnv) ndeep m trace cxsln actual expected = +and private SolveTypeEqualsTypeWithReport (csenv: ConstraintSolverEnv) ndeep m trace cxsln actual expected = TryD (fun () -> SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m trace cxsln actual expected) (function | LocallyAbortOperationThatFailsToResolveOverload -> CompleteD | res -> ErrorD (ErrorFromAddingTypeEquation(csenv.g, csenv.DisplayEnv, actual, expected, res, m))) and ArgsMustSubsumeOrConvert - (csenv:ConstraintSolverEnv) + (csenv: ConstraintSolverEnv) ndeep trace cxsln @@ -2145,18 +2149,18 @@ and MustUnify csenv ndeep trace cxsln ty1 ty2 = and MustUnifyInsideUndo csenv ndeep trace cxsln ty1 ty2 = SolveTypeEqualsTypeWithReport csenv ndeep csenv.m (WithTrace trace) cxsln ty1 ty2 -and ArgsMustSubsumeOrConvertInsideUndo (csenv:ConstraintSolverEnv) ndeep trace cxsln isConstraint calledArg (CallerArg(callerArgTy, m, _, _) as callerArg) = +and ArgsMustSubsumeOrConvertInsideUndo (csenv: ConstraintSolverEnv) ndeep trace cxsln isConstraint calledArg (CallerArg(callerArgTy, m, _, _) as callerArg) = let calledArgTy = AdjustCalledArgType csenv.InfoReader isConstraint calledArg callerArg SolveTypeSubsumesTypeWithReport csenv ndeep m (WithTrace trace) cxsln calledArgTy callerArgTy -and TypesMustSubsumeOrConvertInsideUndo (csenv:ConstraintSolverEnv) ndeep trace cxsln m calledArgTy callerArgTy = +and TypesMustSubsumeOrConvertInsideUndo (csenv: ConstraintSolverEnv) ndeep trace cxsln m calledArgTy callerArgTy = SolveTypeSubsumesTypeWithReport csenv ndeep m trace cxsln calledArgTy callerArgTy -and ArgsEquivInsideUndo (csenv:ConstraintSolverEnv) isConstraint calledArg (CallerArg(callerArgTy, m, _, _) as callerArg) = +and ArgsEquivInsideUndo (csenv: ConstraintSolverEnv) isConstraint calledArg (CallerArg(callerArgTy, m, _, _) as callerArg) = let calledArgTy = AdjustCalledArgType csenv.InfoReader isConstraint calledArg callerArg if typeEquiv csenv.g calledArgTy callerArgTy then CompleteD else ErrorD(Error(FSComp.SR.csArgumentTypesDoNotMatch(), m)) -and ReportNoCandidatesError (csenv:ConstraintSolverEnv) (nUnnamedCallerArgs, nNamedCallerArgs) methodName ad (calledMethGroup:CalledMeth<_> list) isSequential = +and ReportNoCandidatesError (csenv: ConstraintSolverEnv) (nUnnamedCallerArgs, nNamedCallerArgs) methodName ad (calledMethGroup: CalledMeth<_> list) isSequential = let amap = csenv.amap let m = csenv.m @@ -2281,7 +2285,7 @@ and ReportNoCandidatesErrorSynExpr csenv callerArgCounts methodName ad calledMet // Resolve the overloading of a method // This is used after analyzing the types of arguments and ResolveOverloading - (csenv:ConstraintSolverEnv) + (csenv: ConstraintSolverEnv) trace // The undo trace, if any methodName // The name of the method being called, for error reporting ndeep // Depth of inference @@ -2413,7 +2417,7 @@ and ResolveOverloading (ty1, ty2) ||> compareCond (fun x1 x2 -> TypeFeasiblySubsumesType ndeep csenv.g csenv.amap m x2 CanCoerce x1) /// Compare arguments under the feasibly-subsumes ordering and the adhoc Func-is-better-than-other-delegates rule - let compareArg (calledArg1:CalledArg) (calledArg2:CalledArg) = + let compareArg (calledArg1: CalledArg) (calledArg2: CalledArg) = let c = compareTypes calledArg1.CalledArgumentType calledArg2.CalledArgumentType if c <> 0 then c else @@ -2437,7 +2441,7 @@ and ResolveOverloading if c <> 0 then c else 0 - let better (candidate:CalledMeth<_>, candidateWarnings, _) (other:CalledMeth<_>, otherwarnings, _) = + let better (candidate: CalledMeth<_>, candidateWarnings, _) (other: CalledMeth<_>, otherwarnings, _) = let candidateWarnCount = List.length candidateWarnings let otherWarnCount = List.length otherwarnings // Prefer methods that don't give "this code is less generic" warnings @@ -2599,11 +2603,11 @@ and ResolveOverloading /// This is used before analyzing the types of arguments in a single overload resolution let UnifyUniqueOverloading - (csenv:ConstraintSolverEnv) + (csenv: ConstraintSolverEnv) callerArgCounts methodName ad - (calledMethGroup:CalledMeth list) + (calledMethGroup: CalledMeth list) reqdRetTy // The expected return type, if known = let m = csenv.m @@ -2635,7 +2639,7 @@ let UnifyUniqueOverloading | _ -> ResultD false -let EliminateConstraintsForGeneralizedTypars csenv (trace:OptionalTrace) (generalizedTypars: Typars) = +let EliminateConstraintsForGeneralizedTypars csenv (trace: OptionalTrace) (generalizedTypars: Typars) = // Remove the global constraints where this type variable appears in the support of the constraint generalizedTypars |> List.iter (fun tp -> @@ -2748,7 +2752,7 @@ let AddCxTypeIsDelegate denv css m trace ty aty bty = (fun res -> ErrorD (ErrorFromAddingConstraint(denv, res, m))) |> RaiseOperationResult -let CodegenWitnessThatTypeSupportsTraitConstraint tcVal g amap m (traitInfo:TraitConstraintInfo) argExprs = trackErrors { +let CodegenWitnessThatTypeSupportsTraitConstraint tcVal g amap m (traitInfo: TraitConstraintInfo) argExprs = trackErrors { let css = { g = g amap = amap @@ -2877,7 +2881,7 @@ let CheckDeclaredTypars denv css m typars1 typars2 = /// An approximation used during name resolution for intellisense to eliminate extension members which will not /// apply to a particular object argument. This is given as the isApplicableMeth argument to the partial name resolution /// functions in nameres.fs. -let IsApplicableMethApprox g amap m (minfo:MethInfo) availObjTy = +let IsApplicableMethApprox g amap m (minfo: MethInfo) availObjTy = // Prepare an instance of a constraint solver // If it's an instance method, then try to match the object argument against the required object argument if minfo.IsExtensionMember then diff --git a/src/fcs-fable/src/fsharp/DetupleArgs.fs b/src/fcs-fable/src/fsharp/DetupleArgs.fs index 9973e45276..7272e33983 100755 --- a/src/fcs-fable/src/fsharp/DetupleArgs.fs +++ b/src/fcs-fable/src/fsharp/DetupleArgs.fs @@ -113,9 +113,9 @@ open FSharp.Compiler.Lib // [[FORMAL: SameArg xi]] -> xi // [[FORMAL: NewArgs vs]] -> [ [v1] ... [vN] ] // list up individual args for Expr.Lambda // -// [[REBIND: xi , SameArg xi]] -> // no binding needed +// [[REBIND: xi, SameArg xi]] -> // no binding needed // [[REBIND: [u], NewArgs vs]] -> u = "rebuildTuple(cpi, vs)" -// [[REBIND: us , NewArgs vs]] -> "rebuildTuple(cpi, vs)" then bind us to buildProjections. // for Expr.Lambda +// [[REBIND: us, NewArgs vs]] -> "rebuildTuple(cpi, vs)" then bind us to buildProjections. // for Expr.Lambda // // rebuildTuple - create tuple based on vs fringe according to cpi tuple structure. // @@ -201,7 +201,7 @@ module GlobalUsageAnalysis = /// Log the use of a value with a particular tuple chape at a callsite /// Note: this routine is called very frequently - let logUse (f:Val) tup z = + let logUse (f: Val) tup z = {z with Uses = match Zmap.tryFind f z.Uses with | Some sites -> Zmap.add f (tup::sites) z.Uses @@ -215,7 +215,7 @@ module GlobalUsageAnalysis = /// Log the definition of a non-recursive binding - let logNonRecBinding z (bind:Binding) = + let logNonRecBinding z (bind: Binding) = let v = bind.Var let vs = [v] {z with RecursiveBindings = Zmap.add v (false, vs) z.RecursiveBindings @@ -256,14 +256,16 @@ module GlobalUsageAnalysis = let foldLocalVal f z (vref: ValRef) = if valRefInThisAssembly g.compilingFslib vref then f z vref.Deref else z - let exprUsageIntercept exprF z expr = + + let exprUsageIntercept exprF noInterceptF z origExpr = + let rec recognise context expr = - match expr with - | Expr.Val (v, _, _) -> + match expr with + | Expr.Val (v, _, _) -> // YES: count free occurrence - let z = foldLocalVal (fun z v -> logUse v (context, [], []) z) z v - Some z - | TyappAndApp(f, _, tys, args, _) -> + foldLocalVal (fun z v -> logUse v (context, [], []) z) z v + + | TyappAndApp(f, _, tys, args, _) -> match f with | Expr.Val (fOrig, _, _) -> // app where function is val @@ -271,27 +273,27 @@ module GlobalUsageAnalysis = // collect from args (have intercepted this node) let collect z f = logUse f (context, tys, args) z let z = foldLocalVal collect z fOrig - let z = List.fold exprF z args - Some z + List.fold exprF z args | _ -> // NO: app but function is not val - None + noInterceptF z origExpr + | Expr.Op(TOp.TupleFieldGet (tupInfo, n), ts, [x], _) when not (evalTupInfoIsStruct tupInfo) -> let context = TupleGet (n, ts) :: context recognise context x // lambdas end top-level status | Expr.Lambda(_id, _ctorThisValOpt, _baseValOpt, _vs, body, _, _) -> - let z = foldUnderLambda exprF z body - Some z + foldUnderLambda exprF z body + | Expr.TyLambda(_id, _tps, body, _, _) -> - let z = foldUnderLambda exprF z body - Some z + foldUnderLambda exprF z body + | _ -> - None // NO: no intercept + noInterceptF z origExpr let context = [] - recognise context expr + recognise context origExpr let targetIntercept exprF z = function TTarget(_argvs, body, _) -> Some (foldUnderLambda exprF z body) let tmethodIntercept exprF z = function TObjExprMethod(_, _, _, _, e, _m) -> Some (foldUnderLambda exprF z e) @@ -344,7 +346,7 @@ let rec ValReprInfoForTS ts = let rec andTS ts tsB = match ts, tsB with - | _ , UnknownTS -> UnknownTS + | _, UnknownTS -> UnknownTS | UnknownTS, _ -> UnknownTS | TupleTS ss, TupleTS ssB -> if ss.Length <> ssB.Length then UnknownTS (* different tuple instances *) @@ -376,9 +378,9 @@ let typeTS g tys = tys |> uncheckedTypeTS g |> checkTS let rebuildTS g m ts vs = let rec rebuild vs ts = match vs, ts with - | [] , UnknownTS -> internalError "rebuildTS: not enough fringe to build tuple" + | [], UnknownTS -> internalError "rebuildTS: not enough fringe to build tuple" | v::vs, UnknownTS -> (exprForVal m v, v.Type), vs - | vs , TupleTS tss -> + | vs, TupleTS tss -> let xtys, vs = List.mapFold rebuild vs tss let xs, tys = List.unzip xtys let x = mkRefTupled g m xs tys @@ -413,10 +415,10 @@ let rec minimalCallPattern callPattern = let commonCallPattern callPatterns = let rec andCPs cpA cpB = match cpA, cpB with - | [] , [] -> [] + | [], [] -> [] | tsA::tsAs, tsB::tsBs -> andTS tsA tsB :: andCPs tsAs tsBs | _tsA::_tsAs, [] -> [] (* now trim to shortest - UnknownTS :: andCPs tsAs [] *) - | [] , _tsB::_tsBs -> [] (* now trim to shortest - UnknownTS :: andCPs [] tsBs *) + | [], _tsB::_tsBs -> [] (* now trim to shortest - UnknownTS :: andCPs [] tsBs *) List.reduce andCPs callPatterns @@ -451,7 +453,7 @@ type Transform = // transform - mkTransform - decided, create necessary stuff //------------------------------------------------------------------------- -let mkTransform g (f:Val) m tps x1Ntys rty (callPattern, tyfringes: (TType list * Val list) list) = +let mkTransform g (f: Val) m tps x1Ntys rty (callPattern, tyfringes: (TType list * Val list) list) = // Create formal choices for x1...xp under callPattern let transformedFormals = (callPattern, tyfringes) ||> List.map2 (fun cpi (tyfringe, vs) -> @@ -520,7 +522,7 @@ let zipCallPatternArgTys m g (callPattern : TupleStructure list) (vss : Val list // transform - vTransforms - defnSuggestedCP //------------------------------------------------------------------------- -/// v = LAM tps. lam vs1:ty1 ... vsN:tyN. body. +/// v = LAM tps. lam vs1: ty1 ... vsN: tyN. body. /// The types suggest a tuple structure CallPattern. /// The buildProjections of the vsi trim this down, /// since do not want to take as components any tuple that is required (projected to). @@ -528,7 +530,7 @@ let decideFormalSuggestedCP g z tys vss = let rec trimTsByAccess accessors ts = match ts, accessors with - | UnknownTS , _ -> UnknownTS + | UnknownTS, _ -> UnknownTS | TupleTS _tss, [] -> UnknownTS (* trim it, require the val at this point *) | TupleTS tss, TupleGet (i, _ty)::accessors -> let tss = List.mapNth i (trimTsByAccess accessors) tss @@ -557,7 +559,7 @@ let decideFormalSuggestedCP g z tys vss = // transform - decideTransform //------------------------------------------------------------------------- -let decideTransform g z v callPatterns (m, tps, vss:Val list list, rty) = +let decideTransform g z v callPatterns (m, tps, vss: Val list list, rty) = let tys = List.map (typeOfLambdaArg m) vss (* arg types *) (* NOTE: 'a in arg types may have been instanced at different tuples... *) (* commonCallPattern has to handle those cases. *) @@ -585,7 +587,7 @@ let decideTransform g z v callPatterns (m, tps, vss:Val list list, rty) = // Public f could be used beyond assembly. // For now, suppressing any transforms on these. // Later, could transform f and fix up local calls and provide an f wrapper for beyond. -let eligibleVal g m (v:Val) = +let eligibleVal g m (v: Val) = let dllImportStubOrOtherNeverInline = (v.InlineInfo = ValInline.Never) let mutableVal = v.IsMutable let byrefVal = isByrefLikeTy g m v.Type @@ -677,11 +679,11 @@ let buildProjections env bindings x xtys = let bindings = pushL (List.rev binds) bindings bindings, vixs -let rec collapseArg env bindings ts (x:Expr) = +let rec collapseArg env bindings ts (x: Expr) = let m = x.Range let env = rangeE env m match ts, x with - | UnknownTS , x -> + | UnknownTS, x -> let bindings, vx = noEffectExpr env bindings x bindings, [vx] | TupleTS tss, Expr.Op(TOp.Tuple tupInfo, _xtys, xs, _) when not (evalTupInfoIsStruct tupInfo) -> @@ -698,7 +700,7 @@ let rec collapseArg env bindings ts (x:Expr) = and collapseArgs env bindings n (callPattern) args = match callPattern, args with - | [] , args -> bindings, args + | [], args -> bindings, args | ts::tss, arg::args -> let env1 = suffixE env (string n) let bindings, xty = collapseArg env1 bindings ts arg @@ -713,10 +715,10 @@ and collapseArgs env bindings n (callPattern) args = //------------------------------------------------------------------------- // REVIEW: use mkLet etc. -let mkLets binds (body:Expr) = +let mkLets binds (body: Expr) = (binds, body) ||> List.foldBack (fun b acc -> mkLetBind acc.Range b acc) -let fixupApp (penv:penv) (fx, fty, tys, args, m) = +let fixupApp (penv: penv) (fx, fty, tys, args, m) = // Is it a val app, where the val has a transform? match fx with @@ -752,9 +754,9 @@ let transFormal ybi xi = let transRebind ybi xi = match xi, ybi with - | _ , SameArg -> [] (* no rebinding, reused original formal *) + | _, SameArg -> [] (* no rebinding, reused original formal *) | [u], NewArgs (_vs, x) -> [mkCompGenBind u x] - | us , NewArgs (_vs, x) -> List.map2 mkCompGenBind us (tryDestRefTupleExpr x) + | us, NewArgs (_vs, x) -> List.map2 mkCompGenBind us (tryDestRefTupleExpr x) //------------------------------------------------------------------------- @@ -818,7 +820,7 @@ let passBinds penv binds = binds |> List.map (passBind penv) let passBindRhs conv (TBind (v, repr, letSeqPtOpt)) = TBind(v, conv repr, letSeqPtOpt) -let preInterceptExpr (penv:penv) conv expr = +let preInterceptExpr (penv: penv) conv expr = match expr with | Expr.LetRec (binds, e, m, _) -> let binds = List.map (passBindRhs conv) binds @@ -835,8 +837,7 @@ let preInterceptExpr (penv:penv) conv expr = Some (fixupApp penv (f, fty, tys, args, m) ) | _ -> None - -let postTransformExpr (penv:penv) expr = +let postTransformExpr (penv: penv) expr = match expr with | Expr.LetRec (binds, e, m, _) -> let binds = passBinds penv binds diff --git a/src/fcs-fable/src/fsharp/ExtensionTyping.fs b/src/fcs-fable/src/fsharp/ExtensionTyping.fs index f59ae52386..f9f1038a04 100755 --- a/src/fcs-fable/src/fsharp/ExtensionTyping.fs +++ b/src/fcs-fable/src/fsharp/ExtensionTyping.fs @@ -18,10 +18,6 @@ module internal ExtensionTyping = open FSharp.Compiler.AbstractIL.Diagnostics // dprintfn open FSharp.Compiler.AbstractIL.Internal.Library // frontAndBack -#if FX_RESHAPED_REFLECTION - open Microsoft.FSharp.Core.ReflectionAdapters -#endif - type TypeProviderDesignation = TypeProviderDesignation of string exception ProvidedTypeResolution of range * System.Exception @@ -66,10 +62,10 @@ module internal ExtensionTyping = /// Load a the design-time part of a type-provider into the host process, and look for types /// marked with the TypeProviderAttribute attribute. - let GetTypeProviderImplementationTypes (runTimeAssemblyFileName, designTimeAssemblyNameString, m:range) = + let GetTypeProviderImplementationTypes (runTimeAssemblyFileName, designTimeAssemblyNameString, m: range) = // Report an error, blaming the particular type provider component - let raiseError (e:exn) = + let raiseError (e: exn) = raise (TypeProviderError(FSComp.SR.etProviderHasWrongDesignerAssembly(typeof.Name, designTimeAssemblyNameString, e.Message), runTimeAssemblyFileName, m)) // Find and load the designer assembly for the type provider component. @@ -142,7 +138,7 @@ module internal ExtensionTyping = raiseError e | None -> [] - let StripException (e:exn) = + let StripException (e: exn) = match e with #if !FX_REDUCED_EXCEPTIONS | :? System.Reflection.TargetInvocationException as e -> e.InnerException @@ -152,11 +148,11 @@ module internal ExtensionTyping = /// Create an instance of a type provider from the implementation type for the type provider in the /// design-time assembly by using reflection-invoke on a constructor for the type provider. - let CreateTypeProvider (typeProviderImplementationType:System.Type, + let CreateTypeProvider (typeProviderImplementationType: System.Type, runtimeAssemblyPath, - resolutionEnvironment:ResolutionEnvironment, - isInvalidationSupported:bool, - isInteractive:bool, + resolutionEnvironment: ResolutionEnvironment, + isInvalidationSupported: bool, + isInteractive: bool, systemRuntimeContainsType, systemRuntimeAssemblyVersion, m) = @@ -192,15 +188,15 @@ module internal ExtensionTyping = raise (TypeProviderError(FSComp.SR.etProviderDoesNotHaveValidConstructor(), typeProviderImplementationType.FullName, m)) let GetTypeProvidersOfAssembly - (runTimeAssemblyFileName:string, - ilScopeRefOfRuntimeAssembly:ILScopeRef, - designTimeAssemblyNameString:string, - resolutionEnvironment:ResolutionEnvironment, - isInvalidationSupported:bool, - isInteractive:bool, + (runTimeAssemblyFileName: string, + ilScopeRefOfRuntimeAssembly: ILScopeRef, + designTimeAssemblyNameString: string, + resolutionEnvironment: ResolutionEnvironment, + isInvalidationSupported: bool, + isInteractive: bool, systemRuntimeContainsType : string -> bool, systemRuntimeAssemblyVersion : System.Version, - m:range) = + m: range) = let providerSpecs = try @@ -236,10 +232,10 @@ module internal ExtensionTyping = providers - let unmarshal (t:Tainted<_>) = t.PUntaintNoFailure id + let unmarshal (t: Tainted<_>) = t.PUntaintNoFailure id /// Try to access a member on a provided type, catching and reporting errors - let TryTypeMember(st:Tainted<_>, fullName, memberName, m, recover, f) = + let TryTypeMember(st: Tainted<_>, fullName, memberName, m, recover, f) = try st.PApply (f, m) with :? TypeProviderError as tpe -> @@ -247,7 +243,7 @@ module internal ExtensionTyping = st.PApplyNoFailure(fun _ -> recover) /// Try to access a member on a provided type, where the result is an array of values, catching and reporting errors - let TryTypeMemberArray (st:Tainted<_>, fullName, memberName, m, f) = + let TryTypeMemberArray (st: Tainted<_>, fullName, memberName, m, f) = let result = try st.PApplyArray(f, memberName, m) @@ -260,7 +256,7 @@ module internal ExtensionTyping = | r -> r /// Try to access a member on a provided type, catching and reporting errors and checking the result is non-null, - let TryTypeMemberNonNull (st:Tainted<_>, fullName, memberName, m, recover, f) = + let TryTypeMemberNonNull (st: Tainted<_>, fullName, memberName, m, recover, f) = match TryTypeMember(st, fullName, memberName, m, recover, f) with | Tainted.Null -> errorR(Error(FSComp.SR.etUnexpectedNullFromProvidedTypeMember(fullName, memberName), m)); @@ -268,7 +264,7 @@ module internal ExtensionTyping = | r -> r /// Try to access a property or method on a provided member, catching and reporting errors - let TryMemberMember (mi:Tainted<_>, typeName, memberName, memberMemberName, m, recover, f) = + let TryMemberMember (mi: Tainted<_>, typeName, memberName, memberMemberName, m, recover, f) = try mi.PApply (f, m) with :? TypeProviderError as tpe -> @@ -276,11 +272,11 @@ module internal ExtensionTyping = mi.PApplyNoFailure(fun _ -> recover) /// Get the string to show for the name of a type provider - let DisplayNameOfTypeProvider(resolver:Tainted, m:range) = + let DisplayNameOfTypeProvider(resolver: Tainted, m: range) = resolver.PUntaint((fun tp -> tp.GetType().Name), m) /// Validate a provided namespace name - let ValidateNamespaceName(name, typeProvider:Tainted, m, nsp:string) = + let ValidateNamespaceName(name, typeProvider: Tainted, m, nsp: string) = if nsp<>null then // Null namespace designates the global namespace. if String.IsNullOrWhiteSpace nsp then // Empty namespace is not allowed @@ -308,10 +304,10 @@ module internal ExtensionTyping = // to preserve object identity when presenting the types to the F# compiler. let providedSystemTypeComparer = - let key (ty:System.Type) = (ty.Assembly.FullName, ty.FullName) + let key (ty: System.Type) = (ty.Assembly.FullName, ty.FullName) { new IEqualityComparer with - member __.GetHashCode(ty:Type) = hash (key ty) - member __.Equals(ty1:Type, ty2:Type) = (key ty1 = key ty2) } + member __.GetHashCode(ty: Type) = hash (key ty) + member __.Equals(ty1: Type, ty2: Type) = (key ty1 = key ty2) } /// The context used to interpret information in the closure of System.Type, System.MethodInfo and other /// info objects coming from the type provider. @@ -351,7 +347,7 @@ module internal ExtensionTyping = let ok, res = d.TryGetValue(st) if ok then Some res else None - member ctxt.RemapTyconRefs (f:obj->obj) = + member ctxt.RemapTyconRefs (f: obj->obj) = match ctxt with | NoEntries -> NoEntries | Entries(d1, d2) -> @@ -359,33 +355,14 @@ module internal ExtensionTyping = for KeyValue (st, tcref) in d2.Force() do dict.Add(st, f tcref) dict)) -#if FX_NO_CUSTOMATTRIBUTEDATA - type CustomAttributeData = Microsoft.FSharp.Core.CompilerServices.IProvidedCustomAttributeData - type CustomAttributeNamedArgument = Microsoft.FSharp.Core.CompilerServices.IProvidedCustomAttributeNamedArgument - type CustomAttributeTypedArgument = Microsoft.FSharp.Core.CompilerServices.IProvidedCustomAttributeTypedArgument -#else type CustomAttributeData = System.Reflection.CustomAttributeData type CustomAttributeNamedArgument = System.Reflection.CustomAttributeNamedArgument type CustomAttributeTypedArgument = System.Reflection.CustomAttributeTypedArgument -#endif [] - type ProvidedType (x:System.Type, ctxt: ProvidedTypeContext) = -#if FX_RESHAPED_REFLECTION - inherit ProvidedMemberInfo(x.GetTypeInfo(), ctxt) -#if FX_NO_CUSTOMATTRIBUTEDATA - let provide () = ProvidedCustomAttributeProvider.Create (fun provider -> provider.GetMemberCustomAttributesData(x.GetTypeInfo()) :> _) -#else - let provide () = ProvidedCustomAttributeProvider.Create (fun _provider -> x.GetTypeInfo().CustomAttributes) -#endif -#else + type ProvidedType (x: System.Type, ctxt: ProvidedTypeContext) = inherit ProvidedMemberInfo(x, ctxt) -#if FX_NO_CUSTOMATTRIBUTEDATA - let provide () = ProvidedCustomAttributeProvider.Create (fun provider -> provider.GetMemberCustomAttributesData(x) :> _) -#else let provide () = ProvidedCustomAttributeProvider.Create (fun _provider -> x.CustomAttributes) -#endif -#endif interface IProvidedCustomAttributeProvider with member __.GetHasTypeProviderEditorHideMethodsAttribute(provider) = provide().GetHasTypeProviderEditorHideMethodsAttribute(provider) member __.GetDefinitionLocationAttribute(provider) = provide().GetDefinitionLocationAttribute(provider) @@ -449,7 +426,7 @@ module internal ExtensionTyping = static member Create ctxt x = match x with null -> null | t -> ProvidedType (t, ctxt) static member CreateWithNullCheck ctxt name x = match x with null -> nullArg name | t -> ProvidedType (t, ctxt) static member CreateArray ctxt xs = match xs with null -> null | _ -> xs |> Array.map (ProvidedType.Create ctxt) - static member CreateNoContext (x:Type) = ProvidedType.Create ProvidedTypeContext.Empty x + static member CreateNoContext (x: Type) = ProvidedType.Create ProvidedTypeContext.Empty x static member Void = ProvidedType.CreateNoContext typeof member __.Handle = x override __.Equals y = assert false; match y with :? ProvidedType as y -> x.Equals y.Handle | _ -> false @@ -457,23 +434,23 @@ module internal ExtensionTyping = member __.TryGetILTypeRef() = ctxt.TryGetILTypeRef x member __.TryGetTyconRef() = ctxt.TryGetTyconRef x member __.Context = ctxt - static member ApplyContext (pt:ProvidedType, ctxt) = ProvidedType(pt.Handle, ctxt) - static member TaintedEquals (pt1:Tainted, pt2:Tainted) = + static member ApplyContext (pt: ProvidedType, ctxt) = ProvidedType(pt.Handle, ctxt) + static member TaintedEquals (pt1: Tainted, pt2: Tainted) = Tainted.EqTainted (pt1.PApplyNoFailure(fun st -> st.Handle)) (pt2.PApplyNoFailure(fun st -> st.Handle)) and [] IProvidedCustomAttributeProvider = - abstract GetDefinitionLocationAttribute : provider:ITypeProvider -> (string * int * int) option - abstract GetXmlDocAttributes : provider:ITypeProvider -> string[] - abstract GetHasTypeProviderEditorHideMethodsAttribute : provider:ITypeProvider -> bool - abstract GetAttributeConstructorArgs: provider:ITypeProvider * attribName:string -> (obj option list * (string * obj option) list) option + abstract GetDefinitionLocationAttribute : provider: ITypeProvider -> (string * int * int) option + abstract GetXmlDocAttributes : provider: ITypeProvider -> string[] + abstract GetHasTypeProviderEditorHideMethodsAttribute : provider: ITypeProvider -> bool + abstract GetAttributeConstructorArgs: provider: ITypeProvider * attribName: string -> (obj option list * (string * obj option) list) option and ProvidedCustomAttributeProvider = static member Create (attributes :(ITypeProvider -> seq)) : IProvidedCustomAttributeProvider = - let (|Member|_|) (s:string) (x: CustomAttributeNamedArgument) = if x.MemberName = s then Some x.TypedValue else None + let (|Member|_|) (s: string) (x: CustomAttributeNamedArgument) = if x.MemberName = s then Some x.TypedValue else None let (|Arg|_|) (x: CustomAttributeTypedArgument) = match x.Value with null -> None | v -> Some v - let findAttribByName tyFullName (a:CustomAttributeData) = (a.Constructor.DeclaringType.FullName = tyFullName) - let findAttrib (ty:System.Type) a = findAttribByName ty.FullName a + let findAttribByName tyFullName (a: CustomAttributeData) = (a.Constructor.DeclaringType.FullName = tyFullName) + let findAttrib (ty: System.Type) a = findAttribByName ty.FullName a { new IProvidedCustomAttributeProvider with member __.GetAttributeConstructorArgs (provider, attribName) = attributes(provider) @@ -514,12 +491,7 @@ module internal ExtensionTyping = and [] ProvidedMemberInfo (x: System.Reflection.MemberInfo, ctxt) = -#if FX_NO_CUSTOMATTRIBUTEDATA - let provide () = ProvidedCustomAttributeProvider.Create (fun provider -> provider.GetMemberCustomAttributesData(x) :> _) -#else let provide () = ProvidedCustomAttributeProvider.Create (fun _provider -> x.CustomAttributes) -#endif - member __.Name = x.Name /// DeclaringType can be null if MemberInfo belongs to Module, not to Type member __.DeclaringType = ProvidedType.Create ctxt x.DeclaringType @@ -531,18 +503,10 @@ module internal ExtensionTyping = and [] ProvidedParameterInfo (x: System.Reflection.ParameterInfo, ctxt) = -#if FX_NO_CUSTOMATTRIBUTEDATA - let provide () = ProvidedCustomAttributeProvider.Create (fun provider -> provider.GetParameterCustomAttributesData(x) :> _) -#else let provide () = ProvidedCustomAttributeProvider.Create (fun _provider -> x.CustomAttributes) -#endif member __.Name = x.Name member __.IsOut = x.IsOut -#if FX_NO_ISIN_ON_PARAMETER_INFO - member __.IsIn = not x.IsOut -#else member __.IsIn = x.IsIn -#endif member __.IsOptional = x.IsOptional member __.RawDefaultValue = x.RawDefaultValue member __.HasDefaultValue = x.Attributes.HasFlag(System.Reflection.ParameterAttributes.HasDefault) @@ -587,9 +551,9 @@ module internal ExtensionTyping = member __.GetParameters() = x.GetParameters() |> ProvidedParameterInfo.CreateArray ctxt member __.GetGenericArguments() = x.GetGenericArguments() |> ProvidedType.CreateArray ctxt member __.Handle = x - static member TaintedGetHashCode (x:Tainted) = + static member TaintedGetHashCode (x: Tainted) = Tainted.GetHashCodeTainted (x.PApplyNoFailure(fun st -> (st.Name, st.DeclaringType.Assembly.FullName, st.DeclaringType.FullName))) - static member TaintedEquals (pt1:Tainted, pt2:Tainted) = + static member TaintedEquals (pt1: Tainted, pt2: Tainted) = Tainted.EqTainted (pt1.PApplyNoFailure(fun st -> st.Handle)) (pt2.PApplyNoFailure(fun st -> st.Handle)) member __.GetStaticParametersForMethod(provider: ITypeProvider) = @@ -610,7 +574,7 @@ module internal ExtensionTyping = staticParams |> ProvidedParameterInfo.CreateArray ctxt - member __.ApplyStaticArgumentsForMethod(provider: ITypeProvider, fullNameAfterArguments:string, staticArgs: obj[]) = + member __.ApplyStaticArgumentsForMethod(provider: ITypeProvider, fullNameAfterArguments: string, staticArgs: obj[]) = let bindingFlags = BindingFlags.Instance ||| BindingFlags.Public ||| BindingFlags.InvokeMethod let mb = @@ -656,7 +620,7 @@ module internal ExtensionTyping = member __.IsFamilyAndAssembly = x.IsFamilyAndAssembly override __.Equals y = assert false; match y with :? ProvidedFieldInfo as y -> x.Equals y.Handle | _ -> false override __.GetHashCode() = assert false; x.GetHashCode() - static member TaintedEquals (pt1:Tainted, pt2:Tainted) = + static member TaintedEquals (pt1: Tainted, pt2: Tainted) = Tainted.EqTainted (pt1.PApplyNoFailure(fun st -> st.Handle)) (pt2.PApplyNoFailure(fun st -> st.Handle)) @@ -692,9 +656,9 @@ module internal ExtensionTyping = member __.Handle = x override __.Equals y = assert false; match y with :? ProvidedPropertyInfo as y -> x.Equals y.Handle | _ -> false override __.GetHashCode() = assert false; x.GetHashCode() - static member TaintedGetHashCode (x:Tainted) = + static member TaintedGetHashCode (x: Tainted) = Tainted.GetHashCodeTainted (x.PApplyNoFailure(fun st -> (st.Name, st.DeclaringType.Assembly.FullName, st.DeclaringType.FullName))) - static member TaintedEquals (pt1:Tainted, pt2:Tainted) = + static member TaintedEquals (pt1: Tainted, pt2: Tainted) = Tainted.EqTainted (pt1.PApplyNoFailure(fun st -> st.Handle)) (pt2.PApplyNoFailure(fun st -> st.Handle)) and [] @@ -709,9 +673,9 @@ module internal ExtensionTyping = member __.Handle = x override __.Equals y = assert false; match y with :? ProvidedEventInfo as y -> x.Equals y.Handle | _ -> false override __.GetHashCode() = assert false; x.GetHashCode() - static member TaintedGetHashCode (x:Tainted) = + static member TaintedGetHashCode (x: Tainted) = Tainted.GetHashCodeTainted (x.PApplyNoFailure(fun st -> (st.Name, st.DeclaringType.Assembly.FullName, st.DeclaringType.FullName))) - static member TaintedEquals (pt1:Tainted, pt2:Tainted) = + static member TaintedEquals (pt1: Tainted, pt2: Tainted) = Tainted.EqTainted (pt1.PApplyNoFailure(fun st -> st.Handle)) (pt2.PApplyNoFailure(fun st -> st.Handle)) and [] @@ -724,7 +688,7 @@ module internal ExtensionTyping = override __.GetHashCode() = assert false; x.GetHashCode() [] - type ProvidedExpr (x:Quotations.Expr, ctxt) = + type ProvidedExpr (x: Quotations.Expr, ctxt) = member __.Type = x.Type |> ProvidedType.Create ctxt member __.Handle = x member __.Context = ctxt @@ -735,42 +699,42 @@ module internal ExtensionTyping = override __.GetHashCode() = x.GetHashCode() [] - type ProvidedVar (x:Quotations.Var, ctxt) = + type ProvidedVar (x: Quotations.Var, ctxt) = member __.Type = x.Type |> ProvidedType.Create ctxt member __.Name = x.Name member __.IsMutable = x.IsMutable member __.Handle = x member __.Context = ctxt static member Create ctxt t = match box t with null -> null | _ -> ProvidedVar (t, ctxt) - static member Fresh (nm, ty:ProvidedType) = ProvidedVar.Create ty.Context (new Quotations.Var(nm, ty.Handle)) + static member Fresh (nm, ty: ProvidedType) = ProvidedVar.Create ty.Context (new Quotations.Var(nm, ty.Handle)) static member CreateArray ctxt xs = match xs with null -> null | _ -> xs |> Array.map (ProvidedVar.Create ctxt) override __.Equals y = match y with :? ProvidedVar as y -> x.Equals y.Handle | _ -> false override __.GetHashCode() = x.GetHashCode() /// Detect a provided new-object expression - let (|ProvidedNewObjectExpr|_|) (x:ProvidedExpr) = + let (|ProvidedNewObjectExpr|_|) (x: ProvidedExpr) = match x.Handle with | Quotations.Patterns.NewObject(ctor, args) -> Some (ProvidedConstructorInfo.Create x.Context ctor, [| for a in args -> ProvidedExpr.Create x.Context a |]) | _ -> None /// Detect a provided while-loop expression - let (|ProvidedWhileLoopExpr|_|) (x:ProvidedExpr) = + let (|ProvidedWhileLoopExpr|_|) (x: ProvidedExpr) = match x.Handle with | Quotations.Patterns.WhileLoop(guardExpr, bodyExpr) -> Some (ProvidedExpr.Create x.Context guardExpr, ProvidedExpr.Create x.Context bodyExpr) | _ -> None /// Detect a provided new-delegate expression - let (|ProvidedNewDelegateExpr|_|) (x:ProvidedExpr) = + let (|ProvidedNewDelegateExpr|_|) (x: ProvidedExpr) = match x.Handle with | Quotations.Patterns.NewDelegate(ty, vs, expr) -> Some (ProvidedType.Create x.Context ty, ProvidedVar.CreateArray x.Context (List.toArray vs), ProvidedExpr.Create x.Context expr) | _ -> None /// Detect a provided call expression - let (|ProvidedCallExpr|_|) (x:ProvidedExpr) = + let (|ProvidedCallExpr|_|) (x: ProvidedExpr) = match x.Handle with | Quotations.Patterns.Call(objOpt, meth, args) -> Some ((match objOpt with None -> None | Some obj -> Some (ProvidedExpr.Create x.Context obj)), @@ -779,87 +743,87 @@ module internal ExtensionTyping = | _ -> None /// Detect a provided default-value expression - let (|ProvidedDefaultExpr|_|) (x:ProvidedExpr) = + let (|ProvidedDefaultExpr|_|) (x: ProvidedExpr) = match x.Handle with | Quotations.Patterns.DefaultValue ty -> Some (ProvidedType.Create x.Context ty) | _ -> None /// Detect a provided constant expression - let (|ProvidedConstantExpr|_|) (x:ProvidedExpr) = + let (|ProvidedConstantExpr|_|) (x: ProvidedExpr) = match x.Handle with | Quotations.Patterns.Value(obj, ty) -> Some (obj, ProvidedType.Create x.Context ty) | _ -> None /// Detect a provided type-as expression - let (|ProvidedTypeAsExpr|_|) (x:ProvidedExpr) = + let (|ProvidedTypeAsExpr|_|) (x: ProvidedExpr) = match x.Handle with | Quotations.Patterns.Coerce(arg, ty) -> Some (ProvidedExpr.Create x.Context arg, ProvidedType.Create x.Context ty) | _ -> None /// Detect a provided new-tuple expression - let (|ProvidedNewTupleExpr|_|) (x:ProvidedExpr) = + let (|ProvidedNewTupleExpr|_|) (x: ProvidedExpr) = match x.Handle with | Quotations.Patterns.NewTuple(args) -> Some (ProvidedExpr.CreateArray x.Context (Array.ofList args)) | _ -> None /// Detect a provided tuple-get expression - let (|ProvidedTupleGetExpr|_|) (x:ProvidedExpr) = + let (|ProvidedTupleGetExpr|_|) (x: ProvidedExpr) = match x.Handle with | Quotations.Patterns.TupleGet(arg, n) -> Some (ProvidedExpr.Create x.Context arg, n) | _ -> None /// Detect a provided new-array expression - let (|ProvidedNewArrayExpr|_|) (x:ProvidedExpr) = + let (|ProvidedNewArrayExpr|_|) (x: ProvidedExpr) = match x.Handle with | Quotations.Patterns.NewArray(ty, args) -> Some (ProvidedType.Create x.Context ty, ProvidedExpr.CreateArray x.Context (Array.ofList args)) | _ -> None /// Detect a provided sequential expression - let (|ProvidedSequentialExpr|_|) (x:ProvidedExpr) = + let (|ProvidedSequentialExpr|_|) (x: ProvidedExpr) = match x.Handle with | Quotations.Patterns.Sequential(e1, e2) -> Some (ProvidedExpr.Create x.Context e1, ProvidedExpr.Create x.Context e2) | _ -> None /// Detect a provided lambda expression - let (|ProvidedLambdaExpr|_|) (x:ProvidedExpr) = + let (|ProvidedLambdaExpr|_|) (x: ProvidedExpr) = match x.Handle with | Quotations.Patterns.Lambda(v, body) -> Some (ProvidedVar.Create x.Context v, ProvidedExpr.Create x.Context body) | _ -> None /// Detect a provided try/finally expression - let (|ProvidedTryFinallyExpr|_|) (x:ProvidedExpr) = + let (|ProvidedTryFinallyExpr|_|) (x: ProvidedExpr) = match x.Handle with | Quotations.Patterns.TryFinally(b1, b2) -> Some (ProvidedExpr.Create x.Context b1, ProvidedExpr.Create x.Context b2) | _ -> None /// Detect a provided try/with expression - let (|ProvidedTryWithExpr|_|) (x:ProvidedExpr) = + let (|ProvidedTryWithExpr|_|) (x: ProvidedExpr) = match x.Handle with | Quotations.Patterns.TryWith(b, v1, e1, v2, e2) -> Some (ProvidedExpr.Create x.Context b, ProvidedVar.Create x.Context v1, ProvidedExpr.Create x.Context e1, ProvidedVar.Create x.Context v2, ProvidedExpr.Create x.Context e2) | _ -> None #if PROVIDED_ADDRESS_OF - let (|ProvidedAddressOfExpr|_|) (x:ProvidedExpr) = + let (|ProvidedAddressOfExpr|_|) (x: ProvidedExpr) = match x.Handle with | Quotations.Patterns.AddressOf(e) -> Some (ProvidedExpr.Create x.Context e) | _ -> None #endif /// Detect a provided type-test expression - let (|ProvidedTypeTestExpr|_|) (x:ProvidedExpr) = + let (|ProvidedTypeTestExpr|_|) (x: ProvidedExpr) = match x.Handle with | Quotations.Patterns.TypeTest(e, ty) -> Some (ProvidedExpr.Create x.Context e, ProvidedType.Create x.Context ty) | _ -> None /// Detect a provided 'let' expression - let (|ProvidedLetExpr|_|) (x:ProvidedExpr) = + let (|ProvidedLetExpr|_|) (x: ProvidedExpr) = match x.Handle with | Quotations.Patterns.Let(v, e, b) -> Some (ProvidedVar.Create x.Context v, ProvidedExpr.Create x.Context e, ProvidedExpr.Create x.Context b) | _ -> None /// Detect a provided expression which is a for-loop over integers - let (|ProvidedForIntegerRangeLoopExpr|_|) (x:ProvidedExpr) = + let (|ProvidedForIntegerRangeLoopExpr|_|) (x: ProvidedExpr) = match x.Handle with | Quotations.Patterns.ForIntegerRangeLoop (v, e1, e2, e3) -> Some (ProvidedVar.Create x.Context v, @@ -869,19 +833,19 @@ module internal ExtensionTyping = | _ -> None /// Detect a provided 'set variable' expression - let (|ProvidedVarSetExpr|_|) (x:ProvidedExpr) = + let (|ProvidedVarSetExpr|_|) (x: ProvidedExpr) = match x.Handle with | Quotations.Patterns.VarSet(v, e) -> Some (ProvidedVar.Create x.Context v, ProvidedExpr.Create x.Context e) | _ -> None /// Detect a provided 'IfThenElse' expression - let (|ProvidedIfThenElseExpr|_|) (x:ProvidedExpr) = + let (|ProvidedIfThenElseExpr|_|) (x: ProvidedExpr) = match x.Handle with | Quotations.Patterns.IfThenElse(g, t, e) -> Some (ProvidedExpr.Create x.Context g, ProvidedExpr.Create x.Context t, ProvidedExpr.Create x.Context e) | _ -> None /// Detect a provided 'Var' expression - let (|ProvidedVarExpr|_|) (x:ProvidedExpr) = + let (|ProvidedVarExpr|_|) (x: ProvidedExpr) = match x.Handle with | Quotations.Patterns.Var v -> Some (ProvidedVar.Create x.Context v) | _ -> None @@ -891,7 +855,7 @@ module internal ExtensionTyping = provider.GetInvokerExpression(methodBase.Handle, [| for p in paramExprs -> Quotations.Expr.Var(p.Handle) |]) |> ProvidedExpr.Create methodBase.Context /// Compute the Name or FullName property of a provided type, reporting appropriate errors - let CheckAndComputeProvidedNameProperty(m, st:Tainted, proj, propertyString) = + let CheckAndComputeProvidedNameProperty(m, st: Tainted, proj, propertyString) = let name = try st.PUntaint(proj, m) with :? TypeProviderError as tpe -> @@ -902,7 +866,7 @@ module internal ExtensionTyping = name /// Verify that this type provider has supported attributes - let ValidateAttributesOfProvidedType (m, st:Tainted) = + let ValidateAttributesOfProvidedType (m, st: Tainted) = let fullName = CheckAndComputeProvidedNameProperty(m, st, (fun st -> st.FullName), "FullName") if TryTypeMember(st, fullName, "IsGenericType", m, false, fun st->st.IsGenericType) |> unmarshal then errorR(Error(FSComp.SR.etMustNotBeGeneric(fullName), m)) @@ -918,7 +882,7 @@ module internal ExtensionTyping = raise (TypeProviderError(FSComp.SR.etProvidedTypeHasUnexpectedName(expectedName, name), st.TypeProviderDesignation, m)) let namespaceName = TryTypeMember(st, name, "Namespace", m, "", fun st -> st.Namespace) |> unmarshal - let rec declaringTypes (st:Tainted) accu = + let rec declaringTypes (st: Tainted) accu = match TryTypeMember(st, name, "DeclaringType", m, null, fun st -> st.DeclaringType) with | Tainted.Null -> accu | dt -> declaringTypes dt (CheckAndComputeProvidedNameProperty(m, dt, (fun dt -> dt.Name), "Name")::accu) @@ -934,7 +898,7 @@ module internal ExtensionTyping = errorR(Error(FSComp.SR.etProvidedTypeHasUnexpectedPath(expectedPath, path), m)) /// Eagerly validate a range of conditions on a provided type, after static instantiation (if any) has occurred - let ValidateProvidedTypeAfterStaticInstantiation(m, st:Tainted, expectedPath : string[], expectedName : string) = + let ValidateProvidedTypeAfterStaticInstantiation(m, st: Tainted, expectedPath : string[], expectedName : string) = // Do all the calling into st up front with recovery let fullName, namespaceName, usedMembers = let name = CheckAndComputeProvidedNameProperty(m, st, (fun st -> st.Name), "Name") @@ -1036,7 +1000,7 @@ module internal ExtensionTyping = | None -> errorR(Error(FSComp.SR.etUnsupportedMemberKind(memberName, fullName), m)) - let ValidateProvidedTypeDefinition(m, st:Tainted, expectedPath : string[], expectedName : string) = + let ValidateProvidedTypeDefinition(m, st: Tainted, expectedPath : string[], expectedName : string) = // Validate the Name, Namespace and FullName properties let name = CheckAndComputeProvidedNameProperty(m, st, (fun st -> st.Name), "Name") @@ -1059,7 +1023,7 @@ module internal ExtensionTyping = /// Resolve a (non-nested) provided type given a full namespace name and a type name. /// May throw an exception which will be turned into an error message by one of the 'Try' function below. /// If resolution is successful the type is then validated. - let ResolveProvidedType (resolver:Tainted, m, moduleOrNamespace:string[], typeName) = + let ResolveProvidedType (resolver: Tainted, m, moduleOrNamespace: string[], typeName) = let displayName = String.Join(".", moduleOrNamespace) // Try to find the type in the given provided namespace @@ -1091,7 +1055,7 @@ module internal ExtensionTyping = | Some res -> res /// Try to resolve a type against the given host with the given resolution environment. - let TryResolveProvidedType(resolver:Tainted, m, moduleOrNamespace, typeName) = + let TryResolveProvidedType(resolver: Tainted, m, moduleOrNamespace, typeName) = try match ResolveProvidedType(resolver, m, moduleOrNamespace, typeName) with | Tainted.Null -> None @@ -1100,8 +1064,8 @@ module internal ExtensionTyping = errorRecovery e m None - let ILPathToProvidedType (st:Tainted, m) = - let nameContrib (st:Tainted) = + let ILPathToProvidedType (st: Tainted, m) = + let nameContrib (st: Tainted) = let typeName = st.PUntaint((fun st -> st.Name), m) match st.PApply((fun st -> st.DeclaringType), m) with | Tainted.Null -> @@ -1110,7 +1074,7 @@ module internal ExtensionTyping = | ns -> ns + "." + typeName | _ -> typeName - let rec encContrib (st:Tainted) = + let rec encContrib (st: Tainted) = match st.PApply((fun st ->st.DeclaringType), m) with | Tainted.Null -> [] | enc -> encContrib enc @ [ nameContrib enc ] @@ -1125,7 +1089,7 @@ module internal ExtensionTyping = PrettyNaming.computeMangledNameWithoutDefaultArgValues(nm, staticArgs, defaultArgValues) /// Apply the given provided method to the given static arguments (the arguments are assumed to have been sorted into application order) - let TryApplyProvidedMethod(methBeforeArgs:Tainted, staticArgs:obj[], m:range) = + let TryApplyProvidedMethod(methBeforeArgs: Tainted, staticArgs: obj[], m: range) = if staticArgs.Length = 0 then Some methBeforeArgs else @@ -1145,9 +1109,9 @@ module internal ExtensionTyping = /// Apply the given provided type to the given static arguments (the arguments are assumed to have been sorted into application order - let TryApplyProvidedType(typeBeforeArguments:Tainted, optGeneratedTypePath: string list option, staticArgs:obj[], m:range) = + let TryApplyProvidedType(typeBeforeArguments: Tainted, optGeneratedTypePath: string list option, staticArgs: obj[], m: range) = if staticArgs.Length = 0 then - Some (typeBeforeArguments , (fun () -> ())) + Some (typeBeforeArguments, (fun () -> ())) else let fullTypePathAfterArguments = @@ -1174,7 +1138,7 @@ module internal ExtensionTyping = /// Given a mangled name reference to a non-nested provided type, resolve it. /// If necessary, demangle its static arguments before applying them. - let TryLinkProvidedType(resolver:Tainted, moduleOrNamespace:string[], typeLogicalName:string, m:range) = + let TryLinkProvidedType(resolver: Tainted, moduleOrNamespace: string[], typeLogicalName: string, m: range) = // Demangle the static parameters let typeName, argNamesAndValues = @@ -1242,24 +1206,24 @@ module internal ExtensionTyping = | None -> None /// Get the parts of a .NET namespace. Special rules: null means global, empty is not allowed. - let GetPartsOfNamespaceRecover(namespaceName:string) = + let GetPartsOfNamespaceRecover(namespaceName: string) = if namespaceName=null then [] elif namespaceName.Length = 0 then [""] else splitNamespace namespaceName /// Get the parts of a .NET namespace. Special rules: null means global, empty is not allowed. - let GetProvidedNamespaceAsPath (m, resolver:Tainted, namespaceName:string) = + let GetProvidedNamespaceAsPath (m, resolver: Tainted, namespaceName: string) = if namespaceName<>null && namespaceName.Length = 0 then errorR(Error(FSComp.SR.etEmptyNamespaceNotAllowed(DisplayNameOfTypeProvider(resolver.TypeProvider, m)), m)) GetPartsOfNamespaceRecover namespaceName /// Get the parts of the name that encloses the .NET type including nested types. - let GetFSharpPathToProvidedType (st:Tainted, m) = + let GetFSharpPathToProvidedType (st: Tainted, m) = // Can't use st.Fullname because it may be like IEnumerable // We want [System;Collections;Generic] let namespaceParts = GetPartsOfNamespaceRecover(st.PUntaint((fun st -> st.Namespace), m)) - let rec walkUpNestedClasses(st:Tainted, soFar) = + let rec walkUpNestedClasses(st: Tainted, soFar) = match st with | Tainted.Null -> soFar | st -> walkUpNestedClasses(st.PApply((fun st ->st.DeclaringType), m), soFar) @ [st.PUntaint((fun st -> st.Name), m)] @@ -1269,13 +1233,13 @@ module internal ExtensionTyping = /// Get the ILAssemblyRef for a provided assembly. Do not take into account /// any type relocations or static linking for generated types. - let GetOriginalILAssemblyRefOfProvidedAssembly (assembly:Tainted, m) = + let GetOriginalILAssemblyRefOfProvidedAssembly (assembly: Tainted, m) = let aname = assembly.PUntaint((fun assembly -> assembly.GetName()), m) ILAssemblyRef.FromAssemblyName aname /// 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. - let GetOriginalILTypeRefOfProvidedType (st:Tainted, m) = + let GetOriginalILTypeRefOfProvidedType (st: Tainted, m) = let aref = GetOriginalILAssemblyRefOfProvidedAssembly (st.PApply((fun st -> st.Assembly), m), m) let scoperef = ILScopeRef.Assembly aref @@ -1285,7 +1249,7 @@ module internal ExtensionTyping = /// Get the ILTypeRef for the provided type (including for nested types). Take into account /// any type relocations or static linking for generated types. - let GetILTypeRefOfProvidedType (st:Tainted, m) = + let GetILTypeRefOfProvidedType (st: Tainted, m) = match st.PUntaint((fun st -> st.TryGetILTypeRef()), m) with | Some ilTypeRef -> ilTypeRef | None -> GetOriginalILTypeRefOfProvidedType (st, m) diff --git a/src/fcs-fable/src/fsharp/ExtensionTyping.fsi b/src/fcs-fable/src/fsharp/ExtensionTyping.fsi index f062717fec..d4b58be8cb 100755 --- a/src/fcs-fable/src/fsharp/ExtensionTyping.fsi +++ b/src/fcs-fable/src/fsharp/ExtensionTyping.fsi @@ -85,12 +85,6 @@ module internal ExtensionTyping = /// Map the TyconRef objects, if any member RemapTyconRefs : (obj -> obj) -> ProvidedTypeContext - -#if FX_NO_CUSTOMATTRIBUTEDATA - type CustomAttributeData = Microsoft.FSharp.Core.CompilerServices.IProvidedCustomAttributeData - type CustomAttributeNamedArgument = Microsoft.FSharp.Core.CompilerServices.IProvidedCustomAttributeNamedArgument - type CustomAttributeTypedArgument = Microsoft.FSharp.Core.CompilerServices.IProvidedCustomAttributeTypedArgument -#endif type [] ProvidedType = diff --git a/src/fcs-fable/src/fsharp/FindUnsolved.fs b/src/fcs-fable/src/fsharp/FindUnsolved.fs index 386545c7e2..280a623460 100755 --- a/src/fcs-fable/src/fsharp/FindUnsolved.fs +++ b/src/fcs-fable/src/fsharp/FindUnsolved.fs @@ -35,95 +35,119 @@ let accTypeInst cenv env tyargs = let rec accExpr (cenv:cenv) (env:env) expr = let expr = stripExpr expr match expr with - | Expr.Sequential (e1,e2,_,_,_) -> + | Expr.Sequential (e1, e2, _, _, _) -> accExpr cenv env e1 accExpr cenv env e2 - | Expr.Let (bind,body,_,_) -> + + | Expr.Let (bind, body, _, _) -> accBind cenv env bind accExpr cenv env body - | Expr.Const (_,_,ty) -> + + | Expr.Const (_, _, ty) -> accTy cenv env ty - | Expr.Val (_v,_vFlags,_m) -> () - | Expr.Quote(ast,_,_,_m,ty) -> + | Expr.Val (_v, _vFlags, _m) -> () + + | Expr.Quote(ast, _, _, _m, ty) -> accExpr cenv env ast accTy cenv env ty - | Expr.Obj (_,ty,basev,basecall,overrides,iimpls,_m) -> + + | Expr.Obj (_, ty, basev, basecall, overrides, iimpls, _m) -> accTy cenv env ty accExpr cenv env basecall accMethods cenv env basev overrides accIntfImpls cenv env basev iimpls - | Expr.Op (c,tyargs,args,m) -> - accOp cenv env (c,tyargs,args,m) - | Expr.App(f,fty,tyargs,argsl,_m) -> + + | LinearOpExpr (_op, tyargs, argsHead, argLast, _m) -> + // Note, LinearOpExpr doesn't include any of the "special" cases for accOp + accTypeInst cenv env tyargs + accExprs cenv env argsHead + // tailcall + accExpr cenv env argLast + + | Expr.Op (c, tyargs, args, m) -> + accOp cenv env (c, tyargs, args, m) + + | Expr.App(f, fty, tyargs, argsl, _m) -> accTy cenv env fty accTypeInst cenv env tyargs accExpr cenv env f accExprs cenv env argsl - | Expr.Lambda(_,_ctorThisValOpt,_baseValOpt,argvs,_body,m,rty) -> - let topValInfo = ValReprInfo ([],[argvs |> List.map (fun _ -> ValReprInfo.unnamedTopArg1)],ValReprInfo.unnamedRetVal) + + | Expr.Lambda(_, _ctorThisValOpt, _baseValOpt, argvs, _body, m, rty) -> + let topValInfo = ValReprInfo ([], [argvs |> List.map (fun _ -> ValReprInfo.unnamedTopArg1)], ValReprInfo.unnamedRetVal) let ty = mkMultiLambdaTy m argvs rty accLambdas cenv env topValInfo expr ty - | Expr.TyLambda(_,tps,_body,_m,rty) -> - let topValInfo = ValReprInfo (ValReprInfo.InferTyparInfo tps,[],ValReprInfo.unnamedRetVal) + + | Expr.TyLambda(_, tps, _body, _m, rty) -> + let topValInfo = ValReprInfo (ValReprInfo.InferTyparInfo tps, [], ValReprInfo.unnamedRetVal) accTy cenv env rty let ty = mkForallTyIfNeeded tps rty accLambdas cenv env topValInfo expr ty - | Expr.TyChoose(_tps,e1,_m) -> + + | Expr.TyChoose(_tps, e1, _m) -> accExpr cenv env e1 - | Expr.Match(_,_exprm,dtree,targets,m,ty) -> + + | Expr.Match(_, _exprm, dtree, targets, m, ty) -> accTy cenv env ty accDTree cenv env dtree accTargets cenv env m ty targets - | Expr.LetRec (binds,e,_m,_) -> + + | Expr.LetRec (binds, e, _m, _) -> accBinds cenv env binds accExpr cenv env e - | Expr.StaticOptimization (constraints,e2,e3,_m) -> + + | Expr.StaticOptimization (constraints, e2, e3, _m) -> accExpr cenv env e2 accExpr cenv env e3 constraints |> List.iter (function - | TTyconEqualsTycon(ty1,ty2) -> + | TTyconEqualsTycon(ty1, ty2) -> accTy cenv env ty1 accTy cenv env ty2 | TTyconIsStruct(ty1) -> accTy cenv env ty1) + | Expr.Link _eref -> failwith "Unexpected reclink" -and accMethods cenv env baseValOpt l = List.iter (accMethod cenv env baseValOpt) l -and accMethod cenv env _baseValOpt (TObjExprMethod(_slotsig,_attribs,_tps,vs,e,_m)) = +and accMethods cenv env baseValOpt l = + List.iter (accMethod cenv env baseValOpt) l + +and accMethod cenv env _baseValOpt (TObjExprMethod(_slotsig, _attribs, _tps, vs, e, _m)) = vs |> List.iterSquared (accVal cenv env) accExpr cenv env e -and accIntfImpls cenv env baseValOpt l = List.iter (accIntfImpl cenv env baseValOpt) l -and accIntfImpl cenv env baseValOpt (ty,overrides) = +and accIntfImpls cenv env baseValOpt l = + List.iter (accIntfImpl cenv env baseValOpt) l + +and accIntfImpl cenv env baseValOpt (ty, overrides) = accTy cenv env ty accMethods cenv env baseValOpt overrides -and accOp cenv env (op,tyargs,args,_m) = +and accOp cenv env (op, tyargs, args, _m) = // Special cases accTypeInst cenv env tyargs accExprs cenv env args match op with // Handle these as special cases since mutables are allowed inside their bodies - | TOp.ILCall (_,_,_,_,_,_,_,_,enclTypeArgs,methTypeArgs,tys) -> + | TOp.ILCall (_, _, _, _, _, _, _, _, enclTypeArgs, methTypeArgs, tys) -> accTypeInst cenv env enclTypeArgs accTypeInst cenv env methTypeArgs accTypeInst cenv env tys - | TOp.TraitCall(TTrait(tys,_nm,_,argtys,rty,_sln)) -> + | TOp.TraitCall(TTrait(tys, _nm, _, argtys, rty, _sln)) -> argtys |> accTypeInst cenv env rty |> Option.iter (accTy cenv env) tys |> List.iter (accTy cenv env) - | TOp.ILAsm (_,tys) -> + | TOp.ILAsm (_, tys) -> accTypeInst cenv env tys | _ -> () and accLambdas cenv env topValInfo e ety = match e with - | Expr.TyChoose(_tps,e1,_m) -> accLambdas cenv env topValInfo e1 ety + | Expr.TyChoose(_tps, e1, _m) -> accLambdas cenv env topValInfo e1 ety | Expr.Lambda _ | Expr.TyLambda _ -> - let _tps,ctorThisValOpt,baseValOpt,vsl,body,bodyty = destTopLambda cenv.g cenv.amap topValInfo (e, ety) + let _tps, ctorThisValOpt, baseValOpt, vsl, body, bodyty = destTopLambda cenv.g cenv.amap topValInfo (e, ety) accTy cenv env bodyty vsl |> List.iterSquared (accVal cenv env) baseValOpt |> Option.iter (accVal cenv env) @@ -132,46 +156,50 @@ and accLambdas cenv env topValInfo e ety = | _ -> accExpr cenv env e -and accExprs cenv env exprs = exprs |> List.iter (accExpr cenv env) +and accExprs cenv env exprs = + exprs |> List.iter (accExpr cenv env) -and accTargets cenv env m ty targets = Array.iter (accTarget cenv env m ty) targets +and accTargets cenv env m ty targets = + Array.iter (accTarget cenv env m ty) targets -and accTarget cenv env _m _ty (TTarget(_vs,e,_)) = accExpr cenv env e +and accTarget cenv env _m _ty (TTarget(_vs, e, _)) = + accExpr cenv env e and accDTree cenv env x = match x with - | TDSuccess (es,_n) -> accExprs cenv env es - | TDBind(bind,rest) -> accBind cenv env bind; accDTree cenv env rest - | TDSwitch (e,cases,dflt,m) -> accSwitch cenv env (e,cases,dflt,m) + | TDSuccess (es, _n) -> accExprs cenv env es + | TDBind(bind, rest) -> accBind cenv env bind; accDTree cenv env rest + | TDSwitch (e, cases, dflt, m) -> accSwitch cenv env (e, cases, dflt, m) -and accSwitch cenv env (e,cases,dflt,_m) = +and accSwitch cenv env (e, cases, dflt, _m) = accExpr cenv env e - cases |> List.iter (fun (TCase(discrim,e)) -> accDiscrim cenv env discrim; accDTree cenv env e) + cases |> List.iter (fun (TCase(discrim, e)) -> accDiscrim cenv env discrim; accDTree cenv env e) dflt |> Option.iter (accDTree cenv env) and accDiscrim cenv env d = match d with - | DecisionTreeTest.UnionCase(_ucref,tinst) -> accTypeInst cenv env tinst - | DecisionTreeTest.ArrayLength(_,ty) -> accTy cenv env ty + | DecisionTreeTest.UnionCase(_ucref, tinst) -> accTypeInst cenv env tinst + | DecisionTreeTest.ArrayLength(_, ty) -> accTy cenv env ty | DecisionTreeTest.Const _ | DecisionTreeTest.IsNull -> () - | DecisionTreeTest.IsInst (srcty,tgty) -> accTy cenv env srcty; accTy cenv env tgty + | DecisionTreeTest.IsInst (srcty, tgty) -> accTy cenv env srcty; accTy cenv env tgty | DecisionTreeTest.ActivePatternCase (exp, tys, _, _, _) -> accExpr cenv env exp accTypeInst cenv env tys -and accAttrib cenv env (Attrib(_,_k,args,props,_,_,_m)) = - args |> List.iter (fun (AttribExpr(expr1,expr2)) -> +and accAttrib cenv env (Attrib(_, _k, args, props, _, _, _m)) = + args |> List.iter (fun (AttribExpr(expr1, expr2)) -> accExpr cenv env expr1 accExpr cenv env expr2) - props |> List.iter (fun (AttribNamedArg(_nm,ty,_flg,AttribExpr(expr,expr2))) -> + props |> List.iter (fun (AttribNamedArg(_nm, ty, _flg, AttribExpr(expr, expr2))) -> accExpr cenv env expr accExpr cenv env expr2 accTy cenv env ty) -and accAttribs cenv env attribs = List.iter (accAttrib cenv env) attribs +and accAttribs cenv env attribs = + List.iter (accAttrib cenv env) attribs -and accValReprInfo cenv env (ValReprInfo(_,args,ret)) = +and accValReprInfo cenv env (ValReprInfo(_, args, ret)) = args |> List.iterSquared (accArgReprInfo cenv env) ret |> accArgReprInfo cenv env @@ -188,7 +216,8 @@ and accBind cenv env (bind:Binding) = let topValInfo = match bind.Var.ValReprInfo with Some info -> info | _ -> ValReprInfo.emptyValData accLambdas cenv env topValInfo bind.Expr bind.Var.Type -and accBinds cenv env xs = xs |> List.iter (accBind cenv env) +and accBinds cenv env xs = + xs |> List.iter (accBind cenv env) let accTyconRecdField cenv env _tycon (rfield:RecdField) = accAttribs cenv env rfield.PropertyAttribs @@ -203,30 +232,36 @@ let accTycon cenv env (tycon:Tycon) = accAttribs cenv env uc.Attribs uc.RecdFieldsArray |> Array.iter (accTyconRecdField cenv env tycon)) -let accTycons cenv env tycons = List.iter (accTycon cenv env) tycons +let accTycons cenv env tycons = + List.iter (accTycon cenv env) tycons let rec accModuleOrNamespaceExpr cenv env x = match x with | ModuleOrNamespaceExprWithSig(_mty, def, _m) -> accModuleOrNamespaceDef cenv env def -and accModuleOrNamespaceDefs cenv env x = List.iter (accModuleOrNamespaceDef cenv env) x +and accModuleOrNamespaceDefs cenv env x = + List.iter (accModuleOrNamespaceDef cenv env) x and accModuleOrNamespaceDef cenv env x = match x with - | TMDefRec(_,tycons,mbinds,_m) -> + | TMDefRec(_, tycons, mbinds, _m) -> accTycons cenv env tycons accModuleOrNamespaceBinds cenv env mbinds - | TMDefLet(bind,_m) -> accBind cenv env bind - | TMDefDo(e,_m) -> accExpr cenv env e + | TMDefLet(bind, _m) -> accBind cenv env bind + | TMDefDo(e, _m) -> accExpr cenv env e | TMAbstract(def) -> accModuleOrNamespaceExpr cenv env def | TMDefs(defs) -> accModuleOrNamespaceDefs cenv env defs -and accModuleOrNamespaceBinds cenv env xs = List.iter (accModuleOrNamespaceBind cenv env) xs +and accModuleOrNamespaceBinds cenv env xs = + List.iter (accModuleOrNamespaceBind cenv env) xs and accModuleOrNamespaceBind cenv env x = match x with - | ModuleOrNamespaceBinding.Binding bind -> accBind cenv env bind - | ModuleOrNamespaceBinding.Module(mspec, rhs) -> accTycon cenv env mspec; accModuleOrNamespaceDef cenv env rhs + | ModuleOrNamespaceBinding.Binding bind -> + accBind cenv env bind + | ModuleOrNamespaceBinding.Module(mspec, rhs) -> + accTycon cenv env mspec + accModuleOrNamespaceDef cenv env rhs let UnsolvedTyparsOfModuleDef g amap denv (mdef, extraAttribs) = let cenv = diff --git a/src/fcs-fable/src/fsharp/IlxGen.fs b/src/fcs-fable/src/fsharp/IlxGen.fs index ebe0918296..6b7bda2370 100755 --- a/src/fcs-fable/src/fsharp/IlxGen.fs +++ b/src/fcs-fable/src/fsharp/IlxGen.fs @@ -1,8 +1,8 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. //-------------------------------------------------------------------------- -// The ILX generator. -//-------------------------------------------------------------------------- +// The ILX generator. +//-------------------------------------------------------------------------- module internal FSharp.Compiler.IlxGen @@ -13,15 +13,15 @@ open System.Collections.Generic open Internal.Utilities open Internal.Utilities.Collections -open FSharp.Compiler.AbstractIL -open FSharp.Compiler.AbstractIL.IL -open FSharp.Compiler.AbstractIL.Internal +open FSharp.Compiler.AbstractIL +open FSharp.Compiler.AbstractIL.IL +open FSharp.Compiler.AbstractIL.Internal open FSharp.Compiler.AbstractIL.Internal.Library open FSharp.Compiler.AbstractIL.Extensions.ILX open FSharp.Compiler.AbstractIL.Extensions.ILX.Types -open FSharp.Compiler.AbstractIL.Internal.BinaryConstants +open FSharp.Compiler.AbstractIL.Internal.BinaryConstants -open FSharp.Compiler +open FSharp.Compiler open FSharp.Compiler.AttributeChecking open FSharp.Compiler.Ast open FSharp.Compiler.ErrorLogger @@ -36,93 +36,112 @@ open FSharp.Compiler.Tastops open FSharp.Compiler.Tastops.DebugPrint open FSharp.Compiler.TcGlobals open FSharp.Compiler.TypeRelations - -let IsNonErasedTypar (tp:Typar) = not tp.IsErased -let DropErasedTypars (tps:Typar list) = tps |> List.filter IsNonErasedTypar -let DropErasedTyargs tys = tys |> List.filter (fun ty -> match ty with TType_measure _ -> false | _ -> true) -let AddNonUserCompilerGeneratedAttribs (g: TcGlobals) (mdef:ILMethodDef) = g.AddMethodGeneratedAttributes mdef +let IsNonErasedTypar (tp: Typar) = + not tp.IsErased + +let DropErasedTypars (tps: Typar list) = + tps |> List.filter IsNonErasedTypar + +let DropErasedTyargs tys = + tys |> List.filter (fun ty -> match ty with TType_measure _ -> false | _ -> true) + +let AddNonUserCompilerGeneratedAttribs (g: TcGlobals) (mdef: ILMethodDef) = + g.AddMethodGeneratedAttributes mdef let debugDisplayMethodName = "__DebugDisplay" let useHiddenInitCode = true -//-------------------------------------------------------------------------- -// misc -//-------------------------------------------------------------------------- +let iLdcZero = AI_ldc (DT_I4, ILConst.I4 0) + +let iLdcInt64 i = AI_ldc (DT_I8, ILConst.I8 i) -let iLdcZero = AI_ldc (DT_I4,ILConst.I4 0) -let iLdcInt64 i = AI_ldc (DT_I8,ILConst.I8 i) -let iLdcDouble i = AI_ldc (DT_R8,ILConst.R8 i) -let iLdcSingle i = AI_ldc (DT_R4,ILConst.R4 i) +let iLdcDouble i = AI_ldc (DT_R8, ILConst.R8 i) + +let iLdcSingle i = AI_ldc (DT_R4, ILConst.R4 i) /// Make a method that simply loads a field -let mkLdfldMethodDef (ilMethName,reprAccess,isStatic,ilTy,ilFieldName,ilPropType) = - let ilFieldSpec = mkILFieldSpecInTy(ilTy,ilFieldName,ilPropType) +let mkLdfldMethodDef (ilMethName, reprAccess, isStatic, ilTy, ilFieldName, ilPropType) = + let ilFieldSpec = mkILFieldSpecInTy(ilTy, ilFieldName, ilPropType) let ilReturn = mkILReturn ilPropType - let ilMethodDef = - if isStatic then - mkILNonGenericStaticMethod (ilMethName,reprAccess,[],ilReturn,mkMethodBody(true,[],2,nonBranchingInstrsToCode [mkNormalLdsfld ilFieldSpec],None)) - else - mkILNonGenericInstanceMethod (ilMethName,reprAccess,[],ilReturn,mkMethodBody (true,[],2,nonBranchingInstrsToCode [ mkLdarg0; mkNormalLdfld ilFieldSpec],None)) + let ilMethodDef = + if isStatic then + mkILNonGenericStaticMethod (ilMethName, reprAccess, [], ilReturn, mkMethodBody(true, [], 2, nonBranchingInstrsToCode [mkNormalLdsfld ilFieldSpec], None)) + else + mkILNonGenericInstanceMethod (ilMethName, reprAccess, [], ilReturn, mkMethodBody (true, [], 2, nonBranchingInstrsToCode [ mkLdarg0; mkNormalLdfld ilFieldSpec], None)) ilMethodDef.WithSpecialName -let ChooseParamNames fieldNamesAndTypes = +/// Choose the constructor parameter names for fields +let ChooseParamNames fieldNamesAndTypes = let takenFieldNames = fieldNamesAndTypes |> List.map p23 |> Set.ofList fieldNamesAndTypes - |> List.map (fun (ilPropName,ilFieldName,ilPropType) -> - let lowerPropName = String.uncapitalize ilPropName - let ilParamName = if takenFieldNames.Contains(lowerPropName) then ilPropName else lowerPropName - ilParamName,ilFieldName,ilPropType) + |> List.map (fun (ilPropName, ilFieldName, ilPropType) -> + let lowerPropName = String.uncapitalize ilPropName + let ilParamName = if takenFieldNames.Contains(lowerPropName) then ilPropName else lowerPropName + ilParamName, ilFieldName, ilPropType) -let markup s = Seq.indexed s - -// Approximation for purposes of optimization and giving a warning when compiling definition-only files as EXEs -let rec CheckCodeDoesSomething (code: ILCode) = - code.Instrs |> Array.exists (function AI_ldnull | AI_nop | AI_pop | I_ret | I_seqpoint _ -> false | _ -> true) +/// Approximation for purposes of optimization and giving a warning when compiling definition-only files as EXEs +let rec CheckCodeDoesSomething (code: ILCode) = + code.Instrs |> Array.exists (function AI_ldnull | AI_nop | AI_pop | I_ret | I_seqpoint _ -> false | _ -> true) +/// Choose the field names for variables captured by closures let ChooseFreeVarNames takenNames ts = - let tns = List.map (fun t -> (t,None)) ts - let rec chooseName names (t,nOpt) = + let tns = List.map (fun t -> (t, None)) ts + let rec chooseName names (t, nOpt) = let tn = match nOpt with None -> t | Some n -> t + string n if Zset.contains tn names then - chooseName names (t,Some(match nOpt with None -> 0 | Some n -> (n+1))) + chooseName names (t, Some(match nOpt with None -> 0 | Some n -> (n+1))) else let names = Zset.add tn names - tn,names + tn, names - let names = Zset.empty String.order |> Zset.addList takenNames - let ts,_names = List.mapFold chooseName names tns + let names = Zset.empty String.order |> Zset.addList takenNames + let ts, _names = List.mapFold chooseName names tns ts +/// +++GLOBAL STATE: a name generator used by IlxGen for static fields, some generated arguments and other things. +/// REVIEW: this will mean the hosted compiler service is not deterministic. We should at least create a new one +/// of these for each compilation. let ilxgenGlobalNng = NiceNameGenerator () -// We can't tailcall to methods taking byrefs. This helper helps search for them -let IsILTypeByref = function ILType.Byref _ -> true | _ -> false +/// We can't tailcall to methods taking byrefs. This helper helps search for them +let IsILTypeByref = function ILType.Byref _ -> true | _ -> false let mainMethName = CompilerGeneratedName "main" -type AttributeDecoder(namedArgs) = - let nameMap = namedArgs |> List.map (fun (AttribNamedArg(s,_,_,c)) -> s,c) |> NameMap.ofList - let findConst x = match NameMap.tryFind x nameMap with | Some(AttribExpr(_,Expr.Const(c,_,_))) -> Some c | _ -> None - let findAppTr x = match NameMap.tryFind x nameMap with | Some(AttribExpr(_,Expr.App(_,_,[TType_app(tr,_)],_,_))) -> Some tr | _ -> None +/// Used to query custom attributes when emitting COM interop code. +type AttributeDecoder (namedArgs) = + + let nameMap = namedArgs |> List.map (fun (AttribNamedArg(s, _, _, c)) -> s, c) |> NameMap.ofList + let findConst x = match NameMap.tryFind x nameMap with | Some(AttribExpr(_, Expr.Const(c, _, _))) -> Some c | _ -> None + let findAppTr x = match NameMap.tryFind x nameMap with | Some(AttribExpr(_, Expr.App(_, _, [TType_app(tr, _)], _, _))) -> Some tr | _ -> None + + member __.FindInt16 x dflt = match findConst x with | Some(Const.Int16 x) -> x | _ -> dflt + + member __.FindInt32 x dflt = match findConst x with | Some(Const.Int32 x) -> x | _ -> dflt + + member __.FindBool x dflt = match findConst x with | Some(Const.Bool x) -> x | _ -> dflt + + member __.FindString x dflt = match findConst x with | Some(Const.String x) -> x | _ -> dflt + + member __.FindTypeName x dflt = match findAppTr x with | Some(tr) -> tr.DisplayName | _ -> dflt - member self.FindInt16 x dflt = match findConst x with | Some(Const.Int16 x) -> x | _ -> dflt - member self.FindInt32 x dflt = match findConst x with | Some(Const.Int32 x) -> x | _ -> dflt - member self.FindBool x dflt = match findConst x with | Some(Const.Bool x) -> x | _ -> dflt - member self.FindString x dflt = match findConst x with | Some(Const.String x) -> x | _ -> dflt - member self.FindTypeName x dflt = match findAppTr x with | Some(tr) -> tr.DisplayName | _ -> dflt - //-------------------------------------------------------------------------- // Statistics -//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- -let mutable reports = (fun _ -> ()) -let AddReport f = let old = reports in reports <- (fun oc -> old oc; f oc) -let ReportStatistics (oc:TextWriter) = reports oc +let mutable reports = (fun _ -> ()) -let NewCounter nm = +let AddReport f = + let old = reports + reports <- (fun oc -> old oc; f oc) + +let ReportStatistics (oc: TextWriter) = + reports oc + +let NewCounter nm = let count = ref 0 #if FABLE_COMPILER ignore nm @@ -132,252 +151,313 @@ let NewCounter nm = (fun () -> incr count) let CountClosure = NewCounter "closures" + let CountMethodDef = NewCounter "IL method defintitions corresponding to values" + let CountStaticFieldDef = NewCounter "IL field defintitions corresponding to values" + let CountCallFuncInstructions = NewCounter "callfunc instructions (indirect calls)" /// Non-local information related to internals of code generation within an assembly -type IlxGenIntraAssemblyInfo = - { /// A table recording the generated name of the static backing fields for each mutable top level value where - /// we may need to take the address of that value, e.g. static mutable module-bound values which are structs. These are +type IlxGenIntraAssemblyInfo = + { + /// A table recording the generated name of the static backing fields for each mutable top level value where + /// we may need to take the address of that value, e.g. static mutable module-bound values which are structs. These are /// only accessible intra-assembly. Across assemblies, taking the address of static mutable module-bound values is not permitted. /// The key to the table is the method ref for the property getter for the value, which is a stable name for the Val's /// that come from both the signature and the implementation. - StaticFieldInfo : Dictionary } + StaticFieldInfo: Dictionary + } -//-------------------------------------------------------------------------- +/// Helper to make sure we take tailcalls in some situations +type FakeUnit = | Fake -/// Indicates how the generated IL code is ultimately emitted +/// Indicates how the generated IL code is ultimately emitted type IlxGenBackend = -| IlWriteBackend -| IlReflectBackend + /// Indicates we are emitting code for ilwrite + | IlWriteBackend + + /// Indicates we are emitting code for Reflection.Emit in F# Interactive. + | IlReflectBackend [] -type IlxGenOptions = - { fragName: string +type IlxGenOptions = + { + /// Indicates the "fragment name" for the part of the assembly we are emitting, particularly for incremental + /// emit using Reflection.Emit in F# Interactive. + fragName: string + + /// Indicates if we are generating filter blocks generateFilterBlocks: bool + + /// Indicates if we are working around historical Reflection.Emit bugs workAroundReflectionEmitBugs: bool + + /// Indicates if we should/shouldn't emit constant arrays as static data blobs emitConstantArraysUsingStaticDataBlobs: bool - /// If this is set, then the last module becomes the "main" module and its toplevel bindings are executed at startup + + /// If this is set, then the last module becomes the "main" module and its toplevel bindings are executed at startup mainMethodInfo: Tast.Attribs option + + /// Indicates if local optimizations are on localOptimizationsAreOn: bool + + /// Indicates if we are generating debug symbols generateDebugSymbols: bool + + /// Indicates that FeeFee debug values should be emitted as value 100001 for + /// easier detection in debug output testFlagEmitFeeFeeAs100001: bool + ilxBackend: IlxGenBackend /// 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 - isInteractive: bool + isInteractive: bool /// 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 isInteractiveItExpr: bool /// Whenever possible, use callvirt instead of call - alwaysCallVirt: bool } - + alwaysCallVirt: bool + } /// Compilation environment for compiling a fragment of an assembly [] -type cenv = - { g: TcGlobals - TcVal : ConstraintSolver.TcValF +type cenv = + { + /// The TcGlobals for the compilation + g: TcGlobals + + /// The ImportMap for reading IL + amap: ImportMap + + /// A callback for TcVal in the typechecker. Used to generalize values when finding witnesses. + /// It is unfortunate this is needed but it is until we supply witnesses through the compiation. + TcVal: ConstraintSolver.TcValF + + /// The TAST for the assembly being emitted viewCcu: CcuThunk + + /// The options for ILX code generation opts: IlxGenOptions + /// Cache the generation of the "unit" type mutable ilUnitTy: ILType option - amap: ImportMap - intraAssemblyInfo : IlxGenIntraAssemblyInfo + + /// Other information from the emit of this assembly + intraAssemblyInfo: IlxGenIntraAssemblyInfo + /// Cache methods with SecurityAttribute applied to them, to prevent unnecessary calls to ExistsInEntireHierarchyOfType - casApplied : Dictionary + casApplied: Dictionary + /// Used to apply forced inlining optimizations to witnesses generated late during codegen - mutable optimizeDuringCodeGen : (Expr -> Expr) } + mutable optimizeDuringCodeGen: (Expr -> Expr) + } +let mkTypeOfExpr cenv m ilty = + mkAsmExpr ([ mkNormalCall (mspec_Type_GetTypeFromHandle cenv.g) ], [], + [mkAsmExpr ([ I_ldtoken (ILToken.ILType ilty) ], [], [], [cenv.g.system_RuntimeTypeHandle_ty], m)], + [cenv.g.system_Type_ty], m) + +let mkGetNameExpr cenv (ilt: ILType) m = + mkAsmExpr ([I_ldstr ilt.BasicQualifiedName], [], [], [cenv.g.string_ty], m) -let mkTypeOfExpr cenv m ilty = - mkAsmExpr ([ mkNormalCall (mspec_Type_GetTypeFromHandle cenv.g) ], [], - [mkAsmExpr ([ I_ldtoken (ILToken.ILType ilty) ], [],[],[cenv.g.system_RuntimeTypeHandle_ty],m)], - [cenv.g.system_Type_ty],m) - -let mkGetNameExpr cenv (ilt : ILType) m = - mkAsmExpr ([I_ldstr ilt.BasicQualifiedName],[],[],[cenv.g.string_ty],m) +let useCallVirt cenv boxity (mspec: ILMethodSpec) isBaseCall = + cenv.opts.alwaysCallVirt && + (boxity = AsObject) && + not mspec.CallingConv.IsStatic && + not isBaseCall -let useCallVirt cenv boxity (mspec : ILMethodSpec) isBaseCall = - cenv.opts.alwaysCallVirt && - (boxity = AsObject) && - not mspec.CallingConv.IsStatic && - not isBaseCall +/// Describes where items are to be placed within the generated IL namespace/typespace. +/// This should be cleaned up. +type CompileLocation = + { Scope: IL.ILScopeRef -//-------------------------------------------------------------------------- -// CompileLocation -//-------------------------------------------------------------------------- - -/// compilation location = path to a ccu, namespace or class -/// Referencing other stuff, and descriptions of where items are to be placed -/// within the generated IL namespace/typespace. This should be cleaned up. -type CompileLocation = - { clocScope: IL.ILScopeRef - clocTopImplQualifiedName: string - clocNamespace: string option - clocEncl: string list - clocQualifiedNameOfFile : string } + TopImplQualifiedName: string + + Namespace: string option + + Enclosing: string list + + QualifiedNameOfFile: string + } //-------------------------------------------------------------------------- // Access this and other assemblies -//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- let mkTopName ns n = String.concat "." (match ns with Some x -> [x;n] | None -> [n]) -let CompLocForFragment fragName (ccu:CcuThunk) = - { clocQualifiedNameOfFile =fragName - clocTopImplQualifiedName= fragName - clocScope=ccu.ILScopeRef - clocNamespace=None - clocEncl=[]} +let CompLocForFragment fragName (ccu: CcuThunk) = + { QualifiedNameOfFile = fragName + TopImplQualifiedName = fragName + Scope = ccu.ILScopeRef + Namespace = None + Enclosing = []} -let CompLocForCcu (ccu:CcuThunk) = CompLocForFragment ccu.AssemblyName ccu +let CompLocForCcu (ccu: CcuThunk) = CompLocForFragment ccu.AssemblyName ccu -let CompLocForSubModuleOrNamespace cloc (submod:ModuleOrNamespace) = +let CompLocForSubModuleOrNamespace cloc (submod: ModuleOrNamespace) = let n = submod.CompiledName - match submod.ModuleOrNamespaceType.ModuleOrNamespaceKind with - | FSharpModuleWithSuffix | ModuleOrType -> { cloc with clocEncl= cloc.clocEncl @ [n]} - | Namespace -> {cloc with clocNamespace=Some (mkTopName cloc.clocNamespace n)} + match submod.ModuleOrNamespaceType.ModuleOrNamespaceKind with + | FSharpModuleWithSuffix | ModuleOrType -> { cloc with Enclosing= cloc.Enclosing @ [n]} + | Namespace -> {cloc with Namespace=Some (mkTopName cloc.Namespace n)} -let CompLocForFixedPath fragName qname (CompPath(sref,cpath)) = - let ns,t = List.takeUntil (fun (_,mkind) -> mkind <> Namespace) cpath +let CompLocForFixedPath fragName qname (CompPath(sref, cpath)) = + let ns, t = List.takeUntil (fun (_, mkind) -> mkind <> Namespace) cpath let ns = List.map fst ns let ns = textOfPath ns - let encl = t |> List.map (fun (s ,_)-> s) + let encl = t |> List.map (fun (s, _)-> s) let ns = if ns = "" then None else Some ns - { clocQualifiedNameOfFile =fragName - clocTopImplQualifiedName=qname - clocScope=sref - clocNamespace=ns - clocEncl=encl } + { QualifiedNameOfFile = fragName + TopImplQualifiedName = qname + Scope = sref + Namespace = ns + Enclosing = encl } -let CompLocForFixedModule fragName qname (mspec:ModuleOrNamespace) = +let CompLocForFixedModule fragName qname (mspec: ModuleOrNamespace) = let cloc = CompLocForFixedPath fragName qname mspec.CompilationPath let cloc = CompLocForSubModuleOrNamespace cloc mspec - cloc + cloc -let NestedTypeRefForCompLoc cloc n = - match cloc.clocEncl with +let NestedTypeRefForCompLoc cloc n = + match cloc.Enclosing with | [] -> - let tyname = mkTopName cloc.clocNamespace n - mkILTyRef(cloc.clocScope,tyname) - | h::t -> mkILNestedTyRef(cloc.clocScope,mkTopName cloc.clocNamespace h :: t,n) - -let CleanUpGeneratedTypeName (nm:string) = - if nm.IndexOfAny IllegalCharactersInTypeAndNamespaceNames = -1 then + let tyname = mkTopName cloc.Namespace n + mkILTyRef(cloc.Scope, tyname) + | h::t -> mkILNestedTyRef(cloc.Scope, mkTopName cloc.Namespace h :: t, n) + +let CleanUpGeneratedTypeName (nm: string) = + if nm.IndexOfAny IllegalCharactersInTypeAndNamespaceNames = -1 then nm else - (nm,IllegalCharactersInTypeAndNamespaceNames) ||> Array.fold (fun nm c -> nm.Replace(string c, "-")) - + (nm, IllegalCharactersInTypeAndNamespaceNames) ||> Array.fold (fun nm c -> nm.Replace(string c, "-")) + +let TypeNameForInitClass cloc = + ".$" + cloc.TopImplQualifiedName -let TypeNameForInitClass cloc = ".$" + cloc.clocTopImplQualifiedName -let TypeNameForImplicitMainMethod cloc = TypeNameForInitClass cloc + "$Main" -let TypeNameForPrivateImplementationDetails cloc = "" +let TypeNameForImplicitMainMethod cloc = + TypeNameForInitClass cloc + "$Main" -let CompLocForInitClass cloc = - {cloc with clocEncl=[TypeNameForInitClass cloc]; clocNamespace=None} +let TypeNameForPrivateImplementationDetails cloc = + "" -let CompLocForImplicitMainMethod cloc = - {cloc with clocEncl=[TypeNameForImplicitMainMethod cloc]; clocNamespace=None} +let CompLocForInitClass cloc = + {cloc with Enclosing=[TypeNameForInitClass cloc]; Namespace=None} -let CompLocForPrivateImplementationDetails cloc = - {cloc with - clocEncl=[TypeNameForPrivateImplementationDetails cloc]; clocNamespace=None} +let CompLocForImplicitMainMethod cloc = + {cloc with Enclosing=[TypeNameForImplicitMainMethod cloc]; Namespace=None} -let rec TypeRefForCompLoc cloc = - match cloc.clocEncl with - | [] -> - mkILTyRef(cloc.clocScope,TypeNameForPrivateImplementationDetails cloc) - | [h] -> - let tyname = mkTopName cloc.clocNamespace h - mkILTyRef(cloc.clocScope,tyname) - | _ -> - let encl,n = List.frontAndBack cloc.clocEncl - NestedTypeRefForCompLoc {cloc with clocEncl=encl} n +let CompLocForPrivateImplementationDetails cloc = + {cloc with + Enclosing=[TypeNameForPrivateImplementationDetails cloc]; Namespace=None} +/// Compute an ILTypeRef for a CompilationLocation +let rec TypeRefForCompLoc cloc = + match cloc.Enclosing with + | [] -> + mkILTyRef(cloc.Scope, TypeNameForPrivateImplementationDetails cloc) + | [h] -> + let tyname = mkTopName cloc.Namespace h + mkILTyRef(cloc.Scope, tyname) + | _ -> + let encl, n = List.frontAndBack cloc.Enclosing + NestedTypeRefForCompLoc {cloc with Enclosing=encl} n + +/// Compute an ILType for a CompilationLocation for a non-generic type let mkILTyForCompLoc cloc = mkILNonGenericBoxedTy (TypeRefForCompLoc cloc) let ComputeMemberAccess hidden = if hidden then ILMemberAccess.Assembly else ILMemberAccess.Public - // Under --publicasinternal change types from Public to Private (internal for types) let ComputePublicTypeAccess() = ILTypeDefAccess.Public -let ComputeTypeAccess (tref:ILTypeRef) hidden = - match tref.Enclosing with - | [] -> if hidden then ILTypeDefAccess.Private else ComputePublicTypeAccess() +let ComputeTypeAccess (tref: ILTypeRef) hidden = + match tref.Enclosing with + | [] -> if hidden then ILTypeDefAccess.Private else ComputePublicTypeAccess() | _ -> ILTypeDefAccess.Nested (ComputeMemberAccess hidden) - + //-------------------------------------------------------------------------- // TypeReprEnv -//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- -/// Indicates how type parameters are mapped to IL type variables +/// Indicates how type parameters are mapped to IL type variables [] -type TypeReprEnv(reprs : Map, count: int) = +type TypeReprEnv(reprs: Map, count: int) = - member tyenv.Item (tp:Typar, m:range) = - try reprs.[tp.Stamp] - with :? KeyNotFoundException -> - errorR(InternalError("Undefined or unsolved type variable: " + showL(typarL tp),m)) + /// Lookup a type parameter + member __.Item (tp: Typar, m: range) = + try reprs.[tp.Stamp] + with :? KeyNotFoundException -> + errorR(InternalError("Undefined or unsolved type variable: " + showL(typarL tp), m)) // Random value for post-hoc diagnostic analysis on generated tree * - uint16 666 + uint16 666 + /// Add an additional type parameter to the environment. If the parameter is a units-of-measure parameter + /// then it is ignored, since it doesn't corespond to a .NET type parameter. member tyenv.AddOne (tp: Typar) = - if IsNonErasedTypar tp then + if IsNonErasedTypar tp then TypeReprEnv(reprs.Add (tp.Stamp, uint16 count), count + 1) else tyenv + /// Add multiple additional type parameters to the environment. member tyenv.Add tps = - (tyenv,tps) ||> List.fold (fun tyenv tp -> tyenv.AddOne tp) + (tyenv, tps) ||> List.fold (fun tyenv tp -> tyenv.AddOne tp) - member tyenv.Count = count + /// Get the count of the non-erased type parameters in scope. + member __.Count = count - static member Empty = + /// Get the empty environment, where no type parameters are in scope. + static member Empty = TypeReprEnv(count = 0, reprs = Map.empty) - static member ForTypars tps = + /// Get the environment for a fixed set of type parameters + static member ForTypars tps = TypeReprEnv.Empty.Add tps - - static member ForTycon (tycon:Tycon) = + + /// Get the environment for within a type definition + static member ForTycon (tycon: Tycon) = TypeReprEnv.ForTypars (tycon.TyparsNoRange) - - static member ForTyconRef (tycon:TyconRef) = + + /// Get the environment for generating a reference to items within a type definition + static member ForTyconRef (tycon: TyconRef) = TypeReprEnv.ForTycon tycon.Deref - + //-------------------------------------------------------------------------- // Generate type references -//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- -let GenTyconRef (tcref:TyconRef) = +/// Get the ILTypeRef or other representation information for a type +let GenTyconRef (tcref: TyconRef) = assert(not tcref.IsTypeAbbrev) tcref.CompiledRepresentation -type VoidNotOK = VoidNotOK | VoidOK -#if DEBUG -let voidCheck m g permits ty = - if permits=VoidNotOK && isVoidTy g ty then - error(InternalError("System.Void unexpectedly detected in IL code generation. This should not occur.",m)) +type VoidNotOK = + | VoidNotOK + | VoidOK + +#if DEBUG +let voidCheck m g permits ty = + if permits=VoidNotOK && isVoidTy g ty then + error(InternalError("System.Void unexpectedly detected in IL code generation. This should not occur.", m)) #endif /// When generating parameter and return types generate precise .NET IL pointer types. -/// These can't be generated for generic instantiations, since .NET generics doesn't -/// permit this. But for 'naked' values (locals, parameters, return values etc.) machine -/// integer values and native pointer values are compatible (though the code is unverifiable). -type PtrsOK = - | PtrTypesOK +/// These can't be generated for generic instantiations, since .NET generics doesn't +/// permit this. But for 'naked' values (locals, parameters, return values etc.) machine +/// integer values and native pointer values are compatible (though the code is unverifiable). +type PtrsOK = + | PtrTypesOK | PtrTypesNotOK let GenReadOnlyAttributeIfNecessary (g: TcGlobals) ty = let add = isInByrefTy g ty && g.attrib_IsReadOnlyAttribute.TyconRef.CanDeref - if add then + if add then let attr = mkILCustomAttribute g.ilg (g.attrib_IsReadOnlyAttribute.TypeRef, [], [], []) Some attr else @@ -386,411 +466,448 @@ let GenReadOnlyAttributeIfNecessary (g: TcGlobals) ty = /// Generate "modreq([mscorlib]System.Runtime.InteropServices.InAttribute)" on inref types. let GenReadOnlyModReqIfNecessary (g: TcGlobals) ty ilTy = let add = isInByrefTy g ty && g.attrib_InAttribute.TyconRef.CanDeref - if add then + if add then ILType.Modified(true, g.attrib_InAttribute.TypeRef, ilTy) else ilTy -let rec GenTypeArgAux amap m tyenv tyarg = +let rec GenTypeArgAux amap m tyenv tyarg = GenTypeAux amap m tyenv VoidNotOK PtrTypesNotOK tyarg -and GenTypeArgsAux amap m tyenv tyargs = +and GenTypeArgsAux amap m tyenv tyargs = List.map (GenTypeArgAux amap m tyenv) (DropErasedTyargs tyargs) and GenTyAppAux amap m tyenv repr tinst = - match repr with - | CompiledTypeRepr.ILAsmOpen ty -> + match repr with + | CompiledTypeRepr.ILAsmOpen ty -> let ilTypeInst = GenTypeArgsAux amap m tyenv tinst let ty = IL.instILType ilTypeInst ty ty - | CompiledTypeRepr.ILAsmNamed (tref, boxity, ilTypeOpt) -> + | CompiledTypeRepr.ILAsmNamed (tref, boxity, ilTypeOpt) -> GenILTyAppAux amap m tyenv (tref, boxity, ilTypeOpt) tinst and GenILTyAppAux amap m tyenv (tref, boxity, ilTypeOpt) tinst = - match ilTypeOpt with - | None -> + match ilTypeOpt with + | None -> let ilTypeInst = GenTypeArgsAux amap m tyenv tinst - mkILTy boxity (mkILTySpec (tref,ilTypeInst)) - | Some ilType -> + mkILTy boxity (mkILTySpec (tref, ilTypeInst)) + | Some ilType -> ilType // monomorphic types include a cached ilType to avoid reallocation of an ILType node -and GenNamedTyAppAux (amap:ImportMap) m tyenv ptrsOK tcref tinst = +and GenNamedTyAppAux (amap: ImportMap) m tyenv ptrsOK tcref tinst = let g = amap.g - let tinst = DropErasedTyargs tinst - - // See above note on ptrsOK - if ptrsOK = PtrTypesOK && tyconRefEq g tcref g.nativeptr_tcr && (freeInTypes CollectTypars tinst).FreeTypars.IsEmpty then + let tinst = DropErasedTyargs tinst + + // See above note on ptrsOK + if ptrsOK = PtrTypesOK && tyconRefEq g tcref g.nativeptr_tcr && (freeInTypes CollectTypars tinst).FreeTypars.IsEmpty then GenNamedTyAppAux amap m tyenv ptrsOK g.ilsigptr_tcr tinst else #if !NO_EXTENSIONTYPING - match tcref.TypeReprInfo with + match tcref.TypeReprInfo with // Generate the base type, because that is always the representation of the erased type, unless the assembly is being injected - | TProvidedTypeExtensionPoint info when info.IsErased -> - GenTypeAux amap m tyenv VoidNotOK ptrsOK (info.BaseTypeForErased (m,g.obj_ty)) - | _ -> + | TProvidedTypeExtensionPoint info when info.IsErased -> + GenTypeAux amap m tyenv VoidNotOK ptrsOK (info.BaseTypeForErased (m, g.obj_ty)) + | _ -> #endif GenTyAppAux amap m tyenv (GenTyconRef tcref) tinst and GenTypeAux amap m (tyenv: TypeReprEnv) voidOK ptrsOK ty = let g = amap.g -#if DEBUG +#if DEBUG voidCheck m g voidOK ty #else - ignore voidOK + ignore voidOK #endif - match stripTyEqnsAndMeasureEqns g ty with + match stripTyEqnsAndMeasureEqns g ty with | TType_app (tcref, tinst) -> GenNamedTyAppAux amap m tyenv ptrsOK tcref tinst - + | TType_tuple (tupInfo, args) -> GenTypeAux amap m tyenv VoidNotOK ptrsOK (mkCompiledTupleTy g (evalTupInfoIsStruct tupInfo) args) - | TType_fun (dty, returnTy) -> EraseClosures.mkILFuncTy g.ilxPubCloEnv (GenTypeArgAux amap m tyenv dty) (GenTypeArgAux amap m tyenv returnTy) - | TType_anon (anonInfo, tinst) -> + | TType_fun (dty, returnTy) -> EraseClosures.mkILFuncTy g.ilxPubCloEnv (GenTypeArgAux amap m tyenv dty) (GenTypeArgAux amap m tyenv returnTy) + + | TType_anon (anonInfo, tinst) -> let tref = anonInfo.ILTypeRef let boxity = if evalAnonInfoIsStruct anonInfo then ILBoxity.AsValue else ILBoxity.AsObject - GenILTyAppAux amap m tyenv (tref, boxity, None) tinst + GenILTyAppAux amap m tyenv (tref, boxity, None) tinst - | TType_ucase (ucref, args) -> - let cuspec,idx = GenUnionCaseSpec amap m tyenv ucref args + | TType_ucase (ucref, args) -> + let cuspec, idx = GenUnionCaseSpec amap m tyenv ucref args EraseUnions.GetILTypeForAlternative cuspec idx - | TType_forall (tps, tau) -> - let tps = DropErasedTypars tps + | TType_forall (tps, tau) -> + let tps = DropErasedTypars tps if tps.IsEmpty then GenTypeAux amap m tyenv VoidNotOK ptrsOK tau - else EraseClosures.mkILTyFuncTy g.ilxPubCloEnv + else EraseClosures.mkILTyFuncTy g.ilxPubCloEnv - | TType_var tp -> mkILTyvarTy tyenv.[tp,m] + | TType_var tp -> mkILTyvarTy tyenv.[tp, m] - | TType_measure _ -> g.ilg.typ_Int32 + | TType_measure _ -> g.ilg.typ_Int32 //-------------------------------------------------------------------------- // Generate ILX references to closures, classunions etc. given a tyenv -//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- -and GenUnionCaseRef (amap: ImportMap) m tyenv i (fspecs:RecdField[]) = +and GenUnionCaseRef (amap: ImportMap) m tyenv i (fspecs: RecdField[]) = let g = amap.g - fspecs |> Array.mapi (fun j fspec -> - let ilFieldDef = IL.mkILInstanceField(fspec.Name,GenType amap m tyenv fspec.FormalType, None, ILMemberAccess.Public) + fspecs |> Array.mapi (fun j fspec -> + let ilFieldDef = IL.mkILInstanceField(fspec.Name, GenType amap m tyenv fspec.FormalType, None, ILMemberAccess.Public) // These properties on the "field" of an alternative end up going on a property generated by cu_erase.fs IlxUnionField (ilFieldDef.With(customAttrs = mkILCustomAttrs [(mkCompilationMappingAttrWithVariantNumAndSeqNum g (int SourceConstructFlags.Field) i j )]))) - -and GenUnionRef (amap: ImportMap) m (tcref: TyconRef) = + +and GenUnionRef (amap: ImportMap) m (tcref: TyconRef) = let g = amap.g let tycon = tcref.Deref assert(not tycon.IsTypeAbbrev) - match tycon.UnionTypeInfo with + match tycon.UnionTypeInfo with | ValueNone -> failwith "GenUnionRef m" - | ValueSome funion -> - cached funion.CompiledRepresentation (fun () -> + | ValueSome funion -> + cached funion.CompiledRepresentation (fun () -> let tyenvinner = TypeReprEnv.ForTycon tycon match tcref.CompiledRepresentation with | CompiledTypeRepr.ILAsmOpen _ -> failwith "GenUnionRef m: unexpected ASM tyrep" - | CompiledTypeRepr.ILAsmNamed (tref,_,_) -> - let alternatives = - tycon.UnionCasesArray |> Array.mapi (fun i cspec -> + | CompiledTypeRepr.ILAsmNamed (tref, _, _) -> + let alternatives = + tycon.UnionCasesArray |> Array.mapi (fun i cspec -> { altName=cspec.CompiledName altCustomAttrs=emptyILCustomAttrs altFields=GenUnionCaseRef amap m tyenvinner i cspec.RecdFieldsArray }) let nullPermitted = IsUnionTypeWithNullAsTrueValue g tycon let hasHelpers = ComputeUnionHasHelpers g tcref let boxity = (if tcref.IsStructOrEnumTycon then ILBoxity.AsValue else ILBoxity.AsObject) - IlxUnionRef(boxity, tref,alternatives,nullPermitted,hasHelpers)) + IlxUnionRef(boxity, tref, alternatives, nullPermitted, hasHelpers)) -and ComputeUnionHasHelpers g (tcref : TyconRef) = +and ComputeUnionHasHelpers g (tcref: TyconRef) = if tyconRefEq g tcref g.unit_tcr_canon then NoHelpers elif tyconRefEq g tcref g.list_tcr_canon then SpecialFSharpListHelpers elif tyconRefEq g tcref g.option_tcr_canon then SpecialFSharpOptionHelpers else match TryFindFSharpAttribute g g.attrib_DefaultAugmentationAttribute tcref.Attribs with - | Some(Attrib(_,_,[ AttribBoolArg (b) ],_,_,_,_)) -> + | Some(Attrib(_, _, [ AttribBoolArg (b) ], _, _, _, _)) -> if b then AllHelpers else NoHelpers - | Some (Attrib(_,_,_,_,_,_,m)) -> - errorR(Error(FSComp.SR.ilDefaultAugmentationAttributeCouldNotBeDecoded(),m)) + | Some (Attrib(_, _, _, _, _, _, m)) -> + errorR(Error(FSComp.SR.ilDefaultAugmentationAttributeCouldNotBeDecoded(), m)) AllHelpers - | _ -> + | _ -> AllHelpers (* not hiddenRepr *) -and GenUnionSpec amap m tyenv tcref tyargs = +and GenUnionSpec amap m tyenv tcref tyargs = let curef = GenUnionRef amap m tcref let tinst = GenTypeArgs amap m tyenv tyargs - IlxUnionSpec(curef,tinst) + IlxUnionSpec(curef, tinst) -and GenUnionCaseSpec amap m tyenv (ucref:UnionCaseRef) tyargs = +and GenUnionCaseSpec amap m tyenv (ucref: UnionCaseRef) tyargs = let cuspec = GenUnionSpec amap m tyenv ucref.TyconRef tyargs cuspec, ucref.Index -and GenType amap m tyenv ty = +and GenType amap m tyenv ty = GenTypeAux amap m tyenv VoidNotOK PtrTypesNotOK ty - and GenTypes amap m tyenv tys = List.map (GenType amap m tyenv) tys + and GenTypePermitVoid amap m tyenv ty = (GenTypeAux amap m tyenv VoidOK PtrTypesNotOK ty) + and GenTypesPermitVoid amap m tyenv tys = List.map (GenTypePermitVoid amap m tyenv) tys and GenTyApp amap m tyenv repr tyargs = GenTyAppAux amap m tyenv repr tyargs -and GenNamedTyApp amap m tyenv tcref tinst = GenNamedTyAppAux amap m tyenv PtrTypesNotOK tcref tinst -/// IL void types are only generated for return types -and GenReturnType amap m tyenv returnTyOpt = - match returnTyOpt with +and GenNamedTyApp amap m tyenv tcref tinst = GenNamedTyAppAux amap m tyenv PtrTypesNotOK tcref tinst + +/// IL void types are only generated for return types +and GenReturnType amap m tyenv returnTyOpt = + match returnTyOpt with | None -> ILType.Void - | Some returnTy -> + | Some returnTy -> let ilTy = GenTypeAux amap m tyenv VoidNotOK(*1*) PtrTypesOK returnTy (*1: generate void from unit, but not accept void *) GenReadOnlyModReqIfNecessary amap.g returnTy ilTy -and GenParamType amap m tyenv isSlotSig ty = +and GenParamType amap m tyenv isSlotSig ty = let ilTy = GenTypeAux amap m tyenv VoidNotOK PtrTypesOK ty - if isSlotSig then - GenReadOnlyModReqIfNecessary amap.g ty ilTy - else + if isSlotSig then + GenReadOnlyModReqIfNecessary amap.g ty ilTy + else ilTy -and GenParamTypes amap m tyenv isSlotSig tys = - tys |> List.map (GenParamType amap m tyenv isSlotSig) +and GenParamTypes amap m tyenv isSlotSig tys = + tys |> List.map (GenParamType amap m tyenv isSlotSig) and GenTypeArgs amap m tyenv tyargs = GenTypeArgsAux amap m tyenv tyargs + and GenTypePermitVoidAux amap m tyenv ty = GenTypeAux amap m tyenv VoidOK PtrTypesNotOK ty -// Static fields generally go in a private InitializationCodeAndBackingFields section. This is to ensure all static -// fields are initialized only in their class constructors (we generate one primary -// cctor for each file to ensure initialization coherence across the file, regardless +// Static fields generally go in a private InitializationCodeAndBackingFields section. This is to ensure all static +// fields are initialized only in their class constructors (we generate one primary +// cctor for each file to ensure initialization coherence across the file, regardless // of how many modules are in the file). This means F# passes an extra check applied by SQL Server when it // verifies stored procedures: SQL Server checks that all 'initionly' static fields are only initialized from -// their own class constructor. -// +// their own class constructor. +// // However, mutable static fields must be accessible across compilation units. This means we place them in their "natural" location -// which may be in a nested module etc. This means mutable static fields can't be used in code to be loaded by SQL Server. -// -// Computes the location where the static field for a value lives. -// - Literals go in their type/module. +// which may be in a nested module etc. This means mutable static fields can't be used in code to be loaded by SQL Server. +// +// Computes the location where the static field for a value lives. +// - Literals go in their type/module. // - For interactive code, we always place fields in their type/module with an accurate name -let GenFieldSpecForStaticField (isInteractive, g, ilContainerTy, vspec:Val, nm, m, cloc, ilTy) = - if isInteractive || HasFSharpAttribute g g.attrib_LiteralAttribute vspec.Attribs then - let fieldName = vspec.CompiledName +let GenFieldSpecForStaticField (isInteractive, g, ilContainerTy, vspec: Val, nm, m, cloc, ilTy) = + if isInteractive || HasFSharpAttribute g g.attrib_LiteralAttribute vspec.Attribs then + let fieldName = vspec.CompiledName let fieldName = if isInteractive then CompilerGeneratedName fieldName else fieldName - mkILFieldSpecInTy (ilContainerTy, fieldName, ilTy) + mkILFieldSpecInTy (ilContainerTy, fieldName, ilTy) else - let fieldName = ilxgenGlobalNng.FreshCompilerGeneratedName (nm,m) + let fieldName = ilxgenGlobalNng.FreshCompilerGeneratedName (nm, m) let ilFieldContainerTy = mkILTyForCompLoc (CompLocForInitClass cloc) - mkILFieldSpecInTy (ilFieldContainerTy, fieldName, ilTy) + mkILFieldSpecInTy (ilFieldContainerTy, fieldName, ilTy) -let GenRecdFieldRef m cenv tyenv (rfref:RecdFieldRef) tyargs = +let GenRecdFieldRef m cenv tyenv (rfref: RecdFieldRef) tyargs = let tyenvinner = TypeReprEnv.ForTycon rfref.Tycon mkILFieldSpecInTy(GenTyApp cenv.amap m tyenv rfref.TyconRef.CompiledRepresentation tyargs, ComputeFieldName rfref.Tycon rfref.RecdField, GenType cenv.amap m tyenvinner rfref.RecdField.FormalType) -let GenExnType amap m tyenv (ecref:TyconRef) = GenTyApp amap m tyenv ecref.CompiledRepresentation [] - +let GenExnType amap m tyenv (ecref: TyconRef) = GenTyApp amap m tyenv ecref.CompiledRepresentation [] + //-------------------------------------------------------------------------- // Closure summaries -//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- type ArityInfo = int list - - + [] -type IlxClosureInfo = - { cloExpr: Expr +type IlxClosureInfo = + { /// The whole expression for the closure + cloExpr: Expr + + /// The name of the generated closure class cloName: string + + /// The counts of curried arguments for the closure cloArityInfo: ArityInfo + + /// The formal return type cloILFormalRetTy: ILType + /// An immutable array of free variable descriptions for the closure - cloILFreeVars: IlxClosureFreeVar[] + cloILFreeVars: IlxClosureFreeVar[] + + /// The ILX specification for the closure cloSpec: IlxClosureSpec + + /// The attributes that get attached to the closure class cloAttribs: Attribs + + /// The generic parameters for the closure, i.e. the type variables it captures cloILGenericParams: IL.ILGenericParameterDefs - cloFreeVars: Val list (* nb. the freevars we actually close over *) + + /// The free variables for the closure, i.e. the values it captures + cloFreeVars: Val list + + /// ILX view of the lambdas for the closures ilCloLambdas: IlxClosureLambdas - (* local type func support *) /// The free type parameters occuring in the type of the closure (and not just its body) /// This is used for local type functions, whose contract class must use these types /// type Contract<'fv> = - /// abstract DirectInvoke : ty['fv] - /// type Implementation<'fv,'fv2> : Contract<'fv> = - /// override DirectInvoke : ty['fv] = expr['fv,'fv2] + /// abstract DirectInvoke: ty['fv] + /// type Implementation<'fv, 'fv2> : Contract<'fv> = + /// override DirectInvoke: ty['fv] = expr['fv, 'fv2] /// /// At the callsite we generate /// unbox ty['fv] /// callvirt clo.DirectInvoke localTypeFuncILGenericArgs: ILType list + + /// The free type parameters for the local type function as F# TAST types localTypeFuncContractFreeTypars: Typar list - localTypeFuncDirectILGenericParams: IL.ILGenericParameterDefs - localTypeFuncInternalFreeTypars: Typar list} + localTypeFuncDirectILGenericParams: IL.ILGenericParameterDefs + + localTypeFuncInternalFreeTypars: Typar list + } + +//-------------------------------------------------------------------------- +// ValStorage //-------------------------------------------------------------------------- -// Representation of term declarations = Environments for compiling expressions. -//-------------------------------------------------------------------------- - + +/// Describes the storage for a value [] -type ValStorage = +type ValStorage = /// Indicates the value is always null - | Null - /// Indicates the value is stored in a static field. - | StaticField of ILFieldSpec * ValRef * (*hasLiteralAttr:*)bool * ILType * string * ILType * ILMethodRef * ILMethodRef * OptionalShadowLocal + | Null + + /// Indicates the value is stored in a static field. + | StaticField of ILFieldSpec * ValRef * (*hasLiteralAttr:*)bool * ILType * string * ILType * ILMethodRef * ILMethodRef * OptionalShadowLocal + /// Indicates the value is "stored" as a property that recomputes it each time it is referenced. Used for simple constants that do not cause initialization triggers - | StaticProperty of ILMethodSpec * OptionalShadowLocal - /// Indicates the value is "stored" as a IL static method (in a "main" class for a F# - /// compilation unit, or as a member) according to its inferred or specified arity. - | Method of ValReprInfo * ValRef * ILMethodSpec * Range.range * ArgReprInfo list * TType list * ArgReprInfo + | StaticProperty of ILMethodSpec * OptionalShadowLocal + + /// Indicates the value is "stored" as a IL static method (in a "main" class for a F# + /// compilation unit, or as a member) according to its inferred or specified arity. + | Method of ValReprInfo * ValRef * ILMethodSpec * Range.range * ArgReprInfo list * TType list * ArgReprInfo + /// Indicates the value is stored at the given position in the closure environment accessed via "ldarg 0" - | Env of ILType * int * ILFieldSpec * NamedLocalIlxClosureInfo ref option + | Env of ILType * int * ILFieldSpec * NamedLocalIlxClosureInfo ref option + /// Indicates that the value is an argument of a method being generated - | Arg of int + | Arg of int + /// Indicates that the value is stored in local of the method being generated. NamedLocalIlxClosureInfo is normally empty. /// It is non-empty for 'local type functions', see comments on definition of NamedLocalIlxClosureInfo. - | Local of idx: int * realloc: bool * NamedLocalIlxClosureInfo ref option + | Local of idx: int * realloc: bool * NamedLocalIlxClosureInfo ref option -and OptionalShadowLocal = +/// Indicates if there is a shadow local storage for a local, to make sure it gets a good name in debugging +and OptionalShadowLocal = | NoShadowLocal | ShadowLocal of ValStorage -/// The representation of a NamedLocalClosure is based on a cloinfo. However we can't generate a cloinfo until we've -/// decided the representations of other items in the recursive set. Hence we use two phases to decide representations in -/// a recursive set. Yuck. -and NamedLocalIlxClosureInfo = +/// The representation of a NamedLocalClosure is based on a cloinfo. However we can't generate a cloinfo until we've +/// decided the representations of other items in the recursive set. Hence we use two phases to decide representations in +/// a recursive set. Yuck. +and NamedLocalIlxClosureInfo = | NamedLocalIlxClosureInfoGenerator of (IlxGenEnv -> IlxClosureInfo) | NamedLocalIlxClosureInfoGenerated of IlxClosureInfo - -and ModuleStorage = - { Vals: Lazy> + +/// Indicates the overall representation decisions for all the elements of a namespace of module +and ModuleStorage = + { Vals: Lazy> SubModules: Lazy> } -/// BranchCallItems are those where a call to the value can be implemented as -/// a branch. At the moment these are only used for generating branch calls back to -/// the entry label of the method currently being generated. -and BranchCallItem = +/// Indicate whether a call to the value can be implemented as +/// a branch. At the moment these are only used for generating branch calls back to +/// the entry label of the method currently being generated when a direct tailcall is +/// made in the method itself. +and BranchCallItem = | BranchCallClosure of ArityInfo - | BranchCallMethod of - // Argument counts for compiled form of F# method or value - ArityInfo * + | BranchCallMethod of + // Argument counts for compiled form of F# method or value + ArityInfo * // Arg infos for compiled form of F# method or value - (TType * ArgReprInfo) list list * + (TType * ArgReprInfo) list list * // Typars for F# method or value - Tast.Typars * + Tast.Typars * // Typars for F# method or value int * - // num obj args - int - -and Mark = - | Mark of ILCodeLabel (* places we can branch to *) + // num obj args + int + +/// Represents a place we can branch to +and Mark = + | Mark of ILCodeLabel member x.CodeLabel = (let (Mark(lab)) = x in lab) +/// The overall environment at a particular point in an expression tree. and IlxGenEnv = - { tyenv: TypeReprEnv + { /// The representation decisions for the (non-erased) type parameters that are in scope + tyenv: TypeReprEnv + + /// An ILType for some random type in this assembly someTypeInThisAssembly: ILType + + /// Indicates if we are generating code for the last file in a .EXE isFinalFile: bool - /// Where to place the stuff we're currently generating - cloc: CompileLocation - /// Hiding information down the signature chain, used to compute what's public to the assembly - sigToImplRemapInfo: (Remap * SignatureHidingInfo) list - /// All values in scope - valsInScope: ValMap> - /// For optimizing direct tail recursion to a loop - mark says where to branch to. Length is 0 or 1. - /// REVIEW: generalize to arbitrary nested local loops?? - innerVals: (ValRef * (BranchCallItem * Mark)) list - /// Full list of enclosing bound values. First non-compiler-generated element is used to help give nice names for closures and other expressions. - letBoundVars: ValRef list - /// The set of IL local variable indexes currently in use by lexically scoped variables, to allow reuse on different branches. - /// Really an integer set. - liveLocals: IntMap + + /// Indicates the default "place" for stuff we're currently generating + cloc: CompileLocation + + /// Hiding information down the signature chain, used to compute what's public to the assembly + sigToImplRemapInfo: (Remap * SignatureHidingInfo) list + + /// All values in scope + valsInScope: ValMap> + + /// For optimizing direct tail recursion to a loop - mark says where to branch to. Length is 0 or 1. + /// REVIEW: generalize to arbitrary nested local loops?? + innerVals: (ValRef * (BranchCallItem * Mark)) list + + /// Full list of enclosing bound values. First non-compiler-generated element is used to help give nice names for closures and other expressions. + letBoundVars: ValRef list + + /// The set of IL local variable indexes currently in use by lexically scoped variables, to allow reuse on different branches. + /// Really an integer set. + liveLocals: IntMap + /// Are we under the scope of a try, catch or finally? If so we can't tailcall. SEH = structured exception handling - withinSEH: bool } + withinSEH: bool + } -let ReplaceTyenv tyenv (eenv: IlxGenEnv) = {eenv with tyenv = tyenv } -let EnvForTypars tps eenv = {eenv with tyenv = TypeReprEnv.ForTypars tps } -let AddTyparsToEnv typars (eenv: IlxGenEnv) = {eenv with tyenv = eenv.tyenv.Add typars} +let ReplaceTyenv tyenv (eenv: IlxGenEnv) = {eenv with tyenv = tyenv } -let AddSignatureRemapInfo _msg (rpi, mhi) eenv = - { eenv with sigToImplRemapInfo = (mkRepackageRemapping rpi,mhi) :: eenv.sigToImplRemapInfo } - -//-------------------------------------------------------------------------- -// Print eenv -//-------------------------------------------------------------------------- +let EnvForTypars tps eenv = {eenv with tyenv = TypeReprEnv.ForTypars tps } +let AddTyparsToEnv typars (eenv: IlxGenEnv) = {eenv with tyenv = eenv.tyenv.Add typars} + +let AddSignatureRemapInfo _msg (rpi, mhi) eenv = + { eenv with sigToImplRemapInfo = (mkRepackageRemapping rpi, mhi) :: eenv.sigToImplRemapInfo } + #if !FABLE_COMPILER -let OutputStorage (pps: TextWriter) s = - match s with - | StaticField _ -> pps.Write "(top)" - | StaticProperty _ -> pps.Write "(top)" - | Method _ -> pps.Write "(top)" - | Local _ -> pps.Write "(local)" - | Arg _ -> pps.Write "(arg)" - | Env _ -> pps.Write "(env)" +let OutputStorage (pps: TextWriter) s = + match s with + | StaticField _ -> pps.Write "(top)" + | StaticProperty _ -> pps.Write "(top)" + | Method _ -> pps.Write "(top)" + | Local _ -> pps.Write "(local)" + | Arg _ -> pps.Write "(arg)" + | Env _ -> pps.Write "(env)" | Null -> pps.Write "(null)" #endif //-------------------------------------------------------------------------- // Augment eenv with values -//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- -let AddStorageForVal (g: TcGlobals) (v,s) eenv = +let AddStorageForVal (g: TcGlobals) (v, s) eenv = let eenv = { eenv with valsInScope = eenv.valsInScope.Add v s } - // If we're compiling fslib then also bind the value as a non-local path to + // If we're compiling fslib then also bind the value as a non-local path to // allow us to resolve the compiler-non-local-references that arise from env.fs // // Do this by generating a fake "looking from the outside in" non-local value reference for // v, dereferencing it to find the corresponding signature Val, and adding an entry for the signature val. // // A similar code path exists in ilxgen.fs for the tables of "optimization data" for values - if g.compilingFslib then + if g.compilingFslib then // Passing an empty remap is sufficient for FSharp.Core.dll because it turns out the remapped type signature can // still be resolved. - match tryRescopeVal g.fslibCcu Remap.Empty v with + match tryRescopeVal g.fslibCcu Remap.Empty v with | ValueNone -> eenv - | ValueSome vref -> + | ValueSome vref -> match vref.TryDeref with - | ValueNone -> + | ValueNone -> //let msg = sprintf "could not dereference external value reference to something in FSharp.Core.dll during code generation, v.MangledName = '%s', v.Range = %s" v.MangledName (stringOfRange v.Range) //System.Diagnostics.Debug.Assert(false, msg) eenv - | ValueSome gv -> + | ValueSome gv -> { eenv with valsInScope = eenv.valsInScope.Add gv s } - else + else eenv -let AddStorageForLocalVals g vals eenv = List.foldBack (fun (v,s) acc -> AddStorageForVal g (v,notlazy s) acc) vals eenv +let AddStorageForLocalVals g vals eenv = List.foldBack (fun (v, s) acc -> AddStorageForVal g (v, notlazy s) acc) vals eenv //-------------------------------------------------------------------------- -// Lookup eenv -//-------------------------------------------------------------------------- - -open FSharp.Compiler.AbstractIL -open FSharp.Compiler.AbstractIL.Internal -open FSharp.Compiler.AbstractIL.Internal.Library +// Lookup eenv +//-------------------------------------------------------------------------- -let StorageForVal m v eenv = - let v = +let StorageForVal m v eenv = + let v = try eenv.valsInScope.[v] with :? KeyNotFoundException -> assert false - errorR(Error(FSComp.SR.ilUndefinedValue(showL(valAtBindL v)),m)) + errorR(Error(FSComp.SR.ilUndefinedValue(showL(valAtBindL v)), m)) notlazy (Arg 668(* random value for post-hoc diagnostic analysis on generated tree *) ) v.Force() let StorageForValRef m (v: ValRef) eenv = StorageForVal m v.Deref eenv -//-------------------------------------------------------------------------- -// Imported modules and the environment -// -// How a top level value is represented depends on its type. If it's a -// function or is polymorphic, then it gets represented as a -// method (possibly and instance method). Otherwise it gets represented as a -// static field. -//-------------------------------------------------------------------------- - -let IsValRefIsDllImport g (vref:ValRef) = - vref.Attribs |> HasFSharpAttributeOpt g g.attrib_DllImportAttribute +let IsValRefIsDllImport g (vref: ValRef) = + vref.Attribs |> HasFSharpAttributeOpt g g.attrib_DllImportAttribute -let GetMethodSpecForMemberVal amap g (memberInfo:ValMemberInfo) (vref:ValRef) = +/// Determine how a top level value is represented, when it is being represented +/// as a method. +let GetMethodSpecForMemberVal amap g (memberInfo: ValMemberInfo) (vref: ValRef) = let m = vref.Range - let tps,curriedArgInfos,returnTy,retInfo = + let tps, curriedArgInfos, returnTy, retInfo = assert(vref.ValReprInfo.IsSome) GetTopValTypeInCompiledForm g (Option.get vref.ValReprInfo) vref.Type m let tyenvUnderTypars = TypeReprEnv.ForTypars tps @@ -801,263 +918,287 @@ let GetMethodSpecForMemberVal amap g (memberInfo:ValMemberInfo) (vref:ValRef) = let parentTypars = parentTcref.TyparsNoRange let numParentTypars = parentTypars.Length if tps.Length < numParentTypars then error(InternalError("CodeGen check: type checking did not ensure that this method is sufficiently generic", m)) - let ctps,mtps = List.splitAt numParentTypars tps + let ctps, mtps = List.splitAt numParentTypars tps let isCompiledAsInstance = ValRefIsCompiledAsInstanceMember g vref - let ilActualRetTy = + let ilActualRetTy = let ilRetTy = GenReturnType amap m tyenvUnderTypars returnTy if isCtor || cctor then ILType.Void else ilRetTy let ilTy = GenType amap m tyenvUnderTypars (mkAppTy parentTcref (List.map mkTyparTy ctps)) - if isCompiledAsInstance || isCtor then - // Find the 'this' argument type if any - let thisTy,flatArgInfos = - if isCtor then (GetFSharpViewOfReturnType g returnTy),flatArgInfos - else - match flatArgInfos with + if isCompiledAsInstance || isCtor then + // Find the 'this' argument type if any + let thisTy, flatArgInfos = + if isCtor then (GetFSharpViewOfReturnType g returnTy), flatArgInfos + else + match flatArgInfos with | [] -> error(InternalError("This instance method '" + vref.LogicalName + "' has no arguments", m)) - | (h,_):: t -> h,t + | (h, _):: t -> h, t let thisTy = if isByrefTy g thisTy then destByrefTy g thisTy else thisTy let thisArgTys = argsOfAppTy g thisTy if numParentTypars <> thisArgTys.Length then let msg = sprintf "CodeGen check: type checking did not quantify the correct number of type variables for this method, #parentTypars = %d, #mtps = %d, #thisArgTys = %d" numParentTypars mtps.Length thisArgTys.Length - warning(InternalError(msg,m)) - else + warning(InternalError(msg, m)) + else List.iter2 - (fun gtp ty2 -> - if not (typeEquiv g (mkTyparTy gtp) ty2) then + (fun gtp ty2 -> + if not (typeEquiv g (mkTyparTy gtp) ty2) then warning(InternalError("CodeGen check: type checking did not quantify the correct type variables for this method: generalization list contained " - + gtp.Name + "#" + string gtp.Stamp + " and list from 'this' pointer contained " + (showL(typeL ty2)), m))) - ctps + + gtp.Name + "#" + string gtp.Stamp + " and list from 'this' pointer contained " + (showL(typeL ty2)), m))) + ctps thisArgTys - let methodArgTys,paramInfos = List.unzip flatArgInfos - let isSlotSig = memberInfo.MemberFlags.IsDispatchSlot || memberInfo.MemberFlags.IsOverrideOrExplicitImpl + let methodArgTys, paramInfos = List.unzip flatArgInfos + let isSlotSig = memberInfo.MemberFlags.IsDispatchSlot || memberInfo.MemberFlags.IsOverrideOrExplicitImpl let ilMethodArgTys = GenParamTypes amap m tyenvUnderTypars isSlotSig methodArgTys let ilMethodInst = GenTypeArgs amap m tyenvUnderTypars (List.map mkTyparTy mtps) - let mspec = mkILInstanceMethSpecInTy (ilTy,vref.CompiledName,ilMethodArgTys,ilActualRetTy,ilMethodInst) - - mspec,ctps,mtps,paramInfos,retInfo,methodArgTys - else - let methodArgTys,paramInfos = List.unzip flatArgInfos + let mspec = mkILInstanceMethSpecInTy (ilTy, vref.CompiledName, ilMethodArgTys, ilActualRetTy, ilMethodInst) + + mspec, ctps, mtps, paramInfos, retInfo, methodArgTys + else + let methodArgTys, paramInfos = List.unzip flatArgInfos let ilMethodArgTys = GenParamTypes amap m tyenvUnderTypars false methodArgTys let ilMethodInst = GenTypeArgs amap m tyenvUnderTypars (List.map mkTyparTy mtps) - let mspec = mkILStaticMethSpecInTy (ilTy,vref.CompiledName,ilMethodArgTys,ilActualRetTy,ilMethodInst) - - mspec,ctps,mtps,paramInfos,retInfo,methodArgTys - -// Generate the ILFieldSpec for a top-level value + let mspec = mkILStaticMethSpecInTy (ilTy, vref.CompiledName, ilMethodArgTys, ilActualRetTy, ilMethodInst) + + mspec, ctps, mtps, paramInfos, retInfo, methodArgTys -let ComputeFieldSpecForVal(optIntraAssemblyInfo:IlxGenIntraAssemblyInfo option, isInteractive, g, ilTyForProperty, vspec:Val, nm, m, cloc, ilTy, ilGetterMethRef) = +/// Determine how a top-level value is represented, when representing as a field, by computing an ILFieldSpec +let ComputeFieldSpecForVal(optIntraAssemblyInfo: IlxGenIntraAssemblyInfo option, isInteractive, g, ilTyForProperty, vspec: Val, nm, m, cloc, ilTy, ilGetterMethRef) = assert vspec.IsCompiledAsTopLevel let generate() = GenFieldSpecForStaticField (isInteractive, g, ilTyForProperty, vspec, nm, m, cloc, ilTy) - match optIntraAssemblyInfo with + match optIntraAssemblyInfo with | None -> generate() - | Some intraAssemblyInfo -> + | Some intraAssemblyInfo -> if vspec.IsMutable && vspec.IsCompiledAsTopLevel && isStructTy g vspec.Type then let ok, res = intraAssemblyInfo.StaticFieldInfo.TryGetValue ilGetterMethRef - if ok then - res - else + if ok then + res + else let res = generate() intraAssemblyInfo.StaticFieldInfo.[ilGetterMethRef] <- res res - else + else generate() -let IsValCompiledAsMethod g (v:Val) = - match v.ValReprInfo with +/// Compute the representation information for an F#-declared value (not a member nor a function). +/// Mutable and literal static fields must have stable names and live in the "public" location +let ComputeStorageForFSharpValue amap g cloc optIntraAssemblyInfo optShadowLocal isInteractive returnTy (vref: ValRef) m = + let nm = vref.CompiledName + let vspec = vref.Deref + let ilTy = GenType amap m TypeReprEnv.Empty returnTy (* TypeReprEnv.Empty ok: not a field in a generic class *) + let ilTyForProperty = mkILTyForCompLoc cloc + let attribs = vspec.Attribs + let hasLiteralAttr = HasFSharpAttribute g g.attrib_LiteralAttribute attribs + let ilTypeRefForProperty = ilTyForProperty.TypeRef + let ilGetterMethRef = mkILMethRef (ilTypeRefForProperty, ILCallingConv.Static, "get_"+nm, 0, [], ilTy) + let ilSetterMethRef = mkILMethRef (ilTypeRefForProperty, ILCallingConv.Static, "set_"+nm, 0, [ilTy], ILType.Void) + let ilFieldSpec = ComputeFieldSpecForVal(optIntraAssemblyInfo, isInteractive, g, ilTyForProperty, vspec, nm, m, cloc, ilTy, ilGetterMethRef) + StaticField (ilFieldSpec, vref, hasLiteralAttr, ilTyForProperty, nm, ilTy, ilGetterMethRef, ilSetterMethRef, optShadowLocal) + +/// Compute the representation information for an F#-declared member +let ComputeStorageForFSharpMember amap g topValInfo memberInfo (vref: ValRef) m = + let mspec, _, _, paramInfos, retInfo, methodArgTys = GetMethodSpecForMemberVal amap g memberInfo vref + Method (topValInfo, vref, mspec, m, paramInfos, methodArgTys, retInfo) + +/// Compute the representation information for an F#-declared function in a module or an F#-decalared extension member. +/// Note, there is considerable overlap with ComputeStorageForFSharpMember/GetMethodSpecForMemberVal and these could be +/// rationalized. +let ComputeStorageForFSharpFunctionOrFSharpExtensionMember amap g cloc topValInfo (vref: ValRef) m = + let nm = vref.CompiledName + let (tps, curriedArgInfos, returnTy, retInfo) = GetTopValTypeInCompiledForm g topValInfo vref.Type m + let tyenvUnderTypars = TypeReprEnv.ForTypars tps + let (methodArgTys, paramInfos) = curriedArgInfos |> List.concat |> List.unzip + let ilMethodArgTys = GenParamTypes amap m tyenvUnderTypars false methodArgTys + let ilRetTy = GenReturnType amap m tyenvUnderTypars returnTy + let ilLocTy = mkILTyForCompLoc cloc + let ilMethodInst = GenTypeArgs amap m tyenvUnderTypars (List.map mkTyparTy tps) + let mspec = mkILStaticMethSpecInTy (ilLocTy, nm, ilMethodArgTys, ilRetTy, ilMethodInst) + Method (topValInfo, vref, mspec, m, paramInfos, methodArgTys, retInfo) + +/// Determine if an F#-declared value, method or function is compiled as a method. +let IsFSharpValCompiledAsMethod g (v: Val) = + match v.ValReprInfo with | None -> false - | Some topValInfo -> + | Some topValInfo -> not (isUnitTy g v.Type && not v.IsMemberOrModuleBinding && not v.IsMutable) && - not v.IsCompiledAsStaticPropertyWithoutField && - match GetTopValTypeInFSharpForm g topValInfo v.Type v.Range with - | [],[],_,_ when not v.IsMember -> false + not v.IsCompiledAsStaticPropertyWithoutField && + match GetTopValTypeInFSharpForm g topValInfo v.Type v.Range with + | [], [], _, _ when not v.IsMember -> false | _ -> true -// This called via 2 routes. -// (a) ComputeAndAddStorageForLocalTopVal -// (b) ComputeStorageForNonLocalTopVal -// -/// This function decides the storage for the val. -/// The decision is based on arityInfo. -let ComputeStorageForTopVal (amap, g, optIntraAssemblyInfo:IlxGenIntraAssemblyInfo option, isInteractive, optShadowLocal, vref:ValRef, cloc) = +/// Determine how a top level value is represented, when it is being represented +/// as a method. This depends on its type and other representation inforrmation. +/// If it's a function or is polymorphic, then it gets represented as a +/// method (possibly and instance method). Otherwise it gets represented as a +/// static field and property. +let ComputeStorageForTopVal (amap, g, optIntraAssemblyInfo: IlxGenIntraAssemblyInfo option, isInteractive, optShadowLocal, vref: ValRef, cloc) = - if isUnitTy g vref.Type && not vref.IsMemberOrModuleBinding && not vref.IsMutable then - Null + if isUnitTy g vref.Type && not vref.IsMemberOrModuleBinding && not vref.IsMutable then + Null else - let topValInfo = - match vref.ValReprInfo with - | None -> error(InternalError("ComputeStorageForTopVal: no arity found for " + showL(valRefL vref),vref.Range)) + let topValInfo = + match vref.ValReprInfo with + | None -> error(InternalError("ComputeStorageForTopVal: no arity found for " + showL(valRefL vref), vref.Range)) | Some a -> a - + let m = vref.Range - let nm = vref.CompiledName + let nm = vref.CompiledName - if vref.Deref.IsCompiledAsStaticPropertyWithoutField then - let nm = "get_"+nm + if vref.Deref.IsCompiledAsStaticPropertyWithoutField then + let nm = "get_"+nm let tyenvUnderTypars = TypeReprEnv.ForTypars [] let ilRetTy = GenType amap m tyenvUnderTypars vref.Type let ty = mkILTyForCompLoc cloc let mspec = mkILStaticMethSpecInTy (ty, nm, [], ilRetTy, []) - + StaticProperty (mspec, optShadowLocal) - else + else // Determine when a static field is required. // // REVIEW: This call to GetTopValTypeInFSharpForm is only needed to determine if this is a (type) function or a value // We should just look at the arity - match GetTopValTypeInFSharpForm g topValInfo vref.Type vref.Range with - | [],[], returnTy,_ when not vref.IsMember -> - // Mutable and literal static fields must have stable names and live in the "public" location - // See notes on GenFieldSpecForStaticField above. - let vspec = vref.Deref - let ilTy = GenType amap m TypeReprEnv.Empty returnTy (* TypeReprEnv.Empty ok: not a field in a generic class *) - let ilTyForProperty = mkILTyForCompLoc cloc - let attribs = vspec.Attribs - let hasLiteralAttr = HasFSharpAttribute g g.attrib_LiteralAttribute attribs - - let ilTypeRefForProperty = ilTyForProperty.TypeRef - let ilGetterMethRef = mkILMethRef (ilTypeRefForProperty, ILCallingConv.Static, "get_"+nm, 0, [], ilTy) - let ilSetterMethRef = mkILMethRef (ilTypeRefForProperty, ILCallingConv.Static, "set_"+nm, 0, [ilTy], ILType.Void) - - let fspec = ComputeFieldSpecForVal(optIntraAssemblyInfo, isInteractive, g, ilTyForProperty, vspec, nm, m, cloc, ilTy, ilGetterMethRef) - - StaticField (fspec, vref, hasLiteralAttr, ilTyForProperty, nm, ilTy, ilGetterMethRef, ilSetterMethRef, optShadowLocal) - - | _ -> - match vref.MemberInfo with - | Some memberInfo when not vref.IsExtensionMember -> - let mspec,_,_,paramInfos,retInfo,methodArgTys = GetMethodSpecForMemberVal amap g memberInfo vref - Method (topValInfo, vref, mspec, m, paramInfos, methodArgTys, retInfo) - | _ -> - let (tps, curriedArgInfos, returnTy, retInfo) = GetTopValTypeInCompiledForm g topValInfo vref.Type m - let tyenvUnderTypars = TypeReprEnv.ForTypars tps - let (methodArgTys,paramInfos) = curriedArgInfos |> List.concat |> List.unzip - let ilMethodArgTys = GenParamTypes amap m tyenvUnderTypars false methodArgTys - let ilRetTy = GenReturnType amap m tyenvUnderTypars returnTy - let ilLocTy = mkILTyForCompLoc cloc - let ilMethodInst = GenTypeArgs amap m tyenvUnderTypars (List.map mkTyparTy tps) - let mspec = mkILStaticMethSpecInTy (ilLocTy, nm, ilMethodArgTys, ilRetTy, ilMethodInst) - Method (topValInfo, vref, mspec, m, paramInfos, methodArgTys, retInfo) - -let ComputeAndAddStorageForLocalTopVal (amap, g, intraAssemblyFieldTable, isInteractive, optShadowLocal) cloc (v:Val) eenv = + match GetTopValTypeInFSharpForm g topValInfo vref.Type vref.Range with + | [], [], returnTy, _ when not vref.IsMember -> + ComputeStorageForFSharpValue amap g cloc optIntraAssemblyInfo optShadowLocal isInteractive returnTy vref m + | _ -> + match vref.MemberInfo with + | Some memberInfo when not vref.IsExtensionMember -> + ComputeStorageForFSharpMember amap g topValInfo memberInfo vref m + | _ -> + ComputeStorageForFSharpFunctionOrFSharpExtensionMember amap g cloc topValInfo vref m + +/// Determine how an F#-declared value, function or member is represented, if it is in the assembly being compiled. +let ComputeAndAddStorageForLocalTopVal (amap, g, intraAssemblyFieldTable, isInteractive, optShadowLocal) cloc (v: Val) eenv = let storage = ComputeStorageForTopVal (amap, g, Some intraAssemblyFieldTable, isInteractive, optShadowLocal, mkLocalValRef v, cloc) - AddStorageForVal g (v,notlazy storage) eenv + AddStorageForVal g (v, notlazy storage) eenv -let ComputeStorageForNonLocalTopVal amap g cloc modref (v:Val) = - match v.ValReprInfo with - | None -> error(InternalError("ComputeStorageForNonLocalTopVal, expected an arity for " + v.LogicalName,v.Range)) +/// Determine how an F#-declared value, function or member is represented, if it is an external assembly. +let ComputeStorageForNonLocalTopVal amap g cloc modref (v: Val) = + match v.ValReprInfo with + | None -> error(InternalError("ComputeStorageForNonLocalTopVal, expected an arity for " + v.LogicalName, v.Range)) | Some _ -> ComputeStorageForTopVal (amap, g, None, false, NoShadowLocal, mkNestedValRef modref v, cloc) -let rec ComputeStorageForNonLocalModuleOrNamespaceRef amap g cloc acc (modref:ModuleOrNamespaceRef) (modul:ModuleOrNamespace) = - let acc = - (acc, modul.ModuleOrNamespaceType.ModuleAndNamespaceDefinitions) ||> List.fold (fun acc smodul -> - ComputeStorageForNonLocalModuleOrNamespaceRef amap g (CompLocForSubModuleOrNamespace cloc smodul) acc (modref.NestedTyconRef smodul) smodul) +/// Determine how all the F#-decalred top level values, functions and members are represented, for an external module or namespace. +let rec AddStorageForNonLocalModuleOrNamespaceRef amap g cloc acc (modref: ModuleOrNamespaceRef) (modul: ModuleOrNamespace) = + let acc = + (acc, modul.ModuleOrNamespaceType.ModuleAndNamespaceDefinitions) ||> List.fold (fun acc smodul -> + AddStorageForNonLocalModuleOrNamespaceRef amap g (CompLocForSubModuleOrNamespace cloc smodul) acc (modref.NestedTyconRef smodul) smodul) - let acc = - (acc, modul.ModuleOrNamespaceType.AllValsAndMembers) ||> Seq.fold (fun acc v -> - AddStorageForVal g (v, lazy (ComputeStorageForNonLocalTopVal amap g cloc modref v)) acc) + let acc = + (acc, modul.ModuleOrNamespaceType.AllValsAndMembers) ||> Seq.fold (fun acc v -> + AddStorageForVal g (v, lazy (ComputeStorageForNonLocalTopVal amap g cloc modref v)) acc) acc -let ComputeStorageForExternalCcu amap g eenv (ccu:CcuThunk) = +/// Determine how all the F#-declared top level values, functions and members are represented, for an external assembly. +let AddStorageForExternalCcu amap g eenv (ccu: CcuThunk) = if not ccu.IsFSharp then eenv else let cloc = CompLocForCcu ccu - let eenv = + let eenv = List.foldBack - (fun smodul acc -> + (fun smodul acc -> let cloc = CompLocForSubModuleOrNamespace cloc smodul - let modref = mkNonLocalCcuRootEntityRef ccu smodul - ComputeStorageForNonLocalModuleOrNamespaceRef amap g cloc acc modref smodul) + let modref = mkNonLocalCcuRootEntityRef ccu smodul + AddStorageForNonLocalModuleOrNamespaceRef amap g cloc acc modref smodul) ccu.RootModulesAndNamespaces eenv - let eenv = + let eenv = let eref = ERefNonLocalPreResolved ccu.Contents (mkNonLocalEntityRef ccu [| |]) - (eenv, ccu.Contents.ModuleOrNamespaceType.AllValsAndMembers) ||> Seq.fold (fun acc v -> - AddStorageForVal g (v, lazy (ComputeStorageForNonLocalTopVal amap g cloc eref v)) acc) + (eenv, ccu.Contents.ModuleOrNamespaceType.AllValsAndMembers) ||> Seq.fold (fun acc v -> + AddStorageForVal g (v, lazy (ComputeStorageForNonLocalTopVal amap g cloc eref v)) acc) + eenv + +/// Record how all the top level F#-declared values, functions and members are represented, for a local module or namespace. +let rec AddBindingsForLocalModuleType allocVal cloc eenv (mty: ModuleOrNamespaceType) = + let eenv = List.fold (fun eenv submodul -> AddBindingsForLocalModuleType allocVal (CompLocForSubModuleOrNamespace cloc submodul) eenv submodul.ModuleOrNamespaceType) eenv mty.ModuleAndNamespaceDefinitions + let eenv = Seq.fold (fun eenv v -> allocVal cloc v eenv) eenv mty.AllValsAndMembers eenv - -let rec AddBindingsForLocalModuleType allocVal cloc eenv (mty:ModuleOrNamespaceType) = - let eenv = List.fold (fun eenv submodul -> AddBindingsForLocalModuleType allocVal (CompLocForSubModuleOrNamespace cloc submodul) eenv submodul.ModuleOrNamespaceType) eenv mty.ModuleAndNamespaceDefinitions - let eenv = Seq.fold (fun eenv v -> allocVal cloc v eenv) eenv mty.AllValsAndMembers - eenv -let AddExternalCcusToIlxGenEnv amap g eenv ccus = List.fold (ComputeStorageForExternalCcu amap g) eenv ccus +/// Record how all the top level F#-declared values, functions and members are represented, for a set of referenced assemblies. +let AddExternalCcusToIlxGenEnv amap g eenv ccus = + List.fold (AddStorageForExternalCcu amap g) eenv ccus -let AddBindingsForTycon allocVal (cloc:CompileLocation) (tycon:Tycon) eenv = - let unrealizedSlots = +/// Record how all the unrealized abstract slots are represented, for a type definition. +let AddBindingsForTycon allocVal (cloc: CompileLocation) (tycon: Tycon) eenv = + let unrealizedSlots = if tycon.IsFSharpObjectModelTycon - then tycon.FSharpObjectModelTypeInfo.fsobjmodel_vslots + then tycon.FSharpObjectModelTypeInfo.fsobjmodel_vslots else [] - (eenv,unrealizedSlots) ||> List.fold (fun eenv vref -> allocVal cloc vref.Deref eenv) + (eenv, unrealizedSlots) ||> List.fold (fun eenv vref -> allocVal cloc vref.Deref eenv) -let rec AddBindingsForModuleDefs allocVal (cloc:CompileLocation) eenv mdefs = +/// Record how constructs are represented, for a sequence of definitions in a module or namespace fragment. +let rec AddBindingsForModuleDefs allocVal (cloc: CompileLocation) eenv mdefs = List.fold (AddBindingsForModuleDef allocVal cloc) eenv mdefs -and AddBindingsForModuleDef allocVal cloc eenv x = - match x with - | TMDefRec(_isRec,tycons,mbinds,_) -> - (* Virtual don't have 'let' bindings and must be added to the environment *) +/// Record how constructs are represented, for a module or namespace fragment definition. +and AddBindingsForModuleDef allocVal cloc eenv x = + match x with + | TMDefRec(_isRec, tycons, mbinds, _) -> + // Virtual don't have 'let' bindings and must be added to the environment let eenv = List.foldBack (AddBindingsForTycon allocVal cloc) tycons eenv let eenv = List.foldBack (AddBindingsForModule allocVal cloc) mbinds eenv eenv - | TMDefLet(bind,_) -> + | TMDefLet(bind, _) -> allocVal cloc bind.Var eenv - | TMDefDo _ -> + | TMDefDo _ -> eenv - | TMAbstract(ModuleOrNamespaceExprWithSig(mtyp, _, _)) -> - AddBindingsForLocalModuleType allocVal cloc eenv mtyp - | TMDefs(mdefs) -> - AddBindingsForModuleDefs allocVal cloc eenv mdefs - -and AddBindingsForModule allocVal cloc x eenv = - match x with - | ModuleOrNamespaceBinding.Binding bind -> + | TMAbstract(ModuleOrNamespaceExprWithSig(mtyp, _, _)) -> + AddBindingsForLocalModuleType allocVal cloc eenv mtyp + | TMDefs(mdefs) -> + AddBindingsForModuleDefs allocVal cloc eenv mdefs + +/// Record how constructs are represented, for a module or namespace. +and AddBindingsForModule allocVal cloc x eenv = + match x with + | ModuleOrNamespaceBinding.Binding bind -> allocVal cloc bind.Var eenv - | ModuleOrNamespaceBinding.Module (mspec, mdef) -> - let cloc = - if mspec.IsNamespace then cloc - else CompLocForFixedModule cloc.clocQualifiedNameOfFile cloc.clocTopImplQualifiedName mspec - + | ModuleOrNamespaceBinding.Module (mspec, mdef) -> + let cloc = + if mspec.IsNamespace then cloc + else CompLocForFixedModule cloc.QualifiedNameOfFile cloc.TopImplQualifiedName mspec + AddBindingsForModuleDef allocVal cloc eenv mdef -and AddBindingsForModuleTopVals _g allocVal _cloc eenv vs = +/// Record how constructs are represented, for the values and functions defined in a module or namespace fragment. +and AddBindingsForModuleTopVals _g allocVal _cloc eenv vs = List.foldBack allocVal vs eenv -// Put the partial results for a generated fragment (i.e. a part of a CCU generated by FSI) -// into the stored results for the whole CCU. -// isIncrementalFragment = true --> "typed input" -// isIncrementalFragment = false --> "#load" -let AddIncrementalLocalAssemblyFragmentToIlxGenEnv (amap:ImportMap, isIncrementalFragment, g, ccu, fragName, intraAssemblyInfo, eenv, typedImplFiles) = +/// Put the partial results for a generated fragment (i.e. a part of a CCU generated by FSI) +/// into the stored results for the whole CCU. +/// isIncrementalFragment = true --> "typed input" +/// isIncrementalFragment = false --> "#load" +let AddIncrementalLocalAssemblyFragmentToIlxGenEnv (amap: ImportMap, isIncrementalFragment, g, ccu, fragName, intraAssemblyInfo, eenv, typedImplFiles) = let cloc = CompLocForFragment fragName ccu let allocVal = ComputeAndAddStorageForLocalTopVal (amap, g, intraAssemblyInfo, true, NoShadowLocal) - (eenv, typedImplFiles) ||> List.fold (fun eenv (TImplFile(qname, _, mexpr, _, _, _)) -> - let cloc = { cloc with clocTopImplQualifiedName = qname.Text } - if isIncrementalFragment then + (eenv, typedImplFiles) ||> List.fold (fun eenv (TImplFile(qname, _, mexpr, _, _, _)) -> + let cloc = { cloc with TopImplQualifiedName = qname.Text } + if isIncrementalFragment then match mexpr with | ModuleOrNamespaceExprWithSig(_, mdef, _) -> AddBindingsForModuleDef allocVal cloc eenv mdef else - AddBindingsForLocalModuleType allocVal cloc eenv mexpr.Type) + AddBindingsForLocalModuleType allocVal cloc eenv mexpr.Type) //-------------------------------------------------------------------------- -// Generate debugging marks -//-------------------------------------------------------------------------- +// Generate debugging marks +//-------------------------------------------------------------------------- -let GenILSourceMarker (g: TcGlobals) (m:range) = +/// Generate IL debuging information. +let GenILSourceMarker (g: TcGlobals) (m: range) = ILSourceMarker.Create(document=g.memoize_file m.FileIndex, line=m.StartLine, - /// NOTE: .NET && VS measure first column as column 1 - column= m.StartColumn+1, + /// NOTE: .NET && VS measure first column as column 1 + column= m.StartColumn+1, endLine= m.EndLine, endColumn=m.EndColumn+1) -let GenPossibleILSourceMarker cenv m = - if cenv.opts.generateDebugSymbols then +/// Optionally generate IL debuging information. +let GenPossibleILSourceMarker cenv m = + if cenv.opts.generateDebugSymbols then Some (GenILSourceMarker cenv.g m ) - else + else None //-------------------------------------------------------------------------- @@ -1067,130 +1208,131 @@ let GenPossibleILSourceMarker cenv m = #if FABLE_COMPILER let HashRangeSorted (ht: IEnumerable>) = #else -let HashRangeSorted (ht: IDictionary<_, (int * _)>) = +let HashRangeSorted (ht: IDictionary<_, (int * _)>) = #endif - [ for KeyValue(_k,v) in ht -> v ] |> List.sortBy fst |> List.map snd -let MergeOptions m o1 o2 = - match o1,o2 with + [ for KeyValue(_k, v) in ht -> v ] |> List.sortBy fst |> List.map snd + +let MergeOptions m o1 o2 = + match o1, o2 with | Some x, None | None, Some x -> Some x | None, None -> None - | Some x, Some _ -> + | Some x, Some _ -> #if DEBUG // This warning fires on some code that also triggers this warning: - // The implementation of a specified generic interface - // required a method implementation not fully supported by F# Interactive. In - // the unlikely event that the resulting class fails to load then compile + // The implementation of a specified generic interface + // required a method implementation not fully supported by F# Interactive. In + // the unlikely event that the resulting class fails to load then compile // the interface type into a statically-compiled DLL and reference it using '#r' // The code is OK so we don't print this. - errorR(InternalError("MergeOptions: two values given",m)) + errorR(InternalError("MergeOptions: two values given", m)) #else ignore m #endif - Some x + Some x -let MergePropertyPair m (pd: ILPropertyDef) (pdef: ILPropertyDef) = +let MergePropertyPair m (pd: ILPropertyDef) (pdef: ILPropertyDef) = pd.With(getMethod=MergeOptions m pd.GetMethod pdef.GetMethod, setMethod=MergeOptions m pd.SetMethod pdef.SetMethod) type PropKey = PropKey of string * ILTypes * ILThisConvention -let AddPropertyDefToHash (m:range) (ht:Dictionary) (pdef: ILPropertyDef) = +let AddPropertyDefToHash (m: range) (ht: Dictionary) (pdef: ILPropertyDef) = let nm = PropKey(pdef.Name, pdef.Args, pdef.CallingConv) match ht.TryGetValue(nm) with | true, (idx, pd) -> ht.[nm] <- (idx, MergePropertyPair m pd pdef) | _ -> ht.[nm] <- (ht.Count, pdef) - -/// Merge a whole group of properties all at once -let MergePropertyDefs m ilPropertyDefs = - let ht = new Dictionary<_,_>(3,HashIdentity.Structural) - ilPropertyDefs |> List.iter (AddPropertyDefToHash m ht) + +/// Merge a whole group of properties all at once +let MergePropertyDefs m ilPropertyDefs = + let ht = new Dictionary<_, _>(3, HashIdentity.Structural) + ilPropertyDefs |> List.iter (AddPropertyDefToHash m ht) HashRangeSorted ht //-------------------------------------------------------------------------- // Buffers for compiling modules. The entire assembly gets compiled via an AssemblyBuilder -//-------------------------------------------------------------------------- - -/// Information collected imperatively for each type definition -type TypeDefBuilder(tdef: ILTypeDef, tdefDiscards) = - let gmethods = new ResizeArray(0) - let gfields = new ResizeArray(0) - let gproperties : Dictionary = new Dictionary<_,_>(3,HashIdentity.Structural) - let gevents = new ResizeArray(0) - let gnested = new TypeDefsBuilder() - - member b.Close() = +//-------------------------------------------------------------------------- + +/// Information collected imperatively for each type definition +type TypeDefBuilder(tdef: ILTypeDef, tdefDiscards) = + let gmethods = new ResizeArray(0) + let gfields = new ResizeArray(0) + let gproperties: Dictionary = new Dictionary<_, _>(3, HashIdentity.Structural) + let gevents = new ResizeArray(0) + let gnested = new TypeDefsBuilder() + + member b.Close() = tdef.With(methods = mkILMethods (tdef.Methods.AsList @ ResizeArray.toList gmethods), - fields = mkILFields (tdef.Fields.AsList @ ResizeArray.toList gfields), + fields = mkILFields (tdef.Fields.AsList @ ResizeArray.toList gfields), properties = mkILProperties (tdef.Properties.AsList @ HashRangeSorted gproperties ), - events = mkILEvents (tdef.Events.AsList @ ResizeArray.toList gevents), + events = mkILEvents (tdef.Events.AsList @ ResizeArray.toList gevents), nestedTypes = mkILTypeDefs (tdef.NestedTypes.AsList @ gnested.Close())) member b.AddEventDef(edef) = gevents.Add edef member b.AddFieldDef(ilFieldDef) = gfields.Add ilFieldDef - member b.AddMethodDef(ilMethodDef) = - let discard = - match tdefDiscards with + member b.AddMethodDef(ilMethodDef) = + let discard = + match tdefDiscards with | Some (mdefDiscard, _) -> mdefDiscard ilMethodDef | None -> false - if not discard then + if not discard then gmethods.Add ilMethodDef member b.NestedTypeDefs = gnested member b.GetCurrentFields() = gfields |> Seq.readonly - /// Merge Get and Set property nodes, which we generate independently for F# code - /// when we come across their corresponding methods. - member b.AddOrMergePropertyDef(pdef,m) = - let discard = - match tdefDiscards with + /// Merge Get and Set property nodes, which we generate independently for F# code + /// when we come across their corresponding methods. + member b.AddOrMergePropertyDef(pdef, m) = + let discard = + match tdefDiscards with | Some (_, pdefDiscard) -> pdefDiscard pdef | None -> false - if not discard then + if not discard then AddPropertyDefToHash m gproperties pdef - member b.PrependInstructionsToSpecificMethodDef(cond,instrs,tag) = + member b.PrependInstructionsToSpecificMethodDef(cond, instrs, tag) = match ResizeArray.tryFindIndex cond gmethods with - | Some idx -> gmethods.[idx] <- prependInstrsToMethod instrs gmethods.[idx] - | None -> gmethods.Add(mkILClassCtor (mkMethodBody (false,[],1,nonBranchingInstrsToCode instrs,tag))) + | Some idx -> gmethods.[idx] <- prependInstrsToMethod instrs gmethods.[idx] + | None -> gmethods.Add(mkILClassCtor (mkMethodBody (false, [], 1, nonBranchingInstrsToCode instrs, tag))) -and TypeDefsBuilder() = - let tdefs : Internal.Utilities.Collections.HashMultiMap = HashMultiMap(0, HashIdentity.Structural) - let mutable countDown = System.Int32.MaxValue +and TypeDefsBuilder() = + let tdefs: Internal.Utilities.Collections.HashMultiMap = HashMultiMap(0, HashIdentity.Structural) + let mutable countDown = System.Int32.MaxValue - member b.Close() = - //The order we emit type definitions is not deterministic since it is using the reverse of a range from a hash table. We should use an approximation of source order. - // Ideally it shouldn't matter which order we use. + member b.Close() = + //The order we emit type definitions is not deterministic since it is using the reverse of a range from a hash table. We should use an approximation of source order. + // Ideally it shouldn't matter which order we use. // However, for some tests FSI generated code appears sensitive to the order, especially for nested types. - - [ for (b, eliminateIfEmpty) in HashRangeSorted tdefs do - let tdef = b.Close() + + [ for (b, eliminateIfEmpty) in HashRangeSorted tdefs do + let tdef = b.Close() // Skip the type if it is empty - if not eliminateIfEmpty - || not tdef.NestedTypes.AsList.IsEmpty - || not tdef.Fields.AsList.IsEmpty - || not tdef.Events.AsList.IsEmpty - || not tdef.Properties.AsList.IsEmpty - || not (Array.isEmpty tdef.Methods.AsArray) then - yield tdef ] - - member b.FindTypeDefBuilder(nm) = - try tdefs.[nm] |> snd |> fst + if not eliminateIfEmpty + || not tdef.NestedTypes.AsList.IsEmpty + || not tdef.Fields.AsList.IsEmpty + || not tdef.Events.AsList.IsEmpty + || not tdef.Properties.AsList.IsEmpty + || not (Array.isEmpty tdef.Methods.AsArray) then + yield tdef ] + + member b.FindTypeDefBuilder(nm) = + try tdefs.[nm] |> snd |> fst with :? KeyNotFoundException -> failwith ("FindTypeDefBuilder: " + nm + " not found") - member b.FindNestedTypeDefsBuilder(path) = - List.fold (fun (acc:TypeDefsBuilder) x -> acc.FindTypeDefBuilder(x).NestedTypeDefs) b path + member b.FindNestedTypeDefsBuilder(path) = + List.fold (fun (acc: TypeDefsBuilder) x -> acc.FindTypeDefBuilder(x).NestedTypeDefs) b path - member b.FindNestedTypeDefBuilder(tref:ILTypeRef) = + member b.FindNestedTypeDefBuilder(tref: ILTypeRef) = b.FindNestedTypeDefsBuilder(tref.Enclosing).FindTypeDefBuilder(tref.Name) - member b.AddTypeDef(tdef:ILTypeDef, eliminateIfEmpty, addAtEnd, tdefDiscards) = + member b.AddTypeDef(tdef: ILTypeDef, eliminateIfEmpty, addAtEnd, tdefDiscards) = let idx = if addAtEnd then (countDown <- countDown - 1; countDown) else tdefs.Count tdefs.Add (tdef.Name, (idx, (new TypeDefBuilder(tdef, tdefDiscards), eliminateIfEmpty))) @@ -1198,75 +1340,75 @@ type AnonTypeGenerationTable() = let dict = Dictionary(HashIdentity.Structural) member __.Table = dict -/// Assembly generation buffers -type AssemblyBuilder(cenv:cenv, anonTypeTable: AnonTypeGenerationTable) as mgbuf = - // The Abstract IL table of types - let gtdefs= new TypeDefsBuilder() - // The definitions of top level values, as quotations. - let mutable reflectedDefinitions : Dictionary = Dictionary(HashIdentity.Reference) +/// Assembly generation buffers +type AssemblyBuilder(cenv: cenv, anonTypeTable: AnonTypeGenerationTable) as mgbuf = + // The Abstract IL table of types + let gtdefs= new TypeDefsBuilder() + // The definitions of top level values, as quotations. + let mutable reflectedDefinitions: Dictionary = Dictionary(HashIdentity.Reference) let mutable extraBindingsToGenerate = [] - // A memoization table for generating value types for big constant arrays + // A memoization table for generating value types for big constant arrays let rawDataValueTypeGenerator = - new MemoizationTable<(CompileLocation * int) , ILTypeSpec> - ((fun (cloc,size) -> - let name = CompilerGeneratedName ("T" + string(newUnique()) + "_" + string size + "Bytes") // Type names ending ...$T_37Bytes - let vtdef = mkRawDataValueTypeDef cenv.g.iltyp_ValueType (name,size,0us) - let vtref = NestedTypeRefForCompLoc cloc vtdef.Name - let vtspec = mkILTySpec(vtref,[]) + new MemoizationTable<(CompileLocation * int), ILTypeSpec> + ((fun (cloc, size) -> + let name = CompilerGeneratedName ("T" + string(newUnique()) + "_" + string size + "Bytes") // Type names ending ...$T_37Bytes + let vtdef = mkRawDataValueTypeDef cenv.g.iltyp_ValueType (name, size, 0us) + let vtref = NestedTypeRefForCompLoc cloc vtdef.Name + let vtspec = mkILTySpec(vtref, []) let vtdef = vtdef.WithAccess(ComputeTypeAccess vtref true) mgbuf.AddTypeDef(vtref, vtdef, false, true, None) - vtspec), + vtspec), keyComparer=HashIdentity.Structural) let generateAnonType genToStringMethod (isStruct, ilTypeRef, nms) = - - let flds = [ for (i,nm) in Array.indexed nms -> (nm, nm + "@", ILType.TypeVar (uint16 i)) ] + + let flds = [ for (i, nm) in Array.indexed nms -> (nm, nm + "@", ILType.TypeVar (uint16 i)) ] // Note that this alternative below would give the same names as C#, but the generated // comparison/equality doesn't know about these names. - //let flds = [ for (i,nm) in Array.indexed nms -> (nm, "<" + nm + ">" + "i__Field", ILType.TypeVar (uint16 i)) ] + //let flds = [ for (i, nm) in Array.indexed nms -> (nm, "<" + nm + ">" + "i__Field", ILType.TypeVar (uint16 i)) ] - let ilGenericParams = - [ for nm in nms -> - { Name = sprintf "<%s>j__TPar" nm + let ilGenericParams = + [ for nm in nms -> + { Name = sprintf "<%s>j__TPar" nm Constraints = [] Variance=NonVariant CustomAttrsStored = storeILCustomAttrs emptyILCustomAttrs HasReferenceTypeConstraint=false HasNotNullableValueTypeConstraint=false - HasDefaultConstructorConstraint= false + HasDefaultConstructorConstraint= false MetadataIndex = NoMetadataIdx } ] let ilTy = mkILFormalNamedTy (if isStruct then ILBoxity.AsValue else ILBoxity.AsObject) ilTypeRef ilGenericParams - // Generate the IL fields - let ilFieldDefs = - mkILFields - [ for (_, fldName, fldTy) in flds -> - let fdef = mkILInstanceField (fldName, fldTy, None, ILMemberAccess.Private) - fdef.With(customAttrs = mkILCustomAttrs [ cenv.g.DebuggerBrowsableNeverAttribute ]) ] - - // Generate property definitions for the fields compiled as properties - let ilProperties = - mkILProperties - [ for (i,(propName, _fldName, fldTy)) in List.indexed flds -> + // Generate the IL fields + let ilFieldDefs = + mkILFields + [ for (_, fldName, fldTy) in flds -> + let fdef = mkILInstanceField (fldName, fldTy, None, ILMemberAccess.Private) + fdef.With(customAttrs = mkILCustomAttrs [ cenv.g.DebuggerBrowsableNeverAttribute ]) ] + + // Generate property definitions for the fields compiled as properties + let ilProperties = + mkILProperties + [ for (i, (propName, _fldName, fldTy)) in List.indexed flds -> ILPropertyDef.Create(name=propName, attributes=PropertyAttributes.None, setMethod=None, - getMethod=Some(mkILMethRef(ilTypeRef,ILCallingConv.Instance,"get_" + propName,0,[],fldTy )), + getMethod=Some(mkILMethRef(ilTypeRef, ILCallingConv.Instance, "get_" + propName, 0, [], fldTy )), callingConv=ILCallingConv.Instance.ThisConv, propertyType=fldTy, init= None, args=[], - customAttrs=mkILCustomAttrs [ mkCompilationMappingAttrWithSeqNum cenv.g (int SourceConstructFlags.Field) i ]) ] - - let ilMethods = - [ for (propName, fldName, fldTy) in flds -> - mkLdfldMethodDef ("get_" + propName,ILMemberAccess.Public,false,ilTy,fldName,fldTy) + customAttrs=mkILCustomAttrs [ mkCompilationMappingAttrWithSeqNum cenv.g (int SourceConstructFlags.Field) i ]) ] + + let ilMethods = + [ for (propName, fldName, fldTy) in flds -> + mkLdfldMethodDef ("get_" + propName, ILMemberAccess.Public, false, ilTy, fldName, fldTy) yield! genToStringMethod ilTy ] let ilBaseTy = (if isStruct then cenv.g.iltyp_ValueType else cenv.g.ilg.typ_Object) - + let ilCtorDef = mkILSimpleStorageCtorWithParamNames(None, (if isStruct then None else Some ilBaseTy.TypeSpec), ilTy, [], flds, ILMemberAccess.Public) let ilCtorRef = mkRefToILMethod(ilTypeRef, ilCtorDef) let ilMethodRefs = [| for mdef in ilMethods -> mkRefToILMethod(ilTypeRef, mdef) |] @@ -1275,38 +1417,38 @@ type AssemblyBuilder(cenv:cenv, anonTypeTable: AnonTypeGenerationTable) as mgbuf // Create a tycon that looks exactly like a record definition, to help drive the generation of equality/comparison code let m = range0 - let tps = - [ for nm in nms -> - let stp = Typar(mkSynId m ("T"+nm),TyparStaticReq.NoStaticReq,true) - NewTypar (TyparKind.Type, TyparRigidity.WarnIfNotRigid,stp,false,TyparDynamicReq.Yes,[],true,true) ] + let tps = + [ for nm in nms -> + let stp = Typar(mkSynId m ("T"+nm), TyparStaticReq.NoStaticReq, true) + NewTypar (TyparKind.Type, TyparRigidity.WarnIfNotRigid, stp, false, TyparDynamicReq.Yes, [], true, true) ] - let tycon = + let tycon = let lmtyp = MaybeLazy.Strict (NewEmptyModuleOrNamespaceType ModuleOrType) - let cpath = CompPath(ilTypeRef.Scope,[]) - NewTycon(Some cpath, ilTypeRef.Name, m, taccessPublic, taccessPublic, TyparKind.Type, LazyWithContext.NotLazy tps, XmlDoc.Empty, false, false, false, lmtyp) + let cpath = CompPath(ilTypeRef.Scope, []) + NewTycon(Some cpath, ilTypeRef.Name, m, taccessPublic, taccessPublic, TyparKind.Type, LazyWithContext.NotLazy tps, XmlDoc.Empty, false, false, false, lmtyp) - if isStruct then + if isStruct then tycon.SetIsStructRecordOrUnion(true) - tycon.entity_tycon_repr <- - TRecdRepr (MakeRecdFieldsTable - [ for (tp, (propName, _fldName, _fldTy)) in (List.zip tps flds) -> + tycon.entity_tycon_repr <- + TRecdRepr (MakeRecdFieldsTable + [ for (tp, (propName, _fldName, _fldTy)) in (List.zip tps flds) -> NewRecdField false None (mkSynId m propName) false (mkTyparTy tp) true false [] [] XmlDoc.Empty taccessPublic false ]) let tcref = mkLocalTyconRef tycon - let _,typ = generalizeTyconRef tcref + let _, typ = generalizeTyconRef tcref let tcaug = tcref.TypeContents - - tcaug.tcaug_interfaces <- - [ (cenv.g.mk_IStructuralComparable_ty,true,m) - (cenv.g.mk_IComparable_ty,true,m) - (mkAppTy cenv.g.system_GenericIComparable_tcref [typ],true,m) - (cenv.g.mk_IStructuralEquatable_ty,true,m) - (mkAppTy cenv.g.system_GenericIEquatable_tcref [typ],true,m) ] - - let vspec1,vspec2 = AugmentWithHashCompare.MakeValsForEqualsAugmentation cenv.g tcref - let evspec1,evspec2,evspec3 = AugmentWithHashCompare.MakeValsForEqualityWithComparerAugmentation cenv.g tcref - let cvspec1,cvspec2 = AugmentWithHashCompare.MakeValsForCompareAugmentation cenv.g tcref + + tcaug.tcaug_interfaces <- + [ (cenv.g.mk_IStructuralComparable_ty, true, m) + (cenv.g.mk_IComparable_ty, true, m) + (mkAppTy cenv.g.system_GenericIComparable_tcref [typ], true, m) + (cenv.g.mk_IStructuralEquatable_ty, true, m) + (mkAppTy cenv.g.system_GenericIEquatable_tcref [typ], true, m) ] + + let vspec1, vspec2 = AugmentWithHashCompare.MakeValsForEqualsAugmentation cenv.g tcref + let evspec1, evspec2, evspec3 = AugmentWithHashCompare.MakeValsForEqualityWithComparerAugmentation cenv.g tcref + let cvspec1, cvspec2 = AugmentWithHashCompare.MakeValsForCompareAugmentation cenv.g tcref let cvspec3 = AugmentWithHashCompare.MakeValsForCompareWithComparerAugmentation cenv.g tcref tcaug.SetCompare (mkLocalValRef cvspec1, mkLocalValRef cvspec2) @@ -1314,125 +1456,125 @@ type AssemblyBuilder(cenv:cenv, anonTypeTable: AnonTypeGenerationTable) as mgbuf tcaug.SetEquals (mkLocalValRef vspec1, mkLocalValRef vspec2) tcaug.SetHashAndEqualsWith (mkLocalValRef evspec1, mkLocalValRef evspec2, mkLocalValRef evspec3) - // Build the ILTypeDef. We don't rely on the normal record generation process because we want very specific field names + // Build the ILTypeDef. We don't rely on the normal record generation process because we want very specific field names let ilTypeDefAttribs = mkILCustomAttrs [ cenv.g.CompilerGeneratedAttribute; mkCompilationMappingAttr cenv.g (int SourceConstructFlags.RecordType) ] - let ilInterfaceTys = [ for (ity,_,_) in tcaug.tcaug_interfaces -> GenType cenv.amap m (TypeReprEnv.ForTypars tps) ity ] + let ilInterfaceTys = [ for (ity, _, _) in tcaug.tcaug_interfaces -> GenType cenv.amap m (TypeReprEnv.ForTypars tps) ity ] - let ilTypeDef = - mkILGenericClass (ilTypeRef.Name, ILTypeDefAccess.Public, ilGenericParams, ilBaseTy, ilInterfaceTys, - mkILMethods (ilCtorDef :: ilMethods), ilFieldDefs, emptyILTypeDefs, - ilProperties, mkILEvents [], ilTypeDefAttribs, + let ilTypeDef = + mkILGenericClass (ilTypeRef.Name, ILTypeDefAccess.Public, ilGenericParams, ilBaseTy, ilInterfaceTys, + mkILMethods (ilCtorDef :: ilMethods), ilFieldDefs, emptyILTypeDefs, + ilProperties, mkILEvents [], ilTypeDefAttribs, ILTypeInit.BeforeField) - + let ilTypeDef = ilTypeDef.WithSealed(true).WithSerializable(true) mgbuf.AddTypeDef(ilTypeRef, ilTypeDef, false, true, None) - - let extraBindings = + + let extraBindings = [ yield! AugmentWithHashCompare.MakeBindingsForCompareAugmentation cenv.g tycon yield! AugmentWithHashCompare.MakeBindingsForCompareWithComparerAugmentation cenv.g tycon - yield! AugmentWithHashCompare.MakeBindingsForEqualityWithComparerAugmentation cenv.g tycon + yield! AugmentWithHashCompare.MakeBindingsForEqualityWithComparerAugmentation cenv.g tycon yield! AugmentWithHashCompare.MakeBindingsForEqualsAugmentation cenv.g tycon ] - let optimizedExtraBindings = extraBindings |> List.map (fun (TBind(a,b,c)) -> TBind(a,cenv.optimizeDuringCodeGen b,c)) + let optimizedExtraBindings = extraBindings |> List.map (fun (TBind(a, b, c)) -> TBind(a, cenv.optimizeDuringCodeGen b, c)) extraBindingsToGenerate <- optimizedExtraBindings @ extraBindingsToGenerate - (ilCtorRef,ilMethodRefs,ilTy) + (ilCtorRef, ilMethodRefs, ilTy) - let mutable explicitEntryPointInfo : ILTypeRef option = None + let mutable explicitEntryPointInfo: ILTypeRef option = None /// static init fields on script modules. - let mutable scriptInitFspecs : (ILFieldSpec * range) list = [] + let mutable scriptInitFspecs: (ILFieldSpec * range) list = [] + + member mgbuf.AddScriptInitFieldSpec(fieldSpec, range) = + scriptInitFspecs <- (fieldSpec, range) :: scriptInitFspecs - member mgbuf.AddScriptInitFieldSpec(fieldSpec,range) = - scriptInitFspecs <- (fieldSpec,range) :: scriptInitFspecs - /// This initializes the script in #load and fsc command-line order causing their /// sideeffects to be executed. - member mgbuf.AddInitializeScriptsInOrderToEntryPoint() = + member mgbuf.AddInitializeScriptsInOrderToEntryPoint() = // Get the entry point and initialized any scripts in order. match explicitEntryPointInfo with | Some tref -> - let IntializeCompiledScript(fspec,m) = - mgbuf.AddExplicitInitToSpecificMethodDef((fun (md:ILMethodDef) -> md.IsEntryPoint), tref, fspec, GenPossibleILSourceMarker cenv m, [], []) + let IntializeCompiledScript(fspec, m) = + mgbuf.AddExplicitInitToSpecificMethodDef((fun (md: ILMethodDef) -> md.IsEntryPoint), tref, fspec, GenPossibleILSourceMarker cenv m, [], []) scriptInitFspecs |> List.iter IntializeCompiledScript | None -> () - member mgbuf.GenerateRawDataValueType(cloc,size) = + member mgbuf.GenerateRawDataValueType(cloc, size) = // Byte array literals require a ValueType of size the required number of bytes. // With fsi.exe, S.R.Emit TypeBuilder CreateType has restrictions when a ValueType VT is nested inside a type T, and T has a field of type VT. // To avoid this situation, these ValueTypes are generated under the private implementation rather than in the current cloc. [was bug 1532]. let cloc = CompLocForPrivateImplementationDetails cloc - rawDataValueTypeGenerator.Apply((cloc,size)) + rawDataValueTypeGenerator.Apply((cloc, size)) - member mgbuf.GenerateAnonType(genToStringMethod, anonInfo:AnonRecdTypeInfo) = + member mgbuf.GenerateAnonType(genToStringMethod, anonInfo: AnonRecdTypeInfo) = let isStruct = evalAnonInfoIsStruct anonInfo let key = anonInfo.Stamp - match anonTypeTable.Table.TryGetValue key with + match anonTypeTable.Table.TryGetValue key with | true, res -> res - | _ -> - let info = generateAnonType genToStringMethod (isStruct,anonInfo.ILTypeRef,anonInfo.SortedNames) + | _ -> + let info = generateAnonType genToStringMethod (isStruct, anonInfo.ILTypeRef, anonInfo.SortedNames) anonTypeTable.Table.[key] <- info info - member mgbuf.LookupAnonType(anonInfo:AnonRecdTypeInfo) = - match anonTypeTable.Table.TryGetValue anonInfo.Stamp with + member mgbuf.LookupAnonType(anonInfo: AnonRecdTypeInfo) = + match anonTypeTable.Table.TryGetValue anonInfo.Stamp with | true, res -> res | _ -> failwithf "the anonymous record %A has not been generated in the pre-phase of generating this module" anonInfo.ILTypeRef - member mgbuf.GrabExtraBindingsToGenerate() = + member mgbuf.GrabExtraBindingsToGenerate() = let result = extraBindingsToGenerate extraBindingsToGenerate <- [] result - member mgbuf.AddTypeDef(tref:ILTypeRef, tdef, eliminateIfEmpty, addAtEnd, tdefDiscards) = + member mgbuf.AddTypeDef(tref: ILTypeRef, tdef, eliminateIfEmpty, addAtEnd, tdefDiscards) = gtdefs.FindNestedTypeDefsBuilder(tref.Enclosing).AddTypeDef(tdef, eliminateIfEmpty, addAtEnd, tdefDiscards) - member mgbuf.GetCurrentFields(tref:ILTypeRef) = + member mgbuf.GetCurrentFields(tref: ILTypeRef) = gtdefs.FindNestedTypeDefBuilder(tref).GetCurrentFields() - member mgbuf.AddReflectedDefinition(vspec : Tast.Val,expr) = + member mgbuf.AddReflectedDefinition(vspec: Tast.Val, expr) = // preserve order by storing index of item let n = reflectedDefinitions.Count reflectedDefinitions.Add(vspec, (vspec.CompiledName, n, expr)) - - member mgbuf.ReplaceNameOfReflectedDefinition(vspec, newName) = + + member mgbuf.ReplaceNameOfReflectedDefinition(vspec, newName) = match reflectedDefinitions.TryGetValue vspec with | true, (name, n, expr) when name <> newName -> reflectedDefinitions.[vspec] <- (newName, n, expr) | _ -> () - member mgbuf.AddMethodDef(tref:ILTypeRef,ilMethodDef) = + member mgbuf.AddMethodDef(tref: ILTypeRef, ilMethodDef) = gtdefs.FindNestedTypeDefBuilder(tref).AddMethodDef(ilMethodDef) - if ilMethodDef.IsEntryPoint then + if ilMethodDef.IsEntryPoint then explicitEntryPointInfo <- Some(tref) - member mgbuf.AddExplicitInitToSpecificMethodDef(cond,tref,fspec,sourceOpt,feefee,seqpt) = - // Authoring a .cctor with effects forces the cctor for the 'initialization' module by doing a dummy store & load of a field - // Doing both a store and load keeps FxCop happier because it thinks the field is useful - let instrs = - [ yield! (if condition "NO_ADD_FEEFEE_TO_CCTORS" then [] elif condition "ADD_SEQPT_TO_CCTORS" then seqpt else feefee) // mark start of hidden code - yield mkLdcInt32 0 - yield mkNormalStsfld fspec - yield mkNormalLdsfld fspec - yield AI_pop] - gtdefs.FindNestedTypeDefBuilder(tref).PrependInstructionsToSpecificMethodDef(cond,instrs,sourceOpt) - - member mgbuf.AddEventDef(tref,edef) = + member mgbuf.AddExplicitInitToSpecificMethodDef(cond, tref, fspec, sourceOpt, feefee, seqpt) = + // Authoring a .cctor with effects forces the cctor for the 'initialization' module by doing a dummy store & load of a field + // Doing both a store and load keeps FxCop happier because it thinks the field is useful + let instrs = + [ yield! (if condition "NO_ADD_FEEFEE_TO_CCTORS" then [] elif condition "ADD_SEQPT_TO_CCTORS" then seqpt else feefee) // mark start of hidden code + yield mkLdcInt32 0 + yield mkNormalStsfld fspec + yield mkNormalLdsfld fspec + yield AI_pop] + gtdefs.FindNestedTypeDefBuilder(tref).PrependInstructionsToSpecificMethodDef(cond, instrs, sourceOpt) + + member mgbuf.AddEventDef(tref, edef) = gtdefs.FindNestedTypeDefBuilder(tref).AddEventDef(edef) - member mgbuf.AddFieldDef(tref,ilFieldDef) = + member mgbuf.AddFieldDef(tref, ilFieldDef) = gtdefs.FindNestedTypeDefBuilder(tref).AddFieldDef(ilFieldDef) - member mgbuf.AddOrMergePropertyDef(tref,pdef,m) = - gtdefs.FindNestedTypeDefBuilder(tref).AddOrMergePropertyDef(pdef,m) + member mgbuf.AddOrMergePropertyDef(tref, pdef, m) = + gtdefs.FindNestedTypeDefBuilder(tref).AddOrMergePropertyDef(pdef, m) - member mgbuf.Close() = + member mgbuf.Close() = // old implementation adds new element to the head of list so result was accumulated in reversed order - let orderedReflectedDefinitions = - [for (KeyValue(vspec, (name, n, expr))) in reflectedDefinitions -> n, ((name,vspec), expr)] + let orderedReflectedDefinitions = + [for (KeyValue(vspec, (name, n, expr))) in reflectedDefinitions -> n, ((name, vspec), expr)] |> List.sortBy (fst >> (~-)) // invert the result to get 'order-by-descending' behavior (items in list are 0..* so we don't need to worry about int.MinValue) |> List.map snd gtdefs.Close(), orderedReflectedDefinitions @@ -1440,16 +1582,16 @@ type AssemblyBuilder(cenv:cenv, anonTypeTable: AnonTypeGenerationTable) as mgbuf member mgbuf.GetExplicitEntryPointInfo() = explicitEntryPointInfo -/// Record the types of the things on the evaluation stack. -/// Used for the few times we have to flush the IL evaluation stack and to compute maxStack. +/// Record the types of the things on the evaluation stack. +/// Used for the few times we have to flush the IL evaluation stack and to compute maxStack. type Pushes = ILType list type Pops = int -let pop (i:int) : Pops = i -let Push tys : Pushes = tys +let pop (i: int) : Pops = i +let Push tys: Pushes = tys let Push0 = Push [] -let FeeFee (cenv:cenv) = (if cenv.opts.testFlagEmitFeeFeeAs100001 then 100001 else 0x00feefee) -let FeeFeeInstr (cenv:cenv) doc = +let FeeFee (cenv: cenv) = (if cenv.opts.testFlagEmitFeeFeeAs100001 then 100001 else 0x00feefee) +let FeeFeeInstr (cenv: cenv) doc = I_seqpoint (ILSourceMarker.Create(document = doc, line = FeeFee cenv, column = 0, @@ -1457,98 +1599,98 @@ let FeeFeeInstr (cenv:cenv) doc = endColumn = 0)) /// Buffers for IL code generation -type CodeGenBuffer(m:range, +type CodeGenBuffer(m: range, mgbuf: AssemblyBuilder, methodName, - alreadyUsedArgs:int) = + alreadyUsedArgs: int) = let locals = new ResizeArray<((string * (Mark * Mark)) list * ILType * bool)>(10) let codebuf = new ResizeArray(200) let exnSpecs = new ResizeArray(10) // Keep track of the current stack so we can spill stuff when we hit a "try" when some stuff - // is on the stack. + // is on the stack. let mutable stack: ILType list = [] let mutable nstack = 0 let mutable maxStack = 0 let mutable hasSequencePoints = false let mutable anyDocument = None // we collect an arbitrary document in order to emit the header FeeFee if needed - - let codeLabelToPC : Dictionary = new Dictionary<_,_>(10) - let codeLabelToCodeLabel : Dictionary = new Dictionary<_,_>(10) - - let rec lab2pc n lbl = - if n = System.Int32.MaxValue then error(InternalError("recursive label graph",m)) + + let codeLabelToPC: Dictionary = new Dictionary<_, _>(10) + let codeLabelToCodeLabel: Dictionary = new Dictionary<_, _>(10) + + let rec lab2pc n lbl = + if n = System.Int32.MaxValue then error(InternalError("recursive label graph", m)) match codeLabelToCodeLabel.TryGetValue(lbl) with | true, l -> lab2pc (n + 1) l - | _ -> codeLabelToPC.[lbl] - + | _ -> codeLabelToPC.[lbl] + let mutable lastSeqPoint = None - // Add a nop to make way for the first sequence point. - do if mgbuf.cenv.opts.generateDebugSymbols then + // Add a nop to make way for the first sequence point. + do if mgbuf.cenv.opts.generateDebugSymbols then let doc = mgbuf.cenv.g.memoize_file m.FileIndex let i = FeeFeeInstr mgbuf.cenv doc codebuf.Add(i) // for the FeeFee or a better sequence point - member cgbuf.DoPushes (pushes: Pushes) = - for ty in pushes do - stack <- ty :: stack + member cgbuf.DoPushes (pushes: Pushes) = + for ty in pushes do + stack <- ty :: stack nstack <- nstack + 1 maxStack <- Operators.max maxStack nstack - member cgbuf.DoPops (n:Pops) = + member cgbuf.DoPops (n: Pops) = for i = 0 to n - 1 do match stack with - | [] -> + | [] -> let msg = sprintf "pop on empty stack during code generation, methodName = %s, m = %s" methodName (stringOfRange m) System.Diagnostics.Debug.Assert(false, msg) - warning(InternalError(msg,m)) - | _ :: t -> - stack <- t + warning(InternalError(msg, m)) + | _ :: t -> + stack <- t nstack <- nstack - 1 member cgbuf.GetCurrentStack() = stack - member cgbuf.AssertEmptyStack() = - if not (isNil stack) then - let msg = - sprintf "stack flush didn't work, or extraneous expressions left on stack before stack restore, methodName = %s, stack = %+A, m = %s" + member cgbuf.AssertEmptyStack() = + if not (isNil stack) then + let msg = + sprintf "stack flush didn't work, or extraneous expressions left on stack before stack restore, methodName = %s, stack = %+A, m = %s" methodName stack (stringOfRange m) System.Diagnostics.Debug.Assert(false, msg) - warning(InternalError(msg,m)) + warning(InternalError(msg, m)) () - member cgbuf.EmitInstr(pops,pushes,i) = + member cgbuf.EmitInstr(pops, pushes, i) = cgbuf.DoPops pops cgbuf.DoPushes pushes codebuf.Add i - member cgbuf.EmitInstrs (pops,pushes,is) = + member cgbuf.EmitInstrs (pops, pushes, is) = cgbuf.DoPops pops cgbuf.DoPushes pushes - is |> List.iter codebuf.Add + is |> List.iter codebuf.Add - member cgbuf.GetLastSequencePoint() = + member cgbuf.GetLastSequencePoint() = lastSeqPoint - - member private cgbuf.EnsureNopBetweenDebugPoints() = + + member private cgbuf.EnsureNopBetweenDebugPoints() = // Always add a nop between sequence points to help .NET get the stepping right // Don't do this after a FeeFee marker for hidden code - if (codebuf.Count > 0 && - (match codebuf.[codebuf.Count-1] with - | I_seqpoint sm when sm.Line <> FeeFee mgbuf.cenv -> true - | _ -> false)) then - + if (codebuf.Count > 0 && + (match codebuf.[codebuf.Count-1] with + | I_seqpoint sm when sm.Line <> FeeFee mgbuf.cenv -> true + | _ -> false)) then + codebuf.Add(AI_nop) - member cgbuf.EmitSeqPoint(src) = - if mgbuf.cenv.opts.generateDebugSymbols then + member cgbuf.EmitSeqPoint(src) = + if mgbuf.cenv.opts.generateDebugSymbols then let attr = GenILSourceMarker mgbuf.cenv.g src let i = I_seqpoint attr hasSequencePoints <- true // Replace the FeeFee seqpoint at the entry with a better sequence point - if codebuf.Count = 1 then + if codebuf.Count = 1 then assert (match codebuf.[0] with I_seqpoint _ -> true | _ -> false) codebuf.[0] <- i @@ -1559,10 +1701,10 @@ type CodeGenBuffer(m:range, // Save the last sequence point away so we can make a decision graph look consistent (i.e. reassert the sequence point at each target) lastSeqPoint <- Some src anyDocument <- Some attr.Document - + // Emit FeeFee breakpoints for hidden code, see https://blogs.msdn.microsoft.com/jmstall/2005/06/19/line-hidden-and-0xfeefee-sequence-points/ - member cgbuf.EmitStartOfHiddenCode() = - if mgbuf.cenv.opts.generateDebugSymbols then + member cgbuf.EmitStartOfHiddenCode() = + if mgbuf.cenv.opts.generateDebugSymbols then let doc = mgbuf.cenv.g.memoize_file m.FileIndex let i = FeeFeeInstr mgbuf.cenv doc hasSequencePoints <- true @@ -1570,134 +1712,134 @@ type CodeGenBuffer(m:range, // don't emit just after another FeeFee match codebuf.[codebuf.Count-1] with | I_seqpoint sm when sm.Line = FeeFee mgbuf.cenv -> () - | _ -> + | _ -> cgbuf.EnsureNopBetweenDebugPoints() codebuf.Add(i) - member cgbuf.EmitExceptionClause(clause) = + member cgbuf.EmitExceptionClause(clause) = exnSpecs.Add clause - member cgbuf.GenerateDelayMark(_nm) = + member cgbuf.GenerateDelayMark(_nm) = let lab = IL.generateCodeLabel() Mark lab - member cgbuf.SetCodeLabelToCodeLabel(lab1,lab2) = + member cgbuf.SetCodeLabelToCodeLabel(lab1, lab2) = #if DEBUG - if codeLabelToCodeLabel.ContainsKey(lab1) then + if codeLabelToCodeLabel.ContainsKey(lab1) then let msg = sprintf "two values given for label %s, methodName = %s, m = %s" (formatCodeLabel lab1) methodName (stringOfRange m) System.Diagnostics.Debug.Assert(false, msg) - warning(InternalError(msg,m)) + warning(InternalError(msg, m)) #endif codeLabelToCodeLabel.[lab1] <- lab2 - member cgbuf.SetCodeLabelToPC(lab,pc) = + member cgbuf.SetCodeLabelToPC(lab, pc) = #if DEBUG - if codeLabelToPC.ContainsKey(lab) then + if codeLabelToPC.ContainsKey(lab) then let msg = sprintf "two values given for label %s, methodName = %s, m = %s" (formatCodeLabel lab) methodName (stringOfRange m) System.Diagnostics.Debug.Assert(false, msg) - warning(InternalError(msg,m)) + warning(InternalError(msg, m)) #endif - codeLabelToPC.[lab] <- pc + codeLabelToPC.[lab] <- pc - member cgbuf.SetMark (mark1: Mark, mark2: Mark) = + member cgbuf.SetMark (mark1: Mark, mark2: Mark) = cgbuf.SetCodeLabelToCodeLabel(mark1.CodeLabel, mark2.CodeLabel) - - member cgbuf.SetMarkToHere (Mark lab) = - cgbuf.SetCodeLabelToPC(lab,codebuf.Count) + + member cgbuf.SetMarkToHere (Mark lab) = + cgbuf.SetCodeLabelToPC(lab, codebuf.Count) - member cgbuf.SetStack(s) = - stack <- s + member cgbuf.SetStack(s) = + stack <- s nstack <- s.Length - member cgbuf.Mark(s) = + member cgbuf.Mark(s) = let res = cgbuf.GenerateDelayMark(s) cgbuf.SetMarkToHere(res) - res + res member cgbuf.mgbuf = mgbuf member cgbuf.MethodName = methodName member cgbuf.PreallocatedArgCount = alreadyUsedArgs - member cgbuf.AllocLocal(ranges,ty,isFixed) = + member cgbuf.AllocLocal(ranges, ty, isFixed) = let j = locals.Count - locals.Add((ranges,ty,isFixed)) - j - - member cgbuf.ReallocLocal(cond,ranges,ty,isFixed) = - match ResizeArray.tryFindIndexi cond locals with - | Some j -> - let (prevRanges,_,isFixed) = locals.[j] - locals.[j] <- ((ranges@prevRanges),ty,isFixed) + locals.Add((ranges, ty, isFixed)) + j + + member cgbuf.ReallocLocal(cond, ranges, ty, isFixed) = + match ResizeArray.tryFindIndexi cond locals with + | Some j -> + let (prevRanges, _, isFixed) = locals.[j] + locals.[j] <- ((ranges@prevRanges), ty, isFixed) j, true - | None -> - cgbuf.AllocLocal(ranges,ty,isFixed), false + | None -> + cgbuf.AllocLocal(ranges, ty, isFixed), false - member cgbuf.Close() = + member cgbuf.Close() = - let instrs = codebuf.ToArray() + let instrs = codebuf.ToArray() // Fixup the first instruction to be a FeeFee sequence point if needed - let instrs = - instrs |> Array.mapi (fun idx i2 -> - if idx = 0 && (match i2 with AI_nop -> true | _ -> false) && anyDocument.IsSome then + let instrs = + instrs |> Array.mapi (fun idx i2 -> + if idx = 0 && (match i2 with AI_nop -> true | _ -> false) && anyDocument.IsSome then // This special dummy sequence point says skip the start of the method hasSequencePoints <- true FeeFeeInstr mgbuf.cenv anyDocument.Value - else + else i2) let codeLabels = let dict = Dictionary.newWithSize (codeLabelToPC.Count + codeLabelToCodeLabel.Count) - for kvp in codeLabelToPC do dict.Add(kvp.Key, lab2pc 0 kvp.Key) + for kvp in codeLabelToPC do dict.Add(kvp.Key, lab2pc 0 kvp.Key) for kvp in codeLabelToCodeLabel do dict.Add(kvp.Key, lab2pc 0 kvp.Key) dict (ResizeArray.toList locals, maxStack, codeLabels, instrs, ResizeArray.toList exnSpecs, hasSequencePoints) -module CG = - let EmitInstr (cgbuf:CodeGenBuffer) pops pushes i = cgbuf.EmitInstr(pops,pushes,i) - let EmitInstrs (cgbuf:CodeGenBuffer) pops pushes is = cgbuf.EmitInstrs(pops,pushes,is) - let EmitSeqPoint (cgbuf:CodeGenBuffer) src = cgbuf.EmitSeqPoint(src) - let GenerateDelayMark (cgbuf:CodeGenBuffer) nm = cgbuf.GenerateDelayMark(nm) - let SetMark (cgbuf:CodeGenBuffer) m1 m2 = cgbuf.SetMark(m1,m2) - let SetMarkToHere (cgbuf:CodeGenBuffer) m1 = cgbuf.SetMarkToHere(m1) - let SetStack (cgbuf:CodeGenBuffer) s = cgbuf.SetStack(s) - let GenerateMark (cgbuf:CodeGenBuffer) s = cgbuf.Mark(s) +module CG = + let EmitInstr (cgbuf: CodeGenBuffer) pops pushes i = cgbuf.EmitInstr(pops, pushes, i) + let EmitInstrs (cgbuf: CodeGenBuffer) pops pushes is = cgbuf.EmitInstrs(pops, pushes, is) + let EmitSeqPoint (cgbuf: CodeGenBuffer) src = cgbuf.EmitSeqPoint(src) + let GenerateDelayMark (cgbuf: CodeGenBuffer) nm = cgbuf.GenerateDelayMark(nm) + let SetMark (cgbuf: CodeGenBuffer) m1 m2 = cgbuf.SetMark(m1, m2) + let SetMarkToHere (cgbuf: CodeGenBuffer) m1 = cgbuf.SetMarkToHere(m1) + let SetStack (cgbuf: CodeGenBuffer) s = cgbuf.SetStack(s) + let GenerateMark (cgbuf: CodeGenBuffer) s = cgbuf.Mark(s) open CG //-------------------------------------------------------------------------- -// Compile constants -//-------------------------------------------------------------------------- +// Compile constants +//-------------------------------------------------------------------------- -let GenString cenv cgbuf s = +let GenString cenv cgbuf s = CG.EmitInstrs cgbuf (pop 0) (Push [cenv.g.ilg.typ_String]) [ I_ldstr s ] -let GenConstArray cenv (cgbuf:CodeGenBuffer) eenv ilElementType (data:'a[]) (write : ByteBuffer -> 'a -> unit) = +let GenConstArray cenv (cgbuf: CodeGenBuffer) eenv ilElementType (data:'a[]) (write: ByteBuffer -> 'a -> unit) = let buf = ByteBuffer.Create data.Length data |> Array.iter (write buf) let bytes = buf.Close() let ilArrayType = mkILArr1DTy ilElementType - if data.Length = 0 then - CG.EmitInstrs cgbuf (pop 0) (Push [ilArrayType]) [ mkLdcInt32 (0); I_newarr (ILArrayShape.SingleDimensional,ilElementType); ] - else - let vtspec = cgbuf.mgbuf.GenerateRawDataValueType(eenv.cloc,bytes.Length) + if data.Length = 0 then + CG.EmitInstrs cgbuf (pop 0) (Push [ilArrayType]) [ mkLdcInt32 (0); I_newarr (ILArrayShape.SingleDimensional, ilElementType); ] + else + let vtspec = cgbuf.mgbuf.GenerateRawDataValueType(eenv.cloc, bytes.Length) let ilFieldName = CompilerGeneratedName ("field" + string(newUnique())) let fty = ILType.Value vtspec - let ilFieldDef = mkILStaticField (ilFieldName,fty, None, Some bytes, ILMemberAccess.Assembly) + let ilFieldDef = mkILStaticField (ilFieldName, fty, None, Some bytes, ILMemberAccess.Assembly) let ilFieldDef = ilFieldDef.With(customAttrs = mkILCustomAttrs [ cenv.g.DebuggerBrowsableNeverAttribute ]) - let fspec = mkILFieldSpecInTy (mkILTyForCompLoc eenv.cloc,ilFieldName, fty) + let fspec = mkILFieldSpecInTy (mkILTyForCompLoc eenv.cloc, ilFieldName, fty) CountStaticFieldDef() - cgbuf.mgbuf.AddFieldDef(fspec.DeclaringTypeRef,ilFieldDef) - CG.EmitInstrs cgbuf + cgbuf.mgbuf.AddFieldDef(fspec.DeclaringTypeRef, ilFieldDef) + CG.EmitInstrs cgbuf (pop 0) (Push [ ilArrayType; ilArrayType; cenv.g.iltyp_RuntimeFieldHandle ]) [ mkLdcInt32 data.Length - I_newarr (ILArrayShape.SingleDimensional,ilElementType) - AI_dup - I_ldtoken (ILToken.ILField fspec) ] - CG.EmitInstrs cgbuf + I_newarr (ILArrayShape.SingleDimensional, ilElementType) + AI_dup + I_ldtoken (ILToken.ILField fspec) ] + CG.EmitInstrs cgbuf (pop 2) Push0 [ mkNormalCall (mkInitializeArrayMethSpec cenv.g) ] @@ -1705,13 +1847,13 @@ let GenConstArray cenv (cgbuf:CodeGenBuffer) eenv ilElementType (data:'a[]) (wri //-------------------------------------------------------------------------- // We normally generate in the context of a "what to do next" continuation -//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- -type sequel = - | EndFilter +type sequel = + | EndFilter /// Exit a 'handler' block - /// The integer says which local to save result in - | LeaveHandler of (bool (* finally? *) * int * Mark) + /// The integer says which local to save result in + | LeaveHandler of (bool (* finally? *) * int * Mark) /// Branch to the given mark | Br of Mark | CmpThenBrOrContinue of Pops * ILInstr list @@ -1721,9 +1863,9 @@ type sequel = | DiscardThen of sequel /// Return from the method | Return - /// End a scope of local variables. Used at end of 'let' and 'let rec' blocks to get tail recursive setting - /// of end-of-scope marks - | EndLocalScope of sequel * Mark + /// End a scope of local variables. Used at end of 'let' and 'let rec' blocks to get tail recursive setting + /// of end-of-scope marks + | EndLocalScope of sequel * Mark /// Return from a method whose return type is void | ReturnVoid @@ -1732,47 +1874,47 @@ let discardAndReturnVoid = DiscardThen ReturnVoid //------------------------------------------------------------------------- -// This is the main code generation routine. It is used to generate +// This is the main code generation routine. It is used to generate // the bodies of methods in a couple of places -//------------------------------------------------------------------------- - -let CodeGenThen cenv mgbuf (entryPointInfo,methodName,eenv,alreadyUsedArgs,codeGenFunction,m) = - let cgbuf = new CodeGenBuffer(m,mgbuf,methodName,alreadyUsedArgs) +//------------------------------------------------------------------------- + +let CodeGenThen cenv mgbuf (entryPointInfo, methodName, eenv, alreadyUsedArgs, codeGenFunction, m) = + let cgbuf = new CodeGenBuffer(m, mgbuf, methodName, alreadyUsedArgs) let start = CG.GenerateMark cgbuf "mstart" - let innerVals = entryPointInfo |> List.map (fun (v,kind) -> (v,(kind,start))) + let innerVals = entryPointInfo |> List.map (fun (v, kind) -> (v, (kind, start))) (* Call the given code generator *) codeGenFunction cgbuf {eenv with withinSEH=false - liveLocals=IntMap.empty() + liveLocals=IntMap.empty() innerVals = innerVals} - let locals,maxStack,lab2pc,code,exnSpecs,hasSequencePoints = cgbuf.Close() - - let localDebugSpecs : ILLocalDebugInfo list = + let locals, maxStack, lab2pc, code, exnSpecs, hasSequencePoints = cgbuf.Close() + + let localDebugSpecs: ILLocalDebugInfo list = locals - |> List.mapi (fun i (nms,_,_isFixed) -> List.map (fun nm -> (i,nm)) nms) + |> List.mapi (fun i (nms, _, _isFixed) -> List.map (fun nm -> (i, nm)) nms) |> List.concat - |> List.map (fun (i,(nm,(start,finish))) -> + |> List.map (fun (i, (nm, (start, finish))) -> { Range=(start.CodeLabel, finish.CodeLabel) DebugMappings= [{ LocalIndex=i; LocalName=nm }] }) let ilLocals = locals |> List.map (fun (infos, ty, isFixed) -> - let loc = + let loc = // in interactive environment, attach name and range info to locals to improve debug experience if cenv.opts.isInteractive && cenv.opts.generateDebugSymbols then match infos with | [(nm, (start, finish))] -> mkILLocal ty (Some(nm, start.CodeLabel, finish.CodeLabel)) // REVIEW: what do these cases represent? | _ :: _ - | [] -> mkILLocal ty None + | [] -> mkILLocal ty None // if not interactive, don't bother adding this info else mkILLocal ty None if isFixed then { loc with IsPinned=true } else loc) - (ilLocals, + (ilLocals, maxStack, lab2pc, code, @@ -1780,35 +1922,35 @@ let CodeGenThen cenv mgbuf (entryPointInfo,methodName,eenv,alreadyUsedArgs,codeG localDebugSpecs, hasSequencePoints) -let CodeGenMethod cenv mgbuf (entryPointInfo,methodName,eenv,alreadyUsedArgs,codeGenFunction,m) = +let CodeGenMethod cenv mgbuf (entryPointInfo, methodName, eenv, alreadyUsedArgs, codeGenFunction, m) = - let locals,maxStack,lab2pc,instrs,exns,localDebugSpecs,hasSequencePoints = - CodeGenThen cenv mgbuf (entryPointInfo,methodName,eenv,alreadyUsedArgs,codeGenFunction,m) + let locals, maxStack, lab2pc, instrs, exns, localDebugSpecs, hasSequencePoints = + CodeGenThen cenv mgbuf (entryPointInfo, methodName, eenv, alreadyUsedArgs, codeGenFunction, m) - let code = IL.buildILCode methodName lab2pc instrs exns localDebugSpecs - - // Attach a source range to the method. Only do this is it has some sequence points, because .NET 2.0/3.5 + let code = IL.buildILCode methodName lab2pc instrs exns localDebugSpecs + + // Attach a source range to the method. Only do this is it has some sequence points, because .NET 2.0/3.5 // ILDASM has issues if you emit symbols with a source range but without any sequence points let sourceRange = if hasSequencePoints then GenPossibleILSourceMarker cenv m else None // The old union erasure phase increased maxstack by 2 since the code pushes some items, we do the same here let maxStack = maxStack + 2 - // Build an Abstract IL method - instrs, mkILMethodBody (true,locals,maxStack,code, sourceRange) + // Build an Abstract IL method + instrs, mkILMethodBody (true, locals, maxStack, code, sourceRange) let StartDelayedLocalScope nm cgbuf = - let startScope = CG.GenerateDelayMark cgbuf ("start_" + nm) + let startScope = CG.GenerateDelayMark cgbuf ("start_" + nm) let endScope = CG.GenerateDelayMark cgbuf ("end_" + nm) - startScope,endScope + startScope, endScope let StartLocalScope nm cgbuf = - let startScope = CG.GenerateMark cgbuf ("start_" + nm) + let startScope = CG.GenerateMark cgbuf ("start_" + nm) let endScope = CG.GenerateDelayMark cgbuf ("end_" + nm) - startScope,endScope - -let LocalScope nm cgbuf (f : (Mark * Mark) -> 'a) : 'a = - let _,endScope as scopeMarks = StartLocalScope nm cgbuf + startScope, endScope + +let LocalScope nm cgbuf (f: (Mark * Mark) -> 'a) : 'a = + let _, endScope as scopeMarks = StartLocalScope nm cgbuf let res = f scopeMarks CG.SetMarkToHere cgbuf endScope res @@ -1817,26 +1959,28 @@ let compileSequenceExpressions = true // try (System.Environment.GetEnvironmentV //------------------------------------------------------------------------- // Sequence Point Logic -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- -type EmitSequencePointState = +type EmitSequencePointState = /// Indicates that we need a sequence point at first opportunity. Used on entrance to a method /// and whenever we drop into an expression within the stepping control structure. - | SPAlways + | SPAlways + + /// Indicates we are not forced to emit a sequence point | SPSuppress /// Determines if any code at all will be emitted for a binding -let BindingEmitsNoCode g (TBind(vspec,_,_)) = IsValCompiledAsMethod g vspec +let BindingEmitsNoCode g (b: Binding) = IsFSharpValCompiledAsMethod g b.Var /// Determines what sequence point should be emitted when generating the r.h.s of a binding. /// For example, if the r.h.s is a lambda then no sequence point is emitted. /// /// Returns (isSticky, sequencePointForBind, sequencePointGenerationFlagForRhsOfBind) -let ComputeSequencePointInfoForBinding g (TBind(_,e,spBind) as bind) = - if BindingEmitsNoCode g bind then +let ComputeSequencePointInfoForBinding g (TBind(_, e, spBind) as bind) = + if BindingEmitsNoCode g bind then false, None, SPSuppress else - match spBind, stripExpr e with + match spBind, stripExpr e with | NoSequencePointAtInvisibleBinding, _ -> false, None, SPSuppress | NoSequencePointAtStickyBinding, _ -> true, None, SPSuppress | NoSequencePointAtDoBinding, _ -> false, None, SPAlways @@ -1844,111 +1988,111 @@ let ComputeSequencePointInfoForBinding g (TBind(_,e,spBind) as bind) = // Don't emit sequence points for lambdas. // SEQUENCE POINT REVIEW: don't emit for lazy either, nor any builder expressions, nor interface-implementing object expressions | _, (Expr.Lambda _ | Expr.TyLambda _) -> false, None, SPSuppress - | SequencePointAtBinding m,_ -> false, Some m, SPSuppress + | SequencePointAtBinding m, _ -> false, Some m, SPSuppress + - /// Determines if a sequence will be emitted when we generate the code for a binding. /// /// False for Lambdas, BindingEmitsNoCode, NoSequencePointAtStickyBinding, NoSequencePointAtInvisibleBinding, and NoSequencePointAtLetBinding. /// True for SequencePointAtBinding, NoSequencePointAtDoBinding. -let BindingEmitsSequencePoint g bind = +let BindingEmitsSequencePoint g bind = match ComputeSequencePointInfoForBinding g bind with - | _, None, SPSuppress -> false + | _, None, SPSuppress -> false | _ -> true -let BindingIsInvisible (TBind(_,_,spBind)) = - match spBind with - | NoSequencePointAtInvisibleBinding _ -> true +let BindingIsInvisible (TBind(_, _, spBind)) = + match spBind with + | NoSequencePointAtInvisibleBinding _ -> true | _ -> false - + /// Determines if the code generated for a binding is to be marked as hidden, e.g. the 'newobj' for a local function definition. -let BindingEmitsHiddenCode (TBind(_,e,spBind)) = - match spBind, stripExpr e with +let BindingEmitsHiddenCode (TBind(_, e, spBind)) = + match spBind, stripExpr e with | _, (Expr.Lambda _ | Expr.TyLambda _) -> true | _ -> false - + /// Determines if generating the code for a compound expression will emit a sequence point as the first instruction /// through the processing of the constituent parts. Used to prevent the generation of sequence points for /// compound expressions. -let rec FirstEmittedCodeWillBeSequencePoint g sp expr = - match sp with - | SPAlways -> - match stripExpr expr with - | Expr.Let (bind,body,_,_) -> - BindingEmitsSequencePoint g bind || - FirstEmittedCodeWillBeSequencePoint g sp bind.Expr || +let rec FirstEmittedCodeWillBeSequencePoint g sp expr = + match sp with + | SPAlways -> + match stripExpr expr with + | Expr.Let (bind, body, _, _) -> + BindingEmitsSequencePoint g bind || + FirstEmittedCodeWillBeSequencePoint g sp bind.Expr || (BindingEmitsNoCode g bind && FirstEmittedCodeWillBeSequencePoint g sp body) - | Expr.LetRec(binds,body,_,_) -> - binds |> List.exists (BindingEmitsSequencePoint g) || + | Expr.LetRec(binds, body, _, _) -> + binds |> List.exists (BindingEmitsSequencePoint g) || (binds |> List.forall (BindingEmitsNoCode g) && FirstEmittedCodeWillBeSequencePoint g sp body) - | Expr.Sequential (_, _, NormalSeq,spSeq,_) -> - match spSeq with + | Expr.Sequential (_, _, NormalSeq, spSeq, _) -> + match spSeq with | SequencePointsAtSeq -> true | SuppressSequencePointOnExprOfSequential -> true | SuppressSequencePointOnStmtOfSequential -> false - | Expr.Match (SequencePointAtBinding _,_,_,_,_,_) -> true - | Expr.Op(( TOp.TryCatch (SequencePointAtTry _,_) - | TOp.TryFinally (SequencePointAtTry _,_) - | TOp.For (SequencePointAtForLoop _,_) - | TOp.While (SequencePointAtWhileLoop _,_)),_,_,_) -> true + | Expr.Match (SequencePointAtBinding _, _, _, _, _, _) -> true + | Expr.Op((TOp.TryCatch (SequencePointAtTry _, _) + | TOp.TryFinally (SequencePointAtTry _, _) + | TOp.For (SequencePointAtForLoop _, _) + | TOp.While (SequencePointAtWhileLoop _, _)), _, _, _) -> true | _ -> false - | SPSuppress -> - false + | SPSuppress -> + false /// Suppress sequence points for some compound expressions - though not all - even if "SPAlways" is set. /// /// Note this is only used when FirstEmittedCodeWillBeSequencePoint is false. -let EmitSequencePointForWholeExpr g sp expr = +let EmitSequencePointForWholeExpr g sp expr = assert (not (FirstEmittedCodeWillBeSequencePoint g sp expr)) - match sp with - | SPAlways -> - match stripExpr expr with - + match sp with + | SPAlways -> + match stripExpr expr with + // In some cases, we emit sequence points for the 'whole' of a 'let' expression. - // Specifically, when + // Specifically, when // + SPAlways (i.e. a sequence point is required as soon as meaningful) // + binding is NoSequencePointAtStickyBinding, or NoSequencePointAtLetBinding. // + not FirstEmittedCodeWillBeSequencePoint - // For example if we start with - // let someCode () = f x - // and by inlining 'f' the expression becomes + // For example if we start with + // let someCode () = f x + // and by inlining 'f' the expression becomes // let someCode () = (let sticky = x in y) // then we place the sequence point for the whole TAST expression 'let sticky = x in y', i.e. textual range 'f x' in the source code, but - // _before_ the evaluation of 'x'. This will only happen for sticky 'let' introduced by inlining and other code generation - // steps. We do _not_ do this for 'invisible' let which can be skipped. - | Expr.Let (bind,_,_,_) when BindingIsInvisible bind -> false - | Expr.LetRec(binds,_,_,_) when binds |> List.forall BindingIsInvisible -> false + // _before_ the evaluation of 'x'. This will only happen for sticky 'let' introduced by inlining and other code generation + // steps. We do _not_ do this for 'invisible' let which can be skipped. + | Expr.Let (bind, _, _, _) when BindingIsInvisible bind -> false + | Expr.LetRec(binds, _, _, _) when binds |> List.forall BindingIsInvisible -> false // If the binding is a lambda then we don't emit a sequence point. - | Expr.Let (bind,_,_,_) when BindingEmitsHiddenCode bind -> false - | Expr.LetRec(binds,_,_,_) when binds |> List.forall BindingEmitsHiddenCode -> false + | Expr.Let (bind, _, _, _) when BindingEmitsHiddenCode bind -> false + | Expr.LetRec(binds, _, _, _) when binds |> List.forall BindingEmitsHiddenCode -> false // If the binding is represented by a top-level generated constant value then we don't emit a sequence point. - | Expr.Let (bind,_,_,_) when BindingEmitsNoCode g bind -> false - | Expr.LetRec(binds,_,_,_) when binds |> List.forall (BindingEmitsNoCode g) -> false + | Expr.Let (bind, _, _, _) when BindingEmitsNoCode g bind -> false + | Expr.LetRec(binds, _, _, _) when binds |> List.forall (BindingEmitsNoCode g) -> false - // Suppress sequence points for the whole 'a;b' and do it at 'a' instead. + // Suppress sequence points for the whole 'a;b' and do it at 'a' instead. | Expr.Sequential _ -> false // Suppress sequence points at labels and gotos, it makes no sense to emit sequence points at these. We emit FeeFee instead - | Expr.Op(TOp.Label _,_,_,_) -> false - | Expr.Op(TOp.Goto _,_,_,_) -> false + | Expr.Op(TOp.Label _, _, _, _) -> false + | Expr.Op(TOp.Goto _, _, _, _) -> false // We always suppress at the whole 'match'/'try'/... expression because we do it at the individual parts. // - // These cases need documenting. For example, a typical 'match' gets compiled to + // These cases need documenting. For example, a typical 'match' gets compiled to // let tmp = expr // generates a sequence point, BEFORE tmp is evaluated // match tmp with // a match marked with NoSequencePointAtInvisibleLetBinding // So since the 'let tmp = expr' has a sequence point, then no sequence point is needed for the 'match'. But the processing // of the 'let' requests SPAlways for the body. | Expr.Match _ -> false - | Expr.Op(TOp.TryCatch _,_,_,_) -> false - | Expr.Op(TOp.TryFinally _,_,_,_) -> false - | Expr.Op(TOp.For _,_,_,_) -> false - | Expr.Op(TOp.While _,_,_,_) -> false + | Expr.Op(TOp.TryCatch _, _, _, _) -> false + | Expr.Op(TOp.TryFinally _, _, _, _) -> false + | Expr.Op(TOp.For _, _, _, _) -> false + | Expr.Op(TOp.While _, _, _, _) -> false | _ -> true - | SPSuppress -> + | SPSuppress -> false /// Emit hidden code markers for some compound expressions. Specifically, emit a hidden code marker for 'let f() = a in body' @@ -1956,69 +2100,69 @@ let EmitSequencePointForWholeExpr g sp expr = /// let someCode x = /// let f () = a /// body -let EmitHiddenCodeMarkerForWholeExpr g sp expr = +let EmitHiddenCodeMarkerForWholeExpr g sp expr = assert (not (FirstEmittedCodeWillBeSequencePoint g sp expr)) assert (not (EmitSequencePointForWholeExpr g sp expr)) - match sp with - | SPAlways -> - match stripExpr expr with - | Expr.Let (bind,_,_,_) when BindingEmitsHiddenCode bind -> true - | Expr.LetRec(binds,_,_,_) when binds |> List.exists BindingEmitsHiddenCode -> true + match sp with + | SPAlways -> + match stripExpr expr with + | Expr.Let (bind, _, _, _) when BindingEmitsHiddenCode bind -> true + | Expr.LetRec(binds, _, _, _) when binds |> List.exists BindingEmitsHiddenCode -> true | _ -> false - | SPSuppress -> + | SPSuppress -> false -/// Some expressions must emit some preparation code, then emit the actual code. -let rec RangeOfSequencePointForWholeExpr g expr = - match stripExpr expr with - | Expr.Let (bind,body,_,_) -> +/// Some expressions must emit some preparation code, then emit the actual code. +let rec RangeOfSequencePointForWholeExpr g expr = + match stripExpr expr with + | Expr.Let (bind, body, _, _) -> match ComputeSequencePointInfoForBinding g bind with // For sticky bindings, prefer the range of the overall expression. - | true, _, _ -> expr.Range - | _, None, SPSuppress -> RangeOfSequencePointForWholeExpr g body + | true, _, _ -> expr.Range + | _, None, SPSuppress -> RangeOfSequencePointForWholeExpr g body | _, Some m, _ -> m | _, None, SPAlways -> RangeOfSequencePointForWholeExpr g bind.Expr - | Expr.LetRec(_,body,_,_) -> RangeOfSequencePointForWholeExpr g body + | Expr.LetRec(_, body, _, _) -> RangeOfSequencePointForWholeExpr g body | Expr.Sequential (expr1, _, NormalSeq, _, _) -> RangeOfSequencePointForWholeExpr g expr1 | _ -> expr.Range /// Used to avoid emitting multiple sequence points in decision tree generation -let DoesGenExprStartWithSequencePoint g sp expr = - FirstEmittedCodeWillBeSequencePoint g sp expr || +let DoesGenExprStartWithSequencePoint g sp expr = + FirstEmittedCodeWillBeSequencePoint g sp expr || EmitSequencePointForWholeExpr g sp expr //------------------------------------------------------------------------- // Generate expressions -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- -let rec GenExpr (cenv:cenv) (cgbuf:CodeGenBuffer) eenv sp expr sequel = +let rec GenExpr (cenv: cenv) (cgbuf: CodeGenBuffer) eenv sp expr sequel = - let expr = stripExpr expr + let expr = stripExpr expr - if not (FirstEmittedCodeWillBeSequencePoint cenv.g sp expr) then - if EmitSequencePointForWholeExpr cenv.g sp expr then + if not (FirstEmittedCodeWillBeSequencePoint cenv.g sp expr) then + if EmitSequencePointForWholeExpr cenv.g sp expr then CG.EmitSeqPoint cgbuf (RangeOfSequencePointForWholeExpr cenv.g expr) elif EmitHiddenCodeMarkerForWholeExpr cenv.g sp expr then - cgbuf.EmitStartOfHiddenCode() + cgbuf.EmitStartOfHiddenCode() match (if compileSequenceExpressions then LowerCallsAndSeqs.LowerSeqExpr cenv.g cenv.amap expr else None) with | Some info -> GenSequenceExpr cenv cgbuf eenv info sequel | None -> - match expr with - | Expr.Const(c,m,ty) -> - GenConstant cenv cgbuf eenv (c,m,ty) sequel - | Expr.Match (spBind,exprm,tree,targets,m,ty) -> - GenMatch cenv cgbuf eenv (spBind,exprm,tree,targets,m,ty) sequel - | Expr.Sequential(e1,e2,dir,spSeq,m) -> - GenSequential cenv cgbuf eenv sp (e1,e2,dir,spSeq,m) sequel - | Expr.LetRec (binds,body,m,_) -> - GenLetRec cenv cgbuf eenv (binds,body,m) sequel - | Expr.Let (bind,body,_,_) -> - // This case implemented here to get a guaranteed tailcall + match expr with + | Expr.Const(c, m, ty) -> + GenConstant cenv cgbuf eenv (c, m, ty) sequel + | Expr.Match (spBind, exprm, tree, targets, m, ty) -> + GenMatch cenv cgbuf eenv (spBind, exprm, tree, targets, m, ty) sequel + | Expr.Sequential(e1, e2, dir, spSeq, m) -> + GenSequential cenv cgbuf eenv sp (e1, e2, dir, spSeq, m) sequel + | Expr.LetRec (binds, body, m, _) -> + GenLetRec cenv cgbuf eenv (binds, body, m) sequel + | Expr.Let (bind, body, _, _) -> + // This case implemented here to get a guaranteed tailcall // Make sure we generate the sequence point outside the scope of the variable - let startScope,endScope as scopeMarks = StartDelayedLocalScope "let" cgbuf + let startScope, endScope as scopeMarks = StartDelayedLocalScope "let" cgbuf let eenv = AllocStorageForBind cenv cgbuf scopeMarks eenv bind let spBind = GenSequencePointForBind cenv cgbuf bind GenBindingAfterSequencePoint cenv cgbuf eenv spBind bind (Some startScope) @@ -2026,173 +2170,180 @@ let rec GenExpr (cenv:cenv) (cgbuf:CodeGenBuffer) eenv sp expr sequel = // Work out if we need a sequence point for the body. For any "user" binding then the body gets SPAlways. // For invisible compiler-generated bindings we just use "sp", unless its body is another invisible binding // For sticky bindings arising from inlining we suppress any immediate sequence point in the body - let spBody = - match bind.SequencePointInfo with - | SequencePointAtBinding _ - | NoSequencePointAtLetBinding + let spBody = + match bind.SequencePointInfo with + | SequencePointAtBinding _ + | NoSequencePointAtLetBinding | NoSequencePointAtDoBinding -> SPAlways | NoSequencePointAtInvisibleBinding -> sp | NoSequencePointAtStickyBinding -> SPSuppress - + // Generate the body - GenExpr cenv cgbuf eenv spBody body (EndLocalScope(sequel,endScope)) + GenExpr cenv cgbuf eenv spBody body (EndLocalScope(sequel, endScope)) - | Expr.Lambda _ | Expr.TyLambda _ -> + | Expr.Lambda _ | Expr.TyLambda _ -> GenLambda cenv cgbuf eenv false None expr sequel - | Expr.App(Expr.Val(vref, _, m) as v, _, tyargs, [], _) when + | Expr.App(Expr.Val(vref, _, m) as v, _, tyargs, [], _) when List.forall (isMeasureTy cenv.g) tyargs && ( // inline only values that are stored in local variables - match StorageForValRef m vref eenv with - | ValStorage.Local _ -> true + match StorageForValRef m vref eenv with + | ValStorage.Local _ -> true | _ -> false - ) -> + ) -> // application of local type functions with type parameters = measure types and body = local value - inine the body GenExpr cenv cgbuf eenv sp v sequel - | Expr.App(f,fty,tyargs,args,m) -> - GenApp cenv cgbuf eenv (f,fty,tyargs,args,m) sequel - | Expr.Val(v,_,m) -> - GenGetVal cenv cgbuf eenv (v,m) sequel - | Expr.Op(op,tyargs,args,m) -> - match op,args,tyargs with - | TOp.ExnConstr(c),_,_ -> - GenAllocExn cenv cgbuf eenv (c,args,m) sequel - | TOp.UnionCase(c),_,_ -> - GenAllocUnionCase cenv cgbuf eenv (c,tyargs,args,m) sequel - | TOp.Recd(isCtor,tycon),_,_ -> - GenAllocRecd cenv cgbuf eenv isCtor (tycon,tyargs,args,m) sequel - | TOp.AnonRecd(anonInfo),_,_ -> - GenAllocAnonRecd cenv cgbuf eenv (anonInfo,tyargs,args,m) sequel - | TOp.AnonRecdGet (anonInfo,n),[e],_ -> - GenGetAnonRecdField cenv cgbuf eenv (anonInfo,e,tyargs,n,m) sequel - | TOp.TupleFieldGet (tupInfo,n),[e],_ -> - GenGetTupleField cenv cgbuf eenv (tupInfo,e,tyargs,n,m) sequel - | TOp.ExnFieldGet(ecref,n),[e],_ -> - GenGetExnField cenv cgbuf eenv (e,ecref,n,m) sequel - | TOp.UnionCaseFieldGet(ucref,n),[e],_ -> - GenGetUnionCaseField cenv cgbuf eenv (e,ucref,tyargs,n,m) sequel - | TOp.UnionCaseFieldGetAddr(ucref,n,_readonly),[e],_ -> - GenGetUnionCaseFieldAddr cenv cgbuf eenv (e,ucref,tyargs,n,m) sequel - | TOp.UnionCaseTagGet ucref,[e],_ -> - GenGetUnionCaseTag cenv cgbuf eenv (e,ucref,tyargs,m) sequel - | TOp.UnionCaseProof ucref,[e],_ -> - GenUnionCaseProof cenv cgbuf eenv (e,ucref,tyargs,m) sequel - | TOp.ExnFieldSet(ecref,n),[e;e2],_ -> - GenSetExnField cenv cgbuf eenv (e,ecref,n,e2,m) sequel - | TOp.UnionCaseFieldSet(ucref,n),[e;e2],_ -> - GenSetUnionCaseField cenv cgbuf eenv (e,ucref,tyargs,n,e2,m) sequel - | TOp.ValFieldGet f,[e],_ -> - GenGetRecdField cenv cgbuf eenv (e,f,tyargs,m) sequel - | TOp.ValFieldGet f,[],_ -> - GenGetStaticField cenv cgbuf eenv (f,tyargs,m) sequel - | TOp.ValFieldGetAddr (f, _readonly),[e],_ -> - GenGetRecdFieldAddr cenv cgbuf eenv (e,f,tyargs,m) sequel - | TOp.ValFieldGetAddr (f, _readonly),[],_ -> - GenGetStaticFieldAddr cenv cgbuf eenv (f,tyargs,m) sequel - | TOp.ValFieldSet f,[e1;e2],_ -> - GenSetRecdField cenv cgbuf eenv (e1,f,tyargs,e2,m) sequel - | TOp.ValFieldSet f,[e2],_ -> - GenSetStaticField cenv cgbuf eenv (f,tyargs,e2,m) sequel - | TOp.Tuple tupInfo,_,_ -> - GenAllocTuple cenv cgbuf eenv (tupInfo,args,tyargs,m) sequel - | TOp.ILAsm(code,returnTys),_,_ -> - GenAsmCode cenv cgbuf eenv (code,tyargs,args,returnTys,m) sequel - | TOp.While (sp,_),[Expr.Lambda(_,_,_,[_],e1,_,_);Expr.Lambda(_,_,_,[_],e2,_,_)],[] -> - GenWhileLoop cenv cgbuf eenv (sp,e1,e2,m) sequel - | TOp.For(spStart,dir),[Expr.Lambda(_,_,_,[_],e1,_,_);Expr.Lambda(_,_,_,[_],e2,_,_);Expr.Lambda(_,_,_,[v],e3,_,_)],[] -> - GenForLoop cenv cgbuf eenv (spStart,v,e1,dir,e2,e3,m) sequel - | TOp.TryFinally(spTry,spFinally),[Expr.Lambda(_,_,_,[_],e1,_,_); Expr.Lambda(_,_,_,[_],e2,_,_)],[resty] -> - GenTryFinally cenv cgbuf eenv (e1,e2,m,resty,spTry,spFinally) sequel - | TOp.TryCatch(spTry,spWith),[Expr.Lambda(_,_,_,[_],e1,_,_); Expr.Lambda(_,_,_,[vf],ef,_,_);Expr.Lambda(_,_,_,[vh],eh,_,_)],[resty] -> - GenTryCatch cenv cgbuf eenv (e1,vf,ef,vh,eh,m,resty,spTry,spWith) sequel - | TOp.ILCall(virt,_,valu,newobj,valUseFlags,_,isDllImport,ilMethRef,enclArgTys,methArgTys,returnTys),args,[] -> - GenILCall cenv cgbuf eenv (virt,valu,newobj,valUseFlags,isDllImport,ilMethRef,enclArgTys,methArgTys,args,returnTys,m) sequel - | TOp.RefAddrGet _readonly,[e],[ty] -> GenGetAddrOfRefCellField cenv cgbuf eenv (e,ty,m) sequel - | TOp.Coerce,[e],[tgty;srcty] -> GenCoerce cenv cgbuf eenv (e,tgty,m,srcty) sequel - | TOp.Reraise,[],[rtnty] -> GenReraise cenv cgbuf eenv (rtnty,m) sequel - | TOp.TraitCall(ss),args,[] -> GenTraitCall cenv cgbuf eenv (ss,args, m) expr sequel - | TOp.LValueOp(LSet,v),[e],[] -> GenSetVal cenv cgbuf eenv (v,e,m) sequel - | TOp.LValueOp(LByrefGet,v),[],[] -> GenGetByref cenv cgbuf eenv (v,m) sequel - | TOp.LValueOp(LByrefSet,v),[e],[] -> GenSetByref cenv cgbuf eenv (v,e,m) sequel - | TOp.LValueOp(LAddrOf _,v),[],[] -> GenGetValAddr cenv cgbuf eenv (v,m) sequel - | TOp.Array,elems,[elemTy] -> GenNewArray cenv cgbuf eenv (elems,elemTy,m) sequel - | TOp.Bytes bytes,[],[] -> + | Expr.App(f,fty, tyargs, args, m) -> + GenApp cenv cgbuf eenv (f, fty, tyargs, args, m) sequel + | Expr.Val(v, _, m) -> + GenGetVal cenv cgbuf eenv (v, m) sequel + + // Most generation of linear expressions is implemented routinely using tailcalls and the correct sequels. + // This is because the element of expansion happens to be the final thing generated in most cases. However + // for large lists we have to process the linearity separately + | LinearOpExpr _ -> + GenLinearExpr cenv cgbuf eenv expr sequel id |> ignore + + | Expr.Op(op, tyargs, args, m) -> + match op, args, tyargs with + | TOp.ExnConstr(c), _, _ -> + GenAllocExn cenv cgbuf eenv (c, args, m) sequel + | TOp.UnionCase(c), _, _ -> + GenAllocUnionCase cenv cgbuf eenv (c, tyargs, args, m) sequel + | TOp.Recd(isCtor, tycon), _, _ -> + GenAllocRecd cenv cgbuf eenv isCtor (tycon, tyargs, args, m) sequel + | TOp.AnonRecd(anonInfo), _, _ -> + GenAllocAnonRecd cenv cgbuf eenv (anonInfo, tyargs, args, m) sequel + | TOp.AnonRecdGet (anonInfo, n), [e], _ -> + GenGetAnonRecdField cenv cgbuf eenv (anonInfo, e, tyargs, n, m) sequel + | TOp.TupleFieldGet (tupInfo, n), [e], _ -> + GenGetTupleField cenv cgbuf eenv (tupInfo, e, tyargs, n, m) sequel + | TOp.ExnFieldGet(ecref, n), [e], _ -> + GenGetExnField cenv cgbuf eenv (e, ecref, n, m) sequel + | TOp.UnionCaseFieldGet(ucref, n), [e], _ -> + GenGetUnionCaseField cenv cgbuf eenv (e, ucref, tyargs, n, m) sequel + | TOp.UnionCaseFieldGetAddr(ucref, n, _readonly), [e], _ -> + GenGetUnionCaseFieldAddr cenv cgbuf eenv (e, ucref, tyargs, n, m) sequel + | TOp.UnionCaseTagGet ucref, [e], _ -> + GenGetUnionCaseTag cenv cgbuf eenv (e, ucref, tyargs, m) sequel + | TOp.UnionCaseProof ucref, [e], _ -> + GenUnionCaseProof cenv cgbuf eenv (e, ucref, tyargs, m) sequel + | TOp.ExnFieldSet(ecref, n), [e;e2], _ -> + GenSetExnField cenv cgbuf eenv (e, ecref, n, e2, m) sequel + | TOp.UnionCaseFieldSet(ucref, n), [e;e2], _ -> + GenSetUnionCaseField cenv cgbuf eenv (e, ucref, tyargs, n, e2, m) sequel + | TOp.ValFieldGet f, [e], _ -> + GenGetRecdField cenv cgbuf eenv (e, f, tyargs, m) sequel + | TOp.ValFieldGet f, [], _ -> + GenGetStaticField cenv cgbuf eenv (f, tyargs, m) sequel + | TOp.ValFieldGetAddr (f, _readonly), [e], _ -> + GenGetRecdFieldAddr cenv cgbuf eenv (e, f, tyargs, m) sequel + | TOp.ValFieldGetAddr (f, _readonly), [], _ -> + GenGetStaticFieldAddr cenv cgbuf eenv (f, tyargs, m) sequel + | TOp.ValFieldSet f, [e1;e2], _ -> + GenSetRecdField cenv cgbuf eenv (e1, f, tyargs, e2, m) sequel + | TOp.ValFieldSet f, [e2], _ -> + GenSetStaticField cenv cgbuf eenv (f, tyargs, e2, m) sequel + | TOp.Tuple tupInfo, _, _ -> + GenAllocTuple cenv cgbuf eenv (tupInfo, args, tyargs, m) sequel + | TOp.ILAsm(code, returnTys), _, _ -> + GenAsmCode cenv cgbuf eenv (code, tyargs, args, returnTys, m) sequel + | TOp.While (sp, _), [Expr.Lambda(_, _, _, [_], e1, _, _);Expr.Lambda(_, _, _, [_], e2, _, _)], [] -> + GenWhileLoop cenv cgbuf eenv (sp, e1, e2, m) sequel + | TOp.For(spStart, dir), [Expr.Lambda(_, _, _, [_], e1, _, _);Expr.Lambda(_, _, _, [_], e2, _, _);Expr.Lambda(_, _, _, [v], e3, _, _)], [] -> + GenForLoop cenv cgbuf eenv (spStart, v, e1, dir, e2, e3, m) sequel + | TOp.TryFinally(spTry, spFinally), [Expr.Lambda(_, _, _, [_], e1, _, _); Expr.Lambda(_, _, _, [_], e2, _, _)], [resty] -> + GenTryFinally cenv cgbuf eenv (e1, e2, m, resty, spTry, spFinally) sequel + | TOp.TryCatch(spTry, spWith), [Expr.Lambda(_, _, _, [_], e1, _, _); Expr.Lambda(_, _, _, [vf], ef, _, _);Expr.Lambda(_, _, _, [vh], eh, _, _)], [resty] -> + GenTryCatch cenv cgbuf eenv (e1, vf, ef, vh, eh, m, resty, spTry, spWith) sequel + | TOp.ILCall(virt, _, valu, newobj, valUseFlags, _, isDllImport, ilMethRef, enclArgTys, methArgTys, returnTys), args, [] -> + GenILCall cenv cgbuf eenv (virt, valu, newobj, valUseFlags, isDllImport, ilMethRef, enclArgTys, methArgTys, args, returnTys, m) sequel + | TOp.RefAddrGet _readonly, [e], [ty] -> GenGetAddrOfRefCellField cenv cgbuf eenv (e, ty, m) sequel + | TOp.Coerce, [e], [tgty;srcty] -> GenCoerce cenv cgbuf eenv (e, tgty, m, srcty) sequel + | TOp.Reraise, [], [rtnty] -> GenReraise cenv cgbuf eenv (rtnty, m) sequel + | TOp.TraitCall(ss), args, [] -> GenTraitCall cenv cgbuf eenv (ss, args, m) expr sequel + | TOp.LValueOp(LSet, v), [e], [] -> GenSetVal cenv cgbuf eenv (v, e, m) sequel + | TOp.LValueOp(LByrefGet, v), [], [] -> GenGetByref cenv cgbuf eenv (v, m) sequel + | TOp.LValueOp(LByrefSet, v), [e], [] -> GenSetByref cenv cgbuf eenv (v, e, m) sequel + | TOp.LValueOp(LAddrOf _, v), [], [] -> GenGetValAddr cenv cgbuf eenv (v, m) sequel + | TOp.Array, elems, [elemTy] -> GenNewArray cenv cgbuf eenv (elems, elemTy, m) sequel + | TOp.Bytes bytes, [], [] -> if cenv.opts.emitConstantArraysUsingStaticDataBlobs then GenConstArray cenv cgbuf eenv cenv.g.ilg.typ_Byte bytes (fun buf b -> buf.EmitByte b) GenSequel cenv eenv.cloc cgbuf sequel else - GenNewArraySimple cenv cgbuf eenv (List.ofArray (Array.map (mkByte cenv.g m) bytes),cenv.g.byte_ty,m) sequel - | TOp.UInt16s arr,[],[] -> - if cenv.opts.emitConstantArraysUsingStaticDataBlobs then + GenNewArraySimple cenv cgbuf eenv (List.ofArray (Array.map (mkByte cenv.g m) bytes), cenv.g.byte_ty, m) sequel + | TOp.UInt16s arr, [], [] -> + if cenv.opts.emitConstantArraysUsingStaticDataBlobs then GenConstArray cenv cgbuf eenv cenv.g.ilg.typ_UInt16 arr (fun buf b -> buf.EmitUInt16 b) GenSequel cenv eenv.cloc cgbuf sequel else - GenNewArraySimple cenv cgbuf eenv (List.ofArray (Array.map (mkUInt16 cenv.g m) arr),cenv.g.uint16_ty,m) sequel - | TOp.Goto(label),_,_ -> - if cgbuf.mgbuf.cenv.opts.generateDebugSymbols then + GenNewArraySimple cenv cgbuf eenv (List.ofArray (Array.map (mkUInt16 cenv.g m) arr), cenv.g.uint16_ty, m) sequel + | TOp.Goto(label), _, _ -> + if cgbuf.mgbuf.cenv.opts.generateDebugSymbols then cgbuf.EmitStartOfHiddenCode() CG.EmitInstr cgbuf (pop 0) Push0 AI_nop CG.EmitInstr cgbuf (pop 0) Push0 (I_br label) // NOTE: discard sequel - | TOp.Return,[e],_ -> + | TOp.Return, [e], _ -> GenExpr cenv cgbuf eenv SPSuppress e Return // NOTE: discard sequel - | TOp.Return,[],_ -> + | TOp.Return, [], _ -> GenSequel cenv eenv.cloc cgbuf ReturnVoid // NOTE: discard sequel - | TOp.Label(label),_,_ -> - cgbuf.SetMarkToHere (Mark label) + | TOp.Label(label), _, _ -> + cgbuf.SetMarkToHere (Mark label) GenUnitThenSequel cenv eenv m eenv.cloc cgbuf sequel - | _ -> error(InternalError("Unexpected operator node expression",expr.Range)) - | Expr.StaticOptimization(constraints,e2,e3,m) -> - GenStaticOptimization cenv cgbuf eenv (constraints,e2,e3,m) sequel - | Expr.Obj(_,ty,_,_,[meth],[],m) when isDelegateTy cenv.g ty -> - GenDelegateExpr cenv cgbuf eenv expr (meth,m) sequel - | Expr.Obj(_,ty,basev,basecall,overrides,interfaceImpls,m) -> - GenObjectExpr cenv cgbuf eenv expr (ty,basev,basecall,overrides,interfaceImpls,m) sequel - - | Expr.Quote(ast,conv,_,m,ty) -> GenQuotation cenv cgbuf eenv (ast,conv,m,ty) sequel + | _ -> error(InternalError("Unexpected operator node expression", expr.Range)) + | Expr.StaticOptimization(constraints, e2, e3, m) -> + GenStaticOptimization cenv cgbuf eenv (constraints, e2, e3, m) sequel + | Expr.Obj(_, ty, _, _, [meth], [], m) when isDelegateTy cenv.g ty -> + GenDelegateExpr cenv cgbuf eenv expr (meth, m) sequel + | Expr.Obj(_, ty, basev, basecall, overrides, interfaceImpls, m) -> + GenObjectExpr cenv cgbuf eenv expr (ty, basev, basecall, overrides, interfaceImpls, m) sequel + + | Expr.Quote(ast, conv, _, m, ty) -> GenQuotation cenv cgbuf eenv (ast, conv, m, ty) sequel | Expr.Link _ -> failwith "Unexpected reclink" - | Expr.TyChoose (_,_,m) -> error(InternalError("Unexpected Expr.TyChoose",m)) + | Expr.TyChoose (_, _, m) -> error(InternalError("Unexpected Expr.TyChoose", m)) -and GenExprs cenv cgbuf eenv es = +and GenExprs cenv cgbuf eenv es = List.iter (fun e -> GenExpr cenv cgbuf eenv SPSuppress e Continue) es -and CodeGenMethodForExpr cenv mgbuf (spReq,entryPointInfo,methodName,eenv,alreadyUsedArgs,expr0,sequel0) = - let _,code = - CodeGenMethod cenv mgbuf (entryPointInfo,methodName,eenv,alreadyUsedArgs, +and CodeGenMethodForExpr cenv mgbuf (spReq, entryPointInfo, methodName, eenv, alreadyUsedArgs, expr0, sequel0) = + let _, code = + CodeGenMethod cenv mgbuf (entryPointInfo, methodName, eenv, alreadyUsedArgs, (fun cgbuf eenv -> GenExpr cenv cgbuf eenv spReq expr0 sequel0), expr0.Range) - code + code //-------------------------------------------------------------------------- // Generate sequels -//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- (* does the sequel discard its result, and if so what does it do next? *) -and sequelAfterDiscard sequel = - match sequel with +and sequelAfterDiscard sequel = + match sequel with | DiscardThen sequel -> Some(sequel) - | EndLocalScope(sq,mark) -> sequelAfterDiscard sq |> Option.map (fun sq -> EndLocalScope(sq,mark)) + | EndLocalScope(sq, mark) -> sequelAfterDiscard sq |> Option.map (fun sq -> EndLocalScope(sq, mark)) | _ -> None and sequelIgnoringEndScopesAndDiscard sequel = let sequel = sequelIgnoreEndScopes sequel - match sequelAfterDiscard sequel with + match sequelAfterDiscard sequel with | Some sq -> sq - | None -> sequel + | None -> sequel -and sequelIgnoreEndScopes sequel = - match sequel with - | EndLocalScope(sq,_) -> sequelIgnoreEndScopes sq +and sequelIgnoreEndScopes sequel = + match sequel with + | EndLocalScope(sq, _) -> sequelIgnoreEndScopes sq | sq -> sq (* commit any 'EndLocalScope' nodes in the sequel and return the residue *) and GenSequelEndScopes cgbuf sequel = - match sequel with - | EndLocalScope(sq,m) -> CG.SetMarkToHere cgbuf m; GenSequelEndScopes cgbuf sq + match sequel with + | EndLocalScope(sq, m) -> CG.SetMarkToHere cgbuf m; GenSequelEndScopes cgbuf sq | _ -> () and StringOfSequel sequel = @@ -2202,35 +2353,35 @@ and StringOfSequel sequel = | ReturnVoid -> "ReturnVoid" | CmpThenBrOrContinue _ -> "CmpThenBrOrContinue" | Return -> "Return" - | EndLocalScope (sq,Mark k) -> "EndLocalScope(" + StringOfSequel sq + "," + formatCodeLabel k + ")" + | EndLocalScope (sq, Mark k) -> "EndLocalScope(" + StringOfSequel sq + "," + formatCodeLabel k + ")" | Br (Mark x) -> sprintf "Br L%s" (formatCodeLabel x) | LeaveHandler _ -> "LeaveHandler" | EndFilter -> "EndFilter" and GenSequel cenv cloc cgbuf sequel = let sq = sequelIgnoreEndScopes sequel - (match sq with + (match sq with | Continue -> () - | DiscardThen sq -> + | DiscardThen sq -> CG.EmitInstr cgbuf (pop 1) Push0 AI_pop - GenSequel cenv cloc cgbuf sq + GenSequel cenv cloc cgbuf sq | ReturnVoid -> - CG.EmitInstr cgbuf (pop 0) Push0 I_ret - | CmpThenBrOrContinue(pops,bri) -> + CG.EmitInstr cgbuf (pop 0) Push0 I_ret + | CmpThenBrOrContinue(pops, bri) -> CG.EmitInstrs cgbuf pops Push0 bri - | Return -> - CG.EmitInstr cgbuf (pop 1) Push0 I_ret + | Return -> + CG.EmitInstr cgbuf (pop 1) Push0 I_ret | EndLocalScope _ -> failwith "EndLocalScope unexpected" - | Br x -> - // Emit a NOP in debug code in case the branch instruction gets eliminated + | Br x -> + // Emit a NOP in debug code in case the branch instruction gets eliminated // because it is a "branch to next instruction". This prevents two unrelated sequence points // (the one before the branch and the one after) being coalesced together - if cgbuf.mgbuf.cenv.opts.generateDebugSymbols then + if cgbuf.mgbuf.cenv.opts.generateDebugSymbols then cgbuf.EmitStartOfHiddenCode() CG.EmitInstr cgbuf (pop 0) Push0 AI_nop - CG.EmitInstr cgbuf (pop 0) Push0 (I_br x.CodeLabel) - | LeaveHandler (isFinally, whereToSaveResult,x) -> - if isFinally then + CG.EmitInstr cgbuf (pop 0) Push0 (I_br x.CodeLabel) + | LeaveHandler (isFinally, whereToSaveResult, x) -> + if isFinally then CG.EmitInstr cgbuf (pop 1) Push0 AI_pop else EmitSetLocal cgbuf whereToSaveResult @@ -2243,24 +2394,24 @@ and GenSequel cenv cloc cgbuf sequel = //-------------------------------------------------------------------------- // Generate constants -//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- -and GenConstant cenv cgbuf eenv (c,m,ty) sequel = +and GenConstant cenv cgbuf eenv (c, m, ty) sequel = let ilTy = GenType cenv.amap m eenv.tyenv ty // Check if we need to generate the value at all - match sequelAfterDiscard sequel with - | None -> - match TryEliminateDesugaredConstants cenv.g m c with - | Some e -> + match sequelAfterDiscard sequel with + | None -> + match TryEliminateDesugaredConstants cenv.g m c with + | Some e -> GenExpr cenv cgbuf eenv SPSuppress e Continue | None -> - match c with + match c with | Const.Bool b -> CG.EmitInstr cgbuf (pop 0) (Push [cenv.g.ilg.typ_Bool]) (mkLdcInt32 (if b then 1 else 0)) | Const.SByte i -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (mkLdcInt32 (int32 i)) | Const.Int16 i -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (mkLdcInt32 (int32 i)) | Const.Int32 i -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (mkLdcInt32 i) - | Const.Int64 i -> - // see https://github.com/Microsoft/visualfsharp/pull/3620 + | Const.Int64 i -> + // see https://github.com/Microsoft/visualfsharp/pull/3620 if i >= int64 System.Int32.MinValue && i <= int64 System.Int32.MaxValue then CG.EmitInstrs cgbuf (pop 0) (Push [ilTy]) [ mkLdcInt32 (int32 i); AI_conv DT_I8 ] elif i >= int64 System.UInt32.MinValue && i <= int64 System.UInt32.MaxValue then @@ -2273,57 +2424,57 @@ and GenConstant cenv cgbuf eenv (c,m,ty) sequel = | Const.UInt32 i -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (mkLdcInt32 (int32 i)) | Const.UInt64 i -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (iLdcInt64 (int64 i)) | Const.UIntPtr i -> CG.EmitInstrs cgbuf (pop 0) (Push [ilTy]) [iLdcInt64 (int64 i); AI_conv DT_U ] - | Const.Double f -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (AI_ldc (DT_R8,ILConst.R8 f)) - | Const.Single f -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (AI_ldc (DT_R4,ILConst.R4 f)) + | Const.Double f -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (AI_ldc (DT_R8, ILConst.R8 f)) + | Const.Single f -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (AI_ldc (DT_R4, ILConst.R4 f)) | Const.Char(c) -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) ( mkLdcInt32 (int c)) | Const.String(s) -> GenString cenv cgbuf s | Const.Unit -> GenUnit cenv eenv m cgbuf - | Const.Zero -> GenDefaultValue cenv cgbuf eenv (ty,m) + | Const.Zero -> GenDefaultValue cenv cgbuf eenv (ty, m) | Const.Decimal _ -> failwith "unreachable" GenSequel cenv eenv.cloc cgbuf sequel - | Some sq -> - // Even if we didn't need to generate the value then maybe we still have to branch or return + | Some sq -> + // Even if we didn't need to generate the value then maybe we still have to branch or return GenSequel cenv eenv.cloc cgbuf sq -and GenUnitTy cenv eenv m = - match cenv.ilUnitTy with - | None -> - let res = GenType cenv.amap m eenv.tyenv cenv.g.unit_ty +and GenUnitTy cenv eenv m = + match cenv.ilUnitTy with + | None -> + let res = GenType cenv.amap m eenv.tyenv cenv.g.unit_ty cenv.ilUnitTy <- Some res res - | Some res -> res + | Some res -> res -and GenUnit cenv eenv m cgbuf = +and GenUnit cenv eenv m cgbuf = CG.EmitInstr cgbuf (pop 0) (Push [GenUnitTy cenv eenv m]) AI_ldnull and GenUnitThenSequel cenv eenv m cloc cgbuf sequel = - match sequelAfterDiscard sequel with + match sequelAfterDiscard sequel with | Some(sq) -> GenSequel cenv cloc cgbuf sq | None -> GenUnit cenv eenv m cgbuf; GenSequel cenv cloc cgbuf sequel //-------------------------------------------------------------------------- // Generate simple data-related constructs -//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- -and GenAllocTuple cenv cgbuf eenv (tupInfo, args,argtys,m) sequel = +and GenAllocTuple cenv cgbuf eenv (tupInfo, args, argtys, m) sequel = let tupInfo = evalTupInfoIsStruct tupInfo - let tcref, tys, args, newm = mkCompiledTuple cenv.g tupInfo (argtys,args,m) + let tcref, tys, args, newm = mkCompiledTuple cenv.g tupInfo (argtys, args, m) let ty = GenNamedTyApp cenv.amap newm eenv.tyenv tcref tys let ntyvars = if (tys.Length - 1) < goodTupleFields then (tys.Length - 1) else goodTupleFields let formalTyvars = [ for n in 0 .. ntyvars do yield mkILTyvarTy (uint16 n) ] GenExprs cenv cgbuf eenv args - // Generate a reference to the constructor + // Generate a reference to the constructor CG.EmitInstr cgbuf (pop args.Length) (Push [ty]) - (mkNormalNewobj - (mkILCtorMethSpecForTy (ty,formalTyvars))) + (mkNormalNewobj + (mkILCtorMethSpecForTy (ty, formalTyvars))) GenSequel cenv eenv.cloc cgbuf sequel -and GenGetTupleField cenv cgbuf eenv (tupInfo,e,tys,n,m) sequel = +and GenGetTupleField cenv cgbuf eenv (tupInfo, e, tys, n, m) sequel = let tupInfo = evalTupInfoIsStruct tupInfo - let rec getCompiledTupleItem g (e,tys:TTypes,n,m) = + let rec getCompiledTupleItem g (e, tys: TTypes, n, m) = let ar = tys.Length if ar <= 0 then failwith "getCompiledTupleItem" elif ar < maxTuple then @@ -2331,7 +2482,7 @@ and GenGetTupleField cenv cgbuf eenv (tupInfo,e,tys,n,m) sequel = let ty = GenNamedTyApp cenv.amap m eenv.tyenv tcr' tys mkGetTupleItemN g m n ty tupInfo e tys.[n] else - let tysA,tysB = List.splitAfter (goodTupleFields) tys + let tysA, tysB = List.splitAfter (goodTupleFields) tys let tyB = mkCompiledTupleTy g tupInfo tysB let tys' = tysA@[tyB] let tcr' = mkCompiledTupleTyconRef g tupInfo (List.length tys') @@ -2341,51 +2492,66 @@ and GenGetTupleField cenv cgbuf eenv (tupInfo,e,tys,n,m) sequel = if n < goodTupleFields then elast else - getCompiledTupleItem g (elast,tysB,n-goodTupleFields,m) - GenExpr cenv cgbuf eenv SPSuppress (getCompiledTupleItem cenv.g (e,tys,n,m)) sequel + getCompiledTupleItem g (elast, tysB, n-goodTupleFields, m) + GenExpr cenv cgbuf eenv SPSuppress (getCompiledTupleItem cenv.g (e, tys, n, m)) sequel -and GenAllocExn cenv cgbuf eenv (c,args,m) sequel = +and GenAllocExn cenv cgbuf eenv (c, args, m) sequel = GenExprs cenv cgbuf eenv args let ty = GenExnType cenv.amap m eenv.tyenv c let flds = recdFieldsOfExnDefRef c - let argtys = flds |> List.map (fun rfld -> GenType cenv.amap m eenv.tyenv rfld.FormalType) + let argtys = flds |> List.map (fun rfld -> GenType cenv.amap m eenv.tyenv rfld.FormalType) let mspec = mkILCtorMethSpecForTy (ty, argtys) CG.EmitInstr cgbuf (pop args.Length) (Push [ty]) - (mkNormalNewobj mspec) + (mkNormalNewobj mspec) GenSequel cenv eenv.cloc cgbuf sequel -and GenAllocUnionCase cenv cgbuf eenv (c,tyargs,args,m) sequel = - GenExprs cenv cgbuf eenv args +and GenAllocUnionCaseCore cenv cgbuf eenv (c,tyargs,n,m) = let cuspec,idx = GenUnionCaseSpec cenv.amap m eenv.tyenv c tyargs - CG.EmitInstrs cgbuf (pop args.Length) (Push [cuspec.DeclaringType]) (EraseUnions.mkNewData cenv.g.ilg (cuspec, idx)) + CG.EmitInstrs cgbuf (pop n) (Push [cuspec.DeclaringType]) (EraseUnions.mkNewData cenv.g.ilg (cuspec, idx)) + +and GenAllocUnionCase cenv cgbuf eenv (c,tyargs,args,m) sequel = + GenExprs cenv cgbuf eenv args + GenAllocUnionCaseCore cenv cgbuf eenv (c,tyargs,args.Length,m) GenSequel cenv eenv.cloc cgbuf sequel +and GenLinearExpr cenv cgbuf eenv expr sequel (contf: FakeUnit -> FakeUnit) = + match expr with + | LinearOpExpr (TOp.UnionCase c, tyargs, argsFront, argLast, m) -> + GenExprs cenv cgbuf eenv argsFront + GenLinearExpr cenv cgbuf eenv argLast Continue (contf << (fun (Fake) -> + GenAllocUnionCaseCore cenv cgbuf eenv (c, tyargs, argsFront.Length + 1, m) + GenSequel cenv eenv.cloc cgbuf sequel + Fake)) + | _ -> + GenExpr cenv cgbuf eenv SPSuppress expr sequel + contf Fake + and GenAllocRecd cenv cgbuf eenv ctorInfo (tcref,argtys,args,m) sequel = let ty = GenNamedTyApp cenv.amap m eenv.tyenv tcref argtys - // Filter out fields with default initialization - let relevantFields = + // Filter out fields with default initialization + let relevantFields = tcref.AllInstanceFieldsAsList |> List.filter (fun f -> not f.IsZeroInit) |> List.filter (fun f -> not f.IsCompilerGenerated) - match ctorInfo with - | RecdExprIsObjInit -> - (args,relevantFields) ||> List.iter2 (fun e f -> - CG.EmitInstr cgbuf (pop 0) (Push (if tcref.IsStructOrEnumTycon then [ILType.Byref ty] else [ty])) mkLdarg0 + match ctorInfo with + | RecdExprIsObjInit -> + (args, relevantFields) ||> List.iter2 (fun e f -> + CG.EmitInstr cgbuf (pop 0) (Push (if tcref.IsStructOrEnumTycon then [ILType.Byref ty] else [ty])) mkLdarg0 GenExpr cenv cgbuf eenv SPSuppress e Continue - GenFieldStore false cenv cgbuf eenv (tcref.MakeNestedRecdFieldRef f,argtys,m) discard) - // Object construction doesn't generate a true value. - // Object constructions will always just get thrown away so this is safe + GenFieldStore false cenv cgbuf eenv (tcref.MakeNestedRecdFieldRef f, argtys, m) discard) + // Object construction doesn't generate a true value. + // Object constructions will always just get thrown away so this is safe GenSequel cenv eenv.cloc cgbuf sequel - | RecdExpr -> + | RecdExpr -> GenExprs cenv cgbuf eenv args - // generate a reference to the record constructor + // generate a reference to the record constructor let tyenvinner = TypeReprEnv.ForTyconRef tcref CG.EmitInstr cgbuf (pop args.Length) (Push [ty]) - (mkNormalNewobj - (mkILCtorMethSpecForTy (ty,relevantFields |> List.map (fun f -> GenType cenv.amap m tyenvinner f.FormalType) ))) + (mkNormalNewobj + (mkILCtorMethSpecForTy (ty, relevantFields |> List.map (fun f -> GenType cenv.amap m tyenvinner f.FormalType) ))) GenSequel cenv eenv.cloc cgbuf sequel and GenAllocAnonRecd cenv cgbuf eenv (anonInfo: AnonRecdTypeInfo, tyargs, args, m) sequel = @@ -2393,8 +2559,8 @@ and GenAllocAnonRecd cenv cgbuf eenv (anonInfo: AnonRecdTypeInfo, tyargs, args, let boxity = anonType.Boxity GenExprs cenv cgbuf eenv args let ilTypeArgs = GenTypeArgs cenv.amap m eenv.tyenv tyargs - let anonTypeWithInst = mkILTy boxity (mkILTySpec(anonType.TypeSpec.TypeRef,ilTypeArgs)) - CG.EmitInstr cgbuf (pop args.Length) (Push [anonTypeWithInst]) (mkNormalNewobj (mkILMethSpec(anonCtor,boxity,ilTypeArgs,[]))) + let anonTypeWithInst = mkILTy boxity (mkILTySpec(anonType.TypeSpec.TypeRef, ilTypeArgs)) + CG.EmitInstr cgbuf (pop args.Length) (Push [anonTypeWithInst]) (mkNormalNewobj (mkILMethSpec(anonCtor, boxity, ilTypeArgs, []))) GenSequel cenv eenv.cloc cgbuf sequel and GenGetAnonRecdField cenv cgbuf eenv (anonInfo: AnonRecdTypeInfo, e, tyargs, n, m) sequel = @@ -2403,81 +2569,81 @@ and GenGetAnonRecdField cenv cgbuf eenv (anonInfo: AnonRecdTypeInfo, e, tyargs, let ilTypeArgs = GenTypeArgs cenv.amap m eenv.tyenv tyargs let anonMethod = anonMethods.[n] let anonFieldType = ilTypeArgs.[n] - GenExpr cenv cgbuf eenv SPSuppress e Continue - CG.EmitInstr cgbuf (pop 1) (Push [anonFieldType]) (mkNormalCall (mkILMethSpec(anonMethod,boxity,ilTypeArgs,[]))) + GenExpr cenv cgbuf eenv SPSuppress e Continue + CG.EmitInstr cgbuf (pop 1) (Push [anonFieldType]) (mkNormalCall (mkILMethSpec(anonMethod, boxity, ilTypeArgs, []))) GenSequel cenv eenv.cloc cgbuf sequel -and GenNewArraySimple cenv cgbuf eenv (elems,elemTy,m) sequel = +and GenNewArraySimple cenv cgbuf eenv (elems, elemTy, m) sequel = let ilElemTy = GenType cenv.amap m eenv.tyenv elemTy let ilArrTy = mkILArr1DTy ilElemTy - - CG.EmitInstrs cgbuf (pop 0) (Push [ilArrTy]) [ (AI_ldc (DT_I4,ILConst.I4 (elems.Length))); I_newarr (ILArrayShape.SingleDimensional,ilElemTy) ] - elems |> List.iteri (fun i e -> - CG.EmitInstrs cgbuf (pop 0) (Push [ilArrTy; cenv.g.ilg.typ_Int32]) [ AI_dup; (AI_ldc (DT_I4,ILConst.I4 i)) ] - GenExpr cenv cgbuf eenv SPSuppress e Continue - CG.EmitInstr cgbuf (pop 3) Push0 (I_stelem_any (ILArrayShape.SingleDimensional,ilElemTy))) - + + CG.EmitInstrs cgbuf (pop 0) (Push [ilArrTy]) [ (AI_ldc (DT_I4, ILConst.I4 (elems.Length))); I_newarr (ILArrayShape.SingleDimensional, ilElemTy) ] + elems |> List.iteri (fun i e -> + CG.EmitInstrs cgbuf (pop 0) (Push [ilArrTy; cenv.g.ilg.typ_Int32]) [ AI_dup; (AI_ldc (DT_I4, ILConst.I4 i)) ] + GenExpr cenv cgbuf eenv SPSuppress e Continue + CG.EmitInstr cgbuf (pop 3) Push0 (I_stelem_any (ILArrayShape.SingleDimensional, ilElemTy))) + GenSequel cenv eenv.cloc cgbuf sequel -and GenNewArray cenv cgbuf eenv (elems: Expr list,elemTy,m) sequel = +and GenNewArray cenv cgbuf eenv (elems: Expr list, elemTy, m) sequel = // REVIEW: The restriction against enum types here has to do with Dev10/Dev11 bug 872799 - // GenConstArray generates a call to RuntimeHelpers.InitializeArray. On CLR 2.0/x64 and CLR 4.0/x64/x86, + // GenConstArray generates a call to RuntimeHelpers.InitializeArray. On CLR 2.0/x64 and CLR 4.0/x64/x86, // InitializeArray is a JIT intrinsic that will result in invalid runtime CodeGen when initializing an array // of enum types. Until bug 872799 is fixed, we'll need to generate arrays the "simple" way for enum types // Also note - C# never uses InitializeArray for enum types, so this change puts us on equal footing with them. - if elems.Length <= 5 || not cenv.opts.emitConstantArraysUsingStaticDataBlobs || (isEnumTy cenv.g elemTy) then - GenNewArraySimple cenv cgbuf eenv (elems,elemTy,m) sequel + if elems.Length <= 5 || not cenv.opts.emitConstantArraysUsingStaticDataBlobs || (isEnumTy cenv.g elemTy) then + GenNewArraySimple cenv cgbuf eenv (elems, elemTy, m) sequel else - // Try to emit a constant byte-blob array + // Try to emit a constant byte-blob array let elems' = Array.ofList elems - let test,write = - match elems'.[0] with - | Expr.Const(Const.Bool _,_,_) -> - (function Const.Bool _ -> true | _ -> false), - (fun (buf: ByteBuffer) -> function Const.Bool b -> buf.EmitBoolAsByte b | _ -> failwith "unreachable") - | Expr.Const(Const.Char _,_,_) -> - (function Const.Char _ -> true | _ -> false), - (fun buf -> function Const.Char b -> buf.EmitInt32AsUInt16 (int b) | _ -> failwith "unreachable") - | Expr.Const(Const.Byte _,_,_) -> - (function Const.Byte _ -> true | _ -> false), + let test, write = + match elems'.[0] with + | Expr.Const(Const.Bool _, _, _) -> + (function Const.Bool _ -> true | _ -> false), + (fun (buf: ByteBuffer) -> function Const.Bool b -> buf.EmitBoolAsByte b | _ -> failwith "unreachable") + | Expr.Const(Const.Char _, _, _) -> + (function Const.Char _ -> true | _ -> false), + (fun buf -> function Const.Char b -> buf.EmitInt32AsUInt16 (int b) | _ -> failwith "unreachable") + | Expr.Const(Const.Byte _, _, _) -> + (function Const.Byte _ -> true | _ -> false), (fun buf -> function Const.Byte b -> buf.EmitByte b | _ -> failwith "unreachable") - | Expr.Const(Const.UInt16 _,_,_) -> - (function Const.UInt16 _ -> true | _ -> false), + | Expr.Const(Const.UInt16 _, _, _) -> + (function Const.UInt16 _ -> true | _ -> false), (fun buf -> function Const.UInt16 b -> buf.EmitUInt16 b | _ -> failwith "unreachable") - | Expr.Const(Const.UInt32 _,_,_) -> - (function Const.UInt32 _ -> true | _ -> false), + | Expr.Const(Const.UInt32 _, _, _) -> + (function Const.UInt32 _ -> true | _ -> false), (fun buf -> function Const.UInt32 b -> buf.EmitInt32 (int32 b) | _ -> failwith "unreachable") - | Expr.Const(Const.UInt64 _,_,_) -> - (function Const.UInt64 _ -> true | _ -> false), + | Expr.Const(Const.UInt64 _, _, _) -> + (function Const.UInt64 _ -> true | _ -> false), (fun buf -> function Const.UInt64 b -> buf.EmitInt64 (int64 b) | _ -> failwith "unreachable") - | Expr.Const(Const.SByte _,_,_) -> - (function Const.SByte _ -> true | _ -> false), + | Expr.Const(Const.SByte _, _, _) -> + (function Const.SByte _ -> true | _ -> false), (fun buf -> function Const.SByte b -> buf.EmitByte (byte b) | _ -> failwith "unreachable") - | Expr.Const(Const.Int16 _,_,_) -> - (function Const.Int16 _ -> true | _ -> false), + | Expr.Const(Const.Int16 _, _, _) -> + (function Const.Int16 _ -> true | _ -> false), (fun buf -> function Const.Int16 b -> buf.EmitUInt16 (uint16 b) | _ -> failwith "unreachable") - | Expr.Const(Const.Int32 _,_,_) -> - (function Const.Int32 _ -> true | _ -> false), + | Expr.Const(Const.Int32 _, _, _) -> + (function Const.Int32 _ -> true | _ -> false), (fun buf -> function Const.Int32 b -> buf.EmitInt32 b | _ -> failwith "unreachable") - | Expr.Const(Const.Int64 _,_,_) -> - (function Const.Int64 _ -> true | _ -> false), - (fun buf -> function Const.Int64 b -> buf.EmitInt64 b | _ -> failwith "unreachable") + | Expr.Const(Const.Int64 _, _, _) -> + (function Const.Int64 _ -> true | _ -> false), + (fun buf -> function Const.Int64 b -> buf.EmitInt64 b | _ -> failwith "unreachable") | _ -> (function _ -> false), (fun _ _ -> failwith "unreachable") - if elems' |> Array.forall (function Expr.Const(c,_,_) -> test c | _ -> false) then + if elems' |> Array.forall (function Expr.Const(c, _, _) -> test c | _ -> false) then let ilElemTy = GenType cenv.amap m eenv.tyenv elemTy - GenConstArray cenv cgbuf eenv ilElemTy elems' (fun buf -> function Expr.Const(c,_,_) -> write buf c | _ -> failwith "unreachable") + GenConstArray cenv cgbuf eenv ilElemTy elems' (fun buf -> function Expr.Const(c, _, _) -> write buf c | _ -> failwith "unreachable") GenSequel cenv eenv.cloc cgbuf sequel else - GenNewArraySimple cenv cgbuf eenv (elems,elemTy,m) sequel + GenNewArraySimple cenv cgbuf eenv (elems, elemTy, m) sequel -and GenCoerce cenv cgbuf eenv (e,tgty,m,srcty) sequel = - // Is this an upcast? +and GenCoerce cenv cgbuf eenv (e, tgty, m, srcty) sequel = + // Is this an upcast? if TypeRelations.TypeDefinitelySubsumesTypeNoCoercion 0 cenv.g cenv.amap m tgty srcty && - // Do an extra check - should not be needed + // Do an extra check - should not be needed TypeRelations.TypeFeasiblySubsumesType 0 cenv.g cenv.amap m tgty TypeRelations.NoCoerce srcty then - begin + begin if (isInterfaceTy cenv.g tgty) then ( GenExpr cenv cgbuf eenv SPSuppress e Continue let ilToTy = GenType cenv.amap m eenv.tyenv tgty @@ -2488,27 +2654,27 @@ and GenCoerce cenv cgbuf eenv (e,tgty,m,srcty) sequel = ) else ( GenExpr cenv cgbuf eenv SPSuppress e sequel ) - end - else - GenExpr cenv cgbuf eenv SPSuppress e Continue - if not (isObjTy cenv.g srcty) then + end + else + GenExpr cenv cgbuf eenv SPSuppress e Continue + if not (isObjTy cenv.g srcty) then let ilFromTy = GenType cenv.amap m eenv.tyenv srcty - CG.EmitInstrs cgbuf (pop 1) (Push [cenv.g.ilg.typ_Object]) [ I_box ilFromTy ] - if not (isObjTy cenv.g tgty) then + CG.EmitInstrs cgbuf (pop 1) (Push [cenv.g.ilg.typ_Object]) [ I_box ilFromTy ] + if not (isObjTy cenv.g tgty) then let ilToTy = GenType cenv.amap m eenv.tyenv tgty - CG.EmitInstrs cgbuf (pop 1) (Push [ilToTy]) [ I_unbox_any ilToTy ] + CG.EmitInstrs cgbuf (pop 1) (Push [ilToTy]) [ I_unbox_any ilToTy ] GenSequel cenv eenv.cloc cgbuf sequel -and GenReraise cenv cgbuf eenv (rtnty,m) sequel = +and GenReraise cenv cgbuf eenv (rtnty, m) sequel = let ilReturnTy = GenType cenv.amap m eenv.tyenv rtnty CG.EmitInstrs cgbuf (pop 0) Push0 [I_rethrow] // [See comment related to I_throw]. // Rethrow does not return. Required to push dummy value on the stack. // This follows prior behaviour by prim-types reraise<_>. - CG.EmitInstrs cgbuf (pop 0) (Push [ilReturnTy]) [AI_ldnull; I_unbox_any ilReturnTy ] + CG.EmitInstrs cgbuf (pop 0) (Push [ilReturnTy]) [AI_ldnull; I_unbox_any ilReturnTy ] GenSequel cenv eenv.cloc cgbuf sequel -and GenGetExnField cenv cgbuf eenv (e,ecref,fieldNum,m) sequel = +and GenGetExnField cenv cgbuf eenv (e, ecref, fieldNum, m) sequel = GenExpr cenv cgbuf eenv SPSuppress e Continue let exnc = stripExnEqns ecref let ty = GenExnType cenv.amap m eenv.tyenv ecref @@ -2517,12 +2683,12 @@ and GenGetExnField cenv cgbuf eenv (e,ecref,fieldNum,m) sequel = let fld = List.item fieldNum exnc.TrueInstanceFieldsAsList let ftyp = GenType cenv.amap m eenv.tyenv fld.FormalType - let mspec = mkILNonGenericInstanceMethSpecInTy (ty,"get_" + fld.Name, [], ftyp) + let mspec = mkILNonGenericInstanceMethSpecInTy (ty, "get_" + fld.Name, [], ftyp) CG.EmitInstr cgbuf (pop 1) (Push [ftyp]) (mkNormalCall mspec) GenSequel cenv eenv.cloc cgbuf sequel -and GenSetExnField cenv cgbuf eenv (e,ecref,fieldNum,e2,m) sequel = +and GenSetExnField cenv cgbuf eenv (e, ecref, fieldNum, e2, m) sequel = GenExpr cenv cgbuf eenv SPSuppress e Continue let exnc = stripExnEqns ecref let ty = GenExnType cenv.amap m eenv.tyenv ecref @@ -2531,145 +2697,145 @@ and GenSetExnField cenv cgbuf eenv (e,ecref,fieldNum,e2,m) sequel = let ftyp = GenType cenv.amap m eenv.tyenv fld.FormalType let ilFieldName = ComputeFieldName exnc fld GenExpr cenv cgbuf eenv SPSuppress e2 Continue - CG.EmitInstr cgbuf (pop 2) Push0 (mkNormalStfld(mkILFieldSpecInTy (ty,ilFieldName,ftyp))) + CG.EmitInstr cgbuf (pop 2) Push0 (mkNormalStfld(mkILFieldSpecInTy (ty, ilFieldName, ftyp))) GenUnitThenSequel cenv eenv m eenv.cloc cgbuf sequel -and UnionCodeGen (cgbuf: CodeGenBuffer) = - { new EraseUnions.ICodeGen with +and UnionCodeGen (cgbuf: CodeGenBuffer) = + { new EraseUnions.ICodeGen with member __.CodeLabel(m) = m.CodeLabel member __.GenerateDelayMark() = CG.GenerateDelayMark cgbuf "unionCodeGenMark" - member __.GenLocal(ilty) = cgbuf.AllocLocal([],ilty,false) |> uint16 + member __.GenLocal(ilty) = cgbuf.AllocLocal([], ilty, false) |> uint16 member __.SetMarkToHere(m) = CG.SetMarkToHere cgbuf m member __.MkInvalidCastExnNewobj () = mkInvalidCastExnNewobj cgbuf.mgbuf.cenv.g member __.EmitInstr x = CG.EmitInstr cgbuf (pop 0) (Push []) x member __.EmitInstrs xs = CG.EmitInstrs cgbuf (pop 0) (Push []) xs } -and GenUnionCaseProof cenv cgbuf eenv (e,ucref,tyargs,m) sequel = +and GenUnionCaseProof cenv cgbuf eenv (e, ucref, tyargs, m) sequel = GenExpr cenv cgbuf eenv SPSuppress e Continue - let cuspec,idx = GenUnionCaseSpec cenv.amap m eenv.tyenv ucref tyargs - let fty = EraseUnions.GetILTypeForAlternative cuspec idx + let cuspec, idx = GenUnionCaseSpec cenv.amap m eenv.tyenv ucref tyargs + let fty = EraseUnions.GetILTypeForAlternative cuspec idx let avoidHelpers = entityRefInThisAssembly cenv.g.compilingFslib ucref.TyconRef - EraseUnions.emitCastData cenv.g.ilg (UnionCodeGen cgbuf) (false,avoidHelpers,cuspec,idx) + EraseUnions.emitCastData cenv.g.ilg (UnionCodeGen cgbuf) (false, avoidHelpers, cuspec, idx) CG.EmitInstrs cgbuf (pop 1) (Push [fty]) [ ] // push/pop to match the line above GenSequel cenv eenv.cloc cgbuf sequel -and GenGetUnionCaseField cenv cgbuf eenv (e,ucref,tyargs,n,m) sequel = +and GenGetUnionCaseField cenv cgbuf eenv (e, ucref, tyargs, n, m) sequel = assert (ucref.Tycon.IsStructOrEnumTycon || isProvenUnionCaseTy (tyOfExpr cenv.g e)) - + GenExpr cenv cgbuf eenv SPSuppress e Continue - let cuspec,idx = GenUnionCaseSpec cenv.amap m eenv.tyenv ucref tyargs + let cuspec, idx = GenUnionCaseSpec cenv.amap m eenv.tyenv ucref tyargs let fty = actualTypOfIlxUnionField cuspec idx n let avoidHelpers = entityRefInThisAssembly cenv.g.compilingFslib ucref.TyconRef CG.EmitInstrs cgbuf (pop 1) (Push [fty]) (EraseUnions.mkLdData (avoidHelpers, cuspec, idx, n)) GenSequel cenv eenv.cloc cgbuf sequel -and GenGetUnionCaseFieldAddr cenv cgbuf eenv (e,ucref,tyargs,n,m) sequel = +and GenGetUnionCaseFieldAddr cenv cgbuf eenv (e, ucref, tyargs, n, m) sequel = assert (ucref.Tycon.IsStructOrEnumTycon || isProvenUnionCaseTy (tyOfExpr cenv.g e)) - + GenExpr cenv cgbuf eenv SPSuppress e Continue - let cuspec,idx = GenUnionCaseSpec cenv.amap m eenv.tyenv ucref tyargs + let cuspec, idx = GenUnionCaseSpec cenv.amap m eenv.tyenv ucref tyargs let fty = actualTypOfIlxUnionField cuspec idx n let avoidHelpers = entityRefInThisAssembly cenv.g.compilingFslib ucref.TyconRef CG.EmitInstrs cgbuf (pop 1) (Push [ILType.Byref fty]) (EraseUnions.mkLdDataAddr (avoidHelpers, cuspec, idx, n)) GenSequel cenv eenv.cloc cgbuf sequel -and GenGetUnionCaseTag cenv cgbuf eenv (e,tcref,tyargs,m) sequel = +and GenGetUnionCaseTag cenv cgbuf eenv (e, tcref, tyargs, m) sequel = GenExpr cenv cgbuf eenv SPSuppress e Continue let cuspec = GenUnionSpec cenv.amap m eenv.tyenv tcref tyargs let avoidHelpers = entityRefInThisAssembly cenv.g.compilingFslib tcref EraseUnions.emitLdDataTag cenv.g.ilg (UnionCodeGen cgbuf) (avoidHelpers, cuspec) - CG.EmitInstrs cgbuf (pop 1) (Push [cenv.g.ilg.typ_Int32]) [ ] // push/pop to match the line above + CG.EmitInstrs cgbuf (pop 1) (Push [cenv.g.ilg.typ_Int32]) [ ] // push/pop to match the line above GenSequel cenv eenv.cloc cgbuf sequel -and GenSetUnionCaseField cenv cgbuf eenv (e,ucref,tyargs,n,e2,m) sequel = +and GenSetUnionCaseField cenv cgbuf eenv (e, ucref, tyargs, n, e2, m) sequel = GenExpr cenv cgbuf eenv SPSuppress e Continue - let cuspec,idx = GenUnionCaseSpec cenv.amap m eenv.tyenv ucref tyargs + let cuspec, idx = GenUnionCaseSpec cenv.amap m eenv.tyenv ucref tyargs let avoidHelpers = entityRefInThisAssembly cenv.g.compilingFslib ucref.TyconRef - EraseUnions.emitCastData cenv.g.ilg (UnionCodeGen cgbuf) (false,avoidHelpers,cuspec,idx) + EraseUnions.emitCastData cenv.g.ilg (UnionCodeGen cgbuf) (false, avoidHelpers, cuspec, idx) CG.EmitInstrs cgbuf (pop 1) (Push [cuspec.DeclaringType]) [ ] // push/pop to match the line above GenExpr cenv cgbuf eenv SPSuppress e2 Continue CG.EmitInstrs cgbuf (pop 2) Push0 (EraseUnions.mkStData (cuspec, idx, n)) GenUnitThenSequel cenv eenv m eenv.cloc cgbuf sequel -and GenGetRecdFieldAddr cenv cgbuf eenv (e,f,tyargs,m) sequel = +and GenGetRecdFieldAddr cenv cgbuf eenv (e, f, tyargs, m) sequel = GenExpr cenv cgbuf eenv SPSuppress e Continue let fref = GenRecdFieldRef m cenv eenv.tyenv f tyargs - CG.EmitInstrs cgbuf (pop 1) (Push [ILType.Byref fref.ActualType]) [ I_ldflda fref ] + CG.EmitInstrs cgbuf (pop 1) (Push [ILType.Byref fref.ActualType]) [ I_ldflda fref ] GenSequel cenv eenv.cloc cgbuf sequel - -and GenGetStaticFieldAddr cenv cgbuf eenv (f,tyargs,m) sequel = + +and GenGetStaticFieldAddr cenv cgbuf eenv (f, tyargs, m) sequel = let fspec = GenRecdFieldRef m cenv eenv.tyenv f tyargs - CG.EmitInstrs cgbuf (pop 0) (Push [ILType.Byref fspec.ActualType]) [ I_ldsflda fspec ] + CG.EmitInstrs cgbuf (pop 0) (Push [ILType.Byref fspec.ActualType]) [ I_ldsflda fspec ] GenSequel cenv eenv.cloc cgbuf sequel - -and GenGetRecdField cenv cgbuf eenv (e,f,tyargs,m) sequel = + +and GenGetRecdField cenv cgbuf eenv (e, f, tyargs, m) sequel = GenExpr cenv cgbuf eenv SPSuppress e Continue - GenFieldGet false cenv cgbuf eenv (f,tyargs,m) + GenFieldGet false cenv cgbuf eenv (f, tyargs, m) GenSequel cenv eenv.cloc cgbuf sequel - -and GenSetRecdField cenv cgbuf eenv (e1,f,tyargs,e2,m) sequel = + +and GenSetRecdField cenv cgbuf eenv (e1, f, tyargs, e2, m) sequel = GenExpr cenv cgbuf eenv SPSuppress e1 Continue GenExpr cenv cgbuf eenv SPSuppress e2 Continue - GenFieldStore false cenv cgbuf eenv (f,tyargs,m) sequel - -and GenGetStaticField cenv cgbuf eenv (f,tyargs,m) sequel = - GenFieldGet true cenv cgbuf eenv (f,tyargs,m) + GenFieldStore false cenv cgbuf eenv (f, tyargs, m) sequel + +and GenGetStaticField cenv cgbuf eenv (f, tyargs, m) sequel = + GenFieldGet true cenv cgbuf eenv (f, tyargs, m) GenSequel cenv eenv.cloc cgbuf sequel - -and GenSetStaticField cenv cgbuf eenv (f,tyargs,e2,m) sequel = + +and GenSetStaticField cenv cgbuf eenv (f, tyargs, e2, m) sequel = GenExpr cenv cgbuf eenv SPSuppress e2 Continue - GenFieldStore true cenv cgbuf eenv (f,tyargs,m) sequel + GenFieldStore true cenv cgbuf eenv (f, tyargs, m) sequel and mk_field_pops isStatic n = if isStatic then pop n else pop (n+1) -and GenFieldGet isStatic cenv cgbuf eenv (rfref:RecdFieldRef,tyargs,m) = +and GenFieldGet isStatic cenv cgbuf eenv (rfref: RecdFieldRef, tyargs, m) = let fspec = GenRecdFieldRef m cenv eenv.tyenv rfref tyargs let vol = if rfref.RecdField.IsVolatile then Volatile else Nonvolatile - if useGenuineField rfref.Tycon rfref.RecdField || entityRefInThisAssembly cenv.g.compilingFslib rfref.TyconRef then + if useGenuineField rfref.Tycon rfref.RecdField || entityRefInThisAssembly cenv.g.compilingFslib rfref.TyconRef then let instr = if isStatic then I_ldsfld(vol, fspec) else I_ldfld (ILAlignment.Aligned, vol, fspec) - CG.EmitInstrs cgbuf (mk_field_pops isStatic 0) (Push [fspec.ActualType]) [ instr ] + CG.EmitInstrs cgbuf (mk_field_pops isStatic 0) (Push [fspec.ActualType]) [ instr ] else let cconv = if isStatic then ILCallingConv.Static else ILCallingConv.Instance - let mspec = mkILMethSpecInTy (fspec.DeclaringType,cconv, "get_" + rfref.RecdField.rfield_id.idText, [], fspec.FormalType, []) + let mspec = mkILMethSpecInTy (fspec.DeclaringType, cconv, "get_" + rfref.RecdField.rfield_id.idText, [], fspec.FormalType, []) CG.EmitInstr cgbuf (mk_field_pops isStatic 0) (Push [fspec.ActualType]) (mkNormalCall mspec) -and GenFieldStore isStatic cenv cgbuf eenv (rfref:RecdFieldRef,tyargs,m) sequel = +and GenFieldStore isStatic cenv cgbuf eenv (rfref: RecdFieldRef, tyargs, m) sequel = let fspec = GenRecdFieldRef m cenv eenv.tyenv rfref tyargs let fld = rfref.RecdField if fld.IsMutable && not (useGenuineField rfref.Tycon fld) then let cconv = if isStatic then ILCallingConv.Static else ILCallingConv.Instance - let mspec = mkILMethSpecInTy (fspec.DeclaringType, cconv, "set_" + fld.rfield_id.idText, [fspec.FormalType],ILType.Void,[]) + let mspec = mkILMethSpecInTy (fspec.DeclaringType, cconv, "set_" + fld.rfield_id.idText, [fspec.FormalType], ILType.Void, []) CG.EmitInstr cgbuf (mk_field_pops isStatic 1) Push0 (mkNormalCall mspec) else let vol = if rfref.RecdField.IsVolatile then Volatile else Nonvolatile let instr = if isStatic then I_stsfld (vol, fspec) else I_stfld (ILAlignment.Aligned, vol, fspec) - CG.EmitInstr cgbuf (mk_field_pops isStatic 1) Push0 instr + CG.EmitInstr cgbuf (mk_field_pops isStatic 1) Push0 instr GenUnitThenSequel cenv eenv m eenv.cloc cgbuf sequel //-------------------------------------------------------------------------- // Generate arguments to calls -//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- /// Generate arguments to a call, unless the argument is the single lone "unit" value /// to a method or value compiled as a method taking no arguments -and GenUntupledArgsDiscardingLoneUnit cenv cgbuf eenv m numObjArgs curriedArgInfos args = - match curriedArgInfos ,args with +and GenUntupledArgsDiscardingLoneUnit cenv cgbuf eenv m numObjArgs curriedArgInfos args = + match curriedArgInfos, args with // Type.M() // new C() - | [[]],[arg] when numObjArgs = 0 -> + | [[]], [arg] when numObjArgs = 0 -> assert isUnitTy cenv.g (tyOfExpr cenv.g arg) GenExpr cenv cgbuf eenv SPSuppress arg discard // obj.M() - | [[_];[]],[arg1;arg2] when numObjArgs = 1 -> - assert isUnitTy cenv.g (tyOfExpr cenv.g arg2) + | [[_];[]], [arg1;arg2] when numObjArgs = 1 -> + assert isUnitTy cenv.g (tyOfExpr cenv.g arg2) GenExpr cenv cgbuf eenv SPSuppress arg1 Continue GenExpr cenv cgbuf eenv SPSuppress arg2 discard - | _ -> - (curriedArgInfos,args) ||> List.iter2 (fun argInfos x -> - GenUntupledArgExpr cenv cgbuf eenv m argInfos x Continue) + | _ -> + (curriedArgInfos, args) ||> List.iter2 (fun argInfos x -> + GenUntupledArgExpr cenv cgbuf eenv m argInfos x Continue) -/// Codegen arguments +/// Codegen arguments and GenUntupledArgExpr cenv cgbuf eenv m argInfos expr sequel = let numRequiredExprs = List.length argInfos assert (numRequiredExprs >= 1) @@ -2677,84 +2843,84 @@ and GenUntupledArgExpr cenv cgbuf eenv m argInfos expr sequel = GenExpr cenv cgbuf eenv SPSuppress expr sequel elif isRefTupleExpr expr then let es = tryDestRefTupleExpr expr - if es.Length <> numRequiredExprs then error(InternalError("GenUntupledArgExpr (2)",m)); - es |> List.iter (fun x -> GenExpr cenv cgbuf eenv SPSuppress x Continue); + if es.Length <> numRequiredExprs then error(InternalError("GenUntupledArgExpr (2)", m)) + es |> List.iter (fun x -> GenExpr cenv cgbuf eenv SPSuppress x Continue) GenSequel cenv eenv.cloc cgbuf sequel else let ty = tyOfExpr cenv.g expr - let locv,loce = mkCompGenLocal m "arg" ty + let locv, loce = mkCompGenLocal m "arg" ty let bind = mkCompGenBind locv expr LocalScope "untuple" cgbuf (fun scopeMarks -> let eenvinner = AllocStorageForBind cenv cgbuf scopeMarks eenv bind - GenBinding cenv cgbuf eenvinner bind; + GenBinding cenv cgbuf eenvinner bind let tys = destRefTupleTy cenv.g ty assert (tys.Length = numRequiredExprs) // TODO - tupInfoRef - argInfos |> List.iteri (fun i _ -> GenGetTupleField cenv cgbuf eenvinner (tupInfoRef (* TODO *),loce,tys,i,m) Continue); + argInfos |> List.iteri (fun i _ -> GenGetTupleField cenv cgbuf eenvinner (tupInfoRef (* TODO *), loce, tys, i, m) Continue) GenSequel cenv eenv.cloc cgbuf sequel ) //-------------------------------------------------------------------------- // Generate calls (try to detect direct calls) -//-------------------------------------------------------------------------- - -and GenApp cenv cgbuf eenv (f,fty,tyargs,args,m) sequel = - match (f,tyargs,args) with +//-------------------------------------------------------------------------- + +and GenApp cenv cgbuf eenv (f, fty, tyargs, args, m) sequel = + match (f, tyargs, args) with (* Look for tailcall to turn into branch *) - | (Expr.Val(v,_,_),_,_) when + | (Expr.Val(v, _, _), _, _) when match ListAssoc.tryFind cenv.g.valRefEq v eenv.innerVals with - | Some (kind,_) -> + | Some (kind, _) -> (not v.IsConstructor && (* when branch-calling methods we must have the right type parameters *) (match kind with | BranchCallClosure _ -> true - | BranchCallMethod (_,_,tps,_,_) -> + | BranchCallMethod (_, _, tps, _, _) -> (List.lengthsEqAndForall2 (fun ty tp -> typeEquiv cenv.g ty (mkTyparTy tp)) tyargs tps)) && (* must be exact #args, ignoring tupling - we untuple if needed below *) - (let arityInfo = + (let arityInfo = match kind with | BranchCallClosure arityInfo - | BranchCallMethod (arityInfo,_,_,_,_) -> arityInfo + | BranchCallMethod (arityInfo, _, _, _, _) -> arityInfo arityInfo.Length = args.Length ) && (* no tailcall out of exception handler, etc. *) (match sequelIgnoringEndScopesAndDiscard sequel with Return | ReturnVoid -> true | _ -> false)) | None -> false - -> - let (kind,mark) = ListAssoc.find cenv.g.valRefEq v eenv.innerVals // already checked above in when guard - let ntmargs = + -> + let (kind, mark) = ListAssoc.find cenv.g.valRefEq v eenv.innerVals // already checked above in when guard + let ntmargs = match kind with | BranchCallClosure arityInfo -> let ntmargs = List.foldBack (+) arityInfo 0 GenExprs cenv cgbuf eenv args ntmargs - | BranchCallMethod (arityInfo,curriedArgInfos,_,ntmargs,numObjArgs) -> + | BranchCallMethod (arityInfo, curriedArgInfos, _, ntmargs, numObjArgs) -> assert (curriedArgInfos.Length = arityInfo.Length ) assert (curriedArgInfos.Length = args.Length) //assert (curriedArgInfos.Length = ntmargs ) GenUntupledArgsDiscardingLoneUnit cenv cgbuf eenv m numObjArgs curriedArgInfos args if v.IsExtensionMember then match curriedArgInfos, args with - | [[]],[_] when numObjArgs = 0 -> (ntmargs-1) - | [[_];[]],[_;_] when numObjArgs = 1 -> (ntmargs-1) - | _ -> ntmargs + | [[]], [_] when numObjArgs = 0 -> (ntmargs-1) + | [[_];[]], [_;_] when numObjArgs = 1 -> (ntmargs-1) + | _ -> ntmargs else ntmargs - for i = ntmargs - 1 downto 0 do + for i = ntmargs - 1 downto 0 do CG.EmitInstrs cgbuf (pop 1) Push0 [ I_starg (uint16 (i+cgbuf.PreallocatedArgCount)) ] CG.EmitInstrs cgbuf (pop 0) Push0 [ I_br mark.CodeLabel ] GenSequelEndScopes cgbuf sequel - + // PhysicalEquality becomes cheap reference equality once // a nominal type is known. We can't replace it for variable types since // a "ceq" instruction can't be applied to variable type values. - | (Expr.Val(v,_,_),[ty],[arg1;arg2]) when - (valRefEq cenv.g v cenv.g.reference_equality_inner_vref) + | (Expr.Val(v, _, _), [ty], [arg1;arg2]) when + (valRefEq cenv.g v cenv.g.reference_equality_inner_vref) && isAppTy cenv.g ty -> - + GenExpr cenv cgbuf eenv SPSuppress arg1 Continue GenExpr cenv cgbuf eenv SPSuppress arg2 Continue CG.EmitInstr cgbuf (pop 2) (Push [cenv.g.ilg.typ_Bool]) AI_ceq @@ -2763,206 +2929,206 @@ and GenApp cenv cgbuf eenv (f,fty,tyargs,args,m) sequel = // Emit "methodhandleof" calls as ldtoken instructions // // The token for the "GenericMethodDefinition" is loaded - | Expr.Val(v,_,m),_,[arg] when valRefEq cenv.g v cenv.g.methodhandleof_vref -> - let (|OptionalCoerce|) = function Expr.Op(TOp.Coerce _,_,[arg],_) -> arg | x -> x - let (|OptionalTyapp|) = function Expr.App(f,_,[_],[],_) -> f | x -> x - match arg with - // Generate ldtoken instruction for "methodhandleof(fun (a,b,c) -> f(a,b,c))" + | Expr.Val(v, _, m), _, [arg] when valRefEq cenv.g v cenv.g.methodhandleof_vref -> + let (|OptionalCoerce|) = function Expr.Op(TOp.Coerce _, _, [arg], _) -> arg | x -> x + let (|OptionalTyapp|) = function Expr.App(f, _, [_], [], _) -> f | x -> x + match arg with + // Generate ldtoken instruction for "methodhandleof(fun (a, b, c) -> f(a, b, c))" // where f is an F# function value or F# method - | Expr.Lambda(_,_,_,_,Expr.App(OptionalCoerce(OptionalTyapp(Expr.Val(vref,_,_))),_,_,_,_),_,_) -> - + | Expr.Lambda(_, _, _, _, Expr.App(OptionalCoerce(OptionalTyapp(Expr.Val(vref, _, _))), _, _, _, _), _, _) -> + let storage = StorageForValRef m vref eenv - match storage with - | Method (_,_,mspec,_,_,_,_) -> + match storage with + | Method (_, _, mspec, _, _, _, _) -> CG.EmitInstr cgbuf (pop 0) (Push [cenv.g.iltyp_RuntimeMethodHandle]) (I_ldtoken (ILToken.ILMethod mspec)) - | _ -> - errorR(Error(FSComp.SR.ilxgenUnexpectedArgumentToMethodHandleOfDuringCodegen(), m)) - - // Generate ldtoken instruction for "methodhandleof(fun (a,b,c) -> obj.M(a,b,c))" + | _ -> + errorR(Error(FSComp.SR.ilxgenUnexpectedArgumentToMethodHandleOfDuringCodegen(), m)) + + // Generate ldtoken instruction for "methodhandleof(fun (a, b, c) -> obj.M(a, b, c))" // where M is an IL method. - | Expr.Lambda(_,_,_,_,Expr.Op(TOp.ILCall(_,_,valu,_,_,_,_,ilMethRef,actualTypeInst,actualMethInst,_),_,_,_),_,_) -> - + | Expr.Lambda(_, _, _, _, Expr.Op(TOp.ILCall(_, _, valu, _, _, _, _, ilMethRef, actualTypeInst, actualMethInst, _), _, _, _), _, _) -> + let boxity = (if valu then AsValue else AsObject) - let mkFormalParams gparams = gparams |> DropErasedTyargs |> List.mapi (fun n _gf -> mkILTyvarTy (uint16 n)) + let mkFormalParams gparams = gparams |> DropErasedTyargs |> List.mapi (fun n _gf -> mkILTyvarTy (uint16 n)) let ilGenericMethodSpec = IL.mkILMethSpec (ilMethRef, boxity, mkFormalParams actualTypeInst, mkFormalParams actualMethInst) let i = I_ldtoken (ILToken.ILMethod ilGenericMethodSpec) - CG.EmitInstr cgbuf (pop 0) (Push [cenv.g.iltyp_RuntimeMethodHandle]) i + CG.EmitInstr cgbuf (pop 0) (Push [cenv.g.iltyp_RuntimeMethodHandle]) i - | _ -> - System.Diagnostics.Debug.Assert(false,sprintf "Break for invalid methodhandleof argument expression") + | _ -> + System.Diagnostics.Debug.Assert(false, sprintf "Break for invalid methodhandleof argument expression") //System.Diagnostics.Debugger.Break() - errorR(Error(FSComp.SR.ilxgenUnexpectedArgumentToMethodHandleOfDuringCodegen(), m)) + errorR(Error(FSComp.SR.ilxgenUnexpectedArgumentToMethodHandleOfDuringCodegen(), m)) GenSequel cenv eenv.cloc cgbuf sequel - // Optimize calls to top methods when given "enough" arguments. - | Expr.Val(vref,valUseFlags,_),_,_ + // Optimize calls to top methods when given "enough" arguments. + | Expr.Val(vref, valUseFlags, _), _, _ when (let storage = StorageForValRef m vref eenv - match storage with - | Method (topValInfo,vref,_,_,_,_,_) -> - (let tps,argtys,_,_ = GetTopValTypeInFSharpForm cenv.g topValInfo vref.Type m - tps.Length = tyargs.Length && + match storage with + | Method (topValInfo, vref, _, _, _, _, _) -> + (let tps, argtys, _, _ = GetTopValTypeInFSharpForm cenv.g topValInfo vref.Type m + tps.Length = tyargs.Length && argtys.Length <= args.Length) | _ -> false) -> let storage = StorageForValRef m vref eenv - match storage with - | Method (topValInfo,vref,mspec,_,_,_,_) -> - let nowArgs,laterArgs = - let _,curriedArgInfos,_,_ = GetTopValTypeInFSharpForm cenv.g topValInfo vref.Type m + match storage with + | Method (topValInfo, vref, mspec, _, _, _, _) -> + let nowArgs, laterArgs = + let _, curriedArgInfos, _, _ = GetTopValTypeInFSharpForm cenv.g topValInfo vref.Type m List.splitAt curriedArgInfos.Length args - let actualRetTy = applyTys cenv.g vref.Type (tyargs,nowArgs) - let _,curriedArgInfos,returnTy,_ = GetTopValTypeInCompiledForm cenv.g topValInfo vref.Type m + let actualRetTy = applyTys cenv.g vref.Type (tyargs, nowArgs) + let _, curriedArgInfos, returnTy, _ = GetTopValTypeInCompiledForm cenv.g topValInfo vref.Type m let ilTyArgs = GenTypeArgs cenv.amap m eenv.tyenv tyargs - + - // For instance method calls chop off some type arguments, which are already - // carried by the class. Also work out if it's a virtual call. - let _,virtualCall,newobj,isSuperInit,isSelfInit,_,_,_ = GetMemberCallInfo cenv.g (vref,valUseFlags) in + // For instance method calls chop off some type arguments, which are already + // carried by the class. Also work out if it's a virtual call. + let _, virtualCall, newobj, isSuperInit, isSelfInit, _, _, _ = GetMemberCallInfo cenv.g (vref, valUseFlags) in // numEnclILTypeArgs will include unit-of-measure args, unfortunately. For now, just cut-and-paste code from GetMemberCallInfo - // @REVIEW: refactor this - let numEnclILTypeArgs = - match vref.MemberInfo with - | Some _ when not (vref.IsExtensionMember) -> - List.length(vref.MemberApparentEntity.TyparsNoRange |> DropErasedTypars) + // @REVIEW: refactor this + let numEnclILTypeArgs = + match vref.MemberInfo with + | Some _ when not (vref.IsExtensionMember) -> + List.length(vref.MemberApparentEntity.TyparsNoRange |> DropErasedTypars) | _ -> 0 - let (ilEnclArgTys,ilMethArgTys) = - if ilTyArgs.Length < numEnclILTypeArgs then error(InternalError("length mismatch",m)) + let (ilEnclArgTys, ilMethArgTys) = + if ilTyArgs.Length < numEnclILTypeArgs then error(InternalError("length mismatch", m)) List.splitAt numEnclILTypeArgs ilTyArgs let boxity = mspec.DeclaringType.Boxity - let mspec = mkILMethSpec (mspec.MethodRef, boxity,ilEnclArgTys,ilMethArgTys) - - // "Unit" return types on static methods become "void" + let mspec = mkILMethSpec (mspec.MethodRef, boxity, ilEnclArgTys, ilMethArgTys) + + // "Unit" return types on static methods become "void" let mustGenerateUnitAfterCall = Option.isNone returnTy - - let ccallInfo = + + let ccallInfo = match valUseFlags with - | PossibleConstrainedCall ty -> Some ty + | PossibleConstrainedCall ty -> Some ty | _ -> None - + let isBaseCall = match valUseFlags with VSlotDirectCall -> true | _ -> false - let isTailCall = - if isNil laterArgs && not isSelfInit then + let isTailCall = + if isNil laterArgs && not isSelfInit then let isDllImport = IsValRefIsDllImport cenv.g vref let hasByrefArg = mspec.FormalArgTypes |> List.exists (function ILType.Byref _ -> true | _ -> false) - let makesNoCriticalTailcalls = vref.MakesNoCriticalTailcalls - CanTailcall((boxity=AsValue), ccallInfo, eenv.withinSEH, hasByrefArg,mustGenerateUnitAfterCall, isDllImport, isSelfInit, makesNoCriticalTailcalls, sequel) - else + let makesNoCriticalTailcalls = vref.MakesNoCriticalTailcalls + CanTailcall((boxity=AsValue), ccallInfo, eenv.withinSEH, hasByrefArg, mustGenerateUnitAfterCall, isDllImport, isSelfInit, makesNoCriticalTailcalls, sequel) + else Normalcall - - let useICallVirt = virtualCall || useCallVirt cenv boxity mspec isBaseCall - let callInstr = + let useICallVirt = virtualCall || useCallVirt cenv boxity mspec isBaseCall + + let callInstr = match valUseFlags with - | PossibleConstrainedCall ty -> + | PossibleConstrainedCall ty -> let ilThisTy = GenType cenv.amap m eenv.tyenv ty - I_callconstraint ( isTailCall, ilThisTy,mspec,None) - | _ -> - if newobj then I_newobj (mspec, None) - elif useICallVirt then I_callvirt (isTailCall, mspec, None) + I_callconstraint ( isTailCall, ilThisTy, mspec, None) + | _ -> + if newobj then I_newobj (mspec, None) + elif useICallVirt then I_callvirt (isTailCall, mspec, None) else I_call (isTailCall, mspec, None) - // ok, now we're ready to generate - if isSuperInit || isSelfInit then - CG.EmitInstrs cgbuf (pop 0) (Push [mspec.DeclaringType ]) [ mkLdarg0 ] + // ok, now we're ready to generate + if isSuperInit || isSelfInit then + CG.EmitInstrs cgbuf (pop 0) (Push [mspec.DeclaringType ]) [ mkLdarg0 ] GenUntupledArgsDiscardingLoneUnit cenv cgbuf eenv m vref.NumObjArgs curriedArgInfos nowArgs // Generate laterArgs (for effects) and save LocalScope "callstack" cgbuf (fun scopeMarks -> - let whereSaved,eenv = - (eenv,laterArgs) ||> List.mapFold (fun eenv laterArg -> + let whereSaved, eenv = + (eenv, laterArgs) ||> List.mapFold (fun eenv laterArg -> // Only save arguments that have effects - if Optimizer.ExprHasEffect cenv.g laterArg then + if Optimizer.ExprHasEffect cenv.g laterArg then let ilTy = laterArg |> tyOfExpr cenv.g |> GenType cenv.amap m eenv.tyenv - let locName = ilxgenGlobalNng.FreshCompilerGeneratedName ("arg",m), ilTy, false + let locName = ilxgenGlobalNng.FreshCompilerGeneratedName ("arg", m), ilTy, false let loc, _realloc, eenv = AllocLocal cenv cgbuf eenv true locName scopeMarks GenExpr cenv cgbuf eenv SPSuppress laterArg Continue EmitSetLocal cgbuf loc - Choice1Of2 (ilTy,loc),eenv + Choice1Of2 (ilTy, loc), eenv else - Choice2Of2 laterArg, eenv) + Choice2Of2 laterArg, eenv) let nargs = mspec.FormalArgTypes.Length let pushes = if mustGenerateUnitAfterCall || isSuperInit || isSelfInit then Push0 else (Push [(GenType cenv.amap m eenv.tyenv actualRetTy)]) CG.EmitInstr cgbuf (pop (nargs + (if mspec.CallingConv.IsStatic || newobj then 0 else 1))) pushes callInstr - // For isSuperInit, load the 'this' pointer as the pretend 'result' of the operation. It will be popped again in most cases - if isSuperInit then CG.EmitInstrs cgbuf (pop 0) (Push [mspec.DeclaringType]) [ mkLdarg0 ] + // For isSuperInit, load the 'this' pointer as the pretend 'result' of the operation. It will be popped again in most cases + if isSuperInit then CG.EmitInstrs cgbuf (pop 0) (Push [mspec.DeclaringType]) [ mkLdarg0 ] // When generating debug code, generate a 'nop' after a 'call' that returns 'void' // This is what C# does, as it allows the call location to be maintained correctly in the stack frame - if cenv.opts.generateDebugSymbols && mustGenerateUnitAfterCall && (isTailCall = Normalcall) then - CG.EmitInstrs cgbuf (pop 0) Push0 [ AI_nop ] - - if isNil laterArgs then - assert isNil whereSaved - // Generate the "unit" value if necessary - CommitCallSequel cenv eenv m eenv.cloc cgbuf mustGenerateUnitAfterCall sequel - else + if cenv.opts.generateDebugSymbols && mustGenerateUnitAfterCall && (isTailCall = Normalcall) then + CG.EmitInstrs cgbuf (pop 0) Push0 [ AI_nop ] + + if isNil laterArgs then + assert isNil whereSaved + // Generate the "unit" value if necessary + CommitCallSequel cenv eenv m eenv.cloc cgbuf mustGenerateUnitAfterCall sequel + else //printfn "%d EXTRA ARGS IN TOP APP at %s" laterArgs.Length (stringOfRange m) - whereSaved |> List.iter (function - | Choice1Of2 (ilTy,loc) -> EmitGetLocal cgbuf ilTy loc + whereSaved |> List.iter (function + | Choice1Of2 (ilTy, loc) -> EmitGetLocal cgbuf ilTy loc | Choice2Of2 expr -> GenExpr cenv cgbuf eenv SPSuppress expr Continue) - GenIndirectCall cenv cgbuf eenv (actualRetTy,[],laterArgs,m) sequel) - + GenIndirectCall cenv cgbuf eenv (actualRetTy, [], laterArgs, m) sequel) + | _ -> failwith "??" - - // This case is for getting/calling a value, when we can't call it directly. - // However, we know the type instantiation for the value. - // In this case we can often generate a type-specific local expression for the value. - // This reduces the number of dynamic type applications. - | (Expr.Val(vref,_,_),_,_) -> - GenGetValRefAndSequel cenv cgbuf eenv m vref (Some (tyargs,args,m,sequel)) - + + // This case is for getting/calling a value, when we can't call it directly. + // However, we know the type instantiation for the value. + // In this case we can often generate a type-specific local expression for the value. + // This reduces the number of dynamic type applications. + | (Expr.Val(vref, _, _), _, _) -> + GenGetValRefAndSequel cenv cgbuf eenv m vref (Some (tyargs, args, m, sequel)) + | _ -> (* worst case: generate a first-class function value and call *) GenExpr cenv cgbuf eenv SPSuppress f Continue - GenArgsAndIndirectCall cenv cgbuf eenv (fty,tyargs,args,m) sequel - -and CanTailcall (hasStructObjArg, ccallInfo, withinSEH, hasByrefArg, mustGenerateUnitAfterCall, isDllImport, isSelfInit, makesNoCriticalTailcalls, sequel) = + GenArgsAndIndirectCall cenv cgbuf eenv (fty, tyargs, args, m) sequel + +and CanTailcall (hasStructObjArg, ccallInfo, withinSEH, hasByrefArg, mustGenerateUnitAfterCall, isDllImport, isSelfInit, makesNoCriticalTailcalls, sequel) = // Can't tailcall with a struct object arg since it involves a byref // Can't tailcall with a .NET 2.0 generic constrained call since it involves a byref - if not hasStructObjArg && Option.isNone ccallInfo && not withinSEH && not hasByrefArg && + if not hasStructObjArg && Option.isNone ccallInfo && not withinSEH && not hasByrefArg && not isDllImport && not isSelfInit && not makesNoCriticalTailcalls && - // We can tailcall even if we need to generate "unit", as long as we're about to throw the value away anyway as par of the return. - // We can tailcall if we don't need to generate "unit", as long as we're about to return. - (match sequelIgnoreEndScopes sequel with - | ReturnVoid | Return -> not mustGenerateUnitAfterCall - | DiscardThen ReturnVoid -> mustGenerateUnitAfterCall - | _ -> false) - then Tailcall + // We can tailcall even if we need to generate "unit", as long as we're about to throw the value away anyway as par of the return. + // We can tailcall if we don't need to generate "unit", as long as we're about to return. + (match sequelIgnoreEndScopes sequel with + | ReturnVoid | Return -> not mustGenerateUnitAfterCall + | DiscardThen ReturnVoid -> mustGenerateUnitAfterCall + | _ -> false) + then Tailcall else Normalcall - -and GenNamedLocalTyFuncCall cenv (cgbuf: CodeGenBuffer) eenv ty cloinfo tyargs m = - let ilContractClassTyargs = - cloinfo.localTypeFuncContractFreeTypars - |> List.map mkTyparTy +and GenNamedLocalTyFuncCall cenv (cgbuf: CodeGenBuffer) eenv ty cloinfo tyargs m = + + let ilContractClassTyargs = + cloinfo.localTypeFuncContractFreeTypars + |> List.map mkTyparTy |> GenTypeArgs cenv.amap m eenv.tyenv let ilTyArgs = tyargs |> GenTypeArgs cenv.amap m eenv.tyenv - let _,(ilContractMethTyargs: ILGenericParameterDefs),(ilContractCloTySpec:ILTypeSpec),ilContractFormalRetTy = + let _, (ilContractMethTyargs: ILGenericParameterDefs), (ilContractCloTySpec: ILTypeSpec), ilContractFormalRetTy = GenNamedLocalTypeFuncContractInfo cenv eenv m cloinfo let ilContractTy = mkILBoxedTy ilContractCloTySpec.TypeRef ilContractClassTyargs - - if not (ilContractMethTyargs.Length = ilTyArgs.Length) then errorR(Error(FSComp.SR.ilIncorrectNumberOfTypeArguments(),m)) + + if not (ilContractMethTyargs.Length = ilTyArgs.Length) then errorR(Error(FSComp.SR.ilIncorrectNumberOfTypeArguments(), m)) // Local TyFunc are represented as a $contract type. they currently get stored in a value of type object // Recover result (value or reference types) via unbox_any. - CG.EmitInstrs cgbuf (pop 1) (Push [ilContractTy]) [I_unbox_any ilContractTy] - let actualRetTy = applyTys cenv.g ty (tyargs,[]) + CG.EmitInstrs cgbuf (pop 1) (Push [ilContractTy]) [I_unbox_any ilContractTy] + let actualRetTy = applyTys cenv.g ty (tyargs, []) let ilDirectInvokeMethSpec = mkILInstanceMethSpecInTy(ilContractTy, "DirectInvoke", [], ilContractFormalRetTy, ilTyArgs) let ilActualRetTy = GenType cenv.amap m eenv.tyenv actualRetTy @@ -2970,56 +3136,56 @@ and GenNamedLocalTyFuncCall cenv (cgbuf: CodeGenBuffer) eenv ty cloinfo tyargs m CG.EmitInstr cgbuf (pop 1) (Push [ilActualRetTy]) (mkNormalCallvirt ilDirectInvokeMethSpec) actualRetTy - + /// Generate an indirect call, converting to an ILX callfunc instruction -and GenArgsAndIndirectCall cenv cgbuf eenv (functy,tyargs,args,m) sequel = +and GenArgsAndIndirectCall cenv cgbuf eenv (functy, tyargs, args, m) sequel = // Generate the arguments to the indirect call GenExprs cenv cgbuf eenv args - GenIndirectCall cenv cgbuf eenv (functy,tyargs,args,m) sequel + GenIndirectCall cenv cgbuf eenv (functy, tyargs, args, m) sequel /// Generate an indirect call, converting to an ILX callfunc instruction -and GenIndirectCall cenv cgbuf eenv (functy,tyargs,args,m) sequel = - - // Fold in the new types into the environment as we generate the formal types. - let ilxClosureApps = +and GenIndirectCall cenv cgbuf eenv (functy, tyargs, args, m) sequel = + + // Fold in the new types into the environment as we generate the formal types. + let ilxClosureApps = // keep only non-erased type arguments when computing indirect call - let tyargs = DropErasedTyargs tyargs + let tyargs = DropErasedTyargs tyargs let typars, formalFuncTy = tryDestForallTy cenv.g functy let feenv = eenv.tyenv.Add typars // This does two phases: REVIEW: the code is too complex for what it's achieving and should be rewritten - let formalRetTy,appBuilder = - List.fold - (fun (formalFuncTy,sofar) _ -> - let dty,rty = destFunTy cenv.g formalFuncTy - (rty,(fun acc -> sofar (Apps_app(GenType cenv.amap m feenv dty,acc))))) - (formalFuncTy,id) + let formalRetTy, appBuilder = + List.fold + (fun (formalFuncTy, sofar) _ -> + let dty, rty = destFunTy cenv.g formalFuncTy + (rty, (fun acc -> sofar (Apps_app(GenType cenv.amap m feenv dty, acc))))) + (formalFuncTy, id) args let ilxRetApps = Apps_done (GenType cenv.amap m feenv formalRetTy) - List.foldBack (fun tyarg acc -> Apps_tyapp(GenType cenv.amap m eenv.tyenv tyarg,acc)) tyargs (appBuilder ilxRetApps) + List.foldBack (fun tyarg acc -> Apps_tyapp(GenType cenv.amap m eenv.tyenv tyarg, acc)) tyargs (appBuilder ilxRetApps) let actualRetTy = applyTys cenv.g functy (tyargs, args) let ilActualRetTy = GenType cenv.amap m eenv.tyenv actualRetTy // Check if any byrefs are involved to make sure we don't tailcall - let hasByrefArg = - let rec check x = - match x with - | Apps_tyapp(_,apps) -> check apps - | Apps_app(arg,apps) -> IsILTypeByref arg || check apps + let hasByrefArg = + let rec check x = + match x with + | Apps_tyapp(_, apps) -> check apps + | Apps_app(arg, apps) -> IsILTypeByref arg || check apps | _ -> false check ilxClosureApps - - let isTailCall = CanTailcall(false,None,eenv.withinSEH,hasByrefArg,false,false,false,false,sequel) + + let isTailCall = CanTailcall(false, None, eenv.withinSEH, hasByrefArg, false, false, false, false, sequel) CountCallFuncInstructions() // Generate the code code an ILX callfunc operation - let instrs = EraseClosures.mkCallFunc cenv.g.ilxPubCloEnv (fun ty -> cgbuf.AllocLocal([], ty,false) |> uint16) eenv.tyenv.Count isTailCall ilxClosureApps + let instrs = EraseClosures.mkCallFunc cenv.g.ilxPubCloEnv (fun ty -> cgbuf.AllocLocal([], ty, false) |> uint16) eenv.tyenv.Count isTailCall ilxClosureApps CG.EmitInstrs cgbuf (pop (1+args.Length)) (Push [ilActualRetTy]) instrs // Done compiling indirect call... @@ -3027,71 +3193,71 @@ and GenIndirectCall cenv cgbuf eenv (functy,tyargs,args,m) sequel = //-------------------------------------------------------------------------- // Generate try expressions -//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- -and GenTry cenv cgbuf eenv scopeMarks (e1,m,resty,spTry) = - let sp = - match spTry with +and GenTry cenv cgbuf eenv scopeMarks (e1, m, resty, spTry) = + let sp = + match spTry with | SequencePointAtTry m -> CG.EmitSeqPoint cgbuf m; SPAlways | SequencePointInBodyOfTry -> SPAlways | NoSequencePointAtTry -> SPSuppress - - let stack,eenvinner = EmitSaveStack cenv cgbuf eenv m scopeMarks + + let stack, eenvinner = EmitSaveStack cenv cgbuf eenv m scopeMarks let startTryMark = CG.GenerateMark cgbuf "startTryMark" let endTryMark = CG.GenerateDelayMark cgbuf "endTryMark" let afterHandler = CG.GenerateDelayMark cgbuf "afterHandler" let eenvinner = {eenvinner with withinSEH = true} let ilResultTy = GenType cenv.amap m eenvinner.tyenv resty - let whereToSave, _realloc, eenvinner = - AllocLocal cenv cgbuf eenvinner true (ilxgenGlobalNng.FreshCompilerGeneratedName ("tryres",m),ilResultTy, false) (startTryMark,endTryMark) + let whereToSave, _realloc, eenvinner = + AllocLocal cenv cgbuf eenvinner true (ilxgenGlobalNng.FreshCompilerGeneratedName ("tryres", m), ilResultTy, false) (startTryMark, endTryMark) // Generate the body of the try. In the normal case (SequencePointAtTry) we generate a sequence point // both on the 'try' keyword and on the start of the expression in the 'try'. For inlined code and - // compiler generated 'try' blocks (i.e. NoSequencePointAtTry, used for the try/finally implicit + // compiler generated 'try' blocks (i.e. NoSequencePointAtTry, used for the try/finally implicit // in a 'use' or 'foreach'), we suppress the sequence point - GenExpr cenv cgbuf eenvinner sp e1 (LeaveHandler (false, whereToSave,afterHandler)) + GenExpr cenv cgbuf eenvinner sp e1 (LeaveHandler (false, whereToSave, afterHandler)) CG.SetMarkToHere cgbuf endTryMark let tryMarks = (startTryMark.CodeLabel, endTryMark.CodeLabel) - whereToSave,eenvinner,stack,tryMarks,afterHandler,ilResultTy + whereToSave, eenvinner, stack, tryMarks, afterHandler, ilResultTy -and GenTryCatch cenv cgbuf eenv (e1,vf:Val,ef,vh:Val,eh,m,resty,spTry,spWith) sequel = - // Save the stack - gross because IL flushes the stack at the exn. handler - // note: eenvinner notes spill vars are live - LocalScope "trystack" cgbuf (fun scopeMarks -> - let whereToSave,eenvinner,stack,tryMarks,afterHandler,ilResultTy = GenTry cenv cgbuf eenv scopeMarks (e1,m,resty,spTry) +and GenTryCatch cenv cgbuf eenv (e1, vf: Val, ef, vh: Val, eh, m, resty, spTry, spWith) sequel = + // Save the stack - gross because IL flushes the stack at the exn. handler + // note: eenvinner notes spill vars are live + LocalScope "trystack" cgbuf (fun scopeMarks -> + let whereToSave, eenvinner, stack, tryMarks, afterHandler, ilResultTy = GenTry cenv cgbuf eenv scopeMarks (e1, m, resty, spTry) - // Now the filter and catch blocks + // Now the filter and catch blocks - let seh = - if cenv.opts.generateFilterBlocks then - let startOfFilter = CG.GenerateMark cgbuf "startOfFilter" + let seh = + if cenv.opts.generateFilterBlocks then + let startOfFilter = CG.GenerateMark cgbuf "startOfFilter" let afterFilter = CG.GenerateDelayMark cgbuf "afterFilter" - let (sequelOnBranches,afterJoin,stackAfterJoin,sequelAfterJoin) = GenJoinPoint cenv cgbuf "filter" eenv cenv.g.int_ty m EndFilter + let (sequelOnBranches, afterJoin, stackAfterJoin, sequelAfterJoin) = GenJoinPoint cenv cgbuf "filter" eenv cenv.g.int_ty m EndFilter begin // We emit the sequence point for the 'with' keyword span on the start of the filter // block. However the targets of the filter block pattern matching should not get any // sequence points (they will be 'true'/'false' values indicating if the exception has been // caught or not). // - // The targets of the handler block DO get sequence points. Thus the expected behaviour + // The targets of the handler block DO get sequence points. Thus the expected behaviour // for a try/with with a complex pattern is that we hit the "with" before the filter is run // and then jump to the handler for the successful catch (or continue with exception handling // if the filter fails) - match spWith with + match spWith with | SequencePointAtWith m -> CG.EmitSeqPoint cgbuf m - | NoSequencePointAtWith -> () + | NoSequencePointAtWith -> () CG.SetStack cgbuf [cenv.g.ilg.typ_Object] - let _,eenvinner = AllocLocalVal cenv cgbuf vf eenvinner None (startOfFilter,afterFilter) + let _, eenvinner = AllocLocalVal cenv cgbuf vf eenvinner None (startOfFilter, afterFilter) CG.EmitInstr cgbuf (pop 1) (Push [cenv.g.iltyp_Exception]) (I_castclass cenv.g.iltyp_Exception) GenStoreVal cgbuf eenvinner vf.Range vf // Why SPSuppress? Because we do not emit a sequence point at the start of the List.filter - we've already put one on // the 'with' keyword above - GenExpr cenv cgbuf eenvinner SPSuppress ef sequelOnBranches + GenExpr cenv cgbuf eenvinner SPSuppress ef sequelOnBranches CG.SetMarkToHere cgbuf afterJoin CG.SetStack cgbuf stackAfterJoin GenSequel cenv eenv.cloc cgbuf sequelAfterJoin @@ -3100,32 +3266,32 @@ and GenTryCatch cenv cgbuf eenv (e1,vf:Val,ef,vh:Val,eh,m,resty,spTry,spWith) se let filterMarks = (startOfFilter.CodeLabel, endOfFilter.CodeLabel) CG.SetMarkToHere cgbuf afterFilter - let startOfHandler = CG.GenerateMark cgbuf "startOfHandler" + let startOfHandler = CG.GenerateMark cgbuf "startOfHandler" begin CG.SetStack cgbuf [cenv.g.ilg.typ_Object] - let _,eenvinner = AllocLocalVal cenv cgbuf vh eenvinner None (startOfHandler,afterHandler) + let _, eenvinner = AllocLocalVal cenv cgbuf vh eenvinner None (startOfHandler, afterHandler) CG.EmitInstr cgbuf (pop 1) (Push [cenv.g.iltyp_Exception]) (I_castclass cenv.g.iltyp_Exception) GenStoreVal cgbuf eenvinner vh.Range vh - GenExpr cenv cgbuf eenvinner SPAlways eh (LeaveHandler (false, whereToSave,afterHandler)) + GenExpr cenv cgbuf eenvinner SPAlways eh (LeaveHandler (false, whereToSave, afterHandler)) end let endOfHandler = CG.GenerateMark cgbuf "endOfHandler" let handlerMarks = (startOfHandler.CodeLabel, endOfHandler.CodeLabel) ILExceptionClause.FilterCatch(filterMarks, handlerMarks) - else - let startOfHandler = CG.GenerateMark cgbuf "startOfHandler" + else + let startOfHandler = CG.GenerateMark cgbuf "startOfHandler" begin - match spWith with + match spWith with | SequencePointAtWith m -> CG.EmitSeqPoint cgbuf m - | NoSequencePointAtWith -> () + | NoSequencePointAtWith -> () CG.SetStack cgbuf [cenv.g.ilg.typ_Object] - let _,eenvinner = AllocLocalVal cenv cgbuf vh eenvinner None (startOfHandler,afterHandler) + let _, eenvinner = AllocLocalVal cenv cgbuf vh eenvinner None (startOfHandler, afterHandler) CG.EmitInstr cgbuf (pop 1) (Push [cenv.g.iltyp_Exception]) (I_castclass cenv.g.iltyp_Exception) GenStoreVal cgbuf eenvinner m vh - GenExpr cenv cgbuf eenvinner SPAlways eh (LeaveHandler (false, whereToSave,afterHandler)) + GenExpr cenv cgbuf eenvinner SPAlways eh (LeaveHandler (false, whereToSave, afterHandler)) end let endOfHandler = CG.GenerateMark cgbuf "endOfHandler" let handlerMarks = (startOfHandler.CodeLabel, endOfHandler.CodeLabel) @@ -3133,7 +3299,7 @@ and GenTryCatch cenv cgbuf eenv (e1,vf:Val,ef,vh:Val,eh,m,resty,spTry,spWith) se cgbuf.EmitExceptionClause { Clause = seh - Range= tryMarks } + Range= tryMarks } CG.SetMarkToHere cgbuf afterHandler CG.SetStack cgbuf [] @@ -3145,47 +3311,47 @@ and GenTryCatch cenv cgbuf eenv (e1,vf:Val,ef,vh:Val,eh,m,resty,spTry,spWith) se EmitGetLocal cgbuf ilResultTy whereToSave GenSequel cenv eenv.cloc cgbuf sequel - ) + ) -and GenTryFinally cenv cgbuf eenv (bodyExpr,handlerExpr,m,resty,spTry,spFinally) sequel = - // Save the stack - needed because IL flushes the stack at the exn. handler - // note: eenvinner notes spill vars are live - LocalScope "trystack" cgbuf (fun scopeMarks -> +and GenTryFinally cenv cgbuf eenv (bodyExpr, handlerExpr, m, resty, spTry, spFinally) sequel = + // Save the stack - needed because IL flushes the stack at the exn. handler + // note: eenvinner notes spill vars are live + LocalScope "trystack" cgbuf (fun scopeMarks -> - let whereToSave,eenvinner,stack,tryMarks,afterHandler,ilResultTy = GenTry cenv cgbuf eenv scopeMarks (bodyExpr,m,resty,spTry) + let whereToSave, eenvinner, stack, tryMarks, afterHandler, ilResultTy = GenTry cenv cgbuf eenv scopeMarks (bodyExpr, m, resty, spTry) - // Now the catch/finally block - let startOfHandler = CG.GenerateMark cgbuf "startOfHandler" + // Now the catch/finally block + let startOfHandler = CG.GenerateMark cgbuf "startOfHandler" CG.SetStack cgbuf [] - - let sp = - match spFinally with + + let sp = + match spFinally with | SequencePointAtFinally m -> CG.EmitSeqPoint cgbuf m; SPAlways | NoSequencePointAtFinally -> SPSuppress - GenExpr cenv cgbuf eenvinner sp handlerExpr (LeaveHandler (true, whereToSave,afterHandler)) + GenExpr cenv cgbuf eenvinner sp handlerExpr (LeaveHandler (true, whereToSave, afterHandler)) let endOfHandler = CG.GenerateMark cgbuf "endOfHandler" let handlerMarks = (startOfHandler.CodeLabel, endOfHandler.CodeLabel) cgbuf.EmitExceptionClause { Clause = ILExceptionClause.Finally(handlerMarks) - Range = tryMarks } + Range = tryMarks } CG.SetMarkToHere cgbuf afterHandler CG.SetStack cgbuf [] - // Restore the stack and load the result + // Restore the stack and load the result cgbuf.EmitStartOfHiddenCode() - EmitRestoreStack cgbuf stack + EmitRestoreStack cgbuf stack EmitGetLocal cgbuf ilResultTy whereToSave GenSequel cenv eenv.cloc cgbuf sequel - ) + ) //-------------------------------------------------------------------------- // Generate for-loop -//-------------------------------------------------------------------------- - -and GenForLoop cenv cgbuf eenv (spFor,v,e1,dir,e2,loopBody,m) sequel = +//-------------------------------------------------------------------------- + +and GenForLoop cenv cgbuf eenv (spFor, v, e1, dir, e2, loopBody, m) sequel = // The JIT/NGen eliminate array-bounds checks for C# loops of form: // for(int i=0; i < (#ldlen arr#); i++) { ... arr[i] ... } // Here @@ -3193,40 +3359,40 @@ and GenForLoop cenv cgbuf eenv (spFor,v,e1,dir,e2,loopBody,m) sequel = // dir = BI_ble indicates a normal F# for loop that evaluates its argument only once // // It is also important that we follow C# IL-layout exactly "prefix, jmp test, body, test, finish" for JIT/NGEN. - let start = CG.GenerateMark cgbuf "for_start" + let start = CG.GenerateMark cgbuf "for_start" let finish = CG.GenerateDelayMark cgbuf "for_finish" let inner = CG.GenerateDelayMark cgbuf "for_inner" let test = CG.GenerateDelayMark cgbuf "for_test" - let stack,eenvinner = EmitSaveStack cenv cgbuf eenv m (start,finish) + let stack, eenvinner = EmitSaveStack cenv cgbuf eenv m (start, finish) let isUp = (match dir with | FSharpForLoopUp | CSharpForLoopUp -> true | FSharpForLoopDown -> false) - let isFSharpStyle = (match dir with FSharpForLoopUp | FSharpForLoopDown -> true | CSharpForLoopUp -> false) - - let finishIdx,eenvinner = - if isFSharpStyle then - let v, _realloc, eenvinner = AllocLocal cenv cgbuf eenvinner true (ilxgenGlobalNng.FreshCompilerGeneratedName ("endLoop",m), cenv.g.ilg.typ_Int32, false) (start,finish) + let isFSharpStyle = (match dir with FSharpForLoopUp | FSharpForLoopDown -> true | CSharpForLoopUp -> false) + + let finishIdx, eenvinner = + if isFSharpStyle then + let v, _realloc, eenvinner = AllocLocal cenv cgbuf eenvinner true (ilxgenGlobalNng.FreshCompilerGeneratedName ("endLoop", m), cenv.g.ilg.typ_Int32, false) (start, finish) v, eenvinner else - -1,eenvinner + -1, eenvinner - let _, eenvinner = AllocLocalVal cenv cgbuf v eenvinner None (start,finish) (* note: eenvStack noted stack spill vars are live *) - match spFor with - | SequencePointAtForLoop(spStart) -> CG.EmitSeqPoint cgbuf spStart + let _, eenvinner = AllocLocalVal cenv cgbuf v eenvinner None (start, finish) (* note: eenvStack noted stack spill vars are live *) + match spFor with + | SequencePointAtForLoop(spStart) -> CG.EmitSeqPoint cgbuf spStart | NoSequencePointAtForLoop -> () GenExpr cenv cgbuf eenv SPSuppress e1 Continue GenStoreVal cgbuf eenvinner m v - if isFSharpStyle then + if isFSharpStyle then GenExpr cenv cgbuf eenvinner SPSuppress e2 Continue EmitSetLocal cgbuf finishIdx EmitGetLocal cgbuf cenv.g.ilg.typ_Int32 finishIdx - GenGetLocalVal cenv cgbuf eenvinner e2.Range v None - CG.EmitInstr cgbuf (pop 2) Push0 (I_brcmp ((if isUp then BI_blt else BI_bgt),finish.CodeLabel)) - + GenGetLocalVal cenv cgbuf eenvinner e2.Range v None + CG.EmitInstr cgbuf (pop 2) Push0 (I_brcmp ((if isUp then BI_blt else BI_bgt), finish.CodeLabel)) + else CG.EmitInstr cgbuf (pop 0) Push0 (I_br test.CodeLabel) - // .inner + // .inner CG.SetMarkToHere cgbuf inner // GenExpr cenv cgbuf eenvinner SPAlways loopBody discard @@ -3237,73 +3403,73 @@ and GenForLoop cenv cgbuf eenv (spFor,v,e1,dir,e2,loopBody,m) sequel = CG.EmitInstr cgbuf (pop 1) Push0 (if isUp then AI_add else AI_sub) GenStoreVal cgbuf eenvinner m v - // .text + // .text CG.SetMarkToHere cgbuf test // FSharpForLoopUp: if v <> e2 + 1 then goto .inner // FSharpForLoopDown: if v <> e2 - 1 then goto .inner // CSharpStyle: if v < e2 then goto .inner - match spFor with - | SequencePointAtForLoop(spStart) -> CG.EmitSeqPoint cgbuf spStart - | NoSequencePointAtForLoop -> () //CG.EmitSeqPoint cgbuf e2.Range - + match spFor with + | SequencePointAtForLoop(spStart) -> CG.EmitSeqPoint cgbuf spStart + | NoSequencePointAtForLoop -> () //CG.EmitSeqPoint cgbuf e2.Range + GenGetLocalVal cenv cgbuf eenvinner e2.Range v None let cmp = match dir with FSharpForLoopUp | FSharpForLoopDown -> BI_bne_un | CSharpForLoopUp -> BI_blt - let e2Sequel = (CmpThenBrOrContinue (pop 2, [ I_brcmp(cmp,inner.CodeLabel) ])) + let e2Sequel = (CmpThenBrOrContinue (pop 2, [ I_brcmp(cmp, inner.CodeLabel) ])) - if isFSharpStyle then - EmitGetLocal cgbuf cenv.g.ilg.typ_Int32 finishIdx + if isFSharpStyle then + EmitGetLocal cgbuf cenv.g.ilg.typ_Int32 finishIdx CG.EmitInstr cgbuf (pop 0) (Push [cenv.g.ilg.typ_Int32]) (mkLdcInt32 1) CG.EmitInstr cgbuf (pop 1) Push0 (if isUp then AI_add else AI_sub) GenSequel cenv eenv.cloc cgbuf e2Sequel else GenExpr cenv cgbuf eenv SPSuppress e2 e2Sequel - // .finish - loop-exit here + // .finish - loop-exit here CG.SetMarkToHere cgbuf finish - // Restore the stack and load the result + // Restore the stack and load the result EmitRestoreStack cgbuf stack GenUnitThenSequel cenv eenv m eenv.cloc cgbuf sequel //-------------------------------------------------------------------------- -// Generate while-loop -//-------------------------------------------------------------------------- - -and GenWhileLoop cenv cgbuf eenv (spWhile,e1,e2,m) sequel = - let finish = CG.GenerateDelayMark cgbuf "while_finish" +// Generate while-loop +//-------------------------------------------------------------------------- + +and GenWhileLoop cenv cgbuf eenv (spWhile, e1, e2, m) sequel = + let finish = CG.GenerateDelayMark cgbuf "while_finish" let startTest = CG.GenerateMark cgbuf "startTest" - - match spWhile with - | SequencePointAtWhileLoop(spStart) -> CG.EmitSeqPoint cgbuf spStart + + match spWhile with + | SequencePointAtWhileLoop(spStart) -> CG.EmitSeqPoint cgbuf spStart | NoSequencePointAtWhileLoop -> () - // SEQUENCE POINTS: Emit a sequence point to cover all of 'while e do' - GenExpr cenv cgbuf eenv SPSuppress e1 (CmpThenBrOrContinue (pop 1, [ I_brcmp(BI_brfalse,finish.CodeLabel) ])) - + // SEQUENCE POINTS: Emit a sequence point to cover all of 'while e do' + GenExpr cenv cgbuf eenv SPSuppress e1 (CmpThenBrOrContinue (pop 1, [ I_brcmp(BI_brfalse, finish.CodeLabel) ])) + GenExpr cenv cgbuf eenv SPAlways e2 (DiscardThen (Br startTest)) - CG.SetMarkToHere cgbuf finish + CG.SetMarkToHere cgbuf finish - // SEQUENCE POINTS: Emit a sequence point to cover 'done' if present + // SEQUENCE POINTS: Emit a sequence point to cover 'done' if present GenUnitThenSequel cenv eenv m eenv.cloc cgbuf sequel //-------------------------------------------------------------------------- // Generate seq -//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- -and GenSequential cenv cgbuf eenv spIn (e1,e2,specialSeqFlag,spSeq,_m) sequel = - - // Compiler generated sequential executions result in suppressions of sequence points on both +and GenSequential cenv cgbuf eenv spIn (e1, e2, specialSeqFlag, spSeq, _m) sequel = + + // Compiler generated sequential executions result in suppressions of sequence points on both // left and right of the sequence - let spAction,spExpr = - (match spSeq with - | SequencePointsAtSeq -> SPAlways,SPAlways - | SuppressSequencePointOnExprOfSequential -> SPSuppress,spIn - | SuppressSequencePointOnStmtOfSequential -> spIn,SPSuppress) - match specialSeqFlag with - | NormalSeq -> - GenExpr cenv cgbuf eenv spAction e1 discard + let spAction, spExpr = + (match spSeq with + | SequencePointsAtSeq -> SPAlways, SPAlways + | SuppressSequencePointOnExprOfSequential -> SPSuppress, spIn + | SuppressSequencePointOnStmtOfSequential -> spIn, SPSuppress) + match specialSeqFlag with + | NormalSeq -> + GenExpr cenv cgbuf eenv spAction e1 discard GenExpr cenv cgbuf eenv spExpr e2 sequel | ThenDoSeq -> GenExpr cenv cgbuf eenv spExpr e1 Continue @@ -3313,205 +3479,205 @@ and GenSequential cenv cgbuf eenv spIn (e1,e2,specialSeqFlag,spSeq,_m) sequel = //-------------------------------------------------------------------------- // Generate IL assembly code. // Polymorphic IL/ILX instructions may be instantiated when polymorphic code is inlined. -// We must implement this for the few uses of polymorphic instructions -// in the standard libarary. -//-------------------------------------------------------------------------- +// We must implement this for the few uses of polymorphic instructions +// in the standard libarary. +//-------------------------------------------------------------------------- -and GenAsmCode cenv cgbuf eenv (il,tyargs,args,returnTys,m) sequel = +and GenAsmCode cenv cgbuf eenv (il, tyargs, args, returnTys, m) sequel = let ilTyArgs = GenTypesPermitVoid cenv.amap m eenv.tyenv tyargs - let ilReturnTys = GenTypesPermitVoid cenv.amap m eenv.tyenv returnTys - let ilAfterInst = + let ilReturnTys = GenTypesPermitVoid cenv.amap m eenv.tyenv returnTys + let ilAfterInst = il |> List.filter (function AI_nop -> false | _ -> true) - |> List.map (fun i -> - let err s = - errorR(InternalError(sprintf "%s: bad instruction: %A" s i,m)) + |> List.map (fun i -> + let err s = + errorR(InternalError(sprintf "%s: bad instruction: %A" s i, m)) - let modFieldSpec fspec = - if isNil ilTyArgs then - fspec + let modFieldSpec fspec = + if isNil ilTyArgs then + fspec else - {fspec with DeclaringType= + {fspec with DeclaringType= let ty = fspec.DeclaringType let tspec = ty.TypeSpec - mkILTy ty.Boxity (mkILTySpec(tspec.TypeRef, ilTyArgs)) } - match i,ilTyArgs with - | I_unbox_any (ILType.TypeVar _) ,[tyarg] -> I_unbox_any (tyarg) - | I_box (ILType.TypeVar _) ,[tyarg] -> I_box (tyarg) - | I_isinst (ILType.TypeVar _) ,[tyarg] -> I_isinst (tyarg) - | I_castclass (ILType.TypeVar _) ,[tyarg] -> I_castclass (tyarg) - | I_newarr (shape,ILType.TypeVar _) ,[tyarg] -> I_newarr (shape,tyarg) - | I_ldelem_any (shape,ILType.TypeVar _) ,[tyarg] -> I_ldelem_any (shape,tyarg) - | I_ldelema (ro,_,shape,ILType.TypeVar _) ,[tyarg] -> I_ldelema (ro,false,shape,tyarg) - | I_stelem_any (shape,ILType.TypeVar _) ,[tyarg] -> I_stelem_any (shape,tyarg) - | I_ldobj (a,b,ILType.TypeVar _) ,[tyarg] -> I_ldobj (a,b,tyarg) - | I_stobj (a,b,ILType.TypeVar _) ,[tyarg] -> I_stobj (a,b,tyarg) - | I_ldtoken (ILToken.ILType (ILType.TypeVar _)),[tyarg] -> I_ldtoken (ILToken.ILType (tyarg)) - | I_sizeof (ILType.TypeVar _) ,[tyarg] -> I_sizeof (tyarg) + mkILTy ty.Boxity (mkILTySpec(tspec.TypeRef, ilTyArgs)) } + match i, ilTyArgs with + | I_unbox_any (ILType.TypeVar _), [tyarg] -> I_unbox_any (tyarg) + | I_box (ILType.TypeVar _), [tyarg] -> I_box (tyarg) + | I_isinst (ILType.TypeVar _), [tyarg] -> I_isinst (tyarg) + | I_castclass (ILType.TypeVar _), [tyarg] -> I_castclass (tyarg) + | I_newarr (shape, ILType.TypeVar _), [tyarg] -> I_newarr (shape, tyarg) + | I_ldelem_any (shape, ILType.TypeVar _), [tyarg] -> I_ldelem_any (shape, tyarg) + | I_ldelema (ro, _, shape, ILType.TypeVar _), [tyarg] -> I_ldelema (ro, false, shape, tyarg) + | I_stelem_any (shape, ILType.TypeVar _), [tyarg] -> I_stelem_any (shape, tyarg) + | I_ldobj (a, b, ILType.TypeVar _), [tyarg] -> I_ldobj (a, b, tyarg) + | I_stobj (a, b, ILType.TypeVar _), [tyarg] -> I_stobj (a, b, tyarg) + | I_ldtoken (ILToken.ILType (ILType.TypeVar _)), [tyarg] -> I_ldtoken (ILToken.ILType (tyarg)) + | I_sizeof (ILType.TypeVar _), [tyarg] -> I_sizeof (tyarg) // currently unused, added for forward compat, see https://visualfsharp.codeplex.com/SourceControl/network/forks/jackpappas/fsharpcontrib/contribution/7134 - | I_cpobj (ILType.TypeVar _) ,[tyarg] -> I_cpobj (tyarg) - | I_initobj (ILType.TypeVar _) ,[tyarg] -> I_initobj (tyarg) - | I_ldfld (al,vol,fspec) ,_ -> I_ldfld (al,vol,modFieldSpec fspec) - | I_ldflda (fspec) ,_ -> I_ldflda (modFieldSpec fspec) - | I_stfld (al,vol,fspec) ,_ -> I_stfld (al,vol,modFieldSpec fspec) - | I_stsfld (vol,fspec) ,_ -> I_stsfld (vol,modFieldSpec fspec) - | I_ldsfld (vol,fspec) ,_ -> I_ldsfld (vol,modFieldSpec fspec) - | I_ldsflda (fspec) ,_ -> I_ldsflda (modFieldSpec fspec) - | EI_ilzero(ILType.TypeVar _) ,[tyarg] -> EI_ilzero(tyarg) - | AI_nop,_ -> i - // These are embedded in the IL for a an initonly ldfld, i.e. - // here's the relevant comment from tc.fs - // "Add an I_nop if this is an initonly field to make sure we never recognize it as an lvalue. See mkExprAddrOfExpr." - - | _ -> - if not (isNil tyargs) then err "Bad polymorphic IL instruction" + | I_cpobj (ILType.TypeVar _), [tyarg] -> I_cpobj (tyarg) + | I_initobj (ILType.TypeVar _), [tyarg] -> I_initobj (tyarg) + | I_ldfld (al, vol, fspec), _ -> I_ldfld (al, vol, modFieldSpec fspec) + | I_ldflda (fspec), _ -> I_ldflda (modFieldSpec fspec) + | I_stfld (al, vol, fspec), _ -> I_stfld (al, vol, modFieldSpec fspec) + | I_stsfld (vol, fspec), _ -> I_stsfld (vol, modFieldSpec fspec) + | I_ldsfld (vol, fspec), _ -> I_ldsfld (vol, modFieldSpec fspec) + | I_ldsflda (fspec), _ -> I_ldsflda (modFieldSpec fspec) + | EI_ilzero(ILType.TypeVar _), [tyarg] -> EI_ilzero(tyarg) + | AI_nop, _ -> i + // These are embedded in the IL for a an initonly ldfld, i.e. + // here's the relevant comment from tc.fs + // "Add an I_nop if this is an initonly field to make sure we never recognize it as an lvalue. See mkExprAddrOfExpr." + + | _ -> + if not (isNil tyargs) then err "Bad polymorphic IL instruction" i) - match ilAfterInst,args,sequel,ilReturnTys with + match ilAfterInst, args, sequel, ilReturnTys with - | [ EI_ilzero _ ], _, _, _ -> - match tyargs with - | [ty] -> - GenDefaultValue cenv cgbuf eenv (ty,m) + | [ EI_ilzero _ ], _, _, _ -> + match tyargs with + | [ty] -> + GenDefaultValue cenv cgbuf eenv (ty, m) GenSequel cenv eenv.cloc cgbuf sequel - | _ -> failwith "Bad polymorphic IL instruction" + | _ -> failwith "Bad polymorphic IL instruction" // Strip off any ("ceq" x false) when the sequel is a comparison branch and change the BI_brfalse to a BI_brtrue - // This is the instruction sequence for "not" - // For these we can just generate the argument and change the test (from a brfalse to a brtrue and vice versa) + // This is the instruction sequence for "not" + // For these we can just generate the argument and change the test (from a brfalse to a brtrue and vice versa) | ([ AI_ceq ], - [arg1; Expr.Const((Const.Bool false | Const.SByte 0y| Const.Int16 0s | Const.Int32 0 | Const.Int64 0L | Const.Byte 0uy| Const.UInt16 0us | Const.UInt32 0u | Const.UInt64 0UL),_,_) ], - CmpThenBrOrContinue(1, [I_brcmp (((BI_brfalse | BI_brtrue) as bi),label1) ]), + [arg1; Expr.Const((Const.Bool false | Const.SByte 0y| Const.Int16 0s | Const.Int32 0 | Const.Int64 0L | Const.Byte 0uy| Const.UInt16 0us | Const.UInt32 0u | Const.UInt64 0UL), _, _) ], + CmpThenBrOrContinue(1, [I_brcmp (((BI_brfalse | BI_brtrue) as bi), label1) ]), _) -> let bi = match bi with BI_brtrue -> BI_brfalse | _ -> BI_brtrue - GenExpr cenv cgbuf eenv SPSuppress arg1 (CmpThenBrOrContinue(pop 1, [ I_brcmp (bi,label1) ])) + GenExpr cenv cgbuf eenv SPSuppress arg1 (CmpThenBrOrContinue(pop 1, [ I_brcmp (bi, label1) ])) // Query; when do we get a 'ret' in IL assembly code? - | [ I_ret ], [arg1],sequel,[_ilRetTy] -> + | [ I_ret ], [arg1], sequel, [_ilRetTy] -> GenExpr cenv cgbuf eenv SPSuppress arg1 Continue CG.EmitInstr cgbuf (pop 1) Push0 I_ret GenSequelEndScopes cgbuf sequel // Query; when do we get a 'ret' in IL assembly code? - | [ I_ret ], [],sequel,[_ilRetTy] -> + | [ I_ret ], [], sequel, [_ilRetTy] -> CG.EmitInstr cgbuf (pop 1) Push0 I_ret GenSequelEndScopes cgbuf sequel // 'throw' instructions are a bit of a problem - e.g. let x = (throw ...) in ... expects a value *) - // to be left on the stack. But dead-code checking by some versions of the .NET verifier *) + // to be left on the stack. But dead-code checking by some versions of the .NET verifier *) // mean that we can't just have fake code after the throw to generate the fake value *) // (nb. a fake value can always be generated by a "ldnull unbox.any ty" sequence *) // So in the worst case we generate a fake (never-taken) branch to a piece of code to generate *) // the fake value *) - | [ I_throw ], [arg1],sequel,[ilRetTy] -> - match sequelIgnoreEndScopes sequel with - | s when IsSequelImmediate s -> + | [ I_throw ], [arg1], sequel, [ilRetTy] -> + match sequelIgnoreEndScopes sequel with + | s when IsSequelImmediate s -> (* In most cases we can avoid doing this... *) GenExpr cenv cgbuf eenv SPSuppress arg1 Continue CG.EmitInstr cgbuf (pop 1) Push0 I_throw GenSequelEndScopes cgbuf sequel - | _ -> + | _ -> let after1 = CG.GenerateDelayMark cgbuf ("fake_join") let after2 = CG.GenerateDelayMark cgbuf ("fake_join") let after3 = CG.GenerateDelayMark cgbuf ("fake_join") - CG.EmitInstrs cgbuf (pop 0) Push0 [mkLdcInt32 0; I_brcmp (BI_brfalse,after2.CodeLabel) ] + CG.EmitInstrs cgbuf (pop 0) Push0 [mkLdcInt32 0; I_brcmp (BI_brfalse, after2.CodeLabel) ] CG.SetMarkToHere cgbuf after1 - CG.EmitInstrs cgbuf (pop 0) (Push [ilRetTy]) [AI_ldnull; I_unbox_any ilRetTy; I_br after3.CodeLabel ] - + CG.EmitInstrs cgbuf (pop 0) (Push [ilRetTy]) [AI_ldnull; I_unbox_any ilRetTy; I_br after3.CodeLabel ] + CG.SetMarkToHere cgbuf after2 GenExpr cenv cgbuf eenv SPSuppress arg1 Continue CG.EmitInstr cgbuf (pop 1) Push0 I_throw CG.SetMarkToHere cgbuf after3 GenSequel cenv eenv.cloc cgbuf sequel - | _ -> + | _ -> // float or float32 or float<_> or float32<_> - let g = cenv.g in - let anyfpType ty = typeEquivAux EraseMeasures g g.float_ty ty || typeEquivAux EraseMeasures g g.float32_ty ty + let g = cenv.g in + let anyfpType ty = typeEquivAux EraseMeasures g g.float_ty ty || typeEquivAux EraseMeasures g g.float32_ty ty - // Otherwise generate the arguments, and see if we can use a I_brcmp rather than a comparison followed by an I_brfalse/I_brtrue + // Otherwise generate the arguments, and see if we can use a I_brcmp rather than a comparison followed by an I_brfalse/I_brtrue GenExprs cenv cgbuf eenv args - match ilAfterInst,sequel with + match ilAfterInst, sequel with - // NOTE: THESE ARE NOT VALID ON FLOATING POINT DUE TO NaN. Hence INLINE ASM ON FP. MUST BE CAREFULLY WRITTEN + // NOTE: THESE ARE NOT VALID ON FLOATING POINT DUE TO NaN. Hence INLINE ASM ON FP. MUST BE CAREFULLY WRITTEN - | [ AI_clt ], CmpThenBrOrContinue(1,[ I_brcmp (BI_brfalse, label1) ]) when not (anyfpType (tyOfExpr g args.Head)) -> - CG.EmitInstr cgbuf (pop 2) Push0 (I_brcmp(BI_bge,label1)) - | [ AI_cgt ], CmpThenBrOrContinue(1,[ I_brcmp (BI_brfalse, label1) ]) when not (anyfpType (tyOfExpr g args.Head)) -> - CG.EmitInstr cgbuf (pop 2) Push0 (I_brcmp(BI_ble,label1)) - | [ AI_clt_un ], CmpThenBrOrContinue(1,[ I_brcmp (BI_brfalse, label1) ]) when not (anyfpType (tyOfExpr g args.Head)) -> - CG.EmitInstr cgbuf (pop 2) Push0 (I_brcmp(BI_bge_un,label1)) + | [ AI_clt ], CmpThenBrOrContinue(1, [ I_brcmp (BI_brfalse, label1) ]) when not (anyfpType (tyOfExpr g args.Head)) -> + CG.EmitInstr cgbuf (pop 2) Push0 (I_brcmp(BI_bge, label1)) + | [ AI_cgt ], CmpThenBrOrContinue(1, [ I_brcmp (BI_brfalse, label1) ]) when not (anyfpType (tyOfExpr g args.Head)) -> + CG.EmitInstr cgbuf (pop 2) Push0 (I_brcmp(BI_ble, label1)) + | [ AI_clt_un ], CmpThenBrOrContinue(1, [ I_brcmp (BI_brfalse, label1) ]) when not (anyfpType (tyOfExpr g args.Head)) -> + CG.EmitInstr cgbuf (pop 2) Push0 (I_brcmp(BI_bge_un, label1)) | [ AI_cgt_un ], CmpThenBrOrContinue(1, [I_brcmp (BI_brfalse, label1) ]) when not (anyfpType (tyOfExpr g args.Head)) -> - CG.EmitInstr cgbuf (pop 2) Push0 (I_brcmp(BI_ble_un,label1)) - | [ AI_ceq ], CmpThenBrOrContinue(1,[ I_brcmp (BI_brfalse, label1) ]) when not (anyfpType (tyOfExpr g args.Head)) -> - CG.EmitInstr cgbuf (pop 2) Push0 (I_brcmp(BI_bne_un,label1)) - - // THESE ARE VALID ON FP w.r.t. NaN - - | [ AI_clt ], CmpThenBrOrContinue(1,[ I_brcmp (BI_brtrue, label1) ]) -> - CG.EmitInstr cgbuf (pop 2) Push0 (I_brcmp(BI_blt,label1)) - | [ AI_cgt ], CmpThenBrOrContinue(1,[ I_brcmp (BI_brtrue, label1) ]) -> - CG.EmitInstr cgbuf (pop 2) Push0 (I_brcmp(BI_bgt,label1)) - | [ AI_clt_un ], CmpThenBrOrContinue(1,[ I_brcmp (BI_brtrue, label1) ]) -> - CG.EmitInstr cgbuf (pop 2) Push0 (I_brcmp(BI_blt_un,label1)) - | [ AI_cgt_un ], CmpThenBrOrContinue(1,[ I_brcmp (BI_brtrue, label1) ]) -> - CG.EmitInstr cgbuf (pop 2) Push0 (I_brcmp(BI_bgt_un,label1)) + CG.EmitInstr cgbuf (pop 2) Push0 (I_brcmp(BI_ble_un, label1)) + | [ AI_ceq ], CmpThenBrOrContinue(1, [ I_brcmp (BI_brfalse, label1) ]) when not (anyfpType (tyOfExpr g args.Head)) -> + CG.EmitInstr cgbuf (pop 2) Push0 (I_brcmp(BI_bne_un, label1)) + + // THESE ARE VALID ON FP w.r.t. NaN + + | [ AI_clt ], CmpThenBrOrContinue(1, [ I_brcmp (BI_brtrue, label1) ]) -> + CG.EmitInstr cgbuf (pop 2) Push0 (I_brcmp(BI_blt, label1)) + | [ AI_cgt ], CmpThenBrOrContinue(1, [ I_brcmp (BI_brtrue, label1) ]) -> + CG.EmitInstr cgbuf (pop 2) Push0 (I_brcmp(BI_bgt, label1)) + | [ AI_clt_un ], CmpThenBrOrContinue(1, [ I_brcmp (BI_brtrue, label1) ]) -> + CG.EmitInstr cgbuf (pop 2) Push0 (I_brcmp(BI_blt_un, label1)) + | [ AI_cgt_un ], CmpThenBrOrContinue(1, [ I_brcmp (BI_brtrue, label1) ]) -> + CG.EmitInstr cgbuf (pop 2) Push0 (I_brcmp(BI_bgt_un, label1)) | [ AI_ceq ], CmpThenBrOrContinue(1, [ I_brcmp (BI_brtrue, label1) ]) -> - CG.EmitInstr cgbuf (pop 2) Push0 (I_brcmp(BI_beq,label1)) - | _ -> - // Failing that, generate the real IL leaving value(s) on the stack + CG.EmitInstr cgbuf (pop 2) Push0 (I_brcmp(BI_beq, label1)) + | _ -> + // Failing that, generate the real IL leaving value(s) on the stack CG.EmitInstrs cgbuf (pop args.Length) (Push ilReturnTys) ilAfterInst - // If no return values were specified generate a "unit" - if isNil returnTys then + // If no return values were specified generate a "unit" + if isNil returnTys then GenUnitThenSequel cenv eenv m eenv.cloc cgbuf sequel - else + else GenSequel cenv eenv.cloc cgbuf sequel //-------------------------------------------------------------------------- // Generate expression quotations -//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- -and GenQuotation cenv cgbuf eenv (ast,conv,m,ety) sequel = +and GenQuotation cenv cgbuf eenv (ast, conv, m, ety) sequel = - let referencedTypeDefs, spliceTypes, spliceArgExprs, astSpec = - match !conv with + let referencedTypeDefs, spliceTypes, spliceArgExprs, astSpec = + match !conv with | Some res -> res - | None -> - try + | None -> + try let qscope = QuotationTranslator.QuotationGenerationScope.Create (cenv.g, cenv.amap, cenv.viewCcu, QuotationTranslator.IsReflectedDefinition.No) - let astSpec = QuotationTranslator.ConvExprPublic qscope QuotationTranslator.QuotationTranslationEnv.Empty ast + let astSpec = QuotationTranslator.ConvExprPublic qscope QuotationTranslator.QuotationTranslationEnv.Empty ast let referencedTypeDefs, spliceTypes, spliceArgExprs = qscope.Close() referencedTypeDefs, List.map fst spliceTypes, List.map fst spliceArgExprs, astSpec - with + with QuotationTranslator.InvalidQuotedTerm e -> error(e) let astSerializedBytes = QuotationPickler.pickle astSpec - let someTypeInModuleExpr = mkTypeOfExpr cenv m eenv.someTypeInThisAssembly - let rawTy = mkRawQuotedExprTy cenv.g - let spliceTypeExprs = List.map (GenType cenv.amap m eenv.tyenv >> (mkTypeOfExpr cenv m)) spliceTypes + let someTypeInModuleExpr = mkTypeOfExpr cenv m eenv.someTypeInThisAssembly + let rawTy = mkRawQuotedExprTy cenv.g + let spliceTypeExprs = List.map (GenType cenv.amap m eenv.tyenv >> (mkTypeOfExpr cenv m)) spliceTypes - let bytesExpr = Expr.Op(TOp.Bytes(astSerializedBytes),[],[],m) + let bytesExpr = Expr.Op(TOp.Bytes(astSerializedBytes), [], [], m) - let deserializeExpr = + let deserializeExpr = match QuotationTranslator.QuotationGenerationScope.ComputeQuotationFormat cenv.g with | QuotationTranslator.QuotationSerializationFormat.FSharp_40_Plus -> - let referencedTypeDefExprs = List.map (mkILNonGenericBoxedTy >> mkTypeOfExpr cenv m) referencedTypeDefs - let referencedTypeDefsExpr = mkArray (cenv.g.system_Type_ty, referencedTypeDefExprs, m) + let referencedTypeDefExprs = List.map (mkILNonGenericBoxedTy >> mkTypeOfExpr cenv m) referencedTypeDefs + let referencedTypeDefsExpr = mkArray (cenv.g.system_Type_ty, referencedTypeDefExprs, m) let spliceTypesExpr = mkArray (cenv.g.system_Type_ty, spliceTypeExprs, m) let spliceArgsExpr = mkArray (rawTy, spliceArgExprs, m) mkCallDeserializeQuotationFSharp40Plus cenv.g m someTypeInModuleExpr referencedTypeDefsExpr spliceTypesExpr spliceArgsExpr bytesExpr | QuotationTranslator.QuotationSerializationFormat.FSharp_20_Plus -> let mkList ty els = List.foldBack (mkCons cenv.g ty) els (mkNil cenv.g m ty) - let spliceTypesExpr = mkList cenv.g.system_Type_ty spliceTypeExprs - let spliceArgsExpr = mkList rawTy spliceArgExprs + let spliceTypesExpr = mkList cenv.g.system_Type_ty spliceTypeExprs + let spliceArgsExpr = mkList rawTy spliceArgExprs mkCallDeserializeQuotationFSharp20Plus cenv.g m someTypeInModuleExpr spliceTypesExpr spliceArgsExpr bytesExpr - let afterCastExpr = + let afterCastExpr = // Detect a typed quotation and insert the cast if needed. The cast should not fail but does // unfortunately involve a "typeOf" computation over a quotation tree. - if tyconRefEq cenv.g (tcrefOfAppTy cenv.g ety) cenv.g.expr_tcr then + if tyconRefEq cenv.g (tcrefOfAppTy cenv.g ety) cenv.g.expr_tcr then mkCallCastQuotation cenv.g m (List.head (argsOfAppTy cenv.g ety)) deserializeExpr else deserializeExpr @@ -3519,48 +3685,48 @@ and GenQuotation cenv cgbuf eenv (ast,conv,m,ety) sequel = //-------------------------------------------------------------------------- // Generate calls to IL methods -//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- -and GenILCall cenv cgbuf eenv (virt,valu,newobj,valUseFlags,isDllImport,ilMethRef:ILMethodRef,enclArgTys,methArgTys,argExprs,returnTys,m) sequel = - let hasByrefArg = ilMethRef.ArgTypes |> List.exists IsILTypeByref +and GenILCall cenv cgbuf eenv (virt, valu, newobj, valUseFlags, isDllImport, ilMethRef: ILMethodRef, enclArgTys, methArgTys, argExprs, returnTys, m) sequel = + let hasByrefArg = ilMethRef.ArgTypes |> List.exists IsILTypeByref let isSuperInit = match valUseFlags with CtorValUsedAsSuperInit -> true | _ -> false let isBaseCall = match valUseFlags with VSlotDirectCall -> true | _ -> false let ccallInfo = match valUseFlags with PossibleConstrainedCall ty -> Some ty | _ -> None let boxity = (if valu then AsValue else AsObject) let mustGenerateUnitAfterCall = isNil returnTys let makesNoCriticalTailcalls = (newobj || not virt) // Don't tailcall for 'newobj', or 'call' to IL code - let tail = CanTailcall(valu,ccallInfo,eenv.withinSEH,hasByrefArg,mustGenerateUnitAfterCall,isDllImport,false,makesNoCriticalTailcalls,sequel) - + let tail = CanTailcall(valu, ccallInfo, eenv.withinSEH, hasByrefArg, mustGenerateUnitAfterCall, isDllImport, false, makesNoCriticalTailcalls, sequel) + let ilEnclArgTys = GenTypeArgs cenv.amap m eenv.tyenv enclArgTys let ilMethArgTys = GenTypeArgs cenv.amap m eenv.tyenv methArgTys let ilReturnTys = GenTypes cenv.amap m eenv.tyenv returnTys - let ilMethSpec = mkILMethSpec (ilMethRef,boxity,ilEnclArgTys,ilMethArgTys) + let ilMethSpec = mkILMethSpec (ilMethRef, boxity, ilEnclArgTys, ilMethArgTys) let useICallVirt = virt || useCallVirt cenv boxity ilMethSpec isBaseCall - // Load the 'this' pointer to pass to the superclass constructor. This argument is not - // in the expression tree since it can't be treated like an ordinary value - if isSuperInit then CG.EmitInstrs cgbuf (pop 0) (Push [ilMethSpec.DeclaringType]) [ mkLdarg0 ] + // Load the 'this' pointer to pass to the superclass constructor. This argument is not + // in the expression tree since it can't be treated like an ordinary value + if isSuperInit then CG.EmitInstrs cgbuf (pop 0) (Push [ilMethSpec.DeclaringType]) [ mkLdarg0 ] GenExprs cenv cgbuf eenv argExprs - let il = - if newobj then [ I_newobj(ilMethSpec,None) ] - else - match ccallInfo with - | Some objArgTy -> + let il = + if newobj then [ I_newobj(ilMethSpec, None) ] + else + match ccallInfo with + | Some objArgTy -> let ilObjArgTy = GenType cenv.amap m eenv.tyenv objArgTy - [ I_callconstraint(tail,ilObjArgTy,ilMethSpec,None) ] - | None -> - if useICallVirt then [ I_callvirt(tail,ilMethSpec,None) ] - else [ I_call(tail,ilMethSpec,None) ] + [ I_callconstraint(tail, ilObjArgTy, ilMethSpec, None) ] + | None -> + if useICallVirt then [ I_callvirt(tail, ilMethSpec, None) ] + else [ I_call(tail, ilMethSpec, None) ] CG.EmitInstrs cgbuf (pop (argExprs.Length + (if isSuperInit then 1 else 0))) (if isSuperInit then Push0 else Push ilReturnTys) il - // Load the 'this' pointer as the pretend 'result' of the isSuperInit operation. - // It will be immediately popped in most cases, but may also be used as the target of some "property set" operations. - if isSuperInit then CG.EmitInstrs cgbuf (pop 0) (Push [ilMethSpec.DeclaringType]) [ mkLdarg0 ] + // Load the 'this' pointer as the pretend 'result' of the isSuperInit operation. + // It will be immediately popped in most cases, but may also be used as the target of some "property set" operations. + if isSuperInit then CG.EmitInstrs cgbuf (pop 0) (Push [ilMethSpec.DeclaringType]) [ mkLdarg0 ] CommitCallSequel cenv eenv m eenv.cloc cgbuf mustGenerateUnitAfterCall sequel and CommitCallSequel cenv eenv m cloc cgbuf mustGenerateUnitAfterCall sequel = - if mustGenerateUnitAfterCall + if mustGenerateUnitAfterCall then GenUnitThenSequel cenv eenv m cloc cgbuf sequel else GenSequel cenv cloc cgbuf sequel @@ -3569,28 +3735,28 @@ and MakeNotSupportedExnExpr cenv eenv (argExpr, m) = let ety = mkAppTy (cenv.g.FindSysTyconRef ["System"] "NotSupportedException") [] let ilty = GenType cenv.amap m eenv.tyenv ety let mref = mkILCtorMethSpecForTy(ilty, [cenv.g.ilg.typ_String]).MethodRef - Expr.Op(TOp.ILCall(false,false,false,true,NormalValUse,false,false,mref,[],[],[ety]),[],[argExpr],m) + Expr.Op(TOp.ILCall(false, false, false, true, NormalValUse, false, false, mref, [], [], [ety]), [], [argExpr], m) and GenTraitCall cenv cgbuf eenv (traitInfo, argExprs, m) expr sequel = let minfoOpt = CommitOperationResult (ConstraintSolver.CodegenWitnessThatTypeSupportsTraitConstraint cenv.TcVal cenv.g cenv.amap m traitInfo argExprs) - match minfoOpt with - | None -> + match minfoOpt with + | None -> let exnArg = mkString cenv.g m (FSComp.SR.ilDynamicInvocationNotSupported(traitInfo.MemberName)) let exnExpr = MakeNotSupportedExnExpr cenv eenv (exnArg, m) let replacementExpr = mkThrow m (tyOfExpr cenv.g expr) exnExpr GenExpr cenv cgbuf eenv SPSuppress replacementExpr sequel - | Some expr -> + | Some expr -> let expr = cenv.optimizeDuringCodeGen expr - GenExpr cenv cgbuf eenv SPSuppress expr sequel + GenExpr cenv cgbuf eenv SPSuppress expr sequel //-------------------------------------------------------------------------- // Generate byref-related operations -//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- -and GenGetAddrOfRefCellField cenv cgbuf eenv (e,ty,m) sequel = +and GenGetAddrOfRefCellField cenv cgbuf eenv (e, ty, m) sequel = GenExpr cenv cgbuf eenv SPSuppress e Continue let fref = GenRecdFieldRef m cenv eenv.tyenv (mkRefCellContentsRef cenv.g) [ty] - CG.EmitInstrs cgbuf (pop 1) (Push [ILType.Byref fref.ActualType]) [ I_ldflda fref ] + CG.EmitInstrs cgbuf (pop 1) (Push [ILType.Byref fref.ActualType]) [ I_ldflda fref ] GenSequel cenv eenv.cloc cgbuf sequel and GenGetValAddr cenv cgbuf eenv (v: ValRef, m) sequel = @@ -3598,241 +3764,243 @@ and GenGetValAddr cenv cgbuf eenv (v: ValRef, m) sequel = let ilTy = GenTypeOfVal cenv eenv vspec let storage = StorageForValRef m v eenv - match storage with + match storage with | Local (idx, _, None) -> - CG.EmitInstrs cgbuf (pop 0) (Push [ILType.Byref ilTy]) [ I_ldloca (uint16 idx) ] + CG.EmitInstrs cgbuf (pop 0) (Push [ILType.Byref ilTy]) [ I_ldloca (uint16 idx) ] | Arg idx -> - CG.EmitInstrs cgbuf (pop 0) (Push [ILType.Byref ilTy]) [ I_ldarga (uint16 idx) ] + CG.EmitInstrs cgbuf (pop 0) (Push [ILType.Byref ilTy]) [ I_ldarga (uint16 idx) ] - | StaticField (fspec, _vref, hasLiteralAttr, _ilTyForProperty, _, ilTy, _, _, _) -> - if hasLiteralAttr then errorR(Error(FSComp.SR.ilAddressOfLiteralFieldIsInvalid(),m)) + | StaticField (fspec, _vref, hasLiteralAttr, _ilTyForProperty, _, ilTy, _, _, _) -> + if hasLiteralAttr then errorR(Error(FSComp.SR.ilAddressOfLiteralFieldIsInvalid(), m)) let ilTy = if ilTy.IsNominal && ilTy.Boxity = ILBoxity.AsValue then ILType.Byref ilTy else ilTy EmitGetStaticFieldAddr cgbuf ilTy fspec - | Env (_,_,ilField,_) -> - CG.EmitInstrs cgbuf (pop 0) (Push [ILType.Byref ilTy]) [ mkLdarg0; mkNormalLdflda ilField ] + | Env (_, _, ilField, _) -> + CG.EmitInstrs cgbuf (pop 0) (Push [ILType.Byref ilTy]) [ mkLdarg0; mkNormalLdflda ilField ] - | Local (_, _, Some _) | StaticProperty _ | Method _ | Env _ | Null -> - errorR(Error(FSComp.SR.ilAddressOfValueHereIsInvalid(v.DisplayName),m)) - CG.EmitInstrs cgbuf (pop 1) (Push [ILType.Byref ilTy]) [ I_ldarga (uint16 669 (* random value for post-hoc diagnostic analysis on generated tree *) ) ] ; + | Local (_, _, Some _) | StaticProperty _ | Method _ | Env _ | Null -> + errorR(Error(FSComp.SR.ilAddressOfValueHereIsInvalid(v.DisplayName), m)) + CG.EmitInstrs cgbuf (pop 1) (Push [ILType.Byref ilTy]) [ I_ldarga (uint16 669 (* random value for post-hoc diagnostic analysis on generated tree *) ) ] GenSequel cenv eenv.cloc cgbuf sequel -and GenGetByref cenv cgbuf eenv (v:ValRef,m) sequel = +and GenGetByref cenv cgbuf eenv (v: ValRef, m) sequel = GenGetLocalVRef cenv cgbuf eenv m v None let ilty = GenType cenv.amap m eenv.tyenv (destByrefTy cenv.g v.Type) CG.EmitInstrs cgbuf (pop 1) (Push [ilty]) [ mkNormalLdobj ilty ] GenSequel cenv eenv.cloc cgbuf sequel -and GenSetByref cenv cgbuf eenv (v:ValRef,e,m) sequel = +and GenSetByref cenv cgbuf eenv (v: ValRef, e, m) sequel = GenGetLocalVRef cenv cgbuf eenv m v None GenExpr cenv cgbuf eenv SPSuppress e Continue let ilty = GenType cenv.amap m eenv.tyenv (destByrefTy cenv.g v.Type) CG.EmitInstrs cgbuf (pop 2) Push0 [ mkNormalStobj ilty ] GenUnitThenSequel cenv eenv m eenv.cloc cgbuf sequel -and GenDefaultValue cenv cgbuf eenv (ty,m) = +and GenDefaultValue cenv cgbuf eenv (ty, m) = let ilTy = GenType cenv.amap m eenv.tyenv ty - if isRefTy cenv.g ty then + if isRefTy cenv.g ty then CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) AI_ldnull else - match tryDestAppTy cenv.g ty with - | ValueSome tcref when (tyconRefEq cenv.g cenv.g.system_SByte_tcref tcref || - tyconRefEq cenv.g cenv.g.system_Int16_tcref tcref || - tyconRefEq cenv.g cenv.g.system_Int32_tcref tcref || - tyconRefEq cenv.g cenv.g.system_Bool_tcref tcref || - tyconRefEq cenv.g cenv.g.system_Byte_tcref tcref || - tyconRefEq cenv.g cenv.g.system_Char_tcref tcref || - tyconRefEq cenv.g cenv.g.system_UInt16_tcref tcref || + match tryDestAppTy cenv.g ty with + | ValueSome tcref when (tyconRefEq cenv.g cenv.g.system_SByte_tcref tcref || + tyconRefEq cenv.g cenv.g.system_Int16_tcref tcref || + tyconRefEq cenv.g cenv.g.system_Int32_tcref tcref || + tyconRefEq cenv.g cenv.g.system_Bool_tcref tcref || + tyconRefEq cenv.g cenv.g.system_Byte_tcref tcref || + tyconRefEq cenv.g cenv.g.system_Char_tcref tcref || + tyconRefEq cenv.g cenv.g.system_UInt16_tcref tcref || tyconRefEq cenv.g cenv.g.system_UInt32_tcref tcref) -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) iLdcZero - | ValueSome tcref when (tyconRefEq cenv.g cenv.g.system_Int64_tcref tcref || + | ValueSome tcref when (tyconRefEq cenv.g cenv.g.system_Int64_tcref tcref || tyconRefEq cenv.g cenv.g.system_UInt64_tcref tcref) -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (iLdcInt64 0L) | ValueSome tcref when (tyconRefEq cenv.g cenv.g.system_Single_tcref tcref) -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (iLdcSingle 0.0f) | ValueSome tcref when (tyconRefEq cenv.g cenv.g.system_Double_tcref tcref) -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (iLdcDouble 0.0) - | _ -> + | _ -> let ilTy = GenType cenv.amap m eenv.tyenv ty LocalScope "ilzero" cgbuf (fun scopeMarks -> - let locIdx, realloc, _ = AllocLocal cenv cgbuf eenv true (ilxgenGlobalNng.FreshCompilerGeneratedName ("default",m), ilTy, false) scopeMarks - // "initobj" (Generated by EmitInitLocal) doesn't work on byref types - // But ilzero(&ty) only gets generated in the built-in get-address function so - // we can just rely on zeroinit of all IL locals. - if realloc then - match ilTy with - | ILType.Byref _ -> () + let locIdx, realloc, _ = AllocLocal cenv cgbuf eenv true (ilxgenGlobalNng.FreshCompilerGeneratedName ("default", m), ilTy, false) scopeMarks + // "initobj" (Generated by EmitInitLocal) doesn't work on byref types + // But ilzero(&ty) only gets generated in the built-in get-address function so + // we can just rely on zeroinit of all IL locals. + if realloc then + match ilTy with + | ILType.Byref _ -> () | _ -> EmitInitLocal cgbuf ilTy locIdx EmitGetLocal cgbuf ilTy locIdx ) //-------------------------------------------------------------------------- // Generate generic parameters -//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- -and GenGenericParam cenv eenv (tp:Typar) = - let subTypeConstraints = - tp.Constraints - |> List.choose (function | TyparConstraint.CoercesTo(ty,_) -> Some(ty) | _ -> None) +and GenGenericParam cenv eenv (tp: Typar) = + let subTypeConstraints = + tp.Constraints + |> List.choose (function | TyparConstraint.CoercesTo(ty, _) -> Some(ty) | _ -> None) |> List.map (GenTypeAux cenv.amap tp.Range eenv.tyenv VoidNotOK PtrTypesNotOK) - let refTypeConstraint = - tp.Constraints + let refTypeConstraint = + tp.Constraints |> List.exists (function TyparConstraint.IsReferenceType _ -> true | TyparConstraint.SupportsNull _ -> true | _ -> false) - let notNullableValueTypeConstraint = + let notNullableValueTypeConstraint = tp.Constraints |> List.exists (function TyparConstraint.IsNonNullableStruct _ -> true | _ -> false) - let defaultConstructorConstraint = + let defaultConstructorConstraint = tp.Constraints |> List.exists (function TyparConstraint.RequiresDefaultConstructor _ -> true | _ -> false) - { Name= - + let tpName = // use the CompiledName if given // Inference variables get given an IL name "TA, TB" etc. - let nm = - match tp.ILName with - | None -> tp.Name + let nm = + match tp.ILName with + | None -> tp.Name | Some nm -> nm // Some special rules apply when compiling Fsharp.Core.dll to avoid a proliferation of [] attributes on type parameters - if cenv.g.compilingFslib then - match nm with + if cenv.g.compilingFslib then + match nm with | "U" -> "TResult" | "U1" -> "TResult1" | "U2" -> "TResult2" - | _ -> - if nm.TrimEnd([| '0' .. '9' |]).Length = 1 then nm - elif nm.Length >= 1 && nm.[0] = 'T' && (nm.Length = 1 || not (System.Char.IsLower nm.[1])) then nm + | _ -> + if nm.TrimEnd([| '0' .. '9' |]).Length = 1 then nm + elif nm.Length >= 1 && nm.[0] = 'T' && (nm.Length = 1 || not (System.Char.IsLower nm.[1])) then nm else "T" + (String.capitalize nm) - else - nm + else + nm + + let tpAttrs = mkILCustomAttrs (GenAttrs cenv eenv tp.Attribs) + { Name = tpName Constraints = subTypeConstraints - Variance=NonVariant - CustomAttrsStored = storeILCustomAttrs (mkILCustomAttrs (GenAttrs cenv eenv tp.Attribs)) + Variance = NonVariant + CustomAttrsStored = storeILCustomAttrs tpAttrs MetadataIndex = NoMetadataIdx - HasReferenceTypeConstraint=refTypeConstraint - HasNotNullableValueTypeConstraint=notNullableValueTypeConstraint - HasDefaultConstructorConstraint= defaultConstructorConstraint } + HasReferenceTypeConstraint = refTypeConstraint + HasNotNullableValueTypeConstraint = notNullableValueTypeConstraint + HasDefaultConstructorConstraint = defaultConstructorConstraint } //-------------------------------------------------------------------------- // Generate object expressions as ILX "closures" -//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- /// Generates the data used for parameters at definitions of abstract method slots such as interface methods or override methods. -and GenSlotParam m cenv eenv (TSlotParam(nm,ty,inFlag,outFlag,optionalFlag,attribs)) : ILParameter = +and GenSlotParam m cenv eenv (TSlotParam(nm, ty, inFlag, outFlag, optionalFlag, attribs)) : ILParameter = let ilTy = GenParamType cenv.amap m eenv.tyenv true ty - let inFlag2,outFlag2,optionalFlag2,defaultParamValue,paramMarshal2,attribs = GenParamAttribs cenv ty attribs - + let inFlag2, outFlag2, optionalFlag2, defaultParamValue, paramMarshal2, attribs = GenParamAttribs cenv ty attribs + let ilAttribs = GenAttrs cenv eenv attribs - - let ilAttribs = - match GenReadOnlyAttributeIfNecessary cenv.g ty with + + let ilAttribs = + match GenReadOnlyAttributeIfNecessary cenv.g ty with | Some attr -> ilAttribs @ [attr] | None -> ilAttribs - + { Name=nm Type= ilTy - Default=defaultParamValue - Marshal=paramMarshal2 + Default=defaultParamValue + Marshal=paramMarshal2 IsIn=inFlag || inFlag2 IsOut=outFlag || outFlag2 IsOptional=optionalFlag || optionalFlag2 CustomAttrsStored = storeILCustomAttrs (mkILCustomAttrs ilAttribs) MetadataIndex = NoMetadataIdx } - -and GenFormalSlotsig m cenv eenv (TSlotSig(_,ty,ctps,mtps,paraml,returnTy)) = + +and GenFormalSlotsig m cenv eenv (TSlotSig(_, ty, ctps, mtps, paraml, returnTy)) = let paraml = List.concat paraml let ilTy = GenType cenv.amap m eenv.tyenv ty let eenvForSlotSig = EnvForTypars (ctps @ mtps) eenv - let ilParams = paraml |> List.map (GenSlotParam m cenv eenvForSlotSig) + let ilParams = paraml |> List.map (GenSlotParam m cenv eenvForSlotSig) let ilRetTy = GenReturnType cenv.amap m eenvForSlotSig.tyenv returnTy - let ilRet = mkILReturn ilRetTy - let ilRet = - match returnTy with + let ilRet = mkILReturn ilRetTy + let ilRet = + match returnTy with | None -> ilRet - | Some ty -> - match GenReadOnlyAttributeIfNecessary cenv.g ty with + | Some ty -> + match GenReadOnlyAttributeIfNecessary cenv.g ty with | Some attr -> ilRet.WithCustomAttrs (mkILCustomAttrs (ilRet.CustomAttrs.AsList @ [attr])) | None -> ilRet ilTy, ilParams, ilRet -and instSlotParam inst (TSlotParam(nm,ty,inFlag,fl2,fl3,attrs)) = TSlotParam(nm,instType inst ty,inFlag,fl2,fl3,attrs) +and instSlotParam inst (TSlotParam(nm, ty, inFlag, fl2, fl3, attrs)) = TSlotParam(nm, instType inst ty, inFlag, fl2, fl3, attrs) -and GenActualSlotsig m cenv eenv (TSlotSig(_,ty,ctps,mtps,ilSlotParams,ilSlotRetTy)) methTyparsOfOverridingMethod (methodParams: Val list) = +and GenActualSlotsig m cenv eenv (TSlotSig(_, ty, ctps, mtps, ilSlotParams, ilSlotRetTy)) methTyparsOfOverridingMethod (methodParams: Val list) = let ilSlotParams = List.concat ilSlotParams let instForSlotSig = mkTyparInst (ctps@mtps) (argsOfAppTy cenv.g ty @ generalizeTypars methTyparsOfOverridingMethod) - let ilParams = ilSlotParams |> List.map (instSlotParam instForSlotSig >> GenSlotParam m cenv eenv) + let ilParams = ilSlotParams |> List.map (instSlotParam instForSlotSig >> GenSlotParam m cenv eenv) // Use the better names if available - let ilParams = - if ilParams.Length = methodParams.Length then - (ilParams, methodParams) ||> List.map2 (fun p pv -> { p with Name = Some (nameOfVal pv) }) + let ilParams = + if ilParams.Length = methodParams.Length then + (ilParams, methodParams) ||> List.map2 (fun p pv -> { p with Name = Some (nameOfVal pv) }) else ilParams let ilRetTy = GenReturnType cenv.amap m eenv.tyenv (Option.map (instType instForSlotSig) ilSlotRetTy) let iLRet = mkILReturn ilRetTy - ilParams,iLRet + ilParams, iLRet -and GenNameOfOverridingMethod cenv (useMethodImpl,(TSlotSig(nameOfOverridenMethod,enclTypOfOverridenMethod,_,_,_,_))) = +and GenNameOfOverridingMethod cenv (useMethodImpl, (TSlotSig(nameOfOverridenMethod, enclTypOfOverridenMethod, _, _, _, _))) = if useMethodImpl then qualifiedMangledNameOfTyconRef (tcrefOfAppTy cenv.g enclTypOfOverridenMethod) nameOfOverridenMethod else nameOfOverridenMethod -and GenMethodImpl cenv eenv (useMethodImpl,(TSlotSig(nameOfOverridenMethod,_,_,_,_,_) as slotsig)) m = - let ilOverrideTy,ilOverrideParams,ilOverrideRet = GenFormalSlotsig m cenv eenv slotsig +and GenMethodImpl cenv eenv (useMethodImpl, (TSlotSig(nameOfOverridenMethod, _, _, _, _, _) as slotsig)) m = + let ilOverrideTy, ilOverrideParams, ilOverrideRet = GenFormalSlotsig m cenv eenv slotsig - let nameOfOverridingMethod = GenNameOfOverridingMethod cenv (useMethodImpl,slotsig) - nameOfOverridingMethod, - (fun (ilTyForOverriding,methTyparsOfOverridingMethod) -> + let nameOfOverridingMethod = GenNameOfOverridingMethod cenv (useMethodImpl, slotsig) + nameOfOverridingMethod, + (fun (ilTyForOverriding, methTyparsOfOverridingMethod) -> let ilOverrideTyRef = ilOverrideTy.TypeRef let ilOverrideMethRef = mkILMethRef(ilOverrideTyRef, ILCallingConv.Instance, nameOfOverridenMethod, List.length (DropErasedTypars methTyparsOfOverridingMethod), typesOfILParams ilOverrideParams, ilOverrideRet.Type) - let eenvForOverrideBy = AddTyparsToEnv methTyparsOfOverridingMethod eenv - let ilParamsOfOverridingMethod,ilReturnOfOverridingMethod = GenActualSlotsig m cenv eenvForOverrideBy slotsig methTyparsOfOverridingMethod [] - let ilOverrideMethGenericParams = GenGenericParams cenv eenvForOverrideBy methTyparsOfOverridingMethod + let eenvForOverrideBy = AddTyparsToEnv methTyparsOfOverridingMethod eenv + let ilParamsOfOverridingMethod, ilReturnOfOverridingMethod = GenActualSlotsig m cenv eenvForOverrideBy slotsig methTyparsOfOverridingMethod [] + let ilOverrideMethGenericParams = GenGenericParams cenv eenvForOverrideBy methTyparsOfOverridingMethod let ilOverrideMethGenericArgs = mkILFormalGenericArgs 0 ilOverrideMethGenericParams let ilOverrideBy = mkILInstanceMethSpecInTy(ilTyForOverriding, nameOfOverridingMethod, typesOfILParams ilParamsOfOverridingMethod, ilReturnOfOverridingMethod.Type, ilOverrideMethGenericArgs) - { Overrides = OverridesSpec(ilOverrideMethRef,ilOverrideTy) + { Overrides = OverridesSpec(ilOverrideMethRef, ilOverrideTy) OverrideBy = ilOverrideBy }) -and bindBaseOrThisVarOpt cenv eenv baseValOpt = - match baseValOpt with +and bindBaseOrThisVarOpt cenv eenv baseValOpt = + match baseValOpt with | None -> eenv - | Some basev -> AddStorageForVal cenv.g (basev,notlazy (Arg 0)) eenv + | Some basev -> AddStorageForVal cenv.g (basev, notlazy (Arg 0)) eenv -and fixupVirtualSlotFlags (mdef:ILMethodDef) = +and fixupVirtualSlotFlags (mdef: ILMethodDef) = mdef.WithHideBySig() -and renameMethodDef nameOfOverridingMethod (mdef : ILMethodDef) = +and renameMethodDef nameOfOverridingMethod (mdef: ILMethodDef) = mdef.With(name=nameOfOverridingMethod) -and fixupMethodImplFlags (mdef:ILMethodDef) = +and fixupMethodImplFlags (mdef: ILMethodDef) = mdef.WithAccess(ILMemberAccess.Private).WithHideBySig().WithFinal(true).WithNewSlot -and GenObjectMethod cenv eenvinner (cgbuf:CodeGenBuffer) useMethodImpl tmethod = +and GenObjectMethod cenv eenvinner (cgbuf: CodeGenBuffer) useMethodImpl tmethod = // Check if we're compiling the property as a .NET event - let (TObjExprMethod(slotsig,attribs,methTyparsOfOverridingMethod,methodParams,methodBodyExpr,m)) = tmethod - let (TSlotSig(nameOfOverridenMethod,_,_,_,_,_)) = slotsig - if CompileAsEvent cenv.g attribs then + let (TObjExprMethod(slotsig, attribs, methTyparsOfOverridingMethod, methodParams, methodBodyExpr, m)) = tmethod + let (TSlotSig(nameOfOverridenMethod, _, _, _, _, _)) = slotsig + if CompileAsEvent cenv.g attribs then [] else let eenvUnderTypars = AddTyparsToEnv methTyparsOfOverridingMethod eenvinner let methodParams = List.concat methodParams let methodParamsNonSelf = match methodParams with [] -> [] | _::t -> t // drop the 'this' arg when computing better argument names for IL parameters - let ilParamsOfOverridingMethod,ilReturnOfOverridingMethod = - GenActualSlotsig m cenv eenvUnderTypars slotsig methTyparsOfOverridingMethod methodParamsNonSelf + let ilParamsOfOverridingMethod, ilReturnOfOverridingMethod = + GenActualSlotsig m cenv eenvUnderTypars slotsig methTyparsOfOverridingMethod methodParamsNonSelf let ilAttribs = GenAttrs cenv eenvinner attribs // Args are stored starting at #1 - let eenvForMeth = AddStorageForLocalVals cenv.g (methodParams |> List.mapi (fun i v -> (v,Arg i))) eenvUnderTypars + let eenvForMeth = AddStorageForLocalVals cenv.g (methodParams |> List.mapi (fun i v -> (v, Arg i))) eenvUnderTypars let sequel = (if slotSigHasVoidReturnTy slotsig then discardAndReturnVoid else Return) - let ilMethodBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,[],nameOfOverridenMethod,eenvForMeth,0,methodBodyExpr,sequel) + let ilMethodBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways, [], nameOfOverridenMethod, eenvForMeth, 0, methodBodyExpr, sequel) - let nameOfOverridingMethod,methodImplGenerator = GenMethodImpl cenv eenvinner (useMethodImpl,slotsig) methodBodyExpr.Range + let nameOfOverridingMethod, methodImplGenerator = GenMethodImpl cenv eenvinner (useMethodImpl, slotsig) methodBodyExpr.Range - let mdef = + let mdef = mkILGenericVirtualMethod (nameOfOverridingMethod, ILMemberAccess.Public, @@ -3840,20 +4008,20 @@ and GenObjectMethod cenv eenvinner (cgbuf:CodeGenBuffer) useMethodImpl tmethod = ilParamsOfOverridingMethod, ilReturnOfOverridingMethod, MethodBody.IL ilMethodBody) - // fixup attributes to generate a method impl + // fixup attributes to generate a method impl let mdef = if useMethodImpl then fixupMethodImplFlags mdef else mdef let mdef = fixupVirtualSlotFlags mdef let mdef = mdef.With(customAttrs = mkILCustomAttrs ilAttribs) - [(useMethodImpl,methodImplGenerator,methTyparsOfOverridingMethod),mdef] + [(useMethodImpl, methodImplGenerator, methTyparsOfOverridingMethod), mdef] -and GenObjectExpr cenv cgbuf eenvouter expr (baseType,baseValOpt,basecall,overrides,interfaceImpls,m) sequel = - let cloinfo,_,eenvinner = GetIlxClosureInfo cenv m false None eenvouter expr +and GenObjectExpr cenv cgbuf eenvouter expr (baseType, baseValOpt, basecall, overrides, interfaceImpls, m) sequel = + let cloinfo, _, eenvinner = GetIlxClosureInfo cenv m false None eenvouter expr let cloAttribs = cloinfo.cloAttribs let cloFreeVars = cloinfo.cloFreeVars let ilCloLambdas = cloinfo.ilCloLambdas let cloName = cloinfo.cloName - + let ilxCloSpec = cloinfo.cloSpec let ilCloFreeVars = cloinfo.cloILFreeVars let ilCloGenericFormals = cloinfo.cloILGenericParams @@ -3864,52 +4032,52 @@ and GenObjectExpr cenv cgbuf eenvouter expr (baseType,baseValOpt,basecall,overri let ilTyForOverriding = mkILBoxedTy ilCloTypeRef ilCloGenericActuals let eenvinner = bindBaseOrThisVarOpt cenv eenvinner baseValOpt - let ilCtorBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,[],cloName,eenvinner,1,basecall,discardAndReturnVoid) + let ilCtorBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways, [], cloName, eenvinner, 1, basecall, discardAndReturnVoid) - let genMethodAndOptionalMethodImpl tmethod useMethodImpl = - [ for ((useMethodImpl,methodImplGeneratorFunction,methTyparsOfOverridingMethod),mdef) in GenObjectMethod cenv eenvinner cgbuf useMethodImpl tmethod do - let mimpl = (if useMethodImpl then Some(methodImplGeneratorFunction (ilTyForOverriding,methTyparsOfOverridingMethod)) else None) - yield (mimpl,mdef) ] + let genMethodAndOptionalMethodImpl tmethod useMethodImpl = + [ for ((useMethodImpl, methodImplGeneratorFunction, methTyparsOfOverridingMethod), mdef) in GenObjectMethod cenv eenvinner cgbuf useMethodImpl tmethod do + let mimpl = (if useMethodImpl then Some(methodImplGeneratorFunction (ilTyForOverriding, methTyparsOfOverridingMethod)) else None) + yield (mimpl, mdef) ] - let mimpls,mdefs = - [ for ov in overrides do + let mimpls, mdefs = + [ for ov in overrides do yield! genMethodAndOptionalMethodImpl ov (isInterfaceTy cenv.g baseType) - for (_,tmethods) in interfaceImpls do - for tmethod in tmethods do + for (_, tmethods) in interfaceImpls do + for tmethod in tmethods do yield! genMethodAndOptionalMethodImpl tmethod true ] - |> List.unzip + |> List.unzip let mimpls = mimpls |> List.choose id // choose the ones that actually have method impls - let interfaceTys = interfaceImpls |> List.map (fst >> GenType cenv.amap m eenvinner.tyenv) + let interfaceTys = interfaceImpls |> List.map (fst >> GenType cenv.amap m eenvinner.tyenv) let attrs = GenAttrs cenv eenvinner cloAttribs let super = (if isInterfaceTy cenv.g baseType then cenv.g.ilg.typ_Object else ilCloRetTy) let interfaceTys = interfaceTys @ (if isInterfaceTy cenv.g baseType then [ilCloRetTy] else []) - let cloTypeDefs = GenClosureTypeDefs cenv (ilCloTypeRef,ilCloGenericFormals,attrs,ilCloFreeVars,ilCloLambdas,ilCtorBody,mdefs,mimpls,super,interfaceTys) + let cloTypeDefs = GenClosureTypeDefs cenv (ilCloTypeRef, ilCloGenericFormals, attrs, ilCloFreeVars, ilCloLambdas, ilCtorBody, mdefs, mimpls, super, interfaceTys) - for cloTypeDef in cloTypeDefs do + for cloTypeDef in cloTypeDefs do cgbuf.mgbuf.AddTypeDef(ilCloTypeRef, cloTypeDef, false, false, None) CountClosure() GenGetLocalVals cenv cgbuf eenvouter m cloFreeVars - CG.EmitInstr cgbuf (pop ilCloFreeVars.Length) (Push [ EraseClosures.mkTyOfLambdas cenv.g.ilxPubCloEnv ilCloLambdas]) (I_newobj (ilxCloSpec.Constructor,None)) + CG.EmitInstr cgbuf (pop ilCloFreeVars.Length) (Push [ EraseClosures.mkTyOfLambdas cenv.g.ilxPubCloEnv ilCloLambdas]) (I_newobj (ilxCloSpec.Constructor, None)) GenSequel cenv eenvouter.cloc cgbuf sequel -and GenSequenceExpr - cenv - (cgbuf:CodeGenBuffer) - eenvouter - (nextEnumeratorValRef:ValRef, pcvref:ValRef, currvref:ValRef, stateVars, generateNextExpr, closeExpr, checkCloseExpr:Expr, seqElemTy, m) sequel = +and GenSequenceExpr + cenv + (cgbuf: CodeGenBuffer) + eenvouter + (nextEnumeratorValRef: ValRef, pcvref: ValRef, currvref: ValRef, stateVars, generateNextExpr, closeExpr, checkCloseExpr: Expr, seqElemTy, m) sequel = let stateVars = [ pcvref; currvref ] @ stateVars - let stateVarsSet = stateVars |> List.map (fun vref -> vref.Deref) |> Zset.ofList valOrder + let stateVarsSet = stateVars |> List.map (fun vref -> vref.Deref) |> Zset.ofList valOrder // pretend that the state variables are bound - let eenvouter = + let eenvouter = eenvouter |> AddStorageForLocalVals cenv.g (stateVars |> List.map (fun v -> v.Deref, Local(0, false, None))) - + // Get the free variables. Make a lambda to pretend that the 'nextEnumeratorValRef' is bound (it is an argument to GenerateNext) - let (cloAttribs,_,_,cloFreeTyvars,cloFreeVars,ilCloTypeRef:ILTypeRef,ilCloFreeVars,eenvinner) = + let (cloAttribs, _, _, cloFreeTyvars, cloFreeVars, ilCloTypeRef: ILTypeRef, ilCloFreeVars, eenvinner) = GetIlxClosureFreeVars cenv m None eenvouter [] (mkLambda m nextEnumeratorValRef.Deref (generateNextExpr, cenv.g.int32_ty)) let ilCloSeqElemTy = GenType cenv.amap m eenvinner.tyenv seqElemTy @@ -3918,92 +4086,92 @@ and GenSequenceExpr let ilCloRetTyOuter = GenType cenv.amap m eenvouter.tyenv cloRetTy let ilCloEnumeratorTy = GenType cenv.amap m eenvinner.tyenv (mkIEnumeratorTy cenv.g seqElemTy) let ilCloEnumerableTy = GenType cenv.amap m eenvinner.tyenv (mkSeqTy cenv.g seqElemTy) - let ilCloBaseTy = GenType cenv.amap m eenvinner.tyenv (mkAppTy cenv.g.seq_base_tcr [seqElemTy]) + let ilCloBaseTy = GenType cenv.amap m eenvinner.tyenv (mkAppTy cenv.g.seq_base_tcr [seqElemTy]) let ilCloGenericParams = GenGenericParams cenv eenvinner cloFreeTyvars - // Create a new closure class with a single "MoveNext" method that implements the iterator. + // Create a new closure class with a single "MoveNext" method that implements the iterator. let ilCloTyInner = mkILFormalBoxedTy ilCloTypeRef ilCloGenericParams - let ilCloLambdas = Lambdas_return ilCloRetTyInner + let ilCloLambdas = Lambdas_return ilCloRetTyInner let cloref = IlxClosureRef(ilCloTypeRef, ilCloLambdas, ilCloFreeVars) let ilxCloSpec = IlxClosureSpec.Create(cloref, GenGenericArgs m eenvouter.tyenv cloFreeTyvars) let formalClospec = IlxClosureSpec.Create(cloref, mkILFormalGenericArgs 0 ilCloGenericParams) - let getFreshMethod = - let _,mbody = - CodeGenMethod cenv cgbuf.mgbuf - ([],"GetFreshEnumerator",eenvinner,1, - (fun cgbuf eenv -> - for fv in cloFreeVars do + let getFreshMethod = + let _, mbody = + CodeGenMethod cenv cgbuf.mgbuf + ([], "GetFreshEnumerator", eenvinner, 1, + (fun cgbuf eenv -> + for fv in cloFreeVars do /// State variables always get zero-initialized - if stateVarsSet.Contains fv then - GenDefaultValue cenv cgbuf eenv (fv.Type,m) + if stateVarsSet.Contains fv then + GenDefaultValue cenv cgbuf eenv (fv.Type, m) else GenGetLocalVal cenv cgbuf eenv m fv None - CG.EmitInstr cgbuf (pop ilCloFreeVars.Length) (Push [ilCloRetTyInner]) (I_newobj (formalClospec.Constructor,None)) + CG.EmitInstr cgbuf (pop ilCloFreeVars.Length) (Push [ilCloRetTyInner]) (I_newobj (formalClospec.Constructor, None)) GenSequel cenv eenv.cloc cgbuf Return), m) - mkILNonGenericVirtualMethod("GetFreshEnumerator",ILMemberAccess.Public, [], mkILReturn ilCloEnumeratorTy, MethodBody.IL mbody) + mkILNonGenericVirtualMethod("GetFreshEnumerator", ILMemberAccess.Public, [], mkILReturn ilCloEnumeratorTy, MethodBody.IL mbody) |> AddNonUserCompilerGeneratedAttribs cenv.g - let closeMethod = + let closeMethod = // Note: We suppress the first sequence point in the body of this method since it is the initial state machine jump let spReq = SPSuppress - let ilCode = CodeGenMethodForExpr cenv cgbuf.mgbuf (spReq,[],"Close",eenvinner,1,closeExpr,discardAndReturnVoid) - mkILNonGenericVirtualMethod("Close",ILMemberAccess.Public, [], mkILReturn ILType.Void, MethodBody.IL ilCode) + let ilCode = CodeGenMethodForExpr cenv cgbuf.mgbuf (spReq, [], "Close", eenvinner, 1, closeExpr, discardAndReturnVoid) + mkILNonGenericVirtualMethod("Close", ILMemberAccess.Public, [], mkILReturn ILType.Void, MethodBody.IL ilCode) - let checkCloseMethod = + let checkCloseMethod = // Note: We suppress the first sequence point in the body of this method since it is the initial state machine jump let spReq = SPSuppress - let ilCode = CodeGenMethodForExpr cenv cgbuf.mgbuf (spReq,[],"get_CheckClose",eenvinner,1,checkCloseExpr,Return) - mkILNonGenericVirtualMethod("get_CheckClose",ILMemberAccess.Public, [], mkILReturn cenv.g.ilg.typ_Bool, MethodBody.IL ilCode) + let ilCode = CodeGenMethodForExpr cenv cgbuf.mgbuf (spReq, [], "get_CheckClose", eenvinner, 1, checkCloseExpr, Return) + mkILNonGenericVirtualMethod("get_CheckClose", ILMemberAccess.Public, [], mkILReturn cenv.g.ilg.typ_Bool, MethodBody.IL ilCode) - let generateNextMethod = + let generateNextMethod = // Note: We suppress the first sequence point in the body of this method since it is the initial state machine jump let spReq = SPSuppress - // the 'next enumerator' byref arg is at arg position 1 + // the 'next enumerator' byref arg is at arg position 1 let eenvinner = eenvinner |> AddStorageForLocalVals cenv.g [ (nextEnumeratorValRef.Deref, Arg 1) ] - let ilParams = [mkILParamNamed("next",ILType.Byref ilCloEnumerableTy)] + let ilParams = [mkILParamNamed("next", ILType.Byref ilCloEnumerableTy)] let ilReturn = mkILReturn cenv.g.ilg.typ_Int32 - let ilCode = MethodBody.IL (CodeGenMethodForExpr cenv cgbuf.mgbuf (spReq,[],"GenerateNext",eenvinner,2,generateNextExpr,Return)) - mkILNonGenericVirtualMethod("GenerateNext",ILMemberAccess.Public, ilParams, ilReturn, ilCode) + let ilCode = MethodBody.IL (CodeGenMethodForExpr cenv cgbuf.mgbuf (spReq, [], "GenerateNext", eenvinner, 2, generateNextExpr, Return)) + mkILNonGenericVirtualMethod("GenerateNext", ILMemberAccess.Public, ilParams, ilReturn, ilCode) - let lastGeneratedMethod = - let ilCode = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPSuppress,[],"get_LastGenerated",eenvinner,1,exprForValRef m currvref,Return) - mkILNonGenericVirtualMethod("get_LastGenerated",ILMemberAccess.Public, [], mkILReturn ilCloSeqElemTy, MethodBody.IL ilCode) + let lastGeneratedMethod = + let ilCode = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPSuppress, [], "get_LastGenerated", eenvinner, 1, exprForValRef m currvref, Return) + mkILNonGenericVirtualMethod("get_LastGenerated", ILMemberAccess.Public, [], mkILReturn ilCloSeqElemTy, MethodBody.IL ilCode) |> AddNonUserCompilerGeneratedAttribs cenv.g - let ilCtorBody = + let ilCtorBody = mkILSimpleStorageCtor(None, Some ilCloBaseTy.TypeSpec, ilCloTyInner, [], [], ILMemberAccess.Assembly).MethodBody let attrs = GenAttrs cenv eenvinner cloAttribs - let cloTypeDefs = GenClosureTypeDefs cenv (ilCloTypeRef, ilCloGenericParams, attrs, ilCloFreeVars, ilCloLambdas, ilCtorBody, [generateNextMethod;closeMethod;checkCloseMethod;lastGeneratedMethod;getFreshMethod],[],ilCloBaseTy,[]) + let cloTypeDefs = GenClosureTypeDefs cenv (ilCloTypeRef, ilCloGenericParams, attrs, ilCloFreeVars, ilCloLambdas, ilCtorBody, [generateNextMethod;closeMethod;checkCloseMethod;lastGeneratedMethod;getFreshMethod], [], ilCloBaseTy, []) - for cloTypeDef in cloTypeDefs do + for cloTypeDef in cloTypeDefs do cgbuf.mgbuf.AddTypeDef(ilCloTypeRef, cloTypeDef, false, false, None) CountClosure() - for fv in cloFreeVars do + for fv in cloFreeVars do /// State variables always get zero-initialized - if stateVarsSet.Contains fv then - GenDefaultValue cenv cgbuf eenvouter (fv.Type,m) + if stateVarsSet.Contains fv then + GenDefaultValue cenv cgbuf eenvouter (fv.Type, m) else GenGetLocalVal cenv cgbuf eenvouter m fv None - - CG.EmitInstr cgbuf (pop ilCloFreeVars.Length) (Push [ilCloRetTyOuter]) (I_newobj (ilxCloSpec.Constructor,None)) + + CG.EmitInstr cgbuf (pop ilCloFreeVars.Length) (Push [ilCloRetTyOuter]) (I_newobj (ilxCloSpec.Constructor, None)) GenSequel cenv eenvouter.cloc cgbuf sequel /// Generate the class for a closure type definition -and GenClosureTypeDefs cenv (tref:ILTypeRef, ilGenParams, attrs, ilCloFreeVars, ilCloLambdas, ilCtorBody, mdefs, mimpls,ext, ilIntfTys) = +and GenClosureTypeDefs cenv (tref: ILTypeRef, ilGenParams, attrs, ilCloFreeVars, ilCloLambdas, ilCtorBody, mdefs, mimpls, ext, ilIntfTys) = - let cloInfo = + let cloInfo = { cloFreeVars=ilCloFreeVars cloStructure=ilCloLambdas cloCode=notlazy ilCtorBody } - let tdef = + let tdef = ILTypeDef.Create(name = tref.Name, layout = ILTypeDefLayout.Auto, attributes = enum 0, @@ -4028,36 +4196,39 @@ and GenClosureTypeDefs cenv (tref:ILTypeRef, ilGenParams, attrs, ilCloFreeVars, let tdefs = EraseClosures.convIlxClosureDef cenv.g.ilxPubCloEnv tref.Enclosing tdef cloInfo tdefs - -and GenGenericParams cenv eenv tps = tps |> DropErasedTypars |> List.map (GenGenericParam cenv eenv) -and GenGenericArgs m (tyenv:TypeReprEnv) tps = tps |> DropErasedTypars |> List.map (fun c -> (mkILTyvarTy tyenv.[c,m])) + +and GenGenericParams cenv eenv tps = + tps |> DropErasedTypars |> List.map (GenGenericParam cenv eenv) -/// Generate the closure class for a function -and GenLambdaClosure cenv (cgbuf:CodeGenBuffer) eenv isLocalTypeFunc selfv expr = - match expr with - | Expr.Lambda (_,_,_,_,_,m,_) - | Expr.TyLambda(_,_,_,m,_) -> - - let cloinfo,body,eenvinner = GetIlxClosureInfo cenv m isLocalTypeFunc selfv eenv expr - - let entryPointInfo = - match selfv with +and GenGenericArgs m (tyenv: TypeReprEnv) tps = + tps |> DropErasedTypars |> List.map (fun c -> (mkILTyvarTy tyenv.[c, m])) + +/// Generate the closure class for a function +and GenLambdaClosure cenv (cgbuf: CodeGenBuffer) eenv isLocalTypeFunc selfv expr = + match expr with + | Expr.Lambda (_, _, _, _, _, m, _) + | Expr.TyLambda(_, _, _, m, _) -> + + let cloinfo, body, eenvinner = GetIlxClosureInfo cenv m isLocalTypeFunc selfv eenv expr + + let entryPointInfo = + match selfv with | Some v -> [(v, BranchCallClosure (cloinfo.cloArityInfo))] | _ -> [] - let ilCloBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,entryPointInfo,cloinfo.cloName,eenvinner,1,body,Return) + let ilCloBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways, entryPointInfo, cloinfo.cloName, eenvinner, 1, body, Return) let ilCloTypeRef = cloinfo.cloSpec.TypeRef - let cloTypeDefs = - if isLocalTypeFunc then + let cloTypeDefs = + if isLocalTypeFunc then // Work out the contract type and generate a class with an abstract method for this type - let (ilContractGenericParams,ilContractMethTyargs,ilContractTySpec:ILTypeSpec,ilContractFormalRetTy) = GenNamedLocalTypeFuncContractInfo cenv eenv m cloinfo + let (ilContractGenericParams, ilContractMethTyargs, ilContractTySpec: ILTypeSpec, ilContractFormalRetTy) = GenNamedLocalTypeFuncContractInfo cenv eenv m cloinfo let ilContractTypeRef = ilContractTySpec.TypeRef let ilContractTy = mkILFormalBoxedTy ilContractTypeRef ilContractGenericParams - let ilContractCtor = mkILNonGenericEmptyCtor None cenv.g.ilg.typ_Object + let ilContractCtor = mkILNonGenericEmptyCtor None cenv.g.ilg.typ_Object - let ilContractMeths = [ilContractCtor; mkILGenericVirtualMethod("DirectInvoke",ILMemberAccess.Assembly,ilContractMethTyargs,[],mkILReturn ilContractFormalRetTy, MethodBody.Abstract) ] - let ilContractTypeDef = + let ilContractMeths = [ilContractCtor; mkILGenericVirtualMethod("DirectInvoke", ILMemberAccess.Assembly, ilContractMethTyargs, [], mkILReturn ilContractFormalRetTy, MethodBody.Abstract) ] + let ilContractTypeDef = ILTypeDef.Create(name = ilContractTypeRef.Name, layout = ILTypeDefLayout.Auto, attributes = enum 0, @@ -4074,7 +4245,7 @@ and GenLambdaClosure cenv (cgbuf:CodeGenBuffer) eenv isLocalTypeFunc selfv expr securityDecls= emptyILSecurityDecls) // the contract type is an abstract type and not sealed - let ilContractTypeDef = + let ilContractTypeDef = ilContractTypeDef .WithAbstract(true) .WithAccess(ComputeTypeAccess ilContractTypeRef true) @@ -4082,192 +4253,192 @@ and GenLambdaClosure cenv (cgbuf:CodeGenBuffer) eenv isLocalTypeFunc selfv expr .WithSpecialName(true) .WithLayout(ILTypeDefLayout.Auto) .WithInitSemantics(ILTypeInit.BeforeField) - .WithEncoding(ILDefaultPInvokeEncoding.Auto) + .WithEncoding(ILDefaultPInvokeEncoding.Auto) cgbuf.mgbuf.AddTypeDef(ilContractTypeRef, ilContractTypeDef, false, false, None) - - let ilCtorBody = mkILMethodBody (true,[],8,nonBranchingInstrsToCode (mkCallBaseConstructor(ilContractTy,[])), None ) - let cloMethods = [ mkILGenericVirtualMethod("DirectInvoke",ILMemberAccess.Assembly,cloinfo.localTypeFuncDirectILGenericParams,[],mkILReturn (cloinfo.cloILFormalRetTy), MethodBody.IL ilCloBody) ] - let cloTypeDefs = GenClosureTypeDefs cenv (ilCloTypeRef,cloinfo.cloILGenericParams,[],cloinfo.cloILFreeVars,cloinfo.ilCloLambdas,ilCtorBody,cloMethods,[],ilContractTy,[]) + + let ilCtorBody = mkILMethodBody (true, [], 8, nonBranchingInstrsToCode (mkCallBaseConstructor(ilContractTy, [])), None ) + let cloMethods = [ mkILGenericVirtualMethod("DirectInvoke", ILMemberAccess.Assembly, cloinfo.localTypeFuncDirectILGenericParams, [], mkILReturn (cloinfo.cloILFormalRetTy), MethodBody.IL ilCloBody) ] + let cloTypeDefs = GenClosureTypeDefs cenv (ilCloTypeRef, cloinfo.cloILGenericParams, [], cloinfo.cloILFreeVars, cloinfo.ilCloLambdas, ilCtorBody, cloMethods, [], ilContractTy, []) cloTypeDefs - - else - GenClosureTypeDefs cenv (ilCloTypeRef,cloinfo.cloILGenericParams,[],cloinfo.cloILFreeVars,cloinfo.ilCloLambdas,ilCloBody,[],[],cenv.g.ilg.typ_Object,[]) + + else + GenClosureTypeDefs cenv (ilCloTypeRef, cloinfo.cloILGenericParams, [], cloinfo.cloILFreeVars, cloinfo.ilCloLambdas, ilCloBody, [], [], cenv.g.ilg.typ_Object, []) CountClosure() - for cloTypeDef in cloTypeDefs do + for cloTypeDef in cloTypeDefs do cgbuf.mgbuf.AddTypeDef(ilCloTypeRef, cloTypeDef, false, false, None) - cloinfo,m - | _ -> failwith "GenLambda: not a lambda" - -and GenLambdaVal cenv (cgbuf:CodeGenBuffer) eenv (cloinfo,m) = + cloinfo, m + + | _ -> failwith "GenLambda: not a lambda" + +and GenLambdaVal cenv (cgbuf: CodeGenBuffer) eenv (cloinfo, m) = GenGetLocalVals cenv cgbuf eenv m cloinfo.cloFreeVars - CG.EmitInstr cgbuf - (pop cloinfo.cloILFreeVars.Length) - (Push [EraseClosures.mkTyOfLambdas cenv.g.ilxPubCloEnv cloinfo.ilCloLambdas]) - (I_newobj (cloinfo.cloSpec.Constructor,None)) + CG.EmitInstr cgbuf + (pop cloinfo.cloILFreeVars.Length) + (Push [EraseClosures.mkTyOfLambdas cenv.g.ilxPubCloEnv cloinfo.ilCloLambdas]) + (I_newobj (cloinfo.cloSpec.Constructor, None)) and GenLambda cenv cgbuf eenv isLocalTypeFunc selfv expr sequel = - let cloinfo,m = GenLambdaClosure cenv cgbuf eenv isLocalTypeFunc selfv expr - GenLambdaVal cenv cgbuf eenv (cloinfo,m) + let cloinfo, m = GenLambdaClosure cenv cgbuf eenv isLocalTypeFunc selfv expr + GenLambdaVal cenv cgbuf eenv (cloinfo, m) GenSequel cenv eenv.cloc cgbuf sequel -and GenTypeOfVal cenv eenv (v:Val) = +and GenTypeOfVal cenv eenv (v: Val) = GenType cenv.amap v.Range eenv.tyenv v.Type -and GenFreevar cenv m eenvouter tyenvinner (fv:Val) = - match StorageForVal m fv eenvouter with +and GenFreevar cenv m eenvouter tyenvinner (fv: Val) = + match StorageForVal m fv eenvouter with // Local type functions - | Local(_, _, Some _) | Env(_,_,_,Some _) -> cenv.g.ilg.typ_Object + | Local(_, _, Some _) | Env(_, _, _, Some _) -> cenv.g.ilg.typ_Object #if DEBUG // Check for things that should never make it into the free variable set. Only do this in debug for performance reasons - | (StaticField _ | StaticProperty _ | Method _ | Null) -> error(InternalError("GenFreevar: compiler error: unexpected unrealized value",fv.Range)) + | (StaticField _ | StaticProperty _ | Method _ | Null) -> error(InternalError("GenFreevar: compiler error: unexpected unrealized value", fv.Range)) #endif | _ -> GenType cenv.amap m tyenvinner fv.Type and GetIlxClosureFreeVars cenv m selfv eenvouter takenNames expr = // Choose a base name for the closure - let basename = - let boundv = eenvouter.letBoundVars |> List.tryFind (fun v -> not v.IsCompilerGenerated) + let basename = + let boundv = eenvouter.letBoundVars |> List.tryFind (fun v -> not v.IsCompilerGenerated) match boundv with | Some v -> v.CompiledName | None -> "clo" // Get a unique stamp for the closure. This must be stable for things that can be part of a let rec. - let uniq = - match expr with - | Expr.Obj (uniq,_,_,_,_,_,_) - | Expr.Lambda (uniq,_,_,_,_,_,_) - | Expr.TyLambda(uniq,_,_,_,_) -> uniq + let uniq = + match expr with + | Expr.Obj (uniq, _, _, _, _, _, _) + | Expr.Lambda (uniq, _, _, _, _, _, _) + | Expr.TyLambda(uniq, _, _, _, _) -> uniq | _ -> newUnique() // Choose a name for the closure - let ilCloTypeRef = + let ilCloTypeRef = // FSharp 1.0 bug 3404: System.Reflection doesn't like '.' and '`' in type names let basenameSafeForUseAsTypename = CleanUpGeneratedTypeName basename let suffixmark = expr.Range - let cloName = globalStableNameGenerator.GetUniqueCompilerGeneratedName(basenameSafeForUseAsTypename,suffixmark,uniq) + let cloName = globalStableNameGenerator.GetUniqueCompilerGeneratedName(basenameSafeForUseAsTypename, suffixmark, uniq) NestedTypeRefForCompLoc eenvouter.cloc cloName // Collect the free variables of the closure - let cloFreeVarResults = freeInExpr CollectTyparsAndLocals expr + let cloFreeVarResults = freeInExpr CollectTyparsAndLocals expr - // Partition the free variables when some can be accessed from places besides the immediate environment - // Also filter out the current value being bound, if any, as it is available from the "this" - // pointer which gives the current closure itself. This is in the case e.g. let rec f = ... f ... - let cloFreeVars = + // Partition the free variables when some can be accessed from places besides the immediate environment + // Also filter out the current value being bound, if any, as it is available from the "this" + // pointer which gives the current closure itself. This is in the case e.g. let rec f = ... f ... + let cloFreeVars = cloFreeVarResults.FreeLocals - |> Zset.elements - |> List.filter (fun fv -> - match StorageForVal m fv eenvouter with + |> Zset.elements + |> List.filter (fun fv -> + match StorageForVal m fv eenvouter with | (StaticField _ | StaticProperty _ | Method _ | Null) -> false - | _ -> - match selfv with - | Some v -> not (valRefEq cenv.g (mkLocalValRef fv) v) + | _ -> + match selfv with + | Some v -> not (valRefEq cenv.g (mkLocalValRef fv) v) | _ -> true) // The general shape is: - // {LAM . expr }[free-typars] : overall-type[contract-typars] + // {LAM . expr }[free-typars]: overall-type[contract-typars] // Then // internal-typars = free-typars - contract-typars // // In other words, the free type variables get divided into two sets - // -- "contract" ones, which are part of the return type. We separate these to enable use to + // -- "contract" ones, which are part of the return type. We separate these to enable use to // bake our own function base contracts for local type functions // // -- "internal" ones, which get used internally in the implementation - let cloContractFreeTyvarSet = (freeInType CollectTypars (tyOfExpr cenv.g expr)).FreeTypars - - let cloInternalFreeTyvars = Zset.diff cloFreeVarResults.FreeTyvars.FreeTypars cloContractFreeTyvarSet |> Zset.elements + let cloContractFreeTyvarSet = (freeInType CollectTypars (tyOfExpr cenv.g expr)).FreeTypars + + let cloInternalFreeTyvars = Zset.diff cloFreeVarResults.FreeTyvars.FreeTypars cloContractFreeTyvarSet |> Zset.elements let cloContractFreeTyvars = cloContractFreeTyvarSet |> Zset.elements - + let cloFreeTyvars = cloContractFreeTyvars @ cloInternalFreeTyvars - + let cloAttribs = [] let eenvinner = eenvouter |> EnvForTypars cloFreeTyvars - let ilCloTyInner = + let ilCloTyInner = let ilCloGenericParams = GenGenericParams cenv eenvinner cloFreeTyvars mkILFormalBoxedTy ilCloTypeRef ilCloGenericParams - // If generating a named closure, add the closure itself as a var, available via "arg0" . - // The latter doesn't apply for the delegate implementation of closures. + // If generating a named closure, add the closure itself as a var, available via "arg0" . + // The latter doesn't apply for the delegate implementation of closures. // Build the environment that is active inside the closure itself - let eenvinner = eenvinner |> AddStorageForLocalVals cenv.g (match selfv with | Some v -> [(v.Deref, Arg 0)] | _ -> []) + let eenvinner = eenvinner |> AddStorageForLocalVals cenv.g (match selfv with | Some v -> [(v.Deref, Arg 0)] | _ -> []) - let ilCloFreeVars = - let ilCloFreeVarNames = ChooseFreeVarNames takenNames (List.map nameOfVal cloFreeVars) - let ilCloFreeVars = (cloFreeVars,ilCloFreeVarNames) ||> List.map2 (fun fv nm -> mkILFreeVar (nm,fv.IsCompilerGenerated, GenFreevar cenv m eenvouter eenvinner.tyenv fv)) + let ilCloFreeVars = + let ilCloFreeVarNames = ChooseFreeVarNames takenNames (List.map nameOfVal cloFreeVars) + let ilCloFreeVars = (cloFreeVars, ilCloFreeVarNames) ||> List.map2 (fun fv nm -> mkILFreeVar (nm, fv.IsCompilerGenerated, GenFreevar cenv m eenvouter eenvinner.tyenv fv)) ilCloFreeVars - let ilCloFreeVarStorage = - (cloFreeVars,ilCloFreeVars) ||> List.mapi2 (fun i v fv -> - let localCloInfo = - match StorageForVal m v eenvouter with - | Local(_, _, localCloInfo) - | Env(_,_,_,localCloInfo) -> localCloInfo + let ilCloFreeVarStorage = + (cloFreeVars, ilCloFreeVars) ||> List.mapi2 (fun i v fv -> + let localCloInfo = + match StorageForVal m v eenvouter with + | Local(_, _, localCloInfo) + | Env(_, _, _, localCloInfo) -> localCloInfo | _ -> None - let ilField = mkILFieldSpecInTy (ilCloTyInner,fv.fvName,fv.fvType) + let ilField = mkILFieldSpecInTy (ilCloTyInner, fv.fvName, fv.fvType) - (v,Env(ilCloTyInner,i,ilField,localCloInfo))) + (v, Env(ilCloTyInner, i, ilField, localCloInfo))) let eenvinner = eenvinner |> AddStorageForLocalVals cenv.g ilCloFreeVarStorage - // Return a various results - (cloAttribs,cloInternalFreeTyvars,cloContractFreeTyvars,cloFreeTyvars,cloFreeVars,ilCloTypeRef,Array.ofList ilCloFreeVars,eenvinner) + (cloAttribs, cloInternalFreeTyvars, cloContractFreeTyvars, cloFreeTyvars, cloFreeVars, ilCloTypeRef, Array.ofList ilCloFreeVars, eenvinner) and GetIlxClosureInfo cenv m isLocalTypeFunc selfv eenvouter expr = - let returnTy = - match expr with - | Expr.Lambda (_,_,_,_,_,_,returnTy) | Expr.TyLambda(_,_,_,_,returnTy) -> returnTy - | Expr.Obj(_,ty,_,_,_,_,_) -> ty + let returnTy = + match expr with + | Expr.Lambda (_, _, _, _, _, _, returnTy) | Expr.TyLambda(_, _, _, _, returnTy) -> returnTy + | Expr.Obj(_, ty, _, _, _, _, _) -> ty | _ -> failwith "GetIlxClosureInfo: not a lambda expression" // Determine the structure of the closure. We do this before analyzing free variables to // determine the taken argument names. - let tvsl, vs, body, returnTy = - let rec getCallStructure tvacc vacc (e,ety) = - match e with - | Expr.TyLambda(_,tvs,body,_m,bty) -> - getCallStructure ((DropErasedTypars tvs) :: tvacc) vacc (body,bty) - | Expr.Lambda (_,_,_,vs,body,_,bty) when not isLocalTypeFunc -> - // Transform a lambda taking untupled arguments into one - // taking only a single tupled argument if necessary. REVIEW: do this earlier - let tupledv, body = MultiLambdaToTupledLambda cenv.g vs body - getCallStructure tvacc (tupledv :: vacc) (body,bty) - | _ -> + let tvsl, vs, body, returnTy = + let rec getCallStructure tvacc vacc (e, ety) = + match e with + | Expr.TyLambda(_, tvs, body, _m, bty) -> + getCallStructure ((DropErasedTypars tvs) :: tvacc) vacc (body, bty) + | Expr.Lambda (_, _, _, vs, body, _, bty) when not isLocalTypeFunc -> + // Transform a lambda taking untupled arguments into one + // taking only a single tupled argument if necessary. REVIEW: do this earlier + let tupledv, body = MultiLambdaToTupledLambda cenv.g vs body + getCallStructure tvacc (tupledv :: vacc) (body, bty) + | _ -> (List.rev tvacc, List.rev vacc, e, ety) - getCallStructure [] [] (expr,returnTy) + getCallStructure [] [] (expr, returnTy) let takenNames = vs |> List.map (fun v -> v.CompiledName) // Get the free variables and the information about the closure, add the free variables to the environment - let (cloAttribs,cloInternalFreeTyvars,cloContractFreeTyvars,_,cloFreeVars,ilCloTypeRef,ilCloFreeVars,eenvinner) = GetIlxClosureFreeVars cenv m selfv eenvouter takenNames expr + let (cloAttribs, cloInternalFreeTyvars, cloContractFreeTyvars, _, cloFreeVars, ilCloTypeRef, ilCloFreeVars, eenvinner) = GetIlxClosureFreeVars cenv m selfv eenvouter takenNames expr // Put the type and value arguments into the environment - let rec getClosureArgs eenv ntmargs tvsl (vs:Val list) = - match tvsl, vs with - | tvs :: rest, _ -> + let rec getClosureArgs eenv ntmargs tvsl (vs: Val list) = + match tvsl, vs with + | tvs :: rest, _ -> let eenv = AddTyparsToEnv tvs eenv - let l,eenv = getClosureArgs eenv ntmargs rest vs - let lambdas = (tvs, l) ||> List.foldBack (fun tv sofar -> Lambdas_forall(GenGenericParam cenv eenv tv,sofar)) - lambdas,eenv - | [], v :: rest -> + let l, eenv = getClosureArgs eenv ntmargs rest vs + let lambdas = (tvs, l) ||> List.foldBack (fun tv sofar -> Lambdas_forall(GenGenericParam cenv eenv tv, sofar)) + lambdas, eenv + | [], v :: rest -> let nm = v.CompiledName - let l,eenv = - let eenv = AddStorageForVal cenv.g (v,notlazy (Arg ntmargs)) eenv + let l, eenv = + let eenv = AddStorageForVal cenv.g (v, notlazy (Arg ntmargs)) eenv getClosureArgs eenv (ntmargs+1) [] rest - let lambdas = Lambdas_lambda (mkILParamNamed(nm,GenTypeOfVal cenv eenv v),l) - lambdas,eenv - | _ -> + let lambdas = Lambdas_lambda (mkILParamNamed(nm, GenTypeOfVal cenv eenv v), l) + lambdas, eenv + | _ -> let returnTy' = GenType cenv.amap m eenv.tyenv returnTy Lambdas_return returnTy', eenv // start at arg number 1 as "this" pointer holds the current closure - let ilCloLambdas,eenvinner = getClosureArgs eenvinner 1 tvsl vs + let ilCloLambdas, eenvinner = getClosureArgs eenvinner 1 tvsl vs // Arity info: one argument at each position let narginfo = vs |> List.map (fun _ -> 1) @@ -4276,7 +4447,7 @@ and GetIlxClosureInfo cenv m isLocalTypeFunc selfv eenvouter expr = let ilReturnTy = GenType cenv.amap m eenvinner.tyenv returnTy // The general shape is: - // {LAM . expr }[free-typars] : overall-type[contract-typars] + // {LAM . expr }[free-typars]: overall-type[contract-typars] // Then // internal-typars = free-typars - contract-typars // @@ -4285,24 +4456,24 @@ and GetIlxClosureInfo cenv m isLocalTypeFunc selfv eenvouter expr = // abstract DirectInvoke : overall-type // } // - // class ContractImplementation : Contract { + // class ContractImplementation : Contract { // override DirectInvoke : overall-type { expr } // } // // For a non-local type function closure, this becomes // - // class FunctionImplementation : FSharpTypeFunc { + // class FunctionImplementation : FSharpTypeFunc { // override Specialize : overall-type { expr } // } // // For a normal function closure, is empty, and this becomes // - // class FunctionImplementation : overall-type { + // class FunctionImplementation : overall-type { // override Invoke(..) { expr } // } - + // In other words, the free type variables get divided into two sets - // -- "contract" ones, which are part of the return type. We separate these to enable use to + // -- "contract" ones, which are part of the return type. We separate these to enable use to // bake our own function base contracts for local type functions // // -- "internal" ones, which get used internally in the implementation @@ -4312,29 +4483,28 @@ and GetIlxClosureInfo cenv m isLocalTypeFunc selfv eenvouter expr = // function values. /// Compute the contract if it is a local type function - let ilContractGenericParams = GenGenericParams cenv eenvinner cloContractFreeTyvars + let ilContractGenericParams = GenGenericParams cenv eenvinner cloContractFreeTyvars let ilContractGenericActuals = GenGenericArgs m eenvouter.tyenv cloContractFreeTyvars - let ilInternalGenericParams = GenGenericParams cenv eenvinner cloInternalFreeTyvars + let ilInternalGenericParams = GenGenericParams cenv eenvinner cloInternalFreeTyvars let ilInternalGenericActuals = GenGenericArgs m eenvouter.tyenv cloInternalFreeTyvars let ilCloGenericFormals = ilContractGenericParams @ ilInternalGenericParams let ilCloGenericActuals = ilContractGenericActuals @ ilInternalGenericActuals - - let ilDirectGenericParams,ilReturnTy,ilCloLambdas = - if isLocalTypeFunc then - let rec strip lambdas acc = - match lambdas with - | Lambdas_forall(gp,r) -> strip r (gp::acc) - | Lambdas_return returnTy -> List.rev acc,returnTy,lambdas + let ilDirectGenericParams, ilReturnTy, ilCloLambdas = + if isLocalTypeFunc then + let rec strip lambdas acc = + match lambdas with + | Lambdas_forall(gp, r) -> strip r (gp::acc) + | Lambdas_return returnTy -> List.rev acc, returnTy, lambdas | _ -> failwith "AdjustNamedLocalTypeFuncIlxClosureInfo: local functions can currently only be type functions" strip ilCloLambdas [] - else - [],ilReturnTy,ilCloLambdas - + else + [], ilReturnTy, ilCloLambdas + let ilxCloSpec = IlxClosureSpec.Create(IlxClosureRef(ilCloTypeRef, ilCloLambdas, ilCloFreeVars), ilCloGenericActuals) - let cloinfo = + let cloinfo = { cloExpr=expr cloName=ilCloTypeRef.Name cloArityInfo =narginfo @@ -4346,66 +4516,66 @@ and GetIlxClosureInfo cenv m isLocalTypeFunc selfv eenvouter expr = cloFreeVars=cloFreeVars cloAttribs=cloAttribs localTypeFuncContractFreeTypars = cloContractFreeTyvars - localTypeFuncInternalFreeTypars = cloInternalFreeTyvars + localTypeFuncInternalFreeTypars = cloInternalFreeTyvars localTypeFuncILGenericArgs = ilContractGenericActuals localTypeFuncDirectILGenericParams = ilDirectGenericParams } - cloinfo,body,eenvinner + cloinfo, body, eenvinner //-------------------------------------------------------------------------- // Named local type functions -//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- -and IsNamedLocalTypeFuncVal g (v:Val) expr = +and IsNamedLocalTypeFuncVal g (v: Val) expr = not v.IsCompiledAsTopLevel && - IsGenericValWithGenericContraints g v && + IsGenericValWithGenericContraints g v && (match stripExpr expr with Expr.TyLambda _ -> true | _ -> false) - + /// Generate the information relevant to the contract portion of a named local type function -and GenNamedLocalTypeFuncContractInfo cenv eenv m cloinfo = +and GenNamedLocalTypeFuncContractInfo cenv eenv m cloinfo = let ilCloTypeRef = cloinfo.cloSpec.TypeRef - let ilContractTypeRef = ILTypeRef.Create(scope=ilCloTypeRef.Scope,enclosing=ilCloTypeRef.Enclosing,name=ilCloTypeRef.Name + "$contract") - let eenvForContract = EnvForTypars cloinfo.localTypeFuncContractFreeTypars eenv + let ilContractTypeRef = ILTypeRef.Create(scope=ilCloTypeRef.Scope, enclosing=ilCloTypeRef.Enclosing, name=ilCloTypeRef.Name + "$contract") + let eenvForContract = EnvForTypars cloinfo.localTypeFuncContractFreeTypars eenv let ilContractGenericParams = GenGenericParams cenv eenv cloinfo.localTypeFuncContractFreeTypars - let tvs,contractRetTy = - match cloinfo.cloExpr with - | Expr.TyLambda(_,tvs,_,_,bty) -> tvs, bty + let tvs, contractRetTy = + match cloinfo.cloExpr with + | Expr.TyLambda(_, tvs, _, _, bty) -> tvs, bty | e -> [], tyOfExpr cenv.g e - let eenvForContract = AddTyparsToEnv tvs eenvForContract + let eenvForContract = AddTyparsToEnv tvs eenvForContract let ilContractMethTyargs = GenGenericParams cenv eenvForContract tvs let ilContractFormalRetTy = GenType cenv.amap m eenvForContract.tyenv contractRetTy - ilContractGenericParams,ilContractMethTyargs,mkILTySpec(ilContractTypeRef,cloinfo.localTypeFuncILGenericArgs),ilContractFormalRetTy + ilContractGenericParams, ilContractMethTyargs, mkILTySpec(ilContractTypeRef, cloinfo.localTypeFuncILGenericArgs), ilContractFormalRetTy /// Generate a new delegate construction including a closure class if necessary. This is a lot like generating function closures /// and object expression closures, and most of the code is shared. -and GenDelegateExpr cenv cgbuf eenvouter expr (TObjExprMethod((TSlotSig(_,delegateTy, _,_,_, _) as slotsig),_attribs,methTyparsOfOverridingMethod,tmvs,body,_),m) sequel = - // Get the instantiation of the delegate type +and GenDelegateExpr cenv cgbuf eenvouter expr (TObjExprMethod((TSlotSig(_, delegateTy, _, _, _, _) as slotsig), _attribs, methTyparsOfOverridingMethod, tmvs, body, _), m) sequel = + // Get the instantiation of the delegate type let ilCtxtDelTy = GenType cenv.amap m eenvouter.tyenv delegateTy let tmvs = List.concat tmvs - // Yuck. TLBIMP.EXE generated APIs use UIntPtr for the delegate ctor. - let useUIntPtrForDelegateCtor = - try - if isILAppTy cenv.g delegateTy then + // Yuck. TLBIMP.EXE generated APIs use UIntPtr for the delegate ctor. + let useUIntPtrForDelegateCtor = + try + if isILAppTy cenv.g delegateTy then let tcref = tcrefOfAppTy cenv.g delegateTy let tdef = tcref.ILTyconRawMetadata - match tdef.Methods.FindByName ".ctor" with - | [ctorMDef] -> - match ctorMDef.Parameters with + match tdef.Methods.FindByName ".ctor" with + | [ctorMDef] -> + match ctorMDef.Parameters with | [ _;p2 ] -> (p2.Type.TypeSpec.Name = "System.UIntPtr") | _ -> false | _ -> false - else - false - with _ -> + else + false + with _ -> false - - // Work out the free type variables for the morphing thunk + + // Work out the free type variables for the morphing thunk let takenNames = List.map nameOfVal tmvs - let (cloAttribs,_,_,cloFreeTyvars,cloFreeVars,ilDelegeeTypeRef,ilCloFreeVars,eenvinner) = GetIlxClosureFreeVars cenv m None eenvouter takenNames expr + let (cloAttribs, _, _, cloFreeTyvars, cloFreeVars, ilDelegeeTypeRef, ilCloFreeVars, eenvinner) = GetIlxClosureFreeVars cenv m None eenvouter takenNames expr let ilDelegeeGenericParams = GenGenericParams cenv eenvinner cloFreeTyvars let ilDelegeeGenericActualsInner = mkILFormalGenericArgs 0 ilDelegeeGenericParams - // Create a new closure class with a single "delegee" method that implements the delegate. + // Create a new closure class with a single "delegee" method that implements the delegate. let delegeeMethName = "Invoke" let ilDelegeeTyInner = mkILBoxedTy ilDelegeeTypeRef ilDelegeeGenericActualsInner @@ -4414,16 +4584,16 @@ and GenDelegateExpr cenv cgbuf eenvouter expr (TObjExprMethod((TSlotSig(_,delega let numthis = 1 let tmvs, body = BindUnitVars cenv.g (tmvs, List.replicate (List.concat slotsig.FormalParams).Length ValReprInfo.unnamedTopArg1, body) - // The slot sig contains a formal instantiation. When creating delegates we're only - // interested in the actual instantiation since we don't have to emit a method impl. - let ilDelegeeParams,ilDelegeeRet = GenActualSlotsig m cenv envForDelegeeUnderTypars slotsig methTyparsOfOverridingMethod tmvs + // The slot sig contains a formal instantiation. When creating delegates we're only + // interested in the actual instantiation since we don't have to emit a method impl. + let ilDelegeeParams, ilDelegeeRet = GenActualSlotsig m cenv envForDelegeeUnderTypars slotsig methTyparsOfOverridingMethod tmvs - let envForDelegeeMeth = AddStorageForLocalVals cenv.g (List.mapi (fun i v -> (v,Arg (i+numthis))) tmvs) envForDelegeeUnderTypars - let ilMethodBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,[],delegeeMethName,envForDelegeeMeth,1,body,(if slotSigHasVoidReturnTy slotsig then discardAndReturnVoid else Return)) + let envForDelegeeMeth = AddStorageForLocalVals cenv.g (List.mapi (fun i v -> (v, Arg (i+numthis))) tmvs) envForDelegeeUnderTypars + let ilMethodBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways, [], delegeeMethName, envForDelegeeMeth, 1, body, (if slotSigHasVoidReturnTy slotsig then discardAndReturnVoid else Return)) let delegeeInvokeMeth = mkILNonGenericInstanceMethod - (delegeeMethName,ILMemberAccess.Assembly, - ilDelegeeParams, + (delegeeMethName, ILMemberAccess.Assembly, + ilDelegeeParams, ilDelegeeRet, MethodBody.IL ilMethodBody) let delegeeCtorMeth = mkILSimpleStorageCtor(None, Some cenv.g.ilg.typ_Object.TypeSpec, ilDelegeeTyInner, [], [], ILMemberAccess.Assembly) @@ -4431,84 +4601,80 @@ and GenDelegateExpr cenv cgbuf eenvouter expr (TObjExprMethod((TSlotSig(_,delega let ilCloLambdas = Lambdas_return ilCtxtDelTy let ilAttribs = GenAttrs cenv eenvinner cloAttribs - let cloTypeDefs = GenClosureTypeDefs cenv (ilDelegeeTypeRef,ilDelegeeGenericParams,ilAttribs,ilCloFreeVars,ilCloLambdas,ilCtorBody,[delegeeInvokeMeth],[],cenv.g.ilg.typ_Object,[]) - for cloTypeDef in cloTypeDefs do + let cloTypeDefs = GenClosureTypeDefs cenv (ilDelegeeTypeRef, ilDelegeeGenericParams, ilAttribs, ilCloFreeVars, ilCloLambdas, ilCtorBody, [delegeeInvokeMeth], [], cenv.g.ilg.typ_Object, []) + for cloTypeDef in cloTypeDefs do cgbuf.mgbuf.AddTypeDef(ilDelegeeTypeRef, cloTypeDef, false, false, None) CountClosure() let ctxtGenericArgsForDelegee = GenGenericArgs m eenvouter.tyenv cloFreeTyvars let ilxCloSpec = IlxClosureSpec.Create(IlxClosureRef(ilDelegeeTypeRef, ilCloLambdas, ilCloFreeVars), ctxtGenericArgsForDelegee) GenGetLocalVals cenv cgbuf eenvouter m cloFreeVars - CG.EmitInstr cgbuf (pop ilCloFreeVars.Length) (Push [EraseClosures.mkTyOfLambdas cenv.g.ilxPubCloEnv ilCloLambdas]) (I_newobj (ilxCloSpec.Constructor,None)) + CG.EmitInstr cgbuf (pop ilCloFreeVars.Length) (Push [EraseClosures.mkTyOfLambdas cenv.g.ilxPubCloEnv ilCloLambdas]) (I_newobj (ilxCloSpec.Constructor, None)) let ilDelegeeTyOuter = mkILBoxedTy ilDelegeeTypeRef ctxtGenericArgsForDelegee - let ilDelegeeInvokeMethOuter = mkILNonGenericInstanceMethSpecInTy (ilDelegeeTyOuter,"Invoke",typesOfILParams ilDelegeeParams, ilDelegeeRet.Type) - let ilDelegeeCtorMethOuter = mkCtorMethSpecForDelegate cenv.g.ilg (ilCtxtDelTy,useUIntPtrForDelegateCtor) + let ilDelegeeInvokeMethOuter = mkILNonGenericInstanceMethSpecInTy (ilDelegeeTyOuter, "Invoke", typesOfILParams ilDelegeeParams, ilDelegeeRet.Type) + let ilDelegeeCtorMethOuter = mkCtorMethSpecForDelegate cenv.g.ilg (ilCtxtDelTy, useUIntPtrForDelegateCtor) CG.EmitInstr cgbuf (pop 0) (Push [cenv.g.ilg.typ_IntPtr]) (I_ldftn ilDelegeeInvokeMethOuter) - CG.EmitInstr cgbuf (pop 2) (Push [ilCtxtDelTy]) (I_newobj(ilDelegeeCtorMethOuter,None)) + CG.EmitInstr cgbuf (pop 2) (Push [ilCtxtDelTy]) (I_newobj(ilDelegeeCtorMethOuter, None)) GenSequel cenv eenvouter.cloc cgbuf sequel -//------------------------------------------------------------------------- -// Generate statically-resolved conditionals used for type-directed optimizations. -//------------------------------------------------------------------------- - -and GenStaticOptimization cenv cgbuf eenv (constraints,e2,e3,_m) sequel = - let e = - if DecideStaticOptimizations cenv.g constraints = StaticOptimizationAnswer.Yes then e2 +/// Generate statically-resolved conditionals used for type-directed optimizations. +and GenStaticOptimization cenv cgbuf eenv (constraints, e2, e3, _m) sequel = + let e = + if DecideStaticOptimizations cenv.g constraints = StaticOptimizationAnswer.Yes then e2 else e3 GenExpr cenv cgbuf eenv SPSuppress e sequel - //------------------------------------------------------------------------- // Generate discrimination trees -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- -and IsSequelImmediate sequel = - match sequel with +and IsSequelImmediate sequel = + match sequel with (* All of these can be done at the end of each branch - we don't need a real join point *) - | Return | ReturnVoid | Br _ | LeaveHandler _ -> true - | DiscardThen sequel -> IsSequelImmediate sequel + | Return | ReturnVoid | Br _ | LeaveHandler _ -> true + | DiscardThen sequel -> IsSequelImmediate sequel | _ -> false /// Generate a point where several branches of control flow can merge back together, e.g. after a conditional /// or 'match'. -and GenJoinPoint cenv cgbuf pos eenv ty m sequel = +and GenJoinPoint cenv cgbuf pos eenv ty m sequel = // What the join point does depends on the contents of the sequel. For example, if the sequal is "return" then // each branch can just return and no true join point is needed. - match sequel with - // All of these can be done at the end of each branch - we don't need a real join point - | _ when IsSequelImmediate sequel -> + match sequel with + // All of these can be done at the end of each branch - we don't need a real join point + | _ when IsSequelImmediate sequel -> let stackAfterJoin = cgbuf.GetCurrentStack() - let afterJoin = CG.GenerateDelayMark cgbuf (pos + "_join") - sequel,afterJoin,stackAfterJoin,Continue - - // We end scopes at the join point, if any - | EndLocalScope(sq,mark) -> - let sequelNow,afterJoin,stackAfterJoin,sequelAfterJoin = GenJoinPoint cenv cgbuf pos eenv ty m sq - sequelNow,afterJoin,stackAfterJoin,EndLocalScope(sequelAfterJoin,mark) - - // If something non-trivial happens after a discard then generate a join point, but first discard the value (often this means we won't generate it at all) - | DiscardThen sequel -> - let stackAfterJoin = cgbuf.GetCurrentStack() - let afterJoin = CG.GenerateDelayMark cgbuf (pos + "_join") - DiscardThen (Br afterJoin),afterJoin,stackAfterJoin,sequel - - // The others (e.g. Continue, LeaveFilter and CmpThenBrOrContinue) can't be done at the end of each branch. We must create a join point. - | _ -> + let afterJoin = CG.GenerateDelayMark cgbuf (pos + "_join") + sequel, afterJoin, stackAfterJoin, Continue + + // We end scopes at the join point, if any + | EndLocalScope(sq, mark) -> + let sequelNow, afterJoin, stackAfterJoin, sequelAfterJoin = GenJoinPoint cenv cgbuf pos eenv ty m sq + sequelNow, afterJoin, stackAfterJoin, EndLocalScope(sequelAfterJoin, mark) + + // If something non-trivial happens after a discard then generate a join point, but first discard the value (often this means we won't generate it at all) + | DiscardThen sequel -> + let stackAfterJoin = cgbuf.GetCurrentStack() + let afterJoin = CG.GenerateDelayMark cgbuf (pos + "_join") + DiscardThen (Br afterJoin), afterJoin, stackAfterJoin, sequel + + // The others (e.g. Continue, LeaveFilter and CmpThenBrOrContinue) can't be done at the end of each branch. We must create a join point. + | _ -> let pushed = GenType cenv.amap m eenv.tyenv ty let stackAfterJoin = (pushed :: (cgbuf.GetCurrentStack())) - let afterJoin = CG.GenerateDelayMark cgbuf (pos + "_join") - // go to the join point - Br afterJoin, afterJoin,stackAfterJoin,sequel - -and GenMatch cenv cgbuf eenv (spBind,_exprm,tree,targets,m,ty) sequel = + let afterJoin = CG.GenerateDelayMark cgbuf (pos + "_join") + // go to the join point + Br afterJoin, afterJoin, stackAfterJoin, sequel + +and GenMatch cenv cgbuf eenv (spBind, _exprm, tree, targets, m, ty) sequel = - match spBind with + match spBind with | SequencePointAtBinding m -> CG.EmitSeqPoint cgbuf m | NoSequencePointAtDoBinding | NoSequencePointAtLetBinding - | NoSequencePointAtInvisibleBinding + | NoSequencePointAtInvisibleBinding | NoSequencePointAtStickyBinding -> () // The target of branch needs a sequence point. @@ -4518,28 +4684,28 @@ and GenMatch cenv cgbuf eenv (spBind,_exprm,tree,targets,m,ty) sequel = // // NOTE: sadly this causes multiple sequence points to appear for the "initial" location of an if/then/else or match. let activeSP = cgbuf.GetLastSequencePoint() - let repeatSP() = - match activeSP with - | None -> () - | Some src -> - if activeSP <> cgbuf.GetLastSequencePoint() then + let repeatSP() = + match activeSP with + | None -> () + | Some src -> + if activeSP <> cgbuf.GetLastSequencePoint() then CG.EmitSeqPoint cgbuf src - // First try the common cases where we don't need a join point. - match tree with - | TDSuccess _ -> + // First try the common cases where we don't need a join point. + match tree with + | TDSuccess _ -> failwith "internal error: matches that immediately succeed should have been normalized using mkAndSimplifyMatch" - | _ -> - // Create a join point - let stackAtTargets = cgbuf.GetCurrentStack() // the stack at the target of each clause - let (sequelOnBranches,afterJoin,stackAfterJoin,sequelAfterJoin) = GenJoinPoint cenv cgbuf "match" eenv ty m sequel + | _ -> + // Create a join point + let stackAtTargets = cgbuf.GetCurrentStack() // the stack at the target of each clause + let (sequelOnBranches, afterJoin, stackAfterJoin, sequelAfterJoin) = GenJoinPoint cenv cgbuf "match" eenv ty m sequel // Stack: "stackAtTargets" is "stack prior to any match-testing" and also "stack at the start of each branch-RHS". // match-testing (dtrees) should not contribute to the stack. // Each branch-RHS (targets) may contribute to the stack, leaving it in the "stackAfterJoin" state, for the join point. // Since code is branching and joining, the cgbuf stack is maintained manually. - GenDecisionTreeAndTargets cenv cgbuf stackAtTargets eenv tree targets repeatSP sequelOnBranches + GenDecisionTreeAndTargets cenv cgbuf stackAtTargets eenv tree targets repeatSP sequelOnBranches CG.SetMarkToHere cgbuf afterJoin //assert(cgbuf.GetCurrentStack() = stackAfterJoin) // REVIEW: Since gen_dtree* now sets stack, stack should be stackAfterJoin at this point... @@ -4555,116 +4721,116 @@ and GenMatch cenv cgbuf eenv (spBind,_exprm,tree,targets,m,ty) sequel = // // In both cases, any instructions that come after this point will be falsely associated with the last branch of the control // prior to the join point. This is base, e.g. see FSharp 1.0 bug 5155 - if not (isNil stackAfterJoin) then + if not (isNil stackAfterJoin) then cgbuf.EmitStartOfHiddenCode() GenSequel cenv eenv.cloc cgbuf sequelAfterJoin // Accumulate the decision graph as we go -and GenDecisionTreeAndTargets cenv cgbuf stackAtTargets eenv tree targets repeatSP sequel = +and GenDecisionTreeAndTargets cenv cgbuf stackAtTargets eenv tree targets repeatSP sequel = let targetInfos = GenDecisionTreeAndTargetsInner cenv cgbuf None stackAtTargets eenv tree targets repeatSP (IntMap.empty()) sequel GenPostponedDecisionTreeTargets cenv cgbuf stackAtTargets targetInfos sequel - -and TryFindTargetInfo targetInfos n = - match IntMap.tryFind n targetInfos with - | Some (targetInfo,_) -> Some targetInfo + +and TryFindTargetInfo targetInfos n = + match IntMap.tryFind n targetInfos with + | Some (targetInfo, _) -> Some targetInfo | None -> None /// When inplabOpt is None, we are assuming a branch or fallthrough to the current code location /// /// When inplabOpt is "Some inplab", we are assuming an existing branch to "inplab" and can optionally -/// set inplab to point to another location if no codegen is required. -and GenDecisionTreeAndTargetsInner cenv cgbuf inplabOpt stackAtTargets eenv tree targets repeatSP targetInfos sequel = +/// set inplab to point to another location if no codegen is required. +and GenDecisionTreeAndTargetsInner cenv cgbuf inplabOpt stackAtTargets eenv tree targets repeatSP targetInfos sequel = CG.SetStack cgbuf stackAtTargets // Set the expected initial stack. - match tree with - | TDBind(bind,rest) -> + match tree with + | TDBind(bind, rest) -> match inplabOpt with Some inplab -> CG.SetMarkToHere cgbuf inplab | None -> () - let startScope,endScope as scopeMarks = StartDelayedLocalScope "dtreeBind" cgbuf + let startScope, endScope as scopeMarks = StartDelayedLocalScope "dtreeBind" cgbuf let eenv = AllocStorageForBind cenv cgbuf scopeMarks eenv bind let sp = GenSequencePointForBind cenv cgbuf bind GenBindingAfterSequencePoint cenv cgbuf eenv sp bind (Some startScope) - // We don't get the scope marks quite right for dtree-bound variables. This is because - // we effectively lose an EndLocalScope for all dtrees that go to the same target - // So we just pretend that the variable goes out of scope here. + // We don't get the scope marks quite right for dtree-bound variables. This is because + // we effectively lose an EndLocalScope for all dtrees that go to the same target + // So we just pretend that the variable goes out of scope here. CG.SetMarkToHere cgbuf endScope GenDecisionTreeAndTargetsInner cenv cgbuf None stackAtTargets eenv rest targets repeatSP targetInfos sequel - | TDSuccess (es,targetIdx) -> - GenDecisionTreeSuccess cenv cgbuf inplabOpt stackAtTargets eenv es targetIdx targets repeatSP targetInfos sequel + | TDSuccess (es, targetIdx) -> + GenDecisionTreeSuccess cenv cgbuf inplabOpt stackAtTargets eenv es targetIdx targets repeatSP targetInfos sequel - | TDSwitch(e, cases, dflt,m) -> - GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases dflt m targets repeatSP targetInfos sequel + | TDSwitch(e, cases, dflt, m) -> + GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases dflt m targets repeatSP targetInfos sequel and GetTarget (targets:_[]) n = if n >= targets.Length then failwith "GetTarget: target not found in decision tree" targets.[n] -and GenDecisionTreeSuccess cenv cgbuf inplabOpt stackAtTargets eenv es targetIdx targets repeatSP targetInfos sequel = - let (TTarget(vs,successExpr,spTarget)) = GetTarget targets targetIdx +and GenDecisionTreeSuccess cenv cgbuf inplabOpt stackAtTargets eenv es targetIdx targets repeatSP targetInfos sequel = + let (TTarget(vs, successExpr, spTarget)) = GetTarget targets targetIdx match TryFindTargetInfo targetInfos targetIdx with - | Some (_,targetMarkAfterBinds:Mark,eenvAtTarget,_,_,_,_,_,_,_) -> - - // If not binding anything we can go directly to the targetMarkAfterBinds point - // This is useful to avoid lots of branches e.g. in match A | B | C -> e - // In this case each case will just go straight to "e" - if isNil vs then - match inplabOpt with - | None -> CG.EmitInstr cgbuf (pop 0) Push0 (I_br targetMarkAfterBinds.CodeLabel) + | Some (_, targetMarkAfterBinds: Mark, eenvAtTarget, _, _, _, _, _, _, _) -> + + // If not binding anything we can go directly to the targetMarkAfterBinds point + // This is useful to avoid lots of branches e.g. in match A | B | C -> e + // In this case each case will just go straight to "e" + if isNil vs then + match inplabOpt with + | None -> CG.EmitInstr cgbuf (pop 0) Push0 (I_br targetMarkAfterBinds.CodeLabel) | Some inplab -> CG.SetMark cgbuf inplab targetMarkAfterBinds - else + else match inplabOpt with None -> () | Some inplab -> CG.SetMarkToHere cgbuf inplab repeatSP() // It would be better not to emit any expressions here, and instead push these assignments into the postponed target // However not all targets are currently postponed (we only postpone in debug code), pending further testing of the performance // impact of postponing. - (vs,es) ||> List.iter2 (GenBindingRhs cenv cgbuf eenv SPSuppress) - vs |> List.rev |> List.iter (fun v -> GenStoreVal cgbuf eenvAtTarget v.Range v) - CG.EmitInstr cgbuf (pop 0) Push0 (I_br targetMarkAfterBinds.CodeLabel) + (vs, es) ||> List.iter2 (GenBindingRhs cenv cgbuf eenv SPSuppress) + vs |> List.rev |> List.iter (fun v -> GenStoreVal cgbuf eenvAtTarget v.Range v) + CG.EmitInstr cgbuf (pop 0) Push0 (I_br targetMarkAfterBinds.CodeLabel) targetInfos - | None -> + | None -> match inplabOpt with None -> () | Some inplab -> CG.SetMarkToHere cgbuf inplab let targetMarkBeforeBinds = CG.GenerateDelayMark cgbuf "targetBeforeBinds" let targetMarkAfterBinds = CG.GenerateDelayMark cgbuf "targetAfterBinds" - let startScope,endScope as scopeMarks = StartDelayedLocalScope "targetBinds" cgbuf + let startScope, endScope as scopeMarks = StartDelayedLocalScope "targetBinds" cgbuf let binds = mkInvisibleBinds vs es let eenvAtTarget = AllocStorageForBinds cenv cgbuf scopeMarks eenv binds - let targetInfo = (targetMarkBeforeBinds,targetMarkAfterBinds,eenvAtTarget,successExpr,spTarget,repeatSP,vs,binds,startScope,endScope) - + let targetInfo = (targetMarkBeforeBinds, targetMarkAfterBinds, eenvAtTarget, successExpr, spTarget, repeatSP, vs, binds, startScope, endScope) + // In debug mode push all decision tree targets to after the switching - let isTargetPostponed = - if cenv.opts.localOptimizationsAreOn then + let isTargetPostponed = + if cenv.opts.localOptimizationsAreOn then GenDecisionTreeTarget cenv cgbuf stackAtTargets targetIdx targetInfo sequel false else CG.EmitInstr cgbuf (pop 0) Push0 (I_br targetMarkBeforeBinds.CodeLabel) - true + true - let targetInfos = IntMap.add targetIdx (targetInfo,isTargetPostponed) targetInfos + let targetInfos = IntMap.add targetIdx (targetInfo, isTargetPostponed) targetInfos targetInfos -and GenPostponedDecisionTreeTargets cenv cgbuf stackAtTargets targetInfos sequel = - let targetInfos = targetInfos |> Seq.sortBy (fun (KeyValue(targetIdx,_)) -> targetIdx) - for (KeyValue(targetIdx,(targetInfo,isTargetPostponed))) in targetInfos do - if isTargetPostponed then +and GenPostponedDecisionTreeTargets cenv cgbuf stackAtTargets targetInfos sequel = + let targetInfos = targetInfos |> Seq.sortBy (fun (KeyValue(targetIdx, _)) -> targetIdx) + for (KeyValue(targetIdx, (targetInfo, isTargetPostponed))) in targetInfos do + if isTargetPostponed then GenDecisionTreeTarget cenv cgbuf stackAtTargets targetIdx targetInfo sequel -and GenDecisionTreeTarget cenv cgbuf stackAtTargets _targetIdx (targetMarkBeforeBinds,targetMarkAfterBinds,eenvAtTarget,successExpr,spTarget,repeatSP,vs,binds,startScope,endScope) sequel = +and GenDecisionTreeTarget cenv cgbuf stackAtTargets _targetIdx (targetMarkBeforeBinds, targetMarkAfterBinds, eenvAtTarget, successExpr, spTarget, repeatSP, vs, binds, startScope, endScope) sequel = CG.SetMarkToHere cgbuf targetMarkBeforeBinds let spExpr = (match spTarget with SequencePointAtTarget -> SPAlways | SuppressSequencePointAtTarget _ -> SPSuppress) // Repeat the sequence point to make sure each target branch has some sequence point (instead of inheriting - // a random sequence point from the previously generated IL code from the previous block. See comment on + // a random sequence point from the previously generated IL code from the previous block. See comment on // repeatSP() above. // // Only repeat the sequence point if we really have to, i.e. if the target expression doesn't start with a // sequence point anyway - if isNil vs && DoesGenExprStartWithSequencePoint cenv.g spExpr successExpr then - () - else - match spTarget with + if isNil vs && DoesGenExprStartWithSequencePoint cenv.g spExpr successExpr then + () + else + match spTarget with | SequencePointAtTarget -> repeatSP() | SuppressSequencePointAtTarget -> cgbuf.EmitStartOfHiddenCode() @@ -4672,30 +4838,30 @@ and GenDecisionTreeTarget cenv cgbuf stackAtTargets _targetIdx (targetMarkBefore GenBindings cenv cgbuf eenvAtTarget binds CG.SetMarkToHere cgbuf targetMarkAfterBinds CG.SetStack cgbuf stackAtTargets - GenExpr cenv cgbuf eenvAtTarget spExpr successExpr (EndLocalScope(sequel,endScope)) + GenExpr cenv cgbuf eenvAtTarget spExpr successExpr (EndLocalScope(sequel, endScope)) -and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defaultTargetOpt switchm targets repeatSP targetInfos sequel = +and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defaultTargetOpt switchm targets repeatSP targetInfos sequel = let m = e.Range match inplabOpt with None -> () | Some inplab -> CG.SetMarkToHere cgbuf inplab repeatSP() - match cases with - // optimize a test against a boolean value, i.e. the all-important if-then-else - | TCase(DecisionTreeTest.Const(Const.Bool b), successTree) :: _ -> + match cases with + // optimize a test against a boolean value, i.e. the all-important if-then-else + | TCase(DecisionTreeTest.Const(Const.Bool b), successTree) :: _ -> let failureTree = (match defaultTargetOpt with None -> cases.Tail.Head.CaseTree | Some d -> d) - GenDecisionTreeTest cenv eenv.cloc cgbuf stackAtTargets e None eenv (if b then successTree else failureTree) (if b then failureTree else successTree) targets repeatSP targetInfos sequel + GenDecisionTreeTest cenv eenv.cloc cgbuf stackAtTargets e None eenv (if b then successTree else failureTree) (if b then failureTree else successTree) targets repeatSP targetInfos sequel // // Remove a single test for a union case . Union case tests are always exa - //| [ TCase(DecisionTreeTest.UnionCase _, successTree) ] when (defaultTargetOpt.IsNone) -> + //| [ TCase(DecisionTreeTest.UnionCase _, successTree) ] when (defaultTargetOpt.IsNone) -> // GenDecisionTreeAndTargetsInner cenv cgbuf inplabOpt stackAtTargets eenv successTree targets repeatSP targetInfos sequel // //GenDecisionTree cenv eenv.cloc cgbuf stackAtTargets e (Some (pop 1, Push [cenv.g.ilg.typ_Bool], Choice1Of2 (avoidHelpers, cuspec, idx))) eenv successTree failureTree targets repeatSP targetInfos sequel - // Optimize a single test for a union case to an "isdata" test - much - // more efficient code, and this case occurs in the generated equality testers where perf is important - | TCase(DecisionTreeTest.UnionCase(c,tyargs), successTree) :: rest when rest.Length = (match defaultTargetOpt with None -> 1 | Some _ -> 0) -> - let failureTree = - match defaultTargetOpt with + // Optimize a single test for a union case to an "isdata" test - much + // more efficient code, and this case occurs in the generated equality testers where perf is important + | TCase(DecisionTreeTest.UnionCase(c, tyargs), successTree) :: rest when rest.Length = (match defaultTargetOpt with None -> 1 | Some _ -> 0) -> + let failureTree = + match defaultTargetOpt with | None -> rest.Head.CaseTree | Some tg -> tg let cuspec = GenUnionSpec cenv.amap m eenv.tyenv c.TyconRef tyargs @@ -4703,137 +4869,137 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau let avoidHelpers = entityRefInThisAssembly cenv.g.compilingFslib c.TyconRef GenDecisionTreeTest cenv eenv.cloc cgbuf stackAtTargets e (Some (pop 1, Push [cenv.g.ilg.typ_Bool], Choice1Of2 (avoidHelpers, cuspec, idx))) eenv successTree failureTree targets repeatSP targetInfos sequel - | _ -> + | _ -> let caseLabels = List.map (fun _ -> CG.GenerateDelayMark cgbuf "switch_case") cases - let firstDiscrim = cases.Head.Discriminator - match firstDiscrim with + let firstDiscrim = cases.Head.Discriminator + match firstDiscrim with // Iterated tests, e.g. exception constructors, nulltests, typetests and active patterns. - // These should always have one positive and one negative branch - | DecisionTreeTest.IsInst _ + // These should always have one positive and one negative branch + | DecisionTreeTest.IsInst _ | DecisionTreeTest.ArrayLength _ - | DecisionTreeTest.IsNull - | DecisionTreeTest.Const(Const.Zero) -> + | DecisionTreeTest.IsNull + | DecisionTreeTest.Const(Const.Zero) -> if not (isSingleton cases) || Option.isNone defaultTargetOpt then failwith "internal error: GenDecisionTreeSwitch: DecisionTreeTest.IsInst/isnull/query" - let bi = - match firstDiscrim with + let bi = + match firstDiscrim with | DecisionTreeTest.Const(Const.Zero) -> - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv SPSuppress e Continue BI_brfalse - | DecisionTreeTest.IsNull -> - GenExpr cenv cgbuf eenv SPSuppress e Continue + | DecisionTreeTest.IsNull -> + GenExpr cenv cgbuf eenv SPSuppress e Continue let srcTy = tyOfExpr cenv.g e - if isTyparTy cenv.g srcTy then + if isTyparTy cenv.g srcTy then let ilFromTy = GenType cenv.amap m eenv.tyenv srcTy CG.EmitInstr cgbuf (pop 1) (Push [cenv.g.ilg.typ_Object]) (I_box ilFromTy) BI_brfalse - | DecisionTreeTest.IsInst (_srcty,tgty) -> + | DecisionTreeTest.IsInst (_srcty, tgty) -> let e = mkCallTypeTest cenv.g m tgty e GenExpr cenv cgbuf eenv SPSuppress e Continue BI_brtrue | _ -> failwith "internal error: GenDecisionTreeSwitch" - CG.EmitInstr cgbuf (pop 1) Push0 (I_brcmp (bi,(List.head caseLabels).CodeLabel)) + CG.EmitInstr cgbuf (pop 1) Push0 (I_brcmp (bi, (List.head caseLabels).CodeLabel)) GenDecisionTreeCases cenv cgbuf stackAtTargets eenv targets repeatSP targetInfos defaultTargetOpt caseLabels cases sequel - - | DecisionTreeTest.ActivePatternCase _ -> error(InternalError("internal error in codegen: DecisionTreeTest.ActivePatternCase",switchm)) - | DecisionTreeTest.UnionCase (hdc,tyargs) -> + + | DecisionTreeTest.ActivePatternCase _ -> error(InternalError("internal error in codegen: DecisionTreeTest.ActivePatternCase", switchm)) + | DecisionTreeTest.UnionCase (hdc, tyargs) -> GenExpr cenv cgbuf eenv SPSuppress e Continue let cuspec = GenUnionSpec cenv.amap m eenv.tyenv hdc.TyconRef tyargs - let dests = + let dests = if cases.Length <> caseLabels.Length then failwith "internal error: DecisionTreeTest.UnionCase" - (cases , caseLabels) ||> List.map2 (fun case label -> - match case with - | TCase(DecisionTreeTest.UnionCase (c,_),_) -> (c.Index, label.CodeLabel) - | _ -> failwith "error: mixed constructor/const test?") - + (cases, caseLabels) ||> List.map2 (fun case label -> + match case with + | TCase(DecisionTreeTest.UnionCase (c, _), _) -> (c.Index, label.CodeLabel) + | _ -> failwith "error: mixed constructor/const test?") + let avoidHelpers = entityRefInThisAssembly cenv.g.compilingFslib hdc.TyconRef - EraseUnions.emitDataSwitch cenv.g.ilg (UnionCodeGen cgbuf) (avoidHelpers,cuspec,dests) + EraseUnions.emitDataSwitch cenv.g.ilg (UnionCodeGen cgbuf) (avoidHelpers, cuspec, dests) CG.EmitInstrs cgbuf (pop 1) Push0 [ ] // push/pop to match the line above - GenDecisionTreeCases cenv cgbuf stackAtTargets eenv targets repeatSP targetInfos defaultTargetOpt caseLabels cases sequel - + GenDecisionTreeCases cenv cgbuf stackAtTargets eenv targets repeatSP targetInfos defaultTargetOpt caseLabels cases sequel + | DecisionTreeTest.Const c -> GenExpr cenv cgbuf eenv SPSuppress e Continue - match c with + match c with | Const.Bool _ -> failwith "should have been done earlier" - | Const.SByte _ - | Const.Int16 _ - | Const.Int32 _ - | Const.Byte _ - | Const.UInt16 _ + | Const.SByte _ + | Const.Int16 _ + | Const.Int32 _ + | Const.Byte _ + | Const.UInt16 _ | Const.UInt32 _ | Const.Char _ -> if List.length cases <> List.length caseLabels then failwith "internal error: " - let dests = - (cases,caseLabels) ||> List.map2 (fun case label -> - let i = - match case.Discriminator with + let dests = + (cases, caseLabels) ||> List.map2 (fun case label -> + let i = + match case.Discriminator with DecisionTreeTest.Const c' -> - match c' with + match c' with | Const.SByte i -> int32 i | Const.Int16 i -> int32 i | Const.Int32 i -> i | Const.Byte i -> int32 i | Const.UInt16 i -> int32 i | Const.UInt32 i -> int32 i - | Const.Char c -> int32 c - | _ -> failwith "internal error: badly formed const test" + | Const.Char c -> int32 c + | _ -> failwith "internal error: badly formed const test" - | _ -> failwith "internal error: badly formed const test" - (i,label.CodeLabel)) + | _ -> failwith "internal error: badly formed const test" + (i, label.CodeLabel)) let mn = List.foldBack (fst >> Operators.min) dests (fst(List.head dests)) let mx = List.foldBack (fst >> Operators.max) dests (fst(List.head dests)) - // Check if it's worth using a switch - // REVIEW: this is using switches even for single integer matches! + // Check if it's worth using a switch + // REVIEW: this is using switches even for single integer matches! if mx - mn = (List.length dests - 1) then - let destinationLabels = dests |> List.sortBy fst |> List.map snd - if mn <> 0 then + let destinationLabels = dests |> List.sortBy fst |> List.map snd + if mn <> 0 then CG.EmitInstrs cgbuf (pop 0) (Push [cenv.g.ilg.typ_Int32]) [ mkLdcInt32 mn] CG.EmitInstrs cgbuf (pop 1) Push0 [ AI_sub ] CG.EmitInstr cgbuf (pop 1) Push0 (I_switch destinationLabels) else - error(InternalError("non-dense integer matches not implemented in codegen - these should have been removed by the pattern match compiler",switchm)) - GenDecisionTreeCases cenv cgbuf stackAtTargets eenv targets repeatSP targetInfos defaultTargetOpt caseLabels cases sequel - | _ -> error(InternalError("these matches should never be needed",switchm)) + error(InternalError("non-dense integer matches not implemented in codegen - these should have been removed by the pattern match compiler", switchm)) + GenDecisionTreeCases cenv cgbuf stackAtTargets eenv targets repeatSP targetInfos defaultTargetOpt caseLabels cases sequel + | _ -> error(InternalError("these matches should never be needed", switchm)) and GenDecisionTreeCases cenv cgbuf stackAtTargets eenv targets repeatSP targetInfos defaultTargetOpt caseLabels cases sequel = assert(cgbuf.GetCurrentStack() = stackAtTargets) // cgbuf stack should be unchanged over tests. [bug://1750]. - let targetInfos = - match defaultTargetOpt with + let targetInfos = + match defaultTargetOpt with | Some defaultTarget -> GenDecisionTreeAndTargetsInner cenv cgbuf None stackAtTargets eenv defaultTarget targets repeatSP targetInfos sequel | None -> targetInfos - let targetInfos = - (targetInfos, caseLabels, cases) |||> List.fold2 (fun targetInfos caseLabel (TCase(_,caseTree)) -> + let targetInfos = + (targetInfos, caseLabels, cases) |||> List.fold2 (fun targetInfos caseLabel (TCase(_, caseTree)) -> GenDecisionTreeAndTargetsInner cenv cgbuf (Some caseLabel) stackAtTargets eenv caseTree targets repeatSP targetInfos sequel) - targetInfos + targetInfos // Used for the peephole optimization below -and (|BoolExpr|_|) = function Expr.Const(Const.Bool b1,_,_) -> Some(b1) | _ -> None +and (|BoolExpr|_|) = function Expr.Const(Const.Bool b1, _, _) -> Some(b1) | _ -> None and GenDecisionTreeTest cenv cloc cgbuf stackAtTargets e tester eenv successTree failureTree targets repeatSP targetInfos sequel = - match successTree,failureTree with + match successTree, failureTree with - // Peephole: if generating a boolean value or its negation then just leave it on the stack - // This comes up in the generated equality functions. REVIEW: do this as a peephole optimization elsewhere - | TDSuccess(es1,n1), - TDSuccess(es2,n2) when + // Peephole: if generating a boolean value or its negation then just leave it on the stack + // This comes up in the generated equality functions. REVIEW: do this as a peephole optimization elsewhere + | TDSuccess(es1, n1), + TDSuccess(es2, n2) when isNil es1 && isNil es2 && - (match GetTarget targets n1, GetTarget targets n2 with - | TTarget(_,BoolExpr(b1),_),TTarget(_,BoolExpr(b2),_) -> b1 = not b2 + (match GetTarget targets n1, GetTarget targets n2 with + | TTarget(_, BoolExpr(b1), _), TTarget(_, BoolExpr(b2), _) -> b1 = not b2 | _ -> false) -> - match GetTarget targets n1, GetTarget targets n2 with + match GetTarget targets n1, GetTarget targets n2 with - | TTarget(_,BoolExpr(b1),_),_ -> + | TTarget(_, BoolExpr(b1), _), _ -> GenExpr cenv cgbuf eenv SPSuppress e Continue - match tester with - | Some (pops,pushes,i) -> - match i with - | Choice1Of2 (avoidHelpers,cuspec,idx) -> CG.EmitInstrs cgbuf pops pushes (EraseUnions.mkIsData cenv.g.ilg (avoidHelpers, cuspec, idx)) + match tester with + | Some (pops, pushes, i) -> + match i with + | Choice1Of2 (avoidHelpers, cuspec, idx) -> CG.EmitInstrs cgbuf pops pushes (EraseUnions.mkIsData cenv.g.ilg (avoidHelpers, cuspec, idx)) | Choice2Of2 i -> CG.EmitInstr cgbuf pops pushes i | _ -> () - if not b1 then + if not b1 then CG.EmitInstrs cgbuf (pop 0) (Push [cenv.g.ilg.typ_Bool]) [mkLdcInt32 (0) ] CG.EmitInstrs cgbuf (pop 1) Push0 [AI_ceq] GenSequel cenv cloc cgbuf sequel @@ -4843,101 +5009,98 @@ and GenDecisionTreeTest cenv cloc cgbuf stackAtTargets e tester eenv successTree | _ -> let failure = CG.GenerateDelayMark cgbuf "testFailure" - match tester with - | None -> - // generate the expression, then test it for "false" + match tester with + | None -> + // generate the expression, then test it for "false" GenExpr cenv cgbuf eenv SPSuppress e (CmpThenBrOrContinue(pop 1, [ I_brcmp (BI_brfalse, failure.CodeLabel) ])) - // Turn 'isdata' tests that branch into EI_brisdata tests - | Some (_,_,Choice1Of2 (avoidHelpers,cuspec,idx)) -> - GenExpr cenv cgbuf eenv SPSuppress e (CmpThenBrOrContinue(pop 1, EraseUnions.mkBrIsData cenv.g.ilg false (avoidHelpers,cuspec, idx, failure.CodeLabel))) + // Turn 'isdata' tests that branch into EI_brisdata tests + | Some (_, _, Choice1Of2 (avoidHelpers, cuspec, idx)) -> + GenExpr cenv cgbuf eenv SPSuppress e (CmpThenBrOrContinue(pop 1, EraseUnions.mkBrIsData cenv.g.ilg false (avoidHelpers, cuspec, idx, failure.CodeLabel))) - | Some (pops,pushes,i) -> + | Some (pops, pushes, i) -> GenExpr cenv cgbuf eenv SPSuppress e Continue - match i with - | Choice1Of2 (avoidHelpers,cuspec,idx) -> CG.EmitInstrs cgbuf pops pushes (EraseUnions.mkIsData cenv.g.ilg (avoidHelpers, cuspec, idx)) + match i with + | Choice1Of2 (avoidHelpers, cuspec, idx) -> CG.EmitInstrs cgbuf pops pushes (EraseUnions.mkIsData cenv.g.ilg (avoidHelpers, cuspec, idx)) | Choice2Of2 i -> CG.EmitInstr cgbuf pops pushes i - CG.EmitInstr cgbuf (pop 1) Push0 (I_brcmp (BI_brfalse, failure.CodeLabel)) + CG.EmitInstr cgbuf (pop 1) Push0 (I_brcmp (BI_brfalse, failure.CodeLabel)) let targetInfos = GenDecisionTreeAndTargetsInner cenv cgbuf None stackAtTargets eenv successTree targets repeatSP targetInfos sequel - GenDecisionTreeAndTargetsInner cenv cgbuf (Some failure) stackAtTargets eenv failureTree targets repeatSP targetInfos sequel + GenDecisionTreeAndTargetsInner cenv cgbuf (Some failure) stackAtTargets eenv failureTree targets repeatSP targetInfos sequel -//------------------------------------------------------------------------- -// Generate letrec bindings -//------------------------------------------------------------------------- - -and GenLetRecFixup cenv cgbuf eenv (ilxCloSpec:IlxClosureSpec,e,ilField:ILFieldSpec,e2,_m) = - GenExpr cenv cgbuf eenv SPSuppress e Continue +/// Generate fixups for letrec bindings +and GenLetRecFixup cenv cgbuf eenv (ilxCloSpec: IlxClosureSpec, e, ilField: ILFieldSpec, e2, _m) = + GenExpr cenv cgbuf eenv SPSuppress e Continue CG.EmitInstrs cgbuf (pop 0) Push0 [ I_castclass ilxCloSpec.ILType ] - GenExpr cenv cgbuf eenv SPSuppress e2 Continue - CG.EmitInstrs cgbuf (pop 2) Push0 [ mkNormalStfld (mkILFieldSpec(ilField.FieldRef,ilxCloSpec.ILType)) ] + GenExpr cenv cgbuf eenv SPSuppress e2 Continue + CG.EmitInstrs cgbuf (pop 2) Push0 [ mkNormalStfld (mkILFieldSpec(ilField.FieldRef, ilxCloSpec.ILType)) ] -and GenLetRecBindings cenv (cgbuf:CodeGenBuffer) eenv (allBinds: Bindings,m) = +/// Generate letrec bindings +and GenLetRecBindings cenv (cgbuf: CodeGenBuffer) eenv (allBinds: Bindings, m) = // Fix up recursion for non-toplevel recursive bindings - let bindsPossiblyRequiringFixup = - allBinds |> List.filter (fun b -> - match (StorageForVal m b.Var eenv) with + let bindsPossiblyRequiringFixup = + allBinds |> List.filter (fun b -> + match (StorageForVal m b.Var eenv) with | StaticProperty _ - | Method _ - // Note: Recursive data stored in static fields may require fixups e.g. let x = C(x) - // | StaticField _ - | Null -> false + | Method _ + // Note: Recursive data stored in static fields may require fixups e.g. let x = C(x) + // | StaticField _ + | Null -> false | _ -> true) let computeFixupsForOneRecursiveVar boundv forwardReferenceSet fixups selfv access set e = - match e with - | Expr.Lambda _ | Expr.TyLambda _ | Expr.Obj _ -> + match e with + | Expr.Lambda _ | Expr.TyLambda _ | Expr.Obj _ -> let isLocalTypeFunc = Option.isSome selfv && (IsNamedLocalTypeFuncVal cenv.g (Option.get selfv) e) let selfv = (match e with Expr.Obj _ -> None | _ when isLocalTypeFunc -> None | _ -> Option.map mkLocalValRef selfv) - let clo,_,eenvclo = GetIlxClosureInfo cenv m isLocalTypeFunc selfv {eenv with letBoundVars=(mkLocalValRef boundv)::eenv.letBoundVars} e - clo.cloFreeVars |> List.iter (fun fv -> - if Zset.contains fv forwardReferenceSet then + let clo, _, eenvclo = GetIlxClosureInfo cenv m isLocalTypeFunc selfv {eenv with letBoundVars=(mkLocalValRef boundv)::eenv.letBoundVars} e + clo.cloFreeVars |> List.iter (fun fv -> + if Zset.contains fv forwardReferenceSet then match StorageForVal m fv eenvclo with - | Env (_,_,ilField,_) -> fixups := (boundv, fv, (fun () -> GenLetRecFixup cenv cgbuf eenv (clo.cloSpec,access,ilField,exprForVal m fv,m))) :: !fixups - | _ -> error (InternalError("GenLetRec: " + fv.LogicalName + " was not in the environment",m)) ) - - | Expr.Val (vref,_,_) -> + | Env (_, _, ilField, _) -> fixups := (boundv, fv, (fun () -> GenLetRecFixup cenv cgbuf eenv (clo.cloSpec, access, ilField, exprForVal m fv, m))) :: !fixups + | _ -> error (InternalError("GenLetRec: " + fv.LogicalName + " was not in the environment", m)) ) + + | Expr.Val (vref, _, _) -> let fv = vref.Deref let needsFixup = Zset.contains fv forwardReferenceSet - if needsFixup then fixups := (boundv, fv,(fun () -> GenExpr cenv cgbuf eenv SPSuppress (set e) discard)) :: !fixups + if needsFixup then fixups := (boundv, fv, (fun () -> GenExpr cenv cgbuf eenv SPSuppress (set e) discard)) :: !fixups | _ -> failwith "compute real fixup vars" let fixups = ref [] let recursiveVars = Zset.addList (bindsPossiblyRequiringFixup |> List.map (fun v -> v.Var)) (Zset.empty valOrder) - let _ = - (recursiveVars, bindsPossiblyRequiringFixup) ||> List.fold (fun forwardReferenceSet (bind:Binding) -> - // Compute fixups - bind.Expr |> IterateRecursiveFixups cenv.g (Some bind.Var) - (computeFixupsForOneRecursiveVar bind.Var forwardReferenceSet fixups) - (exprForVal m bind.Var, + let _ = + (recursiveVars, bindsPossiblyRequiringFixup) ||> List.fold (fun forwardReferenceSet (bind: Binding) -> + // Compute fixups + bind.Expr |> IterateRecursiveFixups cenv.g (Some bind.Var) + (computeFixupsForOneRecursiveVar bind.Var forwardReferenceSet fixups) + (exprForVal m bind.Var, (fun _ -> failwith ("internal error: should never need to set non-delayed recursive val: " + bind.Var.LogicalName))) // Record the variable as defined let forwardReferenceSet = Zset.remove bind.Var forwardReferenceSet forwardReferenceSet) // Generate the actual bindings - let _ = - (recursiveVars, allBinds) ||> List.fold (fun forwardReferenceSet (bind:Binding) -> + let _ = + (recursiveVars, allBinds) ||> List.fold (fun forwardReferenceSet (bind: Binding) -> GenBinding cenv cgbuf eenv bind // Record the variable as defined let forwardReferenceSet = Zset.remove bind.Var forwardReferenceSet - // Execute and discard any fixups that can now be committed - fixups := !fixups |> List.filter (fun (boundv, fv, action) -> if (Zset.contains boundv forwardReferenceSet || Zset.contains fv forwardReferenceSet) then true else (action(); false)) + // Execute and discard any fixups that can now be committed + fixups := !fixups |> List.filter (fun (boundv, fv, action) -> if (Zset.contains boundv forwardReferenceSet || Zset.contains fv forwardReferenceSet) then true else (action(); false)) forwardReferenceSet) () - -and GenLetRec cenv cgbuf eenv (binds,body,m) sequel = - let _,endScope as scopeMarks = StartLocalScope "letrec" cgbuf +and GenLetRec cenv cgbuf eenv (binds, body, m) sequel = + let _, endScope as scopeMarks = StartLocalScope "letrec" cgbuf let eenv = AllocStorageForBinds cenv cgbuf scopeMarks eenv binds GenLetRecBindings cenv cgbuf eenv (binds, m) - GenExpr cenv cgbuf eenv SPAlways body (EndLocalScope(sequel,endScope)) + GenExpr cenv cgbuf eenv SPAlways body (EndLocalScope(sequel, endScope)) //------------------------------------------------------------------------- // Generate simple bindings -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- and GenSequencePointForBind cenv cgbuf bind = let _, pt, sp = ComputeSequencePointInfoForBinding cenv.g bind @@ -4947,67 +5110,67 @@ and GenSequencePointForBind cenv cgbuf bind = and GenBinding cenv cgbuf eenv bind = let sp = GenSequencePointForBind cenv cgbuf bind GenBindingAfterSequencePoint cenv cgbuf eenv sp bind None - + and ComputeMemberAccessRestrictedBySig eenv vspec = - let isHidden = - IsHiddenVal eenv.sigToImplRemapInfo vspec || // anything hidden by a signature gets assembly visibility + let isHidden = + IsHiddenVal eenv.sigToImplRemapInfo vspec || // anything hidden by a signature gets assembly visibility not vspec.IsMemberOrModuleBinding || // anything that's not a module or member binding gets assembly visibility vspec.IsIncrClassGeneratedMember // compiler generated members for class function 'let' bindings get assembly visibility ComputeMemberAccess isHidden + and ComputeMethodAccessRestrictedBySig eenv vspec = - let isHidden = - IsHiddenVal eenv.sigToImplRemapInfo vspec || // anything hidden by a signature gets assembly visibility + let isHidden = + IsHiddenVal eenv.sigToImplRemapInfo vspec || // anything hidden by a signature gets assembly visibility not vspec.IsMemberOrModuleBinding || // anything that's not a module or member binding gets assembly visibility vspec.IsIncrClassGeneratedMember // compiler generated members for class function 'let' bindings get assembly visibility ComputeMemberAccess isHidden +and GenBindingAfterSequencePoint cenv cgbuf eenv sp (TBind(vspec, rhsExpr, _)) startScopeMarkOpt = -and GenBindingAfterSequencePoint cenv cgbuf eenv sp (TBind(vspec,rhsExpr,_)) startScopeMarkOpt = - - // Record the closed reflection definition if publishing + // Record the closed reflection definition if publishing // There is no real reason we're doing this so late in the day - match vspec.PublicPath, vspec.ReflectedDefinition with - | Some _, Some e -> cgbuf.mgbuf.AddReflectedDefinition(vspec,e) - | _ -> () + match vspec.PublicPath, vspec.ReflectedDefinition with + | Some _, Some e -> cgbuf.mgbuf.AddReflectedDefinition(vspec, e) + | _ -> () let eenv = {eenv with letBoundVars= (mkLocalValRef vspec) :: eenv.letBoundVars} let access = ComputeMethodAccessRestrictedBySig eenv vspec // Workaround for .NET and Visual Studio restriction w.r.t debugger type proxys - // Mark internal constructors in internal classes as public. - let access = - if access = ILMemberAccess.Assembly && vspec.IsConstructor && IsHiddenTycon eenv.sigToImplRemapInfo vspec.MemberApparentEntity.Deref then + // Mark internal constructors in internal classes as public. + let access = + if access = ILMemberAccess.Assembly && vspec.IsConstructor && IsHiddenTycon eenv.sigToImplRemapInfo vspec.MemberApparentEntity.Deref then ILMemberAccess.Public else access - + let m = vspec.Range - match StorageForVal m vspec eenv with + match StorageForVal m vspec eenv with - | Null -> + | Null -> GenExpr cenv cgbuf eenv SPSuppress rhsExpr discard CommitStartScope cgbuf startScopeMarkOpt // The initialization code for static 'let' and 'do' bindings gets compiled into the initialization .cctor for the whole file | _ when vspec.IsClassConstructor && isNil vspec.TopValDeclaringEntity.TyparsNoRange -> - let tps,_,_,_,cctorBody,_ = IteratedAdjustArityOfLambda cenv.g cenv.amap vspec.ValReprInfo.Value rhsExpr + let tps, _, _, _, cctorBody, _ = IteratedAdjustArityOfLambda cenv.g cenv.amap vspec.ValReprInfo.Value rhsExpr let eenv = EnvForTypars tps eenv CommitStartScope cgbuf startScopeMarkOpt GenExpr cenv cgbuf eenv SPSuppress cctorBody discard - - | Method (topValInfo,_,mspec,_,paramInfos,methodArgTys,retInfo) -> - let tps,ctorThisValOpt,baseValOpt,vsl,body',bodyty = IteratedAdjustArityOfLambda cenv.g cenv.amap topValInfo rhsExpr + + | Method (topValInfo, _, mspec, _, paramInfos, methodArgTys, retInfo) -> + let tps, ctorThisValOpt, baseValOpt, vsl, body', bodyty = IteratedAdjustArityOfLambda cenv.g cenv.amap topValInfo rhsExpr let methodVars = List.concat vsl CommitStartScope cgbuf startScopeMarkOpt - GenMethodForBinding cenv cgbuf eenv (vspec,mspec,access,paramInfos,retInfo) (topValInfo,ctorThisValOpt,baseValOpt,tps,methodVars, methodArgTys, body', bodyty) + GenMethodForBinding cenv cgbuf eenv (vspec, mspec, access, paramInfos, retInfo) (topValInfo, ctorThisValOpt, baseValOpt, tps, methodVars, methodArgTys, body', bodyty) - | StaticProperty (ilGetterMethSpec, optShadowLocal) -> + | StaticProperty (ilGetterMethSpec, optShadowLocal) -> let ilAttribs = GenAttrs cenv eenv vspec.Attribs let ilTy = ilGetterMethSpec.FormalReturnType - let ilPropDef = + let ilPropDef = ILPropertyDef.Create(name = PrettyNaming.ChopPropertyName ilGetterMethSpec.Name, attributes = PropertyAttributes.None, setMethod = None, @@ -5017,9 +5180,9 @@ and GenBindingAfterSequencePoint cenv cgbuf eenv sp (TBind(vspec,rhsExpr,_)) sta init = None, args = [], customAttrs = mkILCustomAttrs ilAttribs) - cgbuf.mgbuf.AddOrMergePropertyDef(ilGetterMethSpec.MethodRef.DeclaringTypeRef, ilPropDef,m) + cgbuf.mgbuf.AddOrMergePropertyDef(ilGetterMethSpec.MethodRef.DeclaringTypeRef, ilPropDef, m) - let ilMethodDef = + let ilMethodDef = let ilMethodBody = MethodBody.IL(CodeGenMethodForExpr cenv cgbuf.mgbuf (SPSuppress, [], ilGetterMethSpec.Name, eenv, 0, rhsExpr, Return)) (mkILStaticMethod ([], ilGetterMethSpec.Name, access, [], mkILReturn ilTy, ilMethodBody)).WithSpecialName |> AddNonUserCompilerGeneratedAttribs cenv.g @@ -5030,35 +5193,35 @@ and GenBindingAfterSequencePoint cenv cgbuf eenv sp (TBind(vspec,rhsExpr,_)) sta CommitStartScope cgbuf startScopeMarkOpt match optShadowLocal with | NoShadowLocal -> () - | ShadowLocal storage -> - CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (I_call (Normalcall, ilGetterMethSpec, None)) + | ShadowLocal storage -> + CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (I_call (Normalcall, ilGetterMethSpec, None)) GenSetStorage m cgbuf storage - | StaticField (fspec, vref, hasLiteralAttr, ilTyForProperty, ilPropName, fty, ilGetterMethRef, ilSetterMethRef, optShadowLocal) -> + | StaticField (fspec, vref, hasLiteralAttr, ilTyForProperty, ilPropName, fty, ilGetterMethRef, ilSetterMethRef, optShadowLocal) -> let mut = vspec.IsMutable - - let canTarget(targets, goal : System.AttributeTargets) = + + let canTarget(targets, goal: System.AttributeTargets) = match targets with | None -> true | Some tgts -> 0 <> int(tgts &&& goal) /// Generate a static field definition... - let ilFieldDefs = + let ilFieldDefs = let access = ComputeMemberAccess (not hasLiteralAttr || IsHiddenVal eenv.sigToImplRemapInfo vspec) let ilFieldDef = mkILStaticField (fspec.Name, fty, None, None, access) let ilFieldDef = - match vref.LiteralValue with + match vref.LiteralValue with | Some konst -> ilFieldDef.WithLiteralDefaultValue( Some (GenFieldInit m konst) ) - | None -> ilFieldDef - - let ilFieldDef = + | None -> ilFieldDef + + let ilFieldDef = let isClassInitializer = (cgbuf.MethodName = ".cctor") ilFieldDef.WithInitOnly(not (mut || cenv.opts.isInteractiveItExpr || not isClassInitializer || hasLiteralAttr)) - let ilAttribs = + let ilAttribs = if not hasLiteralAttr then - vspec.Attribs - |> List.filter (fun (Attrib(_,_,_,_,_,targets,_)) -> canTarget(targets, System.AttributeTargets.Field)) + vspec.Attribs + |> List.filter (fun (Attrib(_, _, _, _, _, targets, _)) -> canTarget(targets, System.AttributeTargets.Field)) |> GenAttrs cenv eenv // backing field only gets attributes that target fields else GenAttrs cenv eenv vspec.Attribs // literals have no property, so preserve all the attributes on the field itself @@ -5066,20 +5229,20 @@ and GenBindingAfterSequencePoint cenv cgbuf eenv sp (TBind(vspec,rhsExpr,_)) sta let ilFieldDef = ilFieldDef.With(customAttrs = mkILCustomAttrs (ilAttribs @ [ cenv.g.DebuggerBrowsableNeverAttribute ])) [ (fspec.DeclaringTypeRef, ilFieldDef) ] - + let ilTypeRefForProperty = ilTyForProperty.TypeRef - for (tref,ilFieldDef) in ilFieldDefs do - cgbuf.mgbuf.AddFieldDef(tref,ilFieldDef) + for (tref, ilFieldDef) in ilFieldDefs do + cgbuf.mgbuf.AddFieldDef(tref, ilFieldDef) CountStaticFieldDef() - // ... and the get/set properties to access it. - if not hasLiteralAttr then - let ilAttribs = - vspec.Attribs - |> List.filter (fun (Attrib(_,_,_,_,_,targets,_)) -> canTarget(targets, System.AttributeTargets.Property)) + // ... and the get/set properties to access it. + if not hasLiteralAttr then + let ilAttribs = + vspec.Attribs + |> List.filter (fun (Attrib(_, _, _, _, _, targets, _)) -> canTarget(targets, System.AttributeTargets.Property)) |> GenAttrs cenv eenv // property only gets attributes that target properties - let ilPropDef = + let ilPropDef = ILPropertyDef.Create(name=ilPropName, attributes = PropertyAttributes.None, setMethod=(if mut || cenv.opts.isInteractiveItExpr then Some ilSetterMethRef else None), @@ -5089,49 +5252,49 @@ and GenBindingAfterSequencePoint cenv cgbuf eenv sp (TBind(vspec,rhsExpr,_)) sta init=None, args = [], customAttrs=mkILCustomAttrs (ilAttribs @ [mkCompilationMappingAttr cenv.g (int SourceConstructFlags.Value)])) - cgbuf.mgbuf.AddOrMergePropertyDef(ilTypeRefForProperty,ilPropDef,m) - - let getterMethod = - mkILStaticMethod([],ilGetterMethRef.Name,access,[],mkILReturn fty, - mkMethodBody(true,[],2,nonBranchingInstrsToCode [ mkNormalLdsfld fspec ],None)).WithSpecialName - cgbuf.mgbuf.AddMethodDef(ilTypeRefForProperty,getterMethod) - if mut || cenv.opts.isInteractiveItExpr then - let setterMethod = - mkILStaticMethod([],ilSetterMethRef.Name,access,[mkILParamNamed("value",fty)],mkILReturn ILType.Void, - mkMethodBody(true,[],2,nonBranchingInstrsToCode [ mkLdarg0;mkNormalStsfld fspec],None)).WithSpecialName - cgbuf.mgbuf.AddMethodDef(ilTypeRefForProperty,setterMethod) + cgbuf.mgbuf.AddOrMergePropertyDef(ilTypeRefForProperty, ilPropDef, m) + + let getterMethod = + mkILStaticMethod([], ilGetterMethRef.Name, access, [], mkILReturn fty, + mkMethodBody(true, [], 2, nonBranchingInstrsToCode [ mkNormalLdsfld fspec ], None)).WithSpecialName + cgbuf.mgbuf.AddMethodDef(ilTypeRefForProperty, getterMethod) + if mut || cenv.opts.isInteractiveItExpr then + let setterMethod = + mkILStaticMethod([], ilSetterMethRef.Name, access, [mkILParamNamed("value", fty)], mkILReturn ILType.Void, + mkMethodBody(true, [], 2, nonBranchingInstrsToCode [ mkLdarg0;mkNormalStsfld fspec], None)).WithSpecialName + cgbuf.mgbuf.AddMethodDef(ilTypeRefForProperty, setterMethod) GenBindingRhs cenv cgbuf eenv sp vspec rhsExpr match optShadowLocal with - | NoShadowLocal -> + | NoShadowLocal -> CommitStartScope cgbuf startScopeMarkOpt EmitSetStaticField cgbuf fspec - | ShadowLocal storage-> + | ShadowLocal storage-> CommitStartScope cgbuf startScopeMarkOpt - CG.EmitInstr cgbuf (pop 0) (Push [fty]) AI_dup + CG.EmitInstr cgbuf (pop 0) (Push [fty]) AI_dup EmitSetStaticField cgbuf fspec GenSetStorage m cgbuf storage | _ -> let storage = StorageForVal m vspec eenv - match storage, rhsExpr with - // locals are zero-init, no need to initialize them - | Local (_, realloc, _), Expr.Const(Const.Zero,_,_) when not realloc -> + match storage, rhsExpr with + // locals are zero-init, no need to initialize them + | Local (_, realloc, _), Expr.Const(Const.Zero, _, _) when not realloc -> CommitStartScope cgbuf startScopeMarkOpt - | _ -> + | _ -> GenBindingRhs cenv cgbuf eenv SPSuppress vspec rhsExpr CommitStartScope cgbuf startScopeMarkOpt GenStoreVal cgbuf eenv vspec.Range vspec //------------------------------------------------------------------------- // Generate method bindings -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- -/// Spectacularly gross table encoding P/Invoke and COM marshalling information -and GenMarshal cenv attribs = - let otherAttribs = +/// Generate encoding P/Invoke and COM marshalling information +and GenMarshal cenv attribs = + let otherAttribs = // For IlReflect backend, we rely on Reflection.Emit API to emit the pseudo-custom attributes - // correctly, so we do not filter them out. + // correctly, so we do not filter them out. // For IlWriteBackend, we filter MarshalAs attributes match cenv.opts.ilxBackend with | IlReflectBackend -> attribs @@ -5139,11 +5302,11 @@ and GenMarshal cenv attribs = attribs |> List.filter (IsMatchingFSharpAttributeOpt cenv.g cenv.g.attrib_MarshalAsAttribute >> not) match TryFindFSharpAttributeOpt cenv.g cenv.g.attrib_MarshalAsAttribute attribs with - | Some (Attrib(_,_,[ AttribInt32Arg unmanagedType ],namedArgs,_,_,m)) -> + | Some (Attrib(_, _, [ AttribInt32Arg unmanagedType ], namedArgs, _, _, m)) -> let decoder = AttributeDecoder namedArgs - let rec decodeUnmanagedType unmanagedType = - (* enumeration values for System.Runtime.InteropServices.UnmanagedType taken from mscorlib.il *) - match unmanagedType with + let rec decodeUnmanagedType unmanagedType = + // enumeration values for System.Runtime.InteropServices.UnmanagedType taken from mscorlib.il + match unmanagedType with | 0x0 -> ILNativeType.Empty | 0x01 -> ILNativeType.Void | 0x02 -> ILNativeType.Bool @@ -5167,59 +5330,59 @@ and GenMarshal cenv attribs = | 0x1A -> ILNativeType.IDispatch | 0x1B -> ILNativeType.Struct | 0x1C -> ILNativeType.Interface - | 0x1D -> - let safeArraySubType = - match decoder.FindInt32 "SafeArraySubType" 0x0 with + | 0x1D -> + let safeArraySubType = + match decoder.FindInt32 "SafeArraySubType" 0x0 with (* enumeration values for System.Runtime.InteropServices.VarType taken from mscorlib.il *) | 0x0 -> ILNativeVariant.Empty - | 0x1 -> ILNativeVariant.Null - | 0x02 -> ILNativeVariant.Int16 - | 0x03 -> ILNativeVariant.Int32 - | 0x0C -> ILNativeVariant.Variant - | 0x04 -> ILNativeVariant.Single - | 0x05 -> ILNativeVariant.Double - | 0x06 -> ILNativeVariant.Currency - | 0x07 -> ILNativeVariant.Date - | 0x08 -> ILNativeVariant.BSTR - | 0x09 -> ILNativeVariant.IDispatch - | 0x0a -> ILNativeVariant.Error - | 0x0b -> ILNativeVariant.Bool - | 0x0d -> ILNativeVariant.IUnknown - | 0x0e -> ILNativeVariant.Decimal - | 0x10 -> ILNativeVariant.Int8 - | 0x11 -> ILNativeVariant.UInt8 - | 0x12 -> ILNativeVariant.UInt16 - | 0x13 -> ILNativeVariant.UInt32 - | 0x15 -> ILNativeVariant.UInt64 - | 0x16 -> ILNativeVariant.Int - | 0x17 -> ILNativeVariant.UInt - | 0x18 -> ILNativeVariant.Void - | 0x19 -> ILNativeVariant.HRESULT - | 0x1a -> ILNativeVariant.PTR - | 0x1c -> ILNativeVariant.CArray - | 0x1d -> ILNativeVariant.UserDefined - | 0x1e -> ILNativeVariant.LPSTR - | 0x1B -> ILNativeVariant.SafeArray - | 0x1f -> ILNativeVariant.LPWSTR - | 0x24 -> ILNativeVariant.Record - | 0x40 -> ILNativeVariant.FileTime - | 0x41 -> ILNativeVariant.Blob - | 0x42 -> ILNativeVariant.Stream - | 0x43 -> ILNativeVariant.Storage - | 0x44 -> ILNativeVariant.StreamedObject - | 0x45 -> ILNativeVariant.StoredObject - | 0x46 -> ILNativeVariant.BlobObject - | 0x47 -> ILNativeVariant.CF - | 0x48 -> ILNativeVariant.CLSID - | 0x14 -> ILNativeVariant.Int64 + | 0x1 -> ILNativeVariant.Null + | 0x02 -> ILNativeVariant.Int16 + | 0x03 -> ILNativeVariant.Int32 + | 0x0C -> ILNativeVariant.Variant + | 0x04 -> ILNativeVariant.Single + | 0x05 -> ILNativeVariant.Double + | 0x06 -> ILNativeVariant.Currency + | 0x07 -> ILNativeVariant.Date + | 0x08 -> ILNativeVariant.BSTR + | 0x09 -> ILNativeVariant.IDispatch + | 0x0a -> ILNativeVariant.Error + | 0x0b -> ILNativeVariant.Bool + | 0x0d -> ILNativeVariant.IUnknown + | 0x0e -> ILNativeVariant.Decimal + | 0x10 -> ILNativeVariant.Int8 + | 0x11 -> ILNativeVariant.UInt8 + | 0x12 -> ILNativeVariant.UInt16 + | 0x13 -> ILNativeVariant.UInt32 + | 0x15 -> ILNativeVariant.UInt64 + | 0x16 -> ILNativeVariant.Int + | 0x17 -> ILNativeVariant.UInt + | 0x18 -> ILNativeVariant.Void + | 0x19 -> ILNativeVariant.HRESULT + | 0x1a -> ILNativeVariant.PTR + | 0x1c -> ILNativeVariant.CArray + | 0x1d -> ILNativeVariant.UserDefined + | 0x1e -> ILNativeVariant.LPSTR + | 0x1B -> ILNativeVariant.SafeArray + | 0x1f -> ILNativeVariant.LPWSTR + | 0x24 -> ILNativeVariant.Record + | 0x40 -> ILNativeVariant.FileTime + | 0x41 -> ILNativeVariant.Blob + | 0x42 -> ILNativeVariant.Stream + | 0x43 -> ILNativeVariant.Storage + | 0x44 -> ILNativeVariant.StreamedObject + | 0x45 -> ILNativeVariant.StoredObject + | 0x46 -> ILNativeVariant.BlobObject + | 0x47 -> ILNativeVariant.CF + | 0x48 -> ILNativeVariant.CLSID + | 0x14 -> ILNativeVariant.Int64 | _ -> ILNativeVariant.Empty let safeArrayUserDefinedSubType = // the argument is a System.Type obj, but it's written to MD as a UTF8 string - match decoder.FindTypeName "SafeArrayUserDefinedSubType" "" with + match decoder.FindTypeName "SafeArrayUserDefinedSubType" "" with | "" -> None | res -> if (safeArraySubType = ILNativeVariant.IDispatch) || (safeArraySubType = ILNativeVariant.IUnknown) then Some(res) else None - ILNativeType.SafeArray(safeArraySubType,safeArrayUserDefinedSubType) - | 0x1E -> ILNativeType.FixedArray (decoder.FindInt32 "SizeConst" 0x0) + ILNativeType.SafeArray(safeArraySubType, safeArrayUserDefinedSubType) + | 0x1E -> ILNativeType.FixedArray (decoder.FindInt32 "SizeConst" 0x0) | 0x1F -> ILNativeType.Int | 0x20 -> ILNativeType.UInt | 0x22 -> ILNativeType.ByValStr @@ -5228,131 +5391,136 @@ and GenMarshal cenv attribs = | 0x25 -> ILNativeType.VariantBool | 0x26 -> ILNativeType.Method | 0x28 -> ILNativeType.AsAny - | 0x2A -> - let sizeParamIndex = - match decoder.FindInt16 "SizeParamIndex" -1s with + | 0x2A -> + let sizeParamIndex = + match decoder.FindInt16 "SizeParamIndex" -1s with | -1s -> None - | res -> Some ((int)res,None) - let arraySubType = - match decoder.FindInt32 "ArraySubType" -1 with + | res -> Some ((int)res, None) + let arraySubType = + match decoder.FindInt32 "ArraySubType" -1 with | -1 -> None | res -> Some (decodeUnmanagedType res) - ILNativeType.Array(arraySubType,sizeParamIndex) + ILNativeType.Array(arraySubType, sizeParamIndex) | 0x2B -> ILNativeType.LPSTRUCT - | 0x2C -> - error(Error(FSComp.SR.ilCustomMarshallersCannotBeUsedInFSharp(),m)) - (* ILNativeType.Custom of bytes * string * string * bytes (* GUID,nativeTypeName,custMarshallerName,cookieString *) *) - //ILNativeType.Error + | 0x2C -> + error(Error(FSComp.SR.ilCustomMarshallersCannotBeUsedInFSharp(), m)) + (* ILNativeType.Custom of bytes * string * string * bytes (* GUID, nativeTypeName, custMarshallerName, cookieString *) *) + //ILNativeType.Error | 0x2D -> ILNativeType.Error | 0x30 -> ILNativeType.LPUTF8STR | _ -> ILNativeType.Empty Some(decodeUnmanagedType unmanagedType), otherAttribs - | Some (Attrib(_,_,_,_,_,_,m)) -> - errorR(Error(FSComp.SR.ilMarshalAsAttributeCannotBeDecoded(),m)) - None, attribs - | _ -> + | Some (Attrib(_, _, _, _, _, _, m)) -> + errorR(Error(FSComp.SR.ilMarshalAsAttributeCannotBeDecoded(), m)) + None, attribs + | _ -> // No MarshalAs detected - None, attribs + None, attribs +/// Generate special attributes on an IL parameter and GenParamAttribs cenv paramTy attribs = let inFlag = HasFSharpAttribute cenv.g cenv.g.attrib_InAttribute attribs || isInByrefTy cenv.g paramTy let outFlag = HasFSharpAttribute cenv.g cenv.g.attrib_OutAttribute attribs || isOutByrefTy cenv.g paramTy let optionalFlag = HasFSharpAttributeOpt cenv.g cenv.g.attrib_OptionalAttribute attribs - - let defaultValue = TryFindFSharpAttributeOpt cenv.g cenv.g.attrib_DefaultParameterValueAttribute attribs + + let defaultValue = TryFindFSharpAttributeOpt cenv.g cenv.g.attrib_DefaultParameterValueAttribute attribs |> Option.bind OptionalArgInfo.FieldInitForDefaultParameterValueAttrib - // Return the filtered attributes. Do not generate In, Out, Optional or DefaultParameterValue attributes + // Return the filtered attributes. Do not generate In, Out, Optional or DefaultParameterValue attributes // as custom attributes in the code - they are implicit from the IL bits for these - let attribs = - attribs + let attribs = + attribs |> List.filter (IsMatchingFSharpAttribute cenv.g cenv.g.attrib_InAttribute >> not) |> List.filter (IsMatchingFSharpAttribute cenv.g cenv.g.attrib_OutAttribute >> not) |> List.filter (IsMatchingFSharpAttributeOpt cenv.g cenv.g.attrib_OptionalAttribute >> not) |> List.filter (IsMatchingFSharpAttributeOpt cenv.g cenv.g.attrib_DefaultParameterValueAttribute >> not) - let Marshal,attribs = GenMarshal cenv attribs - inFlag,outFlag,optionalFlag,defaultValue,Marshal,attribs + let Marshal, attribs = GenMarshal cenv attribs + inFlag, outFlag, optionalFlag, defaultValue, Marshal, attribs -and GenParams cenv eenv (mspec:ILMethodSpec) (attribs:ArgReprInfo list) methodArgTys (implValsOpt: Val list option) = +/// Generate IL parameters +and GenParams cenv eenv (mspec: ILMethodSpec) (attribs: ArgReprInfo list) methodArgTys (implValsOpt: Val list option) = let ilArgTys = mspec.FormalArgTypes - let argInfosAndTypes = + let argInfosAndTypes = if List.length attribs = List.length ilArgTys then List.zip ilArgTys attribs - else ilArgTys |> List.map (fun ilArgTy -> ilArgTy,ValReprInfo.unnamedTopArg1) + else ilArgTys |> List.map (fun ilArgTy -> ilArgTy, ValReprInfo.unnamedTopArg1) - let argInfosAndTypes = - match implValsOpt with + let argInfosAndTypes = + match implValsOpt with | Some(implVals) when (implVals.Length = ilArgTys.Length) -> - List.map2 (fun x y -> x,Some y) argInfosAndTypes implVals - | _ -> - List.map (fun x -> x,None) argInfosAndTypes + List.map2 (fun x y -> x, Some y) argInfosAndTypes implVals + | _ -> + List.map (fun x -> x, None) argInfosAndTypes - (Set.empty,List.zip methodArgTys argInfosAndTypes) - ||> List.mapFold (fun takenNames (methodArgTy, ((ilArgTy,topArgInfo),implValOpt)) -> - let inFlag,outFlag,optionalFlag,defaultParamValue,Marshal,attribs = GenParamAttribs cenv methodArgTy topArgInfo.Attribs - - let idOpt = (match topArgInfo.Name with - | Some v -> Some v - | None -> match implValOpt with + (Set.empty, List.zip methodArgTys argInfosAndTypes) + ||> List.mapFold (fun takenNames (methodArgTy, ((ilArgTy, topArgInfo), implValOpt)) -> + let inFlag, outFlag, optionalFlag, defaultParamValue, Marshal, attribs = GenParamAttribs cenv methodArgTy topArgInfo.Attribs + + let idOpt = (match topArgInfo.Name with + | Some v -> Some v + | None -> match implValOpt with | Some v -> Some v.Id | None -> None) - let nmOpt,takenNames = - match idOpt with - | Some id -> + let nmOpt, takenNames = + match idOpt with + | Some id -> let nm = if takenNames.Contains(id.idText) then globalNng.FreshCompilerGeneratedName (id.idText, id.idRange) else id.idText Some nm, takenNames.Add(nm) - | None -> + | None -> None, takenNames - - - let ilAttribs = GenAttrs cenv eenv attribs - let ilAttribs = - match GenReadOnlyAttributeIfNecessary cenv.g methodArgTy with + + let ilAttribs = GenAttrs cenv eenv attribs + + let ilAttribs = + match GenReadOnlyAttributeIfNecessary cenv.g methodArgTy with | Some attr -> ilAttribs @ [attr] | None -> ilAttribs - - let param : ILParameter = + + let param: ILParameter = { Name=nmOpt - Type= ilArgTy + Type= ilArgTy Default=defaultParamValue - Marshal=Marshal - IsIn=inFlag - IsOut=outFlag - IsOptional=optionalFlag + Marshal=Marshal + IsIn=inFlag + IsOut=outFlag + IsOptional=optionalFlag CustomAttrsStored = storeILCustomAttrs (mkILCustomAttrs ilAttribs) MetadataIndex = NoMetadataIdx } param, takenNames) |> fst - -and GenReturnInfo cenv eenv ilRetTy (retInfo : ArgReprInfo) : ILReturn = - let marshal,attribs = GenMarshal cenv retInfo.Attribs + +/// Generate IL method return information +and GenReturnInfo cenv eenv ilRetTy (retInfo: ArgReprInfo) : ILReturn = + let marshal, attribs = GenMarshal cenv retInfo.Attribs { Type=ilRetTy Marshal=marshal CustomAttrsStored= storeILCustomAttrs (mkILCustomAttrs (GenAttrs cenv eenv attribs)) MetadataIndex = NoMetadataIdx } - -and GenPropertyForMethodDef compileAsInstance tref mdef (v:Val) (memberInfo:ValMemberInfo) ilArgTys ilPropTy ilAttrs compiledName = - let name = match compiledName with | Some n -> n | _ -> v.PropertyName in (* chop "get_" *) - + +/// Generate an IL property for a member +and GenPropertyForMethodDef compileAsInstance tref mdef (v: Val) (memberInfo: ValMemberInfo) ilArgTys ilPropTy ilAttrs compiledName = + let name = match compiledName with | Some n -> n | _ -> v.PropertyName in (* chop "get_" *) + ILPropertyDef.Create(name = name, attributes = PropertyAttributes.None, - setMethod = (if memberInfo.MemberFlags.MemberKind= MemberKind.PropertySet then Some(mkRefToILMethod(tref,mdef)) else None), - getMethod = (if memberInfo.MemberFlags.MemberKind= MemberKind.PropertyGet then Some(mkRefToILMethod(tref,mdef)) else None), + setMethod = (if memberInfo.MemberFlags.MemberKind= MemberKind.PropertySet then Some(mkRefToILMethod(tref, mdef)) else None), + getMethod = (if memberInfo.MemberFlags.MemberKind= MemberKind.PropertyGet then Some(mkRefToILMethod(tref, mdef)) else None), callingConv = (if compileAsInstance then ILThisConvention.Instance else ILThisConvention.Static), propertyType = ilPropTy, init = None, args = ilArgTys, customAttrs = ilAttrs) -and GenEventForProperty cenv eenvForMeth (mspec:ILMethodSpec) (v:Val) ilAttrsThatGoOnPrimaryItem m returnTy = +/// Generate an ILEventDef for a [] member +and GenEventForProperty cenv eenvForMeth (mspec: ILMethodSpec) (v: Val) ilAttrsThatGoOnPrimaryItem m returnTy = let evname = v.PropertyName let delegateTy = Infos.FindDelegateTypeOfPropertyEvent cenv.g cenv.amap evname m returnTy let ilDelegateTy = GenType cenv.amap m eenvForMeth.tyenv delegateTy let ilThisTy = mspec.DeclaringType - let addMethRef = mkILMethRef (ilThisTy.TypeRef,mspec.CallingConv,"add_" + evname,0,[ilDelegateTy],ILType.Void) - let removeMethRef = mkILMethRef (ilThisTy.TypeRef,mspec.CallingConv,"remove_" + evname,0,[ilDelegateTy],ILType.Void) + let addMethRef = mkILMethRef (ilThisTy.TypeRef, mspec.CallingConv, "add_" + evname, 0, [ilDelegateTy], ILType.Void) + let removeMethRef = mkILMethRef (ilThisTy.TypeRef, mspec.CallingConv, "remove_" + evname, 0, [ilDelegateTy], ILType.Void) ILEventDef.Create(eventType = Some ilDelegateTy, name= evname, attributes = EventAttributes.None, @@ -5362,16 +5530,15 @@ and GenEventForProperty cenv eenvForMeth (mspec:ILMethodSpec) (v:Val) ilAttrsTha otherMethods= [], customAttrs = mkILCustomAttrs ilAttrsThatGoOnPrimaryItem) - -and ComputeFlagFixupsForMemberBinding cenv (v:Val,memberInfo:ValMemberInfo) = - if isNil memberInfo.ImplementedSlotSigs then +and ComputeFlagFixupsForMemberBinding cenv (v: Val, memberInfo: ValMemberInfo) = + if isNil memberInfo.ImplementedSlotSigs then [fixupVirtualSlotFlags] - else - memberInfo.ImplementedSlotSigs |> List.map (fun slotsig -> + else + memberInfo.ImplementedSlotSigs |> List.map (fun slotsig -> let oty = slotsig.ImplementedType let otcref = tcrefOfAppTy cenv.g oty let tcref = v.MemberApparentEntity - + let useMethodImpl = // REVIEW: it would be good to get rid of this special casing of Compare and GetHashCode during code generation isInterfaceTy cenv.g oty && @@ -5379,12 +5546,12 @@ and ComputeFlagFixupsForMemberBinding cenv (v:Val,memberInfo:ValMemberInfo) = Option.isSome tcref.GeneratedCompareToValues && (typeEquiv cenv.g oty cenv.g.mk_IComparable_ty || tyconRefEq cenv.g cenv.g.system_GenericIComparable_tcref otcref) - + not isCompare) && (let isGenericEquals = Option.isSome tcref.GeneratedHashAndEqualsWithComparerValues && tyconRefEq cenv.g cenv.g.system_GenericIEquatable_tcref otcref - + not isGenericEquals) && (let isStructural = (Option.isSome tcref.GeneratedCompareToWithComparerValues && typeEquiv cenv.g oty cenv.g.mk_IStructuralComparable_ty) || @@ -5392,32 +5559,32 @@ and ComputeFlagFixupsForMemberBinding cenv (v:Val,memberInfo:ValMemberInfo) = not isStructural) - let nameOfOverridingMethod = GenNameOfOverridingMethod cenv (useMethodImpl,slotsig) + let nameOfOverridingMethod = GenNameOfOverridingMethod cenv (useMethodImpl, slotsig) - if useMethodImpl then + if useMethodImpl then fixupMethodImplFlags >> renameMethodDef nameOfOverridingMethod - else + else fixupVirtualSlotFlags >> renameMethodDef nameOfOverridingMethod) - -and ComputeMethodImplAttribs cenv (_v:Val) attrs = - let implflags = + +and ComputeMethodImplAttribs cenv (_v: Val) attrs = + let implflags = match TryFindFSharpAttribute cenv.g cenv.g.attrib_MethodImplAttribute attrs with - | Some (Attrib(_,_,[ AttribInt32Arg flags ],_,_,_,_)) -> flags + | Some (Attrib(_, _, [ AttribInt32Arg flags ], _, _, _, _)) -> flags | _ -> 0x0 - let hasPreserveSigAttr = + let hasPreserveSigAttr = match TryFindFSharpAttributeOpt cenv.g cenv.g.attrib_PreserveSigAttribute attrs with | Some _ -> true | _ -> false - - // strip the MethodImpl pseudo-custom attribute + + // strip the MethodImpl pseudo-custom attribute // The following method implementation flags are used here // 0x80 - hasPreserveSigImplFlag // 0x20 - synchronize - // (See ECMA 335, Partition II, section 23.1.11 - Flags for methods [MethodImplAttributes]) - let attrs = - attrs - |> List.filter (IsMatchingFSharpAttribute cenv.g cenv.g.attrib_MethodImplAttribute >> not) + // (See ECMA 335, Partition II, section 23.1.11 - Flags for methods [MethodImplAttributes]) + let attrs = + attrs + |> List.filter (IsMatchingFSharpAttribute cenv.g cenv.g.attrib_MethodImplAttribute >> not) |> List.filter (IsMatchingFSharpAttributeOpt cenv.g cenv.g.attrib_PreserveSigAttribute >> not) let hasPreserveSigImplFlag = ((implflags &&& 0x80) <> 0x0) || hasPreserveSigAttr @@ -5425,61 +5592,61 @@ and ComputeMethodImplAttribs cenv (_v:Val) attrs = let hasNoInliningImplFlag = (implflags &&& 0x08) <> 0x0 let hasAggressiveInliningImplFlag = (implflags &&& 0x0100) <> 0x0 hasPreserveSigImplFlag, hasSynchronizedImplFlag, hasNoInliningImplFlag, hasAggressiveInliningImplFlag, attrs - -and GenMethodForBinding - cenv cgbuf eenv - (v:Val,mspec,access,paramInfos,retInfo) - (topValInfo,ctorThisValOpt,baseValOpt,tps,methodVars, methodArgTys, body, returnTy) = - + +and GenMethodForBinding + cenv cgbuf eenv + (v: Val, mspec, access, paramInfos, retInfo) + (topValInfo, ctorThisValOpt, baseValOpt, tps, methodVars, methodArgTys, body, returnTy) = + let m = v.Range - let selfMethodVars,nonSelfMethodVars,compileAsInstance = - match v.MemberInfo with - | Some _ when ValSpecIsCompiledAsInstance cenv.g v -> - match methodVars with - | [] -> error(InternalError("Internal error: empty argument list for instance method",v.Range)) - | h::t -> [h],t,true - | _ -> [],methodVars,false - - let nonUnitNonSelfMethodVars,body = BindUnitVars cenv.g (nonSelfMethodVars,paramInfos,body) + let selfMethodVars, nonSelfMethodVars, compileAsInstance = + match v.MemberInfo with + | Some _ when ValSpecIsCompiledAsInstance cenv.g v -> + match methodVars with + | [] -> error(InternalError("Internal error: empty argument list for instance method", v.Range)) + | h::t -> [h], t, true + | _ -> [], methodVars, false + + let nonUnitNonSelfMethodVars, body = BindUnitVars cenv.g (nonSelfMethodVars, paramInfos, body) let nonUnitMethodVars = selfMethodVars@nonUnitNonSelfMethodVars - let cmtps,curriedArgInfos,_,_ = GetTopValTypeInCompiledForm cenv.g topValInfo v.Type v.Range - + let cmtps, curriedArgInfos, _, _ = GetTopValTypeInCompiledForm cenv.g topValInfo v.Type v.Range + let eenv = bindBaseOrThisVarOpt cenv eenv ctorThisValOpt let eenv = bindBaseOrThisVarOpt cenv eenv baseValOpt - // The type parameters of the method's type are different to the type parameters - // for the big lambda ("tlambda") of the implementation of the method. + // The type parameters of the method's type are different to the type parameters + // for the big lambda ("tlambda") of the implementation of the method. let eenvUnderMethLambdaTypars = EnvForTypars tps eenv let eenvUnderMethTypeTypars = EnvForTypars cmtps eenv - // Add the arguments to the environment. We add an implicit 'this' argument to constructors - let isCtor = v.IsConstructor - let eenvForMeth = + // Add the arguments to the environment. We add an implicit 'this' argument to constructors + let isCtor = v.IsConstructor + let eenvForMeth = let eenvForMeth = eenvUnderMethLambdaTypars let numImplicitArgs = if isCtor then 1 else 0 - let eenvForMeth = AddStorageForLocalVals cenv.g (List.mapi (fun i v -> (v,Arg (numImplicitArgs+i))) nonUnitMethodVars) eenvForMeth + let eenvForMeth = AddStorageForLocalVals cenv.g (List.mapi (fun i v -> (v, Arg (numImplicitArgs+i))) nonUnitMethodVars) eenvForMeth eenvForMeth - let tailCallInfo = [(mkLocalValRef v,BranchCallMethod (topValInfo.AritiesOfArgs,curriedArgInfos,tps,nonUnitMethodVars.Length,v.NumObjArgs))] + let tailCallInfo = [(mkLocalValRef v, BranchCallMethod (topValInfo.AritiesOfArgs, curriedArgInfos, tps, nonUnitMethodVars.Length, v.NumObjArgs))] - // Discard the result on a 'void' return type. For a constructor just return 'void' - let sequel = - if isUnitTy cenv.g returnTy then discardAndReturnVoid - elif isCtor then ReturnVoid + // Discard the result on a 'void' return type. For a constructor just return 'void' + let sequel = + if isUnitTy cenv.g returnTy then discardAndReturnVoid + elif isCtor then ReturnVoid else Return // Now generate the code. - - let hasPreserveSigNamedArg,ilMethodBody,hasDllImport = + let hasPreserveSigNamedArg, ilMethodBody, hasDllImport = match TryFindFSharpAttributeOpt cenv.g cenv.g.attrib_DllImportAttribute v.Attribs with - | Some (Attrib(_,_,[ AttribStringArg(dll) ],namedArgs,_,_,m)) -> - if not (isNil tps) then error(Error(FSComp.SR.ilSignatureForExternalFunctionContainsTypeParameters(),m)) - let hasPreserveSigNamedArg, mbody = GenPInvokeMethod (v.CompiledName,dll,namedArgs) + | Some (Attrib(_, _, [ AttribStringArg(dll) ], namedArgs, _, _, m)) -> + if not (isNil tps) then error(Error(FSComp.SR.ilSignatureForExternalFunctionContainsTypeParameters(), m)) + let hasPreserveSigNamedArg, mbody = GenPInvokeMethod (v.CompiledName, dll, namedArgs) hasPreserveSigNamedArg, mbody, true - | Some (Attrib(_,_,_,_,_,_,m)) -> - error(Error(FSComp.SR.ilDllImportAttributeCouldNotBeDecoded(),m)) - | _ -> + | Some (Attrib(_, _, _, _, _, _, m)) -> + error(Error(FSComp.SR.ilDllImportAttributeCouldNotBeDecoded(), m)) + + | _ -> // Replace the body of ValInline.PseudoVal "must inline" methods with a 'throw' // However still generate the code for reflection etc. let bodyExpr = @@ -5487,41 +5654,41 @@ and GenMethodForBinding let exnArg = mkString cenv.g m (FSComp.SR.ilDynamicInvocationNotSupported(v.CompiledName)) let exnExpr = MakeNotSupportedExnExpr cenv eenv (exnArg, m) mkThrow m returnTy exnExpr - else - body + else + body + + let ilCode = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways, tailCallInfo, mspec.Name, eenvForMeth, 0, bodyExpr, sequel) - // This is the main code generation for most methods - false, - MethodBody.IL(CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,tailCallInfo, mspec.Name, eenvForMeth, 0, bodyExpr, sequel)), - false + // This is the main code generation for most methods + false, MethodBody.IL ilCode, false // Do not generate DllImport attributes into the code - they are implicit from the P/Invoke - let attrs = - v.Attribs + let attrs = + v.Attribs |> List.filter (IsMatchingFSharpAttributeOpt cenv.g cenv.g.attrib_DllImportAttribute >> not) |> List.filter (IsMatchingFSharpAttribute cenv.g cenv.g.attrib_CompiledNameAttribute >> not) - - let attrsAppliedToGetterOrSetter, attrs = - List.partition (fun (Attrib(_,_,_,_,isAppliedToGetterOrSetter,_,_)) -> isAppliedToGetterOrSetter) attrs - - let sourceNameAttribs,compiledName = - match v.Attribs |> List.tryFind (IsMatchingFSharpAttribute cenv.g cenv.g.attrib_CompiledNameAttribute) with - | Some (Attrib(_,_,[ AttribStringArg(b) ],_,_,_,_)) -> [ mkCompilationSourceNameAttr cenv.g v.LogicalName ], Some b - | _ -> [],None - + + let attrsAppliedToGetterOrSetter, attrs = + List.partition (fun (Attrib(_, _, _, _, isAppliedToGetterOrSetter, _, _)) -> isAppliedToGetterOrSetter) attrs + + let sourceNameAttribs, compiledName = + match v.Attribs |> List.tryFind (IsMatchingFSharpAttribute cenv.g cenv.g.attrib_CompiledNameAttribute) with + | Some (Attrib(_, _, [ AttribStringArg(b) ], _, _, _, _)) -> [ mkCompilationSourceNameAttr cenv.g v.LogicalName ], Some b + | _ -> [], None + // check if the hasPreserveSigNamedArg and hasSynchronizedImplFlag implementation flags have been specified let hasPreserveSigImplFlag, hasSynchronizedImplFlag, hasNoInliningFlag, hasAggressiveInliningImplFlag, attrs = ComputeMethodImplAttribs cenv v attrs - - let securityAttributes,attrs = attrs |> List.partition (fun a -> IsSecurityAttribute cenv.g cenv.amap cenv.casApplied a m) + let securityAttributes, attrs = attrs |> List.partition (fun a -> IsSecurityAttribute cenv.g cenv.amap cenv.casApplied a m) + let permissionSets = CreatePermissionSets cenv eenv securityAttributes - + let secDecls = if List.isEmpty securityAttributes then emptyILSecurityDecls else mkILSecurityDecls permissionSets - - // Do not push the attributes to the method for events and properties - let ilAttrsCompilerGenerated = if v.IsCompilerGenerated then [ cenv.g.CompilerGeneratedAttribute ] else [] - let ilAttrsThatGoOnPrimaryItem = + // Do not push the attributes to the method for events and properties + let ilAttrsCompilerGenerated = if v.IsCompilerGenerated then [ cenv.g.CompilerGeneratedAttribute ] else [] + + let ilAttrsThatGoOnPrimaryItem = [ yield! GenAttrs cenv eenv attrs yield! GenCompilationArgumentCountsAttr cenv v ] @@ -5531,11 +5698,11 @@ and GenMethodForBinding let methName = mspec.Name let tref = mspec.MethodRef.DeclaringTypeRef - let EmitTheMethodDef (mdef:ILMethodDef) = - // Does the function have an explicit [] attribute? + let EmitTheMethodDef (mdef: ILMethodDef) = + // Does the function have an explicit [] attribute? let isExplicitEntryPoint = HasFSharpAttribute cenv.g cenv.g.attrib_EntryPointAttribute attrs - let mdef = + let mdef = mdef .WithSecurity(not (List.isEmpty securityAttributes)) .WithPInvoke(hasDllImport) @@ -5545,128 +5712,126 @@ and GenMethodForBinding .WithAggressiveInlining(hasAggressiveInliningImplFlag) .With(isEntryPoint=isExplicitEntryPoint, securityDecls=secDecls) - let mdef = + let mdef = if // operator names - mdef.Name.StartsWithOrdinal("op_") || + mdef.Name.StartsWithOrdinal("op_") || // active pattern names mdef.Name.StartsWithOrdinal("|") || // event add/remove method v.val_flags.IsGeneratedEventVal then mdef.WithSpecialName - else + else mdef CountMethodDef() - cgbuf.mgbuf.AddMethodDef(tref,mdef) - + cgbuf.mgbuf.AddMethodDef(tref, mdef) + - match v.MemberInfo with - // don't generate unimplemented abstracts - | Some(memberInfo) when memberInfo.MemberFlags.IsDispatchSlot && not memberInfo.IsImplemented -> + match v.MemberInfo with + // don't generate unimplemented abstracts + | Some(memberInfo) when memberInfo.MemberFlags.IsDispatchSlot && not memberInfo.IsImplemented -> // skipping unimplemented abstract method - () - | Some(memberInfo) when not v.IsExtensionMember -> + () + | Some(memberInfo) when not v.IsExtensionMember -> let ilMethTypars = ilTypars |> List.drop mspec.DeclaringType.GenericArgs.Length - if memberInfo.MemberFlags.MemberKind = MemberKind.Constructor then + if memberInfo.MemberFlags.MemberKind = MemberKind.Constructor then assert (isNil ilMethTypars) - let mdef = mkILCtor (access,ilParams,ilMethodBody) + let mdef = mkILCtor (access, ilParams, ilMethodBody) let mdef = mdef.With(customAttrs= mkILCustomAttrs (ilAttrsThatGoOnPrimaryItem @ sourceNameAttribs @ ilAttrsCompilerGenerated)) EmitTheMethodDef mdef - elif memberInfo.MemberFlags.MemberKind = MemberKind.ClassConstructor then + elif memberInfo.MemberFlags.MemberKind = MemberKind.ClassConstructor then assert (isNil ilMethTypars) - let mdef = mkILClassCtor ilMethodBody + let mdef = mkILClassCtor ilMethodBody let mdef = mdef.With(customAttrs= mkILCustomAttrs (ilAttrsThatGoOnPrimaryItem @ sourceNameAttribs @ ilAttrsCompilerGenerated)) EmitTheMethodDef mdef // Generate virtual/override methods + method-impl information if needed else - let mdef = - if not compileAsInstance then - mkILStaticMethod (ilMethTypars,v.CompiledName,access,ilParams,ilReturn,ilMethodBody) + let mdef = + if not compileAsInstance then + mkILStaticMethod (ilMethTypars, v.CompiledName, access, ilParams, ilReturn, ilMethodBody) - elif (memberInfo.MemberFlags.IsDispatchSlot && memberInfo.IsImplemented) || - memberInfo.MemberFlags.IsOverrideOrExplicitImpl then + elif (memberInfo.MemberFlags.IsDispatchSlot && memberInfo.IsImplemented) || + memberInfo.MemberFlags.IsOverrideOrExplicitImpl then - let flagFixups = ComputeFlagFixupsForMemberBinding cenv (v,memberInfo) - let mdef = mkILGenericVirtualMethod (v.CompiledName,ILMemberAccess.Public,ilMethTypars,ilParams,ilReturn,ilMethodBody) + let flagFixups = ComputeFlagFixupsForMemberBinding cenv (v, memberInfo) + let mdef = mkILGenericVirtualMethod (v.CompiledName, ILMemberAccess.Public, ilMethTypars, ilParams, ilReturn, ilMethodBody) let mdef = List.fold (fun mdef f -> f mdef) mdef flagFixups // fixup can potentially change name of reflected definition that was already recorded - patch it if necessary cgbuf.mgbuf.ReplaceNameOfReflectedDefinition(v, mdef.Name) mdef - else - mkILGenericNonVirtualMethod (v.CompiledName,access,ilMethTypars,ilParams,ilReturn,ilMethodBody) + else + mkILGenericNonVirtualMethod (v.CompiledName, access, ilMethTypars, ilParams, ilReturn, ilMethodBody) - let isAbstract = - memberInfo.MemberFlags.IsDispatchSlot && - let tcref = v.MemberApparentEntity + let isAbstract = + memberInfo.MemberFlags.IsDispatchSlot && + let tcref = v.MemberApparentEntity not tcref.Deref.IsFSharpDelegateTycon - let mdef = - if mdef.IsVirtual then + let mdef = + if mdef.IsVirtual then mdef.WithFinal(memberInfo.MemberFlags.IsFinal).WithAbstract(isAbstract) else mdef - match memberInfo.MemberFlags.MemberKind with + match memberInfo.MemberFlags.MemberKind with + + | (MemberKind.PropertySet | MemberKind.PropertyGet) -> + if not (isNil ilMethTypars) then + error(InternalError("A property may not be more generic than the enclosing type - constrain the polymorphism in the expression", v.Range)) - | (MemberKind.PropertySet | MemberKind.PropertyGet) -> - if not (isNil ilMethTypars) then - error(InternalError("A property may not be more generic than the enclosing type - constrain the polymorphism in the expression",v.Range)) - // Check if we're compiling the property as a .NET event - if CompileAsEvent cenv.g v.Attribs then + if CompileAsEvent cenv.g v.Attribs then // Emit the pseudo-property as an event, but not if its a private method impl - if mdef.Access <> ILMemberAccess.Private then - let edef = GenEventForProperty cenv eenvForMeth mspec v ilAttrsThatGoOnPrimaryItem m returnTy - cgbuf.mgbuf.AddEventDef(tref,edef) + if mdef.Access <> ILMemberAccess.Private then + let edef = GenEventForProperty cenv eenvForMeth mspec v ilAttrsThatGoOnPrimaryItem m returnTy + cgbuf.mgbuf.AddEventDef(tref, edef) // The method def is dropped on the floor here - + else // Emit the property, but not if its a private method impl - if mdef.Access <> ILMemberAccess.Private then + if mdef.Access <> ILMemberAccess.Private then let vtyp = ReturnTypeOfPropertyVal cenv.g v let ilPropTy = GenType cenv.amap m eenvUnderMethTypeTypars.tyenv vtyp - let ilArgTys = v |> ArgInfosOfPropertyVal cenv.g |> List.map fst |> GenTypes cenv.amap m eenvUnderMethTypeTypars.tyenv + let ilArgTys = v |> ArgInfosOfPropertyVal cenv.g |> List.map fst |> GenTypes cenv.amap m eenvUnderMethTypeTypars.tyenv let ilPropDef = GenPropertyForMethodDef compileAsInstance tref mdef v memberInfo ilArgTys ilPropTy (mkILCustomAttrs ilAttrsThatGoOnPrimaryItem) compiledName - cgbuf.mgbuf.AddOrMergePropertyDef(tref,ilPropDef,m) + cgbuf.mgbuf.AddOrMergePropertyDef(tref, ilPropDef, m) - // Add the special name flag for all properties + // Add the special name flag for all properties let mdef = mdef.WithSpecialName.With(customAttrs= mkILCustomAttrs ((GenAttrs cenv eenv attrsAppliedToGetterOrSetter) @ sourceNameAttribs @ ilAttrsCompilerGenerated)) EmitTheMethodDef mdef - | _ -> + | _ -> let mdef = mdef.With(customAttrs= mkILCustomAttrs (ilAttrsThatGoOnPrimaryItem @ sourceNameAttribs @ ilAttrsCompilerGenerated)) EmitTheMethodDef mdef - | _ -> - let mdef = mkILStaticMethod (ilTypars, methName, access,ilParams,ilReturn,ilMethodBody) + | _ -> + let mdef = mkILStaticMethod (ilTypars, methName, access, ilParams, ilReturn, ilMethodBody) // For extension properties, also emit attrsAppliedToGetterOrSetter on the getter or setter method - let ilAttrs = - match v.MemberInfo with - | Some memberInfo when v.IsExtensionMember -> - match memberInfo.MemberFlags.MemberKind with - | (MemberKind.PropertySet | MemberKind.PropertyGet) -> ilAttrsThatGoOnPrimaryItem @ GenAttrs cenv eenv attrsAppliedToGetterOrSetter - | _ -> ilAttrsThatGoOnPrimaryItem - | _ -> ilAttrsThatGoOnPrimaryItem + let ilAttrs = + match v.MemberInfo with + | Some memberInfo when v.IsExtensionMember -> + match memberInfo.MemberFlags.MemberKind with + | (MemberKind.PropertySet | MemberKind.PropertyGet) -> ilAttrsThatGoOnPrimaryItem @ GenAttrs cenv eenv attrsAppliedToGetterOrSetter + | _ -> ilAttrsThatGoOnPrimaryItem + | _ -> ilAttrsThatGoOnPrimaryItem let ilCustomAttrs = mkILCustomAttrs (ilAttrs @ sourceNameAttribs @ ilAttrsCompilerGenerated) let mdef = mdef.With(customAttrs= ilCustomAttrs) EmitTheMethodDef mdef - - - -and GenPInvokeMethod (nm,dll,namedArgs) = - let decoder = AttributeDecoder namedArgs +and GenPInvokeMethod (nm, dll, namedArgs) = + let decoder = AttributeDecoder namedArgs + let hasPreserveSigNamedArg = decoder.FindBool "PreserveSig" true hasPreserveSigNamedArg, - MethodBody.PInvoke + MethodBody.PInvoke { Where=mkSimpleModRef dll Name=decoder.FindString "EntryPoint" nm CallingConv= - match decoder.FindInt32 "CallingConvention" 0 with + match decoder.FindInt32 "CallingConvention" 0 with | 1 -> PInvokeCallingConvention.WinApi | 2 -> PInvokeCallingConvention.Cdecl | 3 -> PInvokeCallingConvention.Stdcall @@ -5674,265 +5839,269 @@ and GenPInvokeMethod (nm,dll,namedArgs) = | 5 -> PInvokeCallingConvention.Fastcall | _ -> PInvokeCallingConvention.WinApi CharEncoding= - match decoder.FindInt32 "CharSet" 0 with + match decoder.FindInt32 "CharSet" 0 with | 1 -> PInvokeCharEncoding.None | 2 -> PInvokeCharEncoding.Ansi | 3 -> PInvokeCharEncoding.Unicode | 4 -> PInvokeCharEncoding.Auto - | _ -> PInvokeCharEncoding.None + | _ -> PInvokeCharEncoding.None NoMangle= decoder.FindBool "ExactSpelling" false LastError= decoder.FindBool "SetLastError" false ThrowOnUnmappableChar= if (decoder.FindBool "ThrowOnUnmappableChar" false) then PInvokeThrowOnUnmappableChar.Enabled else PInvokeThrowOnUnmappableChar.UseAssembly CharBestFit=if (decoder.FindBool "BestFitMapping" false) then PInvokeCharBestFit.Enabled else PInvokeCharBestFit.UseAssembly } - - + and GenBindings cenv cgbuf eenv binds = List.iter (GenBinding cenv cgbuf eenv) binds //------------------------------------------------------------------------- // Generate locals and other storage of values -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- -and GenSetVal cenv cgbuf eenv (vref,e,m) sequel = +and GenSetVal cenv cgbuf eenv (vref, e, m) sequel = let storage = StorageForValRef m vref eenv match storage with - | Env (ilCloTy,_,_,_) -> - CG.EmitInstr cgbuf (pop 0) (Push [ilCloTy]) mkLdarg0 - | _ -> + | Env (ilCloTy, _, _, _) -> + CG.EmitInstr cgbuf (pop 0) (Push [ilCloTy]) mkLdarg0 + | _ -> () GenExpr cenv cgbuf eenv SPSuppress e Continue GenSetStorage vref.Range cgbuf storage GenUnitThenSequel cenv eenv m eenv.cloc cgbuf sequel - -and GenGetValRefAndSequel cenv cgbuf eenv m (v:ValRef) fetchSequel = + +and GenGetValRefAndSequel cenv cgbuf eenv m (v: ValRef) fetchSequel = let ty = v.Type - GenGetStorageAndSequel cenv cgbuf eenv m (ty, GenType cenv.amap m eenv.tyenv ty) (StorageForValRef m v eenv) fetchSequel + GenGetStorageAndSequel cenv cgbuf eenv m (ty, GenType cenv.amap m eenv.tyenv ty) (StorageForValRef m v eenv) fetchSequel -and GenGetVal cenv cgbuf eenv (v:ValRef,m) sequel = +and GenGetVal cenv cgbuf eenv (v: ValRef, m) sequel = GenGetValRefAndSequel cenv cgbuf eenv m v None GenSequel cenv eenv.cloc cgbuf sequel - -and GenBindingRhs cenv cgbuf eenv sp (vspec:Val) e = - match e with - | Expr.TyLambda _ | Expr.Lambda _ -> + +and GenBindingRhs cenv cgbuf eenv sp (vspec: Val) e = + match e with + | Expr.TyLambda _ | Expr.Lambda _ -> let isLocalTypeFunc = IsNamedLocalTypeFuncVal cenv.g vspec e - + match e with - | Expr.TyLambda(_, tyargs, body, _, ttype) when + | Expr.TyLambda(_, tyargs, body, _, ttype) when ( tyargs |> List.forall (fun tp -> tp.IsErased) && - (match StorageForVal vspec.Range vspec eenv with Local _ -> true | _ -> false) && - (isLocalTypeFunc || - (match ttype with - TType_var(typar) -> match typar.Solution with Some(TType_app(t,_))-> t.IsStructOrEnumTycon | _ -> false + (match StorageForVal vspec.Range vspec eenv with Local _ -> true | _ -> false) && + (isLocalTypeFunc || + (match ttype with + TType_var(typar) -> match typar.Solution with Some(TType_app(t, _))-> t.IsStructOrEnumTycon | _ -> false | _ -> false)) ) -> // type lambda with erased type arguments that is stored as local variable (not method or property)- inline body GenExpr cenv cgbuf eenv sp body Continue | _ -> let selfv = if isLocalTypeFunc then None else Some (mkLocalValRef vspec) - GenLambda cenv cgbuf eenv isLocalTypeFunc selfv e Continue - | _ -> + GenLambda cenv cgbuf eenv isLocalTypeFunc selfv e Continue + | _ -> GenExpr cenv cgbuf eenv sp e Continue -and CommitStartScope cgbuf startScopeMarkOpt = - match startScopeMarkOpt with +and CommitStartScope cgbuf startScopeMarkOpt = + match startScopeMarkOpt with | None -> () | Some ss -> cgbuf.SetMarkToHere(ss) - -and EmitInitLocal cgbuf ty idx = CG.EmitInstrs cgbuf (pop 0) Push0 [I_ldloca (uint16 idx); (I_initobj ty) ] + +and EmitInitLocal cgbuf ty idx = CG.EmitInstrs cgbuf (pop 0) Push0 [I_ldloca (uint16 idx); (I_initobj ty) ] + and EmitSetLocal cgbuf idx = CG.EmitInstr cgbuf (pop 1) Push0 (mkStloc (uint16 idx)) + and EmitGetLocal cgbuf ty idx = CG.EmitInstr cgbuf (pop 0) (Push [ty]) (mkLdloc (uint16 idx)) + and EmitSetStaticField cgbuf fspec = CG.EmitInstr cgbuf (pop 1) Push0 (mkNormalStsfld fspec) + and EmitGetStaticFieldAddr cgbuf ty fspec = CG.EmitInstr cgbuf (pop 0) (Push [ty]) (I_ldsflda fspec) + and EmitGetStaticField cgbuf ty fspec = CG.EmitInstr cgbuf (pop 0) (Push [ty]) (mkNormalLdsfld fspec) -and GenSetStorage m cgbuf storage = - match storage with +and GenSetStorage m cgbuf storage = + match storage with | Local (idx, _, _) -> EmitSetLocal cgbuf idx - | StaticField (_, _, hasLiteralAttr, ilContainerTy, _, _, _, ilSetterMethRef, _) -> - if hasLiteralAttr then errorR(Error(FSComp.SR.ilLiteralFieldsCannotBeSet(),m)) - CG.EmitInstr cgbuf (pop 1) Push0 (I_call(Normalcall,mkILMethSpecForMethRefInTy(ilSetterMethRef,ilContainerTy,[]),None)) + | StaticField (_, _, hasLiteralAttr, ilContainerTy, _, _, _, ilSetterMethRef, _) -> + if hasLiteralAttr then errorR(Error(FSComp.SR.ilLiteralFieldsCannotBeSet(), m)) + CG.EmitInstr cgbuf (pop 1) Push0 (I_call(Normalcall, mkILMethSpecForMethRefInTy(ilSetterMethRef, ilContainerTy, []), None)) - | StaticProperty (ilGetterMethSpec,_) -> - error(Error(FSComp.SR.ilStaticMethodIsNotLambda(ilGetterMethSpec.Name),m)) + | StaticProperty (ilGetterMethSpec, _) -> + error(Error(FSComp.SR.ilStaticMethodIsNotLambda(ilGetterMethSpec.Name), m)) - | Method (_,_,mspec,m,_,_,_) -> - error(Error(FSComp.SR.ilStaticMethodIsNotLambda(mspec.Name),m)) + | Method (_, _, mspec, m, _, _, _) -> + error(Error(FSComp.SR.ilStaticMethodIsNotLambda(mspec.Name), m)) - | Null -> + | Null -> CG.EmitInstr cgbuf (pop 1) Push0 AI_pop - | Arg _ -> - error(Error(FSComp.SR.ilMutableVariablesCannotEscapeMethod(),m)) + | Arg _ -> + error(Error(FSComp.SR.ilMutableVariablesCannotEscapeMethod(), m)) - | Env (_,_,ilField,_) -> + | Env (_, _, ilField, _) -> // Note: ldarg0 has already been emitted in GenSetVal - CG.EmitInstr cgbuf (pop 2) Push0 (mkNormalStfld ilField) + CG.EmitInstr cgbuf (pop 2) Push0 (mkNormalStfld ilField) -and CommitGetStorageSequel cenv cgbuf eenv m ty localCloInfo storeSequel = - match localCloInfo,storeSequel with - | Some {contents =NamedLocalIlxClosureInfoGenerator _cloinfo},_ -> error(InternalError("Unexpected generator",m)) - | Some {contents =NamedLocalIlxClosureInfoGenerated cloinfo},Some (tyargs,args,m,sequel) when not (isNil tyargs) -> +and CommitGetStorageSequel cenv cgbuf eenv m ty localCloInfo storeSequel = + match localCloInfo, storeSequel with + | Some {contents =NamedLocalIlxClosureInfoGenerator _cloinfo}, _ -> error(InternalError("Unexpected generator", m)) + | Some {contents =NamedLocalIlxClosureInfoGenerated cloinfo}, Some (tyargs, args, m, sequel) when not (isNil tyargs) -> let actualRetTy = GenNamedLocalTyFuncCall cenv cgbuf eenv ty cloinfo tyargs m - CommitGetStorageSequel cenv cgbuf eenv m actualRetTy None (Some ([],args,m,sequel)) + CommitGetStorageSequel cenv cgbuf eenv m actualRetTy None (Some ([], args, m, sequel)) | _, None -> () - | _,Some ([],[],_,sequel) -> - GenSequel cenv eenv.cloc cgbuf sequel - | _,Some (tyargs,args,m,sequel) -> - GenArgsAndIndirectCall cenv cgbuf eenv (ty,tyargs,args,m) sequel + | _, Some ([], [], _, sequel) -> + GenSequel cenv eenv.cloc cgbuf sequel + | _, Some (tyargs, args, m, sequel) -> + GenArgsAndIndirectCall cenv cgbuf eenv (ty, tyargs, args, m) sequel -and GenGetStorageAndSequel cenv cgbuf eenv m (ty,ilTy) storage storeSequel = - match storage with +and GenGetStorageAndSequel cenv cgbuf eenv m (ty, ilTy) storage storeSequel = + match storage with | Local (idx, _, localCloInfo) -> EmitGetLocal cgbuf ilTy idx CommitGetStorageSequel cenv cgbuf eenv m ty localCloInfo storeSequel - | StaticField (fspec, _, hasLiteralAttr, ilContainerTy, _, _, ilGetterMethRef, _, _) -> + | StaticField (fspec, _, hasLiteralAttr, ilContainerTy, _, _, ilGetterMethRef, _, _) -> // References to literals go directly to the field - no property is used - if hasLiteralAttr then + if hasLiteralAttr then EmitGetStaticField cgbuf ilTy fspec else - CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (I_call(Normalcall, mkILMethSpecForMethRefInTy (ilGetterMethRef, ilContainerTy, []), None)) + CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (I_call(Normalcall, mkILMethSpecForMethRefInTy (ilGetterMethRef, ilContainerTy, []), None)) CommitGetStorageSequel cenv cgbuf eenv m ty None storeSequel - | StaticProperty (ilGetterMethSpec, _) -> - CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (I_call (Normalcall, ilGetterMethSpec, None)) + | StaticProperty (ilGetterMethSpec, _) -> + CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (I_call (Normalcall, ilGetterMethSpec, None)) CommitGetStorageSequel cenv cgbuf eenv m ty None storeSequel - | Method (topValInfo,vref,mspec,_,_,_,_) -> - // Get a toplevel value as a first-class value. - // We generate a lambda expression and that simply calls - // the toplevel method. However we optimize the case where we are - // immediately applying the value anyway (to insufficient arguments). + | Method (topValInfo, vref, mspec, _, _, _, _) -> + // Get a toplevel value as a first-class value. + // We generate a lambda expression and that simply calls + // the toplevel method. However we optimize the case where we are + // immediately applying the value anyway (to insufficient arguments). - // First build a lambda expression for the saturated use of the toplevel value... - // REVIEW: we should NOT be doing this in the backend... - let expr,exprty = AdjustValForExpectedArity cenv.g m vref NormalValUse topValInfo + // First build a lambda expression for the saturated use of the toplevel value... + // REVIEW: we should NOT be doing this in the backend... + let expr, exprty = AdjustValForExpectedArity cenv.g m vref NormalValUse topValInfo - // Then reduce out any arguments (i.e. apply the sequel immediately if we can...) - match storeSequel with - | None -> + // Then reduce out any arguments (i.e. apply the sequel immediately if we can...) + match storeSequel with + | None -> GenLambda cenv cgbuf eenv false None expr Continue - | Some (tyargs',args,m,sequel) -> - let specializedExpr = + | Some (tyargs', args, m, sequel) -> + let specializedExpr = if isNil args && isNil tyargs' then failwith ("non-lambda at use of method " + mspec.Name) - MakeApplicationAndBetaReduce cenv.g (expr,exprty,[tyargs'],args,m) + MakeApplicationAndBetaReduce cenv.g (expr, exprty, [tyargs'], args, m) GenExpr cenv cgbuf eenv SPSuppress specializedExpr sequel - | Null -> - CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (AI_ldnull) + | Null -> + CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (AI_ldnull) CommitGetStorageSequel cenv cgbuf eenv m ty None storeSequel - | Arg i -> - CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (mkLdarg (uint16 i)) + | Arg i -> + CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (mkLdarg (uint16 i)) CommitGetStorageSequel cenv cgbuf eenv m ty None storeSequel - | Env (_,_,ilField,localCloInfo) -> + | Env (_, _, ilField, localCloInfo) -> // Note: ldarg 0 is emitted in 'cu_erase' erasure of the ldenv instruction CG.EmitInstrs cgbuf (pop 0) (Push [ilTy]) [ mkLdarg0; mkNormalLdfld ilField ] CommitGetStorageSequel cenv cgbuf eenv m ty localCloInfo storeSequel -and GenGetLocalVals cenv cgbuf eenvouter m fvs = +and GenGetLocalVals cenv cgbuf eenvouter m fvs = List.iter (fun v -> GenGetLocalVal cenv cgbuf eenvouter m v None) fvs -and GenGetLocalVal cenv cgbuf eenv m (vspec:Val) fetchSequel = +and GenGetLocalVal cenv cgbuf eenv m (vspec: Val) fetchSequel = GenGetStorageAndSequel cenv cgbuf eenv m (vspec.Type, GenTypeOfVal cenv eenv vspec) (StorageForVal m vspec eenv) fetchSequel -and GenGetLocalVRef cenv cgbuf eenv m (vref:ValRef) fetchSequel = +and GenGetLocalVRef cenv cgbuf eenv m (vref: ValRef) fetchSequel = GenGetStorageAndSequel cenv cgbuf eenv m (vref.Type, GenTypeOfVal cenv eenv vref.Deref) (StorageForValRef m vref eenv) fetchSequel -and GenStoreVal cgbuf eenv m (vspec:Val) = +and GenStoreVal cgbuf eenv m (vspec: Val) = GenSetStorage vspec.Range cgbuf (StorageForVal m vspec eenv) -//-------------------------------------------------------------------------- -// Allocate locals for values -//-------------------------------------------------------------------------- - -and AllocLocal cenv cgbuf eenv compgen (v,ty,isFixed) (scopeMarks: Mark * Mark) = +/// Allocate IL locals +and AllocLocal cenv cgbuf eenv compgen (v, ty, isFixed) (scopeMarks: Mark * Mark) = // The debug range for the local - let ranges = if compgen then [] else [(v,scopeMarks)] + let ranges = if compgen then [] else [(v, scopeMarks)] // Get an index for the local - let j, realloc = - if cenv.opts.localOptimizationsAreOn then - cgbuf.ReallocLocal((fun i (_,ty',isFixed') -> not isFixed' && not isFixed && not (IntMap.mem i eenv.liveLocals) && (ty = ty')),ranges,ty,isFixed) - else - cgbuf.AllocLocal(ranges,ty,isFixed), false - j, realloc, { eenv with liveLocals = IntMap.add j () eenv.liveLocals } - -and AllocLocalVal cenv cgbuf v eenv repr scopeMarks = - let repr,eenv = + let j, realloc = + if cenv.opts.localOptimizationsAreOn then + cgbuf.ReallocLocal((fun i (_, ty', isFixed') -> not isFixed' && not isFixed && not (IntMap.mem i eenv.liveLocals) && (ty = ty')), ranges, ty, isFixed) + else + cgbuf.AllocLocal(ranges, ty, isFixed), false + j, realloc, { eenv with liveLocals = IntMap.add j () eenv.liveLocals } + +/// Decide storage for local value and if necessary allocate an ILLocal for it +and AllocLocalVal cenv cgbuf v eenv repr scopeMarks = + let repr, eenv = let ty = v.Type - if isUnitTy cenv.g ty && not v.IsMutable then Null,eenv - elif Option.isSome repr && IsNamedLocalTypeFuncVal cenv.g v (Option.get repr) then - (* known, named, non-escaping type functions *) - let cloinfoGenerate eenv = - let eenvinner = - {eenv with - letBoundVars=(mkLocalValRef v)::eenv.letBoundVars} - let cloinfo,_,_ = GetIlxClosureInfo cenv v.Range true None eenvinner (Option.get repr) - cloinfo - - let idx, realloc, eenv = AllocLocal cenv cgbuf eenv v.IsCompilerGenerated (v.CompiledName, cenv.g.ilg.typ_Object, false) scopeMarks - Local (idx, realloc, Some(ref (NamedLocalIlxClosureInfoGenerator cloinfoGenerate))),eenv + if isUnitTy cenv.g ty && not v.IsMutable then Null, eenv else - (* normal local *) - let idx, realloc, eenv = AllocLocal cenv cgbuf eenv v.IsCompilerGenerated (v.CompiledName, GenTypeOfVal cenv eenv v, v.IsFixed) scopeMarks - Local (idx,realloc, None),eenv - let eenv = AddStorageForVal cenv.g (v,notlazy repr) eenv + match repr with + | Some r when IsNamedLocalTypeFuncVal cenv.g v r -> + // known, named, non-escaping type functions + let cloinfoGenerate eenv = + let eenvinner = + {eenv with + letBoundVars=(mkLocalValRef v)::eenv.letBoundVars} + let cloinfo, _, _ = GetIlxClosureInfo cenv v.Range true None eenvinner (Option.get repr) + cloinfo + + let idx, realloc, eenv = AllocLocal cenv cgbuf eenv v.IsCompilerGenerated (v.CompiledName, cenv.g.ilg.typ_Object, false) scopeMarks + Local (idx, realloc, Some(ref (NamedLocalIlxClosureInfoGenerator cloinfoGenerate))), eenv + | _ -> + // normal local + let idx, realloc, eenv = AllocLocal cenv cgbuf eenv v.IsCompilerGenerated (v.CompiledName, GenTypeOfVal cenv eenv v, v.IsFixed) scopeMarks + Local (idx, realloc, None), eenv + let eenv = AddStorageForVal cenv.g (v, notlazy repr) eenv Some repr, eenv -and AllocStorageForBind cenv cgbuf scopeMarks eenv bind = +and AllocStorageForBind cenv cgbuf scopeMarks eenv bind = AllocStorageForBinds cenv cgbuf scopeMarks eenv [bind] -and AllocStorageForBinds cenv cgbuf scopeMarks eenv binds = - // phase 1 - decide representations - most are very simple. - let reps, eenv = List.mapFold (AllocValForBind cenv cgbuf scopeMarks) eenv binds - - // Phase 2 - run the cloinfo generators for NamedLocalClosure values against the environment recording the - // representation choices. - reps |> List.iter (fun reprOpt -> - match reprOpt with - | Some repr -> - match repr with - | Local(_, _, Some g) - | Env(_,_,_,Some g) -> - match !g with - | NamedLocalIlxClosureInfoGenerator f -> g := NamedLocalIlxClosureInfoGenerated (f eenv) +and AllocStorageForBinds cenv cgbuf scopeMarks eenv binds = + // phase 1 - decide representations - most are very simple. + let reps, eenv = List.mapFold (AllocValForBind cenv cgbuf scopeMarks) eenv binds + + // Phase 2 - run the cloinfo generators for NamedLocalClosure values against the environment recording the + // representation choices. + reps |> List.iter (fun reprOpt -> + match reprOpt with + | Some repr -> + match repr with + | Local(_, _, Some g) + | Env(_, _, _, Some g) -> + match !g with + | NamedLocalIlxClosureInfoGenerator f -> g := NamedLocalIlxClosureInfoGenerated (f eenv) | NamedLocalIlxClosureInfoGenerated _ -> () | _ -> () | _ -> ()) eenv - -and AllocValForBind cenv cgbuf (scopeMarks: Mark * Mark) eenv (TBind(v,repr,_)) = - match v.ValReprInfo with - | None -> + +and AllocValForBind cenv cgbuf (scopeMarks: Mark * Mark) eenv (TBind(v, repr, _)) = + match v.ValReprInfo with + | None -> AllocLocalVal cenv cgbuf v eenv (Some repr) scopeMarks - | Some _ -> - None,AllocTopValWithinExpr cenv cgbuf eenv.cloc scopeMarks v eenv + | Some _ -> + None, AllocTopValWithinExpr cenv cgbuf eenv.cloc scopeMarks v eenv and AllocTopValWithinExpr cenv cgbuf cloc scopeMarks v eenv = // decide whether to use a shadow local or not - let useShadowLocal = - cenv.opts.generateDebugSymbols && + let useShadowLocal = + cenv.opts.generateDebugSymbols && not cenv.opts.localOptimizationsAreOn && not v.IsCompilerGenerated && not v.IsMutable && // Don't use shadow locals for things like functions which are not compiled as static values/properties IsCompiledAsStaticProperty cenv.g v - let optShadowLocal,eenv = - if useShadowLocal then - let storageOpt, eenv = AllocLocalVal cenv cgbuf v eenv None scopeMarks - match storageOpt with - | None -> NoShadowLocal,eenv - | Some storage -> ShadowLocal storage,eenv - - else - NoShadowLocal,eenv + let optShadowLocal, eenv = + if useShadowLocal then + let storageOpt, eenv = AllocLocalVal cenv cgbuf v eenv None scopeMarks + match storageOpt with + | None -> NoShadowLocal, eenv + | Some storage -> ShadowLocal storage, eenv + + else + NoShadowLocal, eenv ComputeAndAddStorageForLocalTopVal (cenv.amap, cenv.g, cenv.intraAssemblyInfo, cenv.opts.isInteractive, optShadowLocal) cloc v eenv @@ -5940,259 +6109,259 @@ and AllocTopValWithinExpr cenv cgbuf cloc scopeMarks v eenv = //-------------------------------------------------------------------------- // Generate stack save/restore and assertions - pulled into letrec by alloc* -//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- /// Save the stack /// - [gross] because IL flushes the stack at the exn. handler -/// - and because IL requires empty stack following a forward br (jump). +/// - and because IL requires empty stack following a forward br (jump). and EmitSaveStack cenv cgbuf eenv m scopeMarks = let savedStack = (cgbuf.GetCurrentStack()) - let savedStackLocals,eenvinner = - (eenv, savedStack) ||> List.mapFold (fun eenv ty -> - let idx, _realloc, eenv = AllocLocal cenv cgbuf eenv true (ilxgenGlobalNng.FreshCompilerGeneratedName ("spill",m), ty, false) scopeMarks - idx, eenv) + let savedStackLocals, eenvinner = + (eenv, savedStack) ||> List.mapFold (fun eenv ty -> + let idx, _realloc, eenv = AllocLocal cenv cgbuf eenv true (ilxgenGlobalNng.FreshCompilerGeneratedName ("spill", m), ty, false) scopeMarks + idx, eenv) List.iter (EmitSetLocal cgbuf) savedStackLocals cgbuf.AssertEmptyStack() - (savedStack,savedStackLocals),eenvinner (* need to return, it marks locals "live" *) + (savedStack, savedStackLocals), eenvinner (* need to return, it marks locals "live" *) -/// Restore the stack and load the result -and EmitRestoreStack cgbuf (savedStack,savedStackLocals) = +/// Restore the stack and load the result +and EmitRestoreStack cgbuf (savedStack, savedStackLocals) = cgbuf.AssertEmptyStack() List.iter2 (EmitGetLocal cgbuf) (List.rev savedStack) (List.rev savedStackLocals) //------------------------------------------------------------------------- //GenAttr: custom attribute generation -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- -and GenAttribArg amap g eenv x (ilArgTy:ILType) = +and GenAttribArg amap g eenv x (ilArgTy: ILType) = - match x,ilArgTy with + match x, ilArgTy with // Detect 'null' used for an array argument - | Expr.Const(Const.Zero,_,_),ILType.Array _ -> + | Expr.Const(Const.Zero, _, _), ILType.Array _ -> ILAttribElem.Null - // Detect standard constants - | Expr.Const(c,m,_),_ -> + // Detect standard constants + | Expr.Const(c, m, _), _ -> let tynm = ilArgTy.TypeSpec.Name let isobj = (tynm = "System.Object") - match c with + match c with | Const.Bool b -> ILAttribElem.Bool b - | Const.Int32 i when isobj || tynm = "System.Int32" -> ILAttribElem.Int32 ( i) - | Const.Int32 i when tynm = "System.SByte" -> ILAttribElem.SByte (sbyte i) - | Const.Int32 i when tynm = "System.Int16" -> ILAttribElem.Int16 (int16 i) - | Const.Int32 i when tynm = "System.Byte" -> ILAttribElem.Byte (byte i) + | Const.Int32 i when isobj || tynm = "System.Int32" -> ILAttribElem.Int32 ( i) + | Const.Int32 i when tynm = "System.SByte" -> ILAttribElem.SByte (sbyte i) + | Const.Int32 i when tynm = "System.Int16" -> ILAttribElem.Int16 (int16 i) + | Const.Int32 i when tynm = "System.Byte" -> ILAttribElem.Byte (byte i) | Const.Int32 i when tynm = "System.UInt16" ->ILAttribElem.UInt16 (uint16 i) | Const.Int32 i when tynm = "System.UInt32" ->ILAttribElem.UInt32 (uint32 i) - | Const.Int32 i when tynm = "System.UInt64" ->ILAttribElem.UInt64 (uint64 (int64 i)) - | Const.SByte i -> ILAttribElem.SByte i - | Const.Int16 i -> ILAttribElem.Int16 i - | Const.Int32 i -> ILAttribElem.Int32 i - | Const.Int64 i -> ILAttribElem.Int64 i - | Const.Byte i -> ILAttribElem.Byte i - | Const.UInt16 i -> ILAttribElem.UInt16 i - | Const.UInt32 i -> ILAttribElem.UInt32 i - | Const.UInt64 i -> ILAttribElem.UInt64 i - | Const.Double i -> ILAttribElem.Double i + | Const.Int32 i when tynm = "System.UInt64" ->ILAttribElem.UInt64 (uint64 (int64 i)) + | Const.SByte i -> ILAttribElem.SByte i + | Const.Int16 i -> ILAttribElem.Int16 i + | Const.Int32 i -> ILAttribElem.Int32 i + | Const.Int64 i -> ILAttribElem.Int64 i + | Const.Byte i -> ILAttribElem.Byte i + | Const.UInt16 i -> ILAttribElem.UInt16 i + | Const.UInt32 i -> ILAttribElem.UInt32 i + | Const.UInt64 i -> ILAttribElem.UInt64 i + | Const.Double i -> ILAttribElem.Double i | Const.Single i -> ILAttribElem.Single i - | Const.Char i -> ILAttribElem.Char i - | Const.Zero when isobj -> ILAttribElem.Null - | Const.Zero when tynm = "System.String" -> ILAttribElem.String None - | Const.Zero when tynm = "System.Type" -> ILAttribElem.Type None - | Const.String i when isobj || tynm = "System.String" -> ILAttribElem.String (Some i) - | _ -> error (InternalError ( "The type '" + tynm + "' may not be used as a custom attribute value",m)) - - // Detect '[| ... |]' nodes - | Expr.Op(TOp.Array,[elemTy],args,m),_ -> + | Const.Char i -> ILAttribElem.Char i + | Const.Zero when isobj -> ILAttribElem.Null + | Const.Zero when tynm = "System.String" -> ILAttribElem.String None + | Const.Zero when tynm = "System.Type" -> ILAttribElem.Type None + | Const.String i when isobj || tynm = "System.String" -> ILAttribElem.String (Some i) + | _ -> error (InternalError ( "The type '" + tynm + "' may not be used as a custom attribute value", m)) + + // Detect '[| ... |]' nodes + | Expr.Op(TOp.Array, [elemTy], args, m), _ -> let ilElemTy = GenType amap m eenv.tyenv elemTy ILAttribElem.Array (ilElemTy, List.map (fun arg -> GenAttribArg amap g eenv arg ilElemTy) args) - // Detect 'typeof' calls - | TypeOfExpr g ty, _ -> + // Detect 'typeof' calls + | TypeOfExpr g ty, _ -> ILAttribElem.Type (Some (GenType amap x.Range eenv.tyenv ty)) - // Detect 'typedefof' calls - | TypeDefOfExpr g ty, _ -> - ILAttribElem.TypeRef (Some (GenType amap x.Range eenv.tyenv ty).TypeRef) - - // Ignore upcasts - | Expr.Op(TOp.Coerce,_,[arg2],_),_ -> + // Detect 'typedefof' calls + | TypeDefOfExpr g ty, _ -> + ILAttribElem.TypeRef (Some (GenType amap x.Range eenv.tyenv ty).TypeRef) + + // Ignore upcasts + | Expr.Op(TOp.Coerce, _, [arg2], _), _ -> GenAttribArg amap g eenv arg2 ilArgTy - // Detect explicit enum values + // Detect explicit enum values | EnumExpr g arg1, _ -> GenAttribArg amap g eenv arg1 ilArgTy - + // Detect bitwise or of attribute flags: one case of constant folding (a more general treatment is needed) - - | AttribBitwiseOrExpr g (arg1,arg2),_ -> - let v1 = GenAttribArg amap g eenv arg1 ilArgTy - let v2 = GenAttribArg amap g eenv arg2 ilArgTy - match v1,v2 with - | ILAttribElem.SByte i1, ILAttribElem.SByte i2 -> ILAttribElem.SByte (i1 ||| i2) + + | AttribBitwiseOrExpr g (arg1, arg2), _ -> + let v1 = GenAttribArg amap g eenv arg1 ilArgTy + let v2 = GenAttribArg amap g eenv arg2 ilArgTy + match v1, v2 with + | ILAttribElem.SByte i1, ILAttribElem.SByte i2 -> ILAttribElem.SByte (i1 ||| i2) | ILAttribElem.Int16 i1, ILAttribElem.Int16 i2-> ILAttribElem.Int16 (i1 ||| i2) | ILAttribElem.Int32 i1, ILAttribElem.Int32 i2-> ILAttribElem.Int32 (i1 ||| i2) | ILAttribElem.Int64 i1, ILAttribElem.Int64 i2-> ILAttribElem.Int64 (i1 ||| i2) | ILAttribElem.Byte i1, ILAttribElem.Byte i2-> ILAttribElem.Byte (i1 ||| i2) - | ILAttribElem.UInt16 i1, ILAttribElem.UInt16 i2-> ILAttribElem.UInt16 (i1 ||| i2) - | ILAttribElem.UInt32 i1, ILAttribElem.UInt32 i2-> ILAttribElem.UInt32 (i1 ||| i2) + | ILAttribElem.UInt16 i1, ILAttribElem.UInt16 i2-> ILAttribElem.UInt16 (i1 ||| i2) + | ILAttribElem.UInt32 i1, ILAttribElem.UInt32 i2-> ILAttribElem.UInt32 (i1 ||| i2) | ILAttribElem.UInt64 i1, ILAttribElem.UInt64 i2-> ILAttribElem.UInt64 (i1 ||| i2) - | _ -> error (InternalError ("invalid custom attribute value (not a valid constant): " + showL (exprL x),x.Range)) + | _ -> error (InternalError ("invalid custom attribute value (not a valid constant): " + showL (exprL x), x.Range)) // Other expressions are not valid custom attribute values - | _ -> - error (InternalError ("invalid custom attribute value (not a constant): " + showL (exprL x),x.Range)) + | _ -> + error (InternalError ("invalid custom attribute value (not a constant): " + showL (exprL x), x.Range)) -and GenAttr amap g eenv (Attrib(_,k,args,props,_,_,_)) = - let props = - props |> List.map (fun (AttribNamedArg(s,ty,fld,AttribExpr(_,expr))) -> +and GenAttr amap g eenv (Attrib(_, k, args, props, _, _, _)) = + let props = + props |> List.map (fun (AttribNamedArg(s, ty, fld, AttribExpr(_, expr))) -> let m = expr.Range let ilTy = GenType amap m eenv.tyenv ty let cval = GenAttribArg amap g eenv expr ilTy - (s,ilTy,fld,cval)) - let mspec = - match k with - | ILAttrib(mref) -> mkILMethSpec(mref,AsObject,[],[]) - | FSAttrib(vref) -> - assert(vref.IsMember) - let mspec,_,_,_,_,_ = GetMethodSpecForMemberVal amap g (Option.get vref.MemberInfo) vref + (s, ilTy, fld, cval)) + let mspec = + match k with + | ILAttrib(mref) -> mkILMethSpec(mref, AsObject, [], []) + | FSAttrib(vref) -> + assert(vref.IsMember) + let mspec, _, _, _, _, _ = GetMethodSpecForMemberVal amap g (Option.get vref.MemberInfo) vref mspec - let ilArgs = List.map2 (fun (AttribExpr(_,vexpr)) ty -> GenAttribArg amap g eenv vexpr ty) args mspec.FormalArgTypes - mkILCustomAttribMethRef g.ilg (mspec,ilArgs, props) - + let ilArgs = List.map2 (fun (AttribExpr(_, vexpr)) ty -> GenAttribArg amap g eenv vexpr ty) args mspec.FormalArgTypes + mkILCustomAttribMethRef g.ilg (mspec, ilArgs, props) + and GenAttrs cenv eenv attrs = List.map (GenAttr cenv.amap cenv.g eenv) attrs -and GenCompilationArgumentCountsAttr cenv (v:Val) = - [ match v.ValReprInfo with - | Some(tvi) when v.IsMemberOrModuleBinding -> - let arities = if ValSpecIsCompiledAsInstance cenv.g v then List.tail tvi.AritiesOfArgs else tvi.AritiesOfArgs - if arities.Length > 1 then +and GenCompilationArgumentCountsAttr cenv (v: Val) = + [ match v.ValReprInfo with + | Some(tvi) when v.IsMemberOrModuleBinding -> + let arities = if ValSpecIsCompiledAsInstance cenv.g v then List.tail tvi.AritiesOfArgs else tvi.AritiesOfArgs + if arities.Length > 1 then yield mkCompilationArgumentCountsAttr cenv.g arities - | _ -> - () ] + | _ -> + () ] -// Create a permission set for a list of security attributes -and CreatePermissionSets cenv eenv (securityAttributes : Attrib list) = - [for ((Attrib(tcref,_,actions,_,_,_,_)) as attr) in securityAttributes do +// Create a permission set for a list of security attributes +and CreatePermissionSets cenv eenv (securityAttributes: Attrib list) = + [for ((Attrib(tcref, _, actions, _, _, _, _)) as attr) in securityAttributes do let action = match actions with | [AttribInt32Arg act] -> act | _ -> failwith "internal error: unrecognized security action" let secaction = (List.assoc action (Lazy.force ILSecurityActionRevMap)) let tref = tcref.CompiledRepresentationForNamedType let ilattr = GenAttr cenv.amap cenv.g eenv attr - let _, ilNamedArgs = + let _, ilNamedArgs = match TryDecodeILAttribute cenv.g tref (mkILCustomAttrs [ilattr]) with - | Some(ae,na) -> ae, na - | _ -> [],[] - let setArgs = ilNamedArgs |> List.map (fun (n,ilt,_,ilae) -> (n,ilt,ilae)) + | Some(ae, na) -> ae, na + | _ -> [], [] + let setArgs = ilNamedArgs |> List.map (fun (n, ilt, _, ilae) -> (n, ilt, ilae)) yield IL.mkPermissionSet cenv.g.ilg (secaction, [(tref, setArgs)])] //-------------------------------------------------------------------------- // Generate the set of modules for an assembly, and the declarations in each module -//-------------------------------------------------------------------------- +//-------------------------------------------------------------------------- /// Generate a static class at the given cloc -and GenTypeDefForCompLoc (cenv, eenv, mgbuf: AssemblyBuilder, cloc, hidden, attribs, initTrigger, eliminateIfEmpty, addAtEnd) = +and GenTypeDefForCompLoc (cenv, eenv, mgbuf: AssemblyBuilder, cloc, hidden, attribs, initTrigger, eliminateIfEmpty, addAtEnd) = let tref = TypeRefForCompLoc cloc - let tdef = + let tdef = mkILSimpleClass cenv.g.ilg - (tref.Name, + (tref.Name, ComputeTypeAccess tref hidden, - emptyILMethods, + emptyILMethods, emptyILFields, emptyILTypeDefs, emptyILProperties, emptyILEvents, - mkILCustomAttrs + mkILCustomAttrs (GenAttrs cenv eenv attribs @ - (if List.contains tref.Name [TypeNameForImplicitMainMethod cloc; TypeNameForInitClass cloc; TypeNameForPrivateImplementationDetails cloc] - then [ ] + (if List.contains tref.Name [TypeNameForImplicitMainMethod cloc; TypeNameForInitClass cloc; TypeNameForPrivateImplementationDetails cloc] + then [ ] else [mkCompilationMappingAttr cenv.g (int SourceConstructFlags.Module)])), initTrigger) let tdef = tdef.WithSealed(true).WithAbstract(true) mgbuf.AddTypeDef(tref, tdef, eliminateIfEmpty, addAtEnd, None) -and GenModuleExpr cenv cgbuf qname lazyInitInfo eenv x = - let (ModuleOrNamespaceExprWithSig(mty, def, _)) = x - // REVIEW: the scopeMarks are used for any shadow locals we create for the module bindings +and GenModuleExpr cenv cgbuf qname lazyInitInfo eenv x = + let (ModuleOrNamespaceExprWithSig(mty, def, _)) = x + // REVIEW: the scopeMarks are used for any shadow locals we create for the module bindings // We use one scope for all the bindings in the module, which makes them all appear with their "default" values - // rather than incrementally as we step through the initializations in the module. This is a little unfortunate + // rather than incrementally as we step through the initializations in the module. This is a little unfortunate // but stems from the way we add module values all at once before we generate the module itself. LocalScope "module" cgbuf (fun scopeMarks -> let sigToImplRemapInfo = ComputeRemappingFromImplementationToSignature cenv.g def mty let eenv = AddSignatureRemapInfo "defs" sigToImplRemapInfo eenv - let eenv = + let eenv = // Allocate all the values, including any shadow locals for static fields let allocVal cloc v = AllocTopValWithinExpr cenv cgbuf cloc scopeMarks v AddBindingsForModuleDef allocVal eenv.cloc eenv def GenModuleDef cenv cgbuf qname lazyInitInfo eenv def) -and GenModuleDefs cenv cgbuf qname lazyInitInfo eenv mdefs = - mdefs |> List.iter (GenModuleDef cenv cgbuf qname lazyInitInfo eenv) - -and GenModuleDef cenv (cgbuf:CodeGenBuffer) qname lazyInitInfo eenv x = - match x with - | TMDefRec(_isRec,tycons,mbinds,m) -> - tycons |> List.iter (fun tc -> - if tc.IsExceptionDecl - then GenExnDef cenv cgbuf.mgbuf eenv m tc +and GenModuleDefs cenv cgbuf qname lazyInitInfo eenv mdefs = + mdefs |> List.iter (GenModuleDef cenv cgbuf qname lazyInitInfo eenv) + +and GenModuleDef cenv (cgbuf: CodeGenBuffer) qname lazyInitInfo eenv x = + match x with + | TMDefRec(_isRec, tycons, mbinds, m) -> + tycons |> List.iter (fun tc -> + if tc.IsExceptionDecl + then GenExnDef cenv cgbuf.mgbuf eenv m tc else GenTypeDef cenv cgbuf.mgbuf lazyInitInfo eenv m tc) - mbinds |> List.iter (GenModuleBinding cenv cgbuf qname lazyInitInfo eenv m) + mbinds |> List.iter (GenModuleBinding cenv cgbuf qname lazyInitInfo eenv m) - | TMDefLet(bind,_) -> + | TMDefLet(bind, _) -> GenBindings cenv cgbuf eenv [bind] - | TMDefDo(e,_) -> + | TMDefDo(e, _) -> GenExpr cenv cgbuf eenv SPAlways e discard - | TMAbstract(mexpr) -> + | TMAbstract(mexpr) -> GenModuleExpr cenv cgbuf qname lazyInitInfo eenv mexpr - | TMDefs(mdefs) -> - GenModuleDefs cenv cgbuf qname lazyInitInfo eenv mdefs + | TMDefs(mdefs) -> + GenModuleDefs cenv cgbuf qname lazyInitInfo eenv mdefs // Generate a module binding -and GenModuleBinding cenv (cgbuf:CodeGenBuffer) (qname:QualifiedNameOfFile) lazyInitInfo eenv m x = - match x with - | ModuleOrNamespaceBinding.Binding bind -> - GenLetRecBindings cenv cgbuf eenv ([bind],m) +and GenModuleBinding cenv (cgbuf: CodeGenBuffer) (qname: QualifiedNameOfFile) lazyInitInfo eenv m x = + match x with + | ModuleOrNamespaceBinding.Binding bind -> + GenLetRecBindings cenv cgbuf eenv ([bind], m) | ModuleOrNamespaceBinding.Module (mspec, mdef) -> let hidden = IsHiddenTycon eenv.sigToImplRemapInfo mspec - let eenvinner = - if mspec.IsNamespace then eenv else + let eenvinner = + if mspec.IsNamespace then eenv else {eenv with cloc = CompLocForFixedModule cenv.opts.fragName qname.Text mspec } - // Create the class to hold the contents of this module. No class needed if - // we're compiling it as a namespace. + // Create the class to hold the contents of this module. No class needed if + // we're compiling it as a namespace. // - // Most module static fields go into the "InitClass" static class. - // However mutable static fields go into the class for the module itself. - // So this static class ends up with a .cctor if it has mutable fields. + // Most module static fields go into the "InitClass" static class. + // However mutable static fields go into the class for the module itself. + // So this static class ends up with a .cctor if it has mutable fields. // - if not mspec.IsNamespace then - // The use of ILTypeInit.OnAny prevents the execution of the cctor before the + if not mspec.IsNamespace then + // The use of ILTypeInit.OnAny prevents the execution of the cctor before the // "main" method in the case where the "main" method is implicit. let staticClassTrigger = (* if eenv.isFinalFile then *) ILTypeInit.OnAny (* else ILTypeInit.BeforeField *) GenTypeDefForCompLoc (cenv, eenvinner, cgbuf.mgbuf, eenvinner.cloc, hidden, mspec.Attribs, staticClassTrigger, false, (* atEnd= *) true) - // Generate the declarations in the module and its initialization code + // Generate the declarations in the module and its initialization code GenModuleDef cenv cgbuf qname lazyInitInfo eenvinner mdef - - // If the module has a .cctor for some mutable fields, we need to ensure that when - // those fields are "touched" the InitClass .cctor is forced. The InitClass .cctor will + + // If the module has a .cctor for some mutable fields, we need to ensure that when + // those fields are "touched" the InitClass .cctor is forced. The InitClass .cctor will // then fill in the value of the mutable fields. - if not mspec.IsNamespace && (cgbuf.mgbuf.GetCurrentFields(TypeRefForCompLoc eenvinner.cloc) |> Seq.isEmpty |> not) then + if not mspec.IsNamespace && (cgbuf.mgbuf.GetCurrentFields(TypeRefForCompLoc eenvinner.cloc) |> Seq.isEmpty |> not) then GenForceWholeFileInitializationAsPartOfCCtor cenv cgbuf.mgbuf lazyInitInfo (TypeRefForCompLoc eenvinner.cloc) mspec.Range /// Generate the namespace fragments in a single file -and GenTopImpl cenv (mgbuf: AssemblyBuilder) mainInfoOpt eenv (TImplFile(qname, _, mexpr, hasExplicitEntryPoint, isScript, anonRecdTypes), optimizeDuringCodeGen) = +and GenTopImpl cenv (mgbuf: AssemblyBuilder) mainInfoOpt eenv (TImplFile(qname, _, mexpr, hasExplicitEntryPoint, isScript, anonRecdTypes), optimizeDuringCodeGen) = let m = qname.Range @@ -6200,57 +6369,57 @@ and GenTopImpl cenv (mgbuf: AssemblyBuilder) mainInfoOpt eenv (TImplFile(qname, for anonInfo in anonRecdTypes.Values do mgbuf.GenerateAnonType((fun ilThisTy -> GenToStringMethod cenv eenv ilThisTy m), anonInfo) |> ignore - let eenv = {eenv with cloc = { eenv.cloc with clocTopImplQualifiedName = qname.Text } } + let eenv = {eenv with cloc = { eenv.cloc with TopImplQualifiedName = qname.Text } } cenv.optimizeDuringCodeGen <- optimizeDuringCodeGen - // This is used to point the inner classes back to the startup module for initialization purposes + // This is used to point the inner classes back to the startup module for initialization purposes let isFinalFile = Option.isSome mainInfoOpt - let initClassCompLoc = CompLocForInitClass eenv.cloc - let initClassTy = mkILTyForCompLoc initClassCompLoc + let initClassCompLoc = CompLocForInitClass eenv.cloc + let initClassTy = mkILTyForCompLoc initClassCompLoc let initClassTrigger = (* if isFinalFile then *) ILTypeInit.OnAny (* else ILTypeInit.BeforeField *) - + let eenv = {eenv with cloc = initClassCompLoc isFinalFile = isFinalFile - someTypeInThisAssembly = initClassTy } - - // Create the class to hold the initialization code and static fields for this file. + someTypeInThisAssembly = initClassTy } + + // Create the class to hold the initialization code and static fields for this file. // internal static class $ {} // Put it at the end since that gives an approximation of dependency order (to aid FSI.EXE's code generator - see FSharp 1.0 5548) - GenTypeDefForCompLoc (cenv, eenv, mgbuf, initClassCompLoc, useHiddenInitCode, [], initClassTrigger, false, (*atEnd=*)true) - + GenTypeDefForCompLoc (cenv, eenv, mgbuf, initClassCompLoc, useHiddenInitCode, [], initClassTrigger, false, (*atEnd=*)true) + // lazyInitInfo is an accumulator of functions which add the forced initialization of the storage module to // - mutable fields in public modules - // - static "let" bindings in types + // - static "let" bindings in types // These functions only get executed/committed if we actually end up producing some code for the .cctor for the storage module. - // The existence of .cctors adds costs to execution, so this is a half-sensible attempt to avoid adding them when possible. + // The existence of .cctors adds costs to execution, so this is a half-sensible attempt to avoid adding them when possible. let lazyInitInfo = new ResizeArray ILInstr list -> ILInstr list -> unit>() // codegen .cctor/main for outer module let clocCcu = CompLocForCcu cenv.viewCcu - + // This method name is only used internally in ilxgen.fs to aid debugging - let methodName = - match mainInfoOpt with - // Library file - | None -> ".cctor" - // Final file, explicit entry point + let methodName = + match mainInfoOpt with + // Library file + | None -> ".cctor" + // Final file, explicit entry point | Some _ when hasExplicitEntryPoint -> ".cctor" - // Final file, implicit entry point - | Some _ -> mainMethName - + // Final file, implicit entry point + | Some _ -> mainMethName + // topInstrs is ILInstr[] and contains the abstract IL for this file's top-level actions. topCode is the ILMethodBody for that same code. - let topInstrs,topCode = - CodeGenMethod cenv mgbuf - ([],methodName,eenv,0, - (fun cgbuf eenv -> + let topInstrs, topCode = + CodeGenMethod cenv mgbuf + ([], methodName, eenv, 0, + (fun cgbuf eenv -> GenModuleExpr cenv cgbuf qname lazyInitInfo eenv mexpr - CG.EmitInstr cgbuf (pop 0) Push0 I_ret),m) + CG.EmitInstr cgbuf (pop 0) Push0 I_ret), m) // The code generation for the initialization is now complete and the IL code is in topCode. - // Make a .cctor and/or main method to contain the code. This initializes all modules. + // Make a .cctor and/or main method to contain the code. This initializes all modules. // Library file (mainInfoOpt = None) : optional .cctor if topCode has initialization effect // Final file, explicit entry point (mainInfoOpt = Some _, GetExplicitEntryPointInfo() = Some) : main + optional .cctor if topCode has initialization effect // Final file, implicit entry point (mainInfoOpt = Some _, GetExplicitEntryPointInfo() = None) : main + initialize + optional .cctor calling initialize @@ -6258,384 +6427,384 @@ and GenTopImpl cenv (mgbuf: AssemblyBuilder) mainInfoOpt eenv (TImplFile(qname, // Make a FEEFEE instruction to mark hidden code regions // We expect the first instruction to be a sequence point when generating debug symbols - let feefee, seqpt = - if topInstrs.Length > 1 then - match topInstrs.[0] with + let feefee, seqpt = + if topInstrs.Length > 1 then + match topInstrs.[0] with | I_seqpoint sp as i -> [ FeeFeeInstr cenv sp.Document ], [ i ] - | _ -> [], [] - else + | _ -> [], [] + else [], [] begin - match mainInfoOpt with + match mainInfoOpt with // Final file in .EXE - | Some mainInfo -> + | Some mainInfo -> - // Generate an explicit main method. If necessary, make a class constructor as - // well for the bindings earlier in the file containing the entrypoint. + // Generate an explicit main method. If necessary, make a class constructor as + // well for the bindings earlier in the file containing the entrypoint. match mgbuf.GetExplicitEntryPointInfo() with - // Final file, explicit entry point : place the code in a .cctor, and add code to main that forces the .cctor (if topCode has initialization effect). - | Some tref -> + // Final file, explicit entry point: place the code in a .cctor, and add code to main that forces the .cctor (if topCode has initialization effect). + | Some tref -> if doesSomething then - lazyInitInfo.Add (fun fspec feefee seqpt -> + lazyInitInfo.Add (fun fspec feefee seqpt -> // This adds the explicit init of the .cctor to the explicit entrypoint main method mgbuf.AddExplicitInitToSpecificMethodDef((fun md -> md.IsEntryPoint), tref, fspec, GenPossibleILSourceMarker cenv m, feefee, seqpt)) - let cctorMethDef = mkILClassCtor (MethodBody.IL topCode) - mgbuf.AddMethodDef(initClassTy.TypeRef,cctorMethDef) + let cctorMethDef = mkILClassCtor (MethodBody.IL topCode) + mgbuf.AddMethodDef(initClassTy.TypeRef, cctorMethDef) // Final file, implicit entry point. We generate no .cctor. - // void main@() { - // + // void main@() { + // // } | None -> let ilAttrs = mkILCustomAttrs (GenAttrs cenv eenv mainInfo) - if not cenv.opts.isInteractive && not doesSomething then + if not cenv.opts.isInteractive && not doesSomething then let errorM = m.EndRange warning (Error(FSComp.SR.ilMainModuleEmpty(), errorM)) - // generate main@ - let ilMainMethodDef = - let mdef = mkILNonGenericStaticMethod(mainMethName,ILMemberAccess.Public,[],mkILReturn ILType.Void, MethodBody.IL topCode) + // generate main@ + let ilMainMethodDef = + let mdef = mkILNonGenericStaticMethod(mainMethName, ILMemberAccess.Public, [], mkILReturn ILType.Void, MethodBody.IL topCode) mdef.With(isEntryPoint= true, customAttrs = ilAttrs) - mgbuf.AddMethodDef(initClassTy.TypeRef,ilMainMethodDef) + mgbuf.AddMethodDef(initClassTy.TypeRef, ilMainMethodDef) - // Library file : generate an optional .cctor if topCode has initialization effect - | None -> - if doesSomething then + // Library file: generate an optional .cctor if topCode has initialization effect + | None -> + if doesSomething then + + // Add the cctor + let cctorMethDef = mkILClassCtor (MethodBody.IL topCode) + mgbuf.AddMethodDef(initClassTy.TypeRef, cctorMethDef) - // Add the cctor - let cctorMethDef = mkILClassCtor (MethodBody.IL topCode) - mgbuf.AddMethodDef(initClassTy.TypeRef,cctorMethDef) - end - + // Commit the directed initializations - if doesSomething then - // Create the field to act as the target for the forced initialization. + if doesSomething then + // Create the field to act as the target for the forced initialization. // Why do this for the final file? // There is no need to do this for a final file with an implicit entry point. For an explicit entry point in lazyInitInfo. let initFieldName = CompilerGeneratedName "init" - let ilFieldDef = - mkILStaticField (initFieldName,cenv.g.ilg.typ_Int32, None, None, ComputeMemberAccess true) - |> cenv.g.AddFieldNeverAttrs - |> cenv.g.AddFieldGeneratedAttrs + let ilFieldDef = + mkILStaticField (initFieldName, cenv.g.ilg.typ_Int32, None, None, ComputeMemberAccess true) + |> cenv.g.AddFieldNeverAttrs + |> cenv.g.AddFieldGeneratedAttrs let fspec = mkILFieldSpecInTy (initClassTy, initFieldName, cenv. g.ilg.typ_Int32) CountStaticFieldDef() - mgbuf.AddFieldDef(initClassTy.TypeRef,ilFieldDef) + mgbuf.AddFieldDef(initClassTy.TypeRef, ilFieldDef) - // Run the imperative (yuck!) actions that force the generation - // of references to the cctor for nested modules etc. + // Run the imperative (yuck!) actions that force the generation + // of references to the cctor for nested modules etc. lazyInitInfo |> Seq.iter (fun f -> f fspec feefee seqpt) - if isScript && not(isFinalFile) then - mgbuf.AddScriptInitFieldSpec(fspec,m) + if isScript && not(isFinalFile) then + mgbuf.AddScriptInitFieldSpec(fspec, m) // Compute the ilxgenEnv after the generation of the module, i.e. the residue need to generate anything that // uses the constructs exported from this module. // We add the module type all over again. Note no shadow locals for static fields needed here since they are only relevant to the main/.cctor - let eenvafter = - let allocVal = ComputeAndAddStorageForLocalTopVal (cenv.amap, cenv.g, cenv.intraAssemblyInfo, cenv.opts.isInteractive, NoShadowLocal) - AddBindingsForLocalModuleType allocVal clocCcu eenv mexpr.Type + let eenvafter = + let allocVal = ComputeAndAddStorageForLocalTopVal (cenv.amap, cenv.g, cenv.intraAssemblyInfo, cenv.opts.isInteractive, NoShadowLocal) + AddBindingsForLocalModuleType allocVal clocCcu eenv mexpr.Type eenvafter -and GenForceWholeFileInitializationAsPartOfCCtor cenv (mgbuf:AssemblyBuilder) (lazyInitInfo: ResizeArray<_>) tref m = - // Authoring a .cctor with effects forces the cctor for the 'initialization' module by doing a dummy store & load of a field - // Doing both a store and load keeps FxCop happier because it thinks the field is useful - lazyInitInfo.Add (fun fspec feefee seqpt -> mgbuf.AddExplicitInitToSpecificMethodDef((fun md -> md.Name = ".cctor"), tref, fspec, GenPossibleILSourceMarker cenv m, feefee, seqpt)) +and GenForceWholeFileInitializationAsPartOfCCtor cenv (mgbuf: AssemblyBuilder) (lazyInitInfo: ResizeArray<_>) tref m = + // Authoring a .cctor with effects forces the cctor for the 'initialization' module by doing a dummy store & load of a field + // Doing both a store and load keeps FxCop happier because it thinks the field is useful + lazyInitInfo.Add (fun fspec feefee seqpt -> mgbuf.AddExplicitInitToSpecificMethodDef((fun md -> md.Name = ".cctor"), tref, fspec, GenPossibleILSourceMarker cenv m, feefee, seqpt)) -/// Generate an Equals method. -and GenEqualsOverrideCallingIComparable cenv (tcref:TyconRef, ilThisTy, _ilThatTy) = +/// Generate an Equals method. +and GenEqualsOverrideCallingIComparable cenv (tcref: TyconRef, ilThisTy, _ilThatTy) = let mspec = mkILNonGenericInstanceMethSpecInTy (cenv.g.iltyp_IComparable, "CompareTo", [cenv.g.ilg.typ_Object], cenv.g.ilg.typ_Int32) - + mkILNonGenericVirtualMethod - ("Equals",ILMemberAccess.Public, - [mkILParamNamed ("obj",cenv.g.ilg.typ_Object)], + ("Equals", ILMemberAccess.Public, + [mkILParamNamed ("obj", cenv.g.ilg.typ_Object)], mkILReturn cenv.g.ilg.typ_Bool, - mkMethodBody(true,[],2, + mkMethodBody(true, [], 2, nonBranchingInstrsToCode [ yield mkLdarg0 - yield mkLdarg 1us - if tcref.IsStructOrEnumTycon then - yield I_callconstraint ( Normalcall, ilThisTy,mspec,None) - else - yield I_callvirt ( Normalcall, mspec,None) + yield mkLdarg 1us + if tcref.IsStructOrEnumTycon then + yield I_callconstraint ( Normalcall, ilThisTy, mspec, None) + else + yield I_callvirt ( Normalcall, mspec, None) yield mkLdcInt32 (0) - yield AI_ceq ], + yield AI_ceq ], None)) |> AddNonUserCompilerGeneratedAttribs cenv.g and GenFieldInit m c = - match c with + match c with | ConstToILFieldInit fieldInit -> fieldInit - | _ -> error(Error(FSComp.SR.ilTypeCannotBeUsedForLiteralField(),m)) + | _ -> error(Error(FSComp.SR.ilTypeCannotBeUsedForLiteralField(), m)) -and GenAbstractBinding cenv eenv tref (vref:ValRef) = +and GenAbstractBinding cenv eenv tref (vref: ValRef) = assert(vref.IsMember) let m = vref.Range let memberInfo = Option.get vref.MemberInfo let attribs = vref.Attribs - let hasPreserveSigImplFlag,hasSynchronizedImplFlag,hasNoInliningFlag,hasAggressiveInliningImplFlag,attribs = ComputeMethodImplAttribs cenv vref.Deref attribs - if memberInfo.MemberFlags.IsDispatchSlot && not memberInfo.IsImplemented then - let ilAttrs = - [ yield! GenAttrs cenv eenv attribs + let hasPreserveSigImplFlag, hasSynchronizedImplFlag, hasNoInliningFlag, hasAggressiveInliningImplFlag, attribs = ComputeMethodImplAttribs cenv vref.Deref attribs + if memberInfo.MemberFlags.IsDispatchSlot && not memberInfo.IsImplemented then + let ilAttrs = + [ yield! GenAttrs cenv eenv attribs yield! GenCompilationArgumentCountsAttr cenv vref.Deref ] - - let mspec,ctps,mtps,argInfos,retInfo,methodArgTys = GetMethodSpecForMemberVal cenv.amap cenv.g memberInfo vref + + let mspec, ctps, mtps, argInfos, retInfo, methodArgTys = GetMethodSpecForMemberVal cenv.amap cenv.g memberInfo vref let eenvForMeth = EnvForTypars (ctps@mtps) eenv let ilMethTypars = GenGenericParams cenv eenvForMeth mtps let ilReturn = GenReturnInfo cenv eenvForMeth mspec.FormalReturnType retInfo let ilParams = GenParams cenv eenvForMeth mspec argInfos methodArgTys None - + let compileAsInstance = ValRefIsCompiledAsInstanceMember cenv.g vref - let mdef = mkILGenericVirtualMethod (vref.CompiledName,ILMemberAccess.Public,ilMethTypars,ilParams,ilReturn,MethodBody.Abstract) + let mdef = mkILGenericVirtualMethod (vref.CompiledName, ILMemberAccess.Public, ilMethTypars, ilParams, ilReturn, MethodBody.Abstract) let mdef = fixupVirtualSlotFlags mdef - let mdef = - if mdef.IsVirtual then - mdef.WithFinal(memberInfo.MemberFlags.IsFinal).WithAbstract(memberInfo.MemberFlags.IsDispatchSlot) + let mdef = + if mdef.IsVirtual then + mdef.WithFinal(memberInfo.MemberFlags.IsFinal).WithAbstract(memberInfo.MemberFlags.IsDispatchSlot) else mdef let mdef = mdef.WithPreserveSig(hasPreserveSigImplFlag).WithSynchronized(hasSynchronizedImplFlag).WithNoInlining(hasNoInliningFlag).WithAggressiveInlining(hasAggressiveInliningImplFlag) - - match memberInfo.MemberFlags.MemberKind with - | MemberKind.ClassConstructor - | MemberKind.Constructor - | MemberKind.Member -> + + match memberInfo.MemberFlags.MemberKind with + | MemberKind.ClassConstructor + | MemberKind.Constructor + | MemberKind.Member -> let mdef = mdef.With(customAttrs= mkILCustomAttrs ilAttrs) [mdef], [], [] - | MemberKind.PropertyGetSet -> error(Error(FSComp.SR.ilUnexpectedGetSetAnnotation(),m)) + | MemberKind.PropertyGetSet -> error(Error(FSComp.SR.ilUnexpectedGetSetAnnotation(), m)) | MemberKind.PropertySet | MemberKind.PropertyGet -> let v = vref.Deref let vtyp = ReturnTypeOfPropertyVal cenv.g v - if CompileAsEvent cenv.g attribs then - - let edef = GenEventForProperty cenv eenvForMeth mspec v ilAttrs m vtyp - [],[],[edef] + if CompileAsEvent cenv.g attribs then + + let edef = GenEventForProperty cenv eenvForMeth mspec v ilAttrs m vtyp + [], [], [edef] else - let ilPropDef = + let ilPropDef = let ilPropTy = GenType cenv.amap m eenvForMeth.tyenv vtyp let ilArgTys = v |> ArgInfosOfPropertyVal cenv.g |> List.map fst |> GenTypes cenv.amap m eenvForMeth.tyenv GenPropertyForMethodDef compileAsInstance tref mdef v memberInfo ilArgTys ilPropTy (mkILCustomAttrs ilAttrs) None let mdef = mdef.WithSpecialName - [mdef], [ilPropDef],[] + [mdef], [ilPropDef], [] - else - [],[],[] + else + [], [], [] /// Generate a ToString method that calls 'sprintf "%A"' -and GenToStringMethod cenv eenv ilThisTy m = - [ match (eenv.valsInScope.TryFind cenv.g.sprintf_vref.Deref, +and GenToStringMethod cenv eenv ilThisTy m = + [ match (eenv.valsInScope.TryFind cenv.g.sprintf_vref.Deref, eenv.valsInScope.TryFind cenv.g.new_format_vref.Deref) with - | Some(Lazy(Method(_,_,sprintfMethSpec,_,_,_,_))), Some(Lazy(Method(_,_,newFormatMethSpec,_,_,_,_))) -> + | Some(Lazy(Method(_, _, sprintfMethSpec, _, _, _, _))), Some(Lazy(Method(_, _, newFormatMethSpec, _, _, _, _))) -> // The type returned by the 'sprintf' call let funcTy = EraseClosures.mkILFuncTy cenv.g.ilxPubCloEnv ilThisTy cenv.g.ilg.typ_String // Give the instantiation of the printf format object, i.e. a Format`5 object compatible with StringFormat - let newFormatMethSpec = mkILMethSpec(newFormatMethSpec.MethodRef,AsObject, + let newFormatMethSpec = mkILMethSpec(newFormatMethSpec.MethodRef, AsObject, [// 'T -> string' - funcTy + funcTy // rest follow from 'StringFormat' - GenUnitTy cenv eenv m - cenv.g.ilg.typ_String - cenv.g.ilg.typ_String - ilThisTy],[]) + GenUnitTy cenv eenv m + cenv.g.ilg.typ_String + cenv.g.ilg.typ_String + ilThisTy], []) // Instantiate with our own type - let sprintfMethSpec = mkILMethSpec(sprintfMethSpec.MethodRef,AsObject,[],[funcTy]) + let sprintfMethSpec = mkILMethSpec(sprintfMethSpec.MethodRef, AsObject, [], [funcTy]) // Here's the body of the method. Call printf, then invoke the function it returns let callInstrs = EraseClosures.mkCallFunc cenv.g.ilxPubCloEnv (fun _ -> 0us) eenv.tyenv.Count Normalcall (Apps_app(ilThisTy, Apps_done cenv.g.ilg.typ_String)) - let mdef = - mkILNonGenericVirtualMethod ("ToString",ILMemberAccess.Public,[], + let mdef = + mkILNonGenericVirtualMethod ("ToString", ILMemberAccess.Public, [], mkILReturn cenv.g.ilg.typ_String, - mkMethodBody (true,[],2,nonBranchingInstrsToCode + mkMethodBody (true, [], 2, nonBranchingInstrsToCode ([ // load the hardwired format string - yield I_ldstr "%+A" + yield I_ldstr "%+A" // make the printf format object yield mkNormalNewobj newFormatMethSpec // call sprintf - yield mkNormalCall sprintfMethSpec + yield mkNormalCall sprintfMethSpec // call the function returned by sprintf - yield mkLdarg0 + yield mkLdarg0 if ilThisTy.Boxity = ILBoxity.AsValue then - yield mkNormalLdobj ilThisTy ] @ + yield mkNormalLdobj ilThisTy ] @ callInstrs), None)) let mdef = mdef.With(customAttrs = mkILCustomAttrs [ cenv.g.CompilerGeneratedAttribute ]) yield mdef | _ -> () ] -and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = +and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon: Tycon) = let tcref = mkLocalTyconRef tycon if tycon.IsTypeAbbrev then () else - match tycon.TypeReprInfo with + match tycon.TypeReprInfo with #if !NO_EXTENSIONTYPING | TProvidedNamespaceExtensionPoint _ -> () | TProvidedTypeExtensionPoint _ -> () #endif | TNoRepr -> () - | TAsmRepr _ | TILObjectRepr _ | TMeasureableRepr _ -> () - | TFSharpObjectRepr _ | TRecdRepr _ | TUnionRepr _ -> + | TAsmRepr _ | TILObjectRepr _ | TMeasureableRepr _ -> () + | TFSharpObjectRepr _ | TRecdRepr _ | TUnionRepr _ -> let eenvinner = ReplaceTyenv (TypeReprEnv.ForTycon tycon) eenv let thisTy = generalizedTyconRef tcref - let ilThisTy = GenType cenv.amap m eenvinner.tyenv thisTy + let ilThisTy = GenType cenv.amap m eenvinner.tyenv thisTy let tref = ilThisTy.TypeRef - let ilGenParams = GenGenericParams cenv eenvinner tycon.TyparsNoRange - let ilIntfTys = tycon.ImmediateInterfaceTypesOfFSharpTycon |> List.map (GenType cenv.amap m eenvinner.tyenv) - let ilTypeName = tref.Name + let ilGenParams = GenGenericParams cenv eenvinner tycon.TyparsNoRange + let ilIntfTys = tycon.ImmediateInterfaceTypesOfFSharpTycon |> List.map (GenType cenv.amap m eenvinner.tyenv) + let ilTypeName = tref.Name - let hidden = IsHiddenTycon eenv.sigToImplRemapInfo tycon + let hidden = IsHiddenTycon eenv.sigToImplRemapInfo tycon let hiddenRepr = hidden || IsHiddenTyconRepr eenv.sigToImplRemapInfo tycon - let access = ComputeTypeAccess tref hidden + let access = ComputeTypeAccess tref hidden - // The implicit augmentation doesn't actually create CompareTo(object) or Object.Equals - // So we do it here. + // The implicit augmentation doesn't actually create CompareTo(object) or Object.Equals + // So we do it here. // - // Note you only have to implement 'System.IComparable' to customize structural comparison AND equality on F# types + // Note you only have to implement 'System.IComparable' to customize structural comparison AND equality on F# types // See also FinalTypeDefinitionChecksAtEndOfInferenceScope in tc.fs - // + // // Generate an Equals method implemented via IComparable if the type EXPLICITLY implements IComparable. - // HOWEVER, if the type doesn't override Object.Equals already. - let augmentOverrideMethodDefs = + // HOWEVER, if the type doesn't override Object.Equals already. + let augmentOverrideMethodDefs = (if Option.isNone tycon.GeneratedCompareToValues && Option.isNone tycon.GeneratedHashAndEqualsValues && - tycon.HasInterface cenv.g cenv.g.mk_IComparable_ty && + tycon.HasInterface cenv.g cenv.g.mk_IComparable_ty && not (tycon.HasOverride cenv.g "Equals" [cenv.g.obj_ty]) && not tycon.IsFSharpInterfaceTycon - then - [ GenEqualsOverrideCallingIComparable cenv (tcref,ilThisTy,ilThisTy) ] + then + [ GenEqualsOverrideCallingIComparable cenv (tcref, ilThisTy, ilThisTy) ] else []) - // Generate the interface slots and abstract slots. - let abstractMethodDefs,abstractPropDefs, abstractEventDefs = - if tycon.IsFSharpDelegateTycon then - [],[],[] + // Generate the interface slots and abstract slots. + let abstractMethodDefs, abstractPropDefs, abstractEventDefs = + if tycon.IsFSharpDelegateTycon then + [], [], [] else // sort by order of declaration // REVIEW: this should be based off tcaug_adhoc_list, which is in declaration order tycon.MembersOfFSharpTyconSorted - |> List.sortWith (fun v1 v2 -> rangeOrder.Compare(v1.DefinitionRange,v2.DefinitionRange)) + |> List.sortWith (fun v1 v2 -> rangeOrder.Compare(v1.DefinitionRange, v2.DefinitionRange)) |> List.map (GenAbstractBinding cenv eenv tref) - |> List.unzip3 + |> List.unzip3 |> mapTriple (List.concat, List.concat, List.concat) let abstractPropDefs = abstractPropDefs |> MergePropertyDefs m - let isAbstract = isAbstractTycon tycon + let isAbstract = isAbstractTycon tycon // Generate all the method impls showing how various abstract slots and interface slots get implemented - // REVIEW: no method impl generated for IStructuralHash or ICompare - let methodImpls = - [ for vref in tycon.MembersOfFSharpTyconByName |> NameMultiMap.range do + // REVIEW: no method impl generated for IStructuralHash or ICompare + let methodImpls = + [ for vref in tycon.MembersOfFSharpTyconByName |> NameMultiMap.range do assert(vref.IsMember) let memberInfo = vref.MemberInfo.Value - if memberInfo.MemberFlags.IsOverrideOrExplicitImpl && not (CompileAsEvent cenv.g vref.Attribs) then + if memberInfo.MemberFlags.IsOverrideOrExplicitImpl && not (CompileAsEvent cenv.g vref.Attribs) then for slotsig in memberInfo.ImplementedSlotSigs do if isInterfaceTy cenv.g slotsig.ImplementedType then - match vref.ValReprInfo with - | Some _ -> + match vref.ValReprInfo with + | Some _ -> - let memberParentTypars,memberMethodTypars = + let memberParentTypars, memberMethodTypars = match PartitionValRefTypars cenv.g vref with - | Some(_,memberParentTypars,memberMethodTypars,_,_) -> memberParentTypars,memberMethodTypars - | None -> [],[] + | Some(_, memberParentTypars, memberMethodTypars, _, _) -> memberParentTypars, memberMethodTypars + | None -> [], [] let useMethodImpl = true let eenvUnderTypars = EnvForTypars memberParentTypars eenv - let _,methodImplGenerator = GenMethodImpl cenv eenvUnderTypars (useMethodImpl,slotsig) m + let _, methodImplGenerator = GenMethodImpl cenv eenvUnderTypars (useMethodImpl, slotsig) m if useMethodImpl then - yield methodImplGenerator (ilThisTy,memberMethodTypars) + yield methodImplGenerator (ilThisTy, memberMethodTypars) | _ -> () ] - + // Try to add a DefaultMemberAttribute for the 'Item' property - let defaultMemberAttrs = + let defaultMemberAttrs = // REVIEW: this should be based off tcaug_adhoc_list, which is in declaration order tycon.MembersOfFSharpTyconSorted - |> List.tryPick (fun vref -> + |> List.tryPick (fun vref -> let name = vref.DisplayName - match vref.MemberInfo with + match vref.MemberInfo with | None -> None - | Some memberInfo -> - match name, memberInfo.MemberFlags.MemberKind with - | ("Item" | "op_IndexedLookup"), (MemberKind.PropertyGet | MemberKind.PropertySet) when not (isNil (ArgInfosOfPropertyVal cenv.g vref.Deref)) -> - Some( mkILCustomAttribute cenv.g.ilg (cenv.g.FindSysILTypeRef "System.Reflection.DefaultMemberAttribute",[cenv.g.ilg.typ_String],[ILAttribElem.String(Some(name))],[]) ) + | Some memberInfo -> + match name, memberInfo.MemberFlags.MemberKind with + | ("Item" | "op_IndexedLookup"), (MemberKind.PropertyGet | MemberKind.PropertySet) when not (isNil (ArgInfosOfPropertyVal cenv.g vref.Deref)) -> + Some( mkILCustomAttribute cenv.g.ilg (cenv.g.FindSysILTypeRef "System.Reflection.DefaultMemberAttribute", [cenv.g.ilg.typ_String], [ILAttribElem.String(Some(name))], []) ) | _ -> None) |> Option.toList let tyconRepr = tycon.TypeReprInfo // DebugDisplayAttribute gets copied to the subtypes generated as part of DU compilation - let debugDisplayAttrs,normalAttrs = tycon.Attribs |> List.partition (IsMatchingFSharpAttribute cenv.g cenv.g.attrib_DebuggerDisplayAttribute) - let securityAttrs,normalAttrs = normalAttrs |> List.partition (fun a -> IsSecurityAttribute cenv.g cenv.amap cenv.casApplied a m) + let debugDisplayAttrs, normalAttrs = tycon.Attribs |> List.partition (IsMatchingFSharpAttribute cenv.g cenv.g.attrib_DebuggerDisplayAttribute) + let securityAttrs, normalAttrs = normalAttrs |> List.partition (fun a -> IsSecurityAttribute cenv.g cenv.amap cenv.casApplied a m) let generateDebugDisplayAttribute = not cenv.g.compilingFslib && tycon.IsUnionTycon && isNil debugDisplayAttrs let generateDebugProxies = (not (tyconRefEq cenv.g tcref cenv.g.unit_tcr_canon) && not (HasFSharpAttribute cenv.g cenv.g.attrib_DebuggerTypeProxyAttribute tycon.Attribs)) let permissionSets = CreatePermissionSets cenv eenv securityAttrs let secDecls = if List.isEmpty securityAttrs then emptyILSecurityDecls else mkILSecurityDecls permissionSets - - let ilDebugDisplayAttributes = + + let ilDebugDisplayAttributes = [ yield! GenAttrs cenv eenv debugDisplayAttrs - if generateDebugDisplayAttribute then - yield cenv.g.mkDebuggerDisplayAttribute ("{" + debugDisplayMethodName + "(),nq}") ] + if generateDebugDisplayAttribute then + yield cenv.g.mkDebuggerDisplayAttribute ("{" + debugDisplayMethodName + "(),nq}") ] - let ilCustomAttrs = - [ yield! defaultMemberAttrs - yield! normalAttrs - |> List.filter (IsMatchingFSharpAttribute cenv.g cenv.g.attrib_StructLayoutAttribute >> not) + let ilCustomAttrs = + [ yield! defaultMemberAttrs + yield! normalAttrs + |> List.filter (IsMatchingFSharpAttribute cenv.g cenv.g.attrib_StructLayoutAttribute >> not) |> GenAttrs cenv eenv - yield! ilDebugDisplayAttributes ] + yield! ilDebugDisplayAttributes ] let reprAccess = ComputeMemberAccess hiddenRepr - let ilTypeDefKind = - match tyconRepr with - | TFSharpObjectRepr o -> - match o.fsobjmodel_kind with - | TTyconClass -> ILTypeDefKind.Class - | TTyconStruct -> ILTypeDefKind.ValueType - | TTyconInterface -> ILTypeDefKind.Interface - | TTyconEnum -> ILTypeDefKind.Enum + let ilTypeDefKind = + match tyconRepr with + | TFSharpObjectRepr o -> + match o.fsobjmodel_kind with + | TTyconClass -> ILTypeDefKind.Class + | TTyconStruct -> ILTypeDefKind.ValueType + | TTyconInterface -> ILTypeDefKind.Interface + | TTyconEnum -> ILTypeDefKind.Enum | TTyconDelegate _ -> ILTypeDefKind.Delegate | TRecdRepr _ | TUnionRepr _ when tycon.IsStructOrEnumTycon -> ILTypeDefKind.ValueType | _ -> ILTypeDefKind.Class - let requiresExtraField = - let isEmptyStruct = + let requiresExtraField = + let isEmptyStruct = (match ilTypeDefKind with ILTypeDefKind.ValueType -> true | _ -> false) && - // All structs are sequential by default + // All structs are sequential by default // Structs with no instance fields get size 1, pack 0 tycon.AllFieldsArray |> Array.forall (fun f -> f.IsStatic) isEmptyStruct && cenv.opts.workAroundReflectionEmitBugs && not tycon.TyparsNoRange.IsEmpty - - // Compute a bunch of useful things for each field - let isCLIMutable = (TryFindFSharpBoolAttribute cenv.g cenv.g.attrib_CLIMutableAttribute tycon.Attribs = Some true) - let fieldSummaries = + + // Compute a bunch of useful things for each field + let isCLIMutable = (TryFindFSharpBoolAttribute cenv.g cenv.g.attrib_CLIMutableAttribute tycon.Attribs = Some true) + let fieldSummaries = [ for fspec in tycon.AllFieldsArray do let useGenuineField = useGenuineField tycon fspec - // The property (or genuine IL field) is hidden in these circumstances: - // - secret fields apart from "__value" fields for enums - // - the representation of the type is hidden - // - the F# field is hidden by a signature or private declaration + // The property (or genuine IL field) is hidden in these circumstances: + // - secret fields apart from "__value" fields for enums + // - the representation of the type is hidden + // - the F# field is hidden by a signature or private declaration let isPropHidden = // Enums always have public cases irrespective of Enum Visibility if tycon.IsEnumTycon then false @@ -6644,63 +6813,63 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = IsHiddenRecdField eenv.sigToImplRemapInfo (tcref.MakeNestedRecdFieldRef fspec)) let ilType = GenType cenv.amap m eenvinner.tyenv fspec.FormalType let ilFieldName = ComputeFieldName tycon fspec - - yield (useGenuineField, ilFieldName, fspec.IsMutable, fspec.IsStatic, fspec.PropertyAttribs, ilType, isPropHidden, fspec) ] - // Generate the IL fields - let ilFieldDefs = - [ for (useGenuineField,ilFieldName,isFSharpMutable,isStatic,_,ilPropType,isPropHidden,fspec) in fieldSummaries do + yield (useGenuineField, ilFieldName, fspec.IsMutable, fspec.IsStatic, fspec.PropertyAttribs, ilType, isPropHidden, fspec) ] + + // Generate the IL fields + let ilFieldDefs = + [ for (useGenuineField, ilFieldName, isFSharpMutable, isStatic, _, ilPropType, isPropHidden, fspec) in fieldSummaries do - let ilFieldOffset = + let ilFieldOffset = match TryFindFSharpAttribute cenv.g cenv.g.attrib_FieldOffsetAttribute fspec.FieldAttribs with - | Some (Attrib(_,_,[ AttribInt32Arg(fieldOffset) ],_,_,_,_)) -> + | Some (Attrib(_, _, [ AttribInt32Arg(fieldOffset) ], _, _, _, _)) -> Some fieldOffset - | Some (Attrib(_,_,_,_,_,_,m)) -> - errorR(Error(FSComp.SR.ilFieldOffsetAttributeCouldNotBeDecoded(),m)) + | Some (Attrib(_, _, _, _, _, _, m)) -> + errorR(Error(FSComp.SR.ilFieldOffsetAttributeCouldNotBeDecoded(), m)) None - | _ -> + | _ -> None - let attribs = + let attribs = [ // If using a field then all the attributes go on the field // See also FSharp 1.0 Bug 4727: once we start compiling them as real mutable fields, you should not be able to target both "property" for "val mutable" fields in classes - if useGenuineField then yield! fspec.PropertyAttribs + if useGenuineField then yield! fspec.PropertyAttribs yield! fspec.FieldAttribs ] - + let ilNotSerialized = HasFSharpAttributeOpt cenv.g cenv.g.attrib_NonSerializedAttribute attribs - - let fattribs = + + let fattribs = attribs - // Do not generate FieldOffset as a true CLI custom attribute, since it is implied by other corresponding CLI metadata - |> List.filter (IsMatchingFSharpAttribute cenv.g cenv.g.attrib_FieldOffsetAttribute >> not) - // Do not generate NonSerialized as a true CLI custom attribute, since it is implied by other corresponding CLI metadata - |> List.filter (IsMatchingFSharpAttributeOpt cenv.g cenv.g.attrib_NonSerializedAttribute >> not) + // Do not generate FieldOffset as a true CLI custom attribute, since it is implied by other corresponding CLI metadata + |> List.filter (IsMatchingFSharpAttribute cenv.g cenv.g.attrib_FieldOffsetAttribute >> not) + // Do not generate NonSerialized as a true CLI custom attribute, since it is implied by other corresponding CLI metadata + |> List.filter (IsMatchingFSharpAttributeOpt cenv.g cenv.g.attrib_NonSerializedAttribute >> not) let ilFieldMarshal, fattribs = GenMarshal cenv fattribs - // The IL field is hidden if the property/field is hidden OR we're using a property AND the field is not mutable (because we can take the address of a mutable field). - // Otherwise fields are always accessed via their property getters/setters + // The IL field is hidden if the property/field is hidden OR we're using a property AND the field is not mutable (because we can take the address of a mutable field). + // Otherwise fields are always accessed via their property getters/setters let isFieldHidden = isPropHidden || (not useGenuineField && not isFSharpMutable) - - let extraAttribs = - match tyconRepr with + + let extraAttribs = + match tyconRepr with | TRecdRepr _ when not useGenuineField -> [ cenv.g.DebuggerBrowsableNeverAttribute ] // hide fields in records in debug display | _ -> [] // don't hide fields in classes in debug display let access = ComputeMemberAccess isFieldHidden let literalValue = Option.map (GenFieldInit m) fspec.LiteralValue - + let fdef = - ILFieldDef.Create(name = ilFieldName, - fieldType = ilPropType, - attributes = enum 0, - data = None, - literalValue = None, - offset = ilFieldOffset, - marshal = None, - customAttrs = mkILCustomAttrs (GenAttrs cenv eenv fattribs @ extraAttribs)) + ILFieldDef.Create(name = ilFieldName, + fieldType = ilPropType, + attributes = enum 0, + data = None, + literalValue = None, + offset = ilFieldOffset, + marshal = None, + customAttrs = mkILCustomAttrs (GenAttrs cenv eenv fattribs @ extraAttribs)) .WithAccess(access) .WithStatic(isStatic) .WithSpecialName(ilFieldName="value__" && tycon.IsEnumTycon) @@ -6709,13 +6878,13 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = .WithFieldMarshal(ilFieldMarshal) yield fdef - if requiresExtraField then - yield mkILInstanceField("__dummy",cenv.g.ilg.typ_Int32,None,ILMemberAccess.Assembly) ] - - // Generate property definitions for the fields compiled as properties - let ilPropertyDefsForFields = - [ for (i, (useGenuineField,_,isFSharpMutable,isStatic,propAttribs,ilPropType,_,fspec)) in markup fieldSummaries do - if not useGenuineField then + if requiresExtraField then + yield mkILInstanceField("__dummy", cenv.g.ilg.typ_Int32, None, ILMemberAccess.Assembly) ] + + // Generate property definitions for the fields compiled as properties + let ilPropertyDefsForFields = + [ for (i, (useGenuineField, _, isFSharpMutable, isStatic, propAttribs, ilPropType, _, fspec)) in Seq.indexed fieldSummaries do + if not useGenuineField then let ilCallingConv = if isStatic then ILCallingConv.Static else ILCallingConv.Instance let ilPropName = fspec.Name let ilHasSetter = isCLIMutable || isFSharpMutable @@ -6723,105 +6892,105 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = yield ILPropertyDef.Create(name= ilPropName, attributes= PropertyAttributes.None, - setMethod= (if ilHasSetter then Some(mkILMethRef(tref,ilCallingConv,"set_" + ilPropName,0,[ilPropType],ILType.Void)) else None), - getMethod= Some(mkILMethRef(tref,ilCallingConv,"get_" + ilPropName,0,[],ilPropType)), + setMethod= (if ilHasSetter then Some(mkILMethRef(tref, ilCallingConv, "set_" + ilPropName, 0, [ilPropType], ILType.Void)) else None), + getMethod= Some(mkILMethRef(tref, ilCallingConv, "get_" + ilPropName, 0, [], ilPropType)), callingConv= ilCallingConv.ThisConv, propertyType= ilPropType, init= None, args= [], - customAttrs = mkILCustomAttrs ilFieldAttrs) ] - - let methodDefs = - [ // Generate property getter methods for those fields that have properties - for (useGenuineField,ilFieldName,_,isStatic,_,ilPropType,isPropHidden,fspec) in fieldSummaries do - if not useGenuineField then + customAttrs = mkILCustomAttrs ilFieldAttrs) ] + + let methodDefs = + [ // Generate property getter methods for those fields that have properties + for (useGenuineField, ilFieldName, _, isStatic, _, ilPropType, isPropHidden, fspec) in fieldSummaries do + if not useGenuineField then let ilPropName = fspec.Name let ilMethName = "get_" + ilPropName let access = ComputeMemberAccess isPropHidden - yield mkLdfldMethodDef (ilMethName,access,isStatic,ilThisTy,ilFieldName,ilPropType) + yield mkLdfldMethodDef (ilMethName, access, isStatic, ilThisTy, ilFieldName, ilPropType) - // Generate property setter methods for the mutable fields - for (useGenuineField,ilFieldName,isFSharpMutable,isStatic,_,ilPropType,isPropHidden,fspec) in fieldSummaries do - let ilHasSetter = (isCLIMutable || isFSharpMutable) && not useGenuineField - if ilHasSetter then + // Generate property setter methods for the mutable fields + for (useGenuineField, ilFieldName, isFSharpMutable, isStatic, _, ilPropType, isPropHidden, fspec) in fieldSummaries do + let ilHasSetter = (isCLIMutable || isFSharpMutable) && not useGenuineField + if ilHasSetter then let ilPropName = fspec.Name - let ilFieldSpec = mkILFieldSpecInTy(ilThisTy,ilFieldName,ilPropType) + let ilFieldSpec = mkILFieldSpecInTy(ilThisTy, ilFieldName, ilPropType) let ilMethName = "set_" + ilPropName - let ilParams = [mkILParamNamed("value",ilPropType)] + let ilParams = [mkILParamNamed("value", ilPropType)] let ilReturn = mkILReturn ILType.Void let iLAccess = ComputeMemberAccess isPropHidden - let ilMethodDef = - if isStatic then + let ilMethodDef = + if isStatic then mkILNonGenericStaticMethod - (ilMethName,iLAccess,ilParams,ilReturn, - mkMethodBody(true,[],2,nonBranchingInstrsToCode ([ mkLdarg0;mkNormalStsfld ilFieldSpec]),None)) - else + (ilMethName, iLAccess, ilParams, ilReturn, + mkMethodBody(true, [], 2, nonBranchingInstrsToCode ([ mkLdarg0;mkNormalStsfld ilFieldSpec]), None)) + else mkILNonGenericInstanceMethod - (ilMethName,iLAccess,ilParams,ilReturn, - mkMethodBody(true,[],2,nonBranchingInstrsToCode ([ mkLdarg0;mkLdarg 1us;mkNormalStfld ilFieldSpec]),None)) + (ilMethName, iLAccess, ilParams, ilReturn, + mkMethodBody(true, [], 2, nonBranchingInstrsToCode ([ mkLdarg0;mkLdarg 1us;mkNormalStfld ilFieldSpec]), None)) yield ilMethodDef.WithSpecialName - if generateDebugDisplayAttribute then - let (|Lazy|) (x:Lazy<_>) = x.Force() + if generateDebugDisplayAttribute then + let (|Lazy|) (x: Lazy<_>) = x.Force() match (eenv.valsInScope.TryFind cenv.g.sprintf_vref.Deref, eenv.valsInScope.TryFind cenv.g.new_format_vref.Deref) with - | Some(Lazy(Method(_,_,sprintfMethSpec,_,_,_,_))), Some(Lazy(Method(_,_,newFormatMethSpec,_,_,_,_))) -> + | Some(Lazy(Method(_, _, sprintfMethSpec, _, _, _, _))), Some(Lazy(Method(_, _, newFormatMethSpec, _, _, _, _))) -> // The type returned by the 'sprintf' call let funcTy = EraseClosures.mkILFuncTy cenv.g.ilxPubCloEnv ilThisTy cenv.g.ilg.typ_String // Give the instantiation of the printf format object, i.e. a Format`5 object compatible with StringFormat - let newFormatMethSpec = mkILMethSpec(newFormatMethSpec.MethodRef,AsObject, + let newFormatMethSpec = mkILMethSpec(newFormatMethSpec.MethodRef, AsObject, [// 'T -> string' - funcTy + funcTy // rest follow from 'StringFormat' - GenUnitTy cenv eenv m - cenv.g.ilg.typ_String - cenv.g.ilg.typ_String - cenv.g.ilg.typ_String],[]) + GenUnitTy cenv eenv m + cenv.g.ilg.typ_String + cenv.g.ilg.typ_String + cenv.g.ilg.typ_String], []) // Instantiate with our own type - let sprintfMethSpec = mkILMethSpec(sprintfMethSpec.MethodRef,AsObject,[],[funcTy]) + let sprintfMethSpec = mkILMethSpec(sprintfMethSpec.MethodRef, AsObject, [], [funcTy]) // Here's the body of the method. Call printf, then invoke the function it returns let callInstrs = EraseClosures.mkCallFunc cenv.g.ilxPubCloEnv (fun _ -> 0us) eenv.tyenv.Count Normalcall (Apps_app(ilThisTy, Apps_done cenv.g.ilg.typ_String)) - let ilMethodDef = mkILNonGenericInstanceMethod (debugDisplayMethodName,ILMemberAccess.Assembly,[], + let ilMethodDef = mkILNonGenericInstanceMethod (debugDisplayMethodName, ILMemberAccess.Assembly, [], mkILReturn cenv.g.ilg.typ_Object, - mkMethodBody - (true,[],2, - nonBranchingInstrsToCode + mkMethodBody + (true, [], 2, + nonBranchingInstrsToCode ([ // load the hardwired format string - yield I_ldstr "%+0.8A" + yield I_ldstr "%+0.8A" // make the printf format object yield mkNormalNewobj newFormatMethSpec // call sprintf - yield mkNormalCall sprintfMethSpec + yield mkNormalCall sprintfMethSpec // call the function returned by sprintf - yield mkLdarg0 + yield mkLdarg0 if ilThisTy.Boxity = ILBoxity.AsValue then - yield mkNormalLdobj ilThisTy ] @ + yield mkNormalLdobj ilThisTy ] @ callInstrs), None)) yield ilMethodDef.WithSpecialName |> AddNonUserCompilerGeneratedAttribs cenv.g - | None,_ -> + | None, _ -> //printfn "sprintf not found" () - | _,None -> + | _, None -> //printfn "new formatnot found" () | _ -> //printfn "neither found, or non-method" () - // Build record constructors and the funky methods that go with records and delegate types. - // Constructors and delegate methods have the same access as the representation - match tyconRepr with + // Build record constructors and the funky methods that go with records and delegate types. + // Constructors and delegate methods have the same access as the representation + match tyconRepr with | TRecdRepr _ when not (tycon.IsEnumTycon) -> - // No constructor for enum types - // Otherwise find all the non-static, non zero-init fields and build a constructor - let relevantFields = - fieldSummaries - |> List.filter (fun (_,_,_,isStatic,_,_,_,fspec) -> not isStatic && not fspec.IsZeroInit) + // No constructor for enum types + // Otherwise find all the non-static, non zero-init fields and build a constructor + let relevantFields = + fieldSummaries + |> List.filter (fun (_, _, _, isStatic, _, _, _, fspec) -> not isStatic && not fspec.IsZeroInit) - let fieldNamesAndTypes = + let fieldNamesAndTypes = relevantFields - |> List.map (fun (_,ilFieldName,_,_,_,ilPropType,_,fspec) -> (fspec.Name,ilFieldName,ilPropType)) + |> List.map (fun (_, ilFieldName, _, _, _, ilPropType, _, fspec) -> (fspec.Name, ilFieldName, ilPropType)) let isStructRecord = tycon.IsStructRecordOrUnionTycon @@ -6829,158 +6998,158 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = let spec = if isStructRecord then None else Some(cenv.g.ilg.typ_Object.TypeSpec) let ilMethodDef = mkILSimpleStorageCtorWithParamNames(None, spec, ilThisTy, [], ChooseParamNames fieldNamesAndTypes, reprAccess) - yield ilMethodDef - // FSharp 1.0 bug 1988: Explicitly setting the ComVisible(true) attribute on an F# type causes an F# record to be emitted in a way that enables mutation for COM interop scenarios + yield ilMethodDef + // FSharp 1.0 bug 1988: Explicitly setting the ComVisible(true) attribute on an F# type causes an F# record to be emitted in a way that enables mutation for COM interop scenarios // FSharp 3.0 feature: adding CLIMutable to a record type causes emit of default constructor, and all fields get property setters // Records that are value types do not create a default constructor with CLIMutable or ComVisible if not isStructRecord && (isCLIMutable || (TryFindFSharpBoolAttribute cenv.g cenv.g.attrib_ComVisibleAttribute tycon.Attribs = Some true)) then - yield mkILSimpleStorageCtor(None, Some cenv.g.ilg.typ_Object.TypeSpec, ilThisTy, [], [], reprAccess) - + yield mkILSimpleStorageCtor(None, Some cenv.g.ilg.typ_Object.TypeSpec, ilThisTy, [], [], reprAccess) + if not (tycon.HasMember cenv.g "ToString" []) then yield! GenToStringMethod cenv eenv ilThisTy m | TFSharpObjectRepr r when tycon.IsFSharpDelegateTycon -> - // Build all the methods that go with a delegate type - match r.fsobjmodel_kind with + // Build all the methods that go with a delegate type + match r.fsobjmodel_kind with | TTyconDelegate ss -> - let p,r = + let p, r = // When "type delegateTy = delegate of unit -> returnTy", - // suppress the unit arg from delegate .Invoke vslot. - let (TSlotSig(nm,ty,ctps,mtps,paraml,returnTy)) = ss - let paraml = + // suppress the unit arg from delegate .Invoke vslot. + let (TSlotSig(nm, ty, ctps, mtps, paraml, returnTy)) = ss + let paraml = match paraml with | [[tsp]] when isUnitTy cenv.g tsp.Type -> [] (* suppress unit arg *) | paraml -> paraml - GenActualSlotsig m cenv eenvinner (TSlotSig(nm,ty,ctps,mtps,paraml,returnTy)) [] [] - yield! mkILDelegateMethods reprAccess cenv.g.ilg (cenv.g.iltyp_AsyncCallback, cenv.g.iltyp_IAsyncResult) (p,r) - | _ -> + GenActualSlotsig m cenv eenvinner (TSlotSig(nm, ty, ctps, mtps, paraml, returnTy)) [] [] + yield! mkILDelegateMethods reprAccess cenv.g.ilg (cenv.g.iltyp_AsyncCallback, cenv.g.iltyp_IAsyncResult) (p, r) + | _ -> () - | TUnionRepr _ when not (tycon.HasMember cenv.g "ToString" []) -> + | TUnionRepr _ when not (tycon.HasMember cenv.g "ToString" []) -> yield! GenToStringMethod cenv eenv ilThisTy m | _ -> () ] - + let ilMethods = methodDefs @ augmentOverrideMethodDefs @ abstractMethodDefs let ilProperties = mkILProperties (ilPropertyDefsForFields @ abstractPropDefs) let ilEvents = mkILEvents abstractEventDefs let ilFields = mkILFields ilFieldDefs - - let tdef, tdefDiscards = + + let tdef, tdefDiscards = let isSerializable = (TryFindFSharpBoolAttribute cenv.g cenv.g.attrib_AutoSerializableAttribute tycon.Attribs <> Some(false)) - match tycon.TypeReprInfo with + match tycon.TypeReprInfo with | TILObjectRepr _ -> let tdef = tycon.ILTyconRawMetadata.WithAccess(access) let tdef = tdef.With(customAttrs = mkILCustomAttrs ilCustomAttrs, genericParams = ilGenParams) tdef, None - | TRecdRepr _ | TFSharpObjectRepr _ as tyconRepr -> + | TRecdRepr _ | TFSharpObjectRepr _ as tyconRepr -> let super = superOfTycon cenv.g tycon let ilBaseTy = GenType cenv.amap m eenvinner.tyenv super - - // Build a basic type definition + + // Build a basic type definition let isObjectType = (match tyconRepr with TFSharpObjectRepr _ -> true | _ -> false) - let ilAttrs = - ilCustomAttrs @ + let ilAttrs = + ilCustomAttrs @ [mkCompilationMappingAttr cenv.g (int (if isObjectType then SourceConstructFlags.ObjectType elif hiddenRepr then SourceConstructFlags.RecordType ||| SourceConstructFlags.NonPublicRepresentation else SourceConstructFlags.RecordType)) ] - - // For now, generic types always use ILTypeInit.BeforeField. This is because - // there appear to be some cases where ILTypeInit.OnAny causes problems for + + // For now, generic types always use ILTypeInit.BeforeField. This is because + // there appear to be some cases where ILTypeInit.OnAny causes problems for // the .NET CLR when used in conjunction with generic classes in cross-DLL - // and NGEN scenarios. + // and NGEN scenarios. // // We don't apply this rule to the final file. This is because ALL classes with .cctors in - // the final file (which may in turn trigger the .cctor for the .EXE itself, which - // in turn calls the main() method) must have deterministic initialization + // the final file (which may in turn trigger the .cctor for the .EXE itself, which + // in turn calls the main() method) must have deterministic initialization // that is not triggered prior to execution of the main() method. - // If this property doesn't hold then the .cctor can end up running + // If this property doesn't hold then the .cctor can end up running // before the main method even starts. - let typeDefTrigger = - if eenv.isFinalFile || tycon.TyparsNoRange.IsEmpty then + let typeDefTrigger = + if eenv.isFinalFile || tycon.TyparsNoRange.IsEmpty then ILTypeInit.OnAny - else + else ILTypeInit.BeforeField - let tdef = mkILGenericClass (ilTypeName, access, ilGenParams, ilBaseTy, ilIntfTys, - mkILMethods ilMethods, ilFields, emptyILTypeDefs, ilProperties, ilEvents, mkILCustomAttrs ilAttrs, + let tdef = mkILGenericClass (ilTypeName, access, ilGenParams, ilBaseTy, ilIntfTys, + mkILMethods ilMethods, ilFields, emptyILTypeDefs, ilProperties, ilEvents, mkILCustomAttrs ilAttrs, typeDefTrigger) - // Set some the extra entries in the definition + // Set some the extra entries in the definition let isTheSealedAttribute = tyconRefEq cenv.g tcref cenv.g.attrib_SealedAttribute.TyconRef let tdef = tdef.WithSealed(isSealedTy cenv.g thisTy || isTheSealedAttribute).WithSerializable(isSerializable).WithAbstract(isAbstract).WithImport(isComInteropTy cenv.g thisTy) let tdef = tdef.With(methodImpls=mkILMethodImpls methodImpls) - let tdLayout,tdEncoding = + let tdLayout, tdEncoding = match TryFindFSharpAttribute cenv.g cenv.g.attrib_StructLayoutAttribute tycon.Attribs with - | Some (Attrib(_,_,[ AttribInt32Arg(layoutKind) ],namedArgs,_,_,_)) -> + | Some (Attrib(_, _, [ AttribInt32Arg(layoutKind) ], namedArgs, _, _, _)) -> let decoder = AttributeDecoder namedArgs let ilPack = decoder.FindInt32 "Pack" 0x0 let ilSize = decoder.FindInt32 "Size" 0x0 - let tdEncoding = + let tdEncoding = match (decoder.FindInt32 "CharSet" 0x0) with (* enumeration values for System.Runtime.InteropServices.CharSet taken from mscorlib.il *) | 0x03 -> ILDefaultPInvokeEncoding.Unicode | 0x04 -> ILDefaultPInvokeEncoding.Auto | _ -> ILDefaultPInvokeEncoding.Ansi - let layoutInfo = - if ilPack = 0x0 && ilSize = 0x0 - then { Size=None; Pack=None } + let layoutInfo = + if ilPack = 0x0 && ilSize = 0x0 + then { Size=None; Pack=None } else { Size = Some ilSize; Pack = Some (uint16 ilPack) } - let tdLayout = + let tdLayout = match layoutKind with (* enumeration values for System.Runtime.InteropServices.LayoutKind taken from mscorlib.il *) | 0x0 -> ILTypeDefLayout.Sequential layoutInfo | 0x2 -> ILTypeDefLayout.Explicit layoutInfo | _ -> ILTypeDefLayout.Auto - tdLayout,tdEncoding - | Some (Attrib(_,_,_,_,_,_,m)) -> - errorR(Error(FSComp.SR.ilStructLayoutAttributeCouldNotBeDecoded(),m)) + tdLayout, tdEncoding + | Some (Attrib(_, _, _, _, _, _, m)) -> + errorR(Error(FSComp.SR.ilStructLayoutAttributeCouldNotBeDecoded(), m)) ILTypeDefLayout.Auto, ILDefaultPInvokeEncoding.Ansi | _ when (match ilTypeDefKind with ILTypeDefKind.ValueType -> true | _ -> false) -> - - // All structs are sequential by default + + // All structs are sequential by default // Structs with no instance fields get size 1, pack 0 if tycon.AllFieldsArray |> Array.exists (fun f -> not f.IsStatic) || // Reflection emit doesn't let us emit 'pack' and 'size' for generic structs. // In that case we generate a dummy field instead - (cenv.opts.workAroundReflectionEmitBugs && not tycon.TyparsNoRange.IsEmpty) - then + (cenv.opts.workAroundReflectionEmitBugs && not tycon.TyparsNoRange.IsEmpty) + then ILTypeDefLayout.Sequential { Size=None; Pack=None }, ILDefaultPInvokeEncoding.Ansi else ILTypeDefLayout.Sequential { Size=Some 1; Pack=Some 0us }, ILDefaultPInvokeEncoding.Ansi - - | _ -> + + | _ -> ILTypeDefLayout.Auto, ILDefaultPInvokeEncoding.Ansi - + // if the type's layout is Explicit, ensure that each field has a valid offset let validateExplicit (fdef: ILFieldDef) = match fdef.Offset with // Remove field suffix "@" for pretty printing - | None -> errorR(Error(FSComp.SR.ilFieldDoesNotHaveValidOffsetForStructureLayout(tdef.Name, fdef.Name.Replace("@","")), (trimRangeToLine m))) + | None -> errorR(Error(FSComp.SR.ilFieldDoesNotHaveValidOffsetForStructureLayout(tdef.Name, fdef.Name.Replace("@", "")), (trimRangeToLine m))) | _ -> () - + // if the type's layout is Sequential, no offsets should be applied let validateSequential (fdef: ILFieldDef) = match fdef.Offset with | Some _ -> errorR(Error(FSComp.SR.ilFieldHasOffsetForSequentialLayout(), (trimRangeToLine m))) | _ -> () - + match tdLayout with | ILTypeDefLayout.Explicit(_) -> List.iter validateExplicit ilFieldDefs | ILTypeDefLayout.Sequential(_) -> List.iter validateSequential ilFieldDefs | _ -> () - + let tdef = tdef.WithKind(ilTypeDefKind).WithLayout(tdLayout).WithEncoding(tdEncoding) tdef, None - | TUnionRepr _ -> - let alternatives = - tycon.UnionCasesArray |> Array.mapi (fun i ucspec -> + | TUnionRepr _ -> + let alternatives = + tycon.UnionCasesArray |> Array.mapi (fun i ucspec -> { altName=ucspec.CompiledName altFields=GenUnionCaseRef cenv.amap m eenvinner.tyenv i ucspec.RecdFieldsArray altCustomAttrs= mkILCustomAttrs (GenAttrs cenv eenv ucspec.Attribs @ [mkCompilationMappingAttrWithSeqNum cenv.g (int SourceConstructFlags.UnionCase) i]) }) @@ -6994,25 +7163,25 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = cudAlternatives= alternatives cudWhere = None} - let layout = - if isStructTy cenv.g thisTy then + let layout = + if isStructTy cenv.g thisTy then if (match ilTypeDefKind with ILTypeDefKind.ValueType -> true | _ -> false) then // Structs with no instance fields get size 1, pack 0 ILTypeDefLayout.Sequential { Size=Some 1; Pack=Some 0us } else ILTypeDefLayout.Sequential { Size=None; Pack=None } - else + else ILTypeDefLayout.Auto - let cattrs = - mkILCustomAttrs (ilCustomAttrs @ + let cattrs = + mkILCustomAttrs (ilCustomAttrs @ [mkCompilationMappingAttr cenv.g (int (if hiddenRepr - then SourceConstructFlags.SumType ||| SourceConstructFlags.NonPublicRepresentation + then SourceConstructFlags.SumType ||| SourceConstructFlags.NonPublicRepresentation else SourceConstructFlags.SumType)) ]) - let tdef = + let tdef = ILTypeDef.Create(name = ilTypeName, - layout = layout, + layout = layout, attributes = enum 0, genericParams = ilGenParams, customAttrs = cattrs, @@ -7033,19 +7202,19 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = .WithInitSemantics(ILTypeInit.BeforeField) let tdef2 = cenv.g.eraseClassUnionDef tref tdef cuinfo - - // Discard the user-supplied (i.e. prim-type.fs) implementations of the get_Empty, get_IsEmpty, get_Value and get_None and Some methods. - // This is because we will replace their implementations by ones that load the unique + + // Discard the user-supplied (i.e. prim-type.fs) implementations of the get_Empty, get_IsEmpty, get_Value and get_None and Some methods. + // This is because we will replace their implementations by ones that load the unique // private static field for lists etc. - // + // // Also discard the F#-compiler supplied implementation of the Empty, IsEmpty, Value and None properties. - let tdefDiscards = + let tdefDiscards = Some ((fun (md: ILMethodDef) -> (cuinfo.cudHasHelpers = SpecialFSharpListHelpers && (md.Name = "get_Empty" || md.Name = "Cons" || md.Name = "get_IsEmpty")) || (cuinfo.cudHasHelpers = SpecialFSharpOptionHelpers && (md.Name = "get_Value" || md.Name = "get_None" || md.Name = "Some"))), - + (fun (pd: ILPropertyDef) -> - (cuinfo.cudHasHelpers = SpecialFSharpListHelpers && (pd.Name = "Empty" || pd.Name = "IsEmpty" )) || + (cuinfo.cudHasHelpers = SpecialFSharpListHelpers && (pd.Name = "Empty" || pd.Name = "IsEmpty" )) || (cuinfo.cudHasHelpers = SpecialFSharpOptionHelpers && (pd.Name = "Value" || pd.Name = "None")))) tdef2, tdefDiscards @@ -7058,7 +7227,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = // If a non-generic type is written with "static let" and "static do" (i.e. it has a ".cctor") // then the code for the .cctor is placed into .cctor for the backing static class for the file. - // It is not placed in its own .cctor as there is no feasible way for this to be given a coherent + // It is not placed in its own .cctor as there is no feasible way for this to be given a coherent // order in the sequential initialization of the file. // // In this case, the .cctor for this type must force the .cctor of the backing static class for the file. @@ -7066,11 +7235,11 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = GenForceWholeFileInitializationAsPartOfCCtor cenv mgbuf lazyInitInfo tref m - -/// Generate the type for an F# exception declaration. -and GenExnDef cenv mgbuf eenv m (exnc:Tycon) = - let exncref = mkLocalEntityRef exnc - match exnc.ExceptionInfo with + +/// Generate the type for an F# exception declaration. +and GenExnDef cenv mgbuf eenv m (exnc: Tycon) = + let exncref = mkLocalEntityRef exnc + match exnc.ExceptionInfo with | TExnAbbrevRepr _ | TExnAsmRepr _ | TExnNone -> () | TExnFresh _ -> let ilThisTy = GenExnType cenv.amap m eenv.tyenv exncref @@ -7078,98 +7247,98 @@ and GenExnDef cenv mgbuf eenv m (exnc:Tycon) = let isHidden = IsHiddenTycon eenv.sigToImplRemapInfo exnc let access = ComputeTypeAccess tref isHidden let reprAccess = ComputeMemberAccess isHidden - let fspecs = exnc.TrueInstanceFieldsAsList + let fspecs = exnc.TrueInstanceFieldsAsList - let ilMethodDefsForProperties,ilFieldDefs,ilPropertyDefs,fieldNamesAndTypes = - [ for i,fld in markup fspecs do + let ilMethodDefsForProperties, ilFieldDefs, ilPropertyDefs, fieldNamesAndTypes = + [ for i, fld in Seq.indexed fspecs do let ilPropName = fld.Name let ilPropType = GenType cenv.amap m eenv.tyenv fld.FormalType let ilMethName = "get_" + fld.Name - let ilFieldName = ComputeFieldName exnc fld - let ilMethodDef = mkLdfldMethodDef (ilMethName,reprAccess,false,ilThisTy,ilFieldName,ilPropType) - let ilFieldDef = IL.mkILInstanceField(ilFieldName,ilPropType, None, ILMemberAccess.Assembly) - let ilPropDef = + let ilFieldName = ComputeFieldName exnc fld + let ilMethodDef = mkLdfldMethodDef (ilMethName, reprAccess, false, ilThisTy, ilFieldName, ilPropType) + let ilFieldDef = IL.mkILInstanceField(ilFieldName, ilPropType, None, ILMemberAccess.Assembly) + let ilPropDef = ILPropertyDef.Create(name = ilPropName, attributes = PropertyAttributes.None, setMethod = None, - getMethod = Some(mkILMethRef(tref,ILCallingConv.Instance,ilMethName,0,[],ilPropType)), + getMethod = Some(mkILMethRef(tref, ILCallingConv.Instance, ilMethName, 0, [], ilPropType)), callingConv = ILThisConvention.Instance, propertyType = ilPropType, init = None, args = [], customAttrs=mkILCustomAttrs (GenAttrs cenv eenv fld.PropertyAttribs @ [mkCompilationMappingAttrWithSeqNum cenv.g (int SourceConstructFlags.Field) i])) - yield (ilMethodDef,ilFieldDef,ilPropDef,(ilPropName,ilFieldName,ilPropType)) ] + yield (ilMethodDef, ilFieldDef, ilPropDef, (ilPropName, ilFieldName, ilPropType)) ] |> List.unzip4 - let ilCtorDef = - mkILSimpleStorageCtorWithParamNames(None, Some cenv.g.iltyp_Exception.TypeSpec, ilThisTy, [], ChooseParamNames fieldNamesAndTypes, reprAccess) + let ilCtorDef = + mkILSimpleStorageCtorWithParamNames(None, Some cenv.g.iltyp_Exception.TypeSpec, ilThisTy, [], ChooseParamNames fieldNamesAndTypes, reprAccess) // In compiled code, all exception types get a parameterless constructor for use with XML serialization // This does default-initialization of all fields - let ilCtorDefNoArgs = - if not (isNil fieldNamesAndTypes) then + let ilCtorDefNoArgs = + if not (isNil fieldNamesAndTypes) then [ mkILSimpleStorageCtor(None, Some cenv.g.iltyp_Exception.TypeSpec, ilThisTy, [], [], reprAccess) ] else [] let serializationRelatedMembers = // do not emit serialization related members if target framework lacks SerializationInfo or StreamingContext - match cenv.g.iltyp_SerializationInfo, cenv.g.iltyp_StreamingContext with - | Some serializationInfoType, Some streamingContextType -> - let ilCtorDefForSerialziation = + match cenv.g.iltyp_SerializationInfo, cenv.g.iltyp_StreamingContext with + | Some serializationInfoType, Some streamingContextType -> + let ilCtorDefForSerialziation = mkILCtor(ILMemberAccess.Family, - [mkILParamNamed("info", serializationInfoType);mkILParamNamed("context",streamingContextType)], + [mkILParamNamed("info", serializationInfoType);mkILParamNamed("context", streamingContextType)], mkMethodBody - (false,[],8, + (false, [], 8, nonBranchingInstrsToCode - [ mkLdarg0 + [ mkLdarg0 mkLdarg 1us mkLdarg 2us - mkNormalCall (mkILCtorMethSpecForTy (cenv.g.iltyp_Exception,[serializationInfoType; streamingContextType])) ] - ,None)) - + mkNormalCall (mkILCtorMethSpecForTy (cenv.g.iltyp_Exception, [serializationInfoType; streamingContextType])) ], + None)) + //#if BE_SECURITY_TRANSPARENT [ilCtorDefForSerialziation] //#else (* - let getObjectDataMethodForSerialization = - - let ilMethodDef = + let getObjectDataMethodForSerialization = + + let ilMethodDef = mkILNonGenericVirtualMethod - ("GetObjectData",ILMemberAccess.Public, - [mkILParamNamed ("info", serializationInfoType);mkILParamNamed("context",cenv.g.iltyp_StreamingContext)], + ("GetObjectData", ILMemberAccess.Public, + [mkILParamNamed ("info", serializationInfoType);mkILParamNamed("context", cenv.g.iltyp_StreamingContext)], mkILReturn ILType.Void, - (let code = + (let code = nonBranchingInstrsToCode - [ mkLdarg0 + [ mkLdarg0 mkLdarg 1us mkLdarg 2us mkNormalCall (mkILNonGenericInstanceMethSpecInTy (cenv.g.iltyp_Exception, "GetObjectData", [serializationInfoType; cenv.g.iltyp_StreamingContext], ILType.Void)) ] - mkMethodBody(true,[],8,code,None))) + mkMethodBody(true, [], 8, code, None))) // Here we must encode: [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] // In ILDASM this is: .permissionset demand = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SerializationFormatter' = bool(true)}} match cenv.g.tref_SecurityPermissionAttribute with | None -> ilMethodDef | Some securityPermissionAttributeType -> - { ilMethodDef with - SecurityDecls=mkILSecurityDecls [ IL.mkPermissionSet cenv.g.ilg (ILSecurityAction.Demand,[(securityPermissionAttributeType, [("SerializationFormatter",cenv.g.ilg.typ_Bool, ILAttribElem.Bool(true))])])] + { ilMethodDef with + SecurityDecls=mkILSecurityDecls [ IL.mkPermissionSet cenv.g.ilg (ILSecurityAction.Demand, [(securityPermissionAttributeType, [("SerializationFormatter", cenv.g.ilg.typ_Bool, ILAttribElem.Bool(true))])])] HasSecurity=true } [ilCtorDefForSerialziation; getObjectDataMethodForSerialization] *) -//#endif +//#endif | _ -> [] let ilTypeName = tref.Name - - let interfaces = exnc.ImmediateInterfaceTypesOfFSharpTycon |> List.map (GenType cenv.amap m eenv.tyenv) - let tdef = + + let interfaces = exnc.ImmediateInterfaceTypesOfFSharpTycon |> List.map (GenType cenv.amap m eenv.tyenv) + let tdef = mkILGenericClass - (ilTypeName,access,[],cenv.g.iltyp_Exception, - interfaces, + (ilTypeName, access, [], cenv.g.iltyp_Exception, + interfaces, mkILMethods ([ilCtorDef] @ ilCtorDefNoArgs @ serializationRelatedMembers @ ilMethodDefsForProperties), mkILFields ilFieldDefs, - emptyILTypeDefs, + emptyILTypeDefs, mkILProperties ilPropertyDefs, emptyILEvents, mkILCustomAttrs [mkCompilationMappingAttr cenv.g (int SourceConstructFlags.Exception)], @@ -7178,26 +7347,26 @@ and GenExnDef cenv mgbuf eenv m (exnc:Tycon) = mgbuf.AddTypeDef(tref, tdef, false, false, None) -let CodegenAssembly cenv eenv mgbuf fileImpls = - if not (isNil fileImpls) then - let a,b = List.frontAndBack fileImpls +let CodegenAssembly cenv eenv mgbuf fileImpls = + if not (isNil fileImpls) then + let a, b = List.frontAndBack fileImpls let eenv = List.fold (GenTopImpl cenv mgbuf None) eenv a let eenv = GenTopImpl cenv mgbuf cenv.opts.mainMethodInfo eenv b - // Some constructs generate residue types and bindings. Generate these now. They don't result in any + // Some constructs generate residue types and bindings. Generate these now. They don't result in any // top-level initialization code. - begin + begin let extraBindings = mgbuf.GrabExtraBindingsToGenerate() //printfn "#extraBindings = %d" extraBindings.Length - if extraBindings.Length > 0 then - let mexpr = TMDefs [ for b in extraBindings -> TMDefLet(b,range0) ] - let _emptyTopInstrs,_emptyTopCode = - CodeGenMethod cenv mgbuf ([],"unused",eenv,0, (fun cgbuf eenv -> + if extraBindings.Length > 0 then + let mexpr = TMDefs [ for b in extraBindings -> TMDefLet(b, range0) ] + let _emptyTopInstrs, _emptyTopCode = + CodeGenMethod cenv mgbuf ([], "unused", eenv, 0, (fun cgbuf eenv -> let lazyInitInfo = ResizeArray() let qname = QualifiedNameOfFile(mkSynId range0 "unused") LocalScope "module" cgbuf (fun scopeMarks -> let eenv = AddBindingsForModuleDef (fun cloc v -> AllocTopValWithinExpr cenv cgbuf cloc scopeMarks v) eenv.cloc eenv mexpr - GenModuleDef cenv cgbuf qname lazyInitInfo eenv mexpr)),range0) + GenModuleDef cenv cgbuf qname lazyInitInfo eenv mexpr)), range0) //printfn "#_emptyTopInstrs = %d" _emptyTopInstrs.Length () end @@ -7205,15 +7374,15 @@ let CodegenAssembly cenv eenv mgbuf fileImpls = mgbuf.AddInitializeScriptsInOrderToEntryPoint() //------------------------------------------------------------------------- -// When generating a module we just write into mutable -// structures representing the contents of the module. -//------------------------------------------------------------------------- +// When generating a module we just write into mutable +// structures representing the contents of the module. +//------------------------------------------------------------------------- -let GetEmptyIlxGenEnv (ilg : ILGlobals) ccu = +let GetEmptyIlxGenEnv (ilg: ILGlobals) ccu = let thisCompLoc = CompLocForCcu ccu { tyenv=TypeReprEnv.Empty cloc = thisCompLoc - valsInScope=ValMap<_>.Empty + valsInScope=ValMap<_>.Empty someTypeInThisAssembly=ilg.typ_Object (* dummy value *) isFinalFile = false letBoundVars=[] @@ -7222,12 +7391,12 @@ let GetEmptyIlxGenEnv (ilg : ILGlobals) ccu = sigToImplRemapInfo = [] (* "module remap info" *) withinSEH = false } -type IlxGenResults = +type IlxGenResults = { ilTypeDefs: ILTypeDef list - ilAssemAttrs : ILAttribute list + ilAssemAttrs: ILAttribute list ilNetModuleAttrs: ILAttribute list - topAssemblyAttrs : Attribs - permissionSets : ILSecurityDecl list + topAssemblyAttrs: Attribs + permissionSets: ILSecurityDecl list quotationResourceInfo: (ILTypeRef list * byte[]) list } @@ -7235,10 +7404,10 @@ let GenerateCode (cenv, anonTypeTable, eenv, TypedAssemblyAfterOptimization file use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.IlxGen - // Generate the implementations into the mgbuf + // Generate the implementations into the mgbuf let mgbuf = new AssemblyBuilder(cenv, anonTypeTable) let eenv = { eenv with cloc = CompLocForFragment cenv.opts.fragName cenv.viewCcu } - + // Generate the PrivateImplementationDetails type GenTypeDefForCompLoc (cenv, eenv, mgbuf, CompLocForPrivateImplementationDetails eenv.cloc, useHiddenInitCode, [], ILTypeInit.BeforeField, true, (* atEnd= *) true) @@ -7246,39 +7415,39 @@ let GenerateCode (cenv, anonTypeTable, eenv, TypedAssemblyAfterOptimization file CodegenAssembly cenv eenv mgbuf fileImpls let ilAssemAttrs = GenAttrs cenv eenv assemAttribs - - let tdefs,reflectedDefinitions = mgbuf.Close() + + let tdefs, reflectedDefinitions = mgbuf.Close() // Generate the quotations - let quotationResourceInfo = - match reflectedDefinitions with + let quotationResourceInfo = + match reflectedDefinitions with | [] -> [] - | _ -> + | _ -> let qscope = QuotationTranslator.QuotationGenerationScope.Create (cenv.g, cenv.amap, cenv.viewCcu, QuotationTranslator.IsReflectedDefinition.Yes) - let defns = - reflectedDefinitions |> List.choose (fun ((methName, v),e) -> - try + let defns = + reflectedDefinitions |> List.choose (fun ((methName, v), e) -> + try let ety = tyOfExpr cenv.g e - let tps,taue,_ = - match e with - | Expr.TyLambda (_,tps,b,_,_) -> tps,b,applyForallTy cenv.g ety (List.map mkTyparTy tps) - | _ -> [],e,ety + let tps, taue, _ = + match e with + | Expr.TyLambda (_, tps, b, _, _) -> tps, b, applyForallTy cenv.g ety (List.map mkTyparTy tps) + | _ -> [], e, ety let env = QuotationTranslator.QuotationTranslationEnv.Empty.BindTypars tps let astExpr = QuotationTranslator.ConvExprPublic qscope env taue let mbaseR = QuotationTranslator.ConvMethodBase qscope env (methName, v) - - Some(mbaseR,astExpr) - with + + Some(mbaseR, astExpr) + with | QuotationTranslator.InvalidQuotedTerm e -> warning(e); None) let referencedTypeDefs, freeTypes, spliceArgExprs = qscope.Close() - for (_freeType, m) in freeTypes do - error(InternalError("A free type variable was detected in a reflected definition",m)) + for (_freeType, m) in freeTypes do + error(InternalError("A free type variable was detected in a reflected definition", m)) - for (_spliceArgExpr, m) in spliceArgExprs do - error(Error(FSComp.SR.ilReflectedDefinitionsCannotUseSliceOperator(),m)) + for (_spliceArgExpr, m) in spliceArgExprs do + error(Error(FSComp.SR.ilReflectedDefinitionsCannotUseSliceOperator(), m)) let defnsResourceBytes = defns |> QuotationPickler.PickleDefns @@ -7297,42 +7466,42 @@ let GenerateCode (cenv, anonTypeTable, eenv, TypedAssemblyAfterOptimization file topAssemblyAttrs = topAssemblyAttrs permissionSets = permissionSets quotationResourceInfo = quotationResourceInfo } - + //------------------------------------------------------------------------- // For printing values in fsi we want to lookup the value of given vrefs. // The storage in the eenv says if the vref is stored in a static field. // If we know how/where the field was generated, then we can lookup via reflection. -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- open System open System.Reflection /// The lookup* functions are the conversions available from ilreflect. type ExecutionContext = - { LookupFieldRef : (ILFieldRef -> FieldInfo) - LookupMethodRef : (ILMethodRef -> MethodInfo) - LookupTypeRef : (ILTypeRef -> Type) - LookupType : (ILType -> Type) } + { LookupFieldRef: (ILFieldRef -> FieldInfo) + LookupMethodRef: (ILMethodRef -> MethodInfo) + LookupTypeRef: (ILTypeRef -> Type) + LookupType: (ILType -> Type) } #if !FABLE_COMPILER // A helper to generate a default value for any System.Type. I couldn't find a System.Reflection // method to do this. -let defaultOf = - let gminfo = - lazy - (match <@@ Unchecked.defaultof @@> with - | Quotations.Patterns.Call(_,minfo,_) -> minfo.GetGenericMethodDefinition() +let defaultOf = + let gminfo = + lazy + (match <@@ Unchecked.defaultof @@> with + | Quotations.Patterns.Call(_, minfo, _) -> minfo.GetGenericMethodDefinition() | _ -> failwith "unexpected failure decoding quotation at ilxgen startup") - fun ty -> gminfo.Value.MakeGenericMethod([| ty |]).Invoke(null,[| |]) - + fun ty -> gminfo.Value.MakeGenericMethod([| ty |]).Invoke(null, [| |]) + /// Top-level val bindings are stored (for example) in static fields. /// In the FSI case, these fields are be created and initialised, so we can recover the object. /// IlxGen knows how v was stored, and then ilreflect knows how this storage was generated. -/// IlxGen converts (v:Tast.Val) to AbsIL datastructures. +/// IlxGen converts (v: Tast.Val) to AbsIL datastructures. /// Ilreflect converts from AbsIL datastructures to emitted Type, FieldInfo, MethodInfo etc. -let LookupGeneratedValue (amap:ImportMap) (ctxt: ExecutionContext) eenv (v:Val) = +let LookupGeneratedValue (amap: ImportMap) (ctxt: ExecutionContext) eenv (v: Val) = try // Convert the v.Type into a System.Type according to ilxgen and ilreflect. let objTyp() = @@ -7345,15 +7514,15 @@ let LookupGeneratedValue (amap:ImportMap) (ctxt: ExecutionContext) eenv (v:Val) if hasLiteralAttr then let staticTy = ctxt.LookupTypeRef fspec.DeclaringTypeRef // Checked: This FieldInfo (FieldBuilder) supports GetValue(). - staticTy.GetField(fspec.Name).GetValue(null:obj) + staticTy.GetField(fspec.Name).GetValue(null: obj) else let staticTy = ctxt.LookupTypeRef ilContainerTy.TypeRef // We can't call .Invoke on the ILMethodRef's MethodInfo, // because it is the MethodBuilder and that does not support Invoke. // Rather, we look for the getter MethodInfo from the built type and .Invoke on that. let methInfo = staticTy.GetMethod(ilGetterMethRef.Name, BindingFlags.Static ||| BindingFlags.Public ||| BindingFlags.NonPublic) - methInfo.Invoke((null:obj),(null:obj[])) - Some (obj,objTyp()) + methInfo.Invoke((null: obj), (null: obj[])) + Some (obj, objTyp()) | StaticProperty (ilGetterMethSpec, _) -> let obj = @@ -7362,28 +7531,28 @@ let LookupGeneratedValue (amap:ImportMap) (ctxt: ExecutionContext) eenv (v:Val) // because it is the MethodBuilder and that does not support Invoke. // Rather, we look for the getter MethodInfo from the built type and .Invoke on that. let methInfo = staticTy.GetMethod(ilGetterMethSpec.Name, BindingFlags.Static ||| BindingFlags.Public ||| BindingFlags.NonPublic) - methInfo.Invoke((null:obj),(null:obj[])) - Some (obj,objTyp()) + methInfo.Invoke((null: obj), (null: obj[])) + Some (obj, objTyp()) | Null -> - Some (null,objTyp()) - | Local _ -> None + Some (null, objTyp()) + | Local _ -> None | Method _ -> None | Arg _ -> None | Env _ -> None with e -> -#if DEBUG +#if DEBUG printf "ilxGen.LookupGeneratedValue for v=%s caught exception:\n%A\n\n" v.LogicalName e -#endif +#endif None - + // Invoke the set_Foo method for a declaration with a default/null value. Used to release storage in fsi.exe -let ClearGeneratedValue (ctxt: ExecutionContext) (_g:TcGlobals) eenv (v:Val) = +let ClearGeneratedValue (ctxt: ExecutionContext) (_g: TcGlobals) eenv (v: Val) = try match StorageForVal v.Range v eenv with | StaticField (fspec, _, hasLiteralAttr, _, _, _, _ilGetterMethRef, ilSetterMethRef, _) -> - if not hasLiteralAttr && v.IsMutable then + if not hasLiteralAttr && v.IsMutable then let staticTy = ctxt.LookupTypeRef ilSetterMethRef.DeclaringTypeRef let ty = ctxt.LookupType fspec.ActualType @@ -7392,34 +7561,34 @@ let ClearGeneratedValue (ctxt: ExecutionContext) (_g:TcGlobals) eenv (v:Val) = | _ -> () with e -> -#if DEBUG +#if DEBUG printf "ilxGen.ClearGeneratedValue for v=%s caught exception:\n%A\n\n" v.LogicalName e -#endif +#endif () #endif //!FABLE_COMPILER /// The published API from the ILX code generator -type IlxAssemblyGenerator(amap: ImportMap, tcGlobals: TcGlobals, tcVal : ConstraintSolver.TcValF, ccu: Tast.CcuThunk) = - +type IlxAssemblyGenerator(amap: ImportMap, tcGlobals: TcGlobals, tcVal: ConstraintSolver.TcValF, ccu: Tast.CcuThunk) = + // The incremental state held by the ILX code generator let mutable ilxGenEnv = GetEmptyIlxGenEnv tcGlobals.ilg ccu let anonTypeTable = AnonTypeGenerationTable() - let intraAssemblyInfo = { StaticFieldInfo = new Dictionary<_,_>(HashIdentity.Structural) } - let casApplied = new Dictionary() + let intraAssemblyInfo = { StaticFieldInfo = new Dictionary<_, _>(HashIdentity.Structural) } + let casApplied = new Dictionary() /// Register a set of referenced assemblies with the ILX code generator - member __.AddExternalCcus ccus = + member __.AddExternalCcus ccus = ilxGenEnv <- AddExternalCcusToIlxGenEnv amap tcGlobals ilxGenEnv ccus /// 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' - member __.AddIncrementalLocalAssemblyFragment (isIncrementalFragment, fragName, typedImplFiles) = + member __.AddIncrementalLocalAssemblyFragment (isIncrementalFragment, fragName, typedImplFiles) = ilxGenEnv <- AddIncrementalLocalAssemblyFragmentToIlxGenEnv (amap, isIncrementalFragment, tcGlobals, ccu, fragName, intraAssemblyInfo, ilxGenEnv, typedImplFiles) /// Generate ILX code for an assembly fragment - member __.GenerateCode (codeGenOpts, typedAssembly, assemAttribs, moduleAttribs) = - let cenv : cenv = + member __.GenerateCode (codeGenOpts, typedAssembly, assemAttribs, moduleAttribs) = + let cenv: cenv = { g=tcGlobals TcVal = tcVal viewCcu = ccu @@ -7427,7 +7596,7 @@ type IlxAssemblyGenerator(amap: ImportMap, tcGlobals: TcGlobals, tcVal : Constra amap = amap casApplied = casApplied intraAssemblyInfo = intraAssemblyInfo - opts = codeGenOpts + opts = codeGenOpts optimizeDuringCodeGen = (fun x -> x) } GenerateCode (cenv, anonTypeTable, ilxGenEnv, typedAssembly, assemAttribs, moduleAttribs) diff --git a/src/fcs-fable/src/fsharp/IlxGen.fsi b/src/fcs-fable/src/fsharp/IlxGen.fsi index 611d90a870..432f785eef 100755 --- a/src/fcs-fable/src/fsharp/IlxGen.fsi +++ b/src/fcs-fable/src/fsharp/IlxGen.fsi @@ -102,4 +102,6 @@ type public IlxAssemblyGenerator = val ReportStatistics : TextWriter -> unit -val IsValCompiledAsMethod : TcGlobals -> Val -> bool + +/// Determine if an F#-declared value, method or function is compiled as a method. +val IsFSharpValCompiledAsMethod : TcGlobals -> Val -> bool diff --git a/src/fcs-fable/src/fsharp/InfoReader.fs b/src/fcs-fable/src/fsharp/InfoReader.fs index 23544c6120..2a2bfd7ea6 100644 --- a/src/fcs-fable/src/fsharp/InfoReader.fs +++ b/src/fcs-fable/src/fsharp/InfoReader.fs @@ -8,7 +8,6 @@ open System.Collections.Generic open FSharp.Compiler.AbstractIL.IL open FSharp.Compiler.AbstractIL.Internal.Library - open FSharp.Compiler open FSharp.Compiler.AccessibilityLogic open FSharp.Compiler.Ast @@ -21,8 +20,8 @@ open FSharp.Compiler.Tastops open FSharp.Compiler.TcGlobals /// Use the given function to select some of the member values from the members of an F# type -let private SelectImmediateMemberVals g optFilter f (tcref:TyconRef) = - let chooser (vref:ValRef) = +let private SelectImmediateMemberVals g optFilter f (tcref: TyconRef) = + let chooser (vref: ValRef) = match vref.MemberInfo with // The 'when' condition is a workaround for the fact that values providing // override and interface implementations are published in inferred module types @@ -39,16 +38,16 @@ let private SelectImmediateMemberVals g optFilter f (tcref:TyconRef) = | Some nm -> tcref.MembersOfFSharpTyconByName |> NameMultiMap.find nm |> List.choose chooser /// Check whether a name matches an optional filter -let private checkFilter optFilter (nm:string) = match optFilter with None -> true | Some n2 -> nm = n2 +let private checkFilter optFilter (nm: string) = match optFilter with None -> true | Some n2 -> nm = n2 /// Try to select an F# value when querying members, and if so return a MethInfo that wraps the F# value. -let TrySelectMemberVal g optFilter ty pri _membInfo (vref:ValRef) = +let TrySelectMemberVal g optFilter ty pri _membInfo (vref: ValRef) = if checkFilter optFilter vref.LogicalName then - Some(FSMeth(g,ty,vref,pri)) + Some(FSMeth(g, ty, vref, pri)) else None -let rec GetImmediateIntrinsicMethInfosOfTypeAux (optFilter,ad) g amap m origTy metadataTy = +let rec GetImmediateIntrinsicMethInfosOfTypeAux (optFilter, ad) g amap m origTy metadataTy = let minfos = match metadataOfTy g metadataTy with @@ -72,12 +71,12 @@ let rec GetImmediateIntrinsicMethInfosOfTypeAux (optFilter,ad) g amap m origTy m // In this case convert to the .NET Tuple type that carries metadata and try again if isAnyTupleTy g metadataTy then let betterMetadataTy = convertToTypeWithMetadataIfPossible g metadataTy - GetImmediateIntrinsicMethInfosOfTypeAux (optFilter,ad) g amap m origTy betterMetadataTy - // Function types support methods FSharpFunc<_,_>.FromConverter and friends from .NET metadata, + GetImmediateIntrinsicMethInfosOfTypeAux (optFilter, ad) g amap m origTy betterMetadataTy + // Function types support methods FSharpFunc<_, _>.FromConverter and friends from .NET metadata, // but not instance methods (you can't write "f.Invoke(x)", you have to write "f x") elif isFunTy g metadataTy then let betterMetadataTy = convertToTypeWithMetadataIfPossible g metadataTy - GetImmediateIntrinsicMethInfosOfTypeAux (optFilter,ad) g amap m origTy betterMetadataTy + GetImmediateIntrinsicMethInfosOfTypeAux (optFilter, ad) g amap m origTy betterMetadataTy |> List.filter (fun minfo -> not minfo.IsInstance) else match tryDestAppTy g metadataTy with @@ -89,8 +88,8 @@ let rec GetImmediateIntrinsicMethInfosOfTypeAux (optFilter,ad) g amap m origTy m /// 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. -let GetImmediateIntrinsicMethInfosOfType (optFilter,ad) g amap m ty = - GetImmediateIntrinsicMethInfosOfTypeAux (optFilter,ad) g amap m ty ty +let GetImmediateIntrinsicMethInfosOfType (optFilter, ad) g amap m ty = + GetImmediateIntrinsicMethInfosOfTypeAux (optFilter, ad) g amap m ty ty /// A helper type to help collect properties. /// @@ -99,19 +98,19 @@ type PropertyCollector(g, amap, m, ty, optFilter, ad) = let hashIdentity = HashIdentity.FromFunctions - (fun (pinfo:PropInfo) -> hash pinfo.PropertyName) + (fun (pinfo: PropInfo) -> hash pinfo.PropertyName) (fun pinfo1 pinfo2 -> pinfo1.IsStatic = pinfo2.IsStatic && PropInfosEquivByNameAndPartialSig EraseNone g amap m pinfo1 pinfo2 && pinfo1.IsDefiniteFSharpOverride = pinfo2.IsDefiniteFSharpOverride ) - let props = new Dictionary(hashIdentity) + let props = new Dictionary(hashIdentity) let add pinfo = match props.TryGetValue(pinfo), pinfo with - | (true, FSProp (_, ty, Some vref1 ,_)), FSProp (_, _, _, Some vref2) + | (true, FSProp (_, ty, Some vref1, _)), FSProp (_, _, _, Some vref2) | (true, FSProp (_, ty, _, Some vref2)), FSProp (_, _, Some vref1, _) -> - let pinfo = FSProp (g,ty,Some vref1,Some vref2) + let pinfo = FSProp (g, ty, Some vref1, Some vref2) props.[pinfo] <- pinfo | (true, _), _ -> // This assert fires while editing bad code. We will give a warning later in check.fs @@ -120,22 +119,22 @@ type PropertyCollector(g, amap, m, ty, optFilter, ad) = | _ -> props.[pinfo] <- pinfo - member x.Collect(membInfo:ValMemberInfo,vref:ValRef) = + member x.Collect(membInfo: ValMemberInfo, vref: ValRef) = match membInfo.MemberFlags.MemberKind with | MemberKind.PropertyGet -> - let pinfo = FSProp(g,ty,Some vref,None) + let pinfo = FSProp(g, ty, Some vref, None) if checkFilter optFilter vref.PropertyName && IsPropInfoAccessible g amap m ad pinfo then add pinfo | MemberKind.PropertySet -> - let pinfo = FSProp(g,ty,None,Some vref) + let pinfo = FSProp(g, ty, None, Some vref) if checkFilter optFilter vref.PropertyName && IsPropInfoAccessible g amap m ad pinfo then add pinfo | _ -> () - member x.Close() = [ for KeyValue(_,pinfo) in props -> pinfo ] + member x.Close() = [ for KeyValue(_, pinfo) in props -> pinfo ] -let rec GetImmediateIntrinsicPropInfosOfTypeAux (optFilter,ad) g amap m origTy metadataTy = +let rec GetImmediateIntrinsicPropInfosOfTypeAux (optFilter, ad) g amap m origTy metadataTy = let pinfos = match metadataOfTy g metadataTy with @@ -166,7 +165,7 @@ let rec GetImmediateIntrinsicPropInfosOfTypeAux (optFilter,ad) g amap m origTy m // In this case convert to the .NET Tuple type that carries metadata and try again if isAnyTupleTy g metadataTy || isFunTy g metadataTy then let betterMetadataTy = convertToTypeWithMetadataIfPossible g metadataTy - GetImmediateIntrinsicPropInfosOfTypeAux (optFilter,ad) g amap m origTy betterMetadataTy + GetImmediateIntrinsicPropInfosOfTypeAux (optFilter, ad) g amap m origTy betterMetadataTy else match tryDestAppTy g metadataTy with | ValueNone -> [] @@ -180,8 +179,8 @@ let rec GetImmediateIntrinsicPropInfosOfTypeAux (optFilter,ad) g amap m origTy m /// 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. -let rec GetImmediateIntrinsicPropInfosOfType (optFilter,ad) g amap m ty = - GetImmediateIntrinsicPropInfosOfTypeAux (optFilter,ad) g amap m ty ty +let rec GetImmediateIntrinsicPropInfosOfType (optFilter, ad) g amap m ty = + GetImmediateIntrinsicPropInfosOfTypeAux (optFilter, ad) g amap m ty ty // Checks whether the given type has an indexer property. let IsIndexerType g amap ty = @@ -218,17 +217,17 @@ type InfoReader(g: TcGlobals, amap: Import.ImportMap) = let st = info.ProvidedType match optFilter with | None -> - [ for fi in st.PApplyArray((fun st -> st.GetFields()), "GetFields" , m) -> ProvidedField(amap,fi,m) ] + [ for fi in st.PApplyArray((fun st -> st.GetFields()), "GetFields", m) -> ProvidedField(amap, fi, m) ] | Some name -> match st.PApply ((fun st -> st.GetField name), m) with | Tainted.Null -> [] - | fi -> [ ProvidedField(amap,fi,m) ] + | fi -> [ ProvidedField(amap, fi, m) ] #endif | ILTypeMetadata _ -> let tinfo = ILTypeInfo.FromType g ty let fdefs = tinfo.RawMetadata.Fields let fdefs = match optFilter with None -> fdefs.AsList | Some nm -> fdefs.LookupByName nm - fdefs |> List.map (fun pd -> ILFieldInfo(tinfo,pd)) + fdefs |> List.map (fun pd -> ILFieldInfo(tinfo, pd)) | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> [] let infos = infos |> List.filter (IsILFieldInfoAccessible g amap m ad) @@ -243,18 +242,18 @@ type InfoReader(g: TcGlobals, amap: Import.ImportMap) = let st = info.ProvidedType match optFilter with | None -> - [ for ei in st.PApplyArray((fun st -> st.GetEvents()), "GetEvents" , m) -> ProvidedEvent(amap,ei,m) ] + [ for ei in st.PApplyArray((fun st -> st.GetEvents()), "GetEvents", m) -> ProvidedEvent(amap, ei, m) ] | Some name -> match st.PApply ((fun st -> st.GetEvent name), m) with | Tainted.Null -> [] - | ei -> [ ProvidedEvent(amap,ei,m) ] + | ei -> [ ProvidedEvent(amap, ei, m) ] #endif | ILTypeMetadata _ -> let tinfo = ILTypeInfo.FromType g ty let edefs = tinfo.RawMetadata.Events let edefs = match optFilter with None -> edefs.AsList | Some nm -> edefs.LookupByName nm [ for edef in edefs do - let ileinfo = ILEventInfo(tinfo,edef) + let ileinfo = ILEventInfo(tinfo, edef) if IsILEventInfoAccessible g amap m ad ileinfo then yield ILEvent ileinfo ] | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> @@ -262,8 +261,8 @@ type InfoReader(g: TcGlobals, amap: Import.ImportMap) = infos /// Make a reference to a record or class field - let MakeRecdFieldInfo g ty (tcref:TyconRef) fspec = - RecdFieldInfo(argsOfAppTy g ty,tcref.MakeNestedRecdFieldRef fspec) + let MakeRecdFieldInfo g ty (tcref: TyconRef) fspec = + RecdFieldInfo(argsOfAppTy g ty, tcref.MakeNestedRecdFieldRef fspec) /// Get the F#-declared record fields or class 'val' fields of a type let GetImmediateIntrinsicRecdOrClassFieldsOfType (optFilter, _ad) _m ty = @@ -284,38 +283,38 @@ type InfoReader(g: TcGlobals, amap: Import.ImportMap) = /// The primitive reader for the method info sets up a hierarchy - let GetIntrinsicMethodSetsUncached ((optFilter,ad,allowMultiIntfInst),m,ty) = - FoldPrimaryHierarchyOfType (fun ty acc -> GetImmediateIntrinsicMethInfosOfType (optFilter,ad) g amap m ty :: acc) g amap m allowMultiIntfInst ty [] + let GetIntrinsicMethodSetsUncached ((optFilter, ad, allowMultiIntfInst), m, ty) = + FoldPrimaryHierarchyOfType (fun ty acc -> GetImmediateIntrinsicMethInfosOfType (optFilter, ad) g amap m ty :: acc) g amap m allowMultiIntfInst ty [] /// The primitive reader for the property info sets up a hierarchy - let GetIntrinsicPropertySetsUncached ((optFilter,ad,allowMultiIntfInst),m,ty) = - FoldPrimaryHierarchyOfType (fun ty acc -> GetImmediateIntrinsicPropInfosOfType (optFilter,ad) g amap m ty :: acc) g amap m allowMultiIntfInst ty [] + let GetIntrinsicPropertySetsUncached ((optFilter, ad, allowMultiIntfInst), m, ty) = + FoldPrimaryHierarchyOfType (fun ty acc -> GetImmediateIntrinsicPropInfosOfType (optFilter, ad) g amap m ty :: acc) g amap m allowMultiIntfInst ty [] - let GetIntrinsicILFieldInfosUncached ((optFilter,ad),m,ty) = - FoldPrimaryHierarchyOfType (fun ty acc -> GetImmediateIntrinsicILFieldsOfType (optFilter,ad) m ty @ acc) g amap m AllowMultiIntfInstantiations.Yes ty [] + let GetIntrinsicILFieldInfosUncached ((optFilter, ad), m, ty) = + FoldPrimaryHierarchyOfType (fun ty acc -> GetImmediateIntrinsicILFieldsOfType (optFilter, ad) m ty @ acc) g amap m AllowMultiIntfInstantiations.Yes ty [] - let GetIntrinsicEventInfosUncached ((optFilter,ad),m,ty) = - FoldPrimaryHierarchyOfType (fun ty acc -> ComputeImmediateIntrinsicEventsOfType (optFilter,ad) m ty @ acc) g amap m AllowMultiIntfInstantiations.Yes ty [] + let GetIntrinsicEventInfosUncached ((optFilter, ad), m, ty) = + FoldPrimaryHierarchyOfType (fun ty acc -> ComputeImmediateIntrinsicEventsOfType (optFilter, ad) m ty @ acc) g amap m AllowMultiIntfInstantiations.Yes ty [] - let GetIntrinsicRecdOrClassFieldInfosUncached ((optFilter,ad),m,ty) = - FoldPrimaryHierarchyOfType (fun ty acc -> GetImmediateIntrinsicRecdOrClassFieldsOfType (optFilter,ad) m ty @ acc) g amap m AllowMultiIntfInstantiations.Yes ty [] + let GetIntrinsicRecdOrClassFieldInfosUncached ((optFilter, ad), m, ty) = + FoldPrimaryHierarchyOfType (fun ty acc -> GetImmediateIntrinsicRecdOrClassFieldsOfType (optFilter, ad) m ty @ acc) g amap m AllowMultiIntfInstantiations.Yes ty [] - let GetEntireTypeHierachyUncached (allowMultiIntfInst,m,ty) = + let GetEntireTypeHierachyUncached (allowMultiIntfInst, m, ty) = FoldEntireHierarchyOfType (fun ty acc -> ty :: acc) g amap m allowMultiIntfInst ty [] - let GetPrimaryTypeHierachyUncached (allowMultiIntfInst,m,ty) = + let GetPrimaryTypeHierachyUncached (allowMultiIntfInst, m, ty) = FoldPrimaryHierarchyOfType (fun ty acc -> ty :: acc) g amap m allowMultiIntfInst ty [] /// The primitive reader for the named items up a hierarchy - let GetIntrinsicNamedItemsUncached ((nm,ad),m,ty) = + let GetIntrinsicNamedItemsUncached ((nm, ad), m, ty) = if nm = ".ctor" then None else // '.ctor' lookups only ever happen via constructor syntax let optFilter = Some nm FoldPrimaryHierarchyOfType (fun ty acc -> - let minfos = GetImmediateIntrinsicMethInfosOfType (optFilter,ad) g amap m ty - let pinfos = GetImmediateIntrinsicPropInfosOfType (optFilter,ad) g amap m ty - let finfos = GetImmediateIntrinsicILFieldsOfType (optFilter,ad) m ty - let einfos = ComputeImmediateIntrinsicEventsOfType (optFilter,ad) m ty - let rfinfos = GetImmediateIntrinsicRecdOrClassFieldsOfType (optFilter,ad) m ty + let minfos = GetImmediateIntrinsicMethInfosOfType (optFilter, ad) g amap m ty + let pinfos = GetImmediateIntrinsicPropInfosOfType (optFilter, ad) g amap m ty + let finfos = GetImmediateIntrinsicILFieldsOfType (optFilter, ad) m ty + let einfos = ComputeImmediateIntrinsicEventsOfType (optFilter, ad) m ty + let rfinfos = GetImmediateIntrinsicRecdOrClassFieldsOfType (optFilter, ad) m ty match acc with | Some(MethodItem(inheritedMethSets)) when not (isNil minfos) -> Some(MethodItem (minfos::inheritedMethSets)) | _ when not (isNil minfos) -> Some(MethodItem ([minfos])) @@ -337,47 +336,47 @@ type InfoReader(g: TcGlobals, amap: Import.ImportMap) = /// caches computations for monomorphic types. let MakeInfoCache f (flagsEq : System.Collections.Generic.IEqualityComparer<_>) = - new MemoizationTable<_,_> + new MemoizationTable<_, _> (compute=f, // Only cache closed, monomorphic types (closed = all members for the type // have been processed). Generic type instantiations could be processed if we had // a decent hash function for these. - canMemoize=(fun (_flags,(_:range),ty) -> + canMemoize=(fun (_flags, (_: range), ty) -> match stripTyEqns g ty with - | TType_app(tcref,[]) -> tcref.TypeContents.tcaug_closed + | TType_app(tcref, []) -> tcref.TypeContents.tcaug_closed | _ -> false), keyComparer= { new System.Collections.Generic.IEqualityComparer<_> with - member x.Equals((flags1,_,typ1),(flags2,_,typ2)) = + member x.Equals((flags1, _, typ1), (flags2, _, typ2)) = // Ignoring the ranges - that's OK. - flagsEq.Equals(flags1,flags2) && + flagsEq.Equals(flags1, flags2) && match stripTyEqns g typ1, stripTyEqns g typ2 with - | TType_app(tcref1,[]),TType_app(tcref2,[]) -> tyconRefEq g tcref1 tcref2 + | TType_app(tcref1, []), TType_app(tcref2, []) -> tyconRefEq g tcref1 tcref2 | _ -> false - member x.GetHashCode((flags,_,ty)) = + member x.GetHashCode((flags, _, ty)) = // Ignoring the ranges - that's OK. flagsEq.GetHashCode flags + (match stripTyEqns g ty with - | TType_app(tcref,[]) -> hash tcref.LogicalName + | TType_app(tcref, []) -> hash tcref.LogicalName | _ -> 0) }) let hashFlags0 = { new System.Collections.Generic.IEqualityComparer<_> with member x.GetHashCode((filter: string option, ad: AccessorDomain, _allowMultiIntfInst1)) = hash filter + AccessorDomain.CustomGetHashCode ad - member x.Equals((filter1, ad1, allowMultiIntfInst1), (filter2,ad2, allowMultiIntfInst2)) = - (filter1 = filter2) && AccessorDomain.CustomEquals(g,ad1,ad2) && allowMultiIntfInst1 = allowMultiIntfInst2 } + member x.Equals((filter1, ad1, allowMultiIntfInst1), (filter2, ad2, allowMultiIntfInst2)) = + (filter1 = filter2) && AccessorDomain.CustomEquals(g, ad1, ad2) && allowMultiIntfInst1 = allowMultiIntfInst2 } let hashFlags1 = { new System.Collections.Generic.IEqualityComparer<_> with - member x.GetHashCode((filter: string option,ad: AccessorDomain)) = hash filter + AccessorDomain.CustomGetHashCode ad - member x.Equals((filter1,ad1), (filter2,ad2)) = (filter1 = filter2) && AccessorDomain.CustomEquals(g,ad1,ad2) } + member x.GetHashCode((filter: string option, ad: AccessorDomain)) = hash filter + AccessorDomain.CustomGetHashCode ad + member x.Equals((filter1, ad1), (filter2, ad2)) = (filter1 = filter2) && AccessorDomain.CustomEquals(g, ad1, ad2) } let hashFlags2 = { new System.Collections.Generic.IEqualityComparer<_> with - member x.GetHashCode((nm: string,ad: AccessorDomain)) = hash nm + AccessorDomain.CustomGetHashCode ad - member x.Equals((nm1,ad1), (nm2,ad2)) = (nm1 = nm2) && AccessorDomain.CustomEquals(g,ad1,ad2) } + member x.GetHashCode((nm: string, ad: AccessorDomain)) = hash nm + AccessorDomain.CustomGetHashCode ad + member x.Equals((nm1, ad1), (nm2, ad2)) = (nm1 = nm2) && AccessorDomain.CustomEquals(g, ad1, ad2) } let methodInfoCache = MakeInfoCache GetIntrinsicMethodSetsUncached hashFlags0 let propertyInfoCache = MakeInfoCache GetIntrinsicPropertySetsUncached hashFlags0 @@ -393,30 +392,30 @@ type InfoReader(g: TcGlobals, amap: Import.ImportMap) = member x.amap = amap /// Read the raw method sets of a type, including inherited ones. Cache the result for monomorphic types - member x.GetRawIntrinsicMethodSetsOfType (optFilter,ad,allowMultiIntfInst,m,ty) = - methodInfoCache.Apply(((optFilter,ad,allowMultiIntfInst),m,ty)) + member x.GetRawIntrinsicMethodSetsOfType (optFilter, ad, allowMultiIntfInst, m, ty) = + methodInfoCache.Apply(((optFilter, ad, allowMultiIntfInst), m, ty)) /// Read the raw property sets of a type, including inherited ones. Cache the result for monomorphic types - member x.GetRawIntrinsicPropertySetsOfType (optFilter,ad,allowMultiIntfInst,m,ty) = - propertyInfoCache.Apply(((optFilter,ad,allowMultiIntfInst),m,ty)) + member x.GetRawIntrinsicPropertySetsOfType (optFilter, ad, allowMultiIntfInst, m, ty) = + propertyInfoCache.Apply(((optFilter, ad, allowMultiIntfInst), m, ty)) /// Read the record or class fields of a type, including inherited ones. Cache the result for monomorphic types. - member x.GetRecordOrClassFieldsOfType (optFilter,ad,m,ty) = - recdOrClassFieldInfoCache.Apply(((optFilter,ad),m,ty)) + member x.GetRecordOrClassFieldsOfType (optFilter, ad, m, ty) = + recdOrClassFieldInfoCache.Apply(((optFilter, ad), m, ty)) /// Read the IL fields of a type, including inherited ones. Cache the result for monomorphic types. - member x.GetILFieldInfosOfType (optFilter,ad,m,ty) = - ilFieldInfoCache.Apply(((optFilter,ad),m,ty)) + member x.GetILFieldInfosOfType (optFilter, ad, m, ty) = + ilFieldInfoCache.Apply(((optFilter, ad), m, ty)) - member x.GetImmediateIntrinsicEventsOfType (optFilter,ad,m,ty) = ComputeImmediateIntrinsicEventsOfType (optFilter,ad) m ty + member x.GetImmediateIntrinsicEventsOfType (optFilter, ad, m, ty) = ComputeImmediateIntrinsicEventsOfType (optFilter, ad) m ty /// Read the events of a type, including inherited ones. Cache the result for monomorphic types. - member x.GetEventInfosOfType (optFilter,ad,m,ty) = - eventInfoCache.Apply(((optFilter,ad),m,ty)) + member x.GetEventInfosOfType (optFilter, ad, m, ty) = + eventInfoCache.Apply(((optFilter, ad), m, ty)) /// Try and find a record or class field for a type. - member x.TryFindRecdOrClassFieldInfoOfType (nm,m,ty) = - match recdOrClassFieldInfoCache.Apply((Some nm,AccessibleFromSomewhere),m,ty) with + member x.TryFindRecdOrClassFieldInfoOfType (nm, m, ty) = + match recdOrClassFieldInfoCache.Apply((Some nm, AccessibleFromSomewhere), m, ty) with | [] -> ValueNone | [single] -> ValueSome single | flds -> @@ -431,20 +430,20 @@ type InfoReader(g: TcGlobals, amap: Import.ImportMap) = | _ -> failwith "unexpected multiple fields with same name" // Because it should have been already reported as duplicate fields /// Try and find an item with the given name in a type. - member x.TryFindNamedItemOfType (nm,ad,m,ty) = - namedItemsCache.Apply(((nm,ad),m,ty)) + member x.TryFindNamedItemOfType (nm, ad, m, ty) = + namedItemsCache.Apply(((nm, ad), m, ty)) /// Get the super-types of a type, including interface types. - member x.GetEntireTypeHierachy (allowMultiIntfInst,m,ty) = - entireTypeHierarchyCache.Apply((allowMultiIntfInst,m,ty)) + member x.GetEntireTypeHierachy (allowMultiIntfInst, m, ty) = + entireTypeHierarchyCache.Apply((allowMultiIntfInst, m, ty)) /// Get the super-types of a type, excluding interface types. - member x.GetPrimaryTypeHierachy (allowMultiIntfInst,m,ty) = - primaryTypeHierarchyCache.Apply((allowMultiIntfInst,m,ty)) + member x.GetPrimaryTypeHierachy (allowMultiIntfInst, m, ty) = + primaryTypeHierarchyCache.Apply((allowMultiIntfInst, m, ty)) /// Get the declared constructors of any F# type -let rec GetIntrinsicConstructorInfosOfTypeAux (infoReader:InfoReader) m origTy metadataTy = +let rec GetIntrinsicConstructorInfosOfTypeAux (infoReader: InfoReader) m origTy metadataTy = protectAssemblyExploration [] (fun () -> let g = infoReader.g let amap = infoReader.amap @@ -453,7 +452,7 @@ let rec GetIntrinsicConstructorInfosOfTypeAux (infoReader:InfoReader) m origTy m | ProvidedTypeMetadata info -> let st = info.ProvidedType [ for ci in st.PApplyArray((fun st -> st.GetConstructors()), "GetConstructors", m) do - yield ProvidedMeth(amap,ci.Coerce(m),None,m) ] + yield ProvidedMeth(amap, ci.Coerce(m), None, m) ] #endif | ILTypeMetadata _ -> let tinfo = ILTypeInfo.FromType g origTy @@ -510,10 +509,10 @@ type private IndexedList<'T>(itemLists: 'T list list, itemsByName: NameMultiMap< member x.ItemsWithName(nm) = NameMultiMap.find nm itemsByName /// Add new items, extracting the names using the given function. - member x.AddItems(items,nmf) = IndexedList<'T>(items::itemLists,List.foldBack (fun x acc -> NameMultiMap.add (nmf x) x acc) items itemsByName ) + member x.AddItems(items, nmf) = IndexedList<'T>(items::itemLists, List.foldBack (fun x acc -> NameMultiMap.add (nmf x) x acc) items itemsByName ) /// Get an empty set of items - static member Empty = IndexedList<'T>([],NameMultiMap.empty) + static member Empty = IndexedList<'T>([], NameMultiMap.empty) /// Filter a set of new items to add according to the content of the list. Only keep an item /// if it passes 'keepTest' for all matching items already in the list. @@ -541,17 +540,17 @@ let private FilterItemsInSubTypesBasedOnItemsInSuperTypes nmf keepTest itemLists | items :: itemsInSuperTypes -> let ilist = loop itemsInSuperTypes let itemsToAdd = ilist.FilterNewItems keepTest nmf items - ilist.AddItems(itemsToAdd,nmf) + ilist.AddItems(itemsToAdd, nmf) (loop itemLists).Items /// Add all the items to the IndexedList, preferring the ones in the sub-types. let private FilterItemsInSuperTypesBasedOnItemsInSubTypes nmf keepTest itemLists = - let rec loop itemLists (indexedItemsInSubTypes:IndexedList<_>) = + let rec loop itemLists (indexedItemsInSubTypes: IndexedList<_>) = match itemLists with | [] -> List.rev indexedItemsInSubTypes.Items | items :: itemsInSuperTypes -> let itemsToAdd = items |> List.filter (fun item -> keepTest item (indexedItemsInSubTypes.ItemsWithName(nmf item))) - let ilist = indexedItemsInSubTypes.AddItems(itemsToAdd,nmf) + let ilist = indexedItemsInSubTypes.AddItems(itemsToAdd, nmf) loop itemsInSuperTypes ilist loop itemLists IndexedList.Empty @@ -560,7 +559,7 @@ let private ExcludeItemsInSuperTypesBasedOnEquivTestWithItemsInSubTypes nmf equi FilterItemsInSuperTypesBasedOnItemsInSubTypes nmf (fun item1 items -> not (items |> List.exists (fun item2 -> equivTest item1 item2))) itemLists /// Filter the overrides of methods or properties, either keeping the overrides or keeping the dispatch slots. -let private FilterOverrides findFlag (isVirt:'a->bool,isNewSlot,isDefiniteOverride,isFinal,equivSigs,nmf:'a->string) items = +let private FilterOverrides findFlag (isVirt:'a->bool, isNewSlot, isDefiniteOverride, isFinal, equivSigs, nmf:'a->string) items = let equivVirts x y = isVirt x && isVirt y && equivSigs x y match findFlag with @@ -614,7 +613,7 @@ let private FilterOverrides findFlag (isVirt:'a->bool,isNewSlot,isDefiniteOverri // // type PD() = // inherit PC() - // override this.M(x:int) = () + // override this.M(x: int) = () |> FilterItemsInSuperTypesBasedOnItemsInSubTypes nmf (fun item1 superTypeItems -> not (isNewSlot item1 && @@ -626,7 +625,7 @@ let private FilterOverrides findFlag (isVirt:'a->bool,isNewSlot,isDefiniteOverri let private FilterOverridesOfMethInfos findFlag g amap m minfos = minfos |> FilterOverrides findFlag - ((fun (minfo:MethInfo) -> minfo.IsVirtual), + ((fun (minfo: MethInfo) -> minfo.IsVirtual), (fun minfo -> minfo.IsNewSlot), (fun minfo -> minfo.IsDefiniteFSharpOverride), (fun minfo -> minfo.IsFinal), @@ -637,15 +636,15 @@ let private FilterOverridesOfMethInfos findFlag g amap m minfos = let private FilterOverridesOfPropInfos findFlag g amap m props = props |> FilterOverrides findFlag - ((fun (pinfo:PropInfo) -> pinfo.IsVirtualProperty), + ((fun (pinfo: PropInfo) -> pinfo.IsVirtualProperty), (fun pinfo -> pinfo.IsNewSlot), (fun pinfo -> pinfo.IsDefiniteFSharpOverride), (fun _ -> false), - PropInfosEquivByNameAndSig EraseNone g amap m, + PropInfosEquivByNameAndSig EraseNone g amap m, (fun pinfo -> pinfo.PropertyName)) /// Exclude methods from super types which have the same signature as a method in a more specific type. -let ExcludeHiddenOfMethInfos g amap m (minfos:MethInfo list list) = +let ExcludeHiddenOfMethInfos g amap m (minfos: MethInfo list list) = minfos |> ExcludeItemsInSuperTypesBasedOnEquivTestWithItemsInSubTypes (fun minfo -> minfo.LogicalName) @@ -659,29 +658,29 @@ let ExcludeHiddenOfMethInfos g amap m (minfos:MethInfo list list) = /// Exclude properties from super types which have the same name as a property in a more specific type. let ExcludeHiddenOfPropInfos g amap m pinfos = pinfos - |> ExcludeItemsInSuperTypesBasedOnEquivTestWithItemsInSubTypes (fun (pinfo:PropInfo) -> pinfo.PropertyName) (PropInfosEquivByNameAndPartialSig EraseNone g amap m) + |> ExcludeItemsInSuperTypesBasedOnEquivTestWithItemsInSubTypes (fun (pinfo: PropInfo) -> pinfo.PropertyName) (PropInfosEquivByNameAndPartialSig EraseNone g amap m) |> List.concat /// Get the sets of intrinsic methods in the hierarchy (not including extension methods) -let GetIntrinsicMethInfoSetsOfType (infoReader:InfoReader) (optFilter,ad,allowMultiIntfInst) findFlag m ty = - infoReader.GetRawIntrinsicMethodSetsOfType(optFilter,ad,allowMultiIntfInst,m,ty) +let GetIntrinsicMethInfoSetsOfType (infoReader: InfoReader) (optFilter, ad, allowMultiIntfInst) findFlag m ty = + infoReader.GetRawIntrinsicMethodSetsOfType(optFilter, ad, allowMultiIntfInst, m, ty) |> FilterOverridesOfMethInfos findFlag infoReader.g infoReader.amap m /// Get the sets intrinsic properties in the hierarchy (not including extension properties) -let GetIntrinsicPropInfoSetsOfType (infoReader:InfoReader) (optFilter,ad,allowMultiIntfInst) findFlag m ty = - infoReader.GetRawIntrinsicPropertySetsOfType(optFilter,ad,allowMultiIntfInst,m,ty) +let GetIntrinsicPropInfoSetsOfType (infoReader: InfoReader) (optFilter, ad, allowMultiIntfInst) findFlag m ty = + infoReader.GetRawIntrinsicPropertySetsOfType(optFilter, ad, allowMultiIntfInst, m, ty) |> FilterOverridesOfPropInfos findFlag infoReader.g infoReader.amap m /// Get the flattened list of intrinsic methods in the hierarchy -let GetIntrinsicMethInfosOfType infoReader (optFilter,ad,allowMultiIntfInst) findFlag m ty = - GetIntrinsicMethInfoSetsOfType infoReader (optFilter,ad,allowMultiIntfInst) findFlag m ty |> List.concat +let GetIntrinsicMethInfosOfType infoReader (optFilter, ad, allowMultiIntfInst) findFlag m ty = + GetIntrinsicMethInfoSetsOfType infoReader (optFilter, ad, allowMultiIntfInst) findFlag m ty |> List.concat /// Get the flattened list of intrinsic properties in the hierarchy -let GetIntrinsicPropInfosOfType infoReader (optFilter,ad,allowMultiIntfInst) findFlag m ty = - GetIntrinsicPropInfoSetsOfType infoReader (optFilter,ad,allowMultiIntfInst) findFlag m ty |> List.concat +let GetIntrinsicPropInfosOfType infoReader (optFilter, ad, allowMultiIntfInst) findFlag m ty = + GetIntrinsicPropInfoSetsOfType infoReader (optFilter, ad, allowMultiIntfInst) findFlag m ty |> List.concat /// Perform type-directed name resolution of a particular named member in an F# type -let TryFindIntrinsicNamedItemOfType (infoReader:InfoReader) (nm,ad) findFlag m ty = +let TryFindIntrinsicNamedItemOfType (infoReader: InfoReader) (nm, ad) findFlag m ty = match infoReader.TryFindNamedItemOfType(nm, ad, m, ty) with | Some item -> match item with @@ -696,12 +695,12 @@ let TryFindIntrinsicNamedItemOfType (infoReader:InfoReader) (nm,ad) findFlag m t /// -- getting the Dispose method when resolving the 'use' construct /// -- getting the various methods used to desugar the computation expression syntax let TryFindIntrinsicMethInfo infoReader m ad nm ty = - GetIntrinsicMethInfosOfType infoReader (Some nm,ad,AllowMultiIntfInstantiations.Yes) IgnoreOverrides m ty + GetIntrinsicMethInfosOfType infoReader (Some nm, ad, AllowMultiIntfInstantiations.Yes) IgnoreOverrides m ty /// 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. let TryFindPropInfo infoReader m ad nm ty = - GetIntrinsicPropInfosOfType infoReader (Some nm,ad,AllowMultiIntfInstantiations.Yes) IgnoreOverrides m ty + GetIntrinsicPropInfosOfType infoReader (Some nm, ad, AllowMultiIntfInstantiations.Yes) IgnoreOverrides m ty //------------------------------------------------------------------------- // Helpers related to delegates and events - these use method searching hence are in this file @@ -714,20 +713,20 @@ type SigOfFunctionForDelegate = SigOfFunctionForDelegate of MethInfo * TType lis /// Given a delegate type work out the minfo, argument types, return type /// and F# function type by looking at the Invoke signature of the delegate. -let GetSigOfFunctionForDelegate (infoReader:InfoReader) delty m ad = +let GetSigOfFunctionForDelegate (infoReader: InfoReader) delty m ad = let g = infoReader.g let amap = infoReader.amap let invokeMethInfo = - match GetIntrinsicMethInfosOfType infoReader (Some "Invoke",ad,AllowMultiIntfInstantiations.Yes) IgnoreOverrides m delty with + match GetIntrinsicMethInfosOfType infoReader (Some "Invoke", ad, AllowMultiIntfInstantiations.Yes) IgnoreOverrides m delty with | [h] -> h - | [] -> error(Error(FSComp.SR.noInvokeMethodsFound (),m)) - | h :: _ -> warning(InternalError(FSComp.SR.moreThanOneInvokeMethodFound (),m)); h + | [] -> error(Error(FSComp.SR.noInvokeMethodsFound (), m)) + | h :: _ -> warning(InternalError(FSComp.SR.moreThanOneInvokeMethodFound (), m)); h let minst = [] // a delegate's Invoke method is never generic let compiledViewOfDelArgTys = match invokeMethInfo.GetParamTypes(amap, m, minst) with | [args] -> args - | _ -> error(Error(FSComp.SR.delegatesNotAllowedToHaveCurriedSignatures (),m)) + | _ -> error(Error(FSComp.SR.delegatesNotAllowedToHaveCurriedSignatures (), m)) let fsharpViewOfDelArgTys = match compiledViewOfDelArgTys with | [] -> [g.unit_ty] @@ -735,14 +734,14 @@ let GetSigOfFunctionForDelegate (infoReader:InfoReader) delty m ad = let delRetTy = invokeMethInfo.GetFSharpReturnTy(amap, m, minst) CheckMethInfoAttributes g m None invokeMethInfo |> CommitOperationResult let fty = mkIteratedFunTy fsharpViewOfDelArgTys delRetTy - SigOfFunctionForDelegate(invokeMethInfo,compiledViewOfDelArgTys,delRetTy,fty) + SigOfFunctionForDelegate(invokeMethInfo, compiledViewOfDelArgTys, delRetTy, fty) /// Try and interpret a delegate type as a "standard" .NET delegate type associated with an event, with a "sender" parameter. -let TryDestStandardDelegateType (infoReader:InfoReader) m ad delTy = +let TryDestStandardDelegateType (infoReader: InfoReader) m ad delTy = let g = infoReader.g - let (SigOfFunctionForDelegate(_,compiledViewOfDelArgTys,delRetTy,_)) = GetSigOfFunctionForDelegate infoReader delTy m ad + let (SigOfFunctionForDelegate(_, compiledViewOfDelArgTys, delRetTy, _)) = GetSigOfFunctionForDelegate infoReader delTy m ad match compiledViewOfDelArgTys with - | senderTy :: argTys when (isObjTy g senderTy) && not (List.exists (isByrefTy g) argTys) -> Some(mkRefTupledTy g argTys,delRetTy) + | senderTy :: argTys when (isObjTy g senderTy) && not (List.exists (isByrefTy g) argTys) -> Some(mkRefTupledTy g argTys, delRetTy) | _ -> None @@ -761,26 +760,26 @@ let TryDestStandardDelegateType (infoReader:InfoReader) m ad delTy = /// that do not use any additional information, the .NET Framework has /// already defined an appropriate delegate type: EventHandler. /// (from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vcwlkEventsTutorial.asp) -let IsStandardEventInfo (infoReader:InfoReader) m ad (einfo:EventInfo) = - let dty = einfo.GetDelegateType(infoReader.amap,m) +let IsStandardEventInfo (infoReader: InfoReader) m ad (einfo: EventInfo) = + let dty = einfo.GetDelegateType(infoReader.amap, m) match TryDestStandardDelegateType infoReader m ad dty with | Some _ -> true | None -> false /// Get the (perhaps tupled) argument type accepted by an event -let ArgsTypOfEventInfo (infoReader:InfoReader) m ad (einfo:EventInfo) = +let ArgsTypOfEventInfo (infoReader: InfoReader) m ad (einfo: EventInfo) = let amap = infoReader.amap - let dty = einfo.GetDelegateType(amap,m) + let dty = einfo.GetDelegateType(amap, m) match TryDestStandardDelegateType infoReader m ad dty with - | Some(argtys,_) -> argtys + | Some(argtys, _) -> argtys | None -> error(nonStandardEventError einfo.EventName m) /// Get the type of the event when looked at as if it is a property /// Used when displaying the property in Intellisense -let PropTypOfEventInfo (infoReader:InfoReader) m ad (einfo:EventInfo) = +let PropTypOfEventInfo (infoReader: InfoReader) m ad (einfo: EventInfo) = let g = infoReader.g let amap = infoReader.amap - let delTy = einfo.GetDelegateType(amap,m) + let delTy = einfo.GetDelegateType(amap, m) let argsTy = ArgsTypOfEventInfo infoReader m ad einfo mkIEventType g delTy argsTy diff --git a/src/fcs-fable/src/fsharp/InnerLambdasToTopLevelFuncs.fs b/src/fcs-fable/src/fsharp/InnerLambdasToTopLevelFuncs.fs index c03ac2ace3..53fa7baa3a 100755 --- a/src/fcs-fable/src/fsharp/InnerLambdasToTopLevelFuncs.fs +++ b/src/fcs-fable/src/fsharp/InnerLambdasToTopLevelFuncs.fs @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -module internal FSharp.Compiler.InnerLambdasToTopLevelFuncs +module internal FSharp.Compiler.InnerLambdasToTopLevelFuncs -open FSharp.Compiler -open FSharp.Compiler.AbstractIL.Internal -open FSharp.Compiler.AbstractIL.Internal.Library +open FSharp.Compiler +open FSharp.Compiler.AbstractIL.Internal +open FSharp.Compiler.AbstractIL.Internal.Library open FSharp.Compiler.AbstractIL.Diagnostics open FSharp.Compiler.Ast open FSharp.Compiler.ErrorLogger @@ -22,13 +22,13 @@ let verboseTLR = false // library helpers //------------------------------------------------------------------------- -let internalError str = dprintf "Error: %s\n" str;raise (Failure str) +let internalError str = dprintf "Error: %s\n" str;raise (Failure str) -module Zmap = - let force k mp (str,soK) = - try Zmap.find k mp - with e -> - dprintf "Zmap.force: %s %s\n" str (soK k); +module Zmap = + let force k mp (str, soK) = + try Zmap.find k mp + with e -> + dprintf "Zmap.force: %s %s\n" str (soK k) PreserveStackTrace(e) raise e @@ -36,7 +36,7 @@ module Zmap = // misc //------------------------------------------------------------------------- -/// tree, used to store dec sequence +/// tree, used to store dec sequence type Tree<'T> = | TreeNode of Tree<'T> list | LeafNode of 'T @@ -46,7 +46,7 @@ let fringeTR tr = match tr with | TreeNode subts -> List.foldBack collect subts acc | LeafNode x -> x::acc - + collect tr [] let emptyTR = TreeNode[] @@ -56,32 +56,32 @@ let emptyTR = TreeNode[] // misc //------------------------------------------------------------------------- -/// Collapse reclinks on app and combine apps if possible -/// recursive ids are inside reclinks and maybe be type instanced with a Expr.App +/// Collapse reclinks on app and combine apps if possible +/// recursive ids are inside reclinks and maybe be type instanced with a Expr.App -// CLEANUP NOTE: mkApps ensures applications are kept in a collapsed -// and combined form, so this function should not be needed -let destApp (f,fty,tys,args,m) = +// CLEANUP NOTE: mkApps ensures applications are kept in a collapsed +// and combined form, so this function should not be needed +let destApp (f, fty, tys, args, m) = match stripExpr f with - | Expr.App (f2,fty2,tys2,[] ,_) -> (f2,fty2,tys2 @ tys,args,m) - | Expr.App _ -> (f,fty,tys,args,m) (* has args, so not combine ty args *) - | f -> (f,fty,tys,args,m) + | Expr.App (f2, fty2, tys2, [], _) -> (f2, fty2, tys2 @ tys, args, m) + | Expr.App _ -> (f, fty, tys, args, m) (* has args, so not combine ty args *) + | f -> (f, fty, tys, args, m) #if DEBUG -let showTyparSet tps = showL (commaListL (List.map typarL (Zset.elements tps))) +let showTyparSet tps = showL (commaListL (List.map typarL (Zset.elements tps))) #endif -// CLEANUP NOTE: don't like the look of this function - this distinction -// should never be needed -let isDelayedRepr (f:Val) e = - let _tps,vss,_b,_rty = stripTopLambda (e,f.Type) +// CLEANUP NOTE: don't like the look of this function - this distinction +// should never be needed +let isDelayedRepr (f: Val) e = + let _tps, vss, _b, _rty = stripTopLambda (e, f.Type) List.length vss>0 -// REVIEW: these should just be replaced by direct calls to mkLocal, mkCompGenLocal etc. -// REVIEW: However these set an arity whereas the others don't +// REVIEW: these should just be replaced by direct calls to mkLocal, mkCompGenLocal etc. +// REVIEW: However these set an arity whereas the others don't let mkLocalNameTypeArity compgen m name ty topValInfo = - NewVal(name,m,None,ty,Immutable,compgen,topValInfo,taccessPublic,ValNotInRecScope,None,NormalVal,[],ValInline.Optional,XmlDoc.Empty,false,false,false,false,false,false,None,ParentNone) + NewVal(name, m, None, ty, Immutable, compgen, topValInfo, taccessPublic, ValNotInRecScope, None, NormalVal, [], ValInline.Optional, XmlDoc.Empty, false, false, false, false, false, false, None, ParentNone) //------------------------------------------------------------------------- // definitions: TLR, arity, arity-met, arity-short @@ -89,7 +89,7 @@ let mkLocalNameTypeArity compgen m name ty topValInfo = // DEFN: An f is TLR with arity wf if // (a) it's repr is "LAM tps. lam x1...xN. body" and have N<=wf (i.e. have enough args) // (b) it has no free tps -// (c) for g:freevars(repr), both +// (c) for g: freevars(repr), both // (1) g is TLR with arity wg, and // (2) g occurs in arity-met occurrence. // (d) if N=0, then further require that body be a TLR-constant. @@ -132,7 +132,7 @@ let mkLocalNameTypeArity compgen m name ty topValInfo = //------------------------------------------------------------------------- let GetValsBoundUnderMustInline xinfo = - let accRejectFrom (v:Val) repr rejectS = + let accRejectFrom (v: Val) repr rejectS = if v.InlineInfo = ValInline.PseudoVal then Zset.union (GetValsBoundInExpr repr) rejectS else rejectS @@ -143,25 +143,25 @@ let GetValsBoundUnderMustInline xinfo = //------------------------------------------------------------------------- // pass1: IsRefusedTLR //------------------------------------------------------------------------- - -let IsRefusedTLR g (f:Val) = + +let IsRefusedTLR g (f: Val) = let mutableVal = f.IsMutable - // things marked ValInline.Never are special + // things marked ValInline.Never are special let dllImportStubOrOtherNeverInline = (f.InlineInfo = ValInline.Never) - // Cannot have static fields of byref type + // Cannot have static fields of byref type let byrefVal = isByrefLikeTy g f.Range f.Type - // Special values are instance methods etc. on .NET types. For now leave these alone + // Special values are instance methods etc. on .NET types. For now leave these alone let specialVal = f.MemberInfo.IsSome let alreadyChosen = f.ValReprInfo.IsSome let refuseTest = alreadyChosen || mutableVal || byrefVal || specialVal || dllImportStubOrOtherNeverInline refuseTest -let IsMandatoryTopLevel (f:Val) = +let IsMandatoryTopLevel (f: Val) = let specialVal = f.MemberInfo.IsSome let isModulBinding = f.IsMemberOrModuleBinding specialVal || isModulBinding -let IsMandatoryNonTopLevel g (f:Val) = +let IsMandatoryNonTopLevel g (f: Val) = let byrefVal = isByrefLikeTy g f.Range f.Type byrefVal @@ -169,34 +169,34 @@ let IsMandatoryNonTopLevel g (f:Val) = // pass1: decide which f are to be TLR? and if so, arity(f) //------------------------------------------------------------------------- -module Pass1_DetermineTLRAndArities = +module Pass1_DetermineTLRAndArities = let GetMaxNumArgsAtUses xinfo f = match Zmap.tryFind f xinfo.Uses with | None -> 0 (* no call sites *) - | Some sites -> - sites |> List.map (fun (_accessors,_tinst,args) -> List.length args) |> List.max + | Some sites -> + sites |> List.map (fun (_accessors, _tinst, args) -> List.length args) |> List.max let SelectTLRVals g xinfo f e = - if IsRefusedTLR g f then None + if IsRefusedTLR g f then None // Exclude values bound in a decision tree else if Zset.contains f xinfo.DecisionTreeBindings then None else - // Could the binding be TLR? with what arity? + // Could the binding be TLR? with what arity? let atTopLevel = Zset.contains f xinfo.TopLevelBindings - let tps,vss,_b,_rty = stripTopLambda (e,f.Type) + let tps, vss, _b, _rty = stripTopLambda (e, f.Type) let nFormals = vss.Length - let nMaxApplied = GetMaxNumArgsAtUses xinfo f + let nMaxApplied = GetMaxNumArgsAtUses xinfo f let arity = Operators.min nFormals nMaxApplied - if atTopLevel || arity<>0 || not (isNil tps) then Some (f,arity) + if atTopLevel || arity<>0 || not (isNil tps) then Some (f, arity) else None /// Check if f involves any value recursion (so can skip those). /// ValRec considered: recursive && some f in mutual binding is not bound to a lambda let IsValueRecursionFree xinfo f = - let hasDelayedRepr f = isDelayedRepr f (Zmap.force f xinfo.Defns ("IsValueRecursionFree - hasDelayedRepr",nameOfVal)) - let isRecursive,mudefs = Zmap.force f xinfo.RecursiveBindings ("IsValueRecursionFree",nameOfVal) + let hasDelayedRepr f = isDelayedRepr f (Zmap.force f xinfo.Defns ("IsValueRecursionFree - hasDelayedRepr", nameOfVal)) + let isRecursive, mudefs = Zmap.force f xinfo.RecursiveBindings ("IsValueRecursionFree", nameOfVal) not isRecursive || List.forall hasDelayedRepr mudefs let DumpArity arityM = @@ -207,28 +207,28 @@ module Pass1_DetermineTLRAndArities = let xinfo = GetUsageInfoOfImplFile g expr let fArities = Zmap.chooseL (SelectTLRVals g xinfo) xinfo.Defns let fArities = List.filter (fst >> IsValueRecursionFree xinfo) fArities - // Do not TLR v if it is bound under a mustinline defn - // There is simply no point - the original value will be duplicated and TLR'd anyway + // Do not TLR v if it is bound under a mustinline defn + // There is simply no point - the original value will be duplicated and TLR'd anyway let rejectS = GetValsBoundUnderMustInline xinfo - let fArities = List.filter (fun (v,_) -> not (Zset.contains v rejectS)) fArities + let fArities = List.filter (fun (v, _) -> not (Zset.contains v rejectS)) fArities (*-*) let tlrS = Zset.ofList valOrder (List.map fst fArities) let topValS = xinfo.TopLevelBindings (* genuinely top level *) let topValS = Zset.filter (IsMandatoryNonTopLevel g >> not) topValS (* restrict *) (* REPORT MISSED CASES *) #if DEBUG - if verboseTLR then + if verboseTLR then let missed = Zset.diff xinfo.TopLevelBindings tlrS - missed |> Zset.iter (fun v -> dprintf "TopLevel but not TLR = %s\n" v.LogicalName) + missed |> Zset.iter (fun v -> dprintf "TopLevel but not TLR = %s\n" v.LogicalName) #endif - (* REPORT OVER *) + (* REPORT OVER *) let arityM = Zmap.ofList valOrder fArities #if DEBUG if verboseTLR then DumpArity arityM #endif - tlrS,topValS, arityM + tlrS, topValS, arityM + - (* NOTES: For constants, @@ -244,28 +244,28 @@ module Pass1_DetermineTLRAndArities = // pass2: determine reqdTypars(f) and envreq(f) - notes //------------------------------------------------------------------------- -/// What are the closing types/values for {f1,f2...} mutually defined? +/// What are the closing types/values for {f1, f2...} mutually defined? /// // Note: arity-met g-applications (g TLR) will translated as: // [[g @ tps ` args]] -> gHAT @ reqdTypars(g) tps ` env(g) args // so they require availability of closing types/values for g. // -// If g is free wrt f1,f2... then g's closure must be included. +// If g is free wrt f1, f2... then g's closure must be included. // // Note: mutual definitions have a common closure. // -// For f1,f2,... = fBody1,fbody2... mutual bindings: +// For f1, f2, ... = fBody1, fbody2... mutual bindings: +// +// DEFN: The reqdVals0 are the free-values of fBody1, fBody2... // -// DEFN: The reqdVals0 are the free-values of fBody1,fBody2... -// // What are the closure equations? // -// reqdTypars(f1,f2..) includes free-tps(f) -// reqdTypars(f1,f2..) includes reqdTypars(g) if fBody has arity-met g-occurrence (g TLR). +// reqdTypars(f1, f2..) includes free-tps(f) +// reqdTypars(f1, f2..) includes reqdTypars(g) if fBody has arity-met g-occurrence (g TLR). // -// reqdItems(f1,f2...) includes ReqdSubEnv(g) if fBody has arity-met g-occurrence (g TLR) -// reqdItems(f1,f2...) includes ReqdVal(g) if fBody has arity-short g-occurrence (g TLR) -// reqdItems(f1,f2...) includes ReqdVal(g) if fBody has g-occurrence (g not TLR) +// reqdItems(f1, f2...) includes ReqdSubEnv(g) if fBody has arity-met g-occurrence (g TLR) +// reqdItems(f1, f2...) includes ReqdVal(g) if fBody has arity-short g-occurrence (g TLR) +// reqdItems(f1, f2...) includes ReqdVal(g) if fBody has g-occurrence (g not TLR) // // and only collect requirements if g is a generator (see next notes). // @@ -273,7 +273,7 @@ module Pass1_DetermineTLRAndArities = // In the translated code, env(h) will be defined at the h definition point. // So, where-ever h could be called (recursive or not), // the env(h) will be available (in scope). -// +// // Note (subtle): "sub-env-requirement-only-for-reqdVals0" // If have an arity-met call to h inside fBody, but h is not a freevar for f, // then h does not contribute env(h) to env(f), the closure for f. @@ -299,7 +299,7 @@ type BindingGroupSharingSameReqdItems(bindings: Bindings) = member fclass.IsEmpty = isNil vals - member fclass.Pairs = vals |> List.map (fun f -> (f,fclass)) + member fclass.Pairs = vals |> List.map (fun f -> (f, fclass)) override fclass.ToString() = "+" + String.concat "+" (List.map nameOfVal vals) @@ -312,42 +312,46 @@ let fclassOrder = Order.orderOn (fun (b: BindingGroupSharingSameReqdItems) -> b. type ReqdItem = | ReqdSubEnv of Val | ReqdVal of Val - override i.ToString() = - match i with + override i.ToString() = + match i with | ReqdSubEnv f -> "&" + f.LogicalName | ReqdVal f -> f.LogicalName let reqdItemOrder = let rep = function - | ReqdSubEnv v -> true ,v - | ReqdVal v -> false,v - - Order.orderOn rep (Pair.order (Bool.order,valOrder)) + | ReqdSubEnv v -> true, v + | ReqdVal v -> false, v + + Order.orderOn rep (Pair.order (Bool.order, valOrder)) /// An env says what is needed to close the corresponding defn(s). /// The reqdTypars are the free reqdTypars of the defns, and those required by any direct TLR arity-met calls. /// The reqdItems are the ids/subEnvs required from calls to freeVars. type ReqdItemsForDefn = - { reqdTypars : Zset - reqdItems : Zset - m : Range.range } + { + reqdTypars: Zset + reqdItems: Zset + m: Range.range + } + member env.ReqdSubEnvs = [ for x in env.reqdItems do match x with | ReqdSubEnv f -> yield f | ReqdVal _ -> () ] + member env.ReqdVals = [ for x in env.reqdItems do match x with | ReqdSubEnv _ -> () | ReqdVal v -> yield v ] - member env.Extend (typars,items) = + member env.Extend (typars, items) = {env with reqdTypars = Zset.addList typars env.reqdTypars reqdItems = Zset.addList items env.reqdItems} - static member Initial typars m = + static member Initial typars m = {reqdTypars = Zset.addList typars (Zset.empty typarOrder) reqdItems = Zset.empty reqdItemOrder m = m } - override env.ToString() = + override env.ToString() = (showL (commaListL (List.map typarL (Zset.elements env.reqdTypars)))) + "--" + - (String.concat "," (List.map string (Zset.elements env.reqdItems))) + (String.concat ", " (List.map string (Zset.elements env.reqdItems))) (*--debug-stuff--*) @@ -358,32 +362,30 @@ type ReqdItemsForDefn = type Generators = Zset -/// check a named function value applied to sufficient arguments -let IsArityMet (vref:ValRef) wf (tys: TypeInst) args = - (tys.Length = vref.Typars.Length) && (wf <= List.length args) - - -module Pass2_DetermineReqdItems = +/// check a named function value applied to sufficient arguments +let IsArityMet (vref: ValRef) wf (tys: TypeInst) args = + (tys.Length = vref.Typars.Length) && (wf <= List.length args) +module Pass2_DetermineReqdItems = // IMPLEMENTATION PLAN: // // fold over expr. // // - at an instance g, - // - (a) g arity-met, LogRequiredFrom g - ReqdSubEnv(g) -- direct call will require env(g) and reqdTypars(g) + // - (a) g arity-met, LogRequiredFrom g - ReqdSubEnv(g) -- direct call will require env(g) and reqdTypars(g) // - (b) g arity-short, LogRequiredFrom g - ReqdVal(g) -- remains g call - // - (c) g non-TLR, LogRequiredFrom g - ReqdVal(g) -- remains g + // - (c) g non-TLR, LogRequiredFrom g - ReqdVal(g) -- remains g // where - // LogRequiredFrom g ... = logs info into (reqdVals0,env) if g in reqdVals0. + // LogRequiredFrom g ... = logs info into (reqdVals0, env) if g in reqdVals0. // - // - at some mu-bindings, f1,f2... = fBody1,fBody2,... - // "note reqdVals0, push (reqdVals0,env), fold-over bodies, pop, fold rest" - // - // - let fclass = ff1,... be the fi which are being made TLR. + // - at some mu-bindings, f1, f2... = fBody1, fBody2, ... + // "note reqdVals0, push (reqdVals0, env), fold-over bodies, pop, fold rest" + // + // - let fclass = ff1, ... be the fi which are being made TLR. // - required to find an env for these. // - start a new envCollector: - // freetps = freetypars of (fBody1,fBody2,...) + // freetps = freetypars of (fBody1, fBody2, ...) // freevs = freevars of .. // initialise: // reqdTypars = freetps @@ -409,16 +411,17 @@ module Pass2_DetermineReqdItems = /// recShortCallS - the f which are "recursively-called" in arity short instance. /// /// When walking expr, at each mutual binding site, - /// push a (generator,env) collector frame on stack. + /// push a (generator, env) collector frame on stack. /// If occurrences in body are relevant (for a generator) then it's contribution is logged. /// /// recShortCalls to f will require a binding for f in terms of fHat within the fHatBody. type state = - { stack : (BindingGroupSharingSameReqdItems * Generators * ReqdItemsForDefn) list - reqdItemsMap : Zmap - fclassM : Zmap - revDeclist : BindingGroupSharingSameReqdItems list - recShortCallS : Zset + { + stack: (BindingGroupSharingSameReqdItems * Generators * ReqdItemsForDefn) list + reqdItemsMap: Zmap + fclassM: Zmap + revDeclist: BindingGroupSharingSameReqdItems list + recShortCallS: Zset } let state0 = @@ -428,45 +431,45 @@ module Pass2_DetermineReqdItems = revDeclist = [] recShortCallS = Zset.empty valOrder } - /// PUSH = start collecting for fclass - let PushFrame (fclass: BindingGroupSharingSameReqdItems) (reqdTypars0,reqdVals0,m) state = - if fclass.IsEmpty then - state + /// PUSH = start collecting for fclass + let PushFrame (fclass: BindingGroupSharingSameReqdItems) (reqdTypars0, reqdVals0, m) state = + if fclass.IsEmpty then + state else {state with revDeclist = fclass :: state.revDeclist - stack = (let env = ReqdItemsForDefn.Initial reqdTypars0 m in (fclass,reqdVals0,env)::state.stack) } + stack = (let env = ReqdItemsForDefn.Initial reqdTypars0 m in (fclass, reqdVals0, env)::state.stack) } - /// POP & SAVE = end collecting for fclass and store - let SaveFrame (fclass: BindingGroupSharingSameReqdItems) state = + /// POP & SAVE = end collecting for fclass and store + let SaveFrame (fclass: BindingGroupSharingSameReqdItems) state = if verboseTLR then dprintf "SaveFrame: %A\n" fclass - if fclass.IsEmpty then - state + if fclass.IsEmpty then + state else match state.stack with | [] -> internalError "trl: popFrame has empty stack" - | (fclass,_reqdVals0,env)::stack -> (* ASSERT: same fclass *) + | (fclass, _reqdVals0, env)::stack -> (* ASSERT: same fclass *) {state with stack = stack reqdItemsMap = Zmap.add fclass env state.reqdItemsMap - fclassM = List.fold (fun mp (k,v) -> Zmap.add k v mp) state.fclassM fclass.Pairs } + fclassM = List.fold (fun mp (k, v) -> Zmap.add k v mp) state.fclassM fclass.Pairs } - /// Log requirements for gv in the relevant stack frames + /// Log requirements for gv in the relevant stack frames let LogRequiredFrom gv items state = - let logIntoFrame (fclass, reqdVals0:Zset, env: ReqdItemsForDefn) = - let env = + let logIntoFrame (fclass, reqdVals0: Zset, env: ReqdItemsForDefn) = + let env = if reqdVals0.Contains gv then - env.Extend ([],items) + env.Extend ([], items) else env - - fclass,reqdVals0,env - + + fclass, reqdVals0, env + {state with stack = List.map logIntoFrame state.stack} let LogShortCall gv state = - if state.stack |> List.exists (fun (fclass,_reqdVals0,_env) -> fclass.Contains gv) then + if state.stack |> List.exists (fun (fclass, _reqdVals0, _env) -> fclass.Contains gv) then if verboseTLR then dprintf "shortCall: rec: %s\n" gv.LogicalName - // Have short call to gv within it's (mutual) definition(s) + // Have short call to gv within it's (mutual) definition(s) {state with recShortCallS = Zset.add gv state.recShortCallS} else @@ -476,80 +479,84 @@ module Pass2_DetermineReqdItems = let FreeInBindings bs = List.fold (foldOn (freeInBindingRhs CollectTyparsAndLocals) unionFreeVars) emptyFreeVars bs /// Intercepts selected exprs. - /// "letrec f1,f2,... = fBody1,fBody2,... in rest" - + /// "letrec f1, f2, ... = fBody1, fBody2, ... in rest" - /// "val v" - free occurrence - /// "app (f,tps,args)" - occurrence + /// "app (f, tps, args)" - occurrence /// - /// On intercepted nodes, must exprF fold to collect from subexpressions. - let ExprEnvIntercept (tlrS,arityM) exprF z expr = - let accInstance z (fvref:ValRef,tps,args) (* f known local *) = + /// On intercepted nodes, must recurseF fold to collect from subexpressions. + let ExprEnvIntercept (tlrS, arityM) recurseF noInterceptF z expr = + + let accInstance z (fvref: ValRef, tps, args) = let f = fvref.Deref match Zmap.tryFind f arityM with - - | Some wf -> - // f is TLR with arity wf + + | Some wf -> + // f is TLR with arity wf if IsArityMet fvref wf tps args then - // arity-met call to a TLR g - LogRequiredFrom f [ReqdSubEnv f] z + // arity-met call to a TLR g + LogRequiredFrom f [ReqdSubEnv f] z else - // arity-short instance - let z = LogRequiredFrom f [ReqdVal f] z - // LogShortCall - logs recursive short calls - let z = LogShortCall f z + // arity-short instance + let z = LogRequiredFrom f [ReqdVal f] z + // LogShortCall - logs recursive short calls + let z = LogShortCall f z z - - | None -> - // f is non-TLR - LogRequiredFrom f [ReqdVal f] z - + + | None -> + // f is non-TLR + LogRequiredFrom f [ReqdVal f] z + let accBinds m z (binds: Bindings) = - let tlrBs,nonTlrBs = binds |> List.partition (fun b -> Zset.contains b.Var tlrS) - // For bindings marked TLR, collect implied env + let tlrBs, nonTlrBs = binds |> List.partition (fun b -> Zset.contains b.Var tlrS) + // For bindings marked TLR, collect implied env let fclass = BindingGroupSharingSameReqdItems tlrBs - // what determines env? - let frees = FreeInBindings tlrBs - let reqdTypars0 = frees.FreeTyvars.FreeTypars |> Zset.elements (* put in env *) + // what determines env? + let frees = FreeInBindings tlrBs + // put in env + let reqdTypars0 = frees.FreeTyvars.FreeTypars |> Zset.elements // occurrences contribute to env let reqdVals0 = frees.FreeLocals |> Zset.elements // tlrBs are not reqdVals0 for themselves let reqdVals0 = reqdVals0 |> List.filter (fun gv -> not (fclass.Contains gv)) let reqdVals0 = reqdVals0 |> Zset.ofList valOrder // collect into env over bodies - let z = PushFrame fclass (reqdTypars0,reqdVals0,m) z - let z = (z,tlrBs) ||> List.fold (foldOn (fun b -> b.Expr) exprF) - let z = SaveFrame fclass z - (* for bindings not marked TRL, collect *) - let z = (z,nonTlrBs) ||> List.fold (foldOn (fun b -> b.Expr) exprF) + let z = PushFrame fclass (reqdTypars0, reqdVals0,m) z + let z = (z, tlrBs) ||> List.fold (foldOn (fun b -> b.Expr) recurseF) + let z = SaveFrame fclass z + // for bindings not marked TRL, collect + let z = (z, nonTlrBs) ||> List.fold (foldOn (fun b -> b.Expr) recurseF) z - + match expr with - | Expr.Val (v,_,_) -> - let z = accInstance z (v,[],[]) - Some z - | Expr.Op (TOp.LValueOp (_,v),_tys,args,_) -> - let z = accInstance z (v,[],[]) - let z = List.fold exprF z args - Some z - | Expr.App (f,fty,tys,args,m) -> - let f,_fty,tys,args,_m = destApp (f,fty,tys,args,m) + | Expr.Val (v, _, _) -> + accInstance z (v, [], []) + + | Expr.Op (TOp.LValueOp (_, v), _tys, args, _) -> + let z = accInstance z (v, [], []) + List.fold recurseF z args + + | Expr.App (f, fty, tys, args, m) -> + let f, _fty, tys, args, _m = destApp (f, fty, tys, args, m) match f with - | Expr.Val (f,_,_) -> - // // YES: APP vspec tps args - log - let z = accInstance z (f,tys,args) - let z = List.fold exprF z args - Some z + | Expr.Val (f, _, _) -> + // YES: APP vspec tps args - log + let z = accInstance z (f, tys, args) + List.fold recurseF z args | _ -> - (* NO: app, but function is not val - no log *) - None - | Expr.LetRec (binds,body,m,_) -> + // NO: app, but function is not val - no log + noInterceptF z expr + + | Expr.LetRec (binds, body, m, _) -> let z = accBinds m z binds - let z = exprF z body - Some z - | Expr.Let (bind,body,m,_) -> + recurseF z body + + | Expr.Let (bind,body,m,_) -> let z = accBinds m z [bind] - let z = exprF z body - Some z - | _ -> None (* NO: no intercept *) + // tailcall for linear sequences + recurseF z body + + | _ -> + noInterceptF z expr /// Initially, reqdTypars(fclass) = freetps(bodies). @@ -557,12 +564,12 @@ module Pass2_DetermineReqdItems = /// Required to include the reqdTypars(gv) in reqdTypars(fclass). let CloseReqdTypars fclassM reqdItemsMap = if verboseTLR then dprintf "CloseReqdTypars------\n" - + let closeStep reqdItemsMap changed fc (env: ReqdItemsForDefn) = let directCallReqdEnvs = env.ReqdSubEnvs - let directCallReqdTypars = directCallReqdEnvs |> List.map (fun f -> - let fc = Zmap.force f fclassM ("reqdTyparsFor",nameOfVal) - let env = Zmap.force fc reqdItemsMap ("reqdTyparsFor",string) + let directCallReqdTypars = directCallReqdEnvs |> List.map (fun f -> + let fc = Zmap.force f fclassM ("reqdTyparsFor", nameOfVal) + let env = Zmap.force fc reqdItemsMap ("reqdTyparsFor", string) env.reqdTypars) let reqdTypars0 = env.reqdTypars @@ -570,35 +577,35 @@ module Pass2_DetermineReqdItems = let changed = changed || (not (Zset.equal reqdTypars0 reqdTypars)) let env = {env with reqdTypars = reqdTypars} #if DEBUG - if verboseTLR then + if verboseTLR then dprintf "closeStep: fc=%30A nSubs=%d reqdTypars0=%s reqdTypars=%s\n" fc directCallReqdEnvs.Length (showTyparSet reqdTypars0) (showTyparSet reqdTypars) - directCallReqdEnvs |> List.iter (fun f -> dprintf "closeStep: dcall f=%s\n" f.LogicalName) + directCallReqdEnvs |> List.iter (fun f -> dprintf "closeStep: dcall f=%s\n" f.LogicalName) directCallReqdEnvs |> List.iter (fun f -> dprintf "closeStep: dcall fc=%A\n" (Zmap.find f fclassM)) - directCallReqdTypars |> List.iter (fun _reqdTypars -> dprintf "closeStep: dcall reqdTypars=%s\n" (showTyparSet reqdTypars0)) + directCallReqdTypars |> List.iter (fun _reqdTypars -> dprintf "closeStep: dcall reqdTypars=%s\n" (showTyparSet reqdTypars0)) #else ignore fc #endif - changed,env - + changed, env + let rec fixpoint reqdItemsMap = let changed = false - let changed,reqdItemsMap = Zmap.foldMap (closeStep reqdItemsMap) changed reqdItemsMap + let changed, reqdItemsMap = Zmap.foldMap (closeStep reqdItemsMap) changed reqdItemsMap if changed then fixpoint reqdItemsMap else reqdItemsMap - + fixpoint reqdItemsMap #if DEBUG let DumpReqdValMap reqdItemsMap = - for KeyValue(fc,env) in reqdItemsMap do + for KeyValue(fc, env) in reqdItemsMap do dprintf "CLASS=%A\n env=%A\n" fc env #endif - let DetermineReqdItems (tlrS,arityM) expr = + let DetermineReqdItems (tlrS, arityM) expr = if verboseTLR then dprintf "DetermineReqdItems------\n" - let folder = {ExprFolder0 with exprIntercept = ExprEnvIntercept (tlrS,arityM)} + let folder = {ExprFolder0 with exprIntercept = ExprEnvIntercept (tlrS, arityM)} let z = state0 // Walk the entire assembly let z = FoldImplFile folder z expr @@ -607,25 +614,25 @@ module Pass2_DetermineReqdItems = let fclassM = z.fclassM let declist = List.rev z.revDeclist let recShortCallS = z.recShortCallS - // diagnostic dump + // diagnostic dump #if DEBUG if verboseTLR then DumpReqdValMap reqdItemsMap #endif - // close the reqdTypars under the subEnv reln + // close the reqdTypars under the subEnv reln let reqdItemsMap = CloseReqdTypars fclassM reqdItemsMap - // filter out trivial fclass - with no TLR defns + // filter out trivial fclass - with no TLR defns let reqdItemsMap = Zmap.remove (BindingGroupSharingSameReqdItems List.empty) reqdItemsMap - // restrict declist to those with reqdItemsMap bindings (the non-trivial ones) + // restrict declist to those with reqdItemsMap bindings (the non-trivial ones) let declist = List.filter (Zmap.memberOf reqdItemsMap) declist #if DEBUG - // diagnostic dump + // diagnostic dump if verboseTLR then DumpReqdValMap reqdItemsMap - declist |> List.iter (fun fc -> dprintf "Declist: %A\n" fc) - recShortCallS |> Zset.iter (fun f -> dprintf "RecShortCall: %s\n" f.LogicalName) + declist |> List.iter (fun fc -> dprintf "Declist: %A\n" fc) + recShortCallS |> Zset.iter (fun f -> dprintf "RecShortCall: %s\n" f.LogicalName) #endif - reqdItemsMap,fclassM,declist,recShortCallS + reqdItemsMap, fclassM, declist, recShortCallS //------------------------------------------------------------------------- // step3: PackedReqdItems @@ -645,14 +652,18 @@ module Pass2_DetermineReqdItems = /// provided it is fixed up via a copyExpr call on the final expr. type PackedReqdItems = - { /// The actual typars - ep_etps : Typars - /// The actual env carrier values - ep_aenvs : Val list - /// Sequentially define the aenvs in terms of the fvs - ep_pack : Bindings - /// Sequentially define the fvs in terms of the aenvs - ep_unpack : Bindings + { + /// The actual typars + ep_etps: Typars + + /// The actual env carrier values + ep_aenvs: Val list + + /// Sequentially define the aenvs in terms of the fvs + ep_pack: Bindings + + /// Sequentially define the fvs in terms of the aenvs + ep_unpack: Bindings } @@ -667,98 +678,98 @@ exception AbortTLR of Range.range /// Note, tupling would cause an allocation, /// so, unless arg lists get very long, this flat packing will be preferable. -/// Given (fclass,env). -/// Have env = ReqdVal vj, ReqdSubEnv subEnvk -- ranging over j,k +/// Given (fclass, env). +/// Have env = ReqdVal vj, ReqdSubEnv subEnvk -- ranging over j, k /// Define vals(env) = {vj}|j union vals(subEnvk)|k -- trans closure of vals of env. -/// Define for each vi in vals(env). +/// Define for each vi in vals(env). /// This is the cmap for the env. /// reqdTypars = env.reqdTypars /// carriers = aenvi|i -/// pack = TBIND(aenvi = vi) for each (aenvi,vi) in cmap +/// pack = TBIND(aenvi = vi) for each (aenvi, vi) in cmap /// unpack = TBIND(vj = aenvFor(vj)) for each vj in reqvals(env). -/// and TBIND(asubEnvi = aenvFor(v)) for each (asubEnvi,v) in cmap(subEnvk) ranging over required subEnvk. +/// and TBIND(asubEnvi = aenvFor(v)) for each (asubEnvi, v) in cmap(subEnvk) ranging over required subEnvk. /// where -/// aenvFor(v) = aenvi where (v,aenvi) in cmap. -let FlatEnvPacks g fclassM topValS declist (reqdItemsMap: Zmap) = - let fclassOf f = Zmap.force f fclassM ("fclassM",nameOfVal) - let packEnv carrierMaps (fc:BindingGroupSharingSameReqdItems) = +/// aenvFor(v) = aenvi where (v, aenvi) in cmap. +let FlatEnvPacks g fclassM topValS declist (reqdItemsMap: Zmap) = + let fclassOf f = Zmap.force f fclassM ("fclassM", nameOfVal) + let packEnv carrierMaps (fc: BindingGroupSharingSameReqdItems) = if verboseTLR then dprintf "\ntlr: packEnv fc=%A\n" fc - let env = Zmap.force fc reqdItemsMap ("packEnv",string) + let env = Zmap.force fc reqdItemsMap ("packEnv", string) - // carrierMaps = (fclass,(v,aenv)map)map - let carrierMapFor f = Zmap.force (fclassOf f) carrierMaps ("carrierMapFor",string) + // carrierMaps = (fclass, (v, aenv)map)map + let carrierMapFor f = Zmap.force (fclassOf f) carrierMaps ("carrierMapFor", string) let valsSubEnvFor f = Zmap.keys (carrierMapFor f) - // determine vals(env) - transclosure - let vals = env.ReqdVals @ List.collect valsSubEnvFor env.ReqdSubEnvs // list, with repeats + // determine vals(env) - transclosure + let vals = env.ReqdVals @ List.collect valsSubEnvFor env.ReqdSubEnvs // list, with repeats let vals = List.noRepeats valOrder vals // noRepeats // Remove genuinely toplevel, no need to close over these - let vals = vals |> List.filter (IsMandatoryTopLevel >> not) + let vals = vals |> List.filter (IsMandatoryTopLevel >> not) // Remove byrefs, no need to close over these, and would be invalid to do so since their values can change. // // Note that it is normally not OK to skip closing over values, since values given (method) TLR must have implementations // which are truly closed. However, byref values never escape into any lambdas, so are never used in anything - // for which we will choose a method TLR. - // + // for which we will choose a method TLR. + // // For example, consider this (FSharp 1.0 bug 5578): // - // let mutable a = 1 + // let mutable a = 1 // - // let resutl1 = + // let resutl1 = // let x = &a // This is NOT given TLR, because it is byref - // x <- 111 - // let temp = x // This is given a static field TLR, not a method TLR + // x <- 111 + // let temp = x // This is given a static field TLR, not a method TLR // // let f () = x // This is not allowed, can't capture x - // x <- 999 + // x <- 999 // temp - // + // // Compare with this: - // let mutable a = 1 + // let mutable a = 1 // - // let result2 = + // let result2 = // let x = a // this is given static field TLR - // a <- 111 + // a <- 111 // let temp = a // let f () = x // This is not allowed, and is given a method TLR - // a <- 999 + // a <- 999 // temp let vals = vals |> List.filter (fun v -> not (isByrefLikeTy g v.Range v.Type)) // Remove values which have been labelled TLR, no need to close over these - let vals = vals |> List.filter (Zset.memberOf topValS >> not) - - // Carrier sets cannot include constrained polymorphic values. We can't just take such a value out, so for the moment - // we'll just abandon TLR altogether and give a warning about this condition. - match vals |> List.tryFind (IsGenericValWithGenericContraints g) with - | None -> () + let vals = vals |> List.filter (Zset.memberOf topValS >> not) + + // Carrier sets cannot include constrained polymorphic values. We can't just take such a value out, so for the moment + // we'll just abandon TLR altogether and give a warning about this condition. + match vals |> List.tryFind (IsGenericValWithGenericContraints g) with + | None -> () | Some v -> raise (AbortTLR v.Range) - // build cmap for env - let cmapPairs = vals |> List.map (fun v -> (v,(mkCompGenLocal env.m v.LogicalName v.Type |> fst))) + // build cmap for env + let cmapPairs = vals |> List.map (fun v -> (v, (mkCompGenLocal env.m v.LogicalName v.Type |> fst))) let cmap = Zmap.ofList valOrder cmapPairs - let aenvFor v = Zmap.force v cmap ("aenvFor",nameOfVal) + let aenvFor v = Zmap.force v cmap ("aenvFor", nameOfVal) let aenvExprFor v = exprForVal env.m (aenvFor v) - // build PackedReqdItems + // build PackedReqdItems let reqdTypars = env.reqdTypars let aenvs = Zmap.values cmap - let pack = cmapPairs |> List.map (fun (v,aenv) -> mkInvisibleBind aenv (exprForVal env.m v)) - let unpack = - let unpackCarrier (v,aenv) = mkInvisibleBind (setValHasNoArity v) (exprForVal env.m aenv) - let unpackSubenv f = - let subCMap = carrierMapFor f + let pack = cmapPairs |> List.map (fun (v, aenv) -> mkInvisibleBind aenv (exprForVal env.m v)) + let unpack = + let unpackCarrier (v, aenv) = mkInvisibleBind (setValHasNoArity v) (exprForVal env.m aenv) + let unpackSubenv f = + let subCMap = carrierMapFor f let vaenvs = Zmap.toList subCMap - vaenvs |> List.map (fun (subv,subaenv) -> mkBind NoSequencePointAtInvisibleBinding subaenv (aenvExprFor subv)) + vaenvs |> List.map (fun (subv, subaenv) -> mkBind NoSequencePointAtInvisibleBinding subaenv (aenvExprFor subv)) List.map unpackCarrier (Zmap.toList cmap) @ List.collect unpackSubenv env.ReqdSubEnvs - - // extend carrierMaps + + // extend carrierMaps let carrierMaps = Zmap.add fc cmap carrierMaps - // dump + // dump if verboseTLR then dprintf "tlr: packEnv envVals =%s\n" (showL (listL valL env.ReqdVals)) dprintf "tlr: packEnv envSubs =%s\n" (showL (listL valL env.ReqdSubEnvs)) @@ -767,14 +778,14 @@ let FlatEnvPacks g fclassM topValS declist (reqdItemsMap: Zmap showL (valL v))) - let fc = Zmap.force f fclassM ("createFHat - fc",nameOfVal) - let envp = Zmap.force fc envPackM ("CreateNewValuesForTLR - envp",string) + let createFHat (f: Val) = + let wf = Zmap.force f arityM ("createFHat - wf", (fun v -> showL (valL v))) + let fc = Zmap.force f fclassM ("createFHat - fc", nameOfVal) + let envp = Zmap.force fc envPackM ("CreateNewValuesForTLR - envp", string) let name = f.LogicalName (* + "_TLR_" + string wf *) let m = f.Range - let tps,tau = f.TypeScheme - let argtys,res = stripFunTy g tau + let tps, tau = f.TypeScheme + let argtys, res = stripFunTy g tau let newTps = envp.ep_etps @ tps - let fHatTy = + let fHatTy = let newArgtys = List.map typeOfVal envp.ep_aenvs @ argtys mkLambdaTy newTps newArgtys res let fHatArity = MakeSimpleArityInfo newTps (envp.ep_aenvs.Length + wf) - let fHatName = globalNng.FreshCompilerGeneratedName(name,m) + let fHatName = globalNng.FreshCompilerGeneratedName(name, m) let fHat = mkLocalNameTypeArity f.IsCompilerGenerated m fHatName fHatTy (Some fHatArity) fHat - + let fs = Zset.elements tlrS - let ffHats = List.map (fun f -> f,createFHat f) fs + let ffHats = List.map (fun f -> f, createFHat f) fs let fHatM = Zmap.ofList valOrder ffHats fHatM @@ -852,16 +863,16 @@ let CreateNewValuesForTLR g tlrS arityM fclassM envPackM = module Pass4_RewriteAssembly = [] type RewriteContext = - { ccu : CcuThunk - g : TcGlobals - tlrS : Zset - topValS : Zset - arityM : Zmap - fclassM : Zmap - recShortCallS : Zset - envPackM : Zmap + { ccu: CcuThunk + g: TcGlobals + tlrS: Zset + topValS: Zset + arityM: Zmap + fclassM: Zmap + recShortCallS: Zset + envPackM: Zmap /// The mapping from 'f' values to 'fHat' values - fHatM : Zmap + fHatM: Zmap } @@ -870,7 +881,7 @@ module Pass4_RewriteAssembly = //------------------------------------------------------------------------- type IsRecursive = IsRec | NotRec - type LiftedDeclaration = IsRecursive * Bindings (* where bool=true if letrec *) + type LiftedDeclaration = IsRecursive * Bindings (* where bool=true if letrec *) /// This state is related to lifting to top-level (which is actually disabled right now) /// This is to ensure the TLR constants get initialised once. @@ -885,70 +896,72 @@ module Pass4_RewriteAssembly = /// giving pre-declarations to insert before the outermost lambda expr. type RewriteState = { rws_mustinline: bool - /// counts level of enclosing "lambdas" - rws_innerLevel : int - /// collected preDecs (fringe is in-order) - rws_preDecs : Tree + /// counts level of enclosing "lambdas" + rws_innerLevel: int + /// collected preDecs (fringe is in-order) + rws_preDecs: Tree } let rewriteState0 = {rws_mustinline=false;rws_innerLevel=0;rws_preDecs=emptyTR} - // move in/out of lambdas (or lambda containing construct) + // move in/out of lambdas (or lambda containing construct) let EnterInner z = {z with rws_innerLevel = z.rws_innerLevel + 1} + let ExitInner z = {z with rws_innerLevel = z.rws_innerLevel - 1} - let EnterMustInline b z f = + let EnterMustInline b z f = let orig = z.rws_mustinline - let x,z' = f (if b then {z with rws_mustinline = true } else z) - {z' with rws_mustinline = orig },x + let x, z' = f (if b then {z with rws_mustinline = true } else z) + {z' with rws_mustinline = orig }, x - /// extract PreDecs (iff at top-level) + /// extract PreDecs (iff at top-level) let ExtractPreDecs z = // If level=0, so at top-level, then pop decs, // else keep until get back to a top-level point. if z.rws_innerLevel=0 then - // at top-level, extract preDecs + // at top-level, extract preDecs let preDecs = fringeTR z.rws_preDecs - preDecs,{z with rws_preDecs=emptyTR} - else - // not yet top-level, keep decs - [],z + preDecs, {z with rws_preDecs=emptyTR} + else + // not yet top-level, keep decs + [], z + + /// pop and set preDecs as "LiftedDeclaration tree" + let PopPreDecs z = {z with rws_preDecs=emptyTR}, z.rws_preDecs - /// pop and set preDecs as "LiftedDeclaration tree" - let PopPreDecs z = {z with rws_preDecs=emptyTR},z.rws_preDecs let SetPreDecs z pdt = {z with rws_preDecs=pdt} - /// collect Top* repr bindings - if needed... + /// collect Top* repr bindings - if needed... let LiftTopBinds _isRec _penv z binds = - z,binds - - /// Wrap preDecs (in order) over an expr - use letrec/let as approp - let MakePreDec m (isRec,binds: Bindings) expr = - if isRec=IsRec then + z, binds + + /// Wrap preDecs (in order) over an expr - use letrec/let as approp + let MakePreDec m (isRec, binds: Bindings) expr = + if isRec=IsRec then // By definition top level bindings don't refer to non-top level bindings, so we can build them in two parts - let topLevelBinds, nonTopLevelBinds = binds |> List.partition (fun bind -> bind.Var.IsCompiledAsTopLevel) + let topLevelBinds, nonTopLevelBinds = binds |> List.partition (fun bind -> bind.Var.IsCompiledAsTopLevel) mkLetRecBinds m topLevelBinds (mkLetRecBinds m nonTopLevelBinds expr) - else + else mkLetsFromBindings m binds expr /// Must MakePreDecs around every construct that could do EnterInner (which filters TLR decs). - /// i.e. let,letrec (bind may...), ilobj, lambda, tlambda. + /// i.e. let, letrec (bind may...), ilobj, lambda, tlambda. let MakePreDecs m preDecs expr = List.foldBack (MakePreDec m) preDecs expr let RecursivePreDecs pdsA pdsB = let pds = fringeTR (TreeNode[pdsA;pdsB]) let decs = pds |> List.collect snd - LeafNode (IsRec,decs) + LeafNode (IsRec, decs) //------------------------------------------------------------------------- // pass4: lowertop - convert_vterm_bind on TopLevel binds //------------------------------------------------------------------------- - let ConvertBind g (TBind(v,repr,_) as bind) = - match v.ValReprInfo with + let ConvertBind g (TBind(v, repr, _) as bind) = + match v.ValReprInfo with | None -> v.SetValReprInfo (Some (InferArityOfExprBinding g AllowTypeDirectedDetupling.Yes v repr )) | Some _ -> () - + bind //------------------------------------------------------------------------- @@ -956,82 +969,82 @@ module Pass4_RewriteAssembly = //------------------------------------------------------------------------- // Transform - // let f vss = f_body[,f_freeVars] + // let f vss = f_body[, f_freeVars] // To // let f vss = fHat f_freeVars vss - // let fHat f_freeVars vss = f_body[,f_freeVars] - let TransTLRBindings penv (binds:Bindings) = - if isNil binds then List.empty,List.empty else + // let fHat f_freeVars vss = f_body[, f_freeVars] + let TransTLRBindings penv (binds: Bindings) = + if isNil binds then List.empty, List.empty else let fc = BindingGroupSharingSameReqdItems binds - let envp = Zmap.force fc penv.envPackM ("TransTLRBindings",string) - - let fRebinding (TBind(fOrig,b,letSeqPtOpt)) = + let envp = Zmap.force fc penv.envPackM ("TransTLRBindings", string) + + let fRebinding (TBind(fOrig, b, letSeqPtOpt)) = let m = fOrig.Range - let tps,vss,_b,rty = stripTopLambda (b,fOrig.Type) - let aenvExprs = envp.ep_aenvs |> List.map (exprForVal m) - let vsExprs = vss |> List.map (mkRefTupledVars penv.g m) - let fHat = Zmap.force fOrig penv.fHatM ("fRebinding",nameOfVal) + let tps, vss, _b, rty = stripTopLambda (b, fOrig.Type) + let aenvExprs = envp.ep_aenvs |> List.map (exprForVal m) + let vsExprs = vss |> List.map (mkRefTupledVars penv.g m) + let fHat = Zmap.force fOrig penv.fHatM ("fRebinding", nameOfVal) (* REVIEW: is this mutation really, really necessary? *) (* Why are we applying TLR if the thing already has an arity? *) let fOrig = setValHasNoArity fOrig - let fBind = - mkMultiLambdaBind fOrig letSeqPtOpt m tps vss - (mkApps penv.g + let fBind = + mkMultiLambdaBind fOrig letSeqPtOpt m tps vss + (mkApps penv.g ((exprForVal m fHat, fHat.Type), [List.map mkTyparTy (envp.ep_etps @ tps)], - aenvExprs @ vsExprs,m),rty) - fBind + aenvExprs @ vsExprs, m), rty) + fBind - let fHatNewBinding (shortRecBinds:Bindings) (TBind(f,b,letSeqPtOpt)) = - let wf = Zmap.force f penv.arityM ("fHatNewBinding - arityM",nameOfVal) - let fHat = Zmap.force f penv.fHatM ("fHatNewBinding - fHatM",nameOfVal) + let fHatNewBinding (shortRecBinds: Bindings) (TBind(f, b, letSeqPtOpt)) = + let wf = Zmap.force f penv.arityM ("fHatNewBinding - arityM", nameOfVal) + let fHat = Zmap.force f penv.fHatM ("fHatNewBinding - fHatM", nameOfVal) // Take off the variables - let tps,vss,b,rty = stripTopLambda (b,f.Type) + let tps, vss, b, rty = stripTopLambda (b, f.Type) // Don't take all the variables - only up to length wf - let vssTake,vssDrop = List.splitAt wf vss + let vssTake, vssDrop = List.splitAt wf vss // put the variables back on - let b,rty = mkMultiLambdasCore b.Range vssDrop (b,rty) - // fHat, args + let b, rty = mkMultiLambdasCore b.Range vssDrop (b, rty) + // fHat, args let m = fHat.Range // Add the type variables to the front let fHat_tps = envp.ep_etps @ tps // Add the 'aenv' and original taken variables to the front let fHat_args = List.map List.singleton envp.ep_aenvs @ vssTake - let fHat_body = mkLetsFromBindings m envp.ep_unpack b - let fHat_body = mkLetsFromBindings m shortRecBinds fHat_body // bind "f" if have short recursive calls (somewhere) - // fHat binding, f rebinding - let fHatBind = mkMultiLambdaBind fHat letSeqPtOpt m fHat_tps fHat_args (fHat_body,rty) + let fHat_body = mkLetsFromBindings m envp.ep_unpack b + let fHat_body = mkLetsFromBindings m shortRecBinds fHat_body // bind "f" if have short recursive calls (somewhere) + // fHat binding, f rebinding + let fHatBind = mkMultiLambdaBind fHat letSeqPtOpt m fHat_tps fHat_args (fHat_body, rty) fHatBind - let rebinds = binds |> List.map fRebinding - let shortRecBinds = rebinds |> List.filter (fun b -> penv.recShortCallS.Contains(b.Var)) - let newBinds = binds |> List.map (fHatNewBinding shortRecBinds) - newBinds,rebinds + let rebinds = binds |> List.map fRebinding + let shortRecBinds = rebinds |> List.filter (fun b -> penv.recShortCallS.Contains(b.Var)) + let newBinds = binds |> List.map (fHatNewBinding shortRecBinds) + newBinds, rebinds let GetAEnvBindings penv fc = match Zmap.tryFind fc penv.envPackM with - | None -> List.empty // no env for this mutual binding - | Some envp -> envp.ep_pack // environment pack bindings + | None -> List.empty // no env for this mutual binding + | Some envp -> envp.ep_pack // environment pack bindings - let TransBindings xisRec penv (binds:Bindings) = - let tlrBs,nonTlrBs = binds |> List.partition (fun b -> Zset.contains b.Var penv.tlrS) + let TransBindings xisRec penv (binds: Bindings) = + let tlrBs, nonTlrBs = binds |> List.partition (fun b -> Zset.contains b.Var penv.tlrS) let fclass = BindingGroupSharingSameReqdItems tlrBs - // Trans each TLR f binding into fHat and f rebind - let newTlrBinds,tlrRebinds = TransTLRBindings penv tlrBs + // Trans each TLR f binding into fHat and f rebind + let newTlrBinds, tlrRebinds = TransTLRBindings penv tlrBs let aenvBinds = GetAEnvBindings penv fclass - // lower nonTlrBs if they are GTL - // QUERY: we repeat this logic in LowerCallsAndSeqs. Do we really need to do this here? - // QUERY: yes and no - if we don't, we have an unrealizable term, and many decisions must - // QUERY: correlate with LowerCallsAndSeqs. - let forceTopBindToHaveArity (bind:Binding) = - if penv.topValS.Contains(bind.Var) then ConvertBind penv.g bind + // lower nonTlrBs if they are GTL + // QUERY: we repeat this logic in LowerCallsAndSeqs. Do we really need to do this here? + // QUERY: yes and no - if we don't, we have an unrealizable term, and many decisions must + // QUERY: correlate with LowerCallsAndSeqs. + let forceTopBindToHaveArity (bind: Binding) = + if penv.topValS.Contains(bind.Var) then ConvertBind penv.g bind else bind - let nonTlrBs = nonTlrBs |> List.map forceTopBindToHaveArity - let tlrRebinds = tlrRebinds |> List.map forceTopBindToHaveArity - // assemble into replacement bindings - let bindAs,rebinds = + let nonTlrBs = nonTlrBs |> List.map forceTopBindToHaveArity + let tlrRebinds = tlrRebinds |> List.map forceTopBindToHaveArity + // assemble into replacement bindings + let bindAs, rebinds = match xisRec with - | IsRec -> newTlrBinds @ tlrRebinds @ nonTlrBs @ aenvBinds,[] (* note: aenv last, order matters in letrec! *) + | IsRec -> newTlrBinds @ tlrRebinds @ nonTlrBs @ aenvBinds, [] (* note: aenv last, order matters in letrec! *) | NotRec -> aenvBinds @ newTlrBinds, tlrRebinds @ nonTlrBs (* note: aenv go first, they may be used *) bindAs, rebinds @@ -1040,28 +1053,28 @@ module Pass4_RewriteAssembly = // pass4: TransApp (translate) //------------------------------------------------------------------------- - let TransApp penv (fx,fty,tys,args,m) = - // Is it a val app, where the val f is TLR with arity wf? - // CLEANUP NOTE: should be using a mkApps to make all applications + let TransApp penv (fx, fty, tys, args, m) = + // Is it a val app, where the val f is TLR with arity wf? + // CLEANUP NOTE: should be using a mkApps to make all applications match fx with - | Expr.Val (fvref:ValRef,_,m) when + | Expr.Val (fvref: ValRef, _, m) when (Zset.contains fvref.Deref penv.tlrS) && - (let wf = Zmap.force fvref.Deref penv.arityM ("TransApp - wf",nameOfVal) + (let wf = Zmap.force fvref.Deref penv.arityM ("TransApp - wf", nameOfVal) IsArityMet fvref wf tys args) -> let f = fvref.Deref (* replace by direct call to corresponding fHat (and additional closure args) *) - let fc = Zmap.force f penv.fclassM ("TransApp - fc",nameOfVal) - let envp = Zmap.force fc penv.envPackM ("TransApp - envp",string) - let fHat = Zmap.force f penv.fHatM ("TransApp - fHat",nameOfVal) + let fc = Zmap.force f penv.fclassM ("TransApp - fc", nameOfVal) + let envp = Zmap.force fc penv.envPackM ("TransApp - envp", string) + let fHat = Zmap.force f penv.fHatM ("TransApp - fHat", nameOfVal) let tys = (List.map mkTyparTy envp.ep_etps) @ tys let aenvExprs = List.map (exprForVal m) envp.ep_aenvs let args = aenvExprs @ args - mkApps penv.g ((exprForVal m fHat, fHat.Type),[tys],args,m) (* change, direct fHat call with closure (reqdTypars,aenvs) *) - | _ -> - if isNil tys && isNil args then - fx - else Expr.App (fx,fty,tys,args,m) + mkApps penv.g ((exprForVal m fHat, fHat.Type), [tys], args, m) (* change, direct fHat call with closure (reqdTypars, aenvs) *) + | _ -> + if isNil tys && isNil args then + fx + else Expr.App (fx, fty, tys, args, m) (* no change, f is expr *) //------------------------------------------------------------------------- @@ -1070,225 +1083,243 @@ module Pass4_RewriteAssembly = /// At bindings, fixup any TLR bindings. /// At applications, fixup calls if they are arity-met instances of TLR. - /// At free vals, fixup 0-call if it is an arity-met constant. + /// At free vals, fixup 0-call if it is an arity-met constant. /// Other cases rewrite structurally. - let rec TransExpr (penv: RewriteContext) (z:RewriteState) expr : Expr * RewriteState = + let rec TransExpr (penv: RewriteContext) (z: RewriteState) expr: Expr * RewriteState = + match expr with - // Use TransLinearExpr with a rebuild-continuation for some forms to avoid stack overflows on large terms *) - | Expr.LetRec _ | Expr.Let _ | Expr.Sequential _ -> + // Use TransLinearExpr with a rebuild-continuation for some forms to avoid stack overflows on large terms + | LinearOpExpr _ + | LinearMatchExpr _ + | Expr.LetRec _ // note, Expr.LetRec not normally considered linear, but keeping it here as it's always been here + | Expr.Let _ + | Expr.Sequential _ -> TransLinearExpr penv z expr (fun res -> res) // app - call sites may require z. // - match the app (collapsing reclinks and type instances). // - patch it. - | Expr.App (f,fty,tys,args,m) -> - // pass over f,args subexprs - let f,z = TransExpr penv z f - let args,z = List.mapFold (TransExpr penv) z args - // match app, and fixup if needed - let f,fty,tys,args,m = destApp (f,fty,tys,args,m) - let expr = TransApp penv (f,fty,tys,args,m) - expr,z - - | Expr.Val (v,_,m) -> - // consider this a trivial app - let fx,fty = expr,v.Type - let expr = TransApp penv (fx,fty,[],[],m) - expr,z - - // reclink - suppress + | Expr.App (f, fty, tys, args, m) -> + // pass over f, args subexprs + let f, z = TransExpr penv z f + let args, z = List.mapFold (TransExpr penv) z args + // match app, and fixup if needed + let f, fty, tys, args, m = destApp (f, fty, tys, args, m) + let expr = TransApp penv (f, fty, tys, args, m) + expr, z + + | Expr.Val (v, _, m) -> + // consider this a trivial app + let fx, fty = expr, v.Type + let expr = TransApp penv (fx, fty, [], [], m) + expr, z + + // reclink - suppress | Expr.Link r -> TransExpr penv z (!r) - // ilobj - has implicit lambda exprs and recursive/base references - | Expr.Obj (_,ty,basev,basecall,overrides,iimpls,m) -> - let basecall,z = TransExpr penv z basecall - let overrides,z = List.mapFold (TransMethod penv) z overrides - let (iimpls:(TType*ObjExprMethod list)list),(z:RewriteState) = - List.mapFold (fun z (tType,objExprs) -> - let objExprs',z' = List.mapFold (TransMethod penv) z objExprs - (tType,objExprs'),z') z iimpls - let expr = Expr.Obj(newUnique(),ty,basev,basecall,overrides,iimpls,m) - let pds,z = ExtractPreDecs z - MakePreDecs m pds expr,z (* if TopLevel, lift preDecs over the ilobj expr *) - - // lambda, tlambda - explicit lambda terms - | Expr.Lambda(_,ctorThisValOpt,baseValOpt,argvs,body,m,rty) -> + // ilobj - has implicit lambda exprs and recursive/base references + | Expr.Obj (_, ty, basev, basecall, overrides, iimpls, m) -> + let basecall, z = TransExpr penv z basecall + let overrides, z = List.mapFold (TransMethod penv) z overrides + let (iimpls:(TType*ObjExprMethod list)list), (z: RewriteState) = + List.mapFold (fun z (tType, objExprs) -> + let objExprs', z' = List.mapFold (TransMethod penv) z objExprs + (tType, objExprs'), z') z iimpls + let expr = Expr.Obj(newUnique(), ty, basev, basecall, overrides, iimpls, m) + let pds, z = ExtractPreDecs z + MakePreDecs m pds expr, z (* if TopLevel, lift preDecs over the ilobj expr *) + + // lambda, tlambda - explicit lambda terms + | Expr.Lambda(_, ctorThisValOpt, baseValOpt, argvs, body, m, rty) -> let z = EnterInner z - let body,z = TransExpr penv z body + let body, z = TransExpr penv z body let z = ExitInner z - let pds,z = ExtractPreDecs z - MakePreDecs m pds (rebuildLambda m ctorThisValOpt baseValOpt argvs (body,rty)),z + let pds, z = ExtractPreDecs z + MakePreDecs m pds (rebuildLambda m ctorThisValOpt baseValOpt argvs (body, rty)), z - | Expr.TyLambda(_,argtyvs,body,m,rty) -> + | Expr.TyLambda(_, argtyvs, body, m, rty) -> let z = EnterInner z - let body,z = TransExpr penv z body + let body, z = TransExpr penv z body let z = ExitInner z - let pds,z = ExtractPreDecs z - MakePreDecs m pds (mkTypeLambda m argtyvs (body,rty)),z + let pds, z = ExtractPreDecs z + MakePreDecs m pds (mkTypeLambda m argtyvs (body, rty)), z /// Lifting TLR out over constructs (disabled) /// Lift minimally to ensure the defn is not lifted up and over defns on which it depends (disabled) - | Expr.Match(spBind,exprm,dtree,targets,m,ty) -> + | Expr.Match(spBind, exprm, dtree, targets, m, ty) -> let targets = Array.toList targets - let dtree,z = TransDecisionTree penv z dtree - let targets,z = List.mapFold (TransDecisionTreeTarget penv) z targets + let dtree, z = TransDecisionTree penv z dtree + let targets, z = List.mapFold (TransDecisionTreeTarget penv) z targets // TransDecisionTreeTarget wraps EnterInner/exitInnter, so need to collect any top decs let pds,z = ExtractPreDecs z - MakePreDecs m pds (mkAndSimplifyMatch spBind exprm m ty dtree targets),z + MakePreDecs m pds (mkAndSimplifyMatch spBind exprm m ty dtree targets), z // all others - below - rewrite structurally - so boiler plate code after this point... - | Expr.Const _ -> expr,z (* constant wrt Val *) + | Expr.Const _ -> + expr,z + | Expr.Quote (a,{contents=Some(typeDefs,argTypes,argExprs,data)},isFromQueryExpression,m,ty) -> let argExprs,z = List.mapFold (TransExpr penv) z argExprs Expr.Quote(a,{contents=Some(typeDefs,argTypes,argExprs,data)},isFromQueryExpression,m,ty),z + | Expr.Quote (a,{contents=None},isFromQueryExpression,m,ty) -> Expr.Quote(a,{contents=None},isFromQueryExpression,m,ty),z + | Expr.Op (c,tyargs,args,m) -> let args,z = List.mapFold (TransExpr penv) z args Expr.Op(c,tyargs,args,m),z + | Expr.StaticOptimization (constraints,e2,e3,m) -> let e2,z = TransExpr penv z e2 let e3,z = TransExpr penv z e3 Expr.StaticOptimization(constraints,e2,e3,m),z + | Expr.TyChoose (_,_,m) -> error(Error(FSComp.SR.tlrUnexpectedTExpr(),m)) /// Walk over linear structured terms in tail-recursive loop, using a continuation /// to represent the rebuild-the-term stack and TransLinearExpr penv z expr (contf: Expr * RewriteState -> Expr * RewriteState) = - match expr with - | Expr.Sequential (e1,e2,dir,spSeq,m) -> - let e1,z = TransExpr penv z e1 - TransLinearExpr penv z e2 (contf << (fun (e2,z) -> - Expr.Sequential(e1,e2,dir,spSeq,m),z)) - - // letrec - pass_recbinds does the work - | Expr.LetRec (binds,e,m,_) -> + match expr with + | Expr.Sequential (e1, e2, dir, spSeq, m) -> + let e1, z = TransExpr penv z e1 + TransLinearExpr penv z e2 (contf << (fun (e2, z) -> + Expr.Sequential(e1, e2, dir, spSeq, m), z)) + + // letrec - pass_recbinds does the work + | Expr.LetRec (binds, e, m, _) -> let z = EnterInner z - // For letrec, preDecs from RHS must mutually recurse with those from the bindings - let z,pdsPrior = PopPreDecs z - let binds,z = List.mapFold (TransBindingRhs penv) z binds - let z,pdsRhs = PopPreDecs z - let binds,rebinds = TransBindings IsRec penv binds - let z,binds = LiftTopBinds IsRec penv z binds (* factor Top* repr binds *) - let z,rebinds = LiftTopBinds IsRec penv z rebinds - let z,pdsBind = PopPreDecs z + // For letrec, preDecs from RHS must mutually recurse with those from the bindings + let z, pdsPrior = PopPreDecs z + let binds, z = List.mapFold (TransBindingRhs penv) z binds + let z, pdsRhs = PopPreDecs z + let binds, rebinds = TransBindings IsRec penv binds + let z, binds = LiftTopBinds IsRec penv z binds (* factor Top* repr binds *) + let z, rebinds = LiftTopBinds IsRec penv z rebinds + let z, pdsBind = PopPreDecs z let z = SetPreDecs z (TreeNode [pdsPrior;RecursivePreDecs pdsBind pdsRhs]) let z = ExitInner z - let pds,z = ExtractPreDecs z + let pds, z = ExtractPreDecs z // tailcall - TransLinearExpr penv z e (contf << (fun (e,z) -> + TransLinearExpr penv z e (contf << (fun (e, z) -> let e = mkLetsFromBindings m rebinds e - MakePreDecs m pds (Expr.LetRec (binds,e,m,NewFreeVarsCache())),z)) - - // let - can consider the mu-let bindings as mu-letrec bindings - so like as above - | Expr.Let (bind,e,m,_) -> - - // For let, preDecs from RHS go before those of bindings, which is collection order - let bind,z = TransBindingRhs penv z bind - let binds,rebinds = TransBindings NotRec penv [bind] - // factor Top* repr binds - let z,binds = LiftTopBinds NotRec penv z binds - let z,rebinds = LiftTopBinds NotRec penv z rebinds - // any lifted PreDecs from binding, if so wrap them... - let pds,z = ExtractPreDecs z + MakePreDecs m pds (Expr.LetRec (binds, e, m, NewFreeVarsCache())), z)) + + // let - can consider the mu-let bindings as mu-letrec bindings - so like as above + | Expr.Let (bind, e, m, _) -> + + // For let, preDecs from RHS go before those of bindings, which is collection order + let bind, z = TransBindingRhs penv z bind + let binds, rebinds = TransBindings NotRec penv [bind] + // factor Top* repr binds + let z, binds = LiftTopBinds NotRec penv z binds + let z, rebinds = LiftTopBinds NotRec penv z rebinds + // any lifted PreDecs from binding, if so wrap them... + let pds, z = ExtractPreDecs z // tailcall - TransLinearExpr penv z e (contf << (fun (e,z) -> + TransLinearExpr penv z e (contf << (fun (e, z) -> let e = mkLetsFromBindings m rebinds e - MakePreDecs m pds (mkLetsFromBindings m binds e),z)) + MakePreDecs m pds (mkLetsFromBindings m binds e), z)) - | LinearMatchExpr (spBind,exprm,dtree,tg1,e2,sp2,m2,ty) -> - let dtree,z = TransDecisionTree penv z dtree - let tg1,z = TransDecisionTreeTarget penv z tg1 + | LinearMatchExpr (spBind, exprm, dtree, tg1, e2, sp2, m2, ty) -> + let dtree, z = TransDecisionTree penv z dtree + let tg1, z = TransDecisionTreeTarget penv z tg1 // tailcall - TransLinearExpr penv z e2 (contf << (fun (e2,z) -> - rebuildLinearMatchExpr (spBind,exprm,dtree,tg1,e2,sp2,m2,ty),z)) + TransLinearExpr penv z e2 (contf << (fun (e2, z) -> + rebuildLinearMatchExpr (spBind, exprm, dtree, tg1, e2, sp2, m2, ty), z)) + + | LinearOpExpr (op, tyargs, argsHead, argLast, m) -> + let argsHead,z = List.mapFold (TransExpr penv) z argsHead + // tailcall + TransLinearExpr penv z argLast (contf << (fun (argLast, z) -> + rebuildLinearOpExpr (op, tyargs, argsHead, argLast, m), z)) | _ -> + // not a linear expression contf (TransExpr penv z expr) - - and TransMethod penv (z:RewriteState) (TObjExprMethod(slotsig,attribs,tps,vs,e,m)) = - let z = EnterInner z - let e,z = TransExpr penv z e - let z = ExitInner z - TObjExprMethod(slotsig,attribs,tps,vs,e,m),z - and TransBindingRhs penv z (TBind(v,e,letSeqPtOpt)) : Binding * RewriteState = + and TransMethod penv (z: RewriteState) (TObjExprMethod(slotsig, attribs, tps, vs, e, m)) = + let z = EnterInner z + let e, z = TransExpr penv z e + let z = ExitInner z + TObjExprMethod(slotsig, attribs, tps, vs, e, m), z + + and TransBindingRhs penv z (TBind(v, e, letSeqPtOpt)) : Binding * RewriteState = let mustInline = v.MustInline - let z,e = EnterMustInline mustInline z (fun z -> TransExpr penv z e) - TBind (v,e,letSeqPtOpt),z - - and TransDecisionTree penv z x : DecisionTree * RewriteState = - match x with - | TDSuccess (es,n) -> - let es,z = List.mapFold (TransExpr penv) z es - TDSuccess(es,n),z - | TDBind (bind,rest) -> - let bind,z = TransBindingRhs penv z bind - let rest,z = TransDecisionTree penv z rest - TDBind(bind,rest),z - | TDSwitch (e,cases,dflt,m) -> - let e,z = TransExpr penv z e - let TransDecisionTreeCase penv z (TCase (discrim,dtree)) = - let dtree,z = TransDecisionTree penv z dtree - TCase(discrim,dtree),z - - let cases,z = List.mapFold (TransDecisionTreeCase penv) z cases - let dflt,z = Option.mapFold (TransDecisionTree penv) z dflt - TDSwitch (e,cases,dflt,m),z - - and TransDecisionTreeTarget penv z (TTarget(vs,e,spTarget)) = - let z = EnterInner z - let e,z = TransExpr penv z e + let z, e = EnterMustInline mustInline z (fun z -> TransExpr penv z e) + TBind (v, e, letSeqPtOpt), z + + and TransDecisionTree penv z x: DecisionTree * RewriteState = + match x with + | TDSuccess (es, n) -> + let es, z = List.mapFold (TransExpr penv) z es + TDSuccess(es, n), z + | TDBind (bind, rest) -> + let bind, z = TransBindingRhs penv z bind + let rest, z = TransDecisionTree penv z rest + TDBind(bind, rest), z + | TDSwitch (e, cases, dflt, m) -> + let e, z = TransExpr penv z e + let TransDecisionTreeCase penv z (TCase (discrim, dtree)) = + let dtree, z = TransDecisionTree penv z dtree + TCase(discrim, dtree), z + + let cases, z = List.mapFold (TransDecisionTreeCase penv) z cases + let dflt, z = Option.mapFold (TransDecisionTree penv) z dflt + TDSwitch (e, cases, dflt, m), z + + and TransDecisionTreeTarget penv z (TTarget(vs, e, spTarget)) = + let z = EnterInner z + let e, z = TransExpr penv z e let z = ExitInner z - TTarget(vs,e,spTarget),z + TTarget(vs, e, spTarget), z - and TransValBinding penv z bind = TransBindingRhs penv z bind + and TransValBinding penv z bind = TransBindingRhs penv z bind and TransValBindings penv z binds = List.mapFold (TransValBinding penv) z binds - and TransModuleExpr penv z x = - match x with - | ModuleOrNamespaceExprWithSig(mty, def, m) -> - let def,z = TransModuleDef penv z def - ModuleOrNamespaceExprWithSig(mty, def, m),z - + and TransModuleExpr penv z x = + match x with + | ModuleOrNamespaceExprWithSig(mty, def, m) -> + let def, z = TransModuleDef penv z def + ModuleOrNamespaceExprWithSig(mty, def, m), z + and TransModuleDefs penv z x = List.mapFold (TransModuleDef penv) z x - and TransModuleDef penv (z: RewriteState) x : ModuleOrNamespaceExpr * RewriteState = - match x with - | TMDefRec(isRec,tycons,mbinds,m) -> - let mbinds,z = TransModuleBindings penv z mbinds - TMDefRec(isRec,tycons,mbinds,m),z - | TMDefLet(bind,m) -> - let bind,z = TransValBinding penv z bind - TMDefLet(bind,m),z - | TMDefDo(e,m) -> - let _bind,z = TransExpr penv z e - TMDefDo(e,m),z - | TMDefs(defs) -> - let defs,z = TransModuleDefs penv z defs - TMDefs(defs),z - | TMAbstract(mexpr) -> - let mexpr,z = TransModuleExpr penv z mexpr - TMAbstract(mexpr),z + and TransModuleDef penv (z: RewriteState) x: ModuleOrNamespaceExpr * RewriteState = + match x with + | TMDefRec(isRec, tycons, mbinds, m) -> + let mbinds, z = TransModuleBindings penv z mbinds + TMDefRec(isRec, tycons, mbinds, m), z + | TMDefLet(bind, m) -> + let bind, z = TransValBinding penv z bind + TMDefLet(bind, m), z + | TMDefDo(e, m) -> + let _bind, z = TransExpr penv z e + TMDefDo(e, m), z + | TMDefs(defs) -> + let defs, z = TransModuleDefs penv z defs + TMDefs(defs), z + | TMAbstract(mexpr) -> + let mexpr, z = TransModuleExpr penv z mexpr + TMAbstract(mexpr), z and TransModuleBindings penv z binds = List.mapFold (TransModuleBinding penv) z binds - and TransModuleBinding penv z x = - match x with - | ModuleOrNamespaceBinding.Binding bind -> - let bind,z = TransValBinding penv z bind - ModuleOrNamespaceBinding.Binding bind,z - | ModuleOrNamespaceBinding.Module(nm, rhs) -> - let rhs,z = TransModuleDef penv z rhs - ModuleOrNamespaceBinding.Module(nm,rhs),z - - let TransImplFile penv z (TImplFile(fragName,pragmas,moduleExpr,hasExplicitEntryPoint,isScript,anonRecdTypes)) = - let moduleExpr,z = TransModuleExpr penv z moduleExpr - (TImplFile(fragName,pragmas,moduleExpr,hasExplicitEntryPoint,isScript,anonRecdTypes)),z + and TransModuleBinding penv z x = + match x with + | ModuleOrNamespaceBinding.Binding bind -> + let bind, z = TransValBinding penv z bind + ModuleOrNamespaceBinding.Binding bind, z + | ModuleOrNamespaceBinding.Module(nm, rhs) -> + let rhs, z = TransModuleDef penv z rhs + ModuleOrNamespaceBinding.Module(nm, rhs), z + + let TransImplFile penv z (TImplFile(fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes)) = + let moduleExpr, z = TransModuleExpr penv z moduleExpr + (TImplFile(fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes)), z //------------------------------------------------------------------------- // pass5: copyExpr //------------------------------------------------------------------------- -let RecreateUniqueBounds g expr = +let RecreateUniqueBounds g expr = copyImplFile g OnlyCloneExprVals expr //------------------------------------------------------------------------- @@ -1297,28 +1328,28 @@ let RecreateUniqueBounds g expr = let MakeTLRDecisions ccu g expr = try - // pass1: choose the f to be TLR with arity(f) - let tlrS,topValS, arityM = Pass1_DetermineTLRAndArities.DetermineTLRAndArities g expr + // pass1: choose the f to be TLR with arity(f) + let tlrS, topValS, arityM = Pass1_DetermineTLRAndArities.DetermineTLRAndArities g expr - // pass2: determine the typar/freevar closures, f->fclass and fclass declist - let reqdItemsMap,fclassM,declist,recShortCallS = Pass2_DetermineReqdItems.DetermineReqdItems (tlrS,arityM) expr + // pass2: determine the typar/freevar closures, f->fclass and fclass declist + let reqdItemsMap, fclassM, declist, recShortCallS = Pass2_DetermineReqdItems.DetermineReqdItems (tlrS, arityM) expr // pass3 let envPackM = ChooseReqdItemPackings g fclassM topValS declist reqdItemsMap let fHatM = CreateNewValuesForTLR g tlrS arityM fclassM envPackM - // pass4: rewrite + // pass4: rewrite if verboseTLR then dprintf "TransExpr(rw)------\n" - let expr,_ = - let penv : Pass4_RewriteAssembly.RewriteContext = + let expr, _ = + let penv: Pass4_RewriteAssembly.RewriteContext = {ccu=ccu; g=g; tlrS=tlrS; topValS=topValS; arityM=arityM; fclassM=fclassM; recShortCallS=recShortCallS; envPackM=envPackM; fHatM=fHatM} let z = Pass4_RewriteAssembly.rewriteState0 Pass4_RewriteAssembly.TransImplFile penv z expr - // pass5: copyExpr to restore "each bound is unique" property - // aka, copyExpr + // pass5: copyExpr to restore "each bound is unique" property + // aka, copyExpr if verboseTLR then dprintf "copyExpr------\n" - let expr = RecreateUniqueBounds g expr + let expr = RecreateUniqueBounds g expr if verboseTLR then dprintf "TLR-done------\n" // Summary: @@ -1329,9 +1360,9 @@ let MakeTLRDecisions ccu g expr = // (lengthS (Zset.diff tlrS topValS)) // (lengthS (Zset.inter topValS tlrS)) // (lengthS (Zset.diff topValS tlrS)) - - // DONE + + // DONE expr - with AbortTLR m -> - warning(Error(FSComp.SR.tlrLambdaLiftingOptimizationsNotApplied(),m)) + with AbortTLR m -> + warning(Error(FSComp.SR.tlrLambdaLiftingOptimizationsNotApplied(), m)) expr diff --git a/src/fcs-fable/src/fsharp/LexFilter.fs b/src/fcs-fable/src/fsharp/LexFilter.fs index bba9d9a646..157b5bba3e 100755 --- a/src/fcs-fable/src/fsharp/LexFilter.fs +++ b/src/fcs-fable/src/fsharp/LexFilter.fs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. /// LexFilter - process the token stream prior to parsing. /// Implements the offside rule and a copule of other lexical transformations. @@ -15,16 +15,15 @@ open FSharp.Compiler.ErrorLogger open FSharp.Compiler.Parser open FSharp.Compiler.Lexhelp - let debug = false -let stringOfPos (p:Position) = sprintf "(%d:%d)" p.OriginalLine p.Column -let outputPos os (p:Position) = Printf.fprintf os "(%d:%d)" p.OriginalLine p.Column +let stringOfPos (p: Position) = sprintf "(%d:%d)" p.OriginalLine p.Column +let outputPos os (p: Position) = Printf.fprintf os "(%d:%d)" p.OriginalLine p.Column /// Used for warning strings, which should display columns as 1-based and display /// the lines after taking '# line' directives into account (i.e. do not use /// p.OriginalLine) -let warningStringOfPos (p:Position) = sprintf "(%d:%d)" p.Line (p.Column + 1) +let warningStringOfPos (p: Position) = sprintf "(%d:%d)" p.Line (p.Column + 1) type Context = // Position is position of keyword. @@ -47,15 +46,15 @@ type Context = | CtxtInterfaceHead of Position | CtxtTypeDefns of Position // 'type =', not removed when we find the "=" - | CtxtNamespaceHead of Position * token - | CtxtModuleHead of Position * token + | CtxtNamespaceHead of Position * token + | CtxtModuleHead of Position * token | CtxtMemberHead of Position | CtxtMemberBody of Position // If bool is true then this is "whole file" // module A.B // If bool is false, this is a "module declaration" // module A = ... - | CtxtModuleBody of Position * bool + | CtxtModuleBody of Position * bool | CtxtNamespaceBody of Position | CtxtException of Position | CtxtParen of Parser.token * Position @@ -66,12 +65,12 @@ type Context = member c.StartPos = match c with - | CtxtNamespaceHead (p,_) | CtxtModuleHead (p,_) | CtxtException p | CtxtModuleBody (p,_) | CtxtNamespaceBody p - | CtxtLetDecl (_,p) | CtxtDo p | CtxtInterfaceHead p | CtxtTypeDefns p | CtxtParen (_,p) | CtxtMemberHead p | CtxtMemberBody p + | CtxtNamespaceHead (p, _) | CtxtModuleHead (p, _) | CtxtException p | CtxtModuleBody (p, _) | CtxtNamespaceBody p + | CtxtLetDecl (_, p) | CtxtDo p | CtxtInterfaceHead p | CtxtTypeDefns p | CtxtParen (_, p) | CtxtMemberHead p | CtxtMemberBody p | CtxtWithAsLet p | CtxtWithAsAugment p - | CtxtMatchClauses (_,p) | CtxtIf p | CtxtMatch p | CtxtFor p | CtxtWhile p | CtxtWhen p | CtxtFunction p | CtxtFun p | CtxtTry p | CtxtThen p | CtxtElse p | CtxtVanilla (p,_) - | CtxtSeqBlock (_,p,_) -> p + | CtxtMatchClauses (_, p) | CtxtIf p | CtxtMatch p | CtxtFor p | CtxtWhile p | CtxtWhen p | CtxtFunction p | CtxtFun p | CtxtTry p | CtxtThen p | CtxtElse p | CtxtVanilla (p, _) + | CtxtSeqBlock (_, p, _) -> p member c.StartCol = c.StartPos.Column @@ -82,7 +81,7 @@ type Context = | CtxtException _ -> "exception" | CtxtModuleBody _ -> "modbody" | CtxtNamespaceBody _ -> "nsbody" - | CtxtLetDecl(b,p) -> sprintf "let(%b,%s)" b (stringOfPos p) + | CtxtLetDecl(b, p) -> sprintf "let(%b, %s)" b (stringOfPos p) | CtxtWithAsLet p -> sprintf "withlet(%s)" (stringOfPos p) | CtxtWithAsAugment _ -> "withaug" | CtxtDo _ -> "do" @@ -91,7 +90,7 @@ type Context = | CtxtParen _ -> "paren" | CtxtMemberHead _ -> "member-head" | CtxtMemberBody _ -> "body" - | CtxtSeqBlock (b,p,_addBlockEnd) -> sprintf "seqblock(%s,%s)" (match b with FirstInSeqBlock -> "first" | NotFirstInSeqBlock -> "subsequent") (stringOfPos p) + | CtxtSeqBlock (b, p, _addBlockEnd) -> sprintf "seqblock(%s, %s)" (match b with FirstInSeqBlock -> "first" | NotFirstInSeqBlock -> "subsequent") (stringOfPos p) | CtxtMatchClauses _ -> "matching" | CtxtIf _ -> "if" @@ -105,7 +104,7 @@ type Context = | CtxtThen _ -> "then" | CtxtElse p -> sprintf "else(%s)" (stringOfPos p) - | CtxtVanilla (p,_) -> sprintf "vanilla(%s)" (stringOfPos p) + | CtxtVanilla (p, _) -> sprintf "vanilla(%s)" (stringOfPos p) and AddBlockEnd = AddBlockEnd | NoAddBlockEnd | AddOneSidedBlockEnd and FirstInSequence = FirstInSeqBlock | NotFirstInSeqBlock @@ -153,12 +152,12 @@ let isNonAssocInfixToken token = let infixTokenLength token = match token with - | COMMA -> 1 + | COMMA -> 1 | AMP -> 1 | OR -> 1 | DOLLAR -> 1 | MINUS -> 1 - | STAR -> 1 + | STAR -> 1 | BAR -> 1 | LESS false -> 1 | GREATER false -> 1 @@ -185,13 +184,13 @@ let infixTokenLength token = let rec isIfBlockContinuator token = match token with // The following tokens may align with the "if" without closing the "if", e.g. - // if ... - // then ... + // if ... + // then ... // elif ... // else ... | THEN | ELSE | ELIF -> true // Likewise - // if ... then ( + // if ... then ( // ) elif begin // end else ... | END | RPAREN -> true @@ -260,10 +259,10 @@ let rec isTypeContinuator token = // type X = // | A // | B - // and Y = c <--- 'and' HERE + // and Y = c <--- 'and' HERE // // type X = { - // x: int; + // x: int // y: int // } <--- '}' HERE // and Y = c @@ -337,10 +336,10 @@ let rec isSeqBlockElementContinuator token = match token with // The following tokens may align with the first column of a sequence block without closing a sequence element and starting a new one *) // e.g. - // new MenuItem("&Open...", + // new MenuItem("&Open...", // new EventHandler(fun _ _ -> // ... - // ), <------- NOTE RPAREN HERE + // ), <------- NOTE RPAREN HERE // Shortcut.CtrlO) | END | AND | WITH | THEN | RPAREN | RBRACE | BAR_RBRACE | RBRACK | BAR_RBRACK | RQUOTE _ -> true @@ -368,7 +367,7 @@ let isAtomicExprEndToken token = | IDENT _ | INT8 _ | INT16 _ | INT32 _ | INT64 _ | NATIVEINT _ | UINT8 _ | UINT16 _ | UINT32 _ | UINT64 _ | UNATIVEINT _ - | DECIMAL _ | BIGNUM _ | STRING _ | BYTEARRAY _ | CHAR _ + | DECIMAL _ | BIGNUM _ | STRING _ | BYTEARRAY _ | CHAR _ | IEEE32 _ | IEEE64 _ | RPAREN | RBRACK | RBRACE | BAR_RBRACE | BAR_RBRACK | END | NULL | FALSE | TRUE | UNDERSCORE -> true @@ -378,25 +377,25 @@ let isAtomicExprEndToken token = // give a 'begin' token, does an 'end' token match? //-------------------------------------------------------------------------- let parenTokensBalance t1 t2 = - match t1,t2 with - | (LPAREN,RPAREN) - | (LBRACE,RBRACE) - | (LBRACE_BAR,BAR_RBRACE) - | (LBRACK,RBRACK) - | (INTERFACE,END) - | (CLASS,END) - | (SIG,END) - | (STRUCT,END) - | (LBRACK_BAR,BAR_RBRACK) - | (LESS true,GREATER true) - | (BEGIN,END) -> true - | (LQUOTE q1,RQUOTE q2) when q1 = q2 -> true + match t1, t2 with + | (LPAREN, RPAREN) + | (LBRACE, RBRACE) + | (LBRACE_BAR, BAR_RBRACE) + | (LBRACK, RBRACK) + | (INTERFACE, END) + | (CLASS, END) + | (SIG, END) + | (STRUCT, END) + | (LBRACK_BAR, BAR_RBRACK) + | (LESS true, GREATER true) + | (BEGIN, END) -> true + | (LQUOTE q1, RQUOTE q2) when q1 = q2 -> true | _ -> false /// Used to save some aspects of the lexbuffer state [] -type LexbufState(startPos: Position, - endPos : Position, +type LexbufState(startPos: Position, + endPos : Position, pastEOF : bool) = member x.StartPos = startPos member x.EndPos = endPos @@ -414,7 +413,7 @@ type TokenTup = val Token : token val LexbufState : LexbufState val LastTokenPos: PositionTuple - new (token,state,lastTokenPos) = { Token=token; LexbufState=state;LastTokenPos=lastTokenPos } + new (token, state, lastTokenPos) = { Token=token; LexbufState=state;LastTokenPos=lastTokenPos } /// Returns starting position of the token member x.StartPos = x.LexbufState.StartPos @@ -424,15 +423,15 @@ type TokenTup = /// Returns a token 'tok' with the same position as this token member x.UseLocation(tok) = let tokState = x.LexbufState - TokenTup(tok,LexbufState(tokState.StartPos, tokState.EndPos,false),x.LastTokenPos) + TokenTup(tok, LexbufState(tokState.StartPos, tokState.EndPos, false), x.LastTokenPos) /// Returns a token 'tok' with the same position as this token, except that /// it is shifted by specified number of characters from the left and from the right /// Note: positive value means shift to the right in both cases member x.UseShiftedLocation(tok, shiftLeft, shiftRight) = let tokState = x.LexbufState - TokenTup(tok,LexbufState(tokState.StartPos.ShiftColumnBy(shiftLeft), - tokState.EndPos.ShiftColumnBy(shiftRight),false),x.LastTokenPos) + TokenTup(tok, LexbufState(tokState.StartPos.ShiftColumnBy(shiftLeft), + tokState.EndPos.ShiftColumnBy(shiftRight), false), x.LastTokenPos) @@ -442,7 +441,7 @@ type TokenTup = // Strip a bunch of leading '>' of a token, at the end of a typar application // Note: this is used in the 'service.fs' to do limited postprocessing -let (|TyparsCloseOp|_|) (txt:string) = +let (|TyparsCloseOp|_|) (txt: string) = let angles = txt |> Seq.takeWhile (fun c -> c = '>') |> Seq.toList let afterAngles = txt |> Seq.skipWhile (fun c -> c = '>') |> Seq.toList if List.isEmpty angles then None else @@ -453,14 +452,14 @@ let (|TyparsCloseOp|_|) (txt:string) = | "]" -> Some RBRACK | "-" -> Some MINUS | ".." -> Some DOT_DOT - | "?" -> Some QMARK + | "?" -> Some QMARK | "??" -> Some QMARK_QMARK | ":=" -> Some COLON_EQUALS | "::" -> Some COLON_COLON | "*" -> Some STAR | "&" -> Some AMP | "->" -> Some RARROW - | "<-" -> Some LARROW + | "<-" -> Some LARROW | "=" -> Some EQUALS | "<" -> Some (LESS false) | "$" -> Some DOLLAR @@ -468,7 +467,7 @@ let (|TyparsCloseOp|_|) (txt:string) = | "%%" -> Some (PERCENT_OP("%%")) | "" -> None | s -> - match List.ofSeq afterAngles with + match List.ofSeq afterAngles with | ('=' :: _) | ('!' :: '=' :: _) | ('<' :: _) @@ -488,7 +487,7 @@ let (|TyparsCloseOp|_|) (txt:string) = | ('/' :: _) | ('%' :: _) -> Some (INFIX_STAR_DIV_MOD_OP(s)) | _ -> None - Some([| for _c in angles do yield GREATER |],afterOp) + Some([| for _c in angles do yield GREATER |], afterOp) [] type PositionWithColumn = @@ -499,23 +498,23 @@ type PositionWithColumn = //---------------------------------------------------------------------------- // build a LexFilter //--------------------------------------------------------------------------*) -type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, lexbuf: UnicodeLexing.Lexbuf) = +type LexFilterImpl (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, lexbuf: UnicodeLexing.Lexbuf) = //---------------------------------------------------------------------------- // Part I. Building a new lex stream from an old // // A lexbuf is a stateful object that can be enticed to emit tokens by calling - // 'lexer' functions designed to work with the lexbuf. Here we fake a new stream - // coming out of an existing lexbuf. Ideally lexbufs would be abstract interfaces + // 'lexer' functions designed to work with the lexbuf. Here we fake a new stream + // coming out of an existing lexbuf. Ideally lexbufs would be abstract interfaces // and we could just build a new abstract interface that wraps an existing one. // However that is not how F# lexbufs currently work. // // Part of the fakery we perform involves buffering a lookahead token which - // we eventually pass on to the client. However, this client also looks at + // we eventually pass on to the client. However, this client also looks at // other aspects of the 'state' of lexbuf directly, e.g. F# lexbufs have a triple // (start-pos, end-pos, eof-reached) // - // You may ask why the F# parser reads this lexbuf state directly. Well, the + // You may ask why the F# parser reads this lexbuf state directly. Well, the // pars.fsy code itself it doesn't, but the parser engines (prim-parsing.fs) // certainly do for F#. e.g. when these parsers read a token // from the lexstream they also read the position information and keep this @@ -526,29 +525,29 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // Make sure we don't report 'eof' when inserting a token, and set the positions to the // last reported token position - let lexbufStateForInsertedDummyTokens (lastTokenStartPos,lastTokenEndPos) = - new LexbufState(lastTokenStartPos,lastTokenEndPos,false) + let lexbufStateForInsertedDummyTokens (lastTokenStartPos, lastTokenEndPos) = + new LexbufState(lastTokenStartPos, lastTokenEndPos, false) let getLexbufState() = new LexbufState(lexbuf.StartPos, lexbuf.EndPos, lexbuf.IsPastEndOfStream) - let setLexbufState (p:LexbufState) = + let setLexbufState (p: LexbufState) = lexbuf.StartPos <- p.StartPos lexbuf.EndPos <- p.EndPos lexbuf.IsPastEndOfStream <- p.PastEOF - let startPosOfTokenTup (tokenTup:TokenTup) = + let startPosOfTokenTup (tokenTup: TokenTup) = match tokenTup.Token with // EOF token is processed as if on column -1 // This forces the closure of all contexts. | Parser.EOF _ -> tokenTup.LexbufState.StartPos.ColumnMinusOne - | _ -> tokenTup.LexbufState.StartPos + | _ -> tokenTup.LexbufState.StartPos //---------------------------------------------------------------------------- // Part II. The state of the new lex stream object. //-------------------------------------------------------------------------- - // Ok, we're going to the wrapped lexbuf. Set the lexstate back so that the lexbuf + // Ok, we're going to the wrapped lexbuf. Set the lexstate back so that the lexbuf // appears consistent and correct for the wrapped lexer function. let mutable savedLexbufState = Unchecked.defaultof let mutable haveLexbufState = false @@ -563,7 +562,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, let tokenLexbufState = getLexbufState() savedLexbufState <- tokenLexbufState haveLexbufState <- true - TokenTup(token,tokenLexbufState,PositionTuple(lastTokenStart,lastTokenEnd)) + TokenTup(token, tokenLexbufState, PositionTuple(lastTokenStart, lastTokenEnd)) //---------------------------------------------------------------------------- // Fetch a raw token, either from the old lexer or from our delayedStack @@ -592,7 +591,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, //---------------------------------------------------------------------------- // Part III. Initial configuration of state. // - // We read a token. In F# Interactive the parser thread will be correctly blocking + // We read a token. In F# Interactive the parser thread will be correctly blocking // here. //-------------------------------------------------------------------------- @@ -601,16 +600,16 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, let mutable prevWasAtomicEnd = false let peekInitial() = - let initialLookaheadTokenTup = popNextTokenTup() + let initialLookaheadTokenTup = popNextTokenTup() if debug then dprintf "first token: initialLookaheadTokenLexbufState = %a\n" outputPos (startPosOfTokenTup initialLookaheadTokenTup) delayToken initialLookaheadTokenTup initialized <- true - offsideStack <- (CtxtSeqBlock(FirstInSeqBlock,startPosOfTokenTup initialLookaheadTokenTup,NoAddBlockEnd)) :: offsideStack + offsideStack <- (CtxtSeqBlock(FirstInSeqBlock, startPosOfTokenTup initialLookaheadTokenTup, NoAddBlockEnd)) :: offsideStack initialLookaheadTokenTup - let warn (s:TokenTup) msg = - warning(Lexhelp.IndentationProblem(msg,mkSynRange (startPosOfTokenTup s) s.LexbufState.EndPos)) + let warn (s: TokenTup) msg = + warning(Lexhelp.IndentationProblem(msg, mkSynRange (startPosOfTokenTup s) s.LexbufState.EndPos)) // 'query { join x in ys ... }' // 'query { ... @@ -620,7 +619,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, let detectJoinInCtxt stack = let rec check s = match s with - | CtxtParen(LBRACE,_) :: _ -> true + | CtxtParen(LBRACE, _) :: _ -> true | (CtxtSeqBlock _ | CtxtDo _ | CtxtFor _) :: rest -> check rest | _ -> false match stack with @@ -634,9 +633,9 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // Undentation rules //-------------------------------------------------------------------------- - let pushCtxt tokenTup (newCtxt:Context) = + let pushCtxt tokenTup (newCtxt: Context) = let rec unindentationLimit strict stack = - match newCtxt,stack with + match newCtxt, stack with | _, [] -> PositionWithColumn(newCtxt.StartPos, -1) // ignore Vanilla because a SeqBlock is always coming @@ -647,10 +646,10 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // 'begin match' limited by minimum of two // '(match' limited by minimum of two - | _,(((CtxtMatch _) as ctxt1) :: CtxtSeqBlock _ :: (CtxtParen ((BEGIN | LPAREN),_) as ctxt2) :: _rest) + | _, (((CtxtMatch _) as ctxt1) :: CtxtSeqBlock _ :: (CtxtParen ((BEGIN | LPAREN), _) as ctxt2) :: _rest) -> if ctxt1.StartCol <= ctxt2.StartCol - then PositionWithColumn(ctxt1.StartPos,ctxt1.StartCol) - else PositionWithColumn(ctxt2.StartPos,ctxt2.StartCol) + then PositionWithColumn(ctxt1.StartPos, ctxt1.StartCol) + else PositionWithColumn(ctxt2.StartPos, ctxt2.StartCol) // 'let ... = function' limited by 'let', precisely // This covers the common form @@ -658,27 +657,27 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // let f x = function // | Case1 -> ... // | Case2 -> ... - | (CtxtMatchClauses _), (CtxtFunction _ :: CtxtSeqBlock _ :: (CtxtLetDecl _ as limitCtxt) :: _rest) - -> PositionWithColumn(limitCtxt.StartPos,limitCtxt.StartCol) + | (CtxtMatchClauses _), (CtxtFunction _ :: CtxtSeqBlock _ :: (CtxtLetDecl _ as limitCtxt) :: _rest) + -> PositionWithColumn(limitCtxt.StartPos, limitCtxt.StartCol) - // Otherwise 'function ...' places no limit until we hit a CtxtLetDecl etc... (Recursive) + // Otherwise 'function ...' places no limit until we hit a CtxtLetDecl etc... (Recursive) | (CtxtMatchClauses _), (CtxtFunction _ :: rest) -> unindentationLimit false rest - // 'try ... with' limited by 'try' - | _,(CtxtMatchClauses _ :: (CtxtTry _ as limitCtxt) :: _rest) - -> PositionWithColumn(limitCtxt.StartPos,limitCtxt.StartCol) + // 'try ... with' limited by 'try' + | _, (CtxtMatchClauses _ :: (CtxtTry _ as limitCtxt) :: _rest) + -> PositionWithColumn(limitCtxt.StartPos, limitCtxt.StartCol) - // 'fun ->' places no limit until we hit a CtxtLetDecl etc... (Recursive) - | _,(CtxtFun _ :: rest) + // 'fun ->' places no limit until we hit a CtxtLetDecl etc... (Recursive) + | _, (CtxtFun _ :: rest) -> unindentationLimit false rest // 'f ...{' places no limit until we hit a CtxtLetDecl etc... // 'f ...[' places no limit until we hit a CtxtLetDecl etc... // 'f ...[|' places no limit until we hit a CtxtLetDecl etc... - | _,(CtxtParen ((LBRACE | LBRACK | LBRACK_BAR),_) :: CtxtSeqBlock _ :: rest) - | _,(CtxtParen ((LBRACE | LBRACK | LBRACK_BAR),_) :: CtxtVanilla _ :: CtxtSeqBlock _ :: rest) - | _,(CtxtSeqBlock _ :: CtxtParen((LBRACE | LBRACK | LBRACK_BAR),_) :: CtxtVanilla _ :: CtxtSeqBlock _ :: rest) + | _, (CtxtParen ((LBRACE | LBRACK | LBRACK_BAR), _) :: CtxtSeqBlock _ :: rest) + | _, (CtxtParen ((LBRACE | LBRACK | LBRACK_BAR), _) :: CtxtVanilla _ :: CtxtSeqBlock _ :: rest) + | _, (CtxtSeqBlock _ :: CtxtParen((LBRACE | LBRACK | LBRACK_BAR), _) :: CtxtVanilla _ :: CtxtSeqBlock _ :: rest) -> unindentationLimit false rest // MAJOR PERMITTED UNDENTATION This is allowing: @@ -687,8 +686,8 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // x + x // This is a serious thing to allow, but is required since there is no "return" in this language. // Without it there is no way of escaping special cases in large bits of code without indenting the main case. - | CtxtSeqBlock _, (CtxtElse _ :: (CtxtIf _ as limitCtxt) :: _rest) - -> PositionWithColumn(limitCtxt.StartPos,limitCtxt.StartCol) + | CtxtSeqBlock _, (CtxtElse _ :: (CtxtIf _ as limitCtxt) :: _rest) + -> PositionWithColumn(limitCtxt.StartPos, limitCtxt.StartCol) // Permitted inner-construct precise block alignment: // interface ... @@ -698,19 +697,19 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // type ... // with ... // end - | CtxtWithAsAugment _,((CtxtInterfaceHead _ | CtxtMemberHead _ | CtxtException _ | CtxtTypeDefns _) as limitCtxt :: _rest) - -> PositionWithColumn(limitCtxt.StartPos,limitCtxt.StartCol) + | CtxtWithAsAugment _, ((CtxtInterfaceHead _ | CtxtMemberHead _ | CtxtException _ | CtxtTypeDefns _) as limitCtxt :: _rest) + -> PositionWithColumn(limitCtxt.StartPos, limitCtxt.StartCol) // Permit unindentation via parentheses (or begin/end) following a 'then', 'else' or 'do': // if nr > 0 then ( - // nr <- nr - 1; - // acc <- d; + // nr <- nr - 1 + // acc <- d // i <- i - 1 // ) else ( // i <- -1 - // ); + // ) - // PERMITTED UNDENTATION: Inner construct (then,with,else,do) that dangle, places no limit until we hit the corresponding leading construct CtxtIf, CtxtFor, CtxtWhile, CtxtVanilla etc... *) + // PERMITTED UNDENTATION: Inner construct (then, with, else, do) that dangle, places no limit until we hit the corresponding leading construct CtxtIf, CtxtFor, CtxtWhile, CtxtVanilla etc... *) // e.g. if ... then ... // expr // else @@ -723,7 +722,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // ... <-- this is before the "with" // end - | _,((CtxtWithAsAugment _ | CtxtThen _ | CtxtElse _ | CtxtDo _ ) :: rest) + | _, ((CtxtWithAsAugment _ | CtxtThen _ | CtxtElse _ | CtxtDo _ ) :: rest) -> unindentationLimit false rest @@ -741,7 +740,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // let fffffff() = function 1 -> // 0 // | 2 -> ... <---- not allowed - | _,(CtxtFunction _ :: rest) + | _, (CtxtFunction _ :: rest) -> unindentationLimit false rest // 'module ... : sig' limited by 'module' @@ -755,27 +754,27 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // 'if ... else {' limited by 'if' // 'if ... else [' limited by 'if' // 'if ... else [|' limited by 'if' - | _,(CtxtParen ((SIG | STRUCT | BEGIN),_) :: CtxtSeqBlock _ :: (CtxtModuleBody (_,false) as limitCtxt) :: _) - | _,(CtxtParen ((BEGIN | LPAREN | LBRACK | LBRACE | LBRACE_BAR | LBRACK_BAR) ,_) :: CtxtSeqBlock _ :: CtxtThen _ :: (CtxtIf _ as limitCtxt) :: _) - | _,(CtxtParen ((BEGIN | LPAREN | LBRACK | LBRACE | LBRACE_BAR | LBRACK_BAR | LBRACK_LESS) ,_) :: CtxtSeqBlock _ :: CtxtElse _ :: (CtxtIf _ as limitCtxt) :: _) + | _, (CtxtParen ((SIG | STRUCT | BEGIN), _) :: CtxtSeqBlock _ :: (CtxtModuleBody (_, false) as limitCtxt) :: _) + | _, (CtxtParen ((BEGIN | LPAREN | LBRACK | LBRACE | LBRACE_BAR | LBRACK_BAR), _) :: CtxtSeqBlock _ :: CtxtThen _ :: (CtxtIf _ as limitCtxt) :: _) + | _, (CtxtParen ((BEGIN | LPAREN | LBRACK | LBRACE | LBRACE_BAR | LBRACK_BAR | LBRACK_LESS), _) :: CtxtSeqBlock _ :: CtxtElse _ :: (CtxtIf _ as limitCtxt) :: _) // 'f ... (' in seqblock limited by 'f' // 'f ... {' in seqblock limited by 'f' NOTE: this is covered by the more generous case above // 'f ... [' in seqblock limited by 'f' // 'f ... [|' in seqblock limited by 'f' // 'f ... Foo<' in seqblock limited by 'f' - | _,(CtxtParen ((BEGIN | LPAREN | LESS true | LBRACK | LBRACK_BAR) ,_) :: CtxtVanilla _ :: (CtxtSeqBlock _ as limitCtxt) :: _) + | _, (CtxtParen ((BEGIN | LPAREN | LESS true | LBRACK | LBRACK_BAR), _) :: CtxtVanilla _ :: (CtxtSeqBlock _ as limitCtxt) :: _) // 'type C = class ... ' limited by 'type' // 'type C = interface ... ' limited by 'type' // 'type C = struct ... ' limited by 'type' - | _,(CtxtParen ((CLASS | STRUCT | INTERFACE),_) :: CtxtSeqBlock _ :: (CtxtTypeDefns _ as limitCtxt) :: _) - -> PositionWithColumn(limitCtxt.StartPos,limitCtxt.StartCol + 1) + | _, (CtxtParen ((CLASS | STRUCT | INTERFACE), _) :: CtxtSeqBlock _ :: (CtxtTypeDefns _ as limitCtxt) :: _) + -> PositionWithColumn(limitCtxt.StartPos, limitCtxt.StartCol + 1) // REVIEW: document these - | _,(CtxtSeqBlock _ :: CtxtParen((BEGIN | LPAREN | LBRACK | LBRACK_BAR),_) :: CtxtVanilla _ :: (CtxtSeqBlock _ as limitCtxt) :: _) - | (CtxtSeqBlock _),(CtxtParen ((BEGIN | LPAREN | LBRACE | LBRACE_BAR | LBRACK | LBRACK_BAR) ,_) :: CtxtSeqBlock _ :: ((CtxtTypeDefns _ | CtxtLetDecl _ | CtxtMemberBody _ | CtxtWithAsLet _) as limitCtxt) :: _) - -> PositionWithColumn(limitCtxt.StartPos,limitCtxt.StartCol + 1) + | _, (CtxtSeqBlock _ :: CtxtParen((BEGIN | LPAREN | LBRACK | LBRACK_BAR), _) :: CtxtVanilla _ :: (CtxtSeqBlock _ as limitCtxt) :: _) + | (CtxtSeqBlock _), (CtxtParen ((BEGIN | LPAREN | LBRACE | LBRACE_BAR | LBRACK | LBRACK_BAR), _) :: CtxtSeqBlock _ :: ((CtxtTypeDefns _ | CtxtLetDecl _ | CtxtMemberBody _ | CtxtWithAsLet _) as limitCtxt) :: _) + -> PositionWithColumn(limitCtxt.StartPos, limitCtxt.StartCol + 1) // Permitted inner-construct (e.g. "then" block and "else" block in overall // "if-then-else" block ) block alignment: @@ -783,23 +782,23 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // then expr // elif expr // else expr - | (CtxtIf _ | CtxtElse _ | CtxtThen _), (CtxtIf _ as limitCtxt) :: _rest - -> PositionWithColumn(limitCtxt.StartPos,limitCtxt.StartCol) + | (CtxtIf _ | CtxtElse _ | CtxtThen _), (CtxtIf _ as limitCtxt) :: _rest + -> PositionWithColumn(limitCtxt.StartPos, limitCtxt.StartCol) // Permitted inner-construct precise block alignment: // while ... // do expr // done - | (CtxtDo _), ((CtxtFor _ | CtxtWhile _) as limitCtxt) :: _rest - -> PositionWithColumn(limitCtxt.StartPos,limitCtxt.StartCol) + | (CtxtDo _), ((CtxtFor _ | CtxtWhile _) as limitCtxt) :: _rest + -> PositionWithColumn(limitCtxt.StartPos, limitCtxt.StartCol) // These contexts all require indentation by at least one space - | _,((CtxtInterfaceHead _ | CtxtNamespaceHead _ | CtxtModuleHead _ | CtxtException _ | CtxtModuleBody (_,false) | CtxtIf _ | CtxtWithAsLet _ | CtxtLetDecl _ | CtxtMemberHead _ | CtxtMemberBody _) as limitCtxt :: _) - -> PositionWithColumn(limitCtxt.StartPos,limitCtxt.StartCol + 1) + | _, ((CtxtInterfaceHead _ | CtxtNamespaceHead _ | CtxtModuleHead _ | CtxtException _ | CtxtModuleBody (_, false) | CtxtIf _ | CtxtWithAsLet _ | CtxtLetDecl _ | CtxtMemberHead _ | CtxtMemberBody _) as limitCtxt :: _) + -> PositionWithColumn(limitCtxt.StartPos, limitCtxt.StartCol + 1) // These contexts can have their contents exactly aligning - | _,((CtxtParen _ | CtxtFor _ | CtxtWhen _ | CtxtWhile _ | CtxtTypeDefns _ | CtxtMatch _ | CtxtModuleBody (_,true) | CtxtNamespaceBody _ | CtxtTry _ | CtxtMatchClauses _ | CtxtSeqBlock _) as limitCtxt :: _) - -> PositionWithColumn(limitCtxt.StartPos,limitCtxt.StartCol) + | _, ((CtxtParen _ | CtxtFor _ | CtxtWhen _ | CtxtWhile _ | CtxtTypeDefns _ | CtxtMatch _ | CtxtModuleBody (_, true) | CtxtNamespaceBody _ | CtxtTry _ | CtxtMatchClauses _ | CtxtSeqBlock _) as limitCtxt :: _) + -> PositionWithColumn(limitCtxt.StartPos, limitCtxt.StartCol) match newCtxt with // Don't bother to check pushes of Vanilla blocks since we've @@ -821,7 +820,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, let popCtxt() = match offsideStack with - | [] -> () + | [] -> () | h :: rest -> if debug then dprintf "<-- popping Context(%A), stack = %A\n" h rest offsideStack <- rest @@ -844,12 +843,12 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // Adjacency precedence rule //-------------------------------------------------------------------------- - let isAdjacent (leftTokenTup:TokenTup) rightTokenTup = + let isAdjacent (leftTokenTup: TokenTup) rightTokenTup = let lparenStartPos = startPosOfTokenTup rightTokenTup let tokenEndPos = leftTokenTup.LexbufState.EndPos (tokenEndPos = lparenStartPos) - let nextTokenIsAdjacentLParenOrLBrack (tokenTup:TokenTup) = + let nextTokenIsAdjacentLParenOrLBrack (tokenTup: TokenTup) = let lookaheadTokenTup = peekNextTokenTup() match lookaheadTokenTup.Token with | (LPAREN | LBRACK) -> @@ -861,7 +860,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, let lookaheadTokenTup = peekNextTokenTup() isAdjacent firstTokenTup lookaheadTokenTup - let peekAdjacentTypars indentation (tokenTup:TokenTup) = + let peekAdjacentTypars indentation (tokenTup: TokenTup) = let lookaheadTokenTup = peekNextTokenTup() match lookaheadTokenTup.Token with | INFIX_COMPARE_OP " @@ -871,7 +870,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, let rec scanAhead nParen = let lookaheadTokenTup = popNextTokenTup() let lookaheadToken = lookaheadTokenTup.Token - stack := (lookaheadTokenTup,true) :: !stack + stack := (lookaheadTokenTup, true) :: !stack let lookaheadTokenStartPos = startPosOfTokenTup lookaheadTokenTup match lookaheadToken with | Parser.EOF _ | SEMICOLON_SEMICOLON -> false @@ -884,10 +883,10 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, false | GREATER _ | GREATER_RBRACK | GREATER_BAR_RBRACK -> let nParen = nParen - 1 - let hasAfterOp = (match lookaheadToken with GREATER _ -> false | _ -> true) + let hasAfterOp = (match lookaheadToken with GREATER _ -> false | _ -> true) if nParen > 0 then // Don't smash the token if there is an after op and we're in a nested paren - stack := (lookaheadTokenTup,not hasAfterOp) :: (!stack).Tail + stack := (lookaheadTokenTup, not hasAfterOp) :: (!stack).Tail scanAhead nParen else // On successful parse of a set of type parameters, look for an adjacent (, e.g. @@ -895,21 +894,21 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // and insert a HIGH_PRECEDENCE_PAREN_APP if not hasAfterOp && (match nextTokenIsAdjacentLParenOrLBrack lookaheadTokenTup with Some(LPAREN) -> true | _ -> false) then let dotTokenTup = peekNextTokenTup() - stack := (dotTokenTup.UseLocation(HIGH_PRECEDENCE_PAREN_APP),false) :: !stack + stack := (dotTokenTup.UseLocation(HIGH_PRECEDENCE_PAREN_APP), false) :: !stack true - | INFIX_COMPARE_OP (TyparsCloseOp(greaters,afterOp)) -> + | INFIX_COMPARE_OP (TyparsCloseOp(greaters, afterOp)) -> let nParen = nParen - greaters.Length if nParen > 0 then // Don't smash the token if there is an after op and we're in a nested paren - stack := (lookaheadTokenTup,not afterOp.IsSome) :: (!stack).Tail + stack := (lookaheadTokenTup, not afterOp.IsSome) :: (!stack).Tail scanAhead nParen else // On successful parse of a set of type parameters, look for an adjacent (, e.g. // M>(args) // and insert a HIGH_PRECEDENCE_PAREN_APP - if afterOp.IsNone && (match nextTokenIsAdjacentLParenOrLBrack lookaheadTokenTup with Some LPAREN -> true | _ -> false) then + if afterOp.IsNone && (match nextTokenIsAdjacentLParenOrLBrack lookaheadTokenTup with Some LPAREN -> true | _ -> false) then let dotTokenTup = peekNextTokenTup() - stack := (dotTokenTup.UseLocation(HIGH_PRECEDENCE_PAREN_APP),false) :: !stack + stack := (dotTokenTup.UseLocation(HIGH_PRECEDENCE_PAREN_APP), false) :: !stack true | (LPAREN | LESS _ | LBRACK | LBRACK_LESS | INFIX_COMPARE_OP " scanAhead (nParen+1) @@ -943,7 +942,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, | NULL | INT8 _ | INT16 _ | INT32 _ | INT64 _ | NATIVEINT _ | UINT8 _ | UINT16 _ | UINT32 _ | UINT64 _ | UNATIVEINT _ - | DECIMAL _ | BIGNUM _ | STRING _ | BYTEARRAY _ | CHAR _ | TRUE | FALSE + | DECIMAL _ | BIGNUM _ | STRING _ | BYTEARRAY _ | CHAR _ | TRUE | FALSE | IEEE32 _ | IEEE64 _ | DOT | UNDERSCORE | EQUALS | IDENT _ | COMMA | RARROW | HASH @@ -960,7 +959,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, let res = scanAhead 0 // Put the tokens back on and smash them up if needed - !stack |> List.iter (fun (tokenTup,smash) -> + !stack |> List.iter (fun (tokenTup, smash) -> if smash then match tokenTup.Token with | INFIX_COMPARE_OP " @@ -974,7 +973,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, delayToken (tokenTup.UseShiftedLocation(GREATER res, 0, -1)) | GREATER _ -> delayToken (tokenTup.UseLocation(GREATER res)) - | (INFIX_COMPARE_OP (TyparsCloseOp(greaters,afterOp) as opstr)) -> + | (INFIX_COMPARE_OP (TyparsCloseOp(greaters, afterOp) as opstr)) -> match afterOp with | None -> () | Some tok -> delayToken (tokenTup.UseShiftedLocation(tok, greaters.Length, 0)) @@ -992,7 +991,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // End actions //-------------------------------------------------------------------------- - let returnToken (tokenLexbufState:LexbufState) tok = + let returnToken (tokenLexbufState: LexbufState) tok = setLexbufState(tokenLexbufState) prevWasAtomicEnd <- isAtomicExprEndToken(tok) tok @@ -1000,38 +999,38 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, let rec suffixExists p l = match l with [] -> false | _::t -> p t || suffixExists p t let tokenBalancesHeadContext token stack = - match token,stack with - | END, (CtxtWithAsAugment(_) :: _) + match token, stack with + | END, (CtxtWithAsAugment(_) :: _) | (ELSE | ELIF), (CtxtIf _ :: _) - | DONE , (CtxtDo _ :: _) + | DONE, (CtxtDo _ :: _) // WITH balances except in the following contexts.... Phew - an overused keyword! - | WITH , ( ((CtxtMatch _ | CtxtException _ | CtxtMemberHead _ | CtxtInterfaceHead _ | CtxtTry _ | CtxtTypeDefns _ | CtxtMemberBody _) :: _) + | WITH, ( ((CtxtMatch _ | CtxtException _ | CtxtMemberHead _ | CtxtInterfaceHead _ | CtxtTry _ | CtxtTypeDefns _ | CtxtMemberBody _) :: _) // This is the nasty record/object-expression case - | (CtxtSeqBlock _ :: CtxtParen((LBRACE | LBRACE_BAR),_) :: _) ) - | FINALLY , (CtxtTry _ :: _) -> + | (CtxtSeqBlock _ :: CtxtParen((LBRACE | LBRACE_BAR), _) :: _) ) + | FINALLY, (CtxtTry _ :: _) -> true // for x in ienum ... // let x = ... in - | IN , ((CtxtFor _ | CtxtLetDecl _) :: _) -> + | IN, ((CtxtFor _ | CtxtLetDecl _) :: _) -> true // 'query { join x in ys ... }' // 'query { ... // join x in ys ... }' // 'query { for ... do // join x in ys ... }' - | IN , stack when detectJoinInCtxt stack -> + | IN, stack when detectJoinInCtxt stack -> true // NOTE: ;; does not terminate a 'namespace' body. | SEMICOLON_SEMICOLON, (CtxtSeqBlock _ :: CtxtNamespaceBody _ :: _) -> true - | SEMICOLON_SEMICOLON, (CtxtSeqBlock _ :: CtxtModuleBody (_,true) :: _) -> + | SEMICOLON_SEMICOLON, (CtxtSeqBlock _ :: CtxtModuleBody (_, true) :: _) -> true - | t2 , (CtxtParen(t1,_) :: _) -> - parenTokensBalance t1 t2 + | t2, (CtxtParen(t1, _) :: _) -> + parenTokensBalance t1 t2 | _ -> false @@ -1118,11 +1117,11 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, let isSemiSemi = match token with SEMICOLON_SEMICOLON -> true | _ -> false // If you see a 'member' keyword while you are inside the body of another member, then it usually means there is a syntax error inside this method - // and the upcoming 'member' is the start of the next member in the class. For better parser recovery and diagnostics, it is best to pop out of the + // and the upcoming 'member' is the start of the next member in the class. For better parser recovery and diagnostics, it is best to pop out of the // existing member context so the parser can recover. // - // However there are two places where 'member' keywords can appear inside expressions inside the body of a member. The first is object expressions, and - // the second is static inline constraints. We must not pop the context stack in those cases, or else legal code will not parse. + // However there are two places where 'member' keywords can appear inside expressions inside the body of a member. The first is object expressions, and + // the second is static inline constraints. We must not pop the context stack in those cases, or else legal code will not parse. // // It is impossible to decide for sure if we're in one of those two cases, so we must err conservatively if we might be. let thereIsACtxtMemberBodyOnTheStackAndWeShouldPopStackForUpcomingMember ctxtStack = @@ -1131,9 +1130,9 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, false // no member currently on the stack, nothing to pop else // there is a member context - if List.exists (function CtxtParen(LBRACE,_) -> true | _ -> false) ctxtStack then + if List.exists (function CtxtParen(LBRACE, _) -> true | _ -> false) ctxtStack then false // an LBRACE could mean an object expression, and object expressions can have 'member' tokens in them, so do not pop, to be safe - elif List.count (function CtxtParen(LPAREN,_) -> true | _ -> false) ctxtStack >= 2 then + elif List.count (function CtxtParen(LPAREN, _) -> true | _ -> false) ctxtStack >= 2 then false // static member constraints always are embedded in at least two LPARENS, so do not pop, to be safe else true @@ -1142,20 +1141,20 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, match ctxt with | CtxtFun _ | CtxtMatchClauses _ - | CtxtWithAsLet _ -> + | CtxtWithAsLet _ -> Some OEND - | CtxtWithAsAugment _ -> + | CtxtWithAsAugment _ -> Some ODECLEND | CtxtDo _ - | CtxtLetDecl (true,_) -> + | CtxtLetDecl (true, _) -> Some ODECLEND - | CtxtSeqBlock(_,_,AddBlockEnd) -> + | CtxtSeqBlock(_, _, AddBlockEnd) -> Some OBLOCKEND - | CtxtSeqBlock(_,_,AddOneSidedBlockEnd) -> + | CtxtSeqBlock(_, _, AddOneSidedBlockEnd) -> Some ORIGHT_BLOCK_END | _ -> @@ -1169,7 +1168,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, not (isNil stack) && match token with | Parser.EOF _ -> true - | SEMICOLON_SEMICOLON -> not (tokenBalancesHeadContext token stack) + | SEMICOLON_SEMICOLON -> not (tokenBalancesHeadContext token stack) | END | ELSE | ELIF @@ -1183,7 +1182,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, | BAR_RBRACK | WITH | FINALLY - | RQUOTE _ -> + | RQUOTE _ -> not (tokenBalancesHeadContext token stack) && // Only close the context if some context is going to match at some point in the stack. // If none match, the token will go through, and error recovery will kick in in the parser and report the extra token, @@ -1193,7 +1192,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, | _ -> false // The TYPE and MODULE keywords cannot be used in expressions, but the parser has a hard time recovering on incomplete-expression-code followed by - // a TYPE or MODULE. So the lexfilter helps out by looking ahead for these tokens and (1) closing expression contexts and (2) inserting extra 'coming soon' tokens + // a TYPE or MODULE. So the lexfilter helps out by looking ahead for these tokens and (1) closing expression contexts and (2) inserting extra 'coming soon' tokens // that the expression rules in the FsYacc parser can 'shift' to make progress parsing the incomplete expressions, without using the 'recover' action. let insertComingSoonTokens(keywordName, comingSoon, isHere) = // compiling the source for FSharp.Core.dll uses crazy syntax like @@ -1207,9 +1206,9 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, match offsideStack with // next outermost is namespace or module | _ :: (CtxtNamespaceBody _ | CtxtModuleBody _) :: _ -> true - // The context pair below is created a namespace/module scope when user explicitly uses 'begin'...'end', + // The context pair below is created a namespace/module scope when user explicitly uses 'begin'...'end', // and these can legally contain type definitions, so ignore this combo as uninteresting and recurse deeper - | _ :: CtxtParen((BEGIN|STRUCT),_) :: CtxtSeqBlock(_,_,_) :: _ -> nextOuterMostInterestingContextIsNamespaceOrModule(offsideStack.Tail.Tail) + | _ :: CtxtParen((BEGIN|STRUCT), _) :: CtxtSeqBlock(_, _, _) :: _ -> nextOuterMostInterestingContextIsNamespaceOrModule(offsideStack.Tail.Tail) // at the top of the stack there is an implicit module | _ :: [] -> true // anything else is a non-namespace/module @@ -1217,7 +1216,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, while not offsideStack.IsEmpty && (not(nextOuterMostInterestingContextIsNamespaceOrModule(offsideStack))) && (match offsideStack.Head with // open-parens of sorts - | CtxtParen((LPAREN|LBRACK|LBRACE|LBRACE_BAR|LBRACK_BAR),_) -> true + | CtxtParen((LPAREN|LBRACK|LBRACE|LBRACE_BAR|LBRACK_BAR), _) -> true // seq blocks | CtxtSeqBlock _ -> true // vanillas @@ -1225,18 +1224,18 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // preserve all other contexts | _ -> false) do match offsideStack.Head with - | CtxtParen _ -> + | CtxtParen _ -> if debug then dprintf "%s at %a terminates CtxtParen()\n" keywordName outputPos tokenStartPos popCtxt() - | CtxtSeqBlock(_,_,AddBlockEnd) -> + | CtxtSeqBlock(_, _, AddBlockEnd) -> popCtxt() effectsToDo <- (fun() -> if debug then dprintf "--> because %s is coming, inserting OBLOCKEND\n" keywordName delayTokenNoProcessing (tokenTup.UseLocation(OBLOCKEND))) :: effectsToDo - | CtxtSeqBlock(_,_,NoAddBlockEnd) -> + | CtxtSeqBlock(_, _, NoAddBlockEnd) -> if debug then dprintf "--> because %s is coming, popping CtxtSeqBlock\n" keywordName popCtxt() - | CtxtSeqBlock(_,_,AddOneSidedBlockEnd) -> + | CtxtSeqBlock(_, _, AddOneSidedBlockEnd) -> popCtxt() effectsToDo <- (fun() -> if debug then dprintf "--> because %s is coming, inserting ORIGHT_BLOCK_END\n" keywordName @@ -1245,9 +1244,9 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, if debug then dprintf "--> because %s is coming, popping CtxtVanilla\n" keywordName popCtxt() | _ -> failwith "impossible, the while loop guard just above prevents this" - // See bugs 91609/92107/245850; we turn ...TYPE... into ...TYPE_COMING_SOON(x6),TYPE_IS_HERE... to help the parser recover when it sees "type" in a parenthesized expression. + // See bugs 91609/92107/245850; we turn ...TYPE... into ...TYPE_COMING_SOON(x6), TYPE_IS_HERE... to help the parser recover when it sees "type" in a parenthesized expression. // And we do the same thing for MODULE. - // Why _six_ TYPE_COMING_SOON? It's rather arbitrary, this means we can recover from up to six unmatched parens before failing. The unit tests (with 91609 in the name) demonstrate this. + // Why _six_ TYPE_COMING_SOON? It's rather arbitrary, this means we can recover from up to six unmatched parens before failing. The unit tests (with 91609 in the name) demonstrate this. // Don't "delayToken tokenTup", we are replacing it, so consume it. if debug then dprintf "inserting 6 copies of %+A before %+A\n" comingSoon isHere delayTokenNoProcessing (tokenTup.UseLocation(isHere)) @@ -1256,13 +1255,13 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, for e in List.rev effectsToDo do e() // push any END tokens after pushing the TYPE_IS_HERE and TYPE_COMING_SOON stuff, so that they come before those in the token stream - match token,offsideStack with + match token, offsideStack with // inserted faux tokens need no other processing | _ when tokensThatNeedNoProcessingCount > 0 -> tokensThatNeedNoProcessingCount <- tokensThatNeedNoProcessingCount - 1 returnToken tokenLexbufState token - | _ when tokenForcesHeadContextClosure token offsideStack -> + | _ when tokenForcesHeadContextClosure token offsideStack -> let ctxt = offsideStack.Head if debug then dprintf "IN/ELSE/ELIF/DONE/RPAREN/RBRACE/END at %a terminates context at position %a\n" outputPos tokenStartPos outputPos ctxt.StartPos popCtxt() @@ -1274,12 +1273,12 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, reprocess() // reset on ';;' rule. A ';;' terminates ALL entries - | SEMICOLON_SEMICOLON, [] -> + | SEMICOLON_SEMICOLON, [] -> if debug then dprintf ";; scheduling a reset\n" delayToken(tokenTup.UseLocation(ORESET)) returnToken tokenLexbufState SEMICOLON_SEMICOLON - | ORESET, [] -> + | ORESET, [] -> if debug then dprintf "performing a reset after a ;; has been swallowed\n" // NOTE: The parser thread of F# Interactive will often be blocked on this call, e.g. after an entry has been // processed and we're waiting for the first token of the next entry. @@ -1287,12 +1286,12 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, hwTokenFetch(true) - | IN, stack when detectJoinInCtxt stack -> + | IN, stack when detectJoinInCtxt stack -> returnToken tokenLexbufState JOIN_IN // Balancing rule. Encountering an 'in' balances with a 'let'. i.e. even a non-offside 'in' closes a 'let' // The 'IN' token is thrown away and becomes an ODECLEND - | IN, (CtxtLetDecl (blockLet,offsidePos) :: _) -> + | IN, (CtxtLetDecl (blockLet, offsidePos) :: _) -> if debug then dprintf "IN at %a (becomes %s)\n" outputPos tokenStartPos (if blockLet then "ODECLEND" else "IN") if tokenStartCol < offsidePos.Column then warn tokenTup (FSComp.SR.lexfltIncorrentIndentationOfIn()) popCtxt() @@ -1302,7 +1301,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // Balancing rule. Encountering a 'done' balances with a 'do'. i.e. even a non-offside 'done' closes a 'do' // The 'DONE' token is thrown away and becomes an ODECLEND - | DONE, (CtxtDo offsidePos :: _) -> + | DONE, (CtxtDo offsidePos :: _) -> if debug then dprintf "DONE at %a terminates CtxtDo(offsidePos=%a)\n" outputPos tokenStartPos outputPos offsidePos popCtxt() // reprocess as the DONE may close a DO context @@ -1310,8 +1309,8 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, hwTokenFetch(useBlockRule) // Balancing rule. Encountering a ')' or '}' balances with a '(' or '{', even if not offside - | ((END | RPAREN | RBRACE | BAR_RBRACE | RBRACK | BAR_RBRACK | RQUOTE _ | GREATER true) as t2), (CtxtParen (t1,_) :: _) - when parenTokensBalance t1 t2 -> + | ((END | RPAREN | RBRACE | BAR_RBRACE | RBRACK | BAR_RBRACK | RQUOTE _ | GREATER true) as t2), (CtxtParen (t1, _) :: _) + when parenTokensBalance t1 t2 -> if debug then dprintf "RPAREN/RBRACE/BAR_RBRACE/RBRACK/BAR_RBRACK/RQUOTE/END at %a terminates CtxtParen()\n" outputPos tokenStartPos popCtxt() // Queue a dummy token at this position to check if any closing rules apply @@ -1319,7 +1318,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, returnToken tokenLexbufState token // Balancing rule. Encountering a 'end' can balance with a 'with' but only when not offside - | END, (CtxtWithAsAugment(offsidePos) :: _) + | END, (CtxtWithAsAugment(offsidePos) :: _) when not (tokenStartCol + 1 <= offsidePos.Column) -> if debug then dprintf "END at %a terminates CtxtWithAsAugment()\n" outputPos tokenStartPos popCtxt() @@ -1352,7 +1351,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // Transition rule. CtxtModuleHead ~~~> push CtxtModuleBody; push CtxtSeqBlock // Applied when a ':' or '=' token is seen // Otherwise it's a 'head' module declaration, so ignore it - | _, (CtxtModuleHead (moduleTokenPos,prevToken) :: _) -> + | _, (CtxtModuleHead (moduleTokenPos, prevToken) :: _) -> match prevToken, token with | MODULE, GLOBAL when moduleTokenPos.Column < tokenStartPos.Column -> replaceCtxt tokenTup (CtxtModuleHead (moduleTokenPos, token)) @@ -1368,8 +1367,8 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, | _, (EQUALS | COLON) -> if debug then dprintf "CtxtModuleHead: COLON/EQUALS, pushing CtxtModuleBody and CtxtSeqBlock\n" popCtxt() - pushCtxt tokenTup (CtxtModuleBody (moduleTokenPos,false)) - pushCtxtSeqBlock(true,AddBlockEnd) + pushCtxt tokenTup (CtxtModuleBody (moduleTokenPos, false)) + pushCtxtSeqBlock(true, AddBlockEnd) returnToken tokenLexbufState token | _ -> if debug then dprintf "CtxtModuleHead: start of file, CtxtSeqBlock\n" @@ -1380,7 +1379,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, returnToken tokenLexbufState token | _ -> delayToken tokenTup - pushCtxt tokenTup (CtxtModuleBody (moduleTokenPos,true)) + pushCtxt tokenTup (CtxtModuleBody (moduleTokenPos, true)) pushCtxtSeqBlockAt (tokenTup, true, AddBlockEnd) hwTokenFetch(false) @@ -1388,10 +1387,10 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // f x // g x // ... - | _, (CtxtSeqBlock(_,offsidePos,addBlockEnd) :: rest) when + | _, (CtxtSeqBlock(_, offsidePos, addBlockEnd) :: rest) when // NOTE: ;; does not terminate a 'namespace' body. - ((isSemiSemi && not (match rest with (CtxtNamespaceBody _ | CtxtModuleBody (_,true)) :: _ -> true | _ -> false)) || + ((isSemiSemi && not (match rest with (CtxtNamespaceBody _ | CtxtModuleBody (_, true)) :: _ -> true | _ -> false)) || let grace = match token, rest with // When in a type context allow a grace of 2 column positions for '|' tokens, permits @@ -1437,7 +1436,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // i.e. // // let x = - // stmt; + // stmt // -expr (if isInfix token then infixTokenLength token + 1 else 0) (tokenStartCol + grace < offsidePos.Column)) -> @@ -1453,7 +1452,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // fff // eeeee // - | _, (CtxtVanilla(offsidePos,_) :: _) when isSemiSemi || tokenStartCol <= offsidePos.Column -> + | _, (CtxtVanilla(offsidePos, _) :: _) when isSemiSemi || tokenStartCol <= offsidePos.Column -> if debug then dprintf "offside token at column %d indicates end of CtxtVanilla started at %a!\n" tokenStartCol outputPos offsidePos popCtxt() reprocess() @@ -1462,21 +1461,21 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // [< ... >] // decl - | _, (CtxtSeqBlock(NotFirstInSeqBlock,offsidePos,addBlockEnd) :: _) + | _, (CtxtSeqBlock(NotFirstInSeqBlock, offsidePos, addBlockEnd) :: _) when (match token with GREATER_RBRACK -> true | _ -> false) -> // Attribute-end tokens mean CtxtSeqBlock rule is NOT applied to the next token - replaceCtxt tokenTup (CtxtSeqBlock (FirstInSeqBlock,offsidePos,addBlockEnd)) + replaceCtxt tokenTup (CtxtSeqBlock (FirstInSeqBlock, offsidePos, addBlockEnd)) reprocessWithoutBlockRule() // Offside rule for SeqBlock - avoiding inserting OBLOCKSEP on first item in block - | _, (CtxtSeqBlock (FirstInSeqBlock,offsidePos,addBlockEnd) :: _) when useBlockRule -> + | _, (CtxtSeqBlock (FirstInSeqBlock, offsidePos, addBlockEnd) :: _) when useBlockRule -> // This is the first token in a block, or a token immediately // following an infix operator (see above). // Return the token, but only after processing any additional rules - // applicable for this token. Don't apply the CtxtSeqBlock rule for + // applicable for this token. Don't apply the CtxtSeqBlock rule for // this token, but do apply it on subsequent tokens. if debug then dprintf "repull for CtxtSeqBlockStart\n" - replaceCtxt tokenTup (CtxtSeqBlock (NotFirstInSeqBlock,offsidePos,addBlockEnd)) + replaceCtxt tokenTup (CtxtSeqBlock (NotFirstInSeqBlock, offsidePos, addBlockEnd)) reprocessWithoutBlockRule() // Offside rule for SeqBlock - inserting OBLOCKSEP on subsequent items in a block when they are precisely aligned @@ -1497,18 +1496,18 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // let x3 = expr // ... // ~~> insert OBLOCKSEP - | _, (CtxtSeqBlock (NotFirstInSeqBlock,offsidePos,addBlockEnd) :: rest) - when useBlockRule + | _, (CtxtSeqBlock (NotFirstInSeqBlock, offsidePos, addBlockEnd) :: rest) + when useBlockRule && not (let isTypeCtxt = (match rest with | (CtxtTypeDefns _ :: _) -> true | _ -> false) // Don't insert 'OBLOCKSEP' between namespace declarations let isNamespaceCtxt = (match rest with | (CtxtNamespaceBody _ :: _) -> true | _ -> false) if isNamespaceCtxt then (match token with NAMESPACE -> true | _ -> false) elif isTypeCtxt then isTypeSeqBlockElementContinuator token - else isSeqBlockElementContinuator token) + else isSeqBlockElementContinuator token) && (tokenStartCol = offsidePos.Column) && (tokenStartPos.OriginalLine <> offsidePos.OriginalLine) -> if debug then dprintf "offside at column %d matches start of block(%a)! delaying token, returning OBLOCKSEP\n" tokenStartCol outputPos offsidePos - replaceCtxt tokenTup (CtxtSeqBlock (FirstInSeqBlock,offsidePos,addBlockEnd)) + replaceCtxt tokenTup (CtxtSeqBlock (FirstInSeqBlock, offsidePos, addBlockEnd)) // No change to offside stack: another statement block starts... insertTokenFromPrevPosToCurrentPos OBLOCKSEP @@ -1524,7 +1523,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // let .... = // ... // <*> - | _, (CtxtLetDecl (true,offsidePos) :: _) when + | _, (CtxtLetDecl (true, offsidePos) :: _) when isSemiSemi || (if isLetContinuator token then tokenStartCol + 1 else tokenStartCol) <= offsidePos.Column -> if debug then dprintf "token at column %d is offside from LET(offsidePos=%a)! delaying token, returning ODECLEND\n" tokenStartCol outputPos offsidePos popCtxt() @@ -1560,7 +1559,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // module M = ... // ... // NOTE: ;; does not terminate a whole file module body. - | _, ((CtxtModuleBody (offsidePos,wholeFile)) :: _) when (isSemiSemi && not wholeFile) || tokenStartCol <= offsidePos.Column -> + | _, ((CtxtModuleBody (offsidePos, wholeFile)) :: _) when (isSemiSemi && not wholeFile) || tokenStartCol <= offsidePos.Column -> if debug then dprintf "token at column %d is offside from MODULE with offsidePos %a! delaying token\n" tokenStartCol outputPos offsidePos popCtxt() reprocess() @@ -1576,7 +1575,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, popCtxt() reprocess() - // Pop CtxtMemberBody when offside. Insert an ODECLEND to indicate the end of the member + // Pop CtxtMemberBody when offside. Insert an ODECLEND to indicate the end of the member | _, ((CtxtMemberBody(offsidePos)) :: _) when isSemiSemi || tokenStartCol <= offsidePos.Column -> if debug then dprintf "token at column %d is offside from MEMBER/OVERRIDE head with offsidePos %a!\n" tokenStartCol outputPos offsidePos popCtxt() @@ -1589,19 +1588,19 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, reprocess() | _, (CtxtIf offsidePos :: _) - when isSemiSemi || (if isIfBlockContinuator token then tokenStartCol + 1 else tokenStartCol) <= offsidePos.Column -> + when isSemiSemi || (if isIfBlockContinuator token then tokenStartCol + 1 else tokenStartCol) <= offsidePos.Column -> if debug then dprintf "offside from CtxtIf\n" popCtxt() reprocess() | _, (CtxtWithAsLet offsidePos :: _) - when isSemiSemi || (if isLetContinuator token then tokenStartCol + 1 else tokenStartCol) <= offsidePos.Column -> + when isSemiSemi || (if isLetContinuator token then tokenStartCol + 1 else tokenStartCol) <= offsidePos.Column -> if debug then dprintf "offside from CtxtWithAsLet\n" popCtxt() insertToken OEND | _, (CtxtWithAsAugment(offsidePos) :: _) - when isSemiSemi || (if isWithAugmentBlockContinuator token then tokenStartCol + 1 else tokenStartCol) <= offsidePos.Column -> + when isSemiSemi || (if isWithAugmentBlockContinuator token then tokenStartCol + 1 else tokenStartCol) <= offsidePos.Column -> if debug then dprintf "offside from CtxtWithAsAugment, isWithAugmentBlockContinuator = %b\n" (isWithAugmentBlockContinuator token) popCtxt() insertToken ODECLEND @@ -1613,13 +1612,13 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, reprocess() | _, (CtxtFor offsidePos :: _) - when isSemiSemi || (if isForLoopContinuator token then tokenStartCol + 1 else tokenStartCol) <= offsidePos.Column -> + when isSemiSemi || (if isForLoopContinuator token then tokenStartCol + 1 else tokenStartCol) <= offsidePos.Column -> if debug then dprintf "offside from CtxtFor\n" popCtxt() reprocess() | _, (CtxtWhile offsidePos :: _) - when isSemiSemi || (if isWhileBlockContinuator token then tokenStartCol + 1 else tokenStartCol) <= offsidePos.Column -> + when isSemiSemi || (if isWhileBlockContinuator token then tokenStartCol + 1 else tokenStartCol) <= offsidePos.Column -> if debug then dprintf "offside from CtxtWhile\n" popCtxt() reprocess() @@ -1642,7 +1641,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, reprocess() | _, (CtxtTry offsidePos :: _) - when isSemiSemi || (if isTryBlockContinuator token then tokenStartCol + 1 else tokenStartCol) <= offsidePos.Column -> + when isSemiSemi || (if isTryBlockContinuator token then tokenStartCol + 1 else tokenStartCol) <= offsidePos.Column -> if debug then dprintf "offside from CtxtTry\n" popCtxt() reprocess() @@ -1653,7 +1652,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // // then // ... - | _, (CtxtThen offsidePos :: _) when isSemiSemi || (if isThenBlockContinuator token then tokenStartCol + 1 else tokenStartCol)<= offsidePos.Column -> + | _, (CtxtThen offsidePos :: _) when isSemiSemi || (if isThenBlockContinuator token then tokenStartCol + 1 else tokenStartCol)<= offsidePos.Column -> if debug then dprintf "offside from CtxtThen, popping\n" popCtxt() reprocess() @@ -1667,38 +1666,38 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, reprocess() // leadingBar=false permits match patterns without an initial '|' - | _, (CtxtMatchClauses (leadingBar,offsidePos) :: _) + | _, (CtxtMatchClauses (leadingBar, offsidePos) :: _) when (isSemiSemi || (match token with // BAR occurs in pattern matching 'with' blocks | BAR -> - let cond1 = tokenStartCol + (if leadingBar then 0 else 2) < offsidePos.Column - let cond2 = tokenStartCol + (if leadingBar then 1 else 2) < offsidePos.Column + let cond1 = tokenStartCol + (if leadingBar then 0 else 2) < offsidePos.Column + let cond2 = tokenStartCol + (if leadingBar then 1 else 2) < offsidePos.Column if (cond1 <> cond2) then - errorR(Lexhelp.IndentationProblem(FSComp.SR.lexfltSeparatorTokensOfPatternMatchMisaligned(),mkSynRange (startPosOfTokenTup tokenTup) tokenTup.LexbufState.EndPos)) + errorR(Lexhelp.IndentationProblem(FSComp.SR.lexfltSeparatorTokensOfPatternMatchMisaligned(), mkSynRange (startPosOfTokenTup tokenTup) tokenTup.LexbufState.EndPos)) cond1 | END -> tokenStartCol + (if leadingBar then -1 else 1) < offsidePos.Column - | _ -> tokenStartCol + (if leadingBar then -1 else 1) < offsidePos.Column)) -> + | _ -> tokenStartCol + (if leadingBar then -1 else 1) < offsidePos.Column)) -> if debug then dprintf "offside from WITH, tokenStartCol = %d, offsidePos = %a, delaying token, returning OEND\n" tokenStartCol outputPos offsidePos popCtxt() insertToken OEND // namespace ... ~~~> CtxtNamespaceHead - | NAMESPACE,(_ :: _) -> + | NAMESPACE, (_ :: _) -> if debug then dprintf "NAMESPACE: entering CtxtNamespaceHead, awaiting end of long identifier to push CtxtSeqBlock\n" pushCtxt tokenTup (CtxtNamespaceHead (tokenStartPos, token)) returnToken tokenLexbufState token // module ... ~~~> CtxtModuleHead - | MODULE,(_ :: _) -> + | MODULE, (_ :: _) -> insertComingSoonTokens("MODULE", MODULE_COMING_SOON, MODULE_IS_HERE) if debug then dprintf "MODULE: entering CtxtModuleHead, awaiting EQUALS to go to CtxtSeqBlock (%a)\n" outputPos tokenStartPos pushCtxt tokenTup (CtxtModuleHead (tokenStartPos, token)) hwTokenFetch(useBlockRule) // exception ... ~~~> CtxtException - | EXCEPTION,(_ :: _) -> + | EXCEPTION, (_ :: _) -> if debug then dprintf "EXCEPTION: entering CtxtException(%a)\n" outputPos tokenStartPos pushCtxt tokenTup (CtxtException tokenStartPos) returnToken tokenLexbufState token @@ -1710,7 +1709,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, if debug then dprintf "LET: entering CtxtLetDecl(), awaiting EQUALS to go to CtxtSeqBlock (%a)\n" outputPos tokenStartPos let startPos = match ctxt with CtxtMemberHead startPos -> startPos | _ -> tokenStartPos popCtxt() // get rid of the CtxtMemberHead - pushCtxt tokenTup (CtxtLetDecl(true,startPos)) + pushCtxt tokenTup (CtxtLetDecl(true, startPos)) returnToken tokenLexbufState (OLET(isUse)) // let ... ~~~> CtxtLetDecl @@ -1722,17 +1721,17 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, | CtxtMatchClauses _ -> true | _ -> false if debug then dprintf "LET: entering CtxtLetDecl(blockLet=%b), awaiting EQUALS to go to CtxtSeqBlock (%a)\n" blockLet outputPos tokenStartPos - pushCtxt tokenTup (CtxtLetDecl(blockLet,tokenStartPos)) + pushCtxt tokenTup (CtxtLetDecl(blockLet, tokenStartPos)) returnToken tokenLexbufState (if blockLet then OLET(isUse) else token) // let! ... ~~~> CtxtLetDecl | BINDER b, (ctxt :: _) -> let blockLet = match ctxt with CtxtSeqBlock _ -> true | _ -> false if debug then dprintf "LET: entering CtxtLetDecl(blockLet=%b), awaiting EQUALS to go to CtxtSeqBlock (%a)\n" blockLet outputPos tokenStartPos - pushCtxt tokenTup (CtxtLetDecl(blockLet,tokenStartPos)) + pushCtxt tokenTup (CtxtLetDecl(blockLet, tokenStartPos)) returnToken tokenLexbufState (if blockLet then OBINDER b else token) - | (VAL | STATIC | ABSTRACT | MEMBER | OVERRIDE | DEFAULT), ctxtStack when thereIsACtxtMemberBodyOnTheStackAndWeShouldPopStackForUpcomingMember ctxtStack -> + | (VAL | STATIC | ABSTRACT | MEMBER | OVERRIDE | DEFAULT), ctxtStack when thereIsACtxtMemberBodyOnTheStackAndWeShouldPopStackForUpcomingMember ctxtStack -> if debug then dprintf "STATIC/MEMBER/OVERRIDE/DEFAULT: already inside CtxtMemberBody, popping all that context before starting next member...\n" // save this token, we'll consume it again later... delayTokenNoProcessing tokenTup @@ -1756,19 +1755,19 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // override ... ~~~> CtxtMemberHead // default ... ~~~> CtxtMemberHead // val ... ~~~> CtxtMemberHead - | (VAL | STATIC | ABSTRACT | MEMBER | OVERRIDE | DEFAULT),(ctxt :: _) when (match ctxt with CtxtMemberHead _ -> false | _ -> true) -> + | (VAL | STATIC | ABSTRACT | MEMBER | OVERRIDE | DEFAULT), (ctxt :: _) when (match ctxt with CtxtMemberHead _ -> false | _ -> true) -> if debug then dprintf "STATIC/MEMBER/OVERRIDE/DEFAULT: entering CtxtMemberHead, awaiting EQUALS to go to CtxtSeqBlock (%a)\n" outputPos tokenStartPos pushCtxt tokenTup (CtxtMemberHead(tokenStartPos)) returnToken tokenLexbufState token // public new... ~~~> CtxtMemberHead - | (PUBLIC | PRIVATE | INTERNAL),(_ctxt :: _) when (match peekNextToken() with NEW -> true | _ -> false) -> + | (PUBLIC | PRIVATE | INTERNAL), (_ctxt :: _) when (match peekNextToken() with NEW -> true | _ -> false) -> if debug then dprintf "PUBLIC/PRIVATE/INTERNAL NEW: entering CtxtMemberHead, awaiting EQUALS to go to CtxtSeqBlock (%a)\n" outputPos tokenStartPos pushCtxt tokenTup (CtxtMemberHead(tokenStartPos)) returnToken tokenLexbufState token // new( ~~~> CtxtMemberHead, if not already there because of 'public' - | NEW, ctxt :: _ when (match peekNextToken() with LPAREN -> true | _ -> false) && (match ctxt with CtxtMemberHead _ -> false | _ -> true) -> + | NEW, ctxt :: _ when (match peekNextToken() with LPAREN -> true | _ -> false) && (match ctxt with CtxtMemberHead _ -> false | _ -> true) -> if debug then dprintf "NEW: entering CtxtMemberHead, awaiting EQUALS to go to CtxtSeqBlock (%a)\n" outputPos tokenStartPos pushCtxt tokenTup (CtxtMemberHead(tokenStartPos)) returnToken tokenLexbufState token @@ -1776,19 +1775,19 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // 'let ... = ' ~~~> CtxtSeqBlock | EQUALS, (CtxtLetDecl _ :: _) -> if debug then dprintf "CtxtLetDecl: EQUALS, pushing CtxtSeqBlock\n" - pushCtxtSeqBlock(true,AddBlockEnd) + pushCtxtSeqBlock(true, AddBlockEnd) returnToken tokenLexbufState token | EQUALS, (CtxtTypeDefns _ :: _) -> if debug then dprintf "CtxType: EQUALS, pushing CtxtSeqBlock\n" - pushCtxtSeqBlock(true,AddBlockEnd) + pushCtxtSeqBlock(true, AddBlockEnd) returnToken tokenLexbufState token | (LAZY | ASSERT), _ -> if isControlFlowOrNotSameLine() then if debug then dprintf "LAZY/ASSERT, pushing CtxtSeqBlock\n" - pushCtxtSeqBlock(true,AddBlockEnd) - returnToken tokenLexbufState (match token with LAZY -> OLAZY | _ -> OASSERT) + pushCtxtSeqBlock(true, AddBlockEnd) + returnToken tokenLexbufState (match token with LAZY -> OLAZY | _ -> OASSERT) else returnToken tokenLexbufState token @@ -1805,16 +1804,16 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // '{ id1 = 1 // M.id2 = ... ' ~~~> CtxtSeqBlock | EQUALS, ((CtxtWithAsLet _) :: _) // This detects 'with = '. - | EQUALS, ((CtxtVanilla (_,true)) :: (CtxtSeqBlock _) :: (CtxtWithAsLet _ | CtxtParen((LBRACE | LBRACE_BAR),_)) :: _) -> + | EQUALS, ((CtxtVanilla (_, true)) :: (CtxtSeqBlock _) :: (CtxtWithAsLet _ | CtxtParen((LBRACE | LBRACE_BAR), _)) :: _) -> if debug then dprintf "CtxtLetDecl/CtxtWithAsLet: EQUALS, pushing CtxtSeqBlock\n" // We don't insert begin/end block tokens for single-line bindings since we can't properly distinguish single-line *) // record update expressions such as "{ t with gbuckets=Array.copy t.gbuckets; gcount=t.gcount }" *) // These have a syntactically odd status because of the use of ";" to terminate expressions, so each *) // "=" binding is not properly balanced by "in" or "and" tokens in the single line syntax (unlike other bindings) *) if isControlFlowOrNotSameLine() then - pushCtxtSeqBlock(true,AddBlockEnd) + pushCtxtSeqBlock(true, AddBlockEnd) else - pushCtxtSeqBlock(false,NoAddBlockEnd) + pushCtxtSeqBlock(false, NoAddBlockEnd) returnToken tokenLexbufState token // 'new(... =' ~~~> CtxtMemberBody, CtxtSeqBlock @@ -1825,14 +1824,14 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, | EQUALS, ((CtxtMemberHead(offsidePos)) :: _) -> if debug then dprintf "CtxtMemberHead: EQUALS, pushing CtxtSeqBlock\n" replaceCtxt tokenTup (CtxtMemberBody (offsidePos)) - pushCtxtSeqBlock(true,AddBlockEnd) + pushCtxtSeqBlock(true, AddBlockEnd) returnToken tokenLexbufState token // '(' tokens are balanced with ')' tokens and also introduce a CtxtSeqBlock | (BEGIN | LPAREN | SIG | LBRACE | LBRACE_BAR | LBRACK | LBRACK_BAR | LQUOTE _ | LESS true), _ -> if debug then dprintf "LPAREN etc., pushes CtxtParen, pushing CtxtSeqBlock, tokenStartPos = %a\n" outputPos tokenStartPos - pushCtxt tokenTup (CtxtParen (token,tokenStartPos)) - pushCtxtSeqBlock(false,NoAddBlockEnd) + pushCtxt tokenTup (CtxtParen (token, tokenStartPos)) + pushCtxtSeqBlock(false, NoAddBlockEnd) returnToken tokenLexbufState token // '(' tokens are balanced with ')' tokens and also introduce a CtxtSeqBlock @@ -1845,8 +1844,8 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, | _ -> false) (* type X<'a when 'a : struct> *) -> if debug then dprintf "LPAREN etc., pushes CtxtParen, pushing CtxtSeqBlock, tokenStartPos = %a\n" outputPos tokenStartPos - pushCtxt tokenTup (CtxtParen (token,tokenStartPos)) - pushCtxtSeqBlock(false,NoAddBlockEnd) + pushCtxt tokenTup (CtxtParen (token, tokenStartPos)) + pushCtxtSeqBlock(false, NoAddBlockEnd) returnToken tokenLexbufState token | RARROW, ctxts @@ -1857,22 +1856,22 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // comprehension | (CtxtSeqBlock _ :: CtxtParen ((LBRACK | LBRACE | LBRACE_BAR | LBRACK_BAR), _) :: _) -> true // comprehension - | (CtxtSeqBlock _ :: (CtxtDo _ | CtxtWhile _ | CtxtFor _ | CtxtWhen _ | CtxtMatchClauses _ | CtxtTry _ | CtxtThen _ | CtxtElse _) :: _) -> true + | (CtxtSeqBlock _ :: (CtxtDo _ | CtxtWhile _ | CtxtFor _ | CtxtWhen _ | CtxtMatchClauses _ | CtxtTry _ | CtxtThen _ | CtxtElse _) :: _) -> true | _ -> false) -> if debug then dprintf "RARROW, pushing CtxtSeqBlock, tokenStartPos = %a\n" outputPos tokenStartPos - pushCtxtSeqBlock(false,AddOneSidedBlockEnd) + pushCtxtSeqBlock(false, AddOneSidedBlockEnd) returnToken tokenLexbufState token - | LARROW, _ when isControlFlowOrNotSameLine() -> + | LARROW, _ when isControlFlowOrNotSameLine() -> if debug then dprintf "LARROW, pushing CtxtSeqBlock, tokenStartPos = %a\n" outputPos tokenStartPos - pushCtxtSeqBlock(true,AddBlockEnd) + pushCtxtSeqBlock(true, AddBlockEnd) returnToken tokenLexbufState token // do ~~> CtxtDo;CtxtSeqBlock (unconditionally) | (DO | DO_BANG), _ -> if debug then dprintf "DO: pushing CtxtSeqBlock, tokenStartPos = %a\n" outputPos tokenStartPos pushCtxt tokenTup (CtxtDo (tokenStartPos)) - pushCtxtSeqBlock(true,AddBlockEnd) + pushCtxtSeqBlock(true, AddBlockEnd) returnToken tokenLexbufState (match token with DO -> ODO | DO_BANG -> ODO_BANG | _ -> failwith "unreachable") // The r.h.s. of an infix token begins a new block. @@ -1889,24 +1888,24 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, (match ctxts with CtxtMatchClauses _ :: _ -> false | _ -> true)) -> if debug then dprintf "(Infix etc.), pushing CtxtSeqBlock, tokenStartPos = %a\n" outputPos tokenStartPos - pushCtxtSeqBlock(false,NoAddBlockEnd) + pushCtxtSeqBlock(false, NoAddBlockEnd) returnToken tokenLexbufState token - | WITH, ((CtxtTry _ | CtxtMatch _) :: _) -> + | WITH, ((CtxtTry _ | CtxtMatch _) :: _) -> let lookaheadTokenTup = peekNextTokenTup() let lookaheadTokenStartPos = startPosOfTokenTup lookaheadTokenTup let leadingBar = match (peekNextToken()) with BAR -> true | _ -> false if debug then dprintf "WITH, pushing CtxtMatchClauses, lookaheadTokenStartPos = %a, tokenStartPos = %a\n" outputPos lookaheadTokenStartPos outputPos tokenStartPos - pushCtxt lookaheadTokenTup (CtxtMatchClauses(leadingBar,lookaheadTokenStartPos)) + pushCtxt lookaheadTokenTup (CtxtMatchClauses(leadingBar, lookaheadTokenStartPos)) returnToken tokenLexbufState OWITH - | FINALLY, (CtxtTry _ :: _) -> + | FINALLY, (CtxtTry _ :: _) -> if debug then dprintf "FINALLY, pushing pushCtxtSeqBlock, tokenStartPos = %a\n" outputPos tokenStartPos - pushCtxtSeqBlock(true,AddBlockEnd) + pushCtxtSeqBlock(true, AddBlockEnd) returnToken tokenLexbufState token | WITH, (((CtxtException _ | CtxtTypeDefns _ | CtxtMemberHead _ | CtxtInterfaceHead _ | CtxtMemberBody _) as limCtxt) :: _) - | WITH, ((CtxtSeqBlock _) as limCtxt :: CtxtParen((LBRACE | LBRACE_BAR),_) :: _) -> + | WITH, ((CtxtSeqBlock _) as limCtxt :: CtxtParen((LBRACE | LBRACE_BAR), _) :: _) -> let lookaheadTokenTup = peekNextTokenTup() let lookaheadTokenStartPos = startPosOfTokenTup lookaheadTokenTup match lookaheadTokenTup.Token with @@ -1925,7 +1924,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, | PUBLIC | PRIVATE | INTERNAL | INLINE -> let offsidePos = - if lookaheadTokenStartPos.Column > tokenTup.LexbufState.EndPos.Column then + if lookaheadTokenStartPos.Column > tokenTup.LexbufState.EndPos.Column then // This detects: // { new Foo // with M() = 1 @@ -1934,14 +1933,14 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // (HOWEVER: note the above language construct is now deprecated/removed) // // It also happens to detect - // { foo with m = 1; + // { foo with m = 1 // n = 2 } // So we're careful to set the offside column to be the minimum required *) tokenStartPos else // This detects: // { foo with - // m = 1; + // m = 1 // n = 2 } // So we're careful to set the offside column to be the minimum required *) limCtxt.StartPos @@ -1964,7 +1963,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, res if isFollowedByLongIdentEquals then - pushCtxtSeqBlock(false,NoAddBlockEnd) + pushCtxtSeqBlock(false, NoAddBlockEnd) returnToken tokenLexbufState OWITH | _ -> @@ -1973,7 +1972,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // For attributes on properties: // member x.PublicGetSetProperty // with [] get() = "Ralf" - if (match lookaheadTokenTup.Token with LBRACK_LESS -> true | _ -> false) && (lookaheadTokenStartPos.OriginalLine = tokenTup.StartPos.OriginalLine) then + if (match lookaheadTokenTup.Token with LBRACK_LESS -> true | _ -> false) && (lookaheadTokenStartPos.OriginalLine = tokenTup.StartPos.OriginalLine) then let offsidePos = tokenStartPos pushCtxt tokenTup (CtxtWithAsLet(offsidePos)) returnToken tokenLexbufState OWITH @@ -1997,36 +1996,36 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, let offsidePos = limCtxt.StartPos pushCtxt tokenTup (CtxtWithAsAugment(offsidePos)) - pushCtxtSeqBlock(true,AddBlockEnd) + pushCtxtSeqBlock(true, AddBlockEnd) returnToken tokenLexbufState token - | WITH, stack -> + | WITH, stack -> if debug then dprintf "WITH\n" if debug then dprintf "WITH --> NO MATCH, pushing CtxtWithAsAugment (type augmentation), stack = %A" stack pushCtxt tokenTup (CtxtWithAsAugment(tokenStartPos)) - pushCtxtSeqBlock(true,AddBlockEnd) + pushCtxtSeqBlock(true, AddBlockEnd) returnToken tokenLexbufState token - | FUNCTION, _ -> + | FUNCTION, _ -> let lookaheadTokenTup = peekNextTokenTup() let lookaheadTokenStartPos = startPosOfTokenTup lookaheadTokenTup let leadingBar = match (peekNextToken()) with BAR -> true | _ -> false pushCtxt tokenTup (CtxtFunction(tokenStartPos)) - pushCtxt lookaheadTokenTup (CtxtMatchClauses(leadingBar,lookaheadTokenStartPos)) + pushCtxt lookaheadTokenTup (CtxtMatchClauses(leadingBar, lookaheadTokenStartPos)) returnToken tokenLexbufState OFUNCTION - | THEN,_ -> + | THEN, _ -> if debug then dprintf "THEN, replacing THEN with OTHEN, pushing CtxtSeqBlock;CtxtThen(%a)\n" outputPos tokenStartPos pushCtxt tokenTup (CtxtThen(tokenStartPos)) - pushCtxtSeqBlock(true,AddBlockEnd) + pushCtxtSeqBlock(true, AddBlockEnd) returnToken tokenLexbufState OTHEN - | ELSE, _ -> + | ELSE, _ -> let lookaheadTokenTup = peekNextTokenTup() let lookaheadTokenStartPos = startPosOfTokenTup lookaheadTokenTup match peekNextToken() with | IF when isSameLine() -> - // We convert ELSE IF to ELIF since it then opens the block at the right point, + // We convert ELSE IF to ELIF since it then opens the block at the right point, // In particular the case // if e1 then e2 // else if e3 then e4 @@ -2039,48 +2038,48 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, | _ -> if debug then dprintf "ELSE: replacing ELSE with OELSE, pushing CtxtSeqBlock, CtxtElse(%a)\n" outputPos lookaheadTokenStartPos pushCtxt tokenTup (CtxtElse(tokenStartPos)) - pushCtxtSeqBlock(true,AddBlockEnd) + pushCtxtSeqBlock(true, AddBlockEnd) returnToken tokenLexbufState OELSE - | (ELIF | IF), _ -> + | (ELIF | IF), _ -> if debug then dprintf "IF, pushing CtxtIf(%a)\n" outputPos tokenStartPos pushCtxt tokenTup (CtxtIf (tokenStartPos)) returnToken tokenLexbufState token - | (MATCH | MATCH_BANG), _ -> + | (MATCH | MATCH_BANG), _ -> if debug then dprintf "MATCH, pushing CtxtMatch(%a)\n" outputPos tokenStartPos pushCtxt tokenTup (CtxtMatch (tokenStartPos)) returnToken tokenLexbufState token - | FOR, _ -> + | FOR, _ -> if debug then dprintf "FOR, pushing CtxtFor(%a)\n" outputPos tokenStartPos pushCtxt tokenTup (CtxtFor (tokenStartPos)) returnToken tokenLexbufState token - | WHILE, _ -> + | WHILE, _ -> if debug then dprintf "WHILE, pushing CtxtWhile(%a)\n" outputPos tokenStartPos pushCtxt tokenTup (CtxtWhile (tokenStartPos)) returnToken tokenLexbufState token - | WHEN, ((CtxtSeqBlock _) :: _) -> + | WHEN, ((CtxtSeqBlock _) :: _) -> if debug then dprintf "WHEN, pushing CtxtWhen(%a)\n" outputPos tokenStartPos pushCtxt tokenTup (CtxtWhen (tokenStartPos)) returnToken tokenLexbufState token - | FUN, _ -> + | FUN, _ -> if debug then dprintf "FUN, pushing CtxtFun(%a)\n" outputPos tokenStartPos pushCtxt tokenTup (CtxtFun (tokenStartPos)) returnToken tokenLexbufState OFUN - | INTERFACE, _ -> + | INTERFACE, _ -> let lookaheadTokenTup = peekNextTokenTup() let lookaheadTokenStartPos = startPosOfTokenTup lookaheadTokenTup match lookaheadTokenTup.Token with // type I = interface .... end - | DEFAULT | OVERRIDE | INTERFACE | NEW | TYPE | STATIC | END | MEMBER | ABSTRACT | INHERIT | LBRACK_LESS -> + | DEFAULT | OVERRIDE | INTERFACE | NEW | TYPE | STATIC | END | MEMBER | ABSTRACT | INHERIT | LBRACK_LESS -> if debug then dprintf "INTERFACE, pushing CtxtParen, tokenStartPos = %a, lookaheadTokenStartPos = %a\n" outputPos tokenStartPos outputPos lookaheadTokenStartPos - pushCtxt tokenTup (CtxtParen (token,tokenStartPos)) - pushCtxtSeqBlock(true,AddBlockEnd) + pushCtxt tokenTup (CtxtParen (token, tokenStartPos)) + pushCtxtSeqBlock(true, AddBlockEnd) returnToken tokenLexbufState token // type C with interface .... with // type C = interface .... with @@ -2089,49 +2088,49 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, pushCtxt tokenTup (CtxtInterfaceHead(tokenStartPos)) returnToken tokenLexbufState OINTERFACE_MEMBER - | CLASS, _ -> + | CLASS, _ -> if debug then dprintf "CLASS, pushing CtxtParen(%a)\n" outputPos tokenStartPos - pushCtxt tokenTup (CtxtParen (token,tokenStartPos)) - pushCtxtSeqBlock(true,AddBlockEnd) + pushCtxt tokenTup (CtxtParen (token, tokenStartPos)) + pushCtxtSeqBlock(true, AddBlockEnd) returnToken tokenLexbufState token - | TYPE, _ -> + | TYPE, _ -> insertComingSoonTokens("TYPE", TYPE_COMING_SOON, TYPE_IS_HERE) if debug then dprintf "TYPE, pushing CtxtTypeDefns(%a)\n" outputPos tokenStartPos pushCtxt tokenTup (CtxtTypeDefns(tokenStartPos)) hwTokenFetch(useBlockRule) - | TRY, _ -> + | TRY, _ -> if debug then dprintf "Try, pushing CtxtTry(%a)\n" outputPos tokenStartPos pushCtxt tokenTup (CtxtTry (tokenStartPos)) // The ideal spec would be to push a begin/end block pair here, but we can only do that - // if we are able to balance the WITH with the TRY. We can't do that because of the numerous ways + // if we are able to balance the WITH with the TRY. We can't do that because of the numerous ways // WITH is used in the grammar (see what happens when we hit a WITH below. // This hits in the single line case: "try make ef1 t with _ -> make ef2 t". - pushCtxtSeqBlock(false,AddOneSidedBlockEnd) + pushCtxtSeqBlock(false, AddOneSidedBlockEnd) returnToken tokenLexbufState token - | OBLOCKBEGIN,_ -> + | OBLOCKBEGIN, _ -> returnToken tokenLexbufState token - | ODUMMY(_),_ -> + | ODUMMY(_), _ -> if debug then dprintf "skipping dummy token as no offside rules apply\n" hwTokenFetch (useBlockRule) // Ordinary tokens start a vanilla block - | _,CtxtSeqBlock _ :: _ -> + | _, CtxtSeqBlock _ :: _ -> pushCtxt tokenTup (CtxtVanilla(tokenStartPos, isLongIdentEquals token)) if debug then dprintf "pushing CtxtVanilla at tokenStartPos = %a\n" outputPos tokenStartPos returnToken tokenLexbufState token - | _ -> + | _ -> returnToken tokenLexbufState token - and rulesForBothSoftWhiteAndHardWhite(tokenTup:TokenTup) = + and rulesForBothSoftWhiteAndHardWhite(tokenTup: TokenTup) = match tokenTup.Token with // Insert HIGH_PRECEDENCE_PAREN_APP if needed - | IDENT _ when (nextTokenIsAdjacentLParenOrLBrack tokenTup).IsSome -> + | IDENT _ when (nextTokenIsAdjacentLParenOrLBrack tokenTup).IsSome -> let dotTokenTup = peekNextTokenTup() if debug then dprintf "inserting HIGH_PRECEDENCE_PAREN_APP at dotTokenPos = %a\n" outputPos (startPosOfTokenTup dotTokenTup) let hpa = @@ -2144,7 +2143,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, true // Insert HIGH_PRECEDENCE_TYAPP if needed - | (DELEGATE | IDENT _ | IEEE64 _ | IEEE32 _ | DECIMAL _ | INT8 _ | INT16 _ | INT32 _ | INT64 _ | NATIVEINT _ | UINT8 _ | UINT16 _ | UINT32 _ | UINT64 _ | BIGNUM _) when peekAdjacentTypars false tokenTup -> + | (DELEGATE | IDENT _ | IEEE64 _ | IEEE32 _ | DECIMAL _ | INT8 _ | INT16 _ | INT32 _ | INT64 _ | NATIVEINT _ | UINT8 _ | UINT16 _ | UINT32 _ | UINT64 _ | BIGNUM _) when peekAdjacentTypars false tokenTup -> let lessTokenTup = popNextTokenTup() delayToken (lessTokenTup.UseLocation(match lessTokenTup.Token with LESS _ -> LESS true | _ -> failwith "unreachable")) @@ -2155,21 +2154,21 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, true // Split this token to allow "1..2" for range specification - | INT32_DOT_DOT (i,v) -> + | INT32_DOT_DOT (i, v) -> let dotdotPos = new LexbufState(tokenTup.EndPos.ShiftColumnBy(-2), tokenTup.EndPos, false) delayToken(new TokenTup(DOT_DOT, dotdotPos, tokenTup.LastTokenPos)) - delayToken(tokenTup.UseShiftedLocation(INT32(i,v), 0, -2)) + delayToken(tokenTup.UseShiftedLocation(INT32(i, v), 0, -2)) true // Split @>. and @@>. into two - | RQUOTE_DOT (s,raw) -> + | RQUOTE_DOT (s, raw) -> let dotPos = new LexbufState(tokenTup.EndPos.ShiftColumnBy(-1), tokenTup.EndPos, false) delayToken(new TokenTup(DOT, dotPos, tokenTup.LastTokenPos)) - delayToken(tokenTup.UseShiftedLocation(RQUOTE(s,raw), 0, -1)) + delayToken(tokenTup.UseShiftedLocation(RQUOTE(s, raw), 0, -1)) true - | MINUS | PLUS_MINUS_OP _ | PERCENT_OP _ | AMP | AMP_AMP + | MINUS | PLUS_MINUS_OP _ | PERCENT_OP _ | AMP | AMP_AMP when ((match tokenTup.Token with - | PLUS_MINUS_OP s -> (s = "+") || (s = "+.") || (s = "-.") + | PLUS_MINUS_OP s -> (s = "+") || (s = "+.") || (s = "-.") | PERCENT_OP s -> (s = "%") || (s = "%%") | _ -> true) && nextTokenIsAdjacent tokenTup && @@ -2186,7 +2185,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, | _ -> false let nextTokenTup = popNextTokenTup() /// Merge the location of the prefix token and the literal - let delayMergedToken tok = delayToken(new TokenTup(tok,new LexbufState(tokenTup.LexbufState.StartPos,nextTokenTup.LexbufState.EndPos,nextTokenTup.LexbufState.PastEOF),tokenTup.LastTokenPos)) + let delayMergedToken tok = delayToken(new TokenTup(tok, new LexbufState(tokenTup.LexbufState.StartPos, nextTokenTup.LexbufState.EndPos, nextTokenTup.LexbufState.PastEOF), tokenTup.LastTokenPos)) let noMerge() = let tokenName = match tokenTup.Token with @@ -2202,16 +2201,16 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, if plusOrMinus then match nextTokenTup.Token with - | INT8(v,bad) -> delayMergedToken(INT8((if plus then v else -v),(plus && bad))) // note: '-' makes a 'bad' max int 'good'. '+' does not - | INT16(v,bad) -> delayMergedToken(INT16((if plus then v else -v),(plus && bad))) // note: '-' makes a 'bad' max int 'good'. '+' does not - | INT32(v,bad) -> delayMergedToken(INT32((if plus then v else -v),(plus && bad))) // note: '-' makes a 'bad' max int 'good'. '+' does not - | INT32_DOT_DOT(v,bad) -> delayMergedToken(INT32_DOT_DOT((if plus then v else -v),(plus && bad))) // note: '-' makes a 'bad' max int 'good'. '+' does not - | INT64(v,bad) -> delayMergedToken(INT64((if plus then v else -v),(plus && bad))) // note: '-' makes a 'bad' max int 'good'. '+' does not - | NATIVEINT(v) -> delayMergedToken(NATIVEINT(if plus then v else -v)) - | IEEE32(v) -> delayMergedToken(IEEE32(if plus then v else -v)) - | IEEE64(v) -> delayMergedToken(IEEE64(if plus then v else -v)) - | DECIMAL(v) -> delayMergedToken(DECIMAL(if plus then v else System.Decimal.op_UnaryNegation v)) - | BIGNUM(v,s) -> delayMergedToken(BIGNUM((if plus then v else "-"+v),s)) + | INT8(v, bad) -> delayMergedToken(INT8((if plus then v else -v), (plus && bad))) // note: '-' makes a 'bad' max int 'good'. '+' does not + | INT16(v, bad) -> delayMergedToken(INT16((if plus then v else -v), (plus && bad))) // note: '-' makes a 'bad' max int 'good'. '+' does not + | INT32(v, bad) -> delayMergedToken(INT32((if plus then v else -v), (plus && bad))) // note: '-' makes a 'bad' max int 'good'. '+' does not + | INT32_DOT_DOT(v, bad) -> delayMergedToken(INT32_DOT_DOT((if plus then v else -v), (plus && bad))) // note: '-' makes a 'bad' max int 'good'. '+' does not + | INT64(v, bad) -> delayMergedToken(INT64((if plus then v else -v), (plus && bad))) // note: '-' makes a 'bad' max int 'good'. '+' does not + | NATIVEINT(v) -> delayMergedToken(NATIVEINT(if plus then v else -v)) + | IEEE32(v) -> delayMergedToken(IEEE32(if plus then v else -v)) + | IEEE64(v) -> delayMergedToken(IEEE64(if plus then v else -v)) + | DECIMAL(v) -> delayMergedToken(DECIMAL(if plus then v else System.Decimal.op_UnaryNegation v)) + | BIGNUM(v, s) -> delayMergedToken(BIGNUM((if plus then v else "-" + v), s)) | _ -> noMerge() else noMerge() @@ -2220,12 +2219,12 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, | _ -> false - and pushCtxtSeqBlock(addBlockBegin,addBlockEnd) = pushCtxtSeqBlockAt (peekNextTokenTup(),addBlockBegin,addBlockEnd) - and pushCtxtSeqBlockAt(p:TokenTup,addBlockBegin,addBlockEnd) = + and pushCtxtSeqBlock(addBlockBegin, addBlockEnd) = pushCtxtSeqBlockAt (peekNextTokenTup(), addBlockBegin, addBlockEnd) + and pushCtxtSeqBlockAt(p: TokenTup, addBlockBegin, addBlockEnd) = if addBlockBegin then if debug then dprintf "--> insert OBLOCKBEGIN \n" delayToken(p.UseLocation(OBLOCKBEGIN)) - pushCtxt p (CtxtSeqBlock(FirstInSeqBlock, startPosOfTokenTup p,addBlockEnd)) + pushCtxt p (CtxtSeqBlock(FirstInSeqBlock, startPosOfTokenTup p, addBlockEnd)) let rec swTokenFetch() = let tokenTup = popNextTokenTup() @@ -2251,7 +2250,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, // LexFilterImpl does the majority of the work for offsides rules and other magic. // LexFilter just wraps it with light post-processing that introduces a few more 'coming soon' symbols, to // make it easier for the parser to 'look ahead' and safely shift tokens in a number of recovery scenarios. -type LexFilter (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, lexbuf: UnicodeLexing.Lexbuf) = +type LexFilter (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, lexbuf: UnicodeLexing.Lexbuf) = let inner = new LexFilterImpl (lightSyntaxStatus, compilingFsLib, lexer, lexbuf) // We don't interact with lexbuf state at all, any inserted tokens have same state/location as the real one read, so diff --git a/src/fcs-fable/src/fsharp/LowerCallsAndSeqs.fs b/src/fcs-fable/src/fsharp/LowerCallsAndSeqs.fs index bec0d2afe8..087d49f39b 100755 --- a/src/fcs-fable/src/fsharp/LowerCallsAndSeqs.fs +++ b/src/fcs-fable/src/fsharp/LowerCallsAndSeqs.fs @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -module internal FSharp.Compiler.LowerCallsAndSeqs +module internal FSharp.Compiler.LowerCallsAndSeqs open FSharp.Compiler.AbstractIL open FSharp.Compiler.AbstractIL.IL open FSharp.Compiler.AbstractIL.Internal open FSharp.Compiler.AbstractIL.Internal.Library -open FSharp.Compiler.AccessibilityLogic +open FSharp.Compiler.AccessibilityLogic open FSharp.Compiler.Ast open FSharp.Compiler.Infos open FSharp.Compiler.ErrorLogger @@ -24,35 +24,35 @@ open FSharp.Compiler.MethodCalls let InterceptExpr g cont expr = match expr with - | Expr.Val(vref,flags,m) -> - match vref.ValReprInfo with + | Expr.Val(vref, flags, m) -> + match vref.ValReprInfo with | Some arity -> Some (fst (AdjustValForExpectedArity g m vref flags arity)) | None -> None - - // App (Val v,tys,args) - | Expr.App((Expr.Val (vref,flags,_) as f0),f0ty,tyargsl,argsl,m) -> - // Only transform if necessary, i.e. there are not enough arguments + + // App (Val v, tys, args) + | Expr.App((Expr.Val (vref, flags, _) as f0), f0ty, tyargsl, argsl, m) -> + // Only transform if necessary, i.e. there are not enough arguments match vref.ValReprInfo with | Some(topValInfo) -> - let argsl = List.map cont argsl - let f0 = + let argsl = List.map cont argsl + let f0 = if topValInfo.AritiesOfArgs.Length > argsl.Length - then fst(AdjustValForExpectedArity g m vref flags topValInfo) - else f0 + then fst(AdjustValForExpectedArity g m vref flags topValInfo) + else f0 - Some (MakeApplicationAndBetaReduce g (f0,f0ty,[tyargsl],argsl,m)) + Some (MakeApplicationAndBetaReduce g (f0, f0ty, [tyargsl], argsl, m)) | None -> None - | Expr.App(f0,f0ty,tyargsl,argsl,m) -> - Some (MakeApplicationAndBetaReduce g (f0,f0ty, [tyargsl],argsl,m) ) + | Expr.App(f0, f0ty, tyargsl, argsl, m) -> + Some (MakeApplicationAndBetaReduce g (f0, f0ty, [tyargsl], argsl, m) ) | _ -> None -/// An "expr -> expr" pass that eta-expands under-applied values of -/// known arity to lambda expressions and beta-var-reduces to bind -/// any known arguments. The results are later optimized by the peephole +/// An "expr -> expr" pass that eta-expands under-applied values of +/// known arity to lambda expressions and beta-var-reduces to bind +/// any known arguments. The results are later optimized by the peephole /// optimizer in opt.fs -let LowerImplFile g assembly = +let LowerImplFile g assembly = RewriteImplFile { PreIntercept = Some(InterceptExpr g) PreInterceptBinding=None PostTransform= (fun _ -> None) @@ -62,45 +62,45 @@ let LowerImplFile g assembly = //---------------------------------------------------------------------------- // State machine compilation for sequence expressions -let mkLambdaNoType g m uv e = - mkLambda m uv (e,tyOfExpr g e) +let mkLambdaNoType g m uv e = + mkLambda m uv (e, tyOfExpr g e) let mkUnitDelayLambda (g: TcGlobals) m e = - let uv,_ue = mkCompGenLocal m "unitVar" g.unit_ty - mkLambdaNoType g m uv e + let uv, _ue = mkCompGenLocal m "unitVar" g.unit_ty + mkLambdaNoType g m uv e let callNonOverloadedMethod g amap m methName ty args = - match TryFindIntrinsicMethInfo (InfoReader(g,amap)) m AccessibleFromSomeFSharpCode methName ty with - | [] -> error(InternalError("No method called '"+methName+"' was found",m)) - | ILMeth(g,ilMethInfo,_) :: _ -> + match TryFindIntrinsicMethInfo (InfoReader(g, amap)) m AccessibleFromSomeFSharpCode methName ty with + | [] -> error(InternalError("No method called '"+methName+"' was found", m)) + | ILMeth(g, ilMethInfo, _) :: _ -> // REVIEW: consider if this should ever be a constrained call. At the moment typecheck limitations in the F# typechecker // ensure the enumerator type used within computation expressions is not a struct type BuildILMethInfoCall g amap m false ilMethInfo NormalValUse [] false args |> fst - | _ -> - error(InternalError("The method called '"+methName+"' resolved to a non-IL type",m)) - + | _ -> + error(InternalError("The method called '"+methName+"' resolved to a non-IL type", m)) -type LoweredSeqFirstPhaseResult = + +type LoweredSeqFirstPhaseResult = { /// The code to run in the second phase, to rebuild the expressions, once all code labels and their mapping to program counters have been determined /// 'nextVar' is the argument variable for the GenerateNext method that represents the byref argument that holds the "goto" destination for a tailcalling sequence expression - phase2 : ((* pc: *) ValRef * (* current: *) ValRef * (* nextVar: *) ValRef * Map -> Expr * Expr * Expr) + phase2 : ((* pc: *) ValRef * (* current: *) ValRef * (* nextVar: *) ValRef * Map -> Expr * Expr * Expr) /// The labels allocated for one portion of the sequence expression - labels : int list + labels : int list /// any actual work done in Close significantClose : bool - + /// The state variables allocated for one portion of the sequence expression (i.e. the local let-bound variables which become state variables) - stateVars: ValRef list - + stateVars: ValRef list + /// The vars captured by the non-synchronous path capturedVars: FreeVars } let isVarFreeInExpr v e = Zset.contains v (freeInExpr CollectTyparsAndLocals e).FreeLocals /// Analyze a TAST expression to detect the elaborated form of a sequence expression. -/// Then compile it to a state machine represented as a TAST containing goto, return and label nodes. +/// 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 @@ -109,327 +109,327 @@ let isVarFreeInExpr v e = Zset.contains v (freeInExpr CollectTyparsAndLocals e). /// The analysis is done in two phases. The first phase determines the state variables and state labels (as Abstract IL code labels). /// We then allocate an integer pc for each state label and proceed with the second phase, which builds two related state machine /// expressions: one for 'MoveNext' and one for 'Dispose'. -let LowerSeqExpr g amap overallExpr = +let LowerSeqExpr g amap overallExpr = /// Detect a 'yield x' within a 'seq { ... }' - let (|SeqYield|_|) expr = + let (|SeqYield|_|) expr = match expr with - | Expr.App(Expr.Val (vref,_,_),_f0ty,_tyargsl,[arg],m) when valRefEq g vref g.seq_singleton_vref -> - Some (arg,m) - | _ -> + | Expr.App(Expr.Val (vref, _, _), _f0ty, _tyargsl, [arg], m) when valRefEq g vref g.seq_singleton_vref -> + Some (arg, m) + | _ -> None - + /// Detect a 'expr; expr' within a 'seq { ... }' - let (|SeqAppend|_|) expr = + let (|SeqAppend|_|) expr = match expr with - | Expr.App(Expr.Val (vref,_,_),_f0ty,_tyargsl,[arg1;arg2],m) when valRefEq g vref g.seq_append_vref -> - Some (arg1,arg2,m) - | _ -> + | Expr.App(Expr.Val (vref, _, _), _f0ty, _tyargsl, [arg1;arg2], m) when valRefEq g vref g.seq_append_vref -> + Some (arg1, arg2, m) + | _ -> None - + /// Detect a 'while gd do expr' within a 'seq { ... }' - let (|SeqWhile|_|) expr = + let (|SeqWhile|_|) expr = match expr with - | Expr.App(Expr.Val (vref,_,_),_f0ty,_tyargsl,[Expr.Lambda(_,_,_,[dummyv],gd,_,_);arg2],m) - when valRefEq g vref g.seq_generated_vref && - not (isVarFreeInExpr dummyv gd) -> - Some (gd,arg2,m) - | _ -> + | Expr.App(Expr.Val (vref, _, _), _f0ty, _tyargsl, [Expr.Lambda(_, _, _, [dummyv], gd, _, _);arg2], m) + when valRefEq g vref g.seq_generated_vref && + not (isVarFreeInExpr dummyv gd) -> + Some (gd, arg2, m) + | _ -> None - - let (|SeqTryFinally|_|) expr = + + let (|SeqTryFinally|_|) expr = match expr with - | Expr.App(Expr.Val (vref,_,_),_f0ty,_tyargsl,[arg1;Expr.Lambda(_,_,_,[dummyv],compensation,_,_)],m) - when valRefEq g vref g.seq_finally_vref && - not (isVarFreeInExpr dummyv compensation) -> - Some (arg1,compensation,m) - | _ -> + | Expr.App(Expr.Val (vref, _, _), _f0ty, _tyargsl, [arg1;Expr.Lambda(_, _, _, [dummyv], compensation, _, _)], m) + when valRefEq g vref g.seq_finally_vref && + not (isVarFreeInExpr dummyv compensation) -> + Some (arg1, compensation, m) + | _ -> None - - let (|SeqUsing|_|) expr = + + let (|SeqUsing|_|) expr = match expr with - | Expr.App(Expr.Val (vref,_,_),_f0ty,[_;_;elemTy],[resource;Expr.Lambda(_,_,_,[v],body,_,_)],m) - when valRefEq g vref g.seq_using_vref -> - Some (resource,v,body,elemTy,m) - | _ -> + | Expr.App(Expr.Val (vref, _, _), _f0ty, [_;_;elemTy], [resource;Expr.Lambda(_, _, _, [v], body, _, _)], m) + when valRefEq g vref g.seq_using_vref -> + Some (resource, v, body, elemTy, m) + | _ -> None - - let (|SeqFor|_|) expr = + + let (|SeqFor|_|) expr = match expr with // Nested for loops are represented by calls to Seq.collect - | Expr.App(Expr.Val (vref,_,_),_f0ty,[_inpElemTy;_enumty2;genElemTy],[Expr.Lambda(_,_,_,[v],body,_,_); inp],m) when valRefEq g vref g.seq_collect_vref -> - Some (inp,v,body,genElemTy,m) + | Expr.App(Expr.Val (vref, _, _), _f0ty, [_inpElemTy;_enumty2;genElemTy], [Expr.Lambda(_, _, _, [v], body, _, _); inp], m) when valRefEq g vref g.seq_collect_vref -> + Some (inp, v, body, genElemTy, m) // "for x in e -> e2" is converted to a call to Seq.map by the F# type checker. This could be removed, except it is also visible in F# quotations. - | Expr.App(Expr.Val (vref,_,_),_f0ty,[_inpElemTy;genElemTy],[Expr.Lambda(_,_,_,[v],body,_,_); inp],m) when valRefEq g vref g.seq_map_vref -> - Some (inp,v,mkCallSeqSingleton g body.Range genElemTy body,genElemTy,m) + | Expr.App(Expr.Val (vref, _, _), _f0ty, [_inpElemTy;genElemTy], [Expr.Lambda(_, _, _, [v], body, _, _); inp], m) when valRefEq g vref g.seq_map_vref -> + Some (inp, v, mkCallSeqSingleton g body.Range genElemTy body, genElemTy, m) | _ -> None - - let (|SeqDelay|_|) expr = + + let (|SeqDelay|_|) expr = match expr with - | Expr.App(Expr.Val (vref,_,_),_f0ty,[elemTy],[Expr.Lambda(_,_,_,[v],e,_,_)],_m) when valRefEq g vref g.seq_delay_vref && not (isVarFreeInExpr v e) -> Some (e,elemTy) + | Expr.App(Expr.Val (vref, _, _), _f0ty, [elemTy], [Expr.Lambda(_, _, _, [v], e, _, _)], _m) when valRefEq g vref g.seq_delay_vref && not (isVarFreeInExpr v e) -> Some (e, elemTy) | _ -> None - - let (|SeqEmpty|_|) expr = + + let (|SeqEmpty|_|) expr = match expr with - | Expr.App(Expr.Val (vref,_,_),_f0ty,_tyargsl,[],m) when valRefEq g vref g.seq_empty_vref -> Some (m) + | Expr.App(Expr.Val (vref, _, _), _f0ty, _tyargsl, [], m) when valRefEq g vref g.seq_empty_vref -> Some (m) | _ -> None - - let (|Seq|_|) expr = + + let (|Seq|_|) expr = match expr with // use 'seq { ... }' as an indicator - | Expr.App(Expr.Val (vref,_,_),_f0ty,[elemTy],[e],_m) when valRefEq g vref g.seq_vref -> Some (e,elemTy) + | Expr.App(Expr.Val (vref, _, _), _f0ty, [elemTy], [e], _m) when valRefEq g vref g.seq_vref -> Some (e, elemTy) | _ -> None - let RepresentBindingAsLocal (bind: Binding) res2 m = + let RepresentBindingAsLocal (bind: Binding) res2 m = // printfn "found letrec state variable %s" bind.Var.DisplayName { res2 with - phase2 = (fun ctxt -> - let generate2,dispose2,checkDispose2 = res2.phase2 ctxt + phase2 = (fun ctxt -> + let generate2, dispose2, checkDispose2 = res2.phase2 ctxt let generate = mkLetBind m bind generate2 let dispose = dispose2 let checkDispose = checkDispose2 - generate,dispose,checkDispose) + generate, dispose, checkDispose) stateVars = res2.stateVars } - let RepresentBindingAsStateMachineLocal (bind: Binding) res2 m = + let RepresentBindingAsStateMachineLocal (bind: Binding) res2 m = // printfn "found letrec state variable %s" bind.Var.DisplayName - let (TBind(v,e,sp)) = bind - let sp,spm = - match sp with - | SequencePointAtBinding m -> SequencePointsAtSeq,m - | _ -> SuppressSequencePointOnExprOfSequential,e.Range + let (TBind(v, e, sp)) = bind + let sp, spm = + match sp with + | SequencePointAtBinding m -> SequencePointsAtSeq, m + | _ -> SuppressSequencePointOnExprOfSequential, e.Range let vref = mkLocalValRef v { res2 with - phase2 = (fun ctxt -> - let generate2,dispose2,checkDispose2 = res2.phase2 ctxt - let generate = - mkCompGenSequential m - (mkSequential sp m - (mkValSet spm vref e) - generate2) + phase2 = (fun ctxt -> + let generate2, dispose2, checkDispose2 = res2.phase2 ctxt + let generate = + mkCompGenSequential m + (mkSequential sp m + (mkValSet spm vref e) + generate2) // zero out the current value to free up its memory - (mkValSet m vref (mkDefault (m,vref.Type))) + (mkValSet m vref (mkDefault (m, vref.Type))) let dispose = dispose2 let checkDispose = checkDispose2 - generate,dispose,checkDispose) + generate, dispose, checkDispose) stateVars = vref::res2.stateVars } - let RepresentBindingsAsLifted mkBinds res2 = + let RepresentBindingsAsLifted mkBinds res2 = // printfn "found top level let " { res2 with - phase2 = (fun ctxt -> - let generate2,dispose2,checkDispose2 = res2.phase2 ctxt + phase2 = (fun ctxt -> + let generate2, dispose2, checkDispose2 = res2.phase2 ctxt let generate = mkBinds generate2 let dispose = dispose2 let checkDispose = checkDispose2 - generate,dispose, checkDispose) } + generate, dispose, checkDispose) } - let rec Lower - isWholeExpr + let rec Lower + isWholeExpr isTailCall // is this sequence in tailcall position? noDisposeContinuationLabel // represents the label for the code where there is effectively nothing to do to dispose the iterator for the current state currentDisposeContinuationLabel // represents the label for the code we have to run to dispose the iterator given the current state - expr = + expr = - match expr with - | SeqYield(e,m) -> + match expr with + | SeqYield(e, m) -> // printfn "found Seq.singleton" - //this.pc <- NEXT - //curr <- e - //return true + //this.pc <- NEXT + //curr <- e + //return true //NEXT: let label = IL.generateCodeLabel() - Some { phase2 = (fun (pcv,currv,_nextv,pcMap) -> - let generate = - mkCompGenSequential m + Some { phase2 = (fun (pcv, currv, _nextv, pcMap) -> + let generate = + mkCompGenSequential m (mkValSet m pcv (mkInt32 g m pcMap.[label])) - (mkSequential SequencePointsAtSeq m + (mkSequential SequencePointsAtSeq m (mkValSet m currv e) - (mkCompGenSequential m - (Expr.Op(TOp.Return,[],[mkOne g m],m)) - (Expr.Op(TOp.Label label,[],[],m)))) - let dispose = - mkCompGenSequential m - (Expr.Op(TOp.Label label,[],[],m)) - (Expr.Op(TOp.Goto currentDisposeContinuationLabel,[],[],m)) - let checkDispose = - mkCompGenSequential m - (Expr.Op(TOp.Label label,[],[],m)) - (Expr.Op(TOp.Return,[],[mkBool g m (not (noDisposeContinuationLabel = currentDisposeContinuationLabel))],m)) - generate,dispose,checkDispose) + (mkCompGenSequential m + (Expr.Op(TOp.Return, [], [mkOne g m], m)) + (Expr.Op(TOp.Label label, [], [], m)))) + let dispose = + mkCompGenSequential m + (Expr.Op(TOp.Label label, [], [], m)) + (Expr.Op(TOp.Goto currentDisposeContinuationLabel, [], [], m)) + let checkDispose = + mkCompGenSequential m + (Expr.Op(TOp.Label label, [], [], m)) + (Expr.Op(TOp.Return, [], [mkBool g m (not (noDisposeContinuationLabel = currentDisposeContinuationLabel))], m)) + generate, dispose, checkDispose) labels=[label] stateVars=[] significantClose = false capturedVars = emptyFreeVars } - | SeqDelay(delayedExpr,_elemTy) -> + | SeqDelay(delayedExpr, _elemTy) -> // printfn "found Seq.delay" // note, using 'isWholeExpr' here prevents 'seq { yield! e }' and 'seq { 0 .. 1000 }' from being compiled - Lower isWholeExpr isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel delayedExpr + Lower isWholeExpr isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel delayedExpr - | SeqAppend(e1,e2,m) -> + | SeqAppend(e1, e2, m) -> // printfn "found Seq.append" let res1 = Lower false false noDisposeContinuationLabel currentDisposeContinuationLabel e1 let res2 = Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel e2 - match res1, res2 with - | Some res1, Some res2 -> + match res1, res2 with + | Some res1, Some res2 -> - let capturedVars = - if res1.labels.IsEmpty then - res2.capturedVars - else + let capturedVars = + if res1.labels.IsEmpty then + res2.capturedVars + else // All of 'e2' is needed after resuming at any of the labels unionFreeVars res1.capturedVars (freeInExpr CollectLocals e2) - Some { phase2 = (fun ctxt -> - let generate1,dispose1,checkDispose1 = res1.phase2 ctxt - let generate2,dispose2,checkDispose2 = res2.phase2 ctxt + Some { phase2 = (fun ctxt -> + let generate1, dispose1, checkDispose1 = res1.phase2 ctxt + let generate2, dispose2, checkDispose2 = res2.phase2 ctxt let generate = mkCompGenSequential m generate1 generate2 // Order shouldn't matter here, since disposals actions are linked together by goto's (each ends in a goto). // However leaving as is for now. - let dispose = mkCompGenSequential m dispose2 dispose1 + let dispose = mkCompGenSequential m dispose2 dispose1 let checkDispose = mkCompGenSequential m checkDispose2 checkDispose1 - generate,dispose,checkDispose) + generate, dispose, checkDispose) labels= res1.labels @ res2.labels - stateVars = res1.stateVars @ res2.stateVars + stateVars = res1.stateVars @ res2.stateVars significantClose = res1.significantClose || res2.significantClose capturedVars = capturedVars } - | _ -> + | _ -> None - | SeqWhile(guardExpr,bodyExpr,m) -> + | SeqWhile(guardExpr, bodyExpr, m) -> // printfn "found Seq.while" let resBody = Lower false false noDisposeContinuationLabel currentDisposeContinuationLabel bodyExpr - match resBody with - | Some res2 -> - let capturedVars = - if res2.labels.IsEmpty then + match resBody with + | Some res2 -> + let capturedVars = + if res2.labels.IsEmpty then res2.capturedVars // the whole loopis synchronous, no labels - else + else freeInExpr CollectLocals expr // everything is needed on subsequent iterations - - Some { phase2 = (fun ctxt -> - let generate2,dispose2,checkDispose2 = res2.phase2 ctxt - let generate = mkWhile g (SequencePointAtWhileLoop guardExpr.Range,NoSpecialWhileLoopMarker,guardExpr,generate2,m) + + Some { phase2 = (fun ctxt -> + let generate2, dispose2, checkDispose2 = res2.phase2 ctxt + let generate = mkWhile g (SequencePointAtWhileLoop guardExpr.Range, NoSpecialWhileLoopMarker, guardExpr, generate2, m) let dispose = dispose2 let checkDispose = checkDispose2 - generate,dispose,checkDispose) + generate, dispose, checkDispose) labels = res2.labels - stateVars = res2.stateVars + stateVars = res2.stateVars significantClose = res2.significantClose capturedVars = capturedVars } - | _ -> + | _ -> None - | SeqUsing(resource,v,body,elemTy,m) -> + | SeqUsing(resource, v, body, elemTy, m) -> // printfn "found Seq.using" - let reduction = - mkLet (SequencePointAtBinding body.Range) m v resource - (mkCallSeqFinally g m elemTy body - (mkUnitDelayLambda g m + let reduction = + mkLet (SequencePointAtBinding body.Range) m v resource + (mkCallSeqFinally g m elemTy body + (mkUnitDelayLambda g m (mkCallDispose g m v.Type (exprForVal m v)))) Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel reduction - | SeqFor(inp,v,body,genElemTy,m) -> + | SeqFor(inp, v, body, genElemTy, m) -> // printfn "found Seq.for" let inpElemTy = v.Type let inpEnumTy = mkIEnumeratorTy g inpElemTy let enumv, enume = mkCompGenLocal m "enum" inpEnumTy // [[ use enum = inp.GetEnumerator() // while enum.MoveNext() do - // let v = enum.Current - // body ]] - let reduction = - mkCallSeqUsing g m inpEnumTy genElemTy (callNonOverloadedMethod g amap m "GetEnumerator" (mkSeqTy g inpElemTy) [inp]) - (mkLambdaNoType g m enumv + // let v = enum.Current + // body ]] + let reduction = + mkCallSeqUsing g m inpEnumTy genElemTy (callNonOverloadedMethod g amap m "GetEnumerator" (mkSeqTy g inpElemTy) [inp]) + (mkLambdaNoType g m enumv (mkCallSeqGenerated g m genElemTy (mkUnitDelayLambda g m (callNonOverloadedMethod g amap m "MoveNext" inpEnumTy [enume])) (mkInvisibleLet m v (callNonOverloadedMethod g amap m "get_Current" inpEnumTy [enume]) (mkCoerceIfNeeded g (mkSeqTy g genElemTy) (tyOfExpr g body) body)))) Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel reduction - | SeqTryFinally(e1,compensation,m) -> + | SeqTryFinally(e1, compensation, m) -> // printfn "found Seq.try/finally" let innerDisposeContinuationLabel = IL.generateCodeLabel() let resBody = Lower false false noDisposeContinuationLabel innerDisposeContinuationLabel e1 - match resBody with - | Some res1 -> - let capturedVars = unionFreeVars res1.capturedVars (freeInExpr CollectLocals compensation) - Some { phase2 = (fun ((pcv,_currv,_,pcMap) as ctxt) -> - let generate1,dispose1,checkDispose1 = res1.phase2 ctxt - let generate = + match resBody with + | Some res1 -> + let capturedVars = unionFreeVars res1.capturedVars (freeInExpr CollectLocals compensation) + Some { phase2 = (fun ((pcv, _currv, _, pcMap) as ctxt) -> + let generate1, dispose1, checkDispose1 = res1.phase2 ctxt + let generate = // copy the compensation expression - one copy for the success continuation and one for the exception let compensation = copyExpr g CloneAllAndMarkExprValsAsCompilerGenerated compensation - mkCompGenSequential m - // set the PC to the inner finally, so that if an exception happens we run the right finally - (mkCompGenSequential m + mkCompGenSequential m + // set the PC to the inner finally, so that if an exception happens we run the right finally + (mkCompGenSequential m (mkValSet m pcv (mkInt32 g m pcMap.[innerDisposeContinuationLabel])) generate1 ) // set the PC past the try/finally before trying to run it, to make sure we only run it once - (mkCompGenSequential m - (Expr.Op(TOp.Label innerDisposeContinuationLabel,[],[],m)) - (mkCompGenSequential m + (mkCompGenSequential m + (Expr.Op(TOp.Label innerDisposeContinuationLabel, [], [], m)) + (mkCompGenSequential m (mkValSet m pcv (mkInt32 g m pcMap.[currentDisposeContinuationLabel])) compensation)) - let dispose = + let dispose = // generate inner try/finallys, then outer try/finallys - mkCompGenSequential m - dispose1 + mkCompGenSequential m + dispose1 // set the PC past the try/finally before trying to run it, to make sure we only run it once - (mkCompGenSequential m - (Expr.Op(TOp.Label innerDisposeContinuationLabel,[],[],m)) - (mkCompGenSequential m + (mkCompGenSequential m + (Expr.Op(TOp.Label innerDisposeContinuationLabel, [], [], m)) + (mkCompGenSequential m (mkValSet m pcv (mkInt32 g m pcMap.[currentDisposeContinuationLabel])) - (mkCompGenSequential m + (mkCompGenSequential m compensation - (Expr.Op(TOp.Goto currentDisposeContinuationLabel,[],[],m))))) - let checkDispose = - mkCompGenSequential m - checkDispose1 - (mkCompGenSequential m - (Expr.Op(TOp.Label innerDisposeContinuationLabel,[],[],m)) - (Expr.Op(TOp.Return,[],[mkTrue g m (* yes, we must dispose!!! *) ],m))) - - generate,dispose,checkDispose) + (Expr.Op(TOp.Goto currentDisposeContinuationLabel, [], [], m))))) + let checkDispose = + mkCompGenSequential m + checkDispose1 + (mkCompGenSequential m + (Expr.Op(TOp.Label innerDisposeContinuationLabel, [], [], m)) + (Expr.Op(TOp.Return, [], [mkTrue g m (* yes, we must dispose!!! *) ], m))) + + generate, dispose, checkDispose) labels = innerDisposeContinuationLabel :: res1.labels - stateVars = res1.stateVars - significantClose = true + stateVars = res1.stateVars + significantClose = true capturedVars = capturedVars } - | _ -> + | _ -> None - | SeqEmpty m -> + | SeqEmpty m -> // printfn "found Seq.empty" - Some { phase2 = (fun _ -> + Some { phase2 = (fun _ -> let generate = mkUnit g m - let dispose = Expr.Op(TOp.Goto currentDisposeContinuationLabel,[],[],m) - let checkDispose = Expr.Op(TOp.Goto currentDisposeContinuationLabel,[],[],m) - generate,dispose,checkDispose) + let dispose = Expr.Op(TOp.Goto currentDisposeContinuationLabel, [], [], m) + let checkDispose = Expr.Op(TOp.Goto currentDisposeContinuationLabel, [], [], m) + generate, dispose, checkDispose) labels = [] - stateVars = [] + stateVars = [] significantClose = false capturedVars = emptyFreeVars } - | Expr.Sequential(x1,x2,NormalSeq,ty,m) -> - match Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel x2 with - | Some res2-> + | Expr.Sequential(x1, x2, NormalSeq, ty, m) -> + match Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel x2 with + | Some res2-> // printfn "found sequential execution" Some { res2 with - phase2 = (fun ctxt -> - let generate2,dispose2,checkDispose2 = res2.phase2 ctxt - let generate = Expr.Sequential(x1,generate2,NormalSeq,ty,m) + phase2 = (fun ctxt -> + let generate2, dispose2, checkDispose2 = res2.phase2 ctxt + let generate = Expr.Sequential(x1, generate2, NormalSeq, ty, m) let dispose = dispose2 let checkDispose = checkDispose2 - generate,dispose,checkDispose) } + generate, dispose, checkDispose) } | None -> None - | Expr.Let(bind,bodyExpr,m,_) + | Expr.Let(bind, bodyExpr, m, _) // Restriction: compilation of sequence expressions containing non-toplevel constrained generic functions is not supported - when bind.Var.IsCompiledAsTopLevel || not (IsGenericValWithGenericContraints g bind.Var) -> + when bind.Var.IsCompiledAsTopLevel || not (IsGenericValWithGenericContraints g bind.Var) -> let resBody = Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel bodyExpr - match resBody with + match resBody with | Some res2 -> - if bind.Var.IsCompiledAsTopLevel then + if bind.Var.IsCompiledAsTopLevel then Some (RepresentBindingsAsLifted (mkLetBind m bind) res2) elif not (res2.capturedVars.FreeLocals.Contains(bind.Var)) then // printfn "found state variable %s" bind.Var.DisplayName @@ -437,69 +437,69 @@ let LowerSeqExpr g amap overallExpr = else // printfn "found state variable %s" bind.Var.DisplayName Some (RepresentBindingAsStateMachineLocal bind res2 m) - | None -> + | None -> None (* - | Expr.LetRec(binds,e2,m,_) + | Expr.LetRec(binds, e2, m, _) when // Restriction: only limited forms of "let rec" in sequence expressions can be handled by assignment to state local values - (let recvars = valsOfBinds binds |> List.map (fun v -> (v,0)) |> ValMap.OfList - binds |> List.forall (fun bind -> + (let recvars = valsOfBinds binds |> List.map (fun v -> (v, 0)) |> ValMap.OfList + binds |> List.forall (fun bind -> // Rule 1 - IsCompiledAsTopLevel require no state local value - bind.Var.IsCompiledAsTopLevel || + bind.Var.IsCompiledAsTopLevel || // Rule 2 - funky constrained local funcs not allowed not (IsGenericValWithGenericContraints g bind.Var)) && - binds |> List.count (fun bind -> + binds |> List.count (fun bind -> // Rule 3 - Recursive non-lambda and repack values are allowed - match stripExpr bind.Expr with - | Expr.Lambda _ + match stripExpr bind.Expr with + | Expr.Lambda _ | Expr.TyLambda _ -> false // "let v = otherv" bindings get produced for environment packing by InnerLambdasToTopLevelFuncs.fs, we can accept and compiler these ok - | Expr.Val(v,_,_) when not (recvars.ContainsVal v.Deref) -> false - | _ -> true) <= 1) -> + | Expr.Val(v, _, _) when not (recvars.ContainsVal v.Deref) -> false + | _ -> true) <= 1) -> - match Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel e2 with + match Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel e2 with | Some res2 -> - let topLevelBinds, nonTopLevelBinds = binds |> List.partition (fun bind -> bind.Var.IsCompiledAsTopLevel) + let topLevelBinds, nonTopLevelBinds = binds |> List.partition (fun bind -> bind.Var.IsCompiledAsTopLevel) // Represent the closure-capturing values as state machine locals. They may still be recursively-referential - let res3 = (res2,nonTopLevelBinds) ||> List.fold (fun acc bind -> RepresentBindingAsStateMachineLocal bind acc m) + let res3 = (res2, nonTopLevelBinds) ||> List.fold (fun acc bind -> RepresentBindingAsStateMachineLocal bind acc m) // Represent the non-closure-capturing values as ordinary bindings on the expression. let res4 = if topLevelBinds.IsEmpty then res3 else RepresentBindingsAsLifted (mkLetRecBinds m topLevelBinds) res3 Some res4 - | None -> + | None -> None *) - | Expr.Match (spBind,exprm,pt,targets,m,ty) when targets |> Array.forall (fun (TTarget(vs,_e,_spTarget)) -> isNil vs) -> + | Expr.Match (spBind, exprm, pt, targets, m, ty) when targets |> Array.forall (fun (TTarget(vs, _e, _spTarget)) -> isNil vs) -> // lower all the targets. abandon if any fail to lower - let tglArray = targets |> Array.map (fun (TTarget(_vs,targetExpr,_spTarget)) -> Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel targetExpr) - // LIMITATION: non-trivial pattern matches involving or-patterns or active patterns where bindings can't be - // transferred to the r.h.s. are not yet compiled. - if tglArray |> Array.forall Option.isSome then + let tglArray = targets |> Array.map (fun (TTarget(_vs, targetExpr, _spTarget)) -> Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel targetExpr) + // LIMITATION: non-trivial pattern matches involving or-patterns or active patterns where bindings can't be + // transferred to the r.h.s. are not yet compiled. + if tglArray |> Array.forall Option.isSome then let tglArray = Array.map Option.get tglArray let tgl = Array.toList tglArray let labs = tgl |> List.collect (fun res -> res.labels) - let (capturedVars, _) = - ((emptyFreeVars, false), Array.zip targets tglArray) - ||> Array.fold (fun (fvs, seenLabel) ((TTarget(_vs,e,_spTarget)), res) -> - if seenLabel then unionFreeVars fvs (freeInExpr CollectLocals e), true + let (capturedVars, _) = + ((emptyFreeVars, false), Array.zip targets tglArray) + ||> Array.fold (fun (fvs, seenLabel) ((TTarget(_vs, e, _spTarget)), res) -> + if seenLabel then unionFreeVars fvs (freeInExpr CollectLocals e), true else res.capturedVars, not res.labels.IsEmpty) let stateVars = tgl |> List.collect (fun res -> res.stateVars) let significantClose = tgl |> List.exists (fun res -> res.significantClose) - Some { phase2 = (fun ctxt -> - let gtgs,disposals,checkDisposes = - (Array.toList targets,tgl) - ||> List.map2 (fun (TTarget(vs,_,spTarget)) res -> - let generate,dispose,checkDispose = res.phase2 ctxt - let gtg = TTarget(vs,generate,spTarget) - gtg,dispose,checkDispose) - |> List.unzip3 - let generate = primMkMatch (spBind,exprm,pt,Array.ofList gtgs,m,ty) + Some { phase2 = (fun ctxt -> + let gtgs, disposals, checkDisposes = + (Array.toList targets, tgl) + ||> List.map2 (fun (TTarget(vs, _, spTarget)) res -> + let generate, dispose, checkDispose = res.phase2 ctxt + let gtg = TTarget(vs, generate, spTarget) + gtg, dispose, checkDispose) + |> List.unzip3 + let generate = primMkMatch (spBind, exprm, pt, Array.ofList gtgs, m, ty) let dispose = if isNil disposals then mkUnit g m else List.reduce (mkCompGenSequential m) disposals let checkDispose = if isNil checkDisposes then mkFalse g m else List.reduce (mkCompGenSequential m) checkDisposes - generate,dispose,checkDispose) + generate, dispose, checkDispose) labels=labs - stateVars = stateVars + stateVars = stateVars significantClose = significantClose capturedVars = capturedVars } else @@ -507,126 +507,126 @@ let LowerSeqExpr g amap overallExpr = // yield! e ---> (for x in e -> x) // - // Design choice: we compile 'yield! e' as 'for x in e do yield x'. + // Design choice: we compile 'yield! e' as 'for x in e do yield x'. // - // Note, however, this leads to a loss of tailcalls: the case not + // Note, however, this leads to a loss of tailcalls: the case not // handled correctly yet is sequence expressions that use yield! in the last position - // This can give rise to infinite iterator chains when implemented by the naive expansion to + // This can give rise to infinite iterator chains when implemented by the naive expansion to // �for x in e yield e�. For example consider this: // - // let rec rwalk x = { yield x + // let rec rwalk x = { yield x // yield! rwalk (x + rand()) } // - // This is the moral equivalent of a tailcall optimization. These also don�t compile well + // This is the moral equivalent of a tailcall optimization. These also don�t compile well // in the C# compilation model - | arbitrarySeqExpr -> + | arbitrarySeqExpr -> let m = arbitrarySeqExpr.Range - if isWholeExpr then + if isWholeExpr then // printfn "FAILED - not worth compiling an unrecognized immediate yield! %s " (stringOfRange m) None else let tyConfirmsToSeq g ty = isAppTy g ty && tyconRefEq g (tcrefOfAppTy g ty) g.tcref_System_Collections_Generic_IEnumerable match SearchEntireHierarchyOfType (tyConfirmsToSeq g) g amap m (tyOfExpr g arbitrarySeqExpr) with - | None -> + | None -> // printfn "FAILED - yield! did not yield a sequence! %s" (stringOfRange m) None - | Some ty -> + | Some ty -> // printfn "found yield!" let inpElemTy = List.head (argsOfAppTy g ty) - if isTailCall then - //this.pc <- NEXT - //nextEnumerator <- e - //return 2 + if isTailCall then + //this.pc <- NEXT + //nextEnumerator <- e + //return 2 //NEXT: let label = IL.generateCodeLabel() - Some { phase2 = (fun (pcv,_currv,nextv,pcMap) -> - let generate = - mkCompGenSequential m + Some { phase2 = (fun (pcv, _currv, nextv, pcMap) -> + let generate = + mkCompGenSequential m (mkValSet m pcv (mkInt32 g m pcMap.[label])) - (mkSequential SequencePointsAtSeq m + (mkSequential SequencePointsAtSeq m (mkAddrSet m nextv arbitrarySeqExpr) - (mkCompGenSequential m - (Expr.Op(TOp.Return,[],[mkTwo g m],m)) - (Expr.Op(TOp.Label label,[],[],m)))) - let dispose = - mkCompGenSequential m - (Expr.Op(TOp.Label label,[],[],m)) - (Expr.Op(TOp.Goto currentDisposeContinuationLabel,[],[],m)) - let checkDispose = - mkCompGenSequential m - (Expr.Op(TOp.Label label,[],[],m)) - (Expr.Op(TOp.Return,[],[mkFalse g m],m)) - generate,dispose,checkDispose) + (mkCompGenSequential m + (Expr.Op(TOp.Return, [], [mkTwo g m], m)) + (Expr.Op(TOp.Label label, [], [], m)))) + let dispose = + mkCompGenSequential m + (Expr.Op(TOp.Label label, [], [], m)) + (Expr.Op(TOp.Goto currentDisposeContinuationLabel, [], [], m)) + let checkDispose = + mkCompGenSequential m + (Expr.Op(TOp.Label label, [], [], m)) + (Expr.Op(TOp.Return, [], [mkFalse g m], m)) + generate, dispose, checkDispose) labels=[label] - stateVars=[] - significantClose = false + stateVars=[] + significantClose = false capturedVars = emptyFreeVars } else - let v,ve = mkCompGenLocal m "v" inpElemTy + let v, ve = mkCompGenLocal m "v" inpElemTy Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel (mkCallSeqCollect g m inpElemTy inpElemTy (mkLambdaNoType g m v (mkCallSeqSingleton g m inpElemTy ve)) arbitrarySeqExpr) - - match overallExpr with - | Seq(e,ty) -> + + match overallExpr with + | Seq(e, ty) -> // printfn "found seq { ... } or Seq.delay (fun () -> ...) in FSharp.Core.dll" let m = e.Range let initLabel = IL.generateCodeLabel() let noDisposeContinuationLabel = IL.generateCodeLabel() - match Lower true true noDisposeContinuationLabel noDisposeContinuationLabel e with + match Lower true true noDisposeContinuationLabel noDisposeContinuationLabel e with | Some res -> let labs = res.labels - let stateVars = res.stateVars + let stateVars = res.stateVars // printfn "successfully lowered, found %d state variables and %d labels!" stateVars.Length labs.Length - let pcv,pce = mkMutableCompGenLocal m "pc" g.int32_ty - let currv,_curre = mkMutableCompGenLocal m "current" ty - let nextv,_nexte = mkMutableCompGenLocal m "next" (mkByrefTy g (mkSeqTy g ty)) + let pcv, pce = mkMutableCompGenLocal m "pc" g.int32_ty + let currv, _curre = mkMutableCompGenLocal m "current" ty + let nextv, _nexte = mkMutableCompGenLocal m "next" (mkByrefTy g (mkSeqTy g ty)) let nextvref = mkLocalValRef nextv let pcvref = mkLocalValRef pcv let currvref = mkLocalValRef currv let pcs = labs |> List.mapi (fun i _ -> i + 1) let pcDone = labs.Length + 1 let pcInit = 0 - let pc2lab = Map.ofList ((pcInit,initLabel) :: (pcDone,noDisposeContinuationLabel) :: List.zip pcs labs) - let lab2pc = Map.ofList ((initLabel,pcInit) :: (noDisposeContinuationLabel,pcDone) :: List.zip labs pcs) - let stateMachineExpr,disposalExpr, checkDisposeExpr = res.phase2 (pcvref,currvref,nextvref,lab2pc) + let pc2lab = Map.ofList ((pcInit, initLabel) :: (pcDone, noDisposeContinuationLabel) :: List.zip pcs labs) + let lab2pc = Map.ofList ((initLabel, pcInit) :: (noDisposeContinuationLabel, pcDone) :: List.zip labs pcs) + let stateMachineExpr, disposalExpr, checkDisposeExpr = res.phase2 (pcvref, currvref, nextvref, lab2pc) // Add on the final 'return false' to indicate the iteration is complete - let stateMachineExpr = - mkCompGenSequential m - stateMachineExpr - (mkCompGenSequential m + let stateMachineExpr = + mkCompGenSequential m + stateMachineExpr + (mkCompGenSequential m // set the pc to "finished" (mkValSet m pcvref (mkInt32 g m pcDone)) - (mkCompGenSequential m - (Expr.Op(TOp.Label noDisposeContinuationLabel,[],[],m)) - (mkCompGenSequential m + (mkCompGenSequential m + (Expr.Op(TOp.Label noDisposeContinuationLabel, [], [], m)) + (mkCompGenSequential m // zero out the current value to free up its memory - (mkValSet m currvref (mkDefault (m,currvref.Type))) - (Expr.Op(TOp.Return,[],[mkZero g m],m))))) - let checkDisposeExpr = - mkCompGenSequential m - checkDisposeExpr - (mkCompGenSequential m - (Expr.Op(TOp.Label noDisposeContinuationLabel,[],[],m)) - (Expr.Op(TOp.Return,[],[mkFalse g m],m))) - - let addJumpTable isDisposal expr = - let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding,m ) - let mkGotoLabelTarget lab = mbuilder.AddResultTarget(Expr.Op(TOp.Goto lab,[],[],m),SuppressSequencePointAtTarget) - let dtree = + (mkValSet m currvref (mkDefault (m, currvref.Type))) + (Expr.Op(TOp.Return, [], [mkZero g m], m))))) + let checkDisposeExpr = + mkCompGenSequential m + checkDisposeExpr + (mkCompGenSequential m + (Expr.Op(TOp.Label noDisposeContinuationLabel, [], [], m)) + (Expr.Op(TOp.Return, [], [mkFalse g m], m))) + + let addJumpTable isDisposal expr = + let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding, m ) + let mkGotoLabelTarget lab = mbuilder.AddResultTarget(Expr.Op(TOp.Goto lab, [], [], m), SuppressSequencePointAtTarget) + let dtree = TDSwitch(pce, - [ + [ // no disposal action for the initial state (pc = 0) - if isDisposal then - yield mkCase(DecisionTreeTest.Const(Const.Int32 pcInit),mkGotoLabelTarget noDisposeContinuationLabel) - for pc in pcs do - yield mkCase(DecisionTreeTest.Const(Const.Int32 pc),mkGotoLabelTarget pc2lab.[pc]) - yield mkCase(DecisionTreeTest.Const(Const.Int32 pcDone),mkGotoLabelTarget noDisposeContinuationLabel) ], + if isDisposal then + yield mkCase(DecisionTreeTest.Const(Const.Int32 pcInit), mkGotoLabelTarget noDisposeContinuationLabel) + for pc in pcs do + yield mkCase(DecisionTreeTest.Const(Const.Int32 pc), mkGotoLabelTarget pc2lab.[pc]) + yield mkCase(DecisionTreeTest.Const(Const.Int32 pcDone), mkGotoLabelTarget noDisposeContinuationLabel) ], Some(mkGotoLabelTarget pc2lab.[pcInit]), m) - - let table = mbuilder.Close(dtree,m,g.int_ty) - mkCompGenSequential m table (mkCompGenSequential m (Expr.Op(TOp.Label initLabel,[],[],m)) expr) + + let table = mbuilder.Close(dtree, m, g.int_ty) + mkCompGenSequential m table (mkCompGenSequential m (Expr.Op(TOp.Label initLabel, [], [], m)) expr) let handleExeceptionsInDispose disposalExpr = // let mutable exn : exn = null @@ -635,79 +635,79 @@ let LowerSeqExpr g amap overallExpr = // ``disposalExpr'' // with e -> exn <- e // if exn <> null then raise exn - let exnV,exnE = mkMutableCompGenLocal m "exn" g.exn_ty + let exnV, exnE = mkMutableCompGenLocal m "exn" g.exn_ty let exnVref = mkLocalValRef exnV let startLabel = IL.generateCodeLabel() let doneLabel = IL.generateCodeLabel () // try ``disposalExpr'' with e -> exn <- e - let eV,eE = mkLocal m "e" g.exn_ty - let efV,_ = mkLocal m "ef" g.exn_ty - let assignToExn = Expr.Op(TOp.LValueOp(LValueOperation.LSet,exnVref),[],[eE],m) + let eV, eE = mkLocal m "e" g.exn_ty + let efV, _ = mkLocal m "ef" g.exn_ty + let assignToExn = Expr.Op(TOp.LValueOp(LValueOperation.LSet, exnVref), [], [eE], m) let exceptionCatcher = mkTryWith g - (disposalExpr, - efV, Expr.Const((Const.Bool true), m, g.bool_ty), - eV, assignToExn, + (disposalExpr, + efV, Expr.Const((Const.Bool true), m, g.bool_ty), + eV, assignToExn, m, g.unit_ty, NoSequencePointAtTry, NoSequencePointAtWith) - + // while(this.pc != END_STATE) let whileLoop = - let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding,m) + let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding, m) let addResultTarget e = mbuilder.AddResultTarget(e, SuppressSequencePointAtTarget) let dtree = TDSwitch(pce, [ mkCase((DecisionTreeTest.Const(Const.Int32 pcDone)), addResultTarget (Expr.Op(TOp.Goto doneLabel, [], [], m)) ) ], Some (addResultTarget (mkUnit g m)), m) - let pcIsEndStateComparison = mbuilder.Close(dtree,m,g.unit_ty) + let pcIsEndStateComparison = mbuilder.Close(dtree, m, g.unit_ty) mkCompGenSequential m - (Expr.Op((TOp.Label startLabel),[],[],m)) + (Expr.Op((TOp.Label startLabel), [], [], m)) (mkCompGenSequential m pcIsEndStateComparison (mkCompGenSequential m exceptionCatcher (mkCompGenSequential m - (Expr.Op((TOp.Goto startLabel),[],[],m)) - (Expr.Op((TOp.Label doneLabel),[],[],m)) + (Expr.Op((TOp.Goto startLabel), [], [], m)) + (Expr.Op((TOp.Label doneLabel), [], [], m)) ) ) - ) + ) // if exn != null then raise exn let doRaise = mkNonNullCond g m g.unit_ty exnE (mkThrow m g.unit_ty exnE) (Expr.Const(Const.Unit, m, g.unit_ty)) - - mkLet - NoSequencePointAtLetBinding m exnV (Expr.Const(Const.Zero, m,g.exn_ty)) - (mkCompGenSequential m whileLoop doRaise) + + mkLet + NoSequencePointAtLetBinding m exnV (Expr.Const(Const.Zero, m, g.exn_ty)) + (mkCompGenSequential m whileLoop doRaise) let stateMachineExprWithJumpTable = addJumpTable false stateMachineExpr let disposalExpr = if res.significantClose then - let disposalExpr = - mkCompGenSequential m - disposalExpr - (mkCompGenSequential m - (Expr.Op(TOp.Label noDisposeContinuationLabel,[],[],m)) - (mkCompGenSequential m + let disposalExpr = + mkCompGenSequential m + disposalExpr + (mkCompGenSequential m + (Expr.Op(TOp.Label noDisposeContinuationLabel, [], [], m)) + (mkCompGenSequential m // set the pc to "finished" (mkValSet m pcvref (mkInt32 g m pcDone)) // zero out the current value to free up its memory - (mkValSet m currvref (mkDefault (m,currvref.Type))))) + (mkValSet m currvref (mkDefault (m, currvref.Type))))) disposalExpr - |> addJumpTable true + |> addJumpTable true |> handleExeceptionsInDispose else (mkValSet m pcvref (mkInt32 g m pcDone)) - - let checkDisposeExprWithJumpTable = addJumpTable true checkDisposeExpr + + let checkDisposeExprWithJumpTable = addJumpTable true checkDisposeExpr // all done, no return the results - Some (nextvref, pcvref,currvref,stateVars,stateMachineExprWithJumpTable,disposalExpr,checkDisposeExprWithJumpTable,ty,m) + Some (nextvref, pcvref, currvref, stateVars, stateMachineExprWithJumpTable, disposalExpr, checkDisposeExprWithJumpTable, ty, m) - | None -> + | None -> // printfn "FAILED: no compilation found! %s" (stringOfRange m) None | _ -> None - - + + diff --git a/src/fcs-fable/src/fsharp/MSBuildReferenceResolver.fs b/src/fcs-fable/src/fsharp/MSBuildReferenceResolver.fs index 2e25ebf95a..1a49c6a0fc 100644 --- a/src/fcs-fable/src/fsharp/MSBuildReferenceResolver.fs +++ b/src/fcs-fable/src/fsharp/MSBuildReferenceResolver.fs @@ -6,9 +6,6 @@ module internal FSharp.Compiler.MSBuildReferenceResolver open System.IO open System.Reflection -#if FX_RESHAPED_REFLECTION - open Microsoft.FSharp.Core.ReflectionAdapters -#endif #if FX_RESHAPED_MSBUILD open FSharp.Compiler.MsBuildAdapters open FSharp.Compiler.ToolLocationHelper @@ -20,6 +17,11 @@ module internal FSharp.Compiler.MSBuildReferenceResolver open Microsoft.Build.Utilities open Microsoft.Build.Framework + // Reflection wrapper for properties + type System.Object with + member this.GetPropertyValue(propName) = + this.GetType().GetProperty(propName, BindingFlags.Public).GetValue(this, null) + /// Get the Reference Assemblies directory for the .NET Framework on Window. let DotNetFrameworkReferenceAssembliesRootDirectory = // ProgramFilesX86 is correct for both x86 and x64 architectures @@ -97,7 +99,7 @@ module internal FSharp.Compiler.MSBuildReferenceResolver | _ -> [] let GetPathToDotNetFrameworkReferenceAssemblies(version) = -#if NETSTANDARD1_6 || NETSTANDARD2_0 +#if NETSTANDARD ignore version let r : string list = [] r @@ -129,7 +131,7 @@ module internal FSharp.Compiler.MSBuildReferenceResolver else Net45 // version is 4.5 assumed since this code is running. with _ -> Net45 -#if !FX_RESHAPED_REFLECTION +#if !FX_RESHAPED_MSBUILD // 1. First look to see if we can find the highest installed set of dotnet reference assemblies, if yes then select that framework // 2. Otherwise ask msbuild for the highestinstalled framework let checkFrameworkForReferenceAssemblies (dotNetVersion:string) = @@ -336,9 +338,6 @@ module internal FSharp.Compiler.MSBuildReferenceResolver FindSerializationAssemblies=false, Assemblies=assemblies, SearchPaths=searchPaths, AllowedAssemblyExtensions= [| ".dll" ; ".exe" |]) -#if FX_RESHAPED_REFLECTION - ignore targetProcessorArchitecture // Not implemented in reshapedmsbuild.fs -#else rar.TargetProcessorArchitecture <- targetProcessorArchitecture let targetedRuntimeVersionValue = typeof.Assembly.ImageRuntimeVersion #if ENABLE_MONO_SUPPORT @@ -351,7 +350,6 @@ module internal FSharp.Compiler.MSBuildReferenceResolver rar.TargetedRuntimeVersion <- targetedRuntimeVersionValue rar.CopyLocalDependenciesWhenParentReferenceInGac <- true #endif -#endif let succeeded = rar.Execute() diff --git a/src/fcs-fable/src/fsharp/MethodCalls.fs b/src/fcs-fable/src/fsharp/MethodCalls.fs index e156cc6e1e..cbd17ea1d2 100644 --- a/src/fcs-fable/src/fsharp/MethodCalls.fs +++ b/src/fcs-fable/src/fsharp/MethodCalls.fs @@ -84,7 +84,7 @@ type AssignedCalledArg<'T> = CallerArg: CallerArg<'T> } member x.Position = x.CalledArg.Position -/// Represents the possibilities for a named-setter argument (a property, field , or a record field setter) +/// Represents the possibilities for a named-setter argument (a property, field, or a record field setter) type AssignedItemSetterTarget = | AssignedPropSetter of PropInfo * MethInfo * TypeInst (* the MethInfo is a non-indexer setter property *) | AssignedILFieldSetter of ILFieldInfo @@ -122,7 +122,7 @@ type CallerNamedArg<'T> = // The function AdjustCalledArgType detects this and refuses to apply the default byref-to-ref transformation. // // The function AdjustCalledArgType also adjusts for optional arguments. -let AdjustCalledArgType (infoReader:InfoReader) isConstraint (calledArg: CalledArg) (callerArg: CallerArg<_>) = +let AdjustCalledArgType (infoReader: InfoReader) isConstraint (calledArg: CalledArg) (callerArg: CallerArg<_>) = let g = infoReader.g // #424218 - when overload resolution is part of constraint solving - do not perform type-directed conversions let calledArgTy = calledArg.CalledArgumentType @@ -207,7 +207,7 @@ type CalledMethArgSet<'T> = member x.NumUnnamedCalledArgs = x.UnnamedCalledArgs.Length -let MakeCalledArgs amap m (minfo:MethInfo) minst = +let MakeCalledArgs amap m (minfo: MethInfo) minst = // Mark up the arguments with their position, so we can sort them back into order later let paramDatas = minfo.GetParamDatas(amap, m, minst) paramDatas |> List.mapiSquared (fun i j (ParamData(isParamArrayArg, isInArg, isOutArg, optArgInfo, callerInfoFlags, nmOpt, reflArgInfo, typeOfCalledArg)) -> @@ -226,19 +226,19 @@ let MakeCalledArgs amap m (minfo:MethInfo) minst = /// 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. type CalledMeth<'T> - (infoReader:InfoReader, + (infoReader: InfoReader, nameEnv: NameResolutionEnv option, isCheckingAttributeCall, freshenMethInfo, // a function to help generate fresh type variables the property setters methods in generic classes m, ad, // the access domain of the place where the call is taking place - minfo:MethInfo, // the method we're attempting to call + minfo: MethInfo, // the method we're attempting to call calledTyArgs, // the 'called type arguments', i.e. the fresh generic instantiation of the method we're attempting to call callerTyArgs: TType list, // the 'caller type arguments', i.e. user-given generic instantiation of the method we're attempting to call pinfoOpt: PropInfo option, // the property related to the method we're attempting to call, if any callerObjArgTys: TType list, // the types of the actual object argument, if any curriedCallerArgs: (CallerArg<'T> list * CallerNamedArg<'T> list) list, // the data about any arguments supplied by the caller - allowParamArgs:bool, // do we allow the use of a param args method in its "expanded" form? + allowParamArgs: bool, // do we allow the use of a param args method in its "expanded" form? allowOutAndOptArgs: bool, // do we allow the use of the transformation that converts out arguments as tuple returns? tyargsOpt : TType option) // method parameters = @@ -424,7 +424,7 @@ type CalledMeth<'T> /// unnamed called out args: return these as part of the return tuple member x.UnnamedCalledOutArgs = unnamedCalledOutArgs - static member GetMethod (x:CalledMeth<'T>) = x.Method + static member GetMethod (x: CalledMeth<'T>) = x.Method member x.NumArgSets = x.ArgSets.Length @@ -512,7 +512,7 @@ let InferLambdaArgsForLambdaPropagation origRhsExpr = | _ -> 0 loop origRhsExpr -let ExamineArgumentForLambdaPropagation (infoReader:InfoReader) (arg: AssignedCalledArg) = +let ExamineArgumentForLambdaPropagation (infoReader: InfoReader) (arg: AssignedCalledArg) = let g = infoReader.g // Find the explicit lambda arguments of the caller. Ignore parentheses. let argExpr = match arg.CallerArg.Expr with SynExpr.Paren(x, _, _, _) -> x | x -> x @@ -531,7 +531,7 @@ let ExamineArgumentForLambdaPropagation (infoReader:InfoReader) (arg: AssignedCa NoInfo // not a function type on the called side - no information else CalledArgMatchesType(adjustedCalledArgTy) // not a lambda on the caller side - push information from caller to called -let ExamineMethodForLambdaPropagation (x:CalledMeth) = +let ExamineMethodForLambdaPropagation (x: CalledMeth) = let unnamedInfo = x.AssignedUnnamedArgs |> List.mapSquared (ExamineArgumentForLambdaPropagation x.infoReader) let namedInfo = x.AssignedNamedArgs |> List.mapSquared (fun arg -> (arg.NamedArgIdOpt.Value, ExamineArgumentForLambdaPropagation x.infoReader arg)) if unnamedInfo |> List.existsSquared (function CallerLambdaHasArgTypes _ -> true | _ -> false) || @@ -553,7 +553,7 @@ let IsBaseCall objArgs = /// Compute whether we insert a 'coerce' on the 'this' pointer for an object model call /// For example, when calling an interface method on a struct, or a method on a constrained /// variable type. -let ComputeConstrainedCallInfo g amap m (objArgs, minfo:MethInfo) = +let ComputeConstrainedCallInfo g amap m (objArgs, minfo: MethInfo) = match objArgs with | [objArgExpr] when not minfo.IsExtensionMember -> let methObjTy = minfo.ApparentEnclosingType @@ -576,7 +576,7 @@ let ComputeConstrainedCallInfo g amap m (objArgs, minfo:MethInfo) = /// Adjust the 'this' pointer before making a call /// Take the address of a struct, and coerce to an interface/base/constraint type if necessary -let TakeObjAddrForMethodCall g amap (minfo:MethInfo) isMutable m objArgs f = +let TakeObjAddrForMethodCall g amap (minfo: MethInfo) isMutable m objArgs f = let ccallInfo = ComputeConstrainedCallInfo g amap m (objArgs, minfo) let wrap, objArgs = @@ -622,7 +622,7 @@ let TakeObjAddrForMethodCall g amap (minfo:MethInfo) isMutable m objArgs f = /// Build an expression node that is a call to a .NET method. -let BuildILMethInfoCall g amap m isProp (minfo:ILMethInfo) valUseFlags minst direct args = +let BuildILMethInfoCall g amap m isProp (minfo: ILMethInfo) valUseFlags minst direct args = let valu = isStructTy g minfo.ApparentEnclosingType let ctor = minfo.IsConstructor if minfo.IsClassConstructor then @@ -659,12 +659,14 @@ let BuildFSharpMethodApp g m (vref: ValRef) vexp vexprty (args: Exprs) = match arity, args with | (0|1), [] when typeEquiv g (domainOfFunTy g fty) g.unit_ty -> mkUnit g m, (args, rangeOfFunTy g fty) | 0, (arg::argst) -> - warning(InternalError(sprintf "Unexpected zero arity, args = %s" (Layout.showL (Layout.sepListL (Layout.rightL (Layout.TaggedTextOps.tagText ";")) (List.map exprL args))), m)); + let msg = Layout.showL (Layout.sepListL (Layout.rightL (Layout.TaggedTextOps.tagText ";")) (List.map exprL args)) + warning(InternalError(sprintf "Unexpected zero arity, args = %s" msg, m)) arg, (argst, rangeOfFunTy g fty) | 1, (arg :: argst) -> arg, (argst, rangeOfFunTy g fty) | 1, [] -> error(InternalError("expected additional arguments here", m)) | _ -> - if args.Length < arity then error(InternalError("internal error in getting arguments, n = "+string arity+", #args = "+string args.Length, m)); + if args.Length < arity then + error(InternalError("internal error in getting arguments, n = "+string arity+", #args = "+string args.Length, m)) let tupargs, argst = List.splitAt arity args let tuptys = tupargs |> List.map (tyOfExpr g) (mkRefTupled g m tupargs tuptys), @@ -674,7 +676,7 @@ let BuildFSharpMethodApp g m (vref: ValRef) vexp vexprty (args: Exprs) = retTy /// Build a call to an F# method. -let BuildFSharpMethodCall g m (ty, vref:ValRef) valUseFlags minst args = +let BuildFSharpMethodCall g m (ty, vref: ValRef) valUseFlags minst args = let vexp = Expr.Val (vref, valUseFlags, m) let vexpty = vref.Type let tpsorig, tau = vref.TypeScheme @@ -714,7 +716,7 @@ let MakeMethInfoCall amap m minfo minst args = #if !NO_EXTENSIONTYPING // This imports a provided method, and checks if it is a known compiler intrinsic like "1 + 2" -let TryImportProvidedMethodBaseAsLibraryIntrinsic (amap:Import.ImportMap, m:range, mbase: Tainted) = +let TryImportProvidedMethodBaseAsLibraryIntrinsic (amap: Import.ImportMap, m: range, mbase: Tainted) = let methodName = mbase.PUntaint((fun x -> x.Name), m) let declaringType = Import.ImportProvidedType amap m (mbase.PApply((fun x -> x.DeclaringType), m)) if isAppTy amap.g declaringType then @@ -827,7 +829,7 @@ let BuildMethodCall tcVal g amap isMutable m isProp minfo valUseFlags minst objA //------------------------------------------------------------------------- /// Implements the elaborated form of adhoc conversions from functions to delegates at member callsites -let BuildNewDelegateExpr (eventInfoOpt:EventInfo option, g, amap, delegateTy, invokeMethInfo:MethInfo, delArgTys, f, fty, m) = +let BuildNewDelegateExpr (eventInfoOpt: EventInfo option, g, amap, delegateTy, invokeMethInfo: MethInfo, delArgTys, f, fty, m) = let slotsig = invokeMethInfo.GetSlotSig(amap, m) let delArgVals, expr = let topValInfo = ValReprInfo([], List.replicate (max 1 (List.length delArgTys)) ValReprInfo.unnamedTopArg, ValReprInfo.unnamedRetVal) @@ -924,7 +926,7 @@ module ProvidedMethodCalls = /// back to System.Type. However, there is currently no way to get from an arbitrary F# TType (even the TType for /// System.Object) to a System.Type to give to the type provider. let eraseSystemType (amap, m, inputType) = - let rec loop (st:Tainted) = + let rec loop (st: Tainted) = if st.PUntaint((fun st -> st.IsGenericParameter), m) then st elif st.PUntaint((fun st -> st.IsArray), m) then let et = st.PApply((fun st -> st.GetElementType()), m) @@ -969,11 +971,11 @@ module ProvidedMethodCalls = st loop inputType - let convertProvidedExpressionToExprAndWitness tcVal (thisArg:Expr option, - allArgs:Exprs, - paramVars:Tainted[], + let convertProvidedExpressionToExprAndWitness tcVal (thisArg: Expr option, + allArgs: Exprs, + paramVars: Tainted[], g, amap, mut, isProp, isSuperInit, m, - expr:Tainted) = + expr: Tainted) = let varConv = // note: using paramVars.Length as assumed initial size, but this might not // be the optimal value; this wasn't checked before obsoleting Dictionary.ofList @@ -981,7 +983,7 @@ module ProvidedMethodCalls = for v, e in Seq.zip (paramVars |> Seq.map (fun x -> x.PUntaint(id, m))) (Option.toList thisArg @ allArgs) do dict.Add(v, (None, e)) dict - let rec exprToExprAndWitness top (ea:Tainted) = + let rec exprToExprAndWitness top (ea: Tainted) = let fail() = error(Error(FSComp.SR.etUnsupportedProvidedExpression(ea.PUntaint((fun etree -> etree.UnderlyingExpressionString), m)), m)) match ea with | Tainted.Null -> error(Error(FSComp.SR.etNullProvidedExpression(ea.TypeProviderDesignation), m)) @@ -1170,7 +1172,7 @@ module ProvidedMethodCalls = fail() - and ctorCallToExpr (ne:Tainted<_>) = + and ctorCallToExpr (ne: Tainted<_>) = let (ctor, args) = ne.PApply2(id, m) let targetMethInfo = ProvidedMeth(amap, ctor.PApply((fun ne -> upcast ne), m), None, m) let objArgs = [] @@ -1178,7 +1180,7 @@ module ProvidedMethodCalls = let callExpr = BuildMethodCall tcVal g amap Mutates.PossiblyMutates m false targetMethInfo isSuperInit [] objArgs arguments callExpr - and addVar (v:Tainted) = + and addVar (v: Tainted) = let nm = v.PUntaint ((fun v -> v.Name), m) let mut = v.PUntaint ((fun v -> v.IsMutable), m) let vRaw = v.PUntaint (id, m) @@ -1187,11 +1189,11 @@ module ProvidedMethodCalls = varConv.[vRaw] <- (Some vT, vTe) vT - and removeVar (v:Tainted) = + and removeVar (v: Tainted) = let vRaw = v.PUntaint (id, m) varConv.Remove vRaw |> ignore - and methodCallToExpr top _origExpr (mce:Tainted<_>) = + and methodCallToExpr top _origExpr (mce: Tainted<_>) = let (objOpt, meth, args) = mce.PApply3(id, m) let targetMethInfo = ProvidedMeth(amap, meth.PApply((fun mce -> upcast mce), m), None, m) let objArgs = @@ -1213,7 +1215,7 @@ module ProvidedMethodCalls = let callExpr = BuildMethodCall tcVal g amap mut m isProp targetMethInfo isSuperInit replacementGenericArguments objArgs arguments Some meth, callExpr - and varToExpr (pe:Tainted) = + and varToExpr (pe: Tainted) = // sub in the appropriate argument // REVIEW: "thisArg" pointer should be first, if present let vRaw = pe.PUntaint(id, m) @@ -1231,7 +1233,7 @@ module ProvidedMethodCalls = // fill in parameter holes in the expression - let TranslateInvokerExpressionForProvidedMethodCall tcVal (g, amap, mut, isProp, isSuperInit, mi:Tainted, objArgs, allArgs, m) = + let TranslateInvokerExpressionForProvidedMethodCall tcVal (g, amap, mut, isProp, isSuperInit, mi: Tainted, objArgs, allArgs, m) = let parameters = mi.PApplyArray((fun mi -> mi.GetParameters()), "GetParameters", m) let paramTys = @@ -1251,8 +1253,8 @@ module ProvidedMethodCalls = | [objArg] -> let erasedThisTy = eraseSystemType (amap, m, mi.PApply((fun mi -> mi.DeclaringType), m)) let thisVar = erasedThisTy.PApply((fun ty -> ProvidedVar.Fresh("this", ty)), m) - Some objArg , Array.append [| thisVar |] paramVars - | [] -> None , paramVars + Some objArg, Array.append [| thisVar |] paramVars + | [] -> None, paramVars | _ -> failwith "multiple objArgs?" let ea = mi.PApplyWithProvider((fun (methodInfo, provider) -> ExtensionTyping.GetInvokerExpression(provider, methodInfo, [| for p in paramVars -> p.PUntaintNoFailure id |])), m) @@ -1260,7 +1262,7 @@ module ProvidedMethodCalls = convertProvidedExpressionToExprAndWitness tcVal (thisArg, allArgs, paramVars, g, amap, mut, isProp, isSuperInit, m, ea) - let BuildInvokerExpressionForProvidedMethodCall tcVal (g, amap, mi:Tainted, objArgs, mut, isProp, isSuperInit, allArgs, m) = + let BuildInvokerExpressionForProvidedMethodCall tcVal (g, amap, mi: Tainted, objArgs, mut, isProp, isSuperInit, allArgs, m) = try let methInfoOpt, (expr, retTy) = TranslateInvokerExpressionForProvidedMethodCall tcVal (g, amap, mut, isProp, isSuperInit, mi, objArgs, allArgs, m) @@ -1276,17 +1278,17 @@ module ProvidedMethodCalls = -let RecdFieldInstanceChecks g amap ad m (rfinfo:RecdFieldInfo) = +let RecdFieldInstanceChecks g amap ad m (rfinfo: RecdFieldInfo) = if rfinfo.IsStatic then error (Error (FSComp.SR.tcStaticFieldUsedWhenInstanceFieldExpected(), m)) CheckRecdFieldInfoAttributes g rfinfo m |> CommitOperationResult CheckRecdFieldInfoAccessible amap m ad rfinfo -let ILFieldInstanceChecks g amap ad m (finfo :ILFieldInfo) = +let ILFieldInstanceChecks g amap ad m (finfo : ILFieldInfo) = if finfo.IsStatic then error (Error (FSComp.SR.tcStaticFieldUsedWhenInstanceFieldExpected(), m)) CheckILFieldInfoAccessible g amap m ad finfo CheckILFieldAttributes g finfo m -let MethInfoChecks g amap isInstance tyargsOpt objArgs ad m (minfo:MethInfo) = +let MethInfoChecks g amap isInstance tyargsOpt objArgs ad m (minfo: MethInfo) = if minfo.IsInstance <> isInstance then if isInstance then error (Error (FSComp.SR.csMethodIsNotAnInstanceMethod(minfo.LogicalName), m)) @@ -1322,6 +1324,6 @@ let MethInfoChecks g amap isInstance tyargsOpt objArgs ad m (minfo:MethInfo) = exception FieldNotMutable of DisplayEnv * Tast.RecdFieldRef * range -let CheckRecdFieldMutation m denv (rfinfo:RecdFieldInfo) = +let CheckRecdFieldMutation m denv (rfinfo: RecdFieldInfo) = if not rfinfo.RecdField.IsMutable then error (FieldNotMutable(denv, rfinfo.RecdFieldRef, m)) diff --git a/src/fcs-fable/src/fsharp/MethodOverrides.fs b/src/fcs-fable/src/fsharp/MethodOverrides.fs index 6866910286..eda26ec3bd 100644 --- a/src/fcs-fable/src/fsharp/MethodOverrides.fs +++ b/src/fcs-fable/src/fsharp/MethodOverrides.fs @@ -31,14 +31,14 @@ type OverrideCanImplement = /// The overall information about a method implementation in a class or object expression type OverrideInfo = | Override of OverrideCanImplement * TyconRef * Ident * (Typars * TyparInst) * TType list list * TType option * bool * bool - member x.CanImplement = let (Override(a,_,_,_,_,_,_,_)) = x in a - member x.BoundingTyconRef = let (Override(_,ty,_,_,_,_,_,_)) = x in ty - member x.LogicalName = let (Override(_,_,id,_,_,_,_,_)) = x in id.idText - member x.Range = let (Override(_,_,id,_,_,_,_,_)) = x in id.idRange - member x.IsFakeEventProperty = let (Override(_,_,_,_,_,_,b,_)) = x in b - member x.ArgTypes = let (Override(_,_,_,_,b,_,_,_)) = x in b - member x.ReturnType = let (Override(_,_,_,_,_,b,_,_)) = x in b - member x.IsCompilerGenerated = let (Override(_,_,_,_,_,_,_,b)) = x in b + member x.CanImplement = let (Override(a, _, _, _, _, _, _, _)) = x in a + member x.BoundingTyconRef = let (Override(_, ty, _, _, _, _, _, _)) = x in ty + member x.LogicalName = let (Override(_, _, id, _, _, _, _, _)) = x in id.idText + member x.Range = let (Override(_, _, id, _, _, _, _, _)) = x in id.idRange + member x.IsFakeEventProperty = let (Override(_, _, _, _, _, _, b, _)) = x in b + member x.ArgTypes = let (Override(_, _, _, _, b, _, _, _)) = x in b + member x.ReturnType = let (Override(_, _, _, _, _, b, _, _)) = x in b + member x.IsCompilerGenerated = let (Override(_, _, _, _, _, _, _, b)) = x in b // If the bool is true then the slot is optional, i.e. is an interface slot // which does not _have_ to be implemented, because an inherited implementation @@ -53,23 +53,23 @@ exception OverrideDoesntOverride of DisplayEnv * OverrideInfo * MethInfo option module DispatchSlotChecking = /// Print the signature of an override to a buffer as part of an error message - let PrintOverrideToBuffer denv os (Override(_,_,id,(mtps,memberToParentInst),argTys,retTy,_,_)) = + let PrintOverrideToBuffer denv os (Override(_, _, id, (mtps, memberToParentInst), argTys, retTy, _, _)) = let denv = { denv with showTyparBinding = true } let retTy = (retTy |> GetFSharpViewOfReturnType denv.g) let argInfos = match argTys with - | [] -> [[(denv.g.unit_ty,ValReprInfo.unnamedTopArg1)]] + | [] -> [[(denv.g.unit_ty, ValReprInfo.unnamedTopArg1)]] | _ -> argTys |> List.mapSquared (fun ty -> (ty, ValReprInfo.unnamedTopArg1)) - Layout.bufferL os (NicePrint.prettyLayoutOfMemberSig denv (memberToParentInst,id.idText,mtps, argInfos, retTy)) + Layout.bufferL os (NicePrint.prettyLayoutOfMemberSig denv (memberToParentInst, id.idText, mtps, argInfos, retTy)) /// Print the signature of a MethInfo to a buffer as part of an error message let PrintMethInfoSigToBuffer g amap m denv os minfo = let denv = { denv with showTyparBinding = true } - let (CompiledSig(argTys,retTy,fmtps,ttpinst)) = CompiledSigOfMeth g amap m minfo + let (CompiledSig(argTys, retTy, fmtps, ttpinst)) = CompiledSigOfMeth g amap m minfo let retTy = (retTy |> GetFSharpViewOfReturnType g) let argInfos = argTys |> List.mapSquared (fun ty -> (ty, ValReprInfo.unnamedTopArg1)) let nm = minfo.LogicalName - Layout.bufferL os (NicePrint.prettyLayoutOfMemberSig denv (ttpinst,nm,fmtps, argInfos, retTy)) + Layout.bufferL os (NicePrint.prettyLayoutOfMemberSig denv (ttpinst, nm, fmtps, argInfos, retTy)) /// Format the signature of an override as a string as part of an error message let FormatOverride denv d = bufs (fun buf -> PrintOverrideToBuffer denv buf d) @@ -78,28 +78,28 @@ module DispatchSlotChecking = let FormatMethInfoSig g amap m denv d = bufs (fun buf -> PrintMethInfoSigToBuffer g amap m denv buf d) /// Get the override info for an existing (inherited) method being used to implement a dispatch slot. - let GetInheritedMemberOverrideInfo g amap m parentType (minfo:MethInfo) = + let GetInheritedMemberOverrideInfo g amap m parentType (minfo: MethInfo) = let nm = minfo.LogicalName - let (CompiledSig (argTys,retTy,fmtps,ttpinst)) = CompiledSigOfMeth g amap m minfo + let (CompiledSig (argTys, retTy, fmtps, ttpinst)) = CompiledSigOfMeth g amap m minfo let isFakeEventProperty = minfo.IsFSharpEventPropertyMethod - Override(parentType, minfo.ApparentEnclosingTyconRef, mkSynId m nm, (fmtps,ttpinst),argTys,retTy,isFakeEventProperty,false) + Override(parentType, minfo.ApparentEnclosingTyconRef, mkSynId m nm, (fmtps, ttpinst), argTys, retTy, isFakeEventProperty, false) /// Get the override info for a value being used to implement a dispatch slot. - let GetTypeMemberOverrideInfo g reqdTy (overrideBy:ValRef) = - let _,argInfos,retTy,_ = GetTypeOfMemberInMemberForm g overrideBy + let GetTypeMemberOverrideInfo g reqdTy (overrideBy: ValRef) = + let _, argInfos, retTy, _ = GetTypeOfMemberInMemberForm g overrideBy let nm = overrideBy.LogicalName let argTys = argInfos |> List.mapSquared fst - let memberMethodTypars,memberToParentInst,argTys,retTy = + let memberMethodTypars, memberToParentInst, argTys, retTy = match PartitionValRefTypars g overrideBy with - | Some(_,_,memberMethodTypars,memberToParentInst,_tinst) -> + | Some(_, _, memberMethodTypars, memberToParentInst, _tinst) -> let argTys = argTys |> List.mapSquared (instType memberToParentInst) let retTy = retTy |> Option.map (instType memberToParentInst) - memberMethodTypars, memberToParentInst,argTys, retTy + memberMethodTypars, memberToParentInst, argTys, retTy | None -> - error(Error(FSComp.SR.typrelMethodIsOverconstrained(),overrideBy.Range)) + error(Error(FSComp.SR.typrelMethodIsOverconstrained(), overrideBy.Range)) let implKind = if ValRefIsExplicitImpl g overrideBy then @@ -121,15 +121,15 @@ module DispatchSlotChecking = //CanImplementAnySlot <<----- Change to this to enable implicit interface implementation let isFakeEventProperty = overrideBy.IsFSharpEventProperty(g) - Override(implKind,overrideBy.MemberApparentEntity, mkSynId overrideBy.Range nm, (memberMethodTypars,memberToParentInst),argTys,retTy,isFakeEventProperty, overrideBy.IsCompilerGenerated) + Override(implKind, overrideBy.MemberApparentEntity, mkSynId overrideBy.Range nm, (memberMethodTypars, memberToParentInst), argTys, retTy, isFakeEventProperty, overrideBy.IsCompilerGenerated) /// Get the override information for an object expression method being used to implement dispatch slots - let GetObjectExprOverrideInfo g amap (implty, id:Ident, memberFlags, ty, arityInfo, bindingAttribs, rhsExpr) = + let GetObjectExprOverrideInfo g amap (implty, id: Ident, memberFlags, ty, arityInfo, bindingAttribs, rhsExpr) = // Dissect the type let tps, argInfos, retTy, _ = GetMemberTypeInMemberForm g memberFlags arityInfo ty id.idRange let argTys = argInfos |> List.mapSquared fst // Dissect the implementation - let _, ctorThisValOpt, baseValOpt, vsl, rhsExpr,_ = destTopLambda g amap arityInfo (rhsExpr,ty) + let _, ctorThisValOpt, baseValOpt, vsl, rhsExpr, _ = destTopLambda g amap arityInfo (rhsExpr, ty) assert ctorThisValOpt.IsNone // Drop 'this' @@ -144,17 +144,17 @@ module DispatchSlotChecking = CanImplementAnyClassHierarchySlot //CanImplementAnySlot <<----- Change to this to enable implicit interface implementation let isFakeEventProperty = CompileAsEvent g bindingAttribs - let overrideByInfo = Override(implKind, tcrefOfAppTy g implty, id, (tps,[]), argTys, retTy, isFakeEventProperty, false) + let overrideByInfo = Override(implKind, tcrefOfAppTy g implty, id, (tps, []), argTys, retTy, isFakeEventProperty, false) overrideByInfo, (baseValOpt, thisv, vs, bindingAttribs, rhsExpr) | _ -> - error(InternalError("Unexpected shape for object expression override",id.idRange)) + error(InternalError("Unexpected shape for object expression override", id.idRange)) /// Check if an override matches a dispatch slot by name - let IsNameMatch (dispatchSlot:MethInfo) (overrideBy: OverrideInfo) = + let IsNameMatch (dispatchSlot: MethInfo) (overrideBy: OverrideInfo) = (overrideBy.LogicalName = dispatchSlot.LogicalName) /// Check if an override matches a dispatch slot by name - let IsImplMatch g (dispatchSlot:MethInfo) (overrideBy: OverrideInfo) = + let IsImplMatch g (dispatchSlot: MethInfo) (overrideBy: OverrideInfo) = // If the override is listed as only relevant to one type, and we're matching it against an abstract slot of an interface type, // then check that interface type is the right type. match overrideBy.CanImplement with @@ -164,13 +164,13 @@ module DispatchSlotChecking = | CanImplementAnyInterfaceSlot -> isInterfaceTy g dispatchSlot.ApparentEnclosingType /// Check if the kinds of type parameters match between a dispatch slot and an override. - let IsTyparKindMatch (CompiledSig(_,_,fvmtps,_)) (Override(_,_,_,(mtps,_),_,_,_,_)) = - List.lengthsEqAndForall2 (fun (tp1:Typar) (tp2:Typar) -> tp1.Kind = tp2.Kind) mtps fvmtps + let IsTyparKindMatch (CompiledSig(_, _, fvmtps, _)) (Override(_, _, _, (mtps, _), _, _, _, _)) = + List.lengthsEqAndForall2 (fun (tp1: Typar) (tp2: Typar) -> tp1.Kind = tp2.Kind) mtps fvmtps /// Check if an override is a partial match for the requirements for a dispatch slot - let IsPartialMatch g (dispatchSlot:MethInfo) compiledSig (Override(_,_,_,(mtps,_),argTys,_retTy,_,_) as overrideBy) = + let IsPartialMatch g (dispatchSlot: MethInfo) compiledSig (Override(_, _, _, (mtps, _), argTys, _retTy, _, _) as overrideBy) = IsNameMatch dispatchSlot overrideBy && - let (CompiledSig (vargtys,_,fvmtps,_)) = compiledSig + let (CompiledSig (vargtys, _, fvmtps, _)) = compiledSig mtps.Length = fvmtps.Length && IsTyparKindMatch compiledSig overrideBy && argTys.Length = vargtys.Length && @@ -178,17 +178,17 @@ module DispatchSlotChecking = /// Compute the reverse of a type parameter renaming. let ReverseTyparRenaming g tinst = - tinst |> List.map (fun (tp,ty) -> (destTyparTy g ty, mkTyparTy tp)) + tinst |> List.map (fun (tp, ty) -> (destTyparTy g ty, mkTyparTy tp)) /// Compose two instantiations of type parameters. let ComposeTyparInsts inst1 inst2 = inst1 |> List.map (map2Of2 (instType inst2)) /// Check if an override exactly matches the requirements for a dispatch slot - let IsExactMatch g amap m dispatchSlot (Override(_,_,_,(mtps,mtpinst),argTys,retTy,_,_) as overrideBy) = + let IsExactMatch g amap m dispatchSlot (Override(_, _, _, (mtps, mtpinst), argTys, retTy, _, _) as overrideBy) = let compiledSig = CompiledSigOfMeth g amap m dispatchSlot IsPartialMatch g dispatchSlot compiledSig overrideBy && - let (CompiledSig (vargtys,vrty,fvmtps,ttpinst)) = compiledSig + let (CompiledSig (vargtys, vrty, fvmtps, ttpinst)) = compiledSig // Compare the types. CompiledSigOfMeth, GetObjectExprOverrideInfo and GetTypeMemberOverrideInfo have already // applied all relevant substitutions except the renamings from fvtmps <-> mtps @@ -245,13 +245,13 @@ module DispatchSlotChecking = /// Check all dispatch slots are implemented by some override. - let CheckDispatchSlotsAreImplemented (denv,g,amap,m, - nenv,sink:TcResultsSink, + let CheckDispatchSlotsAreImplemented (denv, g, amap, m, + nenv, sink: TcResultsSink, isOverallTyAbstract, reqdTy, - dispatchSlots:RequiredSlot list, - availPriorOverrides:OverrideInfo list, - overrides:OverrideInfo list) = + dispatchSlots: RequiredSlot list, + availPriorOverrides: OverrideInfo list, + overrides: OverrideInfo list) = let isReqdTyInterface = isInterfaceTy g reqdTy let showMissingMethodsAndRaiseErrors = (isReqdTyInterface || not isOverallTyAbstract) @@ -262,14 +262,14 @@ module DispatchSlotChecking = let availPriorOverridesKeyed = availPriorOverrides |> NameMultiMap.initBy (fun ov -> ov.LogicalName) let overridesKeyed = overrides |> NameMultiMap.initBy (fun ov -> ov.LogicalName) - dispatchSlots |> List.iter (fun (RequiredSlot(dispatchSlot,isOptional)) -> + dispatchSlots |> List.iter (fun (RequiredSlot(dispatchSlot, isOptional)) -> match NameMultiMap.find dispatchSlot.LogicalName overridesKeyed |> List.filter (OverrideImplementsDispatchSlot g amap m dispatchSlot) with | [ovd] -> if not ovd.IsCompilerGenerated then - let item = Item.MethodGroup(ovd.LogicalName,[dispatchSlot],None) - CallNameResolutionSink sink (ovd.Range,nenv,item,item,dispatchSlot.FormalMethodTyparInst,ItemOccurence.Implemented,denv,AccessorDomain.AccessibleFromSomewhere) + let item = Item.MethodGroup(ovd.LogicalName, [dispatchSlot], None) + CallNameResolutionSink sink (ovd.Range, nenv, item, item, dispatchSlot.FormalMethodTyparInst, ItemOccurence.Implemented, denv, AccessorDomain.AccessibleFromSomewhere) sink |> ignore () | [] -> @@ -295,14 +295,14 @@ module DispatchSlotChecking = match possibleOverrides with | [] -> noimpl() - | [ Override(_,_,_,(mtps,_),argTys,_,_,_) as overrideBy ] -> + | [ Override(_, _, _, (mtps, _), argTys, _, _, _) as overrideBy ] -> let moreThanOnePossibleDispatchSlot = dispatchSlots - |> List.filter (fun (RequiredSlot(dispatchSlot,_)) -> IsNameMatch dispatchSlot overrideBy && IsImplMatch g dispatchSlot overrideBy) + |> List.filter (fun (RequiredSlot(dispatchSlot, _)) -> IsNameMatch dispatchSlot overrideBy && IsImplMatch g dispatchSlot overrideBy) |> isNilOrSingleton |> not - let (CompiledSig (vargtys,_,fvmtps,_)) = compiledSig + let (CompiledSig (vargtys, _, fvmtps, _)) = compiledSig if moreThanOnePossibleDispatchSlot then noimpl() @@ -316,18 +316,18 @@ module DispatchSlotChecking = else fail(Error(FSComp.SR.typrelMemberCannotImplement(FormatOverride denv overrideBy, NicePrint.stringOfMethInfo amap m denv dispatchSlot, FormatMethInfoSig g amap m denv dispatchSlot), overrideBy.Range)) | overrideBy :: _ -> - errorR(Error(FSComp.SR.typrelOverloadNotFound(FormatMethInfoSig g amap m denv dispatchSlot, FormatMethInfoSig g amap m denv dispatchSlot),overrideBy.Range)) + errorR(Error(FSComp.SR.typrelOverloadNotFound(FormatMethInfoSig g amap m denv dispatchSlot, FormatMethInfoSig g amap m denv dispatchSlot), overrideBy.Range)) | [ overrideBy ] -> - if dispatchSlots |> List.exists (fun (RequiredSlot(dispatchSlot,_)) -> OverrideImplementsDispatchSlot g amap m dispatchSlot overrideBy) then + if dispatchSlots |> List.exists (fun (RequiredSlot(dispatchSlot, _)) -> OverrideImplementsDispatchSlot g amap m dispatchSlot overrideBy) then noimpl() else // Error will be reported below in CheckOverridesAreAllUsedOnce () | _ -> - fail(Error(FSComp.SR.typrelOverrideWasAmbiguous(FormatMethInfoSig g amap m denv dispatchSlot),m)) - | _ -> fail(Error(FSComp.SR.typrelMoreThenOneOverride(FormatMethInfoSig g amap m denv dispatchSlot),m))) + fail(Error(FSComp.SR.typrelOverrideWasAmbiguous(FormatMethInfoSig g amap m denv dispatchSlot), m)) + | _ -> fail(Error(FSComp.SR.typrelMoreThenOneOverride(FormatMethInfoSig g amap m denv dispatchSlot), m))) !res /// Check all implementations implement some dispatch slot. @@ -340,17 +340,17 @@ module DispatchSlotChecking = if not overrideBy.IsFakeEventProperty then let m = overrideBy.Range let relevantVirts = NameMultiMap.find overrideBy.LogicalName dispatchSlotsKeyed - let relevantVirts = relevantVirts |> List.map (fun (RequiredSlot(dispatchSlot,_)) -> dispatchSlot) + let relevantVirts = relevantVirts |> List.map (fun (RequiredSlot(dispatchSlot, _)) -> dispatchSlot) match relevantVirts |> List.filter (fun dispatchSlot -> OverrideImplementsDispatchSlot g amap m dispatchSlot overrideBy) with | [] -> // This is all error reporting match relevantVirts |> List.filter (fun dispatchSlot -> IsPartialMatch g dispatchSlot (CompiledSigOfMeth g amap m dispatchSlot) overrideBy) with | [dispatchSlot] -> - errorR(OverrideDoesntOverride(denv,overrideBy,Some dispatchSlot,g,amap,m)) + errorR(OverrideDoesntOverride(denv, overrideBy, Some dispatchSlot, g, amap, m)) | _ -> match relevantVirts |> List.filter (fun dispatchSlot -> IsNameMatch dispatchSlot overrideBy) with - | [] -> errorR(OverrideDoesntOverride(denv,overrideBy,None,g,amap,m)) + | [] -> errorR(OverrideDoesntOverride(denv, overrideBy, None, g, amap, m)) | [dispatchSlot] -> errorR(OverrideDoesntOverride(denv, overrideBy, Some dispatchSlot, g, amap, m)) | possibleDispatchSlots -> @@ -365,13 +365,13 @@ module DispatchSlotChecking = | [dispatchSlot] -> if dispatchSlot.IsFinal && (isObjExpr || not (typeEquiv g reqdTy dispatchSlot.ApparentEnclosingType)) then - errorR(Error(FSComp.SR.typrelMethodIsSealed(NicePrint.stringOfMethInfo amap m denv dispatchSlot),m)) + errorR(Error(FSComp.SR.typrelMethodIsSealed(NicePrint.stringOfMethInfo amap m denv dispatchSlot), m)) | dispatchSlots -> match dispatchSlots |> List.filter (fun dispatchSlot -> isInterfaceTy g dispatchSlot.ApparentEnclosingType || not (DispatchSlotIsAlreadyImplemented g amap m availPriorOverridesKeyed dispatchSlot)) with | h1 :: h2 :: _ -> - errorR(Error(FSComp.SR.typrelOverrideImplementsMoreThenOneSlot((FormatOverride denv overrideBy), (NicePrint.stringOfMethInfo amap m denv h1), (NicePrint.stringOfMethInfo amap m denv h2)),m)) + errorR(Error(FSComp.SR.typrelOverrideImplementsMoreThenOneSlot((FormatOverride denv overrideBy), (NicePrint.stringOfMethInfo amap m denv h1), (NicePrint.stringOfMethInfo amap m denv h2)), m)) | _ -> // dispatch slots are ordered from the derived classes to base // so we can check the topmost dispatch slot if it is final @@ -388,13 +388,13 @@ module DispatchSlotChecking = /// allReqdTys = {C;I2;I3} /// /// allReqdTys can include one class/record/union type. - let GetSlotImplSets (infoReader:InfoReader) denv isObjExpr allReqdTys = + let GetSlotImplSets (infoReader: InfoReader) denv isObjExpr allReqdTys = let g = infoReader.g let amap = infoReader.amap let availImpliedInterfaces : TType list = - [ for (reqdTy,m) in allReqdTys do + [ for (reqdTy, m) in allReqdTys do if not (isInterfaceTy g reqdTy) then let baseTyOpt = if isObjExpr then Some reqdTy else GetSuperTypeOfType g amap m reqdTy match baseTyOpt with @@ -405,19 +405,19 @@ module DispatchSlotChecking = // interface types implied by the type. This includes the implemented type itself if the implemented type // is an interface type. let intfSets = - allReqdTys |> List.mapi (fun i (reqdTy,m) -> + allReqdTys |> List.mapi (fun i (reqdTy, m) -> let interfaces = AllInterfacesOfType g amap m AllowMultiIntfInstantiations.Yes reqdTy let impliedTys = (if isInterfaceTy g reqdTy then interfaces else reqdTy :: interfaces) - (i, reqdTy, impliedTys,m)) + (i, reqdTy, impliedTys, m)) // For each implemented type, reduce its list of implied interfaces by subtracting out those implied // by another implemented interface type. // // REVIEW: Note complexity O(ity*jty) let reqdTyInfos = - intfSets |> List.map (fun (i,reqdTy,impliedTys,m) -> + intfSets |> List.map (fun (i, reqdTy, impliedTys, m) -> let reduced = - (impliedTys,intfSets) ||> List.fold (fun acc (j,jty,impliedTys2,m) -> + (impliedTys, intfSets) ||> List.fold (fun acc (j, jty, impliedTys2, m) -> if i <> j && TypeFeasiblySubsumesType 0 g amap m jty CanCoerce reqdTy then ListSet.subtract (TypesFeasiblyEquiv 0 g amap m) acc impliedTys2 else acc ) @@ -427,22 +427,22 @@ module DispatchSlotChecking = // duplicates. for (_i, reqdTy, m, impliedTys) in reqdTyInfos do if isInterfaceTy g reqdTy && isNil impliedTys then - errorR(Error(FSComp.SR.typrelDuplicateInterface(),m)) + errorR(Error(FSComp.SR.typrelDuplicateInterface(), m)) // Check that no interface type is implied twice // // Note complexity O(reqdTy*reqdTy) for (i, _reqdTy, reqdTyRange, impliedTys) in reqdTyInfos do - for (j,_,_,impliedTys2) in reqdTyInfos do + for (j, _, _, impliedTys2) in reqdTyInfos do if i > j then let overlap = ListSet.intersect (TypesFeasiblyEquiv 0 g amap reqdTyRange) impliedTys impliedTys2 overlap |> List.iter (fun overlappingTy -> - if not (isNil (GetImmediateIntrinsicMethInfosOfType (None,AccessibleFromSomewhere) g amap reqdTyRange overlappingTy |> List.filter (fun minfo -> minfo.IsVirtual))) then - errorR(Error(FSComp.SR.typrelNeedExplicitImplementation(NicePrint.minimalStringOfType denv (List.head overlap)),reqdTyRange))) + if not (isNil (GetImmediateIntrinsicMethInfosOfType (None, AccessibleFromSomewhere) g amap reqdTyRange overlappingTy |> List.filter (fun minfo -> minfo.IsVirtual))) then + errorR(Error(FSComp.SR.typrelNeedExplicitImplementation(NicePrint.minimalStringOfType denv (List.head overlap)), reqdTyRange))) // Get the SlotImplSet for each implemented type // This contains the list of required members and the list of available members - [ for (_,reqdTy,reqdTyRange,impliedTys) in reqdTyInfos do + [ for (_, reqdTy, reqdTyRange, impliedTys) in reqdTyInfos do // Build a set of the implied interface types, for quicker lookup, by nominal type let isImpliedInterfaceTable = @@ -457,7 +457,7 @@ module DispatchSlotChecking = isImpliedInterfaceTable.ContainsKey (tcrefOfAppTy g ty) && impliedTys |> List.exists (TypesFeasiblyEquiv 0 g amap reqdTyRange ty) - //let isSlotImpl (minfo:MethInfo) = + //let isSlotImpl (minfo: MethInfo) = // not minfo.IsAbstract && minfo.IsVirtual // Compute the abstract slots that require implementations @@ -469,15 +469,15 @@ module DispatchSlotChecking = // specific method is "optionally" implemented. let isOptional = ListSet.contains (typeEquiv g) impliedTy availImpliedInterfaces - for reqdSlot in GetImmediateIntrinsicMethInfosOfType (None,AccessibleFromSomewhere) g amap reqdTyRange impliedTy do + for reqdSlot in GetImmediateIntrinsicMethInfosOfType (None, AccessibleFromSomewhere) g amap reqdTyRange impliedTy do yield RequiredSlot(reqdSlot, isOptional) else // In the normal case, the requirements for a class are precisely all the abstract slots up the whole hierarchy. // So here we get and yield all of those. - for minfo in reqdTy |> GetIntrinsicMethInfosOfType infoReader (None,AccessibleFromSomewhere,AllowMultiIntfInstantiations.Yes) IgnoreOverrides reqdTyRange do + for minfo in reqdTy |> GetIntrinsicMethInfosOfType infoReader (None, AccessibleFromSomewhere, AllowMultiIntfInstantiations.Yes) IgnoreOverrides reqdTyRange do if minfo.IsDispatchSlot then - yield RequiredSlot(minfo,(*isOptional=*) not minfo.IsAbstract) ] + yield RequiredSlot(minfo, (*isOptional=*) not minfo.IsAbstract) ] // Compute the methods that are available to implement abstract slots from the base class @@ -496,40 +496,40 @@ module DispatchSlotChecking = [ // Get any class hierarchy methods on this type // // NOTE: What we have below is an over-approximation that will get too many methods - // and not always correctly relate them to the slots they implement. For example, + // and not always correctly relate them to the slots they implement. For example, // we may get an override from a base class and believe it implements a fresh, new abstract // slot in a subclass. - for minfos in infoReader.GetRawIntrinsicMethodSetsOfType(None,AccessibleFromSomewhere,AllowMultiIntfInstantiations.Yes,reqdTyRange,reqdTy) do + for minfos in infoReader.GetRawIntrinsicMethodSetsOfType(None, AccessibleFromSomewhere, AllowMultiIntfInstantiations.Yes, reqdTyRange, reqdTy) do for minfo in minfos do if not minfo.IsAbstract then yield GetInheritedMemberOverrideInfo g amap reqdTyRange CanImplementAnyClassHierarchySlot minfo ] // We also collect up the properties. This is used for abstract slot inference when overriding properties - let isRelevantRequiredProperty (x:PropInfo) = + let isRelevantRequiredProperty (x: PropInfo) = (x.IsVirtualProperty && not (isInterfaceTy g reqdTy)) || isImpliedInterfaceType x.ApparentEnclosingType let reqdProperties = - GetIntrinsicPropInfosOfType infoReader (None,AccessibleFromSomewhere,AllowMultiIntfInstantiations.Yes) IgnoreOverrides reqdTyRange reqdTy + GetIntrinsicPropInfosOfType infoReader (None, AccessibleFromSomewhere, AllowMultiIntfInstantiations.Yes) IgnoreOverrides reqdTyRange reqdTy |> List.filter isRelevantRequiredProperty - let dispatchSlotsKeyed = dispatchSlots |> NameMultiMap.initBy (fun (RequiredSlot(v,_)) -> v.LogicalName) + let dispatchSlotsKeyed = dispatchSlots |> NameMultiMap.initBy (fun (RequiredSlot(v, _)) -> v.LogicalName) yield SlotImplSet(dispatchSlots, dispatchSlotsKeyed, availPriorOverrides, reqdProperties) ] /// Check that a type definition implements all its required interfaces after processing all declarations /// within a file. - let CheckImplementationRelationAtEndOfInferenceScope (infoReader :InfoReader,denv,nenv,sink,tycon:Tycon,isImplementation) = + let CheckImplementationRelationAtEndOfInferenceScope (infoReader : InfoReader, denv, nenv, sink, tycon: Tycon, isImplementation) = let g = infoReader.g let amap = infoReader.amap let tcaug = tycon.TypeContents - let interfaces = tycon.ImmediateInterfacesOfFSharpTycon |> List.map (fun (ity,_compgen,m) -> (ity,m)) + let interfaces = tycon.ImmediateInterfacesOfFSharpTycon |> List.map (fun (ity, _compgen, m) -> (ity, m)) let overallTy = generalizedTyconRef (mkLocalTyconRef tycon) - let allReqdTys = (overallTy,tycon.Range) :: interfaces + let allReqdTys = (overallTy, tycon.Range) :: interfaces // Get all the members that are immediately part of this type // Include the auto-generated members @@ -547,7 +547,7 @@ module DispatchSlotChecking = overrideBy.IsVirtualMember && // exclude non virtual (e.g. keep override/default). [4469] not overrideBy.IsDispatchSlotMember) - let mustOverrideSomething reqdTy (overrideBy:ValRef) = + let mustOverrideSomething reqdTy (overrideBy: ValRef) = let memberInfo = overrideBy.MemberInfo.Value not (overrideBy.IsFSharpEventProperty(g)) && memberInfo.MemberFlags.IsOverrideOrExplicitImpl && @@ -567,21 +567,21 @@ module DispatchSlotChecking = // We check all the abstracts related to the class hierarchy and then check each interface implementation - for ((reqdTy,m),slotImplSet) in allImpls do - let (SlotImplSet(dispatchSlots, dispatchSlotsKeyed, availPriorOverrides,_)) = slotImplSet + for ((reqdTy, m), slotImplSet) in allImpls do + let (SlotImplSet(dispatchSlots, dispatchSlotsKeyed, availPriorOverrides, _)) = slotImplSet try // Now extract the information about each overriding method relevant to this SlotImplSet let allImmediateMembersThatMightImplementDispatchSlots = allImmediateMembersThatMightImplementDispatchSlots - |> List.map (fun overrideBy -> overrideBy,GetTypeMemberOverrideInfo g reqdTy overrideBy) + |> List.map (fun overrideBy -> overrideBy, GetTypeMemberOverrideInfo g reqdTy overrideBy) // Now check the implementation // We don't give missing method errors for abstract classes if isImplementation && not (isInterfaceTy g overallTy) then let overrides = allImmediateMembersThatMightImplementDispatchSlots |> List.map snd - let allCorrect = CheckDispatchSlotsAreImplemented (denv,g,amap,m,nenv,sink,tcaug.tcaug_abstract,reqdTy,dispatchSlots,availPriorOverrides,overrides) + let allCorrect = CheckDispatchSlotsAreImplemented (denv, g, amap, m, nenv, sink, tcaug.tcaug_abstract, reqdTy, dispatchSlots, availPriorOverrides, overrides) // Tell the user to mark the thing abstract if it was missing implementations if not allCorrect && not tcaug.tcaug_abstract && not (isInterfaceTy g reqdTy) then @@ -606,15 +606,15 @@ module DispatchSlotChecking = let slotsigs = overrideBy.MemberInfo.Value.ImplementedSlotSigs slotsigs |> List.map (ReparentSlotSigToUseMethodTypars g overrideBy.Range overrideBy) else - [ for ((reqdTy,m),(SlotImplSet(_dispatchSlots,dispatchSlotsKeyed,_,_))) in allImpls do + [ for ((reqdTy, m), (SlotImplSet(_dispatchSlots, dispatchSlotsKeyed, _, _))) in allImpls do let overrideByInfo = GetTypeMemberOverrideInfo g reqdTy overrideBy let overridenForThisSlotImplSet = - [ for (RequiredSlot(dispatchSlot,_)) in NameMultiMap.find overrideByInfo.LogicalName dispatchSlotsKeyed do + [ for (RequiredSlot(dispatchSlot, _)) in NameMultiMap.find overrideByInfo.LogicalName dispatchSlotsKeyed do if OverrideImplementsDispatchSlot g amap m dispatchSlot overrideByInfo then if tyconRefEq g overrideByInfo.BoundingTyconRef dispatchSlot.DeclaringTyconRef then match dispatchSlot.ArbitraryValRef with | Some virtMember -> - if virtMember.MemberInfo.Value.IsImplemented then errorR(Error(FSComp.SR.tcDefaultImplementationAlreadyExists(),overrideByInfo.Range)) + if virtMember.MemberInfo.Value.IsImplemented then errorR(Error(FSComp.SR.tcDefaultImplementationAlreadyExists(), overrideByInfo.Range)) virtMember.MemberInfo.Value.IsImplemented <- true | None -> () // not an F# slot @@ -641,7 +641,7 @@ module DispatchSlotChecking = /// "Type Completion" inference and a few other checks at the end of the inference scope -let FinalTypeDefinitionChecksAtEndOfInferenceScope (infoReader:InfoReader, nenv, sink, isImplementation, denv) (tycon:Tycon) = +let FinalTypeDefinitionChecksAtEndOfInferenceScope (infoReader: InfoReader, nenv, sink, isImplementation, denv) (tycon: Tycon) = let g = infoReader.g let amap = infoReader.amap @@ -661,9 +661,9 @@ let FinalTypeDefinitionChecksAtEndOfInferenceScope (infoReader:InfoReader, nenv, then (* Warn when we're doing this for class types *) if AugmentWithHashCompare.TyconIsCandidateForAugmentationWithEquals g tycon then - warning(Error(FSComp.SR.typrelTypeImplementsIComparableShouldOverrideObjectEquals(tycon.DisplayName),tycon.Range)) + warning(Error(FSComp.SR.typrelTypeImplementsIComparableShouldOverrideObjectEquals(tycon.DisplayName), tycon.Range)) else - warning(Error(FSComp.SR.typrelTypeImplementsIComparableDefaultObjectEqualsProvided(tycon.DisplayName),tycon.Range)) + warning(Error(FSComp.SR.typrelTypeImplementsIComparableDefaultObjectEqualsProvided(tycon.DisplayName), tycon.Range)) AugmentWithHashCompare.CheckAugmentationAttribs isImplementation g amap tycon // Check some conditions about generic comparison and hashing. We can only check this condition after we've done the augmentation @@ -679,13 +679,13 @@ let FinalTypeDefinitionChecksAtEndOfInferenceScope (infoReader:InfoReader, nenv, if (Option.isSome tycon.GeneratedHashAndEqualsWithComparerValues) && (hasExplicitObjectGetHashCode || hasExplicitObjectEqualsOverride) then - errorR(Error(FSComp.SR.typrelExplicitImplementationOfGetHashCodeOrEquals(tycon.DisplayName),m)) + errorR(Error(FSComp.SR.typrelExplicitImplementationOfGetHashCodeOrEquals(tycon.DisplayName), m)) if not hasExplicitObjectEqualsOverride && hasExplicitObjectGetHashCode then - warning(Error(FSComp.SR.typrelExplicitImplementationOfGetHashCode(tycon.DisplayName),m)) + warning(Error(FSComp.SR.typrelExplicitImplementationOfGetHashCode(tycon.DisplayName), m)) if hasExplicitObjectEqualsOverride && not hasExplicitObjectGetHashCode then - warning(Error(FSComp.SR.typrelExplicitImplementationOfEquals(tycon.DisplayName),m)) + warning(Error(FSComp.SR.typrelExplicitImplementationOfEquals(tycon.DisplayName), m)) // remember these values to ensure we don't generate these methods during codegen @@ -698,29 +698,29 @@ let FinalTypeDefinitionChecksAtEndOfInferenceScope (infoReader:InfoReader, nenv, && not tycon.IsFSharpInterfaceTycon && not tycon.IsFSharpDelegateTycon then - DispatchSlotChecking.CheckImplementationRelationAtEndOfInferenceScope (infoReader,denv,nenv,sink,tycon,isImplementation) + DispatchSlotChecking.CheckImplementationRelationAtEndOfInferenceScope (infoReader, denv, nenv, sink, tycon, isImplementation) /// 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 -let GetAbstractMethInfosForSynMethodDecl(infoReader:InfoReader,ad,memberName:Ident,bindm,typToSearchForAbstractMembers,valSynData) = +let GetAbstractMethInfosForSynMethodDecl(infoReader: InfoReader, ad, memberName: Ident, bindm, typToSearchForAbstractMembers, valSynData) = let minfos = match typToSearchForAbstractMembers with - | _,Some(SlotImplSet(_, dispatchSlotsKeyed,_,_)) -> - NameMultiMap.find memberName.idText dispatchSlotsKeyed |> List.map (fun (RequiredSlot(dispatchSlot,_)) -> dispatchSlot) + | _, Some(SlotImplSet(_, dispatchSlotsKeyed, _, _)) -> + NameMultiMap.find memberName.idText dispatchSlotsKeyed |> List.map (fun (RequiredSlot(dispatchSlot, _)) -> dispatchSlot) | ty, None -> GetIntrinsicMethInfosOfType infoReader (Some(memberName.idText), ad, AllowMultiIntfInstantiations.Yes) IgnoreOverrides bindm ty let dispatchSlots = minfos |> List.filter (fun minfo -> minfo.IsDispatchSlot) let topValSynArities = SynInfo.AritiesOfArgs valSynData let topValSynArities = if List.isEmpty topValSynArities then topValSynArities else topValSynArities.Tail let dispatchSlotsArityMatch = dispatchSlots |> List.filter (fun minfo -> minfo.NumArgs = topValSynArities) - dispatchSlots,dispatchSlotsArityMatch + dispatchSlots, dispatchSlotsArityMatch /// 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 -let GetAbstractPropInfosForSynPropertyDecl(infoReader:InfoReader,ad,memberName:Ident,bindm,typToSearchForAbstractMembers,_k,_valSynData) = +let GetAbstractPropInfosForSynPropertyDecl(infoReader: InfoReader, ad, memberName: Ident, bindm, typToSearchForAbstractMembers, _k, _valSynData) = let pinfos = match typToSearchForAbstractMembers with - | _,Some(SlotImplSet(_,_,_,reqdProps)) -> + | _, Some(SlotImplSet(_, _, _, reqdProps)) -> reqdProps |> List.filter (fun pinfo -> pinfo.PropertyName = memberName.idText) | ty, None -> GetIntrinsicPropInfosOfType infoReader (Some(memberName.idText), ad, AllowMultiIntfInstantiations.Yes) IgnoreOverrides bindm ty diff --git a/src/fcs-fable/src/fsharp/NameResolution.fs b/src/fcs-fable/src/fsharp/NameResolution.fs index 655d06cafd..114d0d8016 100644 --- a/src/fcs-fable/src/fsharp/NameResolution.fs +++ b/src/fcs-fable/src/fsharp/NameResolution.fs @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -/// Name environment and name resolution +/// Name environment and name resolution module internal FSharp.Compiler.NameResolution open Internal.Utilities -open FSharp.Compiler +open FSharp.Compiler open FSharp.Compiler.Range open FSharp.Compiler.Ast open FSharp.Compiler.ErrorLogger @@ -13,7 +13,7 @@ open FSharp.Compiler.Tast open FSharp.Compiler.Tastops open FSharp.Compiler.TcGlobals open FSharp.Compiler.Lib -open FSharp.Compiler.AbstractIL.Internal +open FSharp.Compiler.AbstractIL.Internal open FSharp.Compiler.AbstractIL.Internal.Library open FSharp.Compiler.AbstractIL.Internal.Library.ResultOrException open FSharp.Compiler.AbstractIL.Diagnostics @@ -30,61 +30,61 @@ open FSharp.Compiler.ExtensionTyping #endif /// An object that captures the logical context for name resolution. -type NameResolver(g:TcGlobals, - amap: Import.ImportMap, - infoReader: InfoReader, +type NameResolver(g: TcGlobals, + amap: Import.ImportMap, + infoReader: InfoReader, instantiationGenerator: (range -> Typars -> TypeInst)) = - /// Used to transform typars into new inference typars + /// Used to transform typars into new inference typars // instantiationGenerator is a function to help us create the // type parameters by copying them from type parameter specifications read - // from IL code. + // from IL code. // - // When looking up items in generic types we create a fresh instantiation - // of the type, i.e. instantiate the type with inference variables. - // This means the item is returned ready for use by the type inference engine - // without further freshening. However it does mean we end up plumbing 'instantiationGenerator' - // around a bit more than we would like to, which is a bit annoying. + // When looking up items in generic types we create a fresh instantiation + // of the type, i.e. instantiate the type with inference variables. + // This means the item is returned ready for use by the type inference engine + // without further freshening. However it does mean we end up plumbing 'instantiationGenerator' + // around a bit more than we would like to, which is a bit annoying. member nr.InstantiationGenerator = instantiationGenerator member nr.g = g member nr.amap = amap member nr.InfoReader = infoReader - + //------------------------------------------------------------------------- // Helpers for unionconstrs and recdfields -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- /// Get references to all the union cases in the type definition -let UnionCaseRefsInTycon (modref: ModuleOrNamespaceRef) (tycon:Tycon) = +let UnionCaseRefsInTycon (modref: ModuleOrNamespaceRef) (tycon: Tycon) = tycon.UnionCasesAsList |> List.map (mkModuleUnionCaseRef modref tycon) /// Get references to all the union cases defined in the module -let UnionCaseRefsInModuleOrNamespace (modref:ModuleOrNamespaceRef) = +let UnionCaseRefsInModuleOrNamespace (modref: ModuleOrNamespaceRef) = [ for x in modref.ModuleOrNamespaceType.AllEntities do yield! UnionCaseRefsInTycon modref x ] /// Try to find a type with a union case of the given name -let TryFindTypeWithUnionCase (modref:ModuleOrNamespaceRef) (id: Ident) = +let TryFindTypeWithUnionCase (modref: ModuleOrNamespaceRef) (id: Ident) = modref.ModuleOrNamespaceType.AllEntities - |> QueueList.tryFind (fun tycon -> tycon.GetUnionCaseByName id.idText |> Option.isSome) + |> QueueList.tryFind (fun tycon -> tycon.GetUnionCaseByName id.idText |> Option.isSome) /// Try to find a type with a record field of the given name -let TryFindTypeWithRecdField (modref:ModuleOrNamespaceRef) (id: Ident) = +let TryFindTypeWithRecdField (modref: ModuleOrNamespaceRef) (id: Ident) = modref.ModuleOrNamespaceType.AllEntities |> QueueList.tryFind (fun tycon -> tycon.GetFieldByName id.idText |> Option.isSome) /// Get the active pattern elements defined by a given value, if any -let ActivePatternElemsOfValRef vref = +let ActivePatternElemsOfValRef vref = match TryGetActivePatternInfo vref with - | Some apinfo -> apinfo.ActiveTags |> List.mapi (fun i _ -> APElemRef(apinfo,vref, i)) - | None -> [] + | Some apinfo -> apinfo.ActiveTags |> List.mapi (fun i _ -> APElemRef(apinfo, vref, i)) + | None -> [] /// Try to make a reference to a value in a module. // // mkNestedValRef may fail if the assembly load set is // incomplete and the value is an extension member of a type that is not -// available. In some cases we can reasonably recover from this, e.g. by simply not adding +// available. In some cases we can reasonably recover from this, e.g. by simply not adding // an entry to a table. Callsites have to cope with the error (None) condition -// sensibly, e.g. in a way that won't change the way things are compiled as the +// sensibly, e.g. in a way that won't change the way things are compiled as the // assembly set is completed. let TryMkValRefInModRef modref vspec = protectAssemblyExploration @@ -92,31 +92,31 @@ let TryMkValRefInModRef modref vspec = (fun () -> Some (mkNestedValRef modref vspec)) /// Get the active pattern elements defined by a given value, if any -let ActivePatternElemsOfVal modref vspec = +let ActivePatternElemsOfVal modref vspec = // If the assembly load set is incomplete then don't add anything to the table - match TryMkValRefInModRef modref vspec with + match TryMkValRefInModRef modref vspec with | None -> [] | Some vref -> ActivePatternElemsOfValRef vref /// Get the active pattern elements defined in a module, if any. Cache in the slot in the module type. -let ActivePatternElemsOfModuleOrNamespace (modref:ModuleOrNamespaceRef) : NameMap = +let ActivePatternElemsOfModuleOrNamespace (modref: ModuleOrNamespaceRef) : NameMap = let mtyp = modref.ModuleOrNamespaceType cacheOptRef mtyp.ActivePatternElemRefLookupTable (fun () -> - mtyp.AllValsAndMembers - |> Seq.collect (ActivePatternElemsOfVal modref) + mtyp.AllValsAndMembers + |> Seq.collect (ActivePatternElemsOfVal modref) |> Seq.fold (fun acc apref -> NameMap.add apref.Name apref acc) Map.empty) //--------------------------------------------------------------------------- // Name Resolution Items -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- /// Detect a use of a nominal type, including type abbreviations. /// /// When reporting symbols, we care about abbreviations, e.g. 'int' and 'int32' count as two separate symbols -let (|AbbrevOrAppTy|_|) (ty: TType) = - match stripTyparEqns ty with - | TType_app (tcref,_) -> Some tcref +let (|AbbrevOrAppTy|_|) (ty: TType) = + match stripTyparEqns ty with + | TType_app (tcref, _) -> Some tcref | _ -> None [] @@ -130,14 +130,14 @@ type ArgumentContainer = | UnionCase of UnionCaseInfo // Note: Active patterns are encoded like this: -// let (|A|B|) x = if x < 0 then A else B // A and B are reported as results using 'Item.ActivePatternResult' +// let (|A|B|) x = if x < 0 then A else B // A and B are reported as results using 'Item.ActivePatternResult' // match () with | A | B -> () // A and B are reported using 'Item.ActivePatternCase' [] /// Represents an item that results from name resolution -type Item = +type Item = - /// Represents the resolution of a name to an F# value or function. + /// Represents the resolution of a name to an F# value or function. | Value of ValRef /// Represents the resolution of a name to an F# union case. @@ -147,10 +147,10 @@ type Item = | ActivePatternResult of ActivePatternInfo * TType * int * range /// Represents the resolution of a name to an F# active pattern case within the body of an active pattern. - | ActivePatternCase of ActivePatternElemRef + | ActivePatternCase of ActivePatternElemRef /// Represents the resolution of a name to an F# exception definition. - | ExnCase of TyconRef + | ExnCase of TyconRef /// Represents the resolution of a name to an F# record field. | RecdField of RecdFieldInfo @@ -158,13 +158,13 @@ type Item = /// Represents the resolution of a name to a field of an anonymous record type. | AnonRecdField of AnonRecdTypeInfo * TTypes * int * range - // The following are never in the items table but are valid results of binding - // an identifier in different circumstances. + // The following are never in the items table but are valid results of binding + // an identifier in different circumstances. /// Represents the resolution of a name at the point of its own definition. | NewDef of Ident - /// Represents the resolution of a name to a .NET field + /// Represents the resolution of a name to a .NET field | ILField of ILFieldInfo /// Represents the resolution of a name to an event @@ -173,7 +173,7 @@ type Item = /// Represents the resolution of a name to a property | Property of string * PropInfo list - /// Represents the resolution of a name to a group of methods. + /// Represents the resolution of a name to a group of methods. | MethodGroup of displayName: string * methods: MethInfo list * uninstantiatedMethodOpt: MethInfo option /// Represents the resolution of a name to a constructor @@ -189,7 +189,7 @@ type Item = | Types of string * TType list /// 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 | CustomOperation of string * (unit -> string option) * MethInfo option @@ -209,69 +209,69 @@ type Item = | ArgName of Ident * TType * ArgumentContainer option /// Represents the resolution of a name to a named property setter - | SetterArg of Ident * Item + | SetterArg of Ident * Item /// Represents the potential resolution of an unqualified name to a type. | UnqualifiedType of TyconRef list - static member MakeMethGroup (nm,minfos:MethInfo list) = + static member MakeMethGroup (nm, minfos: MethInfo list) = let minfos = minfos |> List.sortBy (fun minfo -> minfo.NumArgs |> List.sum) - Item.MethodGroup (nm,minfos,None) + Item.MethodGroup (nm, minfos, None) - static member MakeCtorGroup (nm,minfos:MethInfo list) = + static member MakeCtorGroup (nm, minfos: MethInfo list) = let minfos = minfos |> List.sortBy (fun minfo -> minfo.NumArgs |> List.sum) - Item.CtorGroup (nm,minfos) + Item.CtorGroup (nm, minfos) member d.DisplayName = match d with | Item.Value v -> v.DisplayName | Item.ActivePatternCase apref -> apref.Name - | Item.UnionCase(uinfo,_) -> DecompileOpName uinfo.UnionCase.DisplayName + | Item.UnionCase(uinfo, _) -> DecompileOpName uinfo.UnionCase.DisplayName | Item.ExnCase tcref -> tcref.LogicalName | Item.RecdField rfinfo -> DecompileOpName rfinfo.RecdField.Name | Item.AnonRecdField (anonInfo, _tys, i, _m) -> anonInfo.SortedNames.[i] | Item.NewDef id -> id.idText | Item.ILField finfo -> finfo.FieldName | Item.Event einfo -> einfo.EventName - | Item.Property(_, FSProp(_,_, Some v,_) :: _) - | Item.Property(_, FSProp(_,_,_, Some v) :: _) -> v.DisplayName + | Item.Property(_, FSProp(_, _, Some v, _) :: _) + | Item.Property(_, FSProp(_, _, _, Some v) :: _) -> v.DisplayName | Item.Property(nm, _) -> PrettyNaming.DemangleOperatorName nm - | Item.MethodGroup(_, (FSMeth(_,_, v,_) :: _), _) -> v.DisplayName + | Item.MethodGroup(_, (FSMeth(_, _, v, _) :: _), _) -> v.DisplayName | Item.MethodGroup(nm, _, _) -> PrettyNaming.DemangleOperatorName nm - | Item.CtorGroup(nm,_) -> DemangleGenericTypeName nm + | Item.CtorGroup(nm, _) -> DemangleGenericTypeName nm | Item.FakeInterfaceCtor (AbbrevOrAppTy tcref) | Item.DelegateCtor (AbbrevOrAppTy tcref) -> DemangleGenericTypeName tcref.DisplayName - | Item.Types(nm,_) -> DemangleGenericTypeName nm + | Item.Types(nm, _) -> DemangleGenericTypeName nm | Item.UnqualifiedType(tcref :: _) -> tcref.DisplayName - | Item.TypeVar (nm,_) -> nm + | Item.TypeVar (nm, _) -> nm | Item.ModuleOrNamespaces(modref :: _) -> modref.DemangledModuleOrNamespaceName | Item.ArgName (id, _, _) -> id.idText | Item.SetterArg (id, _) -> id.idText - | Item.CustomOperation (customOpName,_,_) -> customOpName - | Item.CustomBuilder (nm,_) -> nm + | Item.CustomOperation (customOpName, _, _) -> customOpName + | Item.CustomBuilder (nm, _) -> nm | _ -> "" -let valRefHash (vref: ValRef) = - match vref.TryDeref with - | ValueNone -> 0 +let valRefHash (vref: ValRef) = + match vref.TryDeref with + | ValueNone -> 0 | ValueSome v -> LanguagePrimitives.PhysicalHash v [] -/// Pairs an Item with a TyparInst showing how generic type variables of the item are instantiated at +/// Pairs an Item with a TyparInst showing how generic type variables of the item are instantiated at /// a particular usage point. -type ItemWithInst = - { Item : Item +type ItemWithInst = + { Item: Item TyparInst: TyparInst } let ItemWithNoInst item = ({ Item = item; TyparInst = emptyTyparInst } : ItemWithInst) -let (|ItemWithInst|) (x:ItemWithInst) = (x.Item, x.TyparInst) +let (|ItemWithInst|) (x: ItemWithInst) = (x.Item, x.TyparInst) /// Represents a record field resolution and the information if the usage is deprecated. type FieldResolution = FieldResolution of RecdFieldRef * bool /// Information about an extension member held in the name resolution environment -type ExtensionMember = +type ExtensionMember = /// F#-style Extrinsic extension member, defined in F# code | FSExtMem of ValRef * ExtensionMethodPriority @@ -282,97 +282,97 @@ type ExtensionMember = | ILExtMem of TyconRef * MethInfo * ExtensionMethodPriority /// Check if two extension members refer to the same definition - static member Equality g e1 e2 = - match e1, e2 with - | FSExtMem (vref1,_), FSExtMem (vref2,_) -> valRefEq g vref1 vref2 - | ILExtMem (_,md1,_), ILExtMem (_,md2,_) -> MethInfo.MethInfosUseIdenticalDefinitions md1 md2 + static member Equality g e1 e2 = + match e1, e2 with + | FSExtMem (vref1, _), FSExtMem (vref2, _) -> valRefEq g vref1 vref2 + | ILExtMem (_, md1, _), ILExtMem (_, md2, _) -> MethInfo.MethInfosUseIdenticalDefinitions md1 md2 | _ -> false static member Hash e1 = match e1 with | FSExtMem(vref, _) -> valRefHash vref - | ILExtMem(_, m, _) -> + | ILExtMem(_, m, _) -> match m with | ILMeth(_, ilmeth, _) -> LanguagePrimitives.PhysicalHash ilmeth.RawMetadata | FSMeth(_, _, vref, _) -> valRefHash vref | _ -> 0 - + static member Comparer g = HashIdentity.FromFunctions ExtensionMember.Hash (ExtensionMember.Equality g) - + /// Describes the sequence order of the introduction of an extension method. Extension methods that are introduced /// later through 'open' get priority in overload resolution. - member x.Priority = - match x with - | FSExtMem (_,pri) -> pri - | ILExtMem (_,_,pri) -> pri - -type FullyQualifiedFlag = + member x.Priority = + match x with + | FSExtMem (_, pri) -> pri + | ILExtMem (_, _, pri) -> pri + +type FullyQualifiedFlag = /// Only resolve full paths - | FullyQualified + | FullyQualified /// Resolve any paths accessible via 'open' - | OpenQualified + | OpenQualified [] /// The environment of information used to resolve names type NameResolutionEnv = - { /// Display environment information for output - eDisplayEnv: DisplayEnv + { /// Display environment information for output + eDisplayEnv: DisplayEnv - /// Values and Data Tags available by unqualified name - eUnqualifiedItems: LayeredMap + /// Values and Data Tags available by unqualified name + eUnqualifiedItems: LayeredMap - /// Data Tags and Active Pattern Tags available by unqualified name + /// Data Tags and Active Pattern Tags available by unqualified name ePatItems: NameMap - /// Modules accessible via "." notation. Note this is a multi-map. - /// Adding a module abbreviation adds it a local entry to this List.map. - /// Likewise adding a ccu or opening a path adds entries to this List.map. - - + /// Modules accessible via "." notation. Note this is a multi-map. + /// Adding a module abbreviation adds it a local entry to this List.map. + /// Likewise adding a ccu or opening a path adds entries to this List.map. + + /// REVIEW (old comment) - /// "The boolean flag is means the namespace or module entry shouldn't 'really' be in the - /// map, and if it is ever used to resolve a name then we give a warning. - /// This is used to give warnings on unqualified namespace accesses, e.g. - /// open System - /// open Collections <--- give a warning - /// let v = new Collections.Generic.List() <--- give a warning" - + /// "The boolean flag is means the namespace or module entry shouldn't 'really' be in the + /// map, and if it is ever used to resolve a name then we give a warning. + /// This is used to give warnings on unqualified namespace accesses, e.g. + /// open System + /// open Collections <--- give a warning + /// let v = new Collections.Generic.List() <--- give a warning" + eModulesAndNamespaces: NameMultiMap - - /// Fully qualified modules and namespaces. 'open' does not change this. + + /// Fully qualified modules and namespaces. 'open' does not change this. eFullyQualifiedModulesAndNamespaces: NameMultiMap - - /// 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 + + /// RecdField labels in scope. RecdField labels are those where type are inferred + /// by label rather than by known type annotation. + /// Bools indicate if from a record, where no warning is given on indeterminate lookup eFieldLabels: NameMultiMap - /// 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 - eTyconsByAccessNames: LayeredMultiMap + /// 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 + eTyconsByAccessNames: LayeredMultiMap - eFullyQualifiedTyconsByAccessNames: LayeredMultiMap + eFullyQualifiedTyconsByAccessNames: LayeredMultiMap - /// Tycons available by unqualified, demangled names (i.e. (List,1) --> TyconRef) - eTyconsByDemangledNameAndArity: LayeredMap + /// Tycons available by unqualified, demangled names (i.e. (List, 1) --> TyconRef) + eTyconsByDemangledNameAndArity: LayeredMap - /// Tycons available by unqualified, demangled names (i.e. (List,1) --> TyconRef) - eFullyQualifiedTyconsByDemangledNameAndArity: LayeredMap + /// Tycons available by unqualified, demangled names (i.e. (List, 1) --> TyconRef) + eFullyQualifiedTyconsByDemangledNameAndArity: LayeredMap - /// Extension members by type and name + /// Extension members by type and name eIndexedExtensionMembers: TyconRefMultiMap /// Other extension members unindexed by type eUnindexedExtensionMembers: ExtensionMember list - /// Typars (always available by unqualified names). Further typars can be - /// in the tpenv, a structure folded through each top-level definition. + /// Typars (always available by unqualified names). Further typars can be + /// in the tpenv, a structure folded through each top-level definition. eTypars: NameMap - } + } /// The initial, empty name resolution environment. The mother of all things. static member Empty g = @@ -395,46 +395,46 @@ type NameResolutionEnv = member nenv.FindUnqualifiedItem nm = nenv.eUnqualifiedItems.[nm] /// Get the table of types, indexed by name and arity - member nenv.TyconsByDemangledNameAndArity fq = - match fq with + member nenv.TyconsByDemangledNameAndArity fq = + match fq with | FullyQualified -> nenv.eFullyQualifiedTyconsByDemangledNameAndArity | OpenQualified -> nenv.eTyconsByDemangledNameAndArity - /// Get the table of types, indexed by name - member nenv.TyconsByAccessNames fq = - match fq with + /// Get the table of types, indexed by name + member nenv.TyconsByAccessNames fq = + match fq with | FullyQualified -> nenv.eFullyQualifiedTyconsByAccessNames | OpenQualified -> nenv.eTyconsByAccessNames /// Get the table of modules and namespaces - member nenv.ModulesAndNamespaces fq = - match fq with - | FullyQualified -> nenv.eFullyQualifiedModulesAndNamespaces - | OpenQualified -> nenv.eModulesAndNamespaces + member nenv.ModulesAndNamespaces fq = + match fq with + | FullyQualified -> nenv.eFullyQualifiedModulesAndNamespaces + | OpenQualified -> nenv.eModulesAndNamespaces //------------------------------------------------------------------------- // Helpers to do with extension members -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- -/// Allocate the next extension method priority. This is an incrementing sequence of integers +/// Allocate the next extension method priority. This is an incrementing sequence of integers /// during type checking. let NextExtensionMethodPriority() = uint64 (newStamp()) /// Get the info for all the .NET-style extension members listed as static members in the type. -let private GetCSharpStyleIndexedExtensionMembersForTyconRef (amap:Import.ImportMap) m (tcrefOfStaticClass:TyconRef) = +let private GetCSharpStyleIndexedExtensionMembersForTyconRef (amap: Import.ImportMap) m (tcrefOfStaticClass: TyconRef) = let g = amap.g // Type must be non-generic and have 'Extension' attribute if isNil(tcrefOfStaticClass.Typars(m)) && TyconRefHasAttribute g m g.attrib_ExtensionAttribute tcrefOfStaticClass then let pri = NextExtensionMethodPriority() let ty = generalizedTyconRef tcrefOfStaticClass - + // Get the 'plain' methods, not interpreted as extension methods let minfos = GetImmediateIntrinsicMethInfosOfType (None, AccessorDomain.AccessibleFromSomeFSharpCode) g amap m ty [ for minfo in minfos do // Method must be static, have 'Extension' attribute, must not be curried, must have at least one argument - if not minfo.IsInstance && - not minfo.IsExtensionMember && - (match minfo.NumArgs with [x] when x >= 1 -> true | _ -> false) && + if not minfo.IsInstance && + not minfo.IsExtensionMember && + (match minfo.NumArgs with [x] when x >= 1 -> true | _ -> false) && MethInfoHasAttribute g m g.attrib_ExtensionAttribute minfo then let ilExtMem = ILExtMem (tcrefOfStaticClass, minfo, pri) @@ -448,15 +448,15 @@ let private GetCSharpStyleIndexedExtensionMembersForTyconRef (amap:Import.Import // // We don't use the index for the IL extension method for tuple of F# function types (e.g. if extension // methods for tuple occur in C# code) - let thisTyconRef = - try - let rs = - match metadataOfTycon tcrefOfStaticClass.Deref, minfo with - | ILTypeMetadata (TILObjectReprData(scoref,_,_)), ILMeth(_,ILMethInfo(_,_,_,ilMethod,_),_) -> - match ilMethod.ParameterTypes with - | firstTy :: _ -> - match firstTy with - | ILType.Boxed tspec | ILType.Value tspec -> + let thisTyconRef = + try + let rs = + match metadataOfTycon tcrefOfStaticClass.Deref, minfo with + | ILTypeMetadata (TILObjectReprData(scoref, _, _)), ILMeth(_, ILMethInfo(_, _, _, ilMethod, _), _) -> + match ilMethod.ParameterTypes with + | firstTy :: _ -> + match firstTy with + | ILType.Boxed tspec | ILType.Value tspec -> let tref = (tspec |> rescopeILTypeSpec scoref).TypeRef if Import.CanImportILTypeRef amap m tref then let tcref = tref |> Import.ImportILTypeRef amap m @@ -465,14 +465,14 @@ let private GetCSharpStyleIndexedExtensionMembersForTyconRef (amap:Import.Import else None | _ -> None | _ -> None - | _ -> + | _ -> // The results are indexed by the TyconRef of the first 'this' argument, if any. // So we need to go and crack the type of the 'this' argument. - let thisTy = minfo.GetParamTypes(amap,m,generalizeTypars minfo.FormalMethodTypars).Head.Head + let thisTy = minfo.GetParamTypes(amap, m, generalizeTypars minfo.FormalMethodTypars).Head.Head match thisTy with | AppTy g (tcrefOfTypeExtended, _) when not (isByrefTy g thisTy) -> Some tcrefOfTypeExtended | _ -> None - + Some rs with e -> // Import of the ILType may fail, if so report the error and skip on @@ -484,48 +484,48 @@ let private GetCSharpStyleIndexedExtensionMembersForTyconRef (amap:Import.Import | Some (Some tcref) -> yield Choice1Of2(tcref, ilExtMem) | Some None -> yield Choice2Of2 ilExtMem ] else - [] + [] //------------------------------------------------------------------------- // Helpers to do with building environments -//------------------------------------------------------------------------- - -/// For the operations that build the overall name resolution -/// tables, BulkAdd.Yes is set to true when "opening" a -/// namespace. If BulkAdd is true then add-and-collapse -/// is used for the backing maps.Multiple "open" operations are -/// thus coalesced, and the first subsequent lookup after a sequence -/// of opens will collapse the maps and build the backing dictionary. +//------------------------------------------------------------------------- + +/// For the operations that build the overall name resolution +/// tables, BulkAdd.Yes is set to true when "opening" a +/// namespace. If BulkAdd is true then add-and-collapse +/// is used for the backing maps.Multiple "open" operations are +/// thus coalesced, and the first subsequent lookup after a sequence +/// of opens will collapse the maps and build the backing dictionary. [] type BulkAdd = Yes | No /// bulkAddMode: true when adding the values from the 'open' of a namespace /// or module, when we collapse the value table down to a dictionary. -let AddValRefsToItems (bulkAddMode: BulkAdd) (eUnqualifiedItems: LayeredMap<_,_>) (vrefs:ValRef[]) = - // Object model members are not added to the unqualified name resolution environment +let AddValRefsToItems (bulkAddMode: BulkAdd) (eUnqualifiedItems: LayeredMap<_, _>) (vrefs: ValRef[]) = + // Object model members are not added to the unqualified name resolution environment let vrefs = vrefs |> Array.filter (fun vref -> not vref.IsMember) if vrefs.Length = 0 then eUnqualifiedItems else - match bulkAddMode with - | BulkAdd.Yes -> + match bulkAddMode with + | BulkAdd.Yes -> eUnqualifiedItems.AddAndMarkAsCollapsible(vrefs |> Array.map (fun vref -> KeyValuePair(vref.LogicalName, Item.Value vref))) - | BulkAdd.No -> + | BulkAdd.No -> assert (vrefs.Length = 1) let vref = vrefs.[0] - eUnqualifiedItems.Add (vref.LogicalName, Item.Value vref) + eUnqualifiedItems.Add (vref.LogicalName, Item.Value vref) /// Add an F# value to the table of available extension members, if necessary, as an FSharp-style extension member -let AddValRefToExtensionMembers pri (eIndexedExtensionMembers: TyconRefMultiMap<_>) (vref:ValRef) = +let AddValRefToExtensionMembers pri (eIndexedExtensionMembers: TyconRefMultiMap<_>) (vref: ValRef) = if vref.IsMember && vref.IsExtensionMember then - eIndexedExtensionMembers.Add (vref.MemberApparentEntity, FSExtMem (vref,pri)) + eIndexedExtensionMembers.Add (vref.MemberApparentEntity, FSExtMem (vref, pri)) else eIndexedExtensionMembers -/// This entrypoint is used to add some extra items to the environment for Visual Studio, e.g. static members +/// This entrypoint is used to add some extra items to the environment for Visual Studio, e.g. static members let AddFakeNamedValRefToNameEnv nm nenv vref = {nenv with eUnqualifiedItems = nenv.eUnqualifiedItems.Add (nm, Item.Value vref) } @@ -534,16 +534,16 @@ let AddFakeNameToNameEnv nm nenv item = {nenv with eUnqualifiedItems = nenv.eUnqualifiedItems.Add (nm, item) } /// Add an F# value to the table of available active patterns -let AddValRefsToActivePatternsNameEnv ePatItems (vref:ValRef) = - let ePatItems = - (ActivePatternElemsOfValRef vref, ePatItems) - ||> List.foldBack (fun apref tab -> +let AddValRefsToActivePatternsNameEnv ePatItems (vref: ValRef) = + let ePatItems = + (ActivePatternElemsOfValRef vref, ePatItems) + ||> List.foldBack (fun apref tab -> NameMap.add apref.Name (Item.ActivePatternCase apref) tab) - // Add literal constants to the environment available for resolving items in patterns - let ePatItems = - match vref.LiteralValue with - | None -> ePatItems + // Add literal constants to the environment available for resolving items in patterns + let ePatItems = + match vref.LiteralValue with + | None -> ePatItems | Some _ -> NameMap.add vref.LogicalName (Item.Value vref) ePatItems ePatItems @@ -551,18 +551,18 @@ let AddValRefsToActivePatternsNameEnv ePatItems (vref:ValRef) = /// Add a set of F# values to the environment. let AddValRefsToNameEnvWithPriority bulkAddMode pri nenv (vrefs: ValRef []) = if vrefs.Length = 0 then nenv else - { nenv with + { nenv with eUnqualifiedItems = AddValRefsToItems bulkAddMode nenv.eUnqualifiedItems vrefs - eIndexedExtensionMembers = (nenv.eIndexedExtensionMembers,vrefs) ||> Array.fold (AddValRefToExtensionMembers pri) - ePatItems = (nenv.ePatItems,vrefs) ||> Array.fold AddValRefsToActivePatternsNameEnv } + eIndexedExtensionMembers = (nenv.eIndexedExtensionMembers, vrefs) ||> Array.fold (AddValRefToExtensionMembers pri) + ePatItems = (nenv.ePatItems, vrefs) ||> Array.fold AddValRefsToActivePatternsNameEnv } /// Add a single F# value to the environment. -let AddValRefToNameEnv nenv (vref:ValRef) = +let AddValRefToNameEnv nenv (vref: ValRef) = let pri = NextExtensionMethodPriority() - { nenv with - eUnqualifiedItems = - if not vref.IsMember then - nenv.eUnqualifiedItems.Add (vref.LogicalName, Item.Value vref) + { nenv with + eUnqualifiedItems = + if not vref.IsMember then + nenv.eUnqualifiedItems.Add (vref.LogicalName, Item.Value vref) else nenv.eUnqualifiedItems eIndexedExtensionMembers = AddValRefToExtensionMembers pri nenv.eIndexedExtensionMembers vref @@ -574,166 +574,166 @@ let AddActivePatternResultTagsToNameEnv (apinfo: PrettyNaming.ActivePatternInfo) if List.isEmpty apinfo.Names then nenv else let apresl = List.indexed apinfo.Names { nenv with - eUnqualifiedItems = - (apresl,nenv.eUnqualifiedItems) - ||> List.foldBack (fun (j,nm) acc -> acc.Add(nm, Item.ActivePatternResult(apinfo,ty,j,m))) } + eUnqualifiedItems = + (apresl, nenv.eUnqualifiedItems) + ||> List.foldBack (fun (j, nm) acc -> acc.Add(nm, Item.ActivePatternResult(apinfo, ty, j, m))) } /// Generalize a union case, from Cons --> List.Cons -let GeneralizeUnionCaseRef (ucref:UnionCaseRef) = +let GeneralizeUnionCaseRef (ucref: UnionCaseRef) = UnionCaseInfo (fst (generalizeTyconRef ucref.TyconRef), ucref) - - + + /// Add type definitions to the sub-table of the environment indexed by name and arity -let AddTyconsByDemangledNameAndArity (bulkAddMode: BulkAdd) (tcrefs: TyconRef[]) (tab: LayeredMap) = +let AddTyconsByDemangledNameAndArity (bulkAddMode: BulkAdd) (tcrefs: TyconRef[]) (tab: LayeredMap) = if tcrefs.Length = 0 then tab else - let entries = - tcrefs + let entries = + tcrefs |> Array.map (fun tcref -> KeyTyconByDemangledNameAndArity tcref.LogicalName tcref.TyparsNoRange tcref) match bulkAddMode with | BulkAdd.Yes -> tab.AddAndMarkAsCollapsible entries - | BulkAdd.No -> (tab,entries) ||> Array.fold (fun tab (KeyValue(k,v)) -> tab.Add(k,v)) + | BulkAdd.No -> (tab, entries) ||> Array.fold (fun tab (KeyValue(k, v)) -> tab.Add(k, v)) -/// Add type definitions to the sub-table of the environment indexed by access name -let AddTyconByAccessNames bulkAddMode (tcrefs:TyconRef[]) (tab: LayeredMultiMap) = +/// Add type definitions to the sub-table of the environment indexed by access name +let AddTyconByAccessNames bulkAddMode (tcrefs: TyconRef[]) (tab: LayeredMultiMap) = if tcrefs.Length = 0 then tab else - let entries = + let entries = tcrefs |> Array.collect (fun tcref -> KeyTyconByAccessNames tcref.LogicalName tcref) match bulkAddMode with | BulkAdd.Yes -> tab.AddAndMarkAsCollapsible entries - | BulkAdd.No -> (tab,entries) ||> Array.fold (fun tab (KeyValue(k,v)) -> tab.Add (k,v)) + | BulkAdd.No -> (tab, entries) ||> Array.fold (fun tab (KeyValue(k, v)) -> tab.Add (k, v)) -/// Add a record field to the corresponding sub-table of the name resolution environment -let AddRecdField (rfref:RecdFieldRef) tab = NameMultiMap.add rfref.FieldName rfref tab +/// Add a record field to the corresponding sub-table of the name resolution environment +let AddRecdField (rfref: RecdFieldRef) tab = NameMultiMap.add rfref.FieldName rfref tab -/// Add a set of union cases to the corresponding sub-table of the environment -let AddUnionCases1 (tab:Map<_,_>) (ucrefs:UnionCaseRef list) = - (tab, ucrefs) ||> List.fold (fun acc ucref -> - let item = Item.UnionCase(GeneralizeUnionCaseRef ucref,false) +/// Add a set of union cases to the corresponding sub-table of the environment +let AddUnionCases1 (tab: Map<_, _>) (ucrefs: UnionCaseRef list) = + (tab, ucrefs) ||> List.fold (fun acc ucref -> + let item = Item.UnionCase(GeneralizeUnionCaseRef ucref, false) acc.Add (ucref.CaseName, item)) -/// Add a set of union cases to the corresponding sub-table of the environment -let AddUnionCases2 bulkAddMode (eUnqualifiedItems: LayeredMap<_,_>) (ucrefs :UnionCaseRef list) = - match bulkAddMode with - | BulkAdd.Yes -> - let items = - ucrefs |> Array.ofList |> Array.map (fun ucref -> - let item = Item.UnionCase(GeneralizeUnionCaseRef ucref,false) - KeyValuePair(ucref.CaseName,item)) +/// Add a set of union cases to the corresponding sub-table of the environment +let AddUnionCases2 bulkAddMode (eUnqualifiedItems: LayeredMap<_, _>) (ucrefs: UnionCaseRef list) = + match bulkAddMode with + | BulkAdd.Yes -> + let items = + ucrefs |> Array.ofList |> Array.map (fun ucref -> + let item = Item.UnionCase(GeneralizeUnionCaseRef ucref, false) + KeyValuePair(ucref.CaseName, item)) eUnqualifiedItems.AddAndMarkAsCollapsible items - | BulkAdd.No -> - (eUnqualifiedItems,ucrefs) ||> List.fold (fun acc ucref -> - let item = Item.UnionCase(GeneralizeUnionCaseRef ucref,false) + | BulkAdd.No -> + (eUnqualifiedItems, ucrefs) ||> List.fold (fun acc ucref -> + let item = Item.UnionCase(GeneralizeUnionCaseRef ucref, false) acc.Add (ucref.CaseName, item)) /// Add any implied contents of a type definition to the environment. -let private AddPartsOfTyconRefToNameEnv bulkAddMode ownDefinition (g:TcGlobals) amap m nenv (tcref:TyconRef) = +let private AddPartsOfTyconRefToNameEnv bulkAddMode ownDefinition (g: TcGlobals) amap m nenv (tcref: TyconRef) = let isIL = tcref.IsILTycon - let ucrefs = if isIL then [] else tcref.UnionCasesAsList |> List.map tcref.MakeNestedUnionCaseRef + let ucrefs = if isIL then [] else tcref.UnionCasesAsList |> List.map tcref.MakeNestedUnionCaseRef let flds = if isIL then [| |] else tcref.AllFieldsArray - let eIndexedExtensionMembers, eUnindexedExtensionMembers = - let ilStyleExtensionMeths = GetCSharpStyleIndexedExtensionMembersForTyconRef amap m tcref - ((nenv.eIndexedExtensionMembers,nenv.eUnindexedExtensionMembers),ilStyleExtensionMeths) ||> List.fold (fun (tab1,tab2) extMemInfo -> - match extMemInfo with - | Choice1Of2 (tcref,extMemInfo) -> tab1.Add (tcref, extMemInfo), tab2 - | Choice2Of2 extMemInfo -> tab1, extMemInfo :: tab2) + let eIndexedExtensionMembers, eUnindexedExtensionMembers = + let ilStyleExtensionMeths = GetCSharpStyleIndexedExtensionMembersForTyconRef amap m tcref + ((nenv.eIndexedExtensionMembers, nenv.eUnindexedExtensionMembers), ilStyleExtensionMeths) ||> List.fold (fun (tab1, tab2) extMemInfo -> + match extMemInfo with + | Choice1Of2 (tcref, extMemInfo) -> tab1.Add (tcref, extMemInfo), tab2 + | Choice2Of2 extMemInfo -> tab1, extMemInfo :: tab2) let isILOrRequiredQualifiedAccess = isIL || (not ownDefinition && HasFSharpAttribute g g.attrib_RequireQualifiedAccessAttribute tcref.Attribs) - let eFieldLabels = - if isILOrRequiredQualifiedAccess || not tcref.IsRecordTycon || flds.Length = 0 then - nenv.eFieldLabels - else - (nenv.eFieldLabels,flds) ||> Array.fold (fun acc f -> - if f.IsStatic || f.IsCompilerGenerated then acc + let eFieldLabels = + if isILOrRequiredQualifiedAccess || not tcref.IsRecordTycon || flds.Length = 0 then + nenv.eFieldLabels + else + (nenv.eFieldLabels, flds) ||> Array.fold (fun acc f -> + if f.IsStatic || f.IsCompilerGenerated then acc else AddRecdField (tcref.MakeNestedRecdFieldRef f) acc) - - let eUnqualifiedItems = + + let eUnqualifiedItems = let tab = nenv.eUnqualifiedItems // add the type name for potential use as a constructor // The rules are - // - The unqualified lookup table in the environment can contain map names to a set of type names (the set of type names is a new kind of "item"). + // - The unqualified lookup table in the environment can contain map names to a set of type names (the set of type names is a new kind of "item"). // - When the contents of a type definition is added to the environment, an entry is added in this table for all class and struct types. - // - When opening a module, types are added first to the environment, then values, then auto-opened sub-modules. - // - When a value is added by an "open" previously available type names will become inaccessible by this table. - let tab = + // - When opening a module, types are added first to the environment, then values, then auto-opened sub-modules. + // - When a value is added by an "open" previously available type names will become inaccessible by this table. + let tab = // This may explore into an unreferenced assembly if the name // is a type abbreviation. If it does, assume the name does not // have a constructor. - let mayHaveConstruction = - protectAssemblyExploration - false - (fun () -> + let mayHaveConstruction = + protectAssemblyExploration + false + (fun () -> let ty = generalizedTyconRef tcref isClassTy g ty || isStructTy g ty) - if mayHaveConstruction then + if mayHaveConstruction then tab.LinearTryModifyThenLaterFlatten (tcref.DisplayName, (fun prev -> - match prev with + match prev with | Some (Item.UnqualifiedType tcrefs) -> Item.UnqualifiedType (tcref::tcrefs) | _ -> Item.UnqualifiedType [tcref])) else tab - if isILOrRequiredQualifiedAccess || List.isEmpty ucrefs then - tab - else + if isILOrRequiredQualifiedAccess || List.isEmpty ucrefs then + tab + else AddUnionCases2 bulkAddMode tab ucrefs - let ePatItems = - if isILOrRequiredQualifiedAccess || List.isEmpty ucrefs then - nenv.ePatItems - else + let ePatItems = + if isILOrRequiredQualifiedAccess || List.isEmpty ucrefs then + nenv.ePatItems + else AddUnionCases1 nenv.ePatItems ucrefs - { nenv with + { nenv with eFieldLabels = eFieldLabels eUnqualifiedItems = eUnqualifiedItems ePatItems = ePatItems - eIndexedExtensionMembers = eIndexedExtensionMembers + eIndexedExtensionMembers = eIndexedExtensionMembers eUnindexedExtensionMembers = eUnindexedExtensionMembers } -/// Add a set of type definitions to the name resolution environment +/// Add a set of type definitions to the name resolution environment let AddTyconRefsToNameEnv bulkAddMode ownDefinition g amap m root nenv tcrefs = if isNil tcrefs then nenv else let env = List.fold (AddPartsOfTyconRefToNameEnv bulkAddMode ownDefinition g amap m) nenv tcrefs // Add most of the contents of the tycons en-masse, then flatten the tables if we're opening a module or namespace let tcrefs = Array.ofList tcrefs { env with - eFullyQualifiedTyconsByDemangledNameAndArity = - if root then + eFullyQualifiedTyconsByDemangledNameAndArity = + if root then AddTyconsByDemangledNameAndArity bulkAddMode tcrefs nenv.eFullyQualifiedTyconsByDemangledNameAndArity - else + else nenv.eFullyQualifiedTyconsByDemangledNameAndArity - eFullyQualifiedTyconsByAccessNames = - if root then + eFullyQualifiedTyconsByAccessNames = + if root then AddTyconByAccessNames bulkAddMode tcrefs nenv.eFullyQualifiedTyconsByAccessNames else nenv.eFullyQualifiedTyconsByAccessNames - eTyconsByDemangledNameAndArity = - AddTyconsByDemangledNameAndArity bulkAddMode tcrefs nenv.eTyconsByDemangledNameAndArity - eTyconsByAccessNames = - AddTyconByAccessNames bulkAddMode tcrefs nenv.eTyconsByAccessNames } + eTyconsByDemangledNameAndArity = + AddTyconsByDemangledNameAndArity bulkAddMode tcrefs nenv.eTyconsByDemangledNameAndArity + eTyconsByAccessNames = + AddTyconByAccessNames bulkAddMode tcrefs nenv.eTyconsByAccessNames } -/// Add an F# exception definition to the name resolution environment -let AddExceptionDeclsToNameEnv bulkAddMode nenv (ecref:TyconRef) = +/// Add an F# exception definition to the name resolution environment +let AddExceptionDeclsToNameEnv bulkAddMode nenv (ecref: TyconRef) = assert ecref.IsExceptionDecl let item = Item.ExnCase ecref - {nenv with + {nenv with eUnqualifiedItems = - match bulkAddMode with - | BulkAdd.Yes -> + match bulkAddMode with + | BulkAdd.Yes -> nenv.eUnqualifiedItems.AddAndMarkAsCollapsible [| KeyValuePair(ecref.LogicalName, item) |] - | BulkAdd.No -> + | BulkAdd.No -> nenv.eUnqualifiedItems.Add (ecref.LogicalName, item) - + ePatItems = nenv.ePatItems.Add (ecref.LogicalName, item) } -/// Add a module abbreviation to the name resolution environment -let AddModuleAbbrevToNameEnv (id:Ident) nenv modrefs = +/// Add a module abbreviation to the name resolution environment +let AddModuleAbbrevToNameEnv (id: Ident) nenv modrefs = {nenv with eModulesAndNamespaces = let add old nw = nw @ old @@ -741,11 +741,11 @@ let AddModuleAbbrevToNameEnv (id:Ident) nenv modrefs = //------------------------------------------------------------------------- -// Open a structure or an IL namespace -//------------------------------------------------------------------------- +// Open a structure or an IL namespace +//------------------------------------------------------------------------- -let MakeNestedModuleRefs (modref: ModuleOrNamespaceRef) = - modref.ModuleOrNamespaceType.ModuleAndNamespaceDefinitions +let MakeNestedModuleRefs (modref: ModuleOrNamespaceRef) = + modref.ModuleOrNamespaceType.ModuleAndNamespaceDefinitions |> List.map modref.NestedTyconRef /// Add a set of module or namespace to the name resolution environment, including any sub-modules marked 'AutoOpen' @@ -754,58 +754,58 @@ let MakeNestedModuleRefs (modref: ModuleOrNamespaceRef) = let rec AddModuleOrNamespaceRefsToNameEnv g amap m root ad nenv (modrefs: ModuleOrNamespaceRef list) = if isNil modrefs then nenv else let modrefsMap = modrefs |> NameMap.ofKeyedList (fun modref -> modref.DemangledModuleOrNamespaceName) - let addModrefs tab = - let add old nw = - if IsEntityAccessible amap m ad nw then + let addModrefs tab = + let add old nw = + if IsEntityAccessible amap m ad nw then nw :: old - else + else old NameMap.layerAdditive add modrefsMap tab - let nenv = + let nenv = {nenv with eModulesAndNamespaces = addModrefs nenv.eModulesAndNamespaces eFullyQualifiedModulesAndNamespaces = - if root then + if root then addModrefs nenv.eFullyQualifiedModulesAndNamespaces - else - nenv.eFullyQualifiedModulesAndNamespaces } - let nenv = - (nenv,modrefs) ||> List.fold (fun nenv modref -> + else + nenv.eFullyQualifiedModulesAndNamespaces } + let nenv = + (nenv, modrefs) ||> List.fold (fun nenv modref -> if modref.IsModule && TryFindFSharpBoolAttribute g g.attrib_AutoOpenAttribute modref.Attribs = Some true then - AddModuleOrNamespaceContentsToNameEnv g amap ad m false nenv modref + AddModuleOrNamespaceContentsToNameEnv g amap ad m false nenv modref else nenv) nenv /// Add the contents of a module or namespace to the name resolution environment -and AddModuleOrNamespaceContentsToNameEnv (g:TcGlobals) amap (ad:AccessorDomain) m root nenv (modref:ModuleOrNamespaceRef) = +and AddModuleOrNamespaceContentsToNameEnv (g: TcGlobals) amap (ad: AccessorDomain) m root nenv (modref: ModuleOrNamespaceRef) = let pri = NextExtensionMethodPriority() let mty = modref.ModuleOrNamespaceType - + let nenv = let mutable state = { nenv with eDisplayEnv = nenv.eDisplayEnv.AddOpenModuleOrNamespace modref } - + for exnc in mty.ExceptionDefinitions do let tcref = modref.NestedTyconRef exnc - if IsEntityAccessible amap m ad tcref then + if IsEntityAccessible amap m ad tcref then state <- AddExceptionDeclsToNameEnv BulkAdd.Yes state tcref state - let tcrefs = - mty.TypeAndExceptionDefinitions - |> List.choose (fun tycon -> + let tcrefs = + mty.TypeAndExceptionDefinitions + |> List.choose (fun tycon -> let tcref = modref.NestedTyconRef tycon if IsEntityAccessible amap m ad tcref then Some(tcref) else None) - let nenv = (nenv,tcrefs) ||> AddTyconRefsToNameEnv BulkAdd.Yes false g amap m false - let vrefs = - mty.AllValsAndMembers.ToList() + let nenv = (nenv, tcrefs) ||> AddTyconRefsToNameEnv BulkAdd.Yes false g amap m false + let vrefs = + mty.AllValsAndMembers.ToList() |> List.choose (fun x -> if IsAccessible ad x.Accessibility then TryMkValRefInModRef modref x else None) |> List.toArray let nenv = AddValRefsToNameEnvWithPriority BulkAdd.Yes pri nenv vrefs let nestedModules = MakeNestedModuleRefs modref - let nenv = (nenv,nestedModules) ||> AddModuleOrNamespaceRefsToNameEnv g amap m root ad + let nenv = (nenv, nestedModules) ||> AddModuleOrNamespaceRefsToNameEnv g amap m root ad nenv /// Add a set of modules or namespaces to the name resolution environment @@ -814,58 +814,58 @@ and AddModuleOrNamespaceContentsToNameEnv (g:TcGlobals) amap (ad:AccessorDomain) // module M1 = ... // M1a // module M1 = ... // M1b // open M1 -// +// // The list contains [M1b; M1a] and AddModulesAndNamespacesContentsToNameEnv g amap ad m root nenv modrefs = (modrefs, nenv) ||> List.foldBack (fun modref acc -> AddModuleOrNamespaceContentsToNameEnv g amap ad m root acc modref) /// Add a single modules or namespace to the name resolution environment -let AddModuleOrNamespaceRefToNameEnv g amap m root ad nenv (modref:EntityRef) = - AddModuleOrNamespaceRefsToNameEnv g amap m root ad nenv [modref] +let AddModuleOrNamespaceRefToNameEnv g amap m root ad nenv (modref: EntityRef) = + AddModuleOrNamespaceRefsToNameEnv g amap m root ad nenv [modref] + - /// A flag which indicates if it is an error to have two declared type parameters with identical names /// in the name resolution environment. -type CheckForDuplicateTyparFlag = - | CheckForDuplicateTypars +type CheckForDuplicateTyparFlag = + | CheckForDuplicateTypars | NoCheckForDuplicateTypars /// Add some declared type parameters to the name resolution environment -let AddDeclaredTyparsToNameEnv check nenv typars = - let typarmap = - List.foldBack - (fun (tp:Typar) sofar -> +let AddDeclaredTyparsToNameEnv check nenv typars = + let typarmap = + List.foldBack + (fun (tp: Typar) sofar -> match check with - | CheckForDuplicateTypars -> - if Map.containsKey tp.Name sofar then - errorR (Duplicate("type parameter",tp.DisplayName,tp.Range)) + | CheckForDuplicateTypars -> + if Map.containsKey tp.Name sofar then + errorR (Duplicate("type parameter", tp.DisplayName, tp.Range)) | NoCheckForDuplicateTypars -> () - Map.add tp.Name tp sofar) typars Map.empty + Map.add tp.Name tp sofar) typars Map.empty {nenv with eTypars = NameMap.layer typarmap nenv.eTypars } //------------------------------------------------------------------------- // Generating fresh instantiations for type inference. -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- /// Convert a reference to a named type into a type that includes /// a fresh set of inference type variables for the type parameters of the union type. -let FreshenTycon (ncenv: NameResolver) m (tcref:TyconRef) = +let FreshenTycon (ncenv: NameResolver) m (tcref: TyconRef) = let tinst = ncenv.InstantiationGenerator m (tcref.Typars m) let improvedTy = ncenv.g.decompileType tcref tinst improvedTy /// Convert a reference to a union case into a UnionCaseInfo that includes /// a fresh set of inference type variables for the type parameters of the union type. -let FreshenUnionCaseRef (ncenv: NameResolver) m (ucref:UnionCaseRef) = +let FreshenUnionCaseRef (ncenv: NameResolver) m (ucref: UnionCaseRef) = let tinst = ncenv.InstantiationGenerator m (ucref.TyconRef.Typars m) - UnionCaseInfo(tinst,ucref) + UnionCaseInfo(tinst, ucref) /// This must be called after fetching unqualified items that may need to be freshened -let FreshenUnqualifiedItem (ncenv: NameResolver) m res = - match res with - | Item.UnionCase(UnionCaseInfo(_,ucref),_) -> Item.UnionCase(FreshenUnionCaseRef ncenv m ucref,false) +let FreshenUnqualifiedItem (ncenv: NameResolver) m res = + match res with + | Item.UnionCase(UnionCaseInfo(_, ucref), _) -> Item.UnionCase(FreshenUnionCaseRef ncenv m ucref, false) | _ -> res @@ -875,39 +875,39 @@ let FreshenUnqualifiedItem (ncenv: NameResolver) m res = // define some ways of combining multiple results and for carrying // error information. Errors are generally undefined names and are // reported by returning the error that occurs at greatest depth in the -// sequence of Identifiers. -//------------------------------------------------------------------------- - -// Accumulate a set of possible results. -// If neither operations succeed, return an approximate error. -// If one succeeds, return that one. -// Prefer the error associated with the first argument. -let OneResult res = - match res with +// sequence of Identifiers. +//------------------------------------------------------------------------- + +// Accumulate a set of possible results. +// If neither operations succeed, return an approximate error. +// If one succeeds, return that one. +// Prefer the error associated with the first argument. +let OneResult res = + match res with | Result x -> Result [x] | Exception e -> Exception e let OneSuccess x = Result [x] let AddResults res1 res2 = - match res1, res2 with - | Result [],_ -> res2 - | _,Result [] -> res1 - | Result x,Result l -> Result (x @ l) - | Exception _,Result l -> Result l - | Result x,Exception _ -> Result x + match res1, res2 with + | Result [], _ -> res2 + | _, Result [] -> res1 + | Result x, Result l -> Result (x @ l) + | Exception _, Result l -> Result l + | Result x, Exception _ -> Result x // If we have error messages for the same symbol, then we can merge suggestions. - | Exception (UndefinedName(n1,f,id1,suggestions1)),Exception (UndefinedName(n2,_,id2,suggestions2)) when n1 = n2 && id1.idText = id2.idText && id1.idRange = id2.idRange -> + | Exception (UndefinedName(n1, f, id1, suggestions1)), Exception (UndefinedName(n2, _, id2, suggestions2)) when n1 = n2 && id1.idText = id2.idText && id1.idRange = id2.idRange -> let suggestions = HashSet(suggestions1()) suggestions.UnionWith(suggestions2()) - Exception(UndefinedName(n1,f,id1,fun () -> suggestions)) - // This prefers error messages coming from deeper failing long identifier paths - | Exception (UndefinedName(n1,_,_,_) as e1),Exception (UndefinedName(n2,_,_,_) as e2) -> + Exception(UndefinedName(n1, f, id1, fun () -> suggestions)) + // This prefers error messages coming from deeper failing long identifier paths + | Exception (UndefinedName(n1, _, _, _) as e1), Exception (UndefinedName(n2, _, _, _) as e2) -> if n1 < n2 then Exception e2 else Exception e1 - // Prefer more concrete errors about things being undefined - | Exception (UndefinedName _ as e1),Exception (Error _) -> Exception e1 - | Exception (Error _),Exception (UndefinedName _ as e2) -> Exception e2 - | Exception e1,Exception _ -> Exception e1 + // Prefer more concrete errors about things being undefined + | Exception (UndefinedName _ as e1), Exception (Error _) -> Exception e1 + | Exception (Error _), Exception (UndefinedName _ as e2) -> Exception e2 + | Exception e1, Exception _ -> Exception e1 let NoResultsOrUsefulErrors = Result [] @@ -930,7 +930,7 @@ let rec CollectAtMostOneResult f = function | Result r -> Result [r] | Exception e -> AddResults (Exception e) (CollectAtMostOneResult f t) -let CollectResults2 resultCollectionSettings f = +let CollectResults2 resultCollectionSettings f = match resultCollectionSettings with | ResultCollectionSettings.AtMostOneResult -> CollectAtMostOneResult f | _ -> CollectResults f @@ -939,10 +939,10 @@ let MapResults f = function | Result xs -> Result (List.map f xs) | Exception err -> Exception err -let AtMostOneResult m res = - match res with +let AtMostOneResult m res = + match res with | Exception err -> raze err - | Result [] -> raze (Error(FSComp.SR.nrInvalidModuleExprType(),m)) + | Result [] -> raze (Error(FSComp.SR.nrInvalidModuleExprType(), m)) | Result (res :: _) -> success res let AtMostOneResultQuery query2 res1 = @@ -955,22 +955,22 @@ let inline (+++) res1 query2 = AtMostOneResultQuery query2 res1 //------------------------------------------------------------------------- // TypeNameResolutionInfo -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- /// Indicates whether we are resolving type names to type definitions or to constructor methods. -type TypeNameResolutionFlag = - | ResolveTypeNamesToCtors +type TypeNameResolutionFlag = + | ResolveTypeNamesToCtors | ResolveTypeNamesToTypeRefs [] [] -/// Represents information about the generic argument count of a type name when resolving it. +/// 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. -type TypeNameResolutionStaticArgsInfo = +type TypeNameResolutionStaticArgsInfo = /// Indicates indefinite knowledge of type arguments - | Indefinite + | Indefinite /// Indicates definite knowledge of type arguments | Definite of int @@ -984,69 +984,69 @@ type TypeNameResolutionStaticArgsInfo = member x.NumStaticArgs = match x with TypeNameResolutionStaticArgsInfo.Indefinite -> 0 | TypeNameResolutionStaticArgsInfo.Definite n -> n // Get the first possible mangled name of the type, assuming the args are generic args - member x.MangledNameForType nm = + member x.MangledNameForType nm = if x.NumStaticArgs = 0 || TryDemangleGenericNameAndPos nm <> ValueNone then nm else nm + "`" + string x.NumStaticArgs [] /// Represents information which guides name resolution of types. -type TypeNameResolutionInfo = +type TypeNameResolutionInfo = | TypeNameResolutionInfo of TypeNameResolutionFlag * TypeNameResolutionStaticArgsInfo - static member Default = TypeNameResolutionInfo (ResolveTypeNamesToCtors,TypeNameResolutionStaticArgsInfo.Indefinite) - static member ResolveToTypeRefs statResInfo = TypeNameResolutionInfo (ResolveTypeNamesToTypeRefs,statResInfo) - member x.StaticArgsInfo = match x with TypeNameResolutionInfo(_,staticResInfo) -> staticResInfo - member x.ResolutionFlag = match x with TypeNameResolutionInfo(flag,_) -> flag - member x.DropStaticArgsInfo = match x with TypeNameResolutionInfo(flag2,_) -> TypeNameResolutionInfo(flag2,TypeNameResolutionStaticArgsInfo.Indefinite) + static member Default = TypeNameResolutionInfo (ResolveTypeNamesToCtors, TypeNameResolutionStaticArgsInfo.Indefinite) + static member ResolveToTypeRefs statResInfo = TypeNameResolutionInfo (ResolveTypeNamesToTypeRefs, statResInfo) + member x.StaticArgsInfo = match x with TypeNameResolutionInfo(_, staticResInfo) -> staticResInfo + member x.ResolutionFlag = match x with TypeNameResolutionInfo(flag, _) -> flag + member x.DropStaticArgsInfo = match x with TypeNameResolutionInfo(flag2, _) -> TypeNameResolutionInfo(flag2, TypeNameResolutionStaticArgsInfo.Indefinite) //------------------------------------------------------------------------- -// Resolve (possibly mangled) type names -//------------------------------------------------------------------------- - -/// Qualified lookups of type names where the number of generic arguments is known -/// from context, e.g. Module.Type. The full names suh as ``List`1`` can -/// be used to qualify access if needed -let LookupTypeNameInEntityHaveArity nm (staticResInfo: TypeNameResolutionStaticArgsInfo) (mty:ModuleOrNamespaceType) = +// Resolve (possibly mangled) type names +//------------------------------------------------------------------------- + +/// Qualified lookups of type names where the number of generic arguments is known +/// from context, e.g. Module.Type. The full names suh as ``List`1`` can +/// be used to qualify access if needed +let LookupTypeNameInEntityHaveArity nm (staticResInfo: TypeNameResolutionStaticArgsInfo) (mty: ModuleOrNamespaceType) = let attempt1 = mty.TypesByMangledName.TryFind (staticResInfo.MangledNameForType nm) match attempt1 with | None -> mty.TypesByMangledName.TryFind nm | _ -> attempt1 -/// Unqualified lookups of type names where the number of generic arguments is known +/// Unqualified lookups of type names where the number of generic arguments is known /// from context, e.g. List. Rebindings due to 'open' may have rebound identifiers. -let LookupTypeNameInEnvHaveArity fq nm numTyArgs (nenv:NameResolutionEnv) = +let LookupTypeNameInEnvHaveArity fq nm numTyArgs (nenv: NameResolutionEnv) = let key = match TryDemangleGenericNameAndPos nm with | ValueSome pos -> DecodeGenericTypeName pos nm - | _ -> NameArityPair(nm,numTyArgs) + | _ -> NameArityPair(nm, numTyArgs) match nenv.TyconsByDemangledNameAndArity(fq).TryFind key with | None -> nenv.TyconsByAccessNames(fq).TryFind nm |> Option.map List.head | res -> res -/// Implements unqualified lookups of type names where the number of generic arguments is NOT known -/// from context. +/// Implements unqualified lookups of type names where the number of generic arguments is NOT known +/// from context. // -// This is used in five places: -// - static member lookups, e.g. MyType.StaticMember(3) -// - e.g. MyModule.MyType.StaticMember(3) -// - type-qualified field names, e.g. { RecordType.field = 3 } -// - type-qualified constructor names, e.g. match x with UnionType.A -> 3 -// - identifiers to constructors for better error messages, e.g. 'String(3)' after 'open System' +// This is used in five places: +// - static member lookups, e.g. MyType.StaticMember(3) +// - e.g. MyModule.MyType.StaticMember(3) +// - type-qualified field names, e.g. { RecordType.field = 3 } +// - type-qualified constructor names, e.g. match x with UnionType.A -> 3 +// - identifiers to constructors for better error messages, e.g. 'String(3)' after 'open System' // - the special single-constructor rule in TcTyconCores -// -// Because of the potential ambiguity multiple results can be returned. -// Explicit type annotations can be added where needed to specify the generic arity. -// -// In theory the full names such as ``RecordType`1`` can -// also be used to qualify access if needed, though this is almost never needed. - -let LookupTypeNameNoArity nm (byDemangledNameAndArity: LayeredMap) (byAccessNames: LayeredMultiMap) = +// +// Because of the potential ambiguity multiple results can be returned. +// Explicit type annotations can be added where needed to specify the generic arity. +// +// In theory the full names such as ``RecordType`1`` can +// also be used to qualify access if needed, though this is almost never needed. + +let LookupTypeNameNoArity nm (byDemangledNameAndArity: LayeredMap) (byAccessNames: LayeredMultiMap) = match TryDemangleGenericNameAndPos nm with - | ValueSome pos -> + | ValueSome pos -> let demangled = DecodeGenericTypeName pos nm - match byDemangledNameAndArity.TryGetValue demangled with + match byDemangledNameAndArity.TryGetValue demangled with | true, res -> [res] | _ -> match byAccessNames.TryGetValue nm with @@ -1056,63 +1056,63 @@ let LookupTypeNameNoArity nm (byDemangledNameAndArity: LayeredMap Option.toList /// A flag which indicates if direct references to generated provided types are allowed. Normally these /// are disallowed. [] -type PermitDirectReferenceToGeneratedType = - | Yes +type PermitDirectReferenceToGeneratedType = + | Yes | No - + #if !NO_EXTENSIONTYPING /// Check for direct references to generated provided types. let CheckForDirectReferenceToGeneratedType (tcref: TyconRef, genOk, m) = - match genOk with + match genOk with | PermitDirectReferenceToGeneratedType.Yes -> () - | PermitDirectReferenceToGeneratedType.No -> - match tcref.TypeReprInfo with - | TProvidedTypeExtensionPoint info when not info.IsErased -> + | PermitDirectReferenceToGeneratedType.No -> + match tcref.TypeReprInfo with + | TProvidedTypeExtensionPoint info when not info.IsErased -> //printfn "checking direct reference to generated type '%s'" tcref.DisplayName - if ExtensionTyping.IsGeneratedTypeDirectReference (info.ProvidedType, m) then - error (Error(FSComp.SR.etDirectReferenceToGeneratedTypeNotAllowed(tcref.DisplayName),m)) + if ExtensionTyping.IsGeneratedTypeDirectReference (info.ProvidedType, m) then + error (Error(FSComp.SR.etDirectReferenceToGeneratedTypeNotAllowed(tcref.DisplayName), m)) | _ -> () /// This adds a new entity for a lazily discovered provided type into the TAST structure. -let AddEntityForProvidedType (amap: Import.ImportMap, modref: ModuleOrNamespaceRef, resolutionEnvironment, st:Tainted, m) = +let AddEntityForProvidedType (amap: Import.ImportMap, modref: ModuleOrNamespaceRef, resolutionEnvironment, st: Tainted, m) = let importProvidedType t = Import.ImportProvidedType amap m t - let isSuppressRelocate = amap.g.isInteractive || st.PUntaint((fun st -> st.IsSuppressRelocate),m) + let isSuppressRelocate = amap.g.isInteractive || st.PUntaint((fun st -> st.IsSuppressRelocate), m) let tycon = Construct.NewProvidedTycon(resolutionEnvironment, st, importProvidedType, isSuppressRelocate, m) modref.ModuleOrNamespaceType.AddProvidedTypeEntity(tycon) let tcref = modref.NestedTyconRef tycon - System.Diagnostics.Debug.Assert(ValueOptionInternal.isSome modref.TryDeref) + System.Diagnostics.Debug.Assert(modref.TryDeref.IsSome) tcref /// Given a provided type or provided namespace, resolve the type name using the type provider API. /// If necessary, incorporate the provided type or namespace into the entity. -let ResolveProvidedTypeNameInEntity (amap, m, typeName, modref: ModuleOrNamespaceRef) = +let ResolveProvidedTypeNameInEntity (amap, m, typeName, modref: ModuleOrNamespaceRef) = match modref.TypeReprInfo with - | TProvidedNamespaceExtensionPoint(resolutionEnvironment,resolvers) -> + | TProvidedNamespaceExtensionPoint(resolutionEnvironment, resolvers) -> match modref.Deref.PublicPath with | Some(PubPath path) -> - resolvers - |> List.choose (fun r-> ExtensionTyping.TryResolveProvidedType(r,m,path,typeName)) + resolvers + |> List.choose (fun r-> ExtensionTyping.TryResolveProvidedType(r, m, path, typeName)) |> List.map (fun st -> AddEntityForProvidedType (amap, modref, resolutionEnvironment, st, m)) | None -> [] @@ -1120,37 +1120,37 @@ let ResolveProvidedTypeNameInEntity (amap, m, typeName, modref: ModuleOrNamespac | TProvidedTypeExtensionPoint info -> let sty = info.ProvidedType let resolutionEnvironment = info.ResolutionEnvironment - + #if DEBUG if resolutionEnvironment.showResolutionMessages then dprintfn "resolving name '%s' in TProvidedTypeExtensionPoint '%s'" typeName (sty.PUntaint((fun sty -> sty.FullName), m)) #endif match sty.PApply((fun sty -> sty.GetNestedType(typeName)), m) with - | Tainted.Null -> - //if staticResInfo.NumStaticArgs > 0 then - // error(Error(FSComp.SR.etNestedProvidedTypesDoNotTakeStaticArgumentsOrGenericParameters(),m)) + | Tainted.Null -> + //if staticResInfo.NumStaticArgs > 0 then + // error(Error(FSComp.SR.etNestedProvidedTypesDoNotTakeStaticArgumentsOrGenericParameters(), m)) [] - | nestedSty -> + | nestedSty -> [AddEntityForProvidedType (amap, modref, resolutionEnvironment, nestedSty, m) ] | _ -> [] #endif /// Lookup a type name in an entity. -let LookupTypeNameInEntityMaybeHaveArity (amap, m, ad, nm, staticResInfo:TypeNameResolutionStaticArgsInfo, modref: ModuleOrNamespaceRef) = - let mtyp = modref.ModuleOrNamespaceType - let tcrefs = - match staticResInfo with - | TypeNameResolutionStaticArgsInfo.Indefinite -> +let LookupTypeNameInEntityMaybeHaveArity (amap, m, ad, nm, staticResInfo: TypeNameResolutionStaticArgsInfo, modref: ModuleOrNamespaceRef) = + let mtyp = modref.ModuleOrNamespaceType + let tcrefs = + match staticResInfo with + | TypeNameResolutionStaticArgsInfo.Indefinite -> LookupTypeNameInEntityNoArity m nm mtyp - |> List.map modref.NestedTyconRef - | TypeNameResolutionStaticArgsInfo.Definite _ -> + |> List.map modref.NestedTyconRef + | TypeNameResolutionStaticArgsInfo.Definite _ -> match LookupTypeNameInEntityHaveArity nm staticResInfo mtyp with - | Some tycon -> [modref.NestedTyconRef tycon] + | Some tycon -> [modref.NestedTyconRef tycon] | None -> [] #if !NO_EXTENSIONTYPING let tcrefs = - match tcrefs with + match tcrefs with | [] -> ResolveProvidedTypeNameInEntity (amap, m, nm, modref) | _ -> tcrefs #else @@ -1162,82 +1162,82 @@ let LookupTypeNameInEntityMaybeHaveArity (amap, m, ad, nm, staticResInfo:TypeNam /// Make a type that refers to a nested type. /// -/// Handle the .NET/C# business where nested generic types implicitly accumulate the type parameters +/// Handle the .NET/C# business where nested generic types implicitly accumulate the type parameters /// from their enclosing types. -let MakeNestedType (ncenv:NameResolver) (tinst:TType list) m (tcrefNested:TyconRef) = +let MakeNestedType (ncenv: NameResolver) (tinst: TType list) m (tcrefNested: TyconRef) = let tps = List.drop tinst.Length (tcrefNested.Typars m) let tinstNested = ncenv.InstantiationGenerator m tps mkAppTy tcrefNested (tinst @ tinstNested) /// Get all the accessible nested types of an existing type. -let GetNestedTypesOfType (ad, ncenv:NameResolver, optFilter, staticResInfo, checkForGenerated, m) ty = +let GetNestedTypesOfType (ad, ncenv: NameResolver, optFilter, staticResInfo, checkForGenerated, m) ty = let g = ncenv.g - ncenv.InfoReader.GetPrimaryTypeHierachy(AllowMultiIntfInstantiations.Yes,m,ty) |> List.collect (fun ty -> - match ty with - | AppTy g (tcref,tinst) -> + ncenv.InfoReader.GetPrimaryTypeHierachy(AllowMultiIntfInstantiations.Yes, m, ty) |> List.collect (fun ty -> + match ty with + | AppTy g (tcref, tinst) -> let tycon = tcref.Deref let mty = tycon.ModuleOrNamespaceType // No dotting through type generators to get to a nested type! #if !NO_EXTENSIONTYPING - if checkForGenerated then + if checkForGenerated then CheckForDirectReferenceToGeneratedType (tcref, PermitDirectReferenceToGeneratedType.No, m) #else checkForGenerated |> ignore #endif - match optFilter with - | Some nm -> + match optFilter with + | Some nm -> let tcrefs = LookupTypeNameInEntityMaybeHaveArity (ncenv.amap, m, ad, nm, staticResInfo, tcref) - tcrefs |> List.map (MakeNestedType ncenv tinst m) - | None -> + tcrefs |> List.map (MakeNestedType ncenv tinst m) + | None -> #if !NO_EXTENSIONTYPING - match tycon.TypeReprInfo with + match tycon.TypeReprInfo with | TProvidedTypeExtensionPoint info -> - [ for nestedType in info.ProvidedType.PApplyArray((fun sty -> sty.GetNestedTypes()), "GetNestedTypes", m) do + [ for nestedType in info.ProvidedType.PApplyArray((fun sty -> sty.GetNestedTypes()), "GetNestedTypes", m) do let nestedTypeName = nestedType.PUntaint((fun t -> t.Name), m) for nestedTcref in LookupTypeNameInEntityMaybeHaveArity (ncenv.amap, m, ad, nestedTypeName, staticResInfo, tcref) do yield MakeNestedType ncenv tinst m nestedTcref ] - - | _ -> + + | _ -> #endif mty.TypesByAccessNames.Values - |> List.choose (fun entity -> + |> List.choose (fun entity -> let ty = tcref.NestedTyconRef entity |> MakeNestedType ncenv tinst m if IsTypeAccessible g ncenv.amap m ad ty then Some ty else None) | _ -> []) //------------------------------------------------------------------------- -// Report environments to visual studio. We stuff intermediary results -// into a global variable. A little unpleasant. -//------------------------------------------------------------------------- +// Report environments to visual studio. We stuff intermediary results +// into a global variable. A little unpleasant. +//------------------------------------------------------------------------- /// Represents the kind of the occurrence when reporting a name in name resolution [] -type ItemOccurence = +type ItemOccurence = /// This is a binding / declaration of the item - | Binding - /// This is a usage of the item - | Use + | Binding + /// This is a usage of the item + | Use /// This is a usage of a type name in a type - | UseInType + | UseInType /// This is a usage of a type name in an attribute - | UseInAttribute + | UseInAttribute /// Inside pattern matching - | Pattern + | Pattern /// Abstract slot gets implemented | Implemented /// Result gets suppressed over this text range | RelatedText /// This is a usage of a module or namespace name in open statement | Open - + type OpenDeclaration = { LongId: Ident list Range: range option - Modules: ModuleOrNamespaceRef list - AppliedScope: range + Modules: ModuleOrNamespaceRef list + AppliedScope: range IsOwnNamespace: bool } - + static member Create(longId: Ident list, modules: ModuleOrNamespaceRef list, appliedScope: range, isOwnNamespace: bool) = { LongId = longId Range = @@ -1256,181 +1256,181 @@ type FormatStringCheckContext = /// An abstract type for reporting the results of name resolution and type checking. type ITypecheckResultsSink = - abstract NotifyEnvWithScope : range * NameResolutionEnv * AccessorDomain -> unit - abstract NotifyExprHasType : pos * TType * Tastops.DisplayEnv * NameResolutionEnv * AccessorDomain * range -> unit - abstract NotifyNameResolution : pos * Item * Item * TyparInst * ItemOccurence * Tastops.DisplayEnv * NameResolutionEnv * AccessorDomain * range * bool -> unit - abstract NotifyFormatSpecifierLocation : range * int -> unit - abstract NotifyOpenDeclaration : OpenDeclaration -> unit - abstract CurrentSource : string option - abstract FormatStringCheckContext : FormatStringCheckContext option - -let (|ValRefOfProp|_|) (pi : PropInfo) = pi.ArbitraryValRef -let (|ValRefOfMeth|_|) (mi : MethInfo) = mi.ArbitraryValRef -let (|ValRefOfEvent|_|) (evt : EventInfo) = evt.ArbitraryValRef - -let rec (|RecordFieldUse|_|) (item : Item) = + abstract NotifyEnvWithScope: range * NameResolutionEnv * AccessorDomain -> unit + abstract NotifyExprHasType: pos * TType * Tastops.DisplayEnv * NameResolutionEnv * AccessorDomain * range -> unit + abstract NotifyNameResolution: pos * Item * Item * TyparInst * ItemOccurence * Tastops.DisplayEnv * NameResolutionEnv * AccessorDomain * range * bool -> unit + abstract NotifyFormatSpecifierLocation: range * int -> unit + abstract NotifyOpenDeclaration: OpenDeclaration -> unit + abstract CurrentSource: string option + abstract FormatStringCheckContext: FormatStringCheckContext option + +let (|ValRefOfProp|_|) (pi: PropInfo) = pi.ArbitraryValRef +let (|ValRefOfMeth|_|) (mi: MethInfo) = mi.ArbitraryValRef +let (|ValRefOfEvent|_|) (evt: EventInfo) = evt.ArbitraryValRef + +let rec (|RecordFieldUse|_|) (item: Item) = match item with | Item.RecdField(RecdFieldInfo(_, RFRef(tcref, name))) -> Some (name, tcref) | Item.SetterArg(_, RecordFieldUse(f)) -> Some(f) | _ -> None -let rec (|ILFieldUse|_|) (item : Item) = +let rec (|ILFieldUse|_|) (item: Item) = match item with | Item.ILField(finfo) -> Some(finfo) | Item.SetterArg(_, ILFieldUse(f)) -> Some(f) | _ -> None -let rec (|PropertyUse|_|) (item : Item) = +let rec (|PropertyUse|_|) (item: Item) = match item with | Item.Property(_, pinfo::_) -> Some(pinfo) | Item.SetterArg(_, PropertyUse(pinfo)) -> Some(pinfo) | _ -> None -let rec (|FSharpPropertyUse|_|) (item : Item) = +let rec (|FSharpPropertyUse|_|) (item: Item) = match item with | Item.Property(_, [ValRefOfProp vref]) -> Some(vref) | Item.SetterArg(_, FSharpPropertyUse(propDef)) -> Some(propDef) | _ -> None -let (|MethodUse|_|) (item : Item) = +let (|MethodUse|_|) (item: Item) = match item with - | Item.MethodGroup(_, [minfo],_) -> Some(minfo) + | Item.MethodGroup(_, [minfo], _) -> Some(minfo) | _ -> None -let (|FSharpMethodUse|_|) (item : Item) = +let (|FSharpMethodUse|_|) (item: Item) = match item with - | Item.MethodGroup(_, [ValRefOfMeth vref],_) -> Some(vref) + | Item.MethodGroup(_, [ValRefOfMeth vref], _) -> Some(vref) | Item.Value(vref) when vref.IsMember -> Some(vref) | _ -> None -let (|EntityUse|_|) (item: Item) = - match item with +let (|EntityUse|_|) (item: Item) = + match item with | Item.UnqualifiedType (tcref:: _) -> Some tcref | Item.ExnCase(tcref) -> Some tcref - | Item.Types(_, [AbbrevOrAppTy tcref]) - | Item.DelegateCtor(AbbrevOrAppTy tcref) + | Item.Types(_, [AbbrevOrAppTy tcref]) + | Item.DelegateCtor(AbbrevOrAppTy tcref) | Item.FakeInterfaceCtor(AbbrevOrAppTy tcref) -> Some tcref - | Item.CtorGroup(_, ctor::_) -> - match ctor.ApparentEnclosingType with + | Item.CtorGroup(_, ctor::_) -> + match ctor.ApparentEnclosingType with | AbbrevOrAppTy tcref -> Some tcref | _ -> None | _ -> None -let (|EventUse|_|) (item : Item) = +let (|EventUse|_|) (item: Item) = match item with | Item.Event(einfo) -> Some einfo | _ -> None -let (|FSharpEventUse|_|) (item : Item) = +let (|FSharpEventUse|_|) (item: Item) = match item with | Item.Event(ValRefOfEvent vref) -> Some vref | _ -> None -let (|UnionCaseUse|_|) (item : Item) = +let (|UnionCaseUse|_|) (item: Item) = match item with - | Item.UnionCase(UnionCaseInfo(_, u1),_) -> Some u1 + | Item.UnionCase(UnionCaseInfo(_, u1), _) -> Some u1 | _ -> None -let (|ValUse|_|) (item:Item) = - match item with - | Item.Value vref +let (|ValUse|_|) (item: Item) = + match item with + | Item.Value vref | FSharpPropertyUse vref | FSharpMethodUse vref | FSharpEventUse vref | Item.CustomBuilder(_, vref) -> Some vref | _ -> None -let (|ActivePatternCaseUse|_|) (item:Item) = - match item with +let (|ActivePatternCaseUse|_|) (item: Item) = + match item with | Item.ActivePatternCase(APElemRef(_, vref, idx)) -> Some (vref.SigRange, vref.DefinitionRange, idx) - | Item.ActivePatternResult(ap, _, idx,_) -> Some (ap.Range, ap.Range, idx) + | Item.ActivePatternResult(ap, _, idx, _) -> Some (ap.Range, ap.Range, idx) | _ -> None -let tyconRefDefnHash (_g: TcGlobals) (eref1:EntityRef) = - hash eref1.LogicalName +let tyconRefDefnHash (_g: TcGlobals) (eref1: EntityRef) = + hash eref1.LogicalName -let tyconRefDefnEq g (eref1:EntityRef) (eref2: EntityRef) = - tyconRefEq g eref1 eref2 || +let tyconRefDefnEq g (eref1: EntityRef) (eref2: EntityRef) = + tyconRefEq g eref1 eref2 || // Signature items considered equal to implementation items eref1.DefinitionRange <> Range.rangeStartup && eref1.DefinitionRange <> Range.range0 && eref1.DefinitionRange <> Range.rangeCmdArgs && (eref1.DefinitionRange = eref2.DefinitionRange || eref1.SigRange = eref2.SigRange) && eref1.LogicalName = eref2.LogicalName -let valRefDefnHash (_g: TcGlobals) (vref1:ValRef) = +let valRefDefnHash (_g: TcGlobals) (vref1: ValRef) = hash vref1.DisplayName -let valRefDefnEq g (vref1:ValRef) (vref2: ValRef) = +let valRefDefnEq g (vref1: ValRef) (vref2: ValRef) = valRefEq g vref1 vref2 || // Signature items considered equal to implementation items vref1.DefinitionRange <> Range.rangeStartup && vref1.DefinitionRange <> Range.range0 && vref1.DefinitionRange <> Range.rangeCmdArgs && - (vref1.DefinitionRange = vref2.DefinitionRange || vref1.SigRange = vref2.SigRange) && + (vref1.DefinitionRange = vref2.DefinitionRange || vref1.SigRange = vref2.SigRange) && vref1.LogicalName = vref2.LogicalName -let unionCaseRefDefnEq g (uc1:UnionCaseRef) (uc2: UnionCaseRef) = +let unionCaseRefDefnEq g (uc1: UnionCaseRef) (uc2: UnionCaseRef) = uc1.CaseName = uc2.CaseName && tyconRefDefnEq g uc1.TyconRef uc2.TyconRef -/// Given the Item 'orig' - returns function 'other : Item -> bool', that will yield true if other and orig represents the same item and false - otherwise -let ItemsAreEffectivelyEqual g orig other = +/// Given the Item 'orig' - returns function 'other: Item -> bool', that will yield true if other and orig represents the same item and false - otherwise +let ItemsAreEffectivelyEqual g orig other = match orig, other with - | EntityUse ty1, EntityUse ty2 -> + | EntityUse ty1, EntityUse ty2 -> tyconRefDefnEq g ty1 ty2 - | Item.TypeVar (nm1,tp1), Item.TypeVar (nm2,tp2) -> - nm1 = nm2 && - (typeEquiv g (mkTyparTy tp1) (mkTyparTy tp2) || - match stripTyparEqns (mkTyparTy tp1), stripTyparEqns (mkTyparTy tp2) with - | TType_var tp1, TType_var tp2 -> - not tp1.IsCompilerGenerated && not tp1.IsFromError && - not tp2.IsCompilerGenerated && not tp2.IsFromError && + | Item.TypeVar (nm1, tp1), Item.TypeVar (nm2, tp2) -> + nm1 = nm2 && + (typeEquiv g (mkTyparTy tp1) (mkTyparTy tp2) || + match stripTyparEqns (mkTyparTy tp1), stripTyparEqns (mkTyparTy tp2) with + | TType_var tp1, TType_var tp2 -> + not tp1.IsCompilerGenerated && not tp1.IsFromError && + not tp2.IsCompilerGenerated && not tp2.IsFromError && tp1.Range = tp2.Range - | AbbrevOrAppTy tcref1, AbbrevOrAppTy tcref2 -> + | AbbrevOrAppTy tcref1, AbbrevOrAppTy tcref2 -> tyconRefDefnEq g tcref1 tcref2 | _ -> false) - | ValUse vref1, ValUse vref2 -> - valRefDefnEq g vref1 vref2 + | ValUse vref1, ValUse vref2 -> + valRefDefnEq g vref1 vref2 - | ActivePatternCaseUse (range1, range1i, idx1), ActivePatternCaseUse (range2, range2i, idx2) -> + | ActivePatternCaseUse (range1, range1i, idx1), ActivePatternCaseUse (range2, range2i, idx2) -> (idx1 = idx2) && (range1 = range2 || range1i = range2i) - | MethodUse minfo1, MethodUse minfo2 -> + | MethodUse minfo1, MethodUse minfo2 -> MethInfo.MethInfosUseIdenticalDefinitions minfo1 minfo2 || // Allow for equality up to signature matching - match minfo1.ArbitraryValRef, minfo2.ArbitraryValRef with - | Some vref1, Some vref2 -> valRefDefnEq g vref1 vref2 + match minfo1.ArbitraryValRef, minfo2.ArbitraryValRef with + | Some vref1, Some vref2 -> valRefDefnEq g vref1 vref2 | _ -> false - | PropertyUse(pinfo1), PropertyUse(pinfo2) -> + | PropertyUse(pinfo1), PropertyUse(pinfo2) -> PropInfo.PropInfosUseIdenticalDefinitions pinfo1 pinfo2 || // Allow for equality up to signature matching - match pinfo1.ArbitraryValRef, pinfo2.ArbitraryValRef with - | Some vref1, Some vref2 -> valRefDefnEq g vref1 vref2 + match pinfo1.ArbitraryValRef, pinfo2.ArbitraryValRef with + | Some vref1, Some vref2 -> valRefDefnEq g vref1 vref2 | _ -> false - | Item.ArgName (id1,_, _), Item.ArgName (id2,_, _) -> + | Item.ArgName (id1, _, _), Item.ArgName (id2, _, _) -> (id1.idText = id2.idText && id1.idRange = id2.idRange) - | (Item.ArgName (id,_, _), ValUse vref) | (ValUse vref, Item.ArgName (id, _, _)) -> + | (Item.ArgName (id, _, _), ValUse vref) | (ValUse vref, Item.ArgName (id, _, _)) -> ((id.idRange = vref.DefinitionRange || id.idRange = vref.SigRange) && id.idText = vref.DisplayName) | Item.AnonRecdField(anon1, _, i1, _), Item.AnonRecdField(anon2, _, i2, _) -> Tastops.anonInfoEquiv anon1 anon2 && i1 = i2 - | ILFieldUse f1, ILFieldUse f2 -> - ILFieldInfo.ILFieldInfosUseIdenticalDefinitions f1 f2 + | ILFieldUse f1, ILFieldUse f2 -> + ILFieldInfo.ILFieldInfosUseIdenticalDefinitions f1 f2 - | UnionCaseUse u1, UnionCaseUse u2 -> + | UnionCaseUse u1, UnionCaseUse u2 -> unionCaseRefDefnEq g u1 u2 - | RecordFieldUse(name1, tcref1), RecordFieldUse(name2, tcref2) -> + | RecordFieldUse(name1, tcref1), RecordFieldUse(name2, tcref2) -> name1 = name2 && tyconRefDefnEq g tcref1 tcref2 - | EventUse evt1, EventUse evt2 -> + | EventUse evt1, EventUse evt2 -> EventInfo.EventInfosUseIdenticalDefintions evt1 evt2 || // Allow for equality up to signature matching - match evt1.ArbitraryValRef, evt2.ArbitraryValRef with - | Some vref1, Some vref2 -> valRefDefnEq g vref1 vref2 + match evt1.ArbitraryValRef, evt2.ArbitraryValRef with + | Some vref1, Some vref2 -> valRefDefnEq g vref1 vref2 | _ -> false | Item.ModuleOrNamespaces modrefs1, Item.ModuleOrNamespaces modrefs2 -> @@ -1438,16 +1438,16 @@ let ItemsAreEffectivelyEqual g orig other = | _ -> false -/// Given the Item 'orig' - returns function 'other : Item -> bool', that will yield true if other and orig represents the same item and false - otherwise -let ItemsAreEffectivelyEqualHash (g: TcGlobals) orig = +/// Given the Item 'orig' - returns function 'other: Item -> bool', that will yield true if other and orig represents the same item and false - otherwise +let ItemsAreEffectivelyEqualHash (g: TcGlobals) orig = match orig with | EntityUse tcref -> tyconRefDefnHash g tcref - | Item.TypeVar (nm,_)-> hash nm + | Item.TypeVar (nm, _)-> hash nm | ValUse vref -> valRefDefnHash g vref | ActivePatternCaseUse (_, _, idx)-> hash idx | MethodUse minfo -> minfo.ComputeHashCode() | PropertyUse pinfo -> pinfo.ComputeHashCode() - | Item.ArgName (id,_, _) -> hash id.idText + | Item.ArgName (id, _, _) -> hash id.idText | ILFieldUse ilfinfo -> ilfinfo.ComputeHashCode() | UnionCaseUse ucase -> hash ucase.CaseName | RecordFieldUse (name, _) -> hash name @@ -1456,7 +1456,7 @@ let ItemsAreEffectivelyEqualHash (g: TcGlobals) orig = | _ -> 389329 [] -type CapturedNameResolution(p:pos, i:Item, tpinst, io:ItemOccurence, de:DisplayEnv, nre:NameResolutionEnv, ad:AccessorDomain, m:range) = +type CapturedNameResolution(p: pos, i: Item, tpinst, io: ItemOccurence, de: DisplayEnv, nre: NameResolutionEnv, ad: AccessorDomain, m: range) = member this.Pos = p member this.Item = i member this.ItemWithInst = ({ Item = i; TyparInst = tpinst } : ItemWithInst) @@ -1465,18 +1465,18 @@ type CapturedNameResolution(p:pos, i:Item, tpinst, io:ItemOccurence, de:DisplayE member this.NameResolutionEnv = nre member this.AccessorDomain = ad member this.Range = m - member this.DebugToString() = + member this.DebugToString() = sprintf "%A: %+A" (p.Line, p.Column) i /// Represents container for all name resolutions that were met so far when typechecking some particular file type TcResolutions - (capturedEnvs : ResizeArray, - capturedExprTypes : ResizeArray, - capturedNameResolutions : ResizeArray, - capturedMethodGroupResolutions : ResizeArray) = + (capturedEnvs: ResizeArray, + capturedExprTypes: ResizeArray, + capturedNameResolutions: ResizeArray, + capturedMethodGroupResolutions: ResizeArray) = + + static let empty = TcResolutions(ResizeArray(0), ResizeArray(0), ResizeArray(0), ResizeArray(0)) - static let empty = TcResolutions(ResizeArray(0),ResizeArray(0),ResizeArray(0),ResizeArray(0)) - member this.CapturedEnvs = capturedEnvs member this.CapturedExpressionTypings = capturedExprTypes member this.CapturedNameResolutions = capturedNameResolutions @@ -1485,7 +1485,7 @@ type TcResolutions static member Empty = empty [] -type TcSymbolUseData = +type TcSymbolUseData = { Item: Item ItemOccurence: ItemOccurence DisplayEnv: DisplayEnv @@ -1496,17 +1496,17 @@ type TcSymbolUseData = /// This is a memory-critical data structure - allocations of this data structure and its immediate contents /// is one of the highest memory long-lived data structures in typical uses of IDEs. Not many of these objects /// are allocated (one per file), but they are large because the allUsesOfAllSymbols array is large. -type TcSymbolUses(g, capturedNameResolutions : ResizeArray, formatSpecifierLocations: (range * int)[]) = +type TcSymbolUses(g, capturedNameResolutions: ResizeArray, formatSpecifierLocations: (range * int)[]) = // Make sure we only capture the information we really need to report symbol uses let allUsesOfSymbols = capturedNameResolutions |> ResizeArray.mapToSmallArrayChunks (fun cnr -> { Item=cnr.Item; ItemOccurence=cnr.ItemOccurence; DisplayEnv=cnr.DisplayEnv; Range=cnr.Range }) - let capturedNameResolutions = () + let capturedNameResolutions = () do ignore capturedNameResolutions // don't capture this! - member this.GetUsesOfSymbol(item) = + member this.GetUsesOfSymbol(item) = // This member returns what is potentially a very large array, which may approach the size constraints of the Large Object Heap. // This is unlikely in practice, though, because we filter down the set of all symbol uses to those specifically for the given `item`. // Consequently we have a much lesser chance of ending up with an array large enough to be promoted to the LOH. @@ -1525,22 +1525,22 @@ type TcResultsSinkImpl(g, ?source: string) = let capturedExprTypings = ResizeArray<_>() let capturedNameResolutions = ResizeArray<_>() let capturedFormatSpecifierLocations = ResizeArray<_>() - - let capturedNameResolutionIdentifiers = + + let capturedNameResolutionIdentifiers = new System.Collections.Generic.HashSet - ( { new IEqualityComparer<_> with - member __.GetHashCode((p:pos,i)) = p.Line + 101 * p.Column + hash i - member __.Equals((p1,i1),(p2,i2)) = posEq p1 p2 && i1 = i2 } ) + ( { new IEqualityComparer<_> with + member __.GetHashCode((p: pos, i)) = p.Line + 101 * p.Column + hash i + member __.Equals((p1, i1), (p2, i2)) = posEq p1 p2 && i1 = i2 } ) - let capturedModulesAndNamespaces = + let capturedModulesAndNamespaces = new System.Collections.Generic.HashSet - ( { new IEqualityComparer with + ( { new IEqualityComparer with member __.GetHashCode ((m, _)) = hash m member __.Equals ((m1, item1), (m2, item2)) = m1 = m2 && ItemsAreEffectivelyEqual g item1 item2 } ) let capturedMethodGroupResolutions = ResizeArray<_>() let capturedOpenDeclarations = ResizeArray() - let allowedRange (m:range) = not m.IsSynthetic + let allowedRange (m: range) = not m.IsSynthetic let formatStringCheckContext = lazy @@ -1555,30 +1555,30 @@ type TcResultsSinkImpl(g, ?source: string) = elif c = '\n' then yield i yield source.Length |] - { Source = source + { Source = source LineStartPositions = positions }) - member this.GetResolutions() = + member this.GetResolutions() = TcResolutions(capturedEnvs, capturedExprTypings, capturedNameResolutions, capturedMethodGroupResolutions) - member this.GetSymbolUses() = + member this.GetSymbolUses() = TcSymbolUses(g, capturedNameResolutions, capturedFormatSpecifierLocations.ToArray()) - member this.GetOpenDeclarations() = + member this.GetOpenDeclarations() = capturedOpenDeclarations |> Seq.distinctBy (fun x -> x.Range, x.AppliedScope, x.IsOwnNamespace) |> Seq.toArray interface ITypecheckResultsSink with - member sink.NotifyEnvWithScope(m,nenv,ad) = - if allowedRange m then - capturedEnvs.Add((m,nenv,ad)) + member sink.NotifyEnvWithScope(m, nenv, ad) = + if allowedRange m then + capturedEnvs.Add((m, nenv, ad)) - member sink.NotifyExprHasType(endPos,ty,denv,nenv,ad,m) = - if allowedRange m then - capturedExprTypings.Add((endPos,ty,denv,nenv,ad,m)) + member sink.NotifyExprHasType(endPos, ty, denv, nenv, ad, m) = + if allowedRange m then + capturedExprTypings.Add((endPos, ty, denv, nenv, ad, m)) - member sink.NotifyNameResolution(endPos,item,itemMethodGroup,tpinst,occurenceType,denv,nenv,ad,m,replace) = + member sink.NotifyNameResolution(endPos, item, itemMethodGroup, tpinst, occurenceType, denv, nenv, ad, m, replace) = // Desugaring some F# constructs (notably computation expressions with custom operators) - // results in duplication of textual variables. So we ensure we never record two name resolutions + // results in duplication of textual variables. So we ensure we never record two name resolutions // for the same identifier at the same location. if allowedRange m then if replace then @@ -1599,7 +1599,7 @@ type TcResultsSinkImpl(g, ?source: string) = | Item.ModuleOrNamespaces _ -> not (capturedModulesAndNamespaces.Add (m, item)) | _ -> - let keyOpt = + let keyOpt = match item with | Item.Value vref -> Some (endPos, vref.DisplayName) | Item.ArgName (id, _, _) -> Some (endPos, id.idText) @@ -1609,163 +1609,163 @@ type TcResultsSinkImpl(g, ?source: string) = | Some key -> not (capturedNameResolutionIdentifiers.Add key) | _ -> false - if not alreadyDone then - capturedNameResolutions.Add(CapturedNameResolution(endPos,item,tpinst,occurenceType,denv,nenv,ad,m)) - capturedMethodGroupResolutions.Add(CapturedNameResolution(endPos,itemMethodGroup,[],occurenceType,denv,nenv,ad,m)) + if not alreadyDone then + capturedNameResolutions.Add(CapturedNameResolution(endPos, item, tpinst, occurenceType, denv, nenv, ad, m)) + capturedMethodGroupResolutions.Add(CapturedNameResolution(endPos, itemMethodGroup, [], occurenceType, denv, nenv, ad, m)) - member sink.NotifyFormatSpecifierLocation(m, numArgs) = + member sink.NotifyFormatSpecifierLocation(m, numArgs) = capturedFormatSpecifierLocations.Add((m, numArgs)) member sink.NotifyOpenDeclaration(openDeclaration) = capturedOpenDeclarations.Add(openDeclaration) member sink.CurrentSource = source - + member sink.FormatStringCheckContext = formatStringCheckContext.Value /// An abstract type for reporting the results of name resolution and type checking, and which allows /// temporary suspension and/or redirection of reporting. -type TcResultsSink = - { mutable CurrentSink : ITypecheckResultsSink option } +type TcResultsSink = + { mutable CurrentSink: ITypecheckResultsSink option } static member NoSink = { CurrentSink = None } static member WithSink sink = { CurrentSink = Some sink } /// Temporarily redirect reporting of name resolution and type checking results -let WithNewTypecheckResultsSink (newSink : ITypecheckResultsSink, sink:TcResultsSink) = +let WithNewTypecheckResultsSink (newSink: ITypecheckResultsSink, sink: TcResultsSink) = let old = sink.CurrentSink sink.CurrentSink <- Some newSink { new System.IDisposable with member x.Dispose() = sink.CurrentSink <- old } /// Temporarily suspend reporting of name resolution and type checking results -let TemporarilySuspendReportingTypecheckResultsToSink (sink:TcResultsSink) = +let TemporarilySuspendReportingTypecheckResultsToSink (sink: TcResultsSink) = let old = sink.CurrentSink sink.CurrentSink <- None { new System.IDisposable with member x.Dispose() = sink.CurrentSink <- old } /// Report the active name resolution environment for a specific source range -let CallEnvSink (sink:TcResultsSink) (scopem,nenv,ad) = - match sink.CurrentSink with - | None -> () - | Some sink -> sink.NotifyEnvWithScope(scopem,nenv,ad) +let CallEnvSink (sink: TcResultsSink) (scopem, nenv, ad) = + match sink.CurrentSink with + | None -> () + | Some sink -> sink.NotifyEnvWithScope(scopem, nenv, ad) /// Report a specific name resolution at a source range -let CallNameResolutionSink (sink:TcResultsSink) (m:range,nenv,item,itemMethodGroup,tpinst,occurenceType,denv,ad) = - match sink.CurrentSink with - | None -> () - | Some sink -> sink.NotifyNameResolution(m.End,item,itemMethodGroup,tpinst,occurenceType,denv,nenv,ad,m,false) +let CallNameResolutionSink (sink: TcResultsSink) (m: range, nenv, item, itemMethodGroup, tpinst, occurenceType, denv, ad) = + match sink.CurrentSink with + | None -> () + | Some sink -> sink.NotifyNameResolution(m.End, item, itemMethodGroup, tpinst, occurenceType, denv, nenv, ad, m, false) -let CallNameResolutionSinkReplacing (sink:TcResultsSink) (m:range,nenv,item,itemMethodGroup,tpinst,occurenceType,denv,ad) = - match sink.CurrentSink with - | None -> () - | Some sink -> sink.NotifyNameResolution(m.End,item,itemMethodGroup,tpinst,occurenceType,denv,nenv,ad,m,true) +let CallNameResolutionSinkReplacing (sink: TcResultsSink) (m: range, nenv, item, itemMethodGroup, tpinst, occurenceType, denv, ad) = + match sink.CurrentSink with + | None -> () + | Some sink -> sink.NotifyNameResolution(m.End, item, itemMethodGroup, tpinst, occurenceType, denv, nenv, ad, m, true) /// Report a specific expression typing at a source range -let CallExprHasTypeSink (sink:TcResultsSink) (m:range,nenv,ty,denv,ad) = - match sink.CurrentSink with - | None -> () - | Some sink -> sink.NotifyExprHasType(m.End,ty,denv,nenv,ad,m) +let CallExprHasTypeSink (sink: TcResultsSink) (m: range, nenv, ty, denv, ad) = + match sink.CurrentSink with + | None -> () + | Some sink -> sink.NotifyExprHasType(m.End, ty, denv, nenv, ad, m) -let CallOpenDeclarationSink (sink:TcResultsSink) (openDeclaration: OpenDeclaration) = +let CallOpenDeclarationSink (sink: TcResultsSink) (openDeclaration: OpenDeclaration) = match sink.CurrentSink with | None -> () | Some sink -> sink.NotifyOpenDeclaration(openDeclaration) //------------------------------------------------------------------------- // Check inferability of type parameters in resolved items. -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- /// Checks if the type variables associated with the result of a resolution are inferable, /// i.e. occur in the arguments or return type of the resolution. If not give a warning /// about a type instantiation being needed. type ResultTyparChecker = ResultTyparChecker of (unit -> bool) -let CheckAllTyparsInferrable amap m item = +let CheckAllTyparsInferrable amap m item = match item with - | Item.Property(_,pinfos) -> - pinfos |> List.forall (fun pinfo -> + | Item.Property(_, pinfos) -> + pinfos |> List.forall (fun pinfo -> pinfo.IsExtensionMember || let freeInDeclaringType = freeInType CollectTyparsNoCaching pinfo.ApparentEnclosingType - let freeInArgsAndRetType = - accFreeInTypes CollectTyparsNoCaching (pinfo.GetParamTypes(amap,m)) - (freeInType CollectTyparsNoCaching (pinfo.GetPropertyType(amap,m))) + let freeInArgsAndRetType = + accFreeInTypes CollectTyparsNoCaching (pinfo.GetParamTypes(amap, m)) + (freeInType CollectTyparsNoCaching (pinfo.GetPropertyType(amap, m))) let free = Zset.diff freeInDeclaringType.FreeTypars freeInArgsAndRetType.FreeTypars free.IsEmpty) - | Item.MethodGroup(_,minfos,_) -> - minfos |> List.forall (fun minfo -> + | Item.MethodGroup(_, minfos, _) -> + minfos |> List.forall (fun minfo -> minfo.IsExtensionMember || let fminst = minfo.FormalMethodInst let freeInDeclaringType = freeInType CollectTyparsNoCaching minfo.ApparentEnclosingType - let freeInArgsAndRetType = - List.foldBack (accFreeInTypes CollectTyparsNoCaching) (minfo.GetParamTypes(amap, m, fminst)) - (accFreeInTypes CollectTyparsNoCaching (minfo.GetObjArgTypes(amap, m, fminst)) + let freeInArgsAndRetType = + List.foldBack (accFreeInTypes CollectTyparsNoCaching) (minfo.GetParamTypes(amap, m, fminst)) + (accFreeInTypes CollectTyparsNoCaching (minfo.GetObjArgTypes(amap, m, fminst)) (freeInType CollectTyparsNoCaching (minfo.GetFSharpReturnTy(amap, m, fminst)))) let free = Zset.diff freeInDeclaringType.FreeTypars freeInArgsAndRetType.FreeTypars free.IsEmpty) - | Item.CtorGroup _ - | Item.FakeInterfaceCtor _ - | Item.DelegateCtor _ - | Item.Types _ + | Item.CtorGroup _ + | Item.FakeInterfaceCtor _ + | Item.DelegateCtor _ + | Item.Types _ | Item.ModuleOrNamespaces _ - | Item.CustomOperation _ - | Item.CustomBuilder _ - | Item.TypeVar _ - | Item.ArgName _ + | Item.CustomOperation _ + | Item.CustomBuilder _ + | Item.TypeVar _ + | Item.ArgName _ | Item.ActivePatternResult _ - | Item.Value _ - | Item.ActivePatternCase _ - | Item.UnionCase _ - | Item.ExnCase _ - | Item.RecdField _ - | Item.AnonRecdField _ - | Item.NewDef _ - | Item.ILField _ - | Item.Event _ - | Item.ImplicitOp _ + | Item.Value _ + | Item.ActivePatternCase _ + | Item.UnionCase _ + | Item.ExnCase _ + | Item.RecdField _ + | Item.AnonRecdField _ + | Item.NewDef _ + | Item.ILField _ + | Item.Event _ + | Item.ImplicitOp _ | Item.UnqualifiedType _ | Item.SetterArg _ -> true - + //------------------------------------------------------------------------- // Check inferability of type parameters in resolved items. -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- /// Keeps track of information relevant to the chosen resolution of a long identifier /// /// When we resolve an item such as System.Console.In we /// resolve it in one step to a property/val/method etc. item. However /// Visual Studio needs to know about the exact resolutions of the names -/// System and Console, i.e. the 'entity path' of the resolution. +/// System and Console, i.e. the 'entity path' of the resolution. /// -/// Each of the resolution routines keeps track of the entity path and -/// ultimately calls ResolutionInfo.Method to record it for +/// Each of the resolution routines keeps track of the entity path and +/// ultimately calls ResolutionInfo.Method to record it for /// later use by Visual Studio. -type ResolutionInfo = +type ResolutionInfo = | ResolutionInfo of (*entityPath, reversed*)(range * EntityRef) list * (*warnings/errors*)(ResultTyparChecker -> unit) - static member SendEntityPathToSink(sink, ncenv: NameResolver, nenv, occ, ad, ResolutionInfo(entityPath,warnings), typarChecker) = - entityPath |> List.iter (fun (m,eref:EntityRef) -> - CheckEntityAttributes ncenv.g eref m |> CommitOperationResult + static member SendEntityPathToSink(sink, ncenv: NameResolver, nenv, occ, ad, ResolutionInfo(entityPath, warnings), typarChecker) = + entityPath |> List.iter (fun (m, eref: EntityRef) -> + CheckEntityAttributes ncenv.g eref m |> CommitOperationResult CheckTyconAccessible ncenv.amap m ad eref |> ignore - let item = - if eref.IsModuleOrNamespace then - Item.ModuleOrNamespaces [eref] - else - Item.Types(eref.DisplayName,[FreshenTycon ncenv m eref]) - CallNameResolutionSink sink (m,nenv,item,item,emptyTyparInst,occ,nenv.eDisplayEnv,ad)) + let item = + if eref.IsModuleOrNamespace then + Item.ModuleOrNamespaces [eref] + else + Item.Types(eref.DisplayName, [FreshenTycon ncenv m eref]) + CallNameResolutionSink sink (m, nenv, item, item, emptyTyparInst, occ, nenv.eDisplayEnv, ad)) warnings(typarChecker) - - static member Empty = - ResolutionInfo([],(fun _ -> ())) - member x.AddEntity info = - let (ResolutionInfo(entityPath,warnings)) = x - ResolutionInfo(info::entityPath,warnings) + static member Empty = + ResolutionInfo([], (fun _ -> ())) - member x.AddWarning f = - let (ResolutionInfo(entityPath,warnings)) = x - ResolutionInfo(entityPath,(fun typarChecker -> f typarChecker; warnings typarChecker)) + member x.AddEntity info = + let (ResolutionInfo(entityPath, warnings)) = x + ResolutionInfo(info::entityPath, warnings) + + member x.AddWarning f = + let (ResolutionInfo(entityPath, warnings)) = x + ResolutionInfo(entityPath, (fun typarChecker -> f typarChecker; warnings typarChecker)) @@ -1773,68 +1773,68 @@ type ResolutionInfo = /// Also check that we're not returning direct references to generated provided types. // // Given ambiguous C<>, C<_> we resolve the ambiguous 'C.M' to C<> without warning -// Given ambiguous C<_>, C<_,_> we resolve the ambiguous 'C.M' to C<_> with an ambiguity error +// Given ambiguous C<_>, C<_, _> we resolve the ambiguous 'C.M' to C<_> with an ambiguity error // Given C<_> we resolve the ambiguous 'C.M' to C<_> with a warning if the argument or return types can't be inferred // Given ambiguous C<>, C<_> we resolve the ambiguous 'C()' to C<> without warning -// Given ambiguous C<_>, C<_,_> we resolve the ambiguous 'C()' to C<_> with an ambiguity error +// Given ambiguous C<_>, C<_, _> we resolve the ambiguous 'C()' to C<_> with an ambiguity error // Given C<_> we resolve the ambiguous 'C()' to C<_> with a warning if the argument or return types can't be inferred -let CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities - (tcrefs:(ResolutionInfo * TyconRef) list, - typeNameResInfo:TypeNameResolutionInfo, - genOk:PermitDirectReferenceToGeneratedType, - m) = +let CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities + (tcrefs:(ResolutionInfo * TyconRef) list, + typeNameResInfo: TypeNameResolutionInfo, + genOk: PermitDirectReferenceToGeneratedType, + m) = - let tcrefs = - tcrefs + let tcrefs = + tcrefs // remove later duplicates (if we've opened the same module more than once) - |> List.distinctBy (fun (_,tcref) -> tcref.Stamp) + |> List.distinctBy (fun (_, tcref) -> tcref.Stamp) // List.sortBy is a STABLE sort (the order matters!) - |> List.sortBy (fun (_,tcref) -> tcref.Typars(m).Length) + |> List.sortBy (fun (_, tcref) -> tcref.Typars(m).Length) - let tcrefs = - match tcrefs with - | ((_resInfo,tcref) :: _) when + let tcrefs = + match tcrefs with + | ((_resInfo, tcref) :: _) when // multiple types - tcrefs.Length > 1 && + tcrefs.Length > 1 && // no explicit type instantiation - typeNameResInfo.StaticArgsInfo.HasNoStaticArgsInfo && + typeNameResInfo.StaticArgsInfo.HasNoStaticArgsInfo && // some type arguments required on all types (note sorted by typar count above) - not (List.isEmpty (tcref.Typars m)) && + not (List.isEmpty (tcref.Typars m)) && // plausible types have different arities - (tcrefs |> Seq.distinctBy (fun (_,tcref) -> tcref.Typars(m).Length) |> Seq.length > 1) -> - [ for (resInfo,tcref) in tcrefs do - let resInfo = resInfo.AddWarning (fun _typarChecker -> errorR(Error(FSComp.SR.nrTypeInstantiationNeededToDisambiguateTypesWithSameName(tcref.DisplayName, tcref.DisplayNameWithStaticParametersAndUnderscoreTypars),m))) - yield (resInfo,tcref) ] - - | [(resInfo,tcref)] when typeNameResInfo.StaticArgsInfo.HasNoStaticArgsInfo && not (List.isEmpty (tcref.Typars m)) && typeNameResInfo.ResolutionFlag = ResolveTypeNamesToTypeRefs -> - let resInfo = - resInfo.AddWarning (fun (ResultTyparChecker typarChecker) -> - if not (typarChecker()) then - warning(Error(FSComp.SR.nrTypeInstantiationIsMissingAndCouldNotBeInferred(tcref.DisplayName, tcref.DisplayNameWithStaticParametersAndUnderscoreTypars),m))) - [(resInfo,tcref)] - - | _ -> + (tcrefs |> Seq.distinctBy (fun (_, tcref) -> tcref.Typars(m).Length) |> Seq.length > 1) -> + [ for (resInfo, tcref) in tcrefs do + let resInfo = resInfo.AddWarning (fun _typarChecker -> errorR(Error(FSComp.SR.nrTypeInstantiationNeededToDisambiguateTypesWithSameName(tcref.DisplayName, tcref.DisplayNameWithStaticParametersAndUnderscoreTypars), m))) + yield (resInfo, tcref) ] + + | [(resInfo, tcref)] when typeNameResInfo.StaticArgsInfo.HasNoStaticArgsInfo && not (List.isEmpty (tcref.Typars m)) && typeNameResInfo.ResolutionFlag = ResolveTypeNamesToTypeRefs -> + let resInfo = + resInfo.AddWarning (fun (ResultTyparChecker typarChecker) -> + if not (typarChecker()) then + warning(Error(FSComp.SR.nrTypeInstantiationIsMissingAndCouldNotBeInferred(tcref.DisplayName, tcref.DisplayNameWithStaticParametersAndUnderscoreTypars), m))) + [(resInfo, tcref)] + + | _ -> tcrefs #if !NO_EXTENSIONTYPING - for (_,tcref) in tcrefs do + for (_, tcref) in tcrefs do // Type generators can't be returned by name resolution, unless PermitDirectReferenceToGeneratedType.Yes CheckForDirectReferenceToGeneratedType (tcref, genOk, m) #else genOk |> ignore #endif - tcrefs + tcrefs //------------------------------------------------------------------------- // Consume ids that refer to a namespace -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- /// Perform name resolution for an identifier which must resolve to be a namespace or module. -let rec ResolveLongIndentAsModuleOrNamespace sink atMostOne amap m first fullyQualified (nenv:NameResolutionEnv) ad (id:Ident) (rest:Ident list) isOpenDecl = +let rec ResolveLongIndentAsModuleOrNamespace sink atMostOne amap m first fullyQualified (nenv: NameResolutionEnv) ad (id: Ident) (rest: Ident list) isOpenDecl = if first && id.idText = MangledGlobalName then match rest with | [] -> @@ -1851,10 +1851,10 @@ let rec ResolveLongIndentAsModuleOrNamespace sink atMostOne amap m first fullyQu |> Seq.collect (fun e -> [e.DisplayName; e.DemangledModuleOrNamespaceName]) |> HashSet - UndefinedName(0,FSComp.SR.undefinedNameNamespaceOrModule,id,suggestModulesAndNamespaces)) - + UndefinedName(0, FSComp.SR.undefinedNameNamespaceOrModule, id, suggestModulesAndNamespaces)) + let mutable moduleNotFoundErrorCache = None - let moduleNotFound (modref: ModuleOrNamespaceRef) (mty:ModuleOrNamespaceType) (id:Ident) depth = + let moduleNotFound (modref: ModuleOrNamespaceRef) (mty: ModuleOrNamespaceType) (id: Ident) depth = match moduleNotFoundErrorCache with | Some (oldId, error) when oldId = id.idRange -> error | _ -> @@ -1863,8 +1863,8 @@ let rec ResolveLongIndentAsModuleOrNamespace sink atMostOne amap m first fullyQu |> Seq.filter (fun kv -> IsEntityAccessible amap m ad (modref.NestedTyconRef kv.Value)) |> Seq.collect (fun e -> [e.Value.DisplayName; e.Value.DemangledModuleOrNamespaceName]) |> HashSet - - let error = raze (UndefinedName(depth,FSComp.SR.undefinedNameNamespace,id,suggestNames)) + + let error = raze (UndefinedName(depth, FSComp.SR.undefinedNameNamespace, id, suggestNames)) moduleNotFoundErrorCache <- Some(id.idRange, error) error @@ -1876,9 +1876,9 @@ let rec ResolveLongIndentAsModuleOrNamespace sink atMostOne amap m first fullyQu match moduleOrNamespaces.TryGetValue id.idText with | true, modrefs -> /// Look through the sub-namespaces and/or modules - let rec look depth (modref: ModuleOrNamespaceRef) (mty:ModuleOrNamespaceType) (lid:Ident list) = - match lid with - | [] -> success (depth,modref,mty) + let rec look depth (modref: ModuleOrNamespaceRef) (mty: ModuleOrNamespaceType) (lid: Ident list) = + match lid with + | [] -> success (depth, modref, mty) | id :: rest -> match mty.ModulesAndNamespacesByDemangledName.TryGetValue id.idText with | true, mspec -> @@ -1890,162 +1890,162 @@ let rec ResolveLongIndentAsModuleOrNamespace sink atMostOne amap m first fullyQu moduleNotFound modref mty id depth | _ -> moduleNotFound modref mty id depth - - modrefs |> CollectResults2 atMostOne (fun modref -> + + modrefs |> CollectResults2 atMostOne (fun modref -> if IsEntityAccessible amap m ad modref then notifyNameResolution modref id.idRange look 1 modref modref.ModuleOrNamespaceType rest else - raze (namespaceNotFound.Force())) + raze (namespaceNotFound.Force())) | _ -> raze (namespaceNotFound.Force()) -let ResolveLongIndentAsModuleOrNamespaceThen sink atMostOne amap m fullyQualified (nenv:NameResolutionEnv) ad id rest isOpenDecl f = +let ResolveLongIndentAsModuleOrNamespaceThen sink atMostOne amap m fullyQualified (nenv: NameResolutionEnv) ad id rest isOpenDecl f = match ResolveLongIndentAsModuleOrNamespace sink ResultCollectionSettings.AllResults amap m true fullyQualified nenv ad id [] isOpenDecl with | Result modrefs -> match rest with - | [] -> error(Error(FSComp.SR.nrUnexpectedEmptyLongId(),id.idRange)) - | id2::rest2 -> + | [] -> error(Error(FSComp.SR.nrUnexpectedEmptyLongId(), id.idRange)) + | id2::rest2 -> modrefs - |> CollectResults2 atMostOne (fun (depth,modref,mty) -> - let resInfo = ResolutionInfo.Empty.AddEntity(id.idRange,modref) + |> CollectResults2 atMostOne (fun (depth, modref, mty) -> + let resInfo = ResolutionInfo.Empty.AddEntity(id.idRange, modref) f resInfo (depth+1) id.idRange modref mty id2 rest2) - | Exception err -> Exception err + | Exception err -> Exception err //------------------------------------------------------------------------- // Bind name used in "new Foo.Bar(...)" constructs -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- -let private ResolveObjectConstructorPrim (ncenv:NameResolver) edenv resInfo m ad ty = +let private ResolveObjectConstructorPrim (ncenv: NameResolver) edenv resInfo m ad ty = let g = ncenv.g let amap = ncenv.amap - if isDelegateTy g ty then - success (resInfo,Item.DelegateCtor ty) - else + if isDelegateTy g ty then + success (resInfo, Item.DelegateCtor ty) + else let ctorInfos = GetIntrinsicConstructorInfosOfType ncenv.InfoReader m ty - if isNil ctorInfos && isInterfaceTy g ty then + if isNil ctorInfos && isInterfaceTy g ty then success (resInfo, Item.FakeInterfaceCtor ty) - else - let defaultStructCtorInfo = + else + let defaultStructCtorInfo = if (not (ctorInfos |> List.exists (fun x -> x.IsNullary)) && - isStructTy g ty && - not (isRecdTy g ty) && - not (isUnionTy g ty)) - then - [DefaultStructCtor(g,ty)] + isStructTy g ty && + not (isRecdTy g ty) && + not (isUnionTy g ty)) + then + [DefaultStructCtor(g, ty)] else [] - if (isNil defaultStructCtorInfo && isNil ctorInfos) || (not (isAppTy g ty) && not (isAnyTupleTy g ty)) then - raze (Error(FSComp.SR.nrNoConstructorsAvailableForType(NicePrint.minimalStringOfType edenv ty),m)) - else - let ctorInfos = ctorInfos |> List.filter (IsMethInfoAccessible amap m ad) + if (isNil defaultStructCtorInfo && isNil ctorInfos) || (not (isAppTy g ty) && not (isAnyTupleTy g ty)) then + raze (Error(FSComp.SR.nrNoConstructorsAvailableForType(NicePrint.minimalStringOfType edenv ty), m)) + else + let ctorInfos = ctorInfos |> List.filter (IsMethInfoAccessible amap m ad) let metadataTy = convertToTypeWithMetadataIfPossible g ty - success (resInfo,Item.MakeCtorGroup ((tcrefOfAppTy g metadataTy).LogicalName, (defaultStructCtorInfo@ctorInfos))) + success (resInfo, Item.MakeCtorGroup ((tcrefOfAppTy g metadataTy).LogicalName, (defaultStructCtorInfo@ctorInfos))) /// Perform name resolution for an identifier which must resolve to be an object constructor. -let ResolveObjectConstructor (ncenv:NameResolver) edenv m ad ty = - ResolveObjectConstructorPrim (ncenv:NameResolver) edenv [] m ad ty |?> (fun (_resInfo,item) -> item) +let ResolveObjectConstructor (ncenv: NameResolver) edenv m ad ty = + ResolveObjectConstructorPrim (ncenv: NameResolver) edenv [] m ad ty |?> (fun (_resInfo, item) -> item) //------------------------------------------------------------------------- // Bind the "." notation (member lookup or lookup in a type) -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- /// Query the declared properties of a type (including inherited properties) -let IntrinsicPropInfosOfTypeInScope (infoReader:InfoReader) (optFilter, ad) findFlag m ty = +let IntrinsicPropInfosOfTypeInScope (infoReader: InfoReader) (optFilter, ad) findFlag m ty = let g = infoReader.g let amap = infoReader.amap let pinfos = GetIntrinsicPropInfoSetsOfType infoReader (optFilter, ad, AllowMultiIntfInstantiations.Yes) findFlag m ty - let pinfos = pinfos |> ExcludeHiddenOfPropInfos g amap m + let pinfos = pinfos |> ExcludeHiddenOfPropInfos g amap m pinfos -/// Select from a list of extension properties -let SelectPropInfosFromExtMembers (infoReader:InfoReader,ad,optFilter) declaringTy m extMemInfos = +/// Select from a list of extension properties +let SelectPropInfosFromExtMembers (infoReader: InfoReader, ad, optFilter) declaringTy m extMemInfos = let g = infoReader.g let amap = infoReader.amap // NOTE: multiple "open"'s push multiple duplicate values into eIndexedExtensionMembers, hence setify. let seen = HashSet(ExtensionMember.Comparer g) - let propCollector = new PropertyCollector(g,amap,m,declaringTy,optFilter,ad) + let propCollector = new PropertyCollector(g, amap, m, declaringTy, optFilter, ad) for emem in extMemInfos do if seen.Add emem then - match emem with - | FSExtMem (vref,_pri) -> - match vref.MemberInfo with + match emem with + | FSExtMem (vref, _pri) -> + match vref.MemberInfo with | None -> () - | Some membInfo -> propCollector.Collect(membInfo,vref) - | ILExtMem _ -> + | Some membInfo -> propCollector.Collect(membInfo, vref) + | ILExtMem _ -> // No extension properties coming from .NET () propCollector.Close() /// Query the available extension properties of a type (including extension properties for inherited types) -let ExtensionPropInfosOfTypeInScope (infoReader:InfoReader) (nenv: NameResolutionEnv) (optFilter, ad) m ty = +let ExtensionPropInfosOfTypeInScope (infoReader: InfoReader) (nenv: NameResolutionEnv) (optFilter, ad) m ty = let g = infoReader.g - - let extMemsFromHierarchy = - infoReader.GetEntireTypeHierachy(AllowMultiIntfInstantiations.Yes,m,ty) |> List.collect (fun ty -> - if isAppTy g ty then + + let extMemsFromHierarchy = + infoReader.GetEntireTypeHierachy(AllowMultiIntfInstantiations.Yes, m, ty) |> List.collect (fun ty -> + if isAppTy g ty then let tcref = tcrefOfAppTy g ty let extMemInfos = nenv.eIndexedExtensionMembers.Find tcref - SelectPropInfosFromExtMembers (infoReader,ad,optFilter) ty m extMemInfos + SelectPropInfosFromExtMembers (infoReader, ad, optFilter) ty m extMemInfos else []) - let extMemsDangling = SelectPropInfosFromExtMembers (infoReader,ad,optFilter) ty m nenv.eUnindexedExtensionMembers + let extMemsDangling = SelectPropInfosFromExtMembers (infoReader, ad, optFilter) ty m nenv.eUnindexedExtensionMembers extMemsDangling @ extMemsFromHierarchy /// Get all the available properties of a type (both intrinsic and extension) let AllPropInfosOfTypeInScope infoReader nenv (optFilter, ad) findFlag m ty = IntrinsicPropInfosOfTypeInScope infoReader (optFilter, ad) findFlag m ty - @ ExtensionPropInfosOfTypeInScope infoReader nenv (optFilter, ad) m ty + @ ExtensionPropInfosOfTypeInScope infoReader nenv (optFilter, ad) m ty /// Get the available methods of a type (both declared and inherited) -let IntrinsicMethInfosOfType (infoReader:InfoReader) (optFilter,ad,allowMultiIntfInst) findFlag m ty = +let IntrinsicMethInfosOfType (infoReader: InfoReader) (optFilter, ad, allowMultiIntfInst) findFlag m ty = let g = infoReader.g let amap = infoReader.amap - let minfos = GetIntrinsicMethInfoSetsOfType infoReader (optFilter,ad,allowMultiIntfInst) findFlag m ty + let minfos = GetIntrinsicMethInfoSetsOfType infoReader (optFilter, ad, allowMultiIntfInst) findFlag m ty let minfos = minfos |> ExcludeHiddenOfMethInfos g amap m minfos /// Select from a list of extension methods -let SelectMethInfosFromExtMembers (infoReader:InfoReader) optFilter apparentTy m extMemInfos = +let SelectMethInfosFromExtMembers (infoReader: InfoReader) optFilter apparentTy m extMemInfos = let g = infoReader.g - // NOTE: multiple "open"'s push multiple duplicate values into eIndexedExtensionMembers + // NOTE: multiple "open"'s push multiple duplicate values into eIndexedExtensionMembers let seen = HashSet(ExtensionMember.Comparer g) [ for emem in extMemInfos do if seen.Add emem then - match emem with - | FSExtMem (vref,pri) -> - match vref.MemberInfo with + match emem with + | FSExtMem (vref, pri) -> + match vref.MemberInfo with | None -> () - | Some membInfo -> + | Some membInfo -> match TrySelectMemberVal g optFilter apparentTy (Some pri) membInfo vref with | Some m -> yield m | _ -> () - | ILExtMem (actualParent,minfo,pri) when (match optFilter with None -> true | Some nm -> nm = minfo.LogicalName) -> + | ILExtMem (actualParent, minfo, pri) when (match optFilter with None -> true | Some nm -> nm = minfo.LogicalName) -> // Make a reference to the type containing the extension members - match minfo with - | ILMeth(_,ilminfo,_) -> + match minfo with + | ILMeth(_, ilminfo, _) -> yield (MethInfo.CreateILExtensionMeth (infoReader.amap, m, apparentTy, actualParent, Some pri, ilminfo.RawMetadata)) // F#-defined IL-style extension methods are not seen as extension methods in F# code - | FSMeth(g,_,vref,_) -> + | FSMeth(g, _, vref, _) -> yield (FSMeth(g, apparentTy, vref, Some pri)) #if !NO_EXTENSIONTYPING // // Provided extension methods are not yet supported - | ProvidedMeth(amap,providedMeth,_,m) -> - yield (ProvidedMeth(amap, providedMeth, Some pri,m)) + | ProvidedMeth(amap, providedMeth, _, m) -> + yield (ProvidedMeth(amap, providedMeth, Some pri, m)) #endif - | DefaultStructCtor _ -> + | DefaultStructCtor _ -> () | _ -> () ] /// Query the available extension properties of a methods (including extension methods for inherited types) -let ExtensionMethInfosOfTypeInScope (infoReader:InfoReader) (nenv: NameResolutionEnv) optFilter m ty = +let ExtensionMethInfosOfTypeInScope (infoReader: InfoReader) (nenv: NameResolutionEnv) optFilter m ty = let extMemsDangling = SelectMethInfosFromExtMembers infoReader optFilter ty m nenv.eUnindexedExtensionMembers - let extMemsFromHierarchy = - infoReader.GetEntireTypeHierachy(AllowMultiIntfInstantiations.Yes,m,ty) |> List.collect (fun ty -> + let extMemsFromHierarchy = + infoReader.GetEntireTypeHierachy(AllowMultiIntfInstantiations.Yes, m, ty) |> List.collect (fun ty -> let g = infoReader.g - if isAppTy g ty then + if isAppTy g ty then let tcref = tcrefOfAppTy g ty let extValRefs = nenv.eIndexedExtensionMembers.Find tcref SelectMethInfosFromExtMembers infoReader optFilter ty m extValRefs @@ -2053,9 +2053,9 @@ let ExtensionMethInfosOfTypeInScope (infoReader:InfoReader) (nenv: NameResolutio extMemsDangling @ extMemsFromHierarchy /// Get all the available methods of a type (both intrinsic and extension) -let AllMethInfosOfTypeInScope infoReader nenv (optFilter,ad) findFlag m ty = - IntrinsicMethInfosOfType infoReader (optFilter,ad,AllowMultiIntfInstantiations.Yes) findFlag m ty - @ ExtensionMethInfosOfTypeInScope infoReader nenv optFilter m ty +let AllMethInfosOfTypeInScope infoReader nenv (optFilter, ad) findFlag m ty = + IntrinsicMethInfosOfType infoReader (optFilter, ad, AllowMultiIntfInstantiations.Yes) findFlag m ty + @ ExtensionMethInfosOfTypeInScope infoReader nenv optFilter m ty /// Used to report an error condition where name resolution failed due to an indeterminate type @@ -2063,7 +2063,7 @@ exception IndeterminateType of range /// Indicates the kind of lookup being performed. Note, this type should be made private to nameres.fs. [] -type LookupKind = +type LookupKind = | RecdField | Pattern | Expr @@ -2074,49 +2074,49 @@ type LookupKind = /// Try to find a union case of a type, with the given name let TryFindUnionCaseOfType g ty nm = match tryAppTy g ty with - | ValueSome(tcref,tinst) -> - match tcref.GetUnionCaseByName nm with + | ValueSome(tcref, tinst) -> + match tcref.GetUnionCaseByName nm with | None -> ValueNone - | Some ucase -> ValueSome(UnionCaseInfo(tinst,tcref.MakeNestedUnionCaseRef ucase)) + | Some ucase -> ValueSome(UnionCaseInfo(tinst, tcref.MakeNestedUnionCaseRef ucase)) | _ -> ValueNone /// Try to find a union case of a type, with the given name let TryFindAnonRecdFieldOfType g typ nm = - match tryDestAnonRecdTy g typ with - | ValueSome (anonInfo, tys) -> - match anonInfo.SortedIds |> Array.tryFindIndex (fun x -> x.idText = nm) with + match tryDestAnonRecdTy g typ with + | ValueSome (anonInfo, tys) -> + match anonInfo.SortedIds |> Array.tryFindIndex (fun x -> x.idText = nm) with | Some i -> Some (Item.AnonRecdField(anonInfo, tys, i, anonInfo.SortedIds.[i].idRange)) | None -> None | ValueNone -> None -let CoreDisplayName(pinfo:PropInfo) = +let CoreDisplayName(pinfo: PropInfo) = match pinfo with - | FSProp(_,_,_,Some set) -> set.CoreDisplayName - | FSProp(_,_,Some get,_) -> get.CoreDisplayName + | FSProp(_, _, _, Some set) -> set.CoreDisplayName + | FSProp(_, _, Some get, _) -> get.CoreDisplayName | FSProp _ -> failwith "unexpected (property must have either getter or setter)" - | ILProp(ILPropInfo(_,def)) -> def.Name + | ILProp(ILPropInfo(_, def)) -> def.Name #if !NO_EXTENSIONTYPING - | ProvidedProp(_,pi,m) -> pi.PUntaint((fun pi -> pi.Name), m) + | ProvidedProp(_, pi, m) -> pi.PUntaint((fun pi -> pi.Name), m) #endif -let DecodeFSharpEvent (pinfos:PropInfo list) ad g (ncenv:NameResolver) m = - match pinfos with - | [pinfo] when pinfo.IsFSharpEventProperty -> +let DecodeFSharpEvent (pinfos: PropInfo list) ad g (ncenv: NameResolver) m = + match pinfos with + | [pinfo] when pinfo.IsFSharpEventProperty -> let nm = CoreDisplayName(pinfo) - let minfos1 = GetImmediateIntrinsicMethInfosOfType (Some("add_"+nm),ad) g ncenv.amap m pinfo.ApparentEnclosingType - let minfos2 = GetImmediateIntrinsicMethInfosOfType (Some("remove_"+nm),ad) g ncenv.amap m pinfo.ApparentEnclosingType - match minfos1,minfos2 with - | [FSMeth(_,_,addValRef,_)],[FSMeth(_,_,removeValRef,_)] -> + let minfos1 = GetImmediateIntrinsicMethInfosOfType (Some("add_"+nm), ad) g ncenv.amap m pinfo.ApparentEnclosingType + let minfos2 = GetImmediateIntrinsicMethInfosOfType (Some("remove_"+nm), ad) g ncenv.amap m pinfo.ApparentEnclosingType + match minfos1, minfos2 with + | [FSMeth(_, _, addValRef, _)], [FSMeth(_, _, removeValRef, _)] -> // FOUND PROPERTY-AS-EVENT AND CORRESPONDING ADD/REMOVE METHODS - Some(Item.Event(FSEvent(g,pinfo,addValRef,removeValRef))) - | _ -> + Some(Item.Event(FSEvent(g, pinfo, addValRef, removeValRef))) + | _ -> // FOUND PROPERTY-AS-EVENT BUT DIDN'T FIND CORRESPONDING ADD/REMOVE METHODS - Some(Item.Property (nm,pinfos)) - | pinfo :: _ -> + Some(Item.Property (nm, pinfos)) + | pinfo :: _ -> let nm = CoreDisplayName(pinfo) - Some(Item.Property (nm,pinfos)) - | _ -> + Some(Item.Property (nm, pinfos)) + | _ -> None /// Returns all record label names for the given type. @@ -2129,104 +2129,104 @@ let GetRecordLabelsForType g nenv ty = result.Add k |> ignore result -// REVIEW: this shows up on performance logs. Consider for example endless resolutions of "List.map" to +// REVIEW: this shows up on performance logs. Consider for example endless resolutions of "List.map" to // the empty set of results, or "x.Length" for a list or array type. This indicates it could be worth adding a cache here. -let rec ResolveLongIdentInTypePrim (ncenv:NameResolver) nenv lookupKind (resInfo:ResolutionInfo) depth m ad (id:Ident) (rest:Ident list) findFlag (typeNameResInfo: TypeNameResolutionInfo) ty = +let rec ResolveLongIdentInTypePrim (ncenv: NameResolver) nenv lookupKind (resInfo: ResolutionInfo) depth m ad (id: Ident) (rest: Ident list) findFlag (typeNameResInfo: TypeNameResolutionInfo) ty = let g = ncenv.g let m = unionRanges m id.idRange - let nm = id.idText // used to filter the searches of the tables - let optFilter = Some nm // used to filter the searches of the tables - let contentsSearchAccessible = - let unionCaseSearch = - match lookupKind with - | LookupKind.Expr | LookupKind.Pattern -> TryFindUnionCaseOfType g ty nm + let nm = id.idText // used to filter the searches of the tables + let optFilter = Some nm // used to filter the searches of the tables + let contentsSearchAccessible = + let unionCaseSearch = + match lookupKind with + | LookupKind.Expr | LookupKind.Pattern -> TryFindUnionCaseOfType g ty nm | _ -> ValueNone - // Lookup: datatype constructors take precedence - match unionCaseSearch with - | ValueSome ucase -> - OneResult (success(resInfo,Item.UnionCase(ucase,false),rest)) - | ValueNone -> - let anonRecdSearch = - match lookupKind with + // Lookup: datatype constructors take precedence + match unionCaseSearch with + | ValueSome ucase -> + OneResult (success(resInfo, Item.UnionCase(ucase, false), rest)) + | ValueNone -> + let anonRecdSearch = + match lookupKind with | LookupKind.Expr -> TryFindAnonRecdFieldOfType g ty nm | _ -> None - match anonRecdSearch with - | Some item -> + match anonRecdSearch with + | Some item -> OneResult (success(resInfo, item, rest)) - | None -> + | None -> let isLookUpExpr = (lookupKind = LookupKind.Expr) - match TryFindIntrinsicNamedItemOfType ncenv.InfoReader (nm,ad) findFlag m ty with - | Some (PropertyItem psets) when isLookUpExpr -> + match TryFindIntrinsicNamedItemOfType ncenv.InfoReader (nm, ad) findFlag m ty with + | Some (PropertyItem psets) when isLookUpExpr -> let pinfos = psets |> ExcludeHiddenOfPropInfos g ncenv.amap m - + // fold the available extension members into the overload resolution - let extensionPropInfos = ExtensionPropInfosOfTypeInScope ncenv.InfoReader nenv (optFilter,ad) m ty - + let extensionPropInfos = ExtensionPropInfosOfTypeInScope ncenv.InfoReader nenv (optFilter, ad) m ty + // make sure to keep the intrinsic pinfos before the extension pinfos in the list, // since later on this logic is used when giving preference to intrinsic definitions match DecodeFSharpEvent (pinfos@extensionPropInfos) ad g ncenv m with | Some x -> success [resInfo, x, rest] - | None -> raze (UndefinedName (depth,FSComp.SR.undefinedNameFieldConstructorOrMember, id,NoSuggestions)) + | None -> raze (UndefinedName (depth, FSComp.SR.undefinedNameFieldConstructorOrMember, id, NoSuggestions)) - | Some(MethodItem msets) when isLookUpExpr -> + | Some(MethodItem msets) when isLookUpExpr -> let minfos = msets |> ExcludeHiddenOfMethInfos g ncenv.amap m - + // fold the available extension members into the overload resolution let extensionMethInfos = ExtensionMethInfosOfTypeInScope ncenv.InfoReader nenv optFilter m ty - success [resInfo,Item.MakeMethGroup (nm,minfos@extensionMethInfos),rest] - | Some (ILFieldItem (finfo:: _)) when (match lookupKind with LookupKind.Expr | LookupKind.Pattern -> true | _ -> false) -> - success [resInfo,Item.ILField finfo,rest] + success [resInfo, Item.MakeMethGroup (nm, minfos@extensionMethInfos), rest] + | Some (ILFieldItem (finfo:: _)) when (match lookupKind with LookupKind.Expr | LookupKind.Pattern -> true | _ -> false) -> + success [resInfo, Item.ILField finfo, rest] - | Some (EventItem (einfo :: _)) when isLookUpExpr -> - success [resInfo,Item.Event einfo,rest] + | Some (EventItem (einfo :: _)) when isLookUpExpr -> + success [resInfo, Item.Event einfo, rest] - | Some (RecdFieldItem (rfinfo)) when (match lookupKind with LookupKind.Expr | LookupKind.RecdField | LookupKind.Pattern -> true | _ -> false) -> - success [resInfo,Item.RecdField(rfinfo),rest] + | Some (RecdFieldItem (rfinfo)) when (match lookupKind with LookupKind.Expr | LookupKind.RecdField | LookupKind.Pattern -> true | _ -> false) -> + success [resInfo, Item.RecdField(rfinfo), rest] | _ -> let pinfos = ExtensionPropInfosOfTypeInScope ncenv.InfoReader nenv (optFilter, ad) m ty - if not (isNil pinfos) && isLookUpExpr then OneResult(success (resInfo,Item.Property (nm,pinfos),rest)) else + if not (isNil pinfos) && isLookUpExpr then OneResult(success (resInfo, Item.Property (nm, pinfos), rest)) else let minfos = ExtensionMethInfosOfTypeInScope ncenv.InfoReader nenv optFilter m ty - if not (isNil minfos) && isLookUpExpr then - success [resInfo,Item.MakeMethGroup (nm,minfos),rest] + if not (isNil minfos) && isLookUpExpr then + success [resInfo, Item.MakeMethGroup (nm, minfos), rest] elif isTyparTy g ty then raze (IndeterminateType(unionRanges m id.idRange)) else NoResultsOrUsefulErrors match contentsSearchAccessible with | Result res when not (isNil res) -> contentsSearchAccessible | Exception _ -> contentsSearchAccessible - | _ -> - - let nestedSearchAccessible = + | _ -> + + let nestedSearchAccessible = match rest with | [] -> let nestedTypes = GetNestedTypesOfType (ad, ncenv, Some nm, typeNameResInfo.StaticArgsInfo, true, m) ty - if isNil nestedTypes then + if isNil nestedTypes then NoResultsOrUsefulErrors - else - match typeNameResInfo.ResolutionFlag with - | ResolveTypeNamesToCtors -> - nestedTypes - |> CollectAtMostOneResult (ResolveObjectConstructorPrim ncenv nenv.eDisplayEnv resInfo m ad) - |> MapResults (fun (resInfo,item) -> (resInfo,item,[])) - | ResolveTypeNamesToTypeRefs -> - OneSuccess (resInfo,Item.Types (nm,nestedTypes),rest) + else + match typeNameResInfo.ResolutionFlag with + | ResolveTypeNamesToCtors -> + nestedTypes + |> CollectAtMostOneResult (ResolveObjectConstructorPrim ncenv nenv.eDisplayEnv resInfo m ad) + |> MapResults (fun (resInfo, item) -> (resInfo, item, [])) + | ResolveTypeNamesToTypeRefs -> + OneSuccess (resInfo, Item.Types (nm, nestedTypes), rest) | id2::rest2 -> let nestedTypes = GetNestedTypesOfType (ad, ncenv, Some nm, TypeNameResolutionStaticArgsInfo.Indefinite, true, m) ty ResolveLongIdentInNestedTypes ncenv nenv lookupKind resInfo (depth+1) id m ad id2 rest2 findFlag typeNameResInfo nestedTypes match nestedSearchAccessible with | Result res when not (isNil res) -> nestedSearchAccessible - | _ -> - let suggestMembers() = + | _ -> + let suggestMembers() = let suggestions1 = - ExtensionPropInfosOfTypeInScope ncenv.InfoReader nenv (None, ad) m ty + ExtensionPropInfosOfTypeInScope ncenv.InfoReader nenv (None, ad) m ty |> List.map (fun p -> p.PropertyName) - + let suggestions2 = ExtensionMethInfosOfTypeInScope ncenv.InfoReader nenv None m ty |> List.map (fun m -> m.DisplayName) @@ -2243,17 +2243,17 @@ let rec ResolveLongIdentInTypePrim (ncenv:NameResolver) nenv lookupKind (resInfo let suggestions5 = GetRecordLabelsForType g nenv ty let suggestions6 = - match lookupKind with + match lookupKind with | LookupKind.Expr | LookupKind.Pattern -> - if isAppTy g ty then + if isAppTy g ty then let tcref = tcrefOfAppTy g ty tcref.UnionCasesArray |> Array.map (fun uc -> uc.DisplayName) - else + else [||] | _ -> [||] - - [ yield! suggestions1 + + [ yield! suggestions1 yield! suggestions2 yield! suggestions3 yield! suggestions4 @@ -2261,112 +2261,112 @@ let rec ResolveLongIdentInTypePrim (ncenv:NameResolver) nenv lookupKind (resInfo yield! suggestions6 ] |> HashSet - raze (UndefinedName (depth,FSComp.SR.undefinedNameFieldConstructorOrMember, id, suggestMembers)) - -and ResolveLongIdentInNestedTypes (ncenv:NameResolver) nenv lookupKind resInfo depth id m ad (id2:Ident) (rest:Ident list) findFlag typeNameResInfo tys = - tys - |> CollectAtMostOneResult (fun ty -> - let resInfo = if isAppTy ncenv.g ty then resInfo.AddEntity(id.idRange,tcrefOfAppTy ncenv.g ty) else resInfo - ResolveLongIdentInTypePrim ncenv nenv lookupKind resInfo depth m ad id2 rest findFlag typeNameResInfo ty - |> AtMostOneResult m) + raze (UndefinedName (depth, FSComp.SR.undefinedNameFieldConstructorOrMember, id, suggestMembers)) + +and ResolveLongIdentInNestedTypes (ncenv: NameResolver) nenv lookupKind resInfo depth id m ad (id2: Ident) (rest: Ident list) findFlag typeNameResInfo tys = + tys + |> CollectAtMostOneResult (fun ty -> + let resInfo = if isAppTy ncenv.g ty then resInfo.AddEntity(id.idRange, tcrefOfAppTy ncenv.g ty) else resInfo + ResolveLongIdentInTypePrim ncenv nenv lookupKind resInfo depth m ad id2 rest findFlag typeNameResInfo ty + |> AtMostOneResult m) /// Resolve a long identifier using type-qualified name resolution. let ResolveLongIdentInType sink ncenv nenv lookupKind m ad id findFlag typeNameResInfo ty = - let resInfo,item,rest = - ResolveLongIdentInTypePrim (ncenv:NameResolver) nenv lookupKind ResolutionInfo.Empty 0 m ad id [] findFlag typeNameResInfo ty + let resInfo, item, rest = + ResolveLongIdentInTypePrim (ncenv: NameResolver) nenv lookupKind ResolutionInfo.Empty 0 m ad id [] findFlag typeNameResInfo ty |> AtMostOneResult m |> ForceRaise - ResolutionInfo.SendEntityPathToSink (sink,ncenv,nenv,ItemOccurence.UseInType,ad,resInfo,ResultTyparChecker(fun () -> CheckAllTyparsInferrable ncenv.amap m item)) - item,rest + ResolutionInfo.SendEntityPathToSink (sink, ncenv, nenv, ItemOccurence.UseInType, ad, resInfo, ResultTyparChecker(fun () -> CheckAllTyparsInferrable ncenv.amap m item)) + item, rest -let private ResolveLongIdentInTyconRef (ncenv:NameResolver) nenv lookupKind resInfo depth m ad id rest typeNameResInfo tcref = +let private ResolveLongIdentInTyconRef (ncenv: NameResolver) nenv lookupKind resInfo depth m ad id rest typeNameResInfo tcref = #if !NO_EXTENSIONTYPING // No dotting through type generators to get to a member! CheckForDirectReferenceToGeneratedType (tcref, PermitDirectReferenceToGeneratedType.No, m) #endif let ty = FreshenTycon ncenv m tcref - ty |> ResolveLongIdentInTypePrim ncenv nenv lookupKind resInfo depth m ad id rest IgnoreOverrides typeNameResInfo + ty |> ResolveLongIdentInTypePrim ncenv nenv lookupKind resInfo depth m ad id rest IgnoreOverrides typeNameResInfo -let private ResolveLongIdentInTyconRefs atMostOne (ncenv:NameResolver) nenv lookupKind depth m ad id rest typeNameResInfo idRange tcrefs = - tcrefs |> CollectResults2 atMostOne (fun (resInfo:ResolutionInfo,tcref) -> - let resInfo = resInfo.AddEntity(idRange,tcref) - tcref |> ResolveLongIdentInTyconRef ncenv nenv lookupKind resInfo depth m ad id rest typeNameResInfo |> AtMostOneResult m) +let private ResolveLongIdentInTyconRefs atMostOne (ncenv: NameResolver) nenv lookupKind depth m ad id rest typeNameResInfo idRange tcrefs = + tcrefs |> CollectResults2 atMostOne (fun (resInfo: ResolutionInfo, tcref) -> + let resInfo = resInfo.AddEntity(idRange, tcref) + tcref |> ResolveLongIdentInTyconRef ncenv nenv lookupKind resInfo depth m ad id rest typeNameResInfo |> AtMostOneResult m) //------------------------------------------------------------------------- -// ResolveExprLongIdentInModuleOrNamespace -//------------------------------------------------------------------------- +// ResolveExprLongIdentInModuleOrNamespace +//------------------------------------------------------------------------- -let (|AccessibleEntityRef|_|) amap m ad (modref: ModuleOrNamespaceRef) mspec = +let (|AccessibleEntityRef|_|) amap m ad (modref: ModuleOrNamespaceRef) mspec = let eref = modref.NestedTyconRef mspec if IsEntityAccessible amap m ad eref then Some eref else None -let rec ResolveExprLongIdentInModuleOrNamespace (ncenv:NameResolver) nenv (typeNameResInfo: TypeNameResolutionInfo) ad resInfo depth m modref (mty:ModuleOrNamespaceType) (id:Ident) (rest :Ident list) = +let rec ResolveExprLongIdentInModuleOrNamespace (ncenv: NameResolver) nenv (typeNameResInfo: TypeNameResolutionInfo) ad resInfo depth m modref (mty: ModuleOrNamespaceType) (id: Ident) (rest: Ident list) = // resInfo records the modules or namespaces actually relevant to a resolution let m = unionRanges m id.idRange match mty.AllValsByLogicalName.TryGetValue id.idText with - | true, vspec when IsValAccessible ad (mkNestedValRef modref vspec) -> - success(resInfo,Item.Value (mkNestedValRef modref vspec),rest) + | true, vspec when IsValAccessible ad (mkNestedValRef modref vspec) -> + success(resInfo, Item.Value (mkNestedValRef modref vspec), rest) | _-> match mty.ExceptionDefinitionsByDemangledName.TryGetValue id.idText with - | true, excon when IsTyconReprAccessible ncenv.amap m ad (modref.NestedTyconRef excon) -> - success (resInfo,Item.ExnCase (modref.NestedTyconRef excon),rest) + | true, excon when IsTyconReprAccessible ncenv.amap m ad (modref.NestedTyconRef excon) -> + success (resInfo, Item.ExnCase (modref.NestedTyconRef excon), rest) | _ -> // Something in a discriminated union without RequireQualifiedAccess attribute? - let unionSearch,hasRequireQualifiedAccessAttribute = + let unionSearch, hasRequireQualifiedAccessAttribute = match TryFindTypeWithUnionCase modref id with - | Some tycon when IsTyconReprAccessible ncenv.amap m ad (modref.NestedTyconRef tycon) -> + | Some tycon when IsTyconReprAccessible ncenv.amap m ad (modref.NestedTyconRef tycon) -> let ucref = mkUnionCaseRef (modref.NestedTyconRef tycon) id.idText let ucinfo = FreshenUnionCaseRef ncenv m ucref let hasRequireQualifiedAccessAttribute = HasFSharpAttribute ncenv.g ncenv.g.attrib_RequireQualifiedAccessAttribute tycon.Attribs - success [resInfo,Item.UnionCase(ucinfo,hasRequireQualifiedAccessAttribute),rest],hasRequireQualifiedAccessAttribute - | _ -> NoResultsOrUsefulErrors,false + success [resInfo, Item.UnionCase(ucinfo, hasRequireQualifiedAccessAttribute), rest], hasRequireQualifiedAccessAttribute + | _ -> NoResultsOrUsefulErrors, false match unionSearch with | Result (res :: _) when not hasRequireQualifiedAccessAttribute -> success res | _ -> // Something in a type? - let tyconSearch = + let tyconSearch = let tcrefs = LookupTypeNameInEntityMaybeHaveArity (ncenv.amap, id.idRange, ad, id.idText, (if isNil rest then typeNameResInfo.StaticArgsInfo else TypeNameResolutionStaticArgsInfo.Indefinite), modref) if isNil tcrefs then NoResultsOrUsefulErrors else - let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo,tcref)) + let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo, tcref)) match rest with | id2::rest2 -> - let tcrefs = - let typeNameResInfo = TypeNameResolutionInfo (ResolveTypeNamesToTypeRefs,TypeNameResolutionStaticArgsInfo.Indefinite) + let tcrefs = + let typeNameResInfo = TypeNameResolutionInfo (ResolveTypeNamesToTypeRefs, TypeNameResolutionStaticArgsInfo.Indefinite) CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (tcrefs, typeNameResInfo, PermitDirectReferenceToGeneratedType.No, unionRanges m id.idRange) ResolveLongIdentInTyconRefs ResultCollectionSettings.AtMostOneResult ncenv nenv LookupKind.Expr (depth+1) m ad id2 rest2 typeNameResInfo id.idRange tcrefs - // Check if we've got some explicit type arguments + // Check if we've got some explicit type arguments | _ -> let tcrefs = CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (tcrefs, typeNameResInfo, PermitDirectReferenceToGeneratedType.No, unionRanges m id.idRange) - match typeNameResInfo.ResolutionFlag with - | ResolveTypeNamesToTypeRefs -> - success [ for (resInfo,tcref) in tcrefs do - let ty = FreshenTycon ncenv m tcref - let item = (resInfo,Item.Types(id.idText,[ty]),[]) + match typeNameResInfo.ResolutionFlag with + | ResolveTypeNamesToTypeRefs -> + success [ for (resInfo, tcref) in tcrefs do + let ty = FreshenTycon ncenv m tcref + let item = (resInfo, Item.Types(id.idText, [ty]), []) yield item ] - | ResolveTypeNamesToCtors -> - tcrefs - |> List.map (fun (resInfo, tcref) -> resInfo, FreshenTycon ncenv m tcref) - |> CollectAtMostOneResult (fun (resInfo,ty) -> ResolveObjectConstructorPrim ncenv nenv.eDisplayEnv resInfo id.idRange ad ty) - |> MapResults (fun (resInfo,item) -> (resInfo,item,[])) + | ResolveTypeNamesToCtors -> + tcrefs + |> List.map (fun (resInfo, tcref) -> resInfo, FreshenTycon ncenv m tcref) + |> CollectAtMostOneResult (fun (resInfo, ty) -> ResolveObjectConstructorPrim ncenv nenv.eDisplayEnv resInfo id.idRange ad ty) + |> MapResults (fun (resInfo, item) -> (resInfo, item, [])) - // Something in a sub-namespace or sub-module - let moduleSearch() = + // Something in a sub-namespace or sub-module + let moduleSearch() = match rest with | id2::rest2 -> match mty.ModulesAndNamespacesByDemangledName.TryGetValue id.idText with - | true, AccessibleEntityRef ncenv.amap m ad modref submodref -> - let resInfo = resInfo.AddEntity(id.idRange,submodref) + | true, AccessibleEntityRef ncenv.amap m ad modref submodref -> + let resInfo = resInfo.AddEntity(id.idRange, submodref) OneResult (ResolveExprLongIdentInModuleOrNamespace ncenv nenv typeNameResInfo ad resInfo (depth+1) m submodref submodref.ModuleOrNamespaceType id2 rest2) - | _ -> + | _ -> NoResultsOrUsefulErrors | _ -> NoResultsOrUsefulErrors @@ -2374,7 +2374,7 @@ let rec ResolveExprLongIdentInModuleOrNamespace (ncenv:NameResolver) nenv (typeN match tyconSearch +++ moduleSearch +++ (fun _ -> unionSearch) with | Result [] -> let suggestPossibleTypesAndNames() = - let types = + let types = modref.ModuleOrNamespaceType.AllEntities |> Seq.filter (fun e -> IsEntityAccessible ncenv.amap m ad (modref.NestedTyconRef e)) |> Seq.map (fun e -> e.DisplayName) @@ -2383,7 +2383,7 @@ let rec ResolveExprLongIdentInModuleOrNamespace (ncenv:NameResolver) nenv (typeN mty.ModulesAndNamespacesByDemangledName |> Seq.filter (fun kv -> IsEntityAccessible ncenv.amap m ad (modref.NestedTyconRef kv.Value)) |> Seq.map (fun e -> e.Value.DisplayName) - + let unions = modref.ModuleOrNamespaceType.AllEntities |> Seq.collect (fun tycon -> @@ -2394,16 +2394,16 @@ let rec ResolveExprLongIdentInModuleOrNamespace (ncenv:NameResolver) nenv (typeN tycon.UnionCasesArray) |> Seq.map (fun uc -> uc.DisplayName) - let vals = + let vals = modref.ModuleOrNamespaceType.AllValsByLogicalName |> Seq.filter (fun e -> IsValAccessible ad (mkNestedValRef modref e.Value)) |> Seq.map (fun e -> e.Value.DisplayName) - + let exns = modref.ModuleOrNamespaceType.ExceptionDefinitionsByDemangledName |> Seq.filter (fun e -> IsTyconReprAccessible ncenv.amap m ad (modref.NestedTyconRef e.Value)) |> Seq.map (fun e -> e.Value.DisplayName) - + [ yield! types yield! submodules yield! unions @@ -2411,28 +2411,28 @@ let rec ResolveExprLongIdentInModuleOrNamespace (ncenv:NameResolver) nenv (typeN yield! exns ] |> HashSet - raze (UndefinedName(depth,FSComp.SR.undefinedNameValueConstructorNamespaceOrType,id,suggestPossibleTypesAndNames)) + raze (UndefinedName(depth, FSComp.SR.undefinedNameValueConstructorNamespaceOrType, id, suggestPossibleTypesAndNames)) | results -> AtMostOneResult id.idRange results -/// An identifier has resolved to a type name in an expression (corresponding to one or more TyconRefs). +/// An identifier has resolved to a type name in an expression (corresponding to one or more TyconRefs). /// Return either a set of constructors (later refined by overload resolution), or a set of TyconRefs. -let ChooseTyconRefInExpr (ncenv:NameResolver, m, ad, nenv, id:Ident, typeNameResInfo:TypeNameResolutionInfo, resInfo:ResolutionInfo, tcrefs) = - let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo,tcref)) +let ChooseTyconRefInExpr (ncenv: NameResolver, m, ad, nenv, id: Ident, typeNameResInfo: TypeNameResolutionInfo, resInfo: ResolutionInfo, tcrefs) = + let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo, tcref)) let tcrefs = CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (tcrefs, typeNameResInfo, PermitDirectReferenceToGeneratedType.No, m) - match typeNameResInfo.ResolutionFlag with + match typeNameResInfo.ResolutionFlag with | ResolveTypeNamesToCtors -> - let tys = tcrefs |> List.map (fun (resInfo,tcref) -> (resInfo,FreshenTycon ncenv m tcref)) - tys - |> CollectAtMostOneResult (fun (resInfo,ty) -> ResolveObjectConstructorPrim ncenv nenv.eDisplayEnv resInfo id.idRange ad ty) - |> MapResults (fun (resInfo,item) -> (resInfo,item,[])) + let tys = tcrefs |> List.map (fun (resInfo, tcref) -> (resInfo, FreshenTycon ncenv m tcref)) + tys + |> CollectAtMostOneResult (fun (resInfo, ty) -> ResolveObjectConstructorPrim ncenv nenv.eDisplayEnv resInfo id.idRange ad ty) + |> MapResults (fun (resInfo, item) -> (resInfo, item, [])) | ResolveTypeNamesToTypeRefs -> - let tys = tcrefs |> List.map (fun (resInfo,tcref) -> (resInfo,FreshenTycon ncenv m tcref)) - success (tys |> List.map (fun (resInfo,ty) -> (resInfo,Item.Types(id.idText,[ty]),[]))) + let tys = tcrefs |> List.map (fun (resInfo, tcref) -> (resInfo, FreshenTycon ncenv m tcref)) + success (tys |> List.map (fun (resInfo, ty) -> (resInfo, Item.Types(id.idText, [ty]), []))) /// Resolve F# "A.B.C" syntax in expressions -/// Not all of the sequence will necessarily be swallowed, i.e. we return some identifiers +/// Not all of the sequence will necessarily be swallowed, i.e. we return some identifiers /// that may represent further actions, e.g. further lookups. -let rec ResolveExprLongIdentPrim sink (ncenv:NameResolver) first fullyQualified m ad nenv (typeNameResInfo:TypeNameResolutionInfo) (id:Ident) (rest:Ident list) isOpenDecl = +let rec ResolveExprLongIdentPrim sink (ncenv: NameResolver) first fullyQualified m ad nenv (typeNameResInfo: TypeNameResolutionInfo) (id: Ident) (rest: Ident list) isOpenDecl = let resInfo = ResolutionInfo.Empty if first && id.idText = MangledGlobalName then match rest with @@ -2446,54 +2446,54 @@ let rec ResolveExprLongIdentPrim sink (ncenv:NameResolver) first fullyQualified if isNil rest && fullyQualified <> FullyQualified then let typeError = ref None // Single identifier. Lookup the unqualified names in the environment - let envSearch = + let envSearch = match nenv.eUnqualifiedItems.TryGetValue id.idText with // The name is a type name and it has not been clobbered by some other name - | true, Item.UnqualifiedType tcrefs -> - - // Do not use type names from the environment if an explicit type instantiation is + | true, Item.UnqualifiedType tcrefs -> + + // Do not use type names from the environment if an explicit type instantiation is // given and the number of type parameters do not match - let tcrefs = + let tcrefs = tcrefs |> List.filter (fun tcref -> - typeNameResInfo.StaticArgsInfo.HasNoStaticArgsInfo || + typeNameResInfo.StaticArgsInfo.HasNoStaticArgsInfo || typeNameResInfo.StaticArgsInfo.NumStaticArgs = tcref.Typars(m).Length) - + let search = ChooseTyconRefInExpr (ncenv, m, ad, nenv, id, typeNameResInfo, resInfo, tcrefs) - match AtMostOneResult m search with - | Result _ as res -> - let resInfo,item,rest = ForceRaise res - ResolutionInfo.SendEntityPathToSink(sink,ncenv,nenv,ItemOccurence.Use,ad,resInfo,ResultTyparChecker(fun () -> CheckAllTyparsInferrable ncenv.amap m item)) - Some(item,rest) + match AtMostOneResult m search with + | Result _ as res -> + let resInfo, item, rest = ForceRaise res + ResolutionInfo.SendEntityPathToSink(sink, ncenv, nenv, ItemOccurence.Use, ad, resInfo, ResultTyparChecker(fun () -> CheckAllTyparsInferrable ncenv.amap m item)) + Some(item, rest) | Exception e -> typeError := Some e; None | true, res -> Some (FreshenUnqualifiedItem ncenv m res, []) - | _ -> + | _ -> None - match envSearch with + match envSearch with | Some res -> res | None -> let innerSearch = // Check if it's a type name, e.g. a constructor call or a type instantiation - let ctorSearch = + let ctorSearch = let tcrefs = LookupTypeNameInEnvMaybeHaveArity fullyQualified id.idText typeNameResInfo nenv ChooseTyconRefInExpr (ncenv, m, ad, nenv, id, typeNameResInfo, resInfo, tcrefs) - let implicitOpSearch() = - if IsMangledOpName id.idText then - success [(resInfo,Item.ImplicitOp(id, ref None),[])] - else + let implicitOpSearch() = + if IsMangledOpName id.idText then + success [(resInfo, Item.ImplicitOp(id, ref None), [])] + else NoResultsOrUsefulErrors ctorSearch +++ implicitOpSearch - let resInfo,item,rest = + let resInfo, item, rest = match AtMostOneResult m innerSearch with | Result _ as res -> ForceRaise res - | _ -> - let failingCase = + | _ -> + let failingCase = match !typeError with | Some e -> raze e | _ -> @@ -2518,7 +2518,7 @@ let rec ResolveExprLongIdentPrim sink (ncenv:NameResolver) first fullyQualified nenv.eTyconsByDemangledNameAndArity |> Seq.choose (fun e -> let hasRequireQualifiedAccessAttribute = HasFSharpAttribute ncenv.g ncenv.g.attrib_RequireQualifiedAccessAttribute e.Value.Attribs - if not hasRequireQualifiedAccessAttribute then + if not hasRequireQualifiedAccessAttribute then None else if e.Value.IsUnionTycon && e.Value.UnionCasesArray |> Array.exists (fun c -> c.DisplayName = id.idText) then @@ -2526,53 +2526,53 @@ let rec ResolveExprLongIdentPrim sink (ncenv:NameResolver) first fullyQualified else None) |> Seq.map (fun t -> t.DisplayName + "." + id.idText) - + [ yield! suggestedNames yield! suggestedTypes yield! suggestedModulesAndNamespaces yield! unions ] |> HashSet - raze (UndefinedName(0,FSComp.SR.undefinedNameValueOfConstructor,id,suggestNamesAndTypes)) + raze (UndefinedName(0, FSComp.SR.undefinedNameValueOfConstructor, id, suggestNamesAndTypes)) ForceRaise failingCase - ResolutionInfo.SendEntityPathToSink(sink,ncenv,nenv,ItemOccurence.Use,ad,resInfo,ResultTyparChecker(fun () -> CheckAllTyparsInferrable ncenv.amap m item)) - item,rest - - - // A compound identifier. - // It still might be a value in the environment, or something in an F# module, namespace, type, or nested type - else + ResolutionInfo.SendEntityPathToSink(sink, ncenv, nenv, ItemOccurence.Use, ad, resInfo, ResultTyparChecker(fun () -> CheckAllTyparsInferrable ncenv.amap m item)) + item, rest + + + // A compound identifier. + // It still might be a value in the environment, or something in an F# module, namespace, type, or nested type + else let m = unionRanges m id.idRange - // Values in the environment take total priority, but constructors do NOT for compound lookups, e.g. if someone in some imported - // module has defined a constructor "String" (common enough) then "String.foo" doesn't give an error saying 'constructors have no members' + // Values in the environment take total priority, but constructors do NOT for compound lookups, e.g. if someone in some imported + // module has defined a constructor "String" (common enough) then "String.foo" doesn't give an error saying 'constructors have no members' // Instead we go lookup the String module or type. - let ValIsInEnv nm = - match fullyQualified with + let ValIsInEnv nm = + match fullyQualified with | FullyQualified -> false - | _ -> - match nenv.eUnqualifiedItems.TryGetValue nm with - | true, Item.Value _ -> true + | _ -> + match nenv.eUnqualifiedItems.TryGetValue nm with + | true, Item.Value _ -> true | _ -> false if ValIsInEnv id.idText then nenv.eUnqualifiedItems.[id.idText], rest else - // Otherwise modules are searched first. REVIEW: modules and types should be searched together. - // For each module referenced by 'id', search the module as if it were an F# module and/or a .NET namespace. - let moduleSearch ad () = + // Otherwise modules are searched first. REVIEW: modules and types should be searched together. + // For each module referenced by 'id', search the module as if it were an F# module and/or a .NET namespace. + let moduleSearch ad () = ResolveLongIndentAsModuleOrNamespaceThen sink ResultCollectionSettings.AtMostOneResult ncenv.amap m fullyQualified nenv ad id rest isOpenDecl (ResolveExprLongIdentInModuleOrNamespace ncenv nenv typeNameResInfo ad) // REVIEW: somewhat surprisingly, this shows up on performance traces, with tcrefs non-nil. // This seems strange since we would expect in the vast majority of cases tcrefs is empty here. - let tyconSearch ad () = + let tyconSearch ad () = let tcrefs = LookupTypeNameInEnvNoArity fullyQualified id.idText nenv - if isNil tcrefs then NoResultsOrUsefulErrors else + if isNil tcrefs then NoResultsOrUsefulErrors else match rest with | id2::rest2 -> - let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo,tcref)) - let tcrefs = + let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo, tcref)) + let tcrefs = let typeNameResInfo = TypeNameResolutionInfo.ResolveToTypeRefs (TypeNameResolutionStaticArgsInfo.Indefinite) CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (tcrefs, typeNameResInfo, PermitDirectReferenceToGeneratedType.No, unionRanges m id.idRange) ResolveLongIdentInTyconRefs ResultCollectionSettings.AtMostOneResult ncenv nenv LookupKind.Expr 1 m ad id2 rest2 typeNameResInfo id.idRange tcrefs @@ -2580,134 +2580,134 @@ let rec ResolveExprLongIdentPrim sink (ncenv:NameResolver) first fullyQualified NoResultsOrUsefulErrors let search = - let envSearch () = - match fullyQualified with - | FullyQualified -> + let envSearch () = + match fullyQualified with + | FullyQualified -> NoResultsOrUsefulErrors - | OpenQualified -> + | OpenQualified -> match nenv.eUnqualifiedItems.TryGetValue id.idText with - | true, Item.UnqualifiedType _ + | true, Item.UnqualifiedType _ | false, _ -> NoResultsOrUsefulErrors - | true, res -> OneSuccess (resInfo,FreshenUnqualifiedItem ncenv m res,rest) - + | true, res -> OneSuccess (resInfo, FreshenUnqualifiedItem ncenv m res, rest) + moduleSearch ad () +++ tyconSearch ad +++ envSearch - let resInfo,item,rest = - match AtMostOneResult m search with + let resInfo, item, rest = + match AtMostOneResult m search with | Result _ as res -> ForceRaise res | _ -> let innerSearch = search +++ (moduleSearch AccessibleFromSomeFSharpCode) +++ (tyconSearch AccessibleFromSomeFSharpCode) let suggestEverythingInScope() = - seq { yield! + seq { yield! nenv.ModulesAndNamespaces fullyQualified |> Seq.collect (fun kv -> kv.Value) |> Seq.filter (fun modref -> IsEntityAccessible ncenv.amap m ad modref) |> Seq.collect (fun e -> [e.DisplayName; e.DemangledModuleOrNamespaceName]) - + yield! nenv.TyconsByDemangledNameAndArity fullyQualified |> Seq.filter (fun e -> IsEntityAccessible ncenv.amap m ad e.Value) |> Seq.map (fun e -> e.Value.DisplayName) - yield! + yield! nenv.eUnqualifiedItems |> Seq.map (fun e -> e.Value.DisplayName) } |> HashSet match innerSearch with - | Exception (UndefinedName(0,_,id1,suggestionsF)) when id.idRange = id1.idRange -> + | Exception (UndefinedName(0, _, id1, suggestionsF)) when id.idRange = id1.idRange -> let mergeSuggestions() = let res = suggestEverythingInScope() res.UnionWith(suggestionsF()) res - let failingCase = raze (UndefinedName(0,FSComp.SR.undefinedNameValueNamespaceTypeOrModule,id,mergeSuggestions)) + let failingCase = raze (UndefinedName(0, FSComp.SR.undefinedNameValueNamespaceTypeOrModule, id, mergeSuggestions)) ForceRaise failingCase | Exception err -> ForceRaise(Exception err) | Result (res :: _) -> ForceRaise(Result res) | Result [] -> - let failingCase = raze (UndefinedName(0,FSComp.SR.undefinedNameValueNamespaceTypeOrModule,id,suggestEverythingInScope)) + let failingCase = raze (UndefinedName(0, FSComp.SR.undefinedNameValueNamespaceTypeOrModule, id, suggestEverythingInScope)) ForceRaise failingCase - ResolutionInfo.SendEntityPathToSink(sink,ncenv,nenv,ItemOccurence.Use,ad,resInfo,ResultTyparChecker(fun () -> CheckAllTyparsInferrable ncenv.amap m item)) - item,rest + ResolutionInfo.SendEntityPathToSink(sink, ncenv, nenv, ItemOccurence.Use, ad, resInfo, ResultTyparChecker(fun () -> CheckAllTyparsInferrable ncenv.amap m item)) + item, rest -let ResolveExprLongIdent sink (ncenv:NameResolver) m ad nenv typeNameResInfo lid = +let ResolveExprLongIdent sink (ncenv: NameResolver) m ad nenv typeNameResInfo lid = match lid with | [] -> error (Error(FSComp.SR.nrInvalidExpression(textOfLid lid), m)) | id::rest -> ResolveExprLongIdentPrim sink ncenv true OpenQualified m ad nenv typeNameResInfo id rest false //------------------------------------------------------------------------- // Resolve F#/IL "." syntax in patterns -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- -let rec ResolvePatternLongIdentInModuleOrNamespace (ncenv:NameResolver) nenv numTyArgsOpt ad resInfo depth m modref (mty:ModuleOrNamespaceType) (id:Ident) (rest: Ident list) = +let rec ResolvePatternLongIdentInModuleOrNamespace (ncenv: NameResolver) nenv numTyArgsOpt ad resInfo depth m modref (mty: ModuleOrNamespaceType) (id: Ident) (rest: Ident list) = let m = unionRanges m id.idRange match TryFindTypeWithUnionCase modref id with - | Some tycon when IsTyconReprAccessible ncenv.amap m ad (modref.NestedTyconRef tycon) -> + | Some tycon when IsTyconReprAccessible ncenv.amap m ad (modref.NestedTyconRef tycon) -> let tcref = modref.NestedTyconRef tycon let ucref = mkUnionCaseRef tcref id.idText let showDeprecated = HasFSharpAttribute ncenv.g ncenv.g.attrib_RequireQualifiedAccessAttribute tycon.Attribs let ucinfo = FreshenUnionCaseRef ncenv m ucref - success (resInfo,Item.UnionCase(ucinfo,showDeprecated),rest) - | _ -> + success (resInfo, Item.UnionCase(ucinfo, showDeprecated), rest) + | _ -> match mty.ExceptionDefinitionsByDemangledName.TryGetValue id.idText with - | true, exnc when IsEntityAccessible ncenv.amap m ad (modref.NestedTyconRef exnc) -> - success (resInfo,Item.ExnCase (modref.NestedTyconRef exnc),rest) + | true, exnc when IsEntityAccessible ncenv.amap m ad (modref.NestedTyconRef exnc) -> + success (resInfo, Item.ExnCase (modref.NestedTyconRef exnc), rest) | _ -> - // An active pattern constructor in a module + // An active pattern constructor in a module match (ActivePatternElemsOfModuleOrNamespace modref).TryGetValue id.idText with - | true, (APElemRef(_,vref,_) as apref) when IsValAccessible ad vref -> - success (resInfo,Item.ActivePatternCase apref,rest) - | _ -> + | true, (APElemRef(_, vref, _) as apref) when IsValAccessible ad vref -> + success (resInfo, Item.ActivePatternCase apref, rest) + | _ -> match mty.AllValsByLogicalName.TryGetValue id.idText with - | true, vspec when IsValAccessible ad (mkNestedValRef modref vspec) -> - success(resInfo,Item.Value (mkNestedValRef modref vspec),rest) + | true, vspec when IsValAccessible ad (mkNestedValRef modref vspec) -> + success(resInfo, Item.Value (mkNestedValRef modref vspec), rest) | _ -> let tcrefs = lazy ( LookupTypeNameInEntityMaybeHaveArity (ncenv.amap, id.idRange, ad, id.idText, TypeNameResolutionStaticArgsInfo.Indefinite, modref) - |> List.map (fun tcref -> (resInfo,tcref))) + |> List.map (fun tcref -> (resInfo, tcref))) - // Something in a type? e.g. a literal field - let tyconSearch = + // Something in a type? e.g. a literal field + let tyconSearch = match rest with | id2::rest2 -> let tcrefs = tcrefs.Force() - ResolveLongIdentInTyconRefs ResultCollectionSettings.AtMostOneResult (ncenv:NameResolver) nenv LookupKind.Pattern (depth+1) m ad id2 rest2 numTyArgsOpt id.idRange tcrefs + ResolveLongIdentInTyconRefs ResultCollectionSettings.AtMostOneResult (ncenv: NameResolver) nenv LookupKind.Pattern (depth+1) m ad id2 rest2 numTyArgsOpt id.idRange tcrefs | _ -> NoResultsOrUsefulErrors - // Constructor of a type? - let ctorSearch() = + // Constructor of a type? + let ctorSearch() = if isNil rest then tcrefs.Force() - |> List.map (fun (resInfo,tcref) -> (resInfo,FreshenTycon ncenv m tcref)) - |> CollectAtMostOneResult (fun (resInfo,ty) -> ResolveObjectConstructorPrim ncenv nenv.eDisplayEnv resInfo id.idRange ad ty) - |> MapResults (fun (resInfo,item) -> (resInfo,item,[])) + |> List.map (fun (resInfo, tcref) -> (resInfo, FreshenTycon ncenv m tcref)) + |> CollectAtMostOneResult (fun (resInfo, ty) -> ResolveObjectConstructorPrim ncenv nenv.eDisplayEnv resInfo id.idRange ad ty) + |> MapResults (fun (resInfo, item) -> (resInfo, item, [])) else NoResultsOrUsefulErrors - // Something in a sub-namespace or sub-module or nested-type - let moduleSearch() = + // Something in a sub-namespace or sub-module or nested-type + let moduleSearch() = match rest with | id2::rest2 -> match mty.ModulesAndNamespacesByDemangledName.TryGetValue id.idText with - | true, AccessibleEntityRef ncenv.amap m ad modref submodref -> - let resInfo = resInfo.AddEntity(id.idRange,submodref) + | true, AccessibleEntityRef ncenv.amap m ad modref submodref -> + let resInfo = resInfo.AddEntity(id.idRange, submodref) OneResult (ResolvePatternLongIdentInModuleOrNamespace ncenv nenv numTyArgsOpt ad resInfo (depth+1) m submodref submodref.ModuleOrNamespaceType id2 rest2) - | _ -> + | _ -> NoResultsOrUsefulErrors | [] -> NoResultsOrUsefulErrors match tyconSearch +++ ctorSearch +++ moduleSearch with - | Result [] -> + | Result [] -> let suggestPossibleTypes() = let submodules = mty.ModulesAndNamespacesByDemangledName |> Seq.filter (fun kv -> IsEntityAccessible ncenv.amap m ad (modref.NestedTyconRef kv.Value)) |> Seq.collect (fun e -> [e.Value.DisplayName; e.Value.DemangledModuleOrNamespaceName]) - + let suggestedTypes = nenv.TyconsByDemangledNameAndArity FullyQualifiedFlag.OpenQualified |> Seq.filter (fun e -> IsEntityAccessible ncenv.amap m ad e.Value) @@ -2717,17 +2717,17 @@ let rec ResolvePatternLongIdentInModuleOrNamespace (ncenv:NameResolver) nenv num yield! suggestedTypes ] |> HashSet - raze (UndefinedName(depth,FSComp.SR.undefinedNameConstructorModuleOrNamespace,id,suggestPossibleTypes)) + raze (UndefinedName(depth, FSComp.SR.undefinedNameConstructorModuleOrNamespace, id, suggestPossibleTypes)) | results -> AtMostOneResult id.idRange results - + /// Used to report a warning condition for the use of upper-case identifiers in patterns exception UpperCaseIdentifierInPattern of range /// Indicates if a warning should be given for the use of upper-case identifiers in patterns type WarnOnUpperFlag = WarnOnUpperCase | AllIdsOK -// Long ID in a pattern -let rec ResolvePatternLongIdentPrim sink (ncenv:NameResolver) fullyQualified warnOnUpper newDef m ad nenv numTyArgsOpt (id:Ident) (rest:Ident list) = +// Long ID in a pattern +let rec ResolvePatternLongIdentPrim sink (ncenv: NameResolver) fullyQualified warnOnUpper newDef m ad nenv numTyArgsOpt (id: Ident) (rest: Ident list) = if id.idText = MangledGlobalName then match rest with | [] -> @@ -2735,39 +2735,39 @@ let rec ResolvePatternLongIdentPrim sink (ncenv:NameResolver) fullyQualified war | id2::rest2 -> ResolvePatternLongIdentPrim sink ncenv FullyQualified warnOnUpper newDef m ad nenv numTyArgsOpt id2 rest2 else - // Single identifiers in patterns + // Single identifiers in patterns if isNil rest && fullyQualified <> FullyQualified then - // Single identifiers in patterns - bind to constructors and active patterns - // For the special case of - // let C = x + // Single identifiers in patterns - bind to constructors and active patterns + // For the special case of + // let C = x match nenv.ePatItems.TryGetValue id.idText with | true, res when not newDef -> FreshenUnqualifiedItem ncenv m res - | _ -> - // Single identifiers in patterns - variable bindings + | _ -> + // Single identifiers in patterns - variable bindings if not newDef && - (warnOnUpper = WarnOnUpperCase) && - id.idText.Length >= 3 && - System.Char.ToLowerInvariant id.idText.[0] <> id.idText.[0] then + (warnOnUpper = WarnOnUpperCase) && + id.idText.Length >= 3 && + System.Char.ToLowerInvariant id.idText.[0] <> id.idText.[0] then warning(UpperCaseIdentifierInPattern(m)) Item.NewDef id - // Long identifiers in patterns + // Long identifiers in patterns else let moduleSearch ad () = ResolveLongIndentAsModuleOrNamespaceThen sink ResultCollectionSettings.AtMostOneResult ncenv.amap m fullyQualified nenv ad id rest false (ResolvePatternLongIdentInModuleOrNamespace ncenv nenv numTyArgsOpt ad) - - let tyconSearch ad = - match rest with + + let tyconSearch ad = + match rest with | id2 :: rest2 -> let tcrefs = LookupTypeNameInEnvNoArity fullyQualified id.idText nenv if isNil tcrefs then NoResultsOrUsefulErrors else - let tcrefs = tcrefs |> List.map (fun tcref -> (ResolutionInfo.Empty,tcref)) + let tcrefs = tcrefs |> List.map (fun tcref -> (ResolutionInfo.Empty, tcref)) ResolveLongIdentInTyconRefs ResultCollectionSettings.AtMostOneResult ncenv nenv LookupKind.Pattern 1 id.idRange ad id2 rest2 numTyArgsOpt id.idRange tcrefs - | _ -> + | _ -> NoResultsOrUsefulErrors - let resInfo,res,rest = + let resInfo, res, rest = match AtMostOneResult m (tyconSearch ad +++ (moduleSearch ad)) with | Result _ as res -> ForceRaise res | _ -> @@ -2776,37 +2776,37 @@ let rec ResolvePatternLongIdentPrim sink (ncenv:NameResolver) fullyQualified war |> AtMostOneResult m |> ForceRaise - ResolutionInfo.SendEntityPathToSink(sink,ncenv,nenv,ItemOccurence.Use,ad,resInfo,ResultTyparChecker(fun () -> true)) - + ResolutionInfo.SendEntityPathToSink(sink, ncenv, nenv, ItemOccurence.Use, ad, resInfo, ResultTyparChecker(fun () -> true)) + match rest with | [] -> res - | element :: _ -> error(Error(FSComp.SR.nrIsNotConstructorOrLiteral(),element.idRange)) + | element :: _ -> error(Error(FSComp.SR.nrIsNotConstructorOrLiteral(), element.idRange)) /// Resolve a long identifier when used in a pattern. -let ResolvePatternLongIdent sink (ncenv:NameResolver) warnOnUpper newDef m ad nenv numTyArgsOpt (lid:Ident list) = +let ResolvePatternLongIdent sink (ncenv: NameResolver) warnOnUpper newDef m ad nenv numTyArgsOpt (lid: Ident list) = match lid with - | [] -> error(Error(FSComp.SR.nrUnexpectedEmptyLongId(),m)) + | [] -> error(Error(FSComp.SR.nrUnexpectedEmptyLongId(), m)) | id::rest -> ResolvePatternLongIdentPrim sink ncenv OpenQualified warnOnUpper newDef m ad nenv numTyArgsOpt id rest //------------------------------------------------------------------------- // Resolve F#/IL "." syntax in types -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- /// Resolve nested types referenced through a .NET abbreviation. // -// Note the generic case is not supported by F#, so +// Note the generic case is not supported by F#, so // type X = List // // X.ListEnumerator // does not resolve // -let ResolveNestedTypeThroughAbbreviation (ncenv:NameResolver) (tcref: TyconRef) m = - if tcref.IsTypeAbbrev && tcref.Typars(m).IsEmpty && isAppTy ncenv.g tcref.TypeAbbrev.Value && isNil (argsOfAppTy ncenv.g tcref.TypeAbbrev.Value) then +let ResolveNestedTypeThroughAbbreviation (ncenv: NameResolver) (tcref: TyconRef) m = + if tcref.IsTypeAbbrev && tcref.Typars(m).IsEmpty && isAppTy ncenv.g tcref.TypeAbbrev.Value && isNil (argsOfAppTy ncenv.g tcref.TypeAbbrev.Value) then tcrefOfAppTy ncenv.g tcref.TypeAbbrev.Value else tcref /// Resolve a long identifier representing a type name -let rec ResolveTypeLongIdentInTyconRefPrim (ncenv:NameResolver) (typeNameResInfo:TypeNameResolutionInfo) ad resInfo genOk depth m (tcref: TyconRef) (id:Ident) (rest: Ident list) = +let rec ResolveTypeLongIdentInTyconRefPrim (ncenv: NameResolver) (typeNameResInfo: TypeNameResolutionInfo) ad resInfo genOk depth m (tcref: TyconRef) (id: Ident) (rest: Ident list) = let tcref = ResolveNestedTypeThroughAbbreviation ncenv tcref m match rest with | [] -> @@ -2816,9 +2816,9 @@ let rec ResolveTypeLongIdentInTyconRefPrim (ncenv:NameResolver) (typeNameResInfo #endif let m = unionRanges m id.idRange let tcrefs = LookupTypeNameInEntityMaybeHaveArity (ncenv.amap, id.idRange, ad, id.idText, typeNameResInfo.StaticArgsInfo, tcref) - let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo,tcref)) - let tcrefs = CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (tcrefs, typeNameResInfo, genOk, m) - match tcrefs with + let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo, tcref)) + let tcrefs = CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (tcrefs, typeNameResInfo, genOk, m) + match tcrefs with | tcref :: _ -> success tcref | [] -> let suggestTypes() = @@ -2826,7 +2826,7 @@ let rec ResolveTypeLongIdentInTyconRefPrim (ncenv:NameResolver) (typeNameResInfo |> Seq.map (fun e -> e.Value.DisplayName) |> HashSet - raze (UndefinedName(depth,FSComp.SR.undefinedNameType,id,suggestTypes)) + raze (UndefinedName(depth, FSComp.SR.undefinedNameType, id, suggestTypes)) | id2::rest2 -> #if !NO_EXTENSIONTYPING // No dotting through type generators to get to a nested type! @@ -2834,64 +2834,64 @@ let rec ResolveTypeLongIdentInTyconRefPrim (ncenv:NameResolver) (typeNameResInfo #endif let m = unionRanges m id.idRange // Search nested types - let tyconSearch = + let tyconSearch = let tcrefs = LookupTypeNameInEntityMaybeHaveArity (ncenv.amap, id.idRange, ad, id.idText, TypeNameResolutionStaticArgsInfo.Indefinite, tcref) if isNil tcrefs then NoResultsOrUsefulErrors else - let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo,tcref)) + let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo, tcref)) let tcrefs = CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (tcrefs, typeNameResInfo.DropStaticArgsInfo, genOk, m) - match tcrefs with - | _ :: _ -> tcrefs |> CollectAtMostOneResult (fun (resInfo,tcref) -> ResolveTypeLongIdentInTyconRefPrim ncenv typeNameResInfo ad resInfo genOk (depth+1) m tcref id2 rest2) - | [] -> + match tcrefs with + | _ :: _ -> tcrefs |> CollectAtMostOneResult (fun (resInfo, tcref) -> ResolveTypeLongIdentInTyconRefPrim ncenv typeNameResInfo ad resInfo genOk (depth+1) m tcref id2 rest2) + | [] -> let suggestTypes() = tcref.ModuleOrNamespaceType.TypesByDemangledNameAndArity id.idRange |> Seq.map (fun e -> e.Value.DisplayName) |> HashSet - raze (UndefinedName(depth,FSComp.SR.undefinedNameType,id,suggestTypes)) - + raze (UndefinedName(depth, FSComp.SR.undefinedNameType, id, suggestTypes)) + AtMostOneResult m tyconSearch /// Resolve a long identifier representing a type name and report the result -let ResolveTypeLongIdentInTyconRef sink (ncenv:NameResolver) nenv typeNameResInfo ad m tcref (lid: Ident list) = - let resInfo,tcref = +let ResolveTypeLongIdentInTyconRef sink (ncenv: NameResolver) nenv typeNameResInfo ad m tcref (lid: Ident list) = + let resInfo, tcref = match lid with - | [] -> - error(Error(FSComp.SR.nrUnexpectedEmptyLongId(),m)) + | [] -> + error(Error(FSComp.SR.nrUnexpectedEmptyLongId(), m)) | id::rest -> ForceRaise (ResolveTypeLongIdentInTyconRefPrim ncenv typeNameResInfo ad ResolutionInfo.Empty PermitDirectReferenceToGeneratedType.No 0 m tcref id rest) - ResolutionInfo.SendEntityPathToSink(sink,ncenv,nenv,ItemOccurence.Use,ad,resInfo,ResultTyparChecker(fun () -> true)) - let item = Item.Types(tcref.DisplayName,[FreshenTycon ncenv m tcref]) - CallNameResolutionSink sink (rangeOfLid lid,nenv,item,item,emptyTyparInst,ItemOccurence.UseInType,nenv.eDisplayEnv,ad) + ResolutionInfo.SendEntityPathToSink(sink, ncenv, nenv, ItemOccurence.Use, ad, resInfo, ResultTyparChecker(fun () -> true)) + let item = Item.Types(tcref.DisplayName, [FreshenTycon ncenv m tcref]) + CallNameResolutionSink sink (rangeOfLid lid, nenv, item, item, emptyTyparInst, ItemOccurence.UseInType, nenv.eDisplayEnv, ad) tcref -/// Create an UndefinedName error with details -let SuggestTypeLongIdentInModuleOrNamespace depth (modref:ModuleOrNamespaceRef) amap ad m (id:Ident) = +/// Create an UndefinedName error with details +let SuggestTypeLongIdentInModuleOrNamespace depth (modref: ModuleOrNamespaceRef) amap ad m (id: Ident) = let suggestPossibleTypes() = modref.ModuleOrNamespaceType.AllEntities |> Seq.filter (fun e -> IsEntityAccessible amap m ad (modref.NestedTyconRef e)) |> Seq.collect (fun e -> [e.DisplayName; e.DemangledModuleOrNamespaceName]) |> HashSet - let errorTextF s = FSComp.SR.undefinedNameTypeIn(s,fullDisplayTextOfModRef modref) - UndefinedName(depth,errorTextF,id,suggestPossibleTypes) + let errorTextF s = FSComp.SR.undefinedNameTypeIn(s, fullDisplayTextOfModRef modref) + UndefinedName(depth, errorTextF, id, suggestPossibleTypes) /// Resolve a long identifier representing a type in a module or namespace -let rec private ResolveTypeLongIdentInModuleOrNamespace sink nenv (ncenv:NameResolver) (typeNameResInfo: TypeNameResolutionInfo) ad genOk (resInfo:ResolutionInfo) depth m modref _mty (id:Ident) (rest: Ident list) = +let rec private ResolveTypeLongIdentInModuleOrNamespace sink nenv (ncenv: NameResolver) (typeNameResInfo: TypeNameResolutionInfo) ad genOk (resInfo: ResolutionInfo) depth m modref _mty (id: Ident) (rest: Ident list) = match rest with | [] -> - // On all paths except error reporting we have isSome(staticResInfo), hence get at most one result back + // On all paths except error reporting we have isSome(staticResInfo), hence get at most one result back let tcrefs = LookupTypeNameInEntityMaybeHaveArity (ncenv.amap, id.idRange, ad, id.idText, typeNameResInfo.StaticArgsInfo, modref) - match tcrefs with - | _ :: _ -> tcrefs |> CollectResults (fun tcref -> success(resInfo,tcref)) + match tcrefs with + | _ :: _ -> tcrefs |> CollectResults (fun tcref -> success(resInfo, tcref)) | [] -> raze (SuggestTypeLongIdentInModuleOrNamespace depth modref ncenv.amap ad m id) | id2::rest2 -> let m = unionRanges m id.idRange - let modulSearch = + let modulSearch = match modref.ModuleOrNamespaceType.ModulesAndNamespacesByDemangledName.TryGetValue id.idText with - | true, AccessibleEntityRef ncenv.amap m ad modref submodref -> + | true, AccessibleEntityRef ncenv.amap m ad modref submodref -> let item = Item.ModuleOrNamespaces [submodref] - CallNameResolutionSink sink (id.idRange, nenv, item, item, emptyTyparInst, ItemOccurence.Use, nenv.DisplayEnv, ad) - let resInfo = resInfo.AddEntity(id.idRange,submodref) + CallNameResolutionSink sink (id.idRange, nenv, item, item, emptyTyparInst, ItemOccurence.Use, nenv.DisplayEnv, ad) + let resInfo = resInfo.AddEntity(id.idRange, submodref) ResolveTypeLongIdentInModuleOrNamespace sink nenv ncenv typeNameResInfo ad genOk resInfo (depth+1) m submodref submodref.ModuleOrNamespaceType id2 rest2 | _ -> let suggestPossibleModules() = @@ -2899,11 +2899,11 @@ let rec private ResolveTypeLongIdentInModuleOrNamespace sink nenv (ncenv:NameRes |> Seq.filter (fun kv -> IsEntityAccessible ncenv.amap m ad (modref.NestedTyconRef kv.Value)) |> Seq.collect (fun e -> [e.Value.DisplayName; e.Value.DemangledModuleOrNamespaceName]) |> HashSet - raze (UndefinedName(depth,FSComp.SR.undefinedNameNamespaceOrModule,id,suggestPossibleModules)) + raze (UndefinedName(depth, FSComp.SR.undefinedNameNamespaceOrModule, id, suggestPossibleModules)) - let tyconSearch = + let tyconSearch = let tcrefs = LookupTypeNameInEntityMaybeHaveArity (ncenv.amap, id.idRange, ad, id.idText, TypeNameResolutionStaticArgsInfo.Indefinite, modref) - match tcrefs with + match tcrefs with | _ :: _ -> tcrefs |> CollectResults (fun tcref -> ResolveTypeLongIdentInTyconRefPrim ncenv typeNameResInfo ad resInfo genOk (depth+1) m tcref id2 rest2) | [] -> let suggestTypes() = @@ -2911,12 +2911,12 @@ let rec private ResolveTypeLongIdentInModuleOrNamespace sink nenv (ncenv:NameRes |> Seq.map (fun e -> e.Value.DisplayName) |> HashSet - raze (UndefinedName(depth,FSComp.SR.undefinedNameType,id,suggestTypes)) + raze (UndefinedName(depth, FSComp.SR.undefinedNameType, id, suggestTypes)) AddResults tyconSearch modulSearch -/// Resolve a long identifier representing a type -let rec ResolveTypeLongIdentPrim sink (ncenv:NameResolver) occurence first fullyQualified m nenv ad (id:Ident) (rest: Ident list) (staticResInfo: TypeNameResolutionStaticArgsInfo) genOk = +/// Resolve a long identifier representing a type +let rec ResolveTypeLongIdentPrim sink (ncenv: NameResolver) occurence first fullyQualified m nenv ad (id: Ident) (rest: Ident list) (staticResInfo: TypeNameResolutionStaticArgsInfo) genOk = let typeNameResInfo = TypeNameResolutionInfo.ResolveToTypeRefs staticResInfo if first && id.idText = MangledGlobalName then match rest with @@ -2928,161 +2928,161 @@ let rec ResolveTypeLongIdentPrim sink (ncenv:NameResolver) occurence first fully match rest with | [] -> match LookupTypeNameInEnvHaveArity fullyQualified id.idText staticResInfo.NumStaticArgs nenv with - | Some res -> - let res = CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities ([(ResolutionInfo.Empty,res)], typeNameResInfo, genOk, unionRanges m id.idRange) + | Some res -> + let res = CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities ([(ResolutionInfo.Empty, res)], typeNameResInfo, genOk, unionRanges m id.idRange) assert (res.Length = 1) success res.Head - | None -> - // For Good Error Reporting! + | None -> + // For Good Error Reporting! let tcrefs = LookupTypeNameInEnvNoArity fullyQualified id.idText nenv match tcrefs with - | tcref :: _tcrefs -> + | tcref :: _tcrefs -> // Note: This path is only for error reporting //CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities tcref rest typeNameResInfo m - success(ResolutionInfo.Empty,tcref) - | [] -> + success(ResolutionInfo.Empty, tcref) + | [] -> let suggestPossibleTypes() = nenv.TyconsByDemangledNameAndArity(fullyQualified) |> Seq.filter (fun kv -> IsEntityAccessible ncenv.amap m ad kv.Value) - |> Seq.collect (fun e -> + |> Seq.collect (fun e -> match occurence with - | ItemOccurence.UseInAttribute -> + | ItemOccurence.UseInAttribute -> [yield e.Value.DisplayName yield e.Value.DemangledModuleOrNamespaceName if e.Value.DisplayName.EndsWithOrdinal("Attribute") then - yield e.Value.DisplayName.Replace("Attribute","")] + yield e.Value.DisplayName.Replace("Attribute", "")] | _ -> [e.Value.DisplayName; e.Value.DemangledModuleOrNamespaceName]) |> HashSet - raze (UndefinedName(0,FSComp.SR.undefinedNameType,id,suggestPossibleTypes)) + raze (UndefinedName(0, FSComp.SR.undefinedNameType, id, suggestPossibleTypes)) | id2::rest2 -> let m2 = unionRanges m id.idRange - let tyconSearch = - match fullyQualified with + let tyconSearch = + match fullyQualified with | FullyQualified -> NoResultsOrUsefulErrors - | OpenQualified -> + | OpenQualified -> match LookupTypeNameInEnvHaveArity fullyQualified id.idText staticResInfo.NumStaticArgs nenv with - | Some tcref when IsEntityAccessible ncenv.amap m2 ad tcref -> + | Some tcref when IsEntityAccessible ncenv.amap m2 ad tcref -> let resInfo = ResolutionInfo.Empty.AddEntity(id.idRange, tcref) OneResult (ResolveTypeLongIdentInTyconRefPrim ncenv typeNameResInfo ad resInfo genOk 1 m2 tcref id2 rest2) - | _ -> + | _ -> NoResultsOrUsefulErrors - let modulSearch = + let modulSearch = ResolveLongIndentAsModuleOrNamespaceThen sink ResultCollectionSettings.AllResults ncenv.amap m2 fullyQualified nenv ad id rest false (ResolveTypeLongIdentInModuleOrNamespace sink nenv ncenv typeNameResInfo ad genOk) - |?> List.concat + |?> List.concat - let modulSearchFailed() = + let modulSearchFailed() = ResolveLongIndentAsModuleOrNamespaceThen sink ResultCollectionSettings.AllResults ncenv.amap m2 fullyQualified nenv AccessibleFromSomeFSharpCode id rest false (ResolveTypeLongIdentInModuleOrNamespace sink nenv ncenv typeNameResInfo.DropStaticArgsInfo AccessibleFromSomeFSharpCode genOk) - |?> List.concat + |?> List.concat let searchSoFar = AddResults tyconSearch modulSearch - match searchSoFar with - | Result results -> + match searchSoFar with + | Result results -> // NOTE: we delay checking the CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities condition until right at the end after we've // collected all possible resolutions of the type let tcrefs = CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (results, typeNameResInfo, genOk, m) - match tcrefs with - | (resInfo,tcref) :: _ -> + match tcrefs with + | (resInfo, tcref) :: _ -> // We've already reported the ambiguity, possibly as an error. Now just take the first possible result. - success(resInfo,tcref) - | [] -> + success(resInfo, tcref) + | [] -> // failing case - report nice ambiguity errors even in this case let r = AddResults searchSoFar (modulSearchFailed()) AtMostOneResult m2 (r |?> (fun tcrefs -> CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (tcrefs, typeNameResInfo, genOk, m))) - | _ -> + | _ -> // failing case - report nice ambiguity errors even in this case let r = AddResults searchSoFar (modulSearchFailed()) AtMostOneResult m2 (r |?> (fun tcrefs -> CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (tcrefs, typeNameResInfo, genOk, m))) /// Resolve a long identifier representing a type and report it -let ResolveTypeLongIdent sink (ncenv:NameResolver) occurence fullyQualified nenv ad (lid: Ident list) staticResInfo genOk = +let ResolveTypeLongIdent sink (ncenv: NameResolver) occurence fullyQualified nenv ad (lid: Ident list) staticResInfo genOk = let m = rangeOfLid lid let res = match lid with - | [] -> - error(Error(FSComp.SR.nrUnexpectedEmptyLongId(),m)) + | [] -> + error(Error(FSComp.SR.nrUnexpectedEmptyLongId(), m)) | id::rest -> - ResolveTypeLongIdentPrim sink ncenv occurence true fullyQualified m nenv ad id rest staticResInfo genOk + ResolveTypeLongIdentPrim sink ncenv occurence true fullyQualified m nenv ad id rest staticResInfo genOk // Register the result as a name resolution - match res with - | Result (resInfo,tcref) -> - ResolutionInfo.SendEntityPathToSink(sink,ncenv,nenv,ItemOccurence.UseInType, ad,resInfo,ResultTyparChecker(fun () -> true)) - let item = Item.Types(tcref.DisplayName,[FreshenTycon ncenv m tcref]) - CallNameResolutionSink sink (m,nenv,item,item,emptyTyparInst,occurence,nenv.eDisplayEnv,ad) + match res with + | Result (resInfo, tcref) -> + ResolutionInfo.SendEntityPathToSink(sink, ncenv, nenv, ItemOccurence.UseInType, ad, resInfo, ResultTyparChecker(fun () -> true)) + let item = Item.Types(tcref.DisplayName, [FreshenTycon ncenv m tcref]) + CallNameResolutionSink sink (m, nenv, item, item, emptyTyparInst, occurence, nenv.eDisplayEnv, ad) | _ -> () res |?> snd //------------------------------------------------------------------------- // Resolve F#/IL "." syntax in records etc. -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- /// Resolve a long identifier representing a record field in a module or namespace -let rec ResolveFieldInModuleOrNamespace (ncenv:NameResolver) nenv ad (resInfo:ResolutionInfo) depth m (modref: ModuleOrNamespaceRef) _mty (id:Ident) (rest: Ident list) = +let rec ResolveFieldInModuleOrNamespace (ncenv: NameResolver) nenv ad (resInfo: ResolutionInfo) depth m (modref: ModuleOrNamespaceRef) _mty (id: Ident) (rest: Ident list) = let typeNameResInfo = TypeNameResolutionInfo.Default let m = unionRanges m id.idRange - // search for module-qualified names, e.g. { Microsoft.FSharp.Core.contents = 1 } - let modulScopedFieldNames = + // search for module-qualified names, e.g. { Microsoft.FSharp.Core.contents = 1 } + let modulScopedFieldNames = match TryFindTypeWithRecdField modref id with - | Some tycon when IsEntityAccessible ncenv.amap m ad (modref.NestedTyconRef tycon) -> + | Some tycon when IsEntityAccessible ncenv.amap m ad (modref.NestedTyconRef tycon) -> let showDeprecated = HasFSharpAttribute ncenv.g ncenv.g.attrib_RequireQualifiedAccessAttribute tycon.Attribs - success [resInfo, FieldResolution(modref.RecdFieldRefInNestedTycon tycon id,showDeprecated), rest] - | _ -> raze (UndefinedName(depth,FSComp.SR.undefinedNameRecordLabelOrNamespace,id,NoSuggestions)) + success [resInfo, FieldResolution(modref.RecdFieldRefInNestedTycon tycon id, showDeprecated), rest] + | _ -> raze (UndefinedName(depth, FSComp.SR.undefinedNameRecordLabelOrNamespace, id, NoSuggestions)) - // search for type-qualified names, e.g. { Microsoft.FSharp.Core.Ref.contents = 1 } - let tyconSearch() = + // search for type-qualified names, e.g. { Microsoft.FSharp.Core.Ref.contents = 1 } + let tyconSearch() = match rest with | id2::rest2 -> let tcrefs = LookupTypeNameInEntityMaybeHaveArity (ncenv.amap, id.idRange, ad, id.idText, TypeNameResolutionStaticArgsInfo.Indefinite, modref) if isNil tcrefs then NoResultsOrUsefulErrors else - let tcrefs = tcrefs |> List.map (fun tcref -> (ResolutionInfo.Empty,tcref)) + let tcrefs = tcrefs |> List.map (fun tcref -> (ResolutionInfo.Empty, tcref)) let tyconSearch = ResolveLongIdentInTyconRefs ResultCollectionSettings.AllResults ncenv nenv LookupKind.RecdField (depth+1) m ad id2 rest2 typeNameResInfo id.idRange tcrefs - // choose only fields - let tyconSearch = tyconSearch |?> List.choose (function (resInfo,Item.RecdField(RecdFieldInfo(_,rfref)),rest) -> Some(resInfo,FieldResolution(rfref,false),rest) | _ -> None) + // choose only fields + let tyconSearch = tyconSearch |?> List.choose (function (resInfo, Item.RecdField(RecdFieldInfo(_, rfref)), rest) -> Some(resInfo, FieldResolution(rfref, false), rest) | _ -> None) tyconSearch | _ -> NoResultsOrUsefulErrors - // search for names in nested modules, e.g. { Microsoft.FSharp.Core.contents = 1 } - let modulSearch() = + // search for names in nested modules, e.g. { Microsoft.FSharp.Core.contents = 1 } + let modulSearch() = match rest with | id2::rest2 -> match modref.ModuleOrNamespaceType.ModulesAndNamespacesByDemangledName.TryGetValue id.idText with - | true, AccessibleEntityRef ncenv.amap m ad modref submodref -> - let resInfo = resInfo.AddEntity(id.idRange,submodref) + | true, AccessibleEntityRef ncenv.amap m ad modref submodref -> + let resInfo = resInfo.AddEntity(id.idRange, submodref) ResolveFieldInModuleOrNamespace ncenv nenv ad resInfo (depth+1) m submodref submodref.ModuleOrNamespaceType id2 rest2 |> OneResult - | _ -> raze (UndefinedName(depth,FSComp.SR.undefinedNameRecordLabelOrNamespace,id,NoSuggestions)) - | _ -> raze (UndefinedName(depth,FSComp.SR.undefinedNameRecordLabelOrNamespace,id,NoSuggestions)) - + | _ -> raze (UndefinedName(depth, FSComp.SR.undefinedNameRecordLabelOrNamespace, id, NoSuggestions)) + | _ -> raze (UndefinedName(depth, FSComp.SR.undefinedNameRecordLabelOrNamespace, id, NoSuggestions)) + modulScopedFieldNames +++ tyconSearch +++ modulSearch |> AtMostOneResult m /// Suggest other labels of the same record -let SuggestOtherLabelsOfSameRecordType g (nenv:NameResolutionEnv) ty (id:Ident) (allFields:Ident list) = +let SuggestOtherLabelsOfSameRecordType g (nenv: NameResolutionEnv) ty (id: Ident) (allFields: Ident list) = let labelsOfPossibleRecord = GetRecordLabelsForType g nenv ty - let givenFields = - allFields - |> List.map (fun fld -> fld.idText) + let givenFields = + allFields + |> List.map (fun fld -> fld.idText) |> List.filter ((<>) id.idText) labelsOfPossibleRecord.ExceptWith givenFields labelsOfPossibleRecord - -let SuggestLabelsOfRelatedRecords g (nenv:NameResolutionEnv) (id:Ident) (allFields:Ident list) = + +let SuggestLabelsOfRelatedRecords g (nenv: NameResolutionEnv) (id: Ident) (allFields: Ident list) = let suggestLabels() = let givenFields = allFields |> List.map (fun fld -> fld.idText) |> List.filter ((<>) id.idText) |> HashSet let fullyQualfied = - if givenFields.Count = 0 then + if givenFields.Count = 0 then // return labels from all records - let result = NameMap.domainL nenv.eFieldLabels |> HashSet + let result = NameMap.domainL nenv.eFieldLabels |> HashSet result.Remove "contents" |> ignore result else @@ -3092,15 +3092,15 @@ let SuggestLabelsOfRelatedRecords g (nenv:NameResolutionEnv) (id:Ident) (allFiel | true, recordTypes -> yield! (recordTypes |> List.map (fun r -> r.TyconRef.DisplayName, fld)) | _ -> () ] |> List.groupBy fst - |> List.map (fun (r,fields) -> r, fields |> List.map snd) - |> List.filter (fun (_,fields) -> givenFields.IsSubsetOf fields) + |> List.map (fun (r, fields) -> r, fields |> List.map snd) + |> List.filter (fun (_, fields) -> givenFields.IsSubsetOf fields) |> List.map fst |> HashSet let labelsOfPossibleRecords = nenv.eFieldLabels - |> Seq.filter (fun kv -> - kv.Value + |> Seq.filter (fun kv -> + kv.Value |> List.map (fun r -> r.TyconRef.DisplayName) |> List.exists possibleRecords.Contains) |> Seq.map (fun kv -> kv.Key) @@ -3108,14 +3108,14 @@ let SuggestLabelsOfRelatedRecords g (nenv:NameResolutionEnv) (id:Ident) (allFiel labelsOfPossibleRecords.ExceptWith givenFields labelsOfPossibleRecords - + if fullyQualfied.Count > 0 then fullyQualfied else // check if the user forgot to use qualified access nenv.eTyconsByDemangledNameAndArity |> Seq.choose (fun e -> let hasRequireQualifiedAccessAttribute = HasFSharpAttribute g g.attrib_RequireQualifiedAccessAttribute e.Value.Attribs - if not hasRequireQualifiedAccessAttribute then + if not hasRequireQualifiedAccessAttribute then None else if e.Value.IsRecordTycon && e.Value.AllFieldsArray |> Seq.exists (fun x -> x.Name = id.idText) then @@ -3125,53 +3125,53 @@ let SuggestLabelsOfRelatedRecords g (nenv:NameResolutionEnv) (id:Ident) (allFiel |> Seq.map (fun t -> t.DisplayName + "." + id.idText) |> HashSet - UndefinedName(0,FSComp.SR.undefinedNameRecordLabel, id, suggestLabels) + UndefinedName(0, FSComp.SR.undefinedNameRecordLabel, id, suggestLabels) -/// Resolve a long identifier representing a record field -let ResolveFieldPrim sink (ncenv:NameResolver) nenv ad ty (mp,id:Ident) allFields = +/// Resolve a long identifier representing a record field +let ResolveFieldPrim sink (ncenv: NameResolver) nenv ad ty (mp, id: Ident) allFields = let typeNameResInfo = TypeNameResolutionInfo.Default let g = ncenv.g let m = id.idRange - match mp with - | [] -> + match mp with + | [] -> let lookup() = - let frefs = - try Map.find id.idText nenv.eFieldLabels + let frefs = + try Map.find id.idText nenv.eFieldLabels with :? KeyNotFoundException -> // record label is unknown -> suggest related labels and give a hint to the user error(SuggestLabelsOfRelatedRecords g nenv id allFields) - // Eliminate duplicates arising from multiple 'open' - frefs + // Eliminate duplicates arising from multiple 'open' + frefs |> ListSet.setify (fun fref1 fref2 -> tyconRefEq g fref1.TyconRef fref2.TyconRef) - |> List.map (fun x -> ResolutionInfo.Empty, FieldResolution(x,false)) + |> List.map (fun x -> ResolutionInfo.Empty, FieldResolution(x, false)) - if isAppTy g ty then - match ncenv.InfoReader.TryFindRecdOrClassFieldInfoOfType(id.idText,m,ty) with - | ValueSome (RecdFieldInfo(_,rfref)) -> [ResolutionInfo.Empty, FieldResolution(rfref,false)] + if isAppTy g ty then + match ncenv.InfoReader.TryFindRecdOrClassFieldInfoOfType(id.idText, m, ty) with + | ValueSome (RecdFieldInfo(_, rfref)) -> [ResolutionInfo.Empty, FieldResolution(rfref, false)] | _ -> if isRecdTy g ty then // record label doesn't belong to record type -> suggest other labels of same record let suggestLabels() = SuggestOtherLabelsOfSameRecordType g nenv ty id allFields let typeName = NicePrint.minimalStringOfType nenv.eDisplayEnv ty - let errorText = FSComp.SR.nrRecordDoesNotContainSuchLabel(typeName,id.idText) + let errorText = FSComp.SR.nrRecordDoesNotContainSuchLabel(typeName, id.idText) error(ErrorWithSuggestions(errorText, m, id.idText, suggestLabels)) else lookup() - else - lookup() - | _ -> + else + lookup() + | _ -> let lid = (mp@[id]) - let tyconSearch ad () = - match lid with - | tn :: id2 :: rest2 -> + let tyconSearch ad () = + match lid with + | tn :: id2 :: rest2 -> let m = tn.idRange let tcrefs = LookupTypeNameInEnvNoArity OpenQualified tn.idText nenv if isNil tcrefs then NoResultsOrUsefulErrors else - let tcrefs = tcrefs |> List.map (fun tcref -> (ResolutionInfo.Empty,tcref)) + let tcrefs = tcrefs |> List.map (fun tcref -> (ResolutionInfo.Empty, tcref)) let tyconSearch = ResolveLongIdentInTyconRefs ResultCollectionSettings.AllResults ncenv nenv LookupKind.RecdField 1 m ad id2 rest2 typeNameResInfo tn.idRange tcrefs - // choose only fields - let tyconSearch = tyconSearch |?> List.choose (function (resInfo,Item.RecdField(RecdFieldInfo(_,rfref)),rest) -> Some(resInfo,FieldResolution(rfref,false),rest) | _ -> None) + // choose only fields + let tyconSearch = tyconSearch |?> List.choose (function (resInfo, Item.RecdField(RecdFieldInfo(_, rfref)), rest) -> Some(resInfo, FieldResolution(rfref, false), rest) | _ -> None) tyconSearch | _ -> NoResultsOrUsefulErrors @@ -3182,96 +3182,96 @@ let ResolveFieldPrim sink (ncenv:NameResolver) nenv ad ty (mp,id:Ident) allField ResolveLongIndentAsModuleOrNamespaceThen sink ResultCollectionSettings.AtMostOneResult ncenv.amap m OpenQualified nenv ad id2 rest2 false (ResolveFieldInModuleOrNamespace ncenv nenv ad) - let resInfo,item,rest = + let resInfo, item, rest = modulSearch ad () +++ tyconSearch ad +++ modulSearch AccessibleFromSomeFSharpCode +++ tyconSearch AccessibleFromSomeFSharpCode |> AtMostOneResult m |> ForceRaise - if not (isNil rest) then - errorR(Error(FSComp.SR.nrInvalidFieldLabel(),(List.head rest).idRange)) + if not (isNil rest) then + errorR(Error(FSComp.SR.nrInvalidFieldLabel(), (List.head rest).idRange)) - [(resInfo,item)] + [(resInfo, item)] -let ResolveField sink ncenv nenv ad ty (mp,id) allFields = - let res = ResolveFieldPrim sink ncenv nenv ad ty (mp,id) allFields +let ResolveField sink ncenv nenv ad ty (mp, id) allFields = + let res = ResolveFieldPrim sink ncenv nenv ad ty (mp, id) allFields // Register the results of any field paths "Module.Type" in "Module.Type.field" as a name resolution. (Note, the path resolution // info is only non-empty if there was a unique resolution of the field) let checker = ResultTyparChecker(fun () -> true) - res - |> List.map (fun (resInfo,rfref) -> - ResolutionInfo.SendEntityPathToSink(sink,ncenv,nenv,ItemOccurence.UseInType,ad,resInfo,checker) + res + |> List.map (fun (resInfo, rfref) -> + ResolutionInfo.SendEntityPathToSink(sink, ncenv, nenv, ItemOccurence.UseInType, ad, resInfo, checker) rfref) /// Generate a new reference to a record field with a fresh type instantiation -let FreshenRecdFieldRef (ncenv:NameResolver) m (rfref:RecdFieldRef) = +let FreshenRecdFieldRef (ncenv: NameResolver) m (rfref: RecdFieldRef) = Item.RecdField(RecdFieldInfo(ncenv.InstantiationGenerator m (rfref.Tycon.Typars m), rfref)) /// Resolve F#/IL "." syntax in expressions (2). /// -/// We have an expr. on the left, and we do an access, e.g. -/// (f obj).field or (f obj).meth. The basic rule is that if l-r type -/// inference has determined the outer type then we can proceed in a simple fashion. The exception -/// to the rule is for field types, which applies if l-r was insufficient to -/// determine any valid members +/// We have an expr. on the left, and we do an access, e.g. +/// (f obj).field or (f obj).meth. The basic rule is that if l-r type +/// inference has determined the outer type then we can proceed in a simple fashion. The exception +/// to the rule is for field types, which applies if l-r was insufficient to +/// determine any valid members // -// QUERY (instantiationGenerator cleanup): it would be really nice not to flow instantiationGenerator to here. -let private ResolveExprDotLongIdent (ncenv:NameResolver) m ad nenv ty (id:Ident) rest findFlag = +// QUERY (instantiationGenerator cleanup): it would be really nice not to flow instantiationGenerator to here. +let private ResolveExprDotLongIdent (ncenv: NameResolver) m ad nenv ty (id: Ident) rest findFlag = let typeNameResInfo = TypeNameResolutionInfo.Default let adhoctDotSearchAccessible = AtMostOneResult m (ResolveLongIdentInTypePrim ncenv nenv LookupKind.Expr ResolutionInfo.Empty 1 m ad id rest findFlag typeNameResInfo ty) - match adhoctDotSearchAccessible with - | Exception _ -> - // If the dot is not resolved by adhoc overloading then look for a record field - // that can resolve the name. + match adhoctDotSearchAccessible with + | Exception _ -> + // If the dot is not resolved by adhoc overloading then look for a record field + // that can resolve the name. let dotFieldIdSearch = // If the type is already known, we should not try to lookup a record field - if isAppTy ncenv.g ty then + if isAppTy ncenv.g ty then NoResultsOrUsefulErrors - else - match nenv.eFieldLabels.TryGetValue id.idText with + else + match nenv.eFieldLabels.TryGetValue id.idText with | true, rfref :: _ -> - // NOTE (instantiationGenerator cleanup): we need to freshen here because we don't know the type. - // But perhaps the caller should freshen?? + // NOTE (instantiationGenerator cleanup): we need to freshen here because we don't know the type. + // But perhaps the caller should freshen?? let item = FreshenRecdFieldRef ncenv m rfref - OneSuccess (ResolutionInfo.Empty,item,rest) + OneSuccess (ResolutionInfo.Empty, item, rest) | _ -> NoResultsOrUsefulErrors - - let adhocDotSearchAll () = ResolveLongIdentInTypePrim ncenv nenv LookupKind.Expr ResolutionInfo.Empty 1 m AccessibleFromSomeFSharpCode id rest findFlag typeNameResInfo ty + + let adhocDotSearchAll () = ResolveLongIdentInTypePrim ncenv nenv LookupKind.Expr ResolutionInfo.Empty 1 m AccessibleFromSomeFSharpCode id rest findFlag typeNameResInfo ty dotFieldIdSearch +++ adhocDotSearchAll |> AtMostOneResult m |> ForceRaise - | _ -> + | _ -> ForceRaise adhoctDotSearchAccessible let ComputeItemRange wholem (lid: Ident list) rest = match rest with | [] -> wholem - | _ -> + | _ -> let ids = List.truncate (max 0 (lid.Length - rest.Length)) lid - match ids with + match ids with | [] -> wholem | _ -> rangeOfLid ids /// Filters method groups that will be sent to Visual Studio IntelliSense /// to include only static/instance members -let FilterMethodGroups (ncenv:NameResolver) itemRange item staticOnly = +let FilterMethodGroups (ncenv: NameResolver) itemRange item staticOnly = match item with - | Item.MethodGroup(nm, minfos, orig) -> - let minfos = minfos |> List.filter (fun minfo -> + | Item.MethodGroup(nm, minfos, orig) -> + let minfos = minfos |> List.filter (fun minfo -> staticOnly = isNil (minfo.GetObjArgTypes(ncenv.amap, itemRange, minfo.FormalMethodInst))) Item.MethodGroup(nm, minfos, orig) | item -> item let NeedsWorkAfterResolution namedItem = match namedItem with - | Item.MethodGroup(_,minfos,_) - | Item.CtorGroup(_,minfos) -> minfos.Length > 1 || minfos |> List.exists (fun minfo -> not (isNil minfo.FormalMethodInst)) - | Item.Property(_,pinfos) -> pinfos.Length > 1 - | Item.ImplicitOp(_, { contents = Some(TraitConstraintSln.FSMethSln(_, vref, _)) }) - | Item.Value vref | Item.CustomBuilder (_,vref) -> not (List.isEmpty vref.Typars) - | Item.CustomOperation (_,_,Some minfo) -> not (isNil minfo.FormalMethodInst) + | Item.MethodGroup(_, minfos, _) + | Item.CtorGroup(_, minfos) -> minfos.Length > 1 || minfos |> List.exists (fun minfo -> not (isNil minfo.FormalMethodInst)) + | Item.Property(_, pinfos) -> pinfos.Length > 1 + | Item.ImplicitOp(_, { contents = Some(TraitConstraintSln.FSMethSln(_, vref, _)) }) + | Item.Value vref | Item.CustomBuilder (_, vref) -> not (List.isEmpty vref.Typars) + | Item.CustomOperation (_, _, Some minfo) -> not (isNil minfo.FormalMethodInst) | Item.ActivePatternCase apref -> not (List.isEmpty apref.ActivePatternVal.Typars) | _ -> false @@ -3288,15 +3288,15 @@ type AfterResolution = /// Resolve a long identifier occurring in an expression position. /// /// Called for 'TypeName.Bar' - for VS IntelliSense, we can filter out instance members from method groups -let ResolveLongIdentAsExprAndComputeRange (sink:TcResultsSink) (ncenv:NameResolver) wholem ad nenv typeNameResInfo lid = - let item1,rest = ResolveExprLongIdent sink ncenv wholem ad nenv typeNameResInfo lid +let ResolveLongIdentAsExprAndComputeRange (sink: TcResultsSink) (ncenv: NameResolver) wholem ad nenv typeNameResInfo lid = + let item1, rest = ResolveExprLongIdent sink ncenv wholem ad nenv typeNameResInfo lid let itemRange = ComputeItemRange wholem lid rest - + let item = FilterMethodGroups ncenv itemRange item1 true - match item1,item with - | Item.MethodGroup(name, minfos1, _), Item.MethodGroup(_, [], _) when not (isNil minfos1) -> - error(Error(FSComp.SR.methodIsNotStatic(name),wholem)) + match item1, item with + | Item.MethodGroup(name, minfos1, _), Item.MethodGroup(_, [], _) when not (isNil minfos1) -> + error(Error(FSComp.SR.methodIsNotStatic(name), wholem)) | _ -> () // Fake idents e.g. 'Microsoft.FSharp.Core.None' have identical ranges for each part @@ -3308,22 +3308,22 @@ let ResolveLongIdentAsExprAndComputeRange (sink:TcResultsSink) (ncenv:NameResolv let callSink (refinedItem, tpinst) = if not isFakeIdents then - let occurence = + let occurence = match item with // It's r.h.s. `Case1` in `let (|Case1|Case1|) _ = if true then Case1 else Case2` // We return `Binding` for it because it's actually not usage, but definition. If we did not // it confuses detecting unused definitions. - | Item.ActivePatternResult _ -> ItemOccurence.Binding + | Item.ActivePatternResult _ -> ItemOccurence.Binding | _ -> ItemOccurence.Use CallNameResolutionSink sink (itemRange, nenv, refinedItem, item, tpinst, occurence, nenv.DisplayEnv, ad) let callSinkWithSpecificOverload (minfo: MethInfo, pinfoOpt: PropInfo option, tpinst) = - let refinedItem = - match pinfoOpt with - | None when minfo.IsConstructor -> Item.CtorGroup(minfo.LogicalName,[minfo]) - | None -> Item.MethodGroup(minfo.LogicalName,[minfo],None) - | Some pinfo -> Item.Property(pinfo.PropertyName,[pinfo]) + let refinedItem = + match pinfoOpt with + | None when minfo.IsConstructor -> Item.CtorGroup(minfo.LogicalName, [minfo]) + | None -> Item.MethodGroup(minfo.LogicalName, [minfo], None) + | Some pinfo -> Item.Property(pinfo.PropertyName, [pinfo]) callSink (refinedItem, tpinst) @@ -3332,7 +3332,7 @@ let ResolveLongIdentAsExprAndComputeRange (sink:TcResultsSink) (ncenv:NameResolv | None -> AfterResolution.DoNothing | Some _ -> if NeedsWorkAfterResolution item then - AfterResolution.RecordResolution(None, (fun tpinst -> callSink(item,tpinst)), callSinkWithSpecificOverload, (fun () -> callSink (item, emptyTyparInst))) + AfterResolution.RecordResolution(None, (fun tpinst -> callSink(item, tpinst)), callSinkWithSpecificOverload, (fun () -> callSink (item, emptyTyparInst))) else callSink (item, emptyTyparInst) AfterResolution.DoNothing @@ -3341,62 +3341,62 @@ let ResolveLongIdentAsExprAndComputeRange (sink:TcResultsSink) (ncenv:NameResolv let (|NonOverridable|_|) namedItem = match namedItem with - | Item.MethodGroup(_,minfos,_) when minfos |> List.exists(fun minfo -> minfo.IsVirtual || minfo.IsAbstract) -> None - | Item.Property(_,pinfos) when pinfos |> List.exists(fun pinfo -> pinfo.IsVirtualProperty) -> None + | Item.MethodGroup(_, minfos, _) when minfos |> List.exists(fun minfo -> minfo.IsVirtual || minfo.IsAbstract) -> None + | Item.Property(_, pinfos) when pinfos |> List.exists(fun pinfo -> pinfo.IsVirtualProperty) -> None | _ -> Some () /// Called for 'expression.Bar' - for VS IntelliSense, we can filter out static members from method groups /// Also called for 'GenericType.Bar' - for VS IntelliSense, we can filter out non-static members from method groups -let ResolveExprDotLongIdentAndComputeRange (sink:TcResultsSink) (ncenv:NameResolver) wholem ad nenv ty lid findFlag thisIsActuallyATyAppNotAnExpr = +let ResolveExprDotLongIdentAndComputeRange (sink: TcResultsSink) (ncenv: NameResolver) wholem ad nenv ty lid findFlag thisIsActuallyATyAppNotAnExpr = let resolveExpr findFlag = - let resInfo,item,rest = - match lid with + let resInfo, item, rest = + match lid with | id::rest -> ResolveExprDotLongIdent ncenv wholem ad nenv ty id rest findFlag - | _ -> error(InternalError("ResolveExprDotLongIdentAndComputeRange",wholem)) + | _ -> error(InternalError("ResolveExprDotLongIdentAndComputeRange", wholem)) let itemRange = ComputeItemRange wholem lid rest - resInfo,item,rest,itemRange + resInfo, item, rest, itemRange // "true" resolution - let resInfo,item,rest,itemRange = resolveExpr findFlag - ResolutionInfo.SendEntityPathToSink(sink,ncenv,nenv,ItemOccurence.Use,ad,resInfo,ResultTyparChecker(fun () -> CheckAllTyparsInferrable ncenv.amap itemRange item)) - + let resInfo, item, rest, itemRange = resolveExpr findFlag + ResolutionInfo.SendEntityPathToSink(sink, ncenv, nenv, ItemOccurence.Use, ad, resInfo, ResultTyparChecker(fun () -> CheckAllTyparsInferrable ncenv.amap itemRange item)) + // Record the precise resolution of the field for intellisense/goto definition let afterResolution = - match sink.CurrentSink with + match sink.CurrentSink with | None -> AfterResolution.DoNothing // do not refine the resolution if nobody listens | Some _ -> // resolution for goto definition - let unrefinedItem,itemRange,overrides = + let unrefinedItem, itemRange, overrides = match findFlag, item with - | FindMemberFlag.PreferOverrides, _ - | _, NonOverridable() -> item,itemRange,false - | FindMemberFlag.IgnoreOverrides,_ -> - let _,item,_,itemRange = resolveExpr FindMemberFlag.PreferOverrides - item, itemRange,true + | FindMemberFlag.PreferOverrides, _ + | _, NonOverridable() -> item, itemRange, false + | FindMemberFlag.IgnoreOverrides, _ -> + let _, item, _, itemRange = resolveExpr FindMemberFlag.PreferOverrides + item, itemRange, true - let callSink (refinedItem, tpinst) = + let callSink (refinedItem, tpinst) = let staticOnly = thisIsActuallyATyAppNotAnExpr let refinedItem = FilterMethodGroups ncenv itemRange refinedItem staticOnly let unrefinedItem = FilterMethodGroups ncenv itemRange unrefinedItem staticOnly - CallNameResolutionSink sink (itemRange, nenv, refinedItem, unrefinedItem, tpinst, ItemOccurence.Use, nenv.DisplayEnv, ad) + CallNameResolutionSink sink (itemRange, nenv, refinedItem, unrefinedItem, tpinst, ItemOccurence.Use, nenv.DisplayEnv, ad) let callSinkWithSpecificOverload (minfo: MethInfo, pinfoOpt: PropInfo option, tpinst) = - let refinedItem = - match pinfoOpt with - | None when minfo.IsConstructor -> Item.CtorGroup(minfo.LogicalName,[minfo]) - | None -> Item.MethodGroup(minfo.LogicalName,[minfo],None) - | Some pinfo -> Item.Property(pinfo.PropertyName,[pinfo]) + let refinedItem = + match pinfoOpt with + | None when minfo.IsConstructor -> Item.CtorGroup(minfo.LogicalName, [minfo]) + | None -> Item.MethodGroup(minfo.LogicalName, [minfo], None) + | Some pinfo -> Item.Property(pinfo.PropertyName, [pinfo]) callSink (refinedItem, tpinst) match overrides, NeedsWorkAfterResolution unrefinedItem with - | false, true -> - AfterResolution.RecordResolution (None, (fun tpinst -> callSink(item,tpinst)), callSinkWithSpecificOverload, (fun () -> callSink (unrefinedItem, emptyTyparInst))) - | true, true -> - AfterResolution.RecordResolution (Some unrefinedItem, (fun tpinst -> callSink(item,tpinst)), callSinkWithSpecificOverload, (fun () -> callSink (unrefinedItem, emptyTyparInst))) - | _ , false -> + | false, true -> + AfterResolution.RecordResolution (None, (fun tpinst -> callSink(item, tpinst)), callSinkWithSpecificOverload, (fun () -> callSink (unrefinedItem, emptyTyparInst))) + | true, true -> + AfterResolution.RecordResolution (Some unrefinedItem, (fun tpinst -> callSink(item, tpinst)), callSinkWithSpecificOverload, (fun () -> callSink (unrefinedItem, emptyTyparInst))) + | _, false -> callSink (unrefinedItem, emptyTyparInst) AfterResolution.DoNothing @@ -3410,79 +3410,79 @@ let ResolveExprDotLongIdentAndComputeRange (sink:TcResultsSink) (ncenv:NameResol // ptc = partial type check // ptci = partial type check item // -// There are some inefficiencies in this code - e.g. we often +// There are some inefficiencies in this code - e.g. we often // create potentially large lists of methods/fields/properties and then // immediately List.filter them. We also use lots of "map/concats". Doesn't // seem to hit the interactive experience too badly though. -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- /// A generator of type instantiations used when no more specific type instantiation is known. -let FakeInstantiationGenerator (_m:range) gps = List.map mkTyparTy gps +let FakeInstantiationGenerator (_m: range) gps = List.map mkTyparTy gps -// note: using local refs is ok since it is only used by VS +// note: using local refs is ok since it is only used by VS let ItemForModuleOrNamespaceRef v = Item.ModuleOrNamespaces [v] -let ItemForPropInfo (pinfo:PropInfo) = Item.Property (pinfo.PropertyName, [pinfo]) +let ItemForPropInfo (pinfo: PropInfo) = Item.Property (pinfo.PropertyName, [pinfo]) -let IsTyconUnseenObsoleteSpec ad g amap m (x:TyconRef) allowObsolete = +let IsTyconUnseenObsoleteSpec ad g amap m (x: TyconRef) allowObsolete = not (IsEntityAccessible amap m ad x) || ((not allowObsolete) && - (if x.IsILTycon then + (if x.IsILTycon then CheckILAttributesForUnseen g x.ILTyconRawMetadata.CustomAttrs m - else + else CheckFSharpAttributesForUnseen g x.Attribs m)) -let IsTyconUnseen ad g amap m (x:TyconRef) = IsTyconUnseenObsoleteSpec ad g amap m x false +let IsTyconUnseen ad g amap m (x: TyconRef) = IsTyconUnseenObsoleteSpec ad g amap m x false -let IsValUnseen ad g m (v:ValRef) = +let IsValUnseen ad g m (v: ValRef) = v.IsCompilerGenerated || v.Deref.IsClassConstructor || not (IsValAccessible ad v) || CheckFSharpAttributesForUnseen g v.Attribs m -let IsUnionCaseUnseen ad g amap m (ucref:UnionCaseRef) = +let IsUnionCaseUnseen ad g amap m (ucref: UnionCaseRef) = not (IsUnionCaseAccessible amap m ad ucref) || - IsTyconUnseen ad g amap m ucref.TyconRef || + IsTyconUnseen ad g amap m ucref.TyconRef || CheckFSharpAttributesForUnseen g ucref.Attribs m -let ItemIsUnseen ad g amap m item = - match item with +let ItemIsUnseen ad g amap m item = + match item with | Item.Value x -> IsValUnseen ad g m x - | Item.UnionCase(x,_) -> IsUnionCaseUnseen ad g amap m x.UnionCaseRef + | Item.UnionCase(x, _) -> IsUnionCaseUnseen ad g amap m x.UnionCaseRef | Item.ExnCase x -> IsTyconUnseen ad g amap m x | _ -> false -let ItemOfTyconRef ncenv m (x:TyconRef) = - Item.Types (x.DisplayName,[FreshenTycon ncenv m x]) +let ItemOfTyconRef ncenv m (x: TyconRef) = + Item.Types (x.DisplayName, [FreshenTycon ncenv m x]) -let ItemOfTy g x = +let ItemOfTy g x = let nm = if isAppTy g x then (tcrefOfAppTy g x).DisplayName else "?" - Item.Types (nm,[x]) + Item.Types (nm, [x]) // Filter out 'PrivateImplementationDetail' classes let IsInterestingModuleName nm = not (System.String.IsNullOrEmpty nm) && nm.[0] <> '<' -let rec PartialResolveLookupInModuleOrNamespaceAsModuleOrNamespaceThen f plid (modref:ModuleOrNamespaceRef) = +let rec PartialResolveLookupInModuleOrNamespaceAsModuleOrNamespaceThen f plid (modref: ModuleOrNamespaceRef) = let mty = modref.ModuleOrNamespaceType - match plid with + match plid with | [] -> f modref - | id:: rest -> + | id:: rest -> match mty.ModulesAndNamespacesByDemangledName.TryGetValue id with - | true, mty -> PartialResolveLookupInModuleOrNamespaceAsModuleOrNamespaceThen f rest (modref.NestedTyconRef mty) + | true, mty -> PartialResolveLookupInModuleOrNamespaceAsModuleOrNamespaceThen f rest (modref.NestedTyconRef mty) | _ -> [] -let PartialResolveLongIndentAsModuleOrNamespaceThen (nenv:NameResolutionEnv) plid f = +let PartialResolveLongIndentAsModuleOrNamespaceThen (nenv: NameResolutionEnv) plid f = match plid with - | id:: rest -> + | id:: rest -> match nenv.eModulesAndNamespaces.TryGetValue id with - | true, modrefs -> + | true, modrefs -> List.collect (PartialResolveLookupInModuleOrNamespaceAsModuleOrNamespaceThen f rest) modrefs | _ -> [] | [] -> [] /// Returns fields for the given class or record -let ResolveRecordOrClassFieldsOfType (ncenv: NameResolver) m ad ty statics = - ncenv.InfoReader.GetRecordOrClassFieldsOfType(None,ad,m,ty) +let ResolveRecordOrClassFieldsOfType (ncenv: NameResolver) m ad ty statics = + ncenv.InfoReader.GetRecordOrClassFieldsOfType(None, ad, m, ty) |> List.filter (fun rfref -> rfref.IsStatic = statics && IsFieldInfoAccessible ad rfref) |> List.map Item.RecdField @@ -3490,116 +3490,116 @@ let ResolveRecordOrClassFieldsOfType (ncenv: NameResolver) m ad ty statics = type ResolveCompletionTargets = | All of (MethInfo -> TType -> bool) | SettablePropertiesAndFields - member this.ResolveAll = + member this.ResolveAll = match this with | All _ -> true | SettablePropertiesAndFields -> false /// Resolve a (possibly incomplete) long identifier to a set of possible resolutions, qualified by type. let ResolveCompletionsInType (ncenv: NameResolver) nenv (completionTargets: ResolveCompletionTargets) m ad statics ty = - protectAssemblyExploration [] <| fun () -> + protectAssemblyExploration [] <| fun () -> let g = ncenv.g let amap = ncenv.amap - - let rfinfos = - ncenv.InfoReader.GetRecordOrClassFieldsOfType(None,ad,m,ty) + + let rfinfos = + ncenv.InfoReader.GetRecordOrClassFieldsOfType(None, ad, m, ty) |> List.filter (fun rfref -> rfref.IsStatic = statics && IsFieldInfoAccessible ad rfref) let ucinfos = if completionTargets.ResolveAll && statics then match tryAppTy g ty with - | ValueSome (tc,tinst) -> + | ValueSome (tc, tinst) -> tc.UnionCasesAsRefList |> List.filter (IsUnionCaseUnseen ad g ncenv.amap m >> not) - |> List.map (fun ucref -> Item.UnionCase(UnionCaseInfo(tinst,ucref),false)) + |> List.map (fun ucref -> Item.UnionCase(UnionCaseInfo(tinst, ucref), false)) | _ -> [] else [] - let einfos = + let einfos = if completionTargets.ResolveAll then - ncenv.InfoReader.GetEventInfosOfType(None,ad,m,ty) - |> List.filter (fun x -> + ncenv.InfoReader.GetEventInfosOfType(None, ad, m, ty) + |> List.filter (fun x -> IsStandardEventInfo ncenv.InfoReader m ad x && x.IsStatic = statics) else [] - let nestedTypes = + let nestedTypes = if completionTargets.ResolveAll && statics then ty - |> GetNestedTypesOfType (ad, ncenv, None, TypeNameResolutionStaticArgsInfo.Indefinite, false, m) - else + |> GetNestedTypesOfType (ad, ncenv, None, TypeNameResolutionStaticArgsInfo.Indefinite, false, m) + else [] - let finfos = - ncenv.InfoReader.GetILFieldInfosOfType(None,ad,m,ty) - |> List.filter (fun x -> + let finfos = + ncenv.InfoReader.GetILFieldInfosOfType(None, ad, m, ty) + |> List.filter (fun x -> not x.IsSpecialName && - x.IsStatic = statics && + x.IsStatic = statics && IsILFieldInfoAccessible g amap m ad x) - let pinfosIncludingUnseen = - AllPropInfosOfTypeInScope ncenv.InfoReader nenv (None,ad) PreferOverrides m ty - |> List.filter (fun x -> - x.IsStatic = statics && + let pinfosIncludingUnseen = + AllPropInfosOfTypeInScope ncenv.InfoReader nenv (None, ad) PreferOverrides m ty + |> List.filter (fun x -> + x.IsStatic = statics && IsPropInfoAccessible g amap m ad x) - // Exclude get_ and set_ methods accessed by properties - let pinfoMethNames = - (pinfosIncludingUnseen + // Exclude get_ and set_ methods accessed by properties + let pinfoMethNames = + (pinfosIncludingUnseen |> List.filter (fun pinfo -> pinfo.HasGetter) |> List.map (fun pinfo -> pinfo.GetterMethod.LogicalName)) @ - (pinfosIncludingUnseen + (pinfosIncludingUnseen |> List.filter (fun pinfo -> pinfo.HasSetter) |> List.map (fun pinfo -> pinfo.SetterMethod.LogicalName)) - - let einfoMethNames = + + let einfoMethNames = if completionTargets.ResolveAll then - [ for einfo in einfos do - let delegateType = einfo.GetDelegateType(amap,m) - let (SigOfFunctionForDelegate(invokeMethInfo,_,_,_)) = GetSigOfFunctionForDelegate ncenv.InfoReader delegateType m ad + [ for einfo in einfos do + let delegateType = einfo.GetDelegateType(amap, m) + let (SigOfFunctionForDelegate(invokeMethInfo, _, _, _)) = GetSigOfFunctionForDelegate ncenv.InfoReader delegateType m ad // Only events with void return types are suppressed in intellisense. - if slotSigHasVoidReturnTy (invokeMethInfo.GetSlotSig(amap, m)) then + if slotSigHasVoidReturnTy (invokeMethInfo.GetSlotSig(amap, m)) then yield einfo.AddMethod.DisplayName yield einfo.RemoveMethod.DisplayName ] else [] - let pinfos = + let pinfos = pinfosIncludingUnseen |> List.filter (fun x -> not (PropInfoIsUnseen m x)) - let minfoFilter (suppressedMethNames:Zset<_>) (minfo:MethInfo) = + let minfoFilter (suppressedMethNames: Zset<_>) (minfo: MethInfo) = let isApplicableMeth = match completionTargets with | ResolveCompletionTargets.All x -> x | _ -> failwith "internal error: expected completionTargets = ResolveCompletionTargets.All" - // Only show the Finalize, MemberwiseClose etc. methods on System.Object for values whose static type really is - // System.Object. Few of these are typically used from F#. + // Only show the Finalize, MemberwiseClose etc. methods on System.Object for values whose static type really is + // System.Object. Few of these are typically used from F#. // // Don't show GetHashCode or Equals for F# types that admit equality as an abnormal operation - let isUnseenDueToBasicObjRules = + let isUnseenDueToBasicObjRules = not (isObjTy g ty) && not minfo.IsExtensionMember && match minfo.LogicalName with | "GetType" -> false | "GetHashCode" -> isObjTy g minfo.ApparentEnclosingType && not (AugmentWithHashCompare.TypeDefinitelyHasEquality g ty) | "ToString" -> false - | "Equals" -> - if not (isObjTy g minfo.ApparentEnclosingType) then + | "Equals" -> + if not (isObjTy g minfo.ApparentEnclosingType) then // declaring type is not System.Object - show it - false + false elif minfo.IsInstance then // System.Object has only one instance Equals method and we want to suppress it unless Augment.TypeDefinitelyHasEquality is true not (AugmentWithHashCompare.TypeDefinitelyHasEquality g ty) else // System.Object has only one static Equals method and we always want to suppress it true - | _ -> + | _ -> // filter out self methods of obj type isObjTy g minfo.ApparentEnclosingType - let result = + let result = not isUnseenDueToBasicObjRules && not minfo.IsInstance = statics && IsMethInfoAccessible amap m ad minfo && @@ -3613,8 +3613,8 @@ let ResolveCompletionsInType (ncenv: NameResolver) nenv (completionTargets: Reso result - let pinfoItems = - let pinfos = + let pinfoItems = + let pinfos = match completionTargets with | ResolveCompletionTargets.SettablePropertiesAndFields -> pinfos |> List.filter (fun p -> p.HasSetter) | _ -> pinfos @@ -3627,9 +3627,9 @@ let ResolveCompletionsInType (ncenv: NameResolver) nenv (completionTargets: Reso | _ -> pinfoOpt) // REVIEW: add a name filter here in the common cases? - let minfos = + let minfos = if completionTargets.ResolveAll then - let minfos = AllMethInfosOfTypeInScope ncenv.InfoReader nenv (None,ad) PreferOverrides m ty + let minfos = AllMethInfosOfTypeInScope ncenv.InfoReader nenv (None, ad) PreferOverrides m ty if isNil minfos then [] else @@ -3647,7 +3647,7 @@ let ResolveCompletionsInType (ncenv: NameResolver) nenv (completionTargets: Reso let hashSet = HashSet() for item in pinfoItems do match item with - | Item.Event(FSEvent(_,_,addValRef,removeValRef)) -> + | Item.Event(FSEvent(_, _, addValRef, removeValRef)) -> hashSet.Add addValRef.LogicalName |> ignore hashSet.Add removeValRef.LogicalName |> ignore | _ -> () @@ -3658,40 +3658,40 @@ let ResolveCompletionsInType (ncenv: NameResolver) nenv (completionTargets: Reso #if !NO_EXTENSIONTYPING // Filter out the ones with mangled names from applying static parameters - let minfos = - let methsWithStaticParams = - minfos - |> List.filter (fun minfo -> - match minfo.ProvidedStaticParameterInfo with + let minfos = + let methsWithStaticParams = + minfos + |> List.filter (fun minfo -> + match minfo.ProvidedStaticParameterInfo with | Some (_methBeforeArguments, staticParams) -> staticParams.Length <> 0 | _ -> false) |> List.map (fun minfo -> minfo.DisplayName) if methsWithStaticParams.IsEmpty then minfos - else minfos |> List.filter (fun minfo -> + else minfos |> List.filter (fun minfo -> let nm = minfo.LogicalName not (nm.Contains "," && methsWithStaticParams |> List.exists (fun m -> nm.StartsWithOrdinal(m)))) #endif - minfos + minfos - else + else [] // Partition methods into overload sets - let rec partitionl (l:MethInfo list) acc = + let rec partitionl (l: MethInfo list) acc = match l with | [] -> acc - | h::t -> + | h::t -> let nm = h.LogicalName partitionl t (NameMultiMap.add nm h acc) let anonFields = if statics then [] else - match tryDestAnonRecdTy g ty with - | ValueSome (anonInfo, tys) -> - [ for (i,id) in Array.indexed anonInfo.SortedIds do + match tryDestAnonRecdTy g ty with + | ValueSome (anonInfo, tys) -> + [ for (i, id) in Array.indexed anonInfo.SortedIds do yield Item.AnonRecdField(anonInfo, tys, i, id.idRange) ] | _ -> [] @@ -3704,7 +3704,7 @@ let ResolveCompletionsInType (ncenv: NameResolver) nenv (completionTargets: Reso List.map Item.Event einfos @ List.map (ItemOfTy g) nestedTypes @ List.map Item.MakeMethGroup (NameMap.toList (partitionl minfos Map.empty)) - + let rec ResolvePartialLongIdentInType (ncenv: NameResolver) nenv isApplicableMeth m ad statics plid ty = let g = ncenv.g @@ -3712,79 +3712,79 @@ let rec ResolvePartialLongIdentInType (ncenv: NameResolver) nenv isApplicableMet match plid with | [] -> ResolveCompletionsInType ncenv nenv isApplicableMeth m ad statics ty | id :: rest -> - - let rfinfos = - ncenv.InfoReader.GetRecordOrClassFieldsOfType(None,ad,m,ty) + + let rfinfos = + ncenv.InfoReader.GetRecordOrClassFieldsOfType(None, ad, m, ty) |> List.filter (fun fref -> fref.Name = id && IsRecdFieldAccessible ncenv.amap m ad fref.RecdFieldRef && fref.RecdField.IsStatic = statics) - - let nestedTypes = - ty - |> GetNestedTypesOfType (ad, ncenv, Some id, TypeNameResolutionStaticArgsInfo.Indefinite, false, m) - // e.g. .. + let nestedTypes = + ty + |> GetNestedTypesOfType (ad, ncenv, Some id, TypeNameResolutionStaticArgsInfo.Indefinite, false, m) + + // e.g. .. (rfinfos |> List.collect (fun x -> x.FieldType |> ResolvePartialLongIdentInType ncenv nenv isApplicableMeth m ad false rest)) @ - // e.g. .. - let FullTypeOfPinfo(pinfo:PropInfo) = - let rty = pinfo.GetPropertyType(amap,m) - let rty = if pinfo.IsIndexer then mkRefTupledTy g (pinfo.GetParamTypes(amap, m)) --> rty else rty + // e.g. .. + let FullTypeOfPinfo(pinfo: PropInfo) = + let rty = pinfo.GetPropertyType(amap, m) + let rty = if pinfo.IsIndexer then mkRefTupledTy g (pinfo.GetParamTypes(amap, m)) --> rty else rty rty (ty - |> AllPropInfosOfTypeInScope ncenv.InfoReader nenv (Some id,ad) IgnoreOverrides m - |> List.filter (fun pinfo -> pinfo.IsStatic = statics && IsPropInfoAccessible g amap m ad pinfo) + |> AllPropInfosOfTypeInScope ncenv.InfoReader nenv (Some id, ad) IgnoreOverrides m + |> List.filter (fun pinfo -> pinfo.IsStatic = statics && IsPropInfoAccessible g amap m ad pinfo) |> List.collect (fun pinfo -> (FullTypeOfPinfo pinfo) |> ResolvePartialLongIdentInType ncenv nenv isApplicableMeth m ad false rest)) @ - (if statics then [] - else - match TryFindAnonRecdFieldOfType g ty id with + (if statics then [] + else + match TryFindAnonRecdFieldOfType g ty id with | Some (Item.AnonRecdField(_anonInfo, tys, i, _)) -> ResolvePartialLongIdentInType ncenv nenv isApplicableMeth m ad false rest tys.[i] | _ -> []) @ - // e.g. .. - (ncenv.InfoReader.GetEventInfosOfType(Some id,ad,m,ty) + // e.g. .. + (ncenv.InfoReader.GetEventInfosOfType(Some id, ad, m, ty) |> List.collect (PropTypOfEventInfo ncenv.InfoReader m ad >> ResolvePartialLongIdentInType ncenv nenv isApplicableMeth m ad false rest)) @ - // nested types! - (nestedTypes + // nested types! + (nestedTypes |> List.collect (ResolvePartialLongIdentInType ncenv nenv isApplicableMeth m ad statics rest)) @ - // e.g. .. - (ncenv.InfoReader.GetILFieldInfosOfType(Some id,ad,m,ty) - |> List.filter (fun x -> + // e.g. .. + (ncenv.InfoReader.GetILFieldInfosOfType(Some id, ad, m, ty) + |> List.filter (fun x -> not x.IsSpecialName && - x.IsStatic = statics && + x.IsStatic = statics && IsILFieldInfoAccessible g amap m ad x) - |> List.collect (fun x -> x.FieldType(amap,m) |> ResolvePartialLongIdentInType ncenv nenv isApplicableMeth m ad false rest)) - -let InfosForTyconConstructors (ncenv:NameResolver) m ad (tcref:TyconRef) = + |> List.collect (fun x -> x.FieldType(amap, m) |> ResolvePartialLongIdentInType ncenv nenv isApplicableMeth m ad false rest)) + +let InfosForTyconConstructors (ncenv: NameResolver) m ad (tcref: TyconRef) = let g = ncenv.g let amap = ncenv.amap // Don't show constructors for type abbreviations. See FSharp 1.0 bug 2881 - if tcref.IsTypeAbbrev then + if tcref.IsTypeAbbrev then [] - else + else let ty = FreshenTycon ncenv m tcref - match ResolveObjectConstructor ncenv (DisplayEnv.Empty g) m ad ty with - | Result item -> - match item with + match ResolveObjectConstructor ncenv (DisplayEnv.Empty g) m ad ty with + | Result item -> + match item with | Item.FakeInterfaceCtor _ -> [] - | Item.CtorGroup(nm,ctorInfos) -> - let ctors = - ctorInfos + | Item.CtorGroup(nm, ctorInfos) -> + let ctors = + ctorInfos |> List.filter (fun minfo -> IsMethInfoAccessible amap m ad minfo && not (MethInfoIsUnseen g m ty minfo)) match ctors with | [] -> [] - | _ -> [Item.MakeCtorGroup(nm,ctors)] - | item -> + | _ -> [Item.MakeCtorGroup(nm, ctors)] + | item -> [item] | Exception _ -> [] -/// import.fs creates somewhat fake modules for nested members of types (so that +/// import.fs creates somewhat fake modules for nested members of types (so that /// types never contain other types) -let inline notFakeContainerModule (tyconNames:HashSet<_>) nm = +let inline notFakeContainerModule (tyconNames: HashSet<_>) nm = not (tyconNames.Contains nm) let getFakeContainerModulesFromTycons (tycons:#seq) = @@ -3801,52 +3801,52 @@ let getFakeContainerModulesFromTyconRefs (tyconRefs:#seq) = hashSet.Add tyconRef.DisplayName |> ignore hashSet -/// Check is a namespace or module contains something accessible -let rec private EntityRefContainsSomethingAccessible (ncenv: NameResolver) m ad (modref:ModuleOrNamespaceRef) = +/// Check is a namespace or module contains something accessible +let rec private EntityRefContainsSomethingAccessible (ncenv: NameResolver) m ad (modref: ModuleOrNamespaceRef) = let g = ncenv.g let mty = modref.ModuleOrNamespaceType - // Search the values in the module for an accessible value + // Search the values in the module for an accessible value (mty.AllValsAndMembers - |> Seq.exists (fun v -> + |> Seq.exists (fun v -> // This may explore assemblies that are not in the reference set, - // e.g. for extension members that extend a type not in the reference set. - // In this case assume it is accessible. The user may later explore this module + // e.g. for extension members that extend a type not in the reference set. + // In this case assume it is accessible. The user may later explore this module // but will not see the extension members anyway. // // Note: this is the only use of protectAssemblyExplorationNoReraise. // REVIEW: consider changing this to protectAssemblyExploration. We shouldn't need // to catch arbitrary exceptions here. protectAssemblyExplorationNoReraise true false - (fun () -> + (fun () -> let vref = mkNestedValRef modref v - not vref.IsCompilerGenerated && + not vref.IsCompilerGenerated && not (IsValUnseen ad g m vref) && (vref.IsExtensionMember || not vref.IsMember)))) || - // Search the types in the namespace/module for an accessible tycon + // Search the types in the namespace/module for an accessible tycon (mty.AllEntities - |> QueueList.exists (fun tc -> - not tc.IsModuleOrNamespace && + |> QueueList.exists (fun tc -> + not tc.IsModuleOrNamespace && not (IsTyconUnseen ad g ncenv.amap m (modref.NestedTyconRef tc)))) || - // Search the sub-modules of the namespace/module for something accessible - (mty.ModulesAndNamespacesByDemangledName - |> NameMap.exists (fun _ submod -> + // Search the sub-modules of the namespace/module for something accessible + (mty.ModulesAndNamespacesByDemangledName + |> NameMap.exists (fun _ submod -> let submodref = modref.NestedTyconRef submod - EntityRefContainsSomethingAccessible ncenv m ad submodref)) + EntityRefContainsSomethingAccessible ncenv m ad submodref)) -let rec ResolvePartialLongIdentInModuleOrNamespace (ncenv: NameResolver) nenv isApplicableMeth m ad (modref:ModuleOrNamespaceRef) plid allowObsolete = +let rec ResolvePartialLongIdentInModuleOrNamespace (ncenv: NameResolver) nenv isApplicableMeth m ad (modref: ModuleOrNamespaceRef) plid allowObsolete = let g = ncenv.g let mty = modref.ModuleOrNamespaceType - - match plid with - | [] -> - let tycons = + + match plid with + | [] -> + let tycons = mty.TypeDefinitions |> List.filter (fun tcref -> - not (tcref.LogicalName.Contains(",")) && + not (tcref.LogicalName.Contains ",") && not (IsTyconUnseen ad g ncenv.amap m (modref.NestedTyconRef tcref))) - + let accessibleSubModules = let moduleOrNamespaces = mty.ModulesAndNamespacesByDemangledName @@ -3857,7 +3857,7 @@ let rec ResolvePartialLongIdentInModuleOrNamespace (ncenv: NameResolver) nenv is let ilTyconNames = getFakeContainerModulesFromTycons mty.TypesByAccessNames.Values moduleOrNamespaces - |> List.filter (fun x -> + |> List.filter (fun x -> let demangledName = x.DemangledModuleOrNamespaceName notFakeContainerModule ilTyconNames demangledName && IsInterestingModuleName demangledName) |> List.map modref.NestedTyconRef @@ -3873,35 +3873,35 @@ let rec ResolvePartialLongIdentInModuleOrNamespace (ncenv: NameResolver) nenv is |> List.filter (fun vref -> not vref.IsMember && not (IsValUnseen ad g m vref)) |> List.map Item.Value) - // Collect up the accessible discriminated union cases in the module - @ (UnionCaseRefsInModuleOrNamespace modref + // Collect up the accessible discriminated union cases in the module + @ (UnionCaseRefsInModuleOrNamespace modref |> List.filter (IsUnionCaseUnseen ad g ncenv.amap m >> not) - |> List.map (fun x -> Item.UnionCase(GeneralizeUnionCaseRef x,false))) + |> List.map (fun x -> Item.UnionCase(GeneralizeUnionCaseRef x, false))) - // Collect up the accessible active patterns in the module - @ (ActivePatternElemsOfModuleOrNamespace modref + // Collect up the accessible active patterns in the module + @ (ActivePatternElemsOfModuleOrNamespace modref |> NameMap.range - |> List.filter (fun apref -> apref.ActivePatternVal |> IsValUnseen ad g m |> not) + |> List.filter (fun apref -> apref.ActivePatternVal |> IsValUnseen ad g m |> not) |> List.map Item.ActivePatternCase) - // Collect up the accessible F# exception declarations in the module - @ (mty.ExceptionDefinitionsByDemangledName - |> NameMap.range + // Collect up the accessible F# exception declarations in the module + @ (mty.ExceptionDefinitionsByDemangledName + |> NameMap.range |> List.map modref.NestedTyconRef |> List.filter (IsTyconUnseen ad g ncenv.amap m >> not) |> List.map Item.ExnCase) @ accessibleSubModules - // Get all the types and .NET constructor groups accessible from here - @ (tycons + // Get all the types and .NET constructor groups accessible from here + @ (tycons |> List.map (modref.NestedTyconRef >> ItemOfTyconRef ncenv m) ) - @ (tycons + @ (tycons |> List.collect (modref.NestedTyconRef >> InfosForTyconConstructors ncenv m ad)) - | id :: rest -> + | id :: rest -> (match mty.ModulesAndNamespacesByDemangledName.TryGetValue id with | true, mspec -> @@ -3914,10 +3914,10 @@ let rec ResolvePartialLongIdentInModuleOrNamespace (ncenv: NameResolver) nenv is @ (LookupTypeNameInEntityNoArity m id modref.ModuleOrNamespaceType |> List.collect (fun tycon -> - let tcref = modref.NestedTyconRef tycon - if not (IsTyconUnseenObsoleteSpec ad g ncenv.amap m tcref allowObsolete) then + let tcref = modref.NestedTyconRef tycon + if not (IsTyconUnseenObsoleteSpec ad g ncenv.amap m tcref allowObsolete) then tcref |> generalizedTyconRef |> ResolvePartialLongIdentInType ncenv nenv isApplicableMeth m ad true rest - else + else [])) /// Try to resolve a long identifier as type. @@ -3926,13 +3926,13 @@ let TryToResolveLongIdentAsType (ncenv: NameResolver) (nenv: NameResolutionEnv) match List.tryLast plid with | Some id -> - // Look for values called 'id' that accept the dot-notation - let ty = + // Look for values called 'id' that accept the dot-notation + let ty = match nenv.eUnqualifiedItems.TryGetValue id with - // v.lookup : member of a value + // v.lookup: member of a value | true, v -> - match v with - | Item.Value x -> + match v with + | Item.Value x -> let ty = x.Type let ty = if x.BaseOrThisInfo = CtorThisVal && isRefCellTy g ty then destRefCellTy g ty else ty Some ty @@ -3942,17 +3942,17 @@ let TryToResolveLongIdentAsType (ncenv: NameResolver) (nenv: NameResolutionEnv) match ty with | Some _ -> ty | _ -> - // type.lookup : lookup a static something in a type + // type.lookup: lookup a static something in a type LookupTypeNameInEnvNoArity OpenQualified id nenv |> List.tryHead |> Option.map (fun tcref -> let tcref = ResolveNestedTypeThroughAbbreviation ncenv tcref m - FreshenTycon ncenv m tcref) + FreshenTycon ncenv m tcref) | _ -> None -/// allowObsolete - specifies whether we should return obsolete types & modules +/// allowObsolete - specifies whether we should return obsolete types & modules /// as (no other obsolete items are returned) -let rec ResolvePartialLongIdentPrim (ncenv: NameResolver) (nenv: NameResolutionEnv) isApplicableMeth fullyQualified m ad plid allowObsolete : Item list = +let rec ResolvePartialLongIdentPrim (ncenv: NameResolver) (nenv: NameResolutionEnv) isApplicableMeth fullyQualified m ad plid allowObsolete: Item list = let g = ncenv.g match plid with @@ -3960,23 +3960,23 @@ let rec ResolvePartialLongIdentPrim (ncenv: NameResolver) (nenv: NameResolutionE ResolvePartialLongIdentPrim ncenv nenv isApplicableMeth FullyQualified m ad plid allowObsolete - | [] -> - - - /// Include all the entries in the eUnqualifiedItems table. - let unqualifiedItems = - match fullyQualified with + | [] -> + + + /// Include all the entries in the eUnqualifiedItems table. + let unqualifiedItems = + match fullyQualified with | FullyQualified -> [] | OpenQualified -> nenv.eUnqualifiedItems.Values - |> List.filter (function - | Item.UnqualifiedType _ -> false + |> List.filter (function + | Item.UnqualifiedType _ -> false | Item.Value v -> not v.IsMember | _ -> true) |> List.filter (ItemIsUnseen ad g ncenv.amap m >> not) - let activePatternItems = - match fullyQualified with + let activePatternItems = + match fullyQualified with | FullyQualified -> [] | OpenQualified -> nenv.ePatItems @@ -3984,10 +3984,10 @@ let rec ResolvePartialLongIdentPrim (ncenv: NameResolver) (nenv: NameResolutionE |> List.filter (function Item.ActivePatternCase _v -> true | _ -> false) let moduleAndNamespaceItems = - let moduleOrNamespaceRefs = + let moduleOrNamespaceRefs = nenv.ModulesAndNamespaces fullyQualified |> NameMultiMap.range - + if isNil moduleOrNamespaceRefs then [] else let ilTyconNames = getFakeContainerModulesFromTyconRefs (nenv.TyconsByAccessNames(fullyQualified).Values) @@ -3999,84 +3999,84 @@ let rec ResolvePartialLongIdentPrim (ncenv: NameResolver) (nenv: NameResolutionE not (IsTyconUnseen ad g ncenv.amap m modref)) |> List.map ItemForModuleOrNamespaceRef - let tycons = + let tycons = nenv.TyconsByDemangledNameAndArity(fullyQualified).Values |> List.filter (fun tcref -> - not (tcref.LogicalName.Contains(",")) && + not (tcref.LogicalName.Contains ",") && not tcref.IsExceptionDecl && not (IsTyconUnseen ad g ncenv.amap m tcref)) |> List.map (ItemOfTyconRef ncenv m) // Get all the constructors accessible from here - let constructors = + let constructors = nenv.TyconsByDemangledNameAndArity(fullyQualified).Values |> List.filter (IsTyconUnseen ad g ncenv.amap m >> not) |> List.collect (InfosForTyconConstructors ncenv m ad) unqualifiedItems @ activePatternItems @ moduleAndNamespaceItems @ tycons @ constructors - | id :: rest -> - - // Look in the namespaces 'id' - let namespaces = - PartialResolveLongIndentAsModuleOrNamespaceThen nenv [id] (fun modref -> + | id :: rest -> + + // Look in the namespaces 'id' + let namespaces = + PartialResolveLongIndentAsModuleOrNamespaceThen nenv [id] (fun modref -> let allowObsolete = rest <> [] && allowObsolete - if EntityRefContainsSomethingAccessible ncenv m ad modref then + if EntityRefContainsSomethingAccessible ncenv m ad modref then ResolvePartialLongIdentInModuleOrNamespace ncenv nenv isApplicableMeth m ad modref rest allowObsolete - else + else []) - // Look for values called 'id' that accept the dot-notation - let values, isItemVal = + // Look for values called 'id' that accept the dot-notation + let values, isItemVal = (match nenv.eUnqualifiedItems.TryGetValue id with - // v.lookup : member of a value + // v.lookup: member of a value | true, v -> - match v with - | Item.Value x -> + match v with + | Item.Value x -> let ty = x.Type let ty = if x.BaseOrThisInfo = CtorThisVal && isRefCellTy g ty then destRefCellTy g ty else ty (ResolvePartialLongIdentInType ncenv nenv isApplicableMeth m ad false rest ty), true | _ -> [], false | _ -> [], false) - let staticSometingInType = - [ if not isItemVal then - // type.lookup : lookup a static something in a type + let staticSometingInType = + [ if not isItemVal then + // type.lookup: lookup a static something in a type for tcref in LookupTypeNameInEnvNoArity OpenQualified id nenv do let tcref = ResolveNestedTypeThroughAbbreviation ncenv tcref m let ty = FreshenTycon ncenv m tcref yield! ResolvePartialLongIdentInType ncenv nenv isApplicableMeth m ad true rest ty ] - + namespaces @ values @ staticSometingInType /// Resolve a (possibly incomplete) long identifier to a set of possible resolutions. -let ResolvePartialLongIdent ncenv nenv isApplicableMeth m ad plid allowObsolete = - ResolvePartialLongIdentPrim ncenv nenv (ResolveCompletionTargets.All isApplicableMeth) OpenQualified m ad plid allowObsolete +let ResolvePartialLongIdent ncenv nenv isApplicableMeth m ad plid allowObsolete = + ResolvePartialLongIdentPrim ncenv nenv (ResolveCompletionTargets.All isApplicableMeth) OpenQualified m ad plid allowObsolete // REVIEW: has much in common with ResolvePartialLongIdentInModuleOrNamespace - probably they should be united -let rec ResolvePartialLongIdentInModuleOrNamespaceForRecordFields (ncenv: NameResolver) nenv m ad (modref:ModuleOrNamespaceRef) plid allowObsolete = +let rec ResolvePartialLongIdentInModuleOrNamespaceForRecordFields (ncenv: NameResolver) nenv m ad (modref: ModuleOrNamespaceRef) plid allowObsolete = let g = ncenv.g let mty = modref.ModuleOrNamespaceType - match plid with - | [] -> + match plid with + | [] -> // get record type constructors - let tycons = + let tycons = mty.TypeDefinitions |> List.filter (fun tcref -> - not (tcref.LogicalName.Contains(",")) && + not (tcref.LogicalName.Contains ",") && tcref.IsRecordTycon && not (IsTyconUnseen ad g ncenv.amap m (modref.NestedTyconRef tcref))) let accessibleSubModules = let moduleOrNamespaces = - mty.ModulesAndNamespacesByDemangledName + mty.ModulesAndNamespacesByDemangledName |> NameMap.range if isNil moduleOrNamespaces then [] else - let ilTyconNames = getFakeContainerModulesFromTycons mty.TypesByAccessNames.Values - + let ilTyconNames = getFakeContainerModulesFromTycons mty.TypesByAccessNames.Values + moduleOrNamespaces |> List.filter (fun x -> let demangledName = x.DemangledModuleOrNamespaceName @@ -4086,7 +4086,7 @@ let rec ResolvePartialLongIdentInModuleOrNamespaceForRecordFields (ncenv: NameRe not (IsTyconUnseen ad g ncenv.amap m tcref) && EntityRefContainsSomethingAccessible ncenv m ad tcref) |> List.map ItemForModuleOrNamespaceRef - + accessibleSubModules // Collect all accessible record types @@ -4096,14 +4096,14 @@ let rec ResolvePartialLongIdentInModuleOrNamespaceForRecordFields (ncenv: NameRe let nested = modref.NestedTyconRef tycon if IsEntityAccessible ncenv.amap m ad nested then let ttype = FreshenTycon ncenv m nested - yield! + yield! ncenv.InfoReader.GetRecordOrClassFieldsOfType(None, ad, m, ttype) |> List.map Item.RecdField ] - | id :: rest -> + | id :: rest -> (match mty.ModulesAndNamespacesByDemangledName.TryGetValue id with - | true, mspec -> + | true, mspec -> let nested = modref.NestedTyconRef mspec if IsTyconUnseenObsoleteSpec ad g ncenv.amap m nested allowObsolete then [] else let allowObsolete = allowObsolete && not (isNil rest) @@ -4111,7 +4111,7 @@ let rec ResolvePartialLongIdentInModuleOrNamespaceForRecordFields (ncenv: NameRe | _ -> []) @ ( match rest with - | [] -> + | [] -> // get all fields from the type named 'id' located in current modref let tycons = LookupTypeNameInEntityNoArity m id modref.ModuleOrNamespaceType tycons @@ -4124,27 +4124,27 @@ let rec ResolvePartialLongIdentInModuleOrNamespaceForRecordFields (ncenv: NameRe | _ -> [] ) -/// allowObsolete - specifies whether we should return obsolete types & modules +/// allowObsolete - specifies whether we should return obsolete types & modules /// as (no other obsolete items are returned) -let rec ResolvePartialLongIdentToClassOrRecdFields (ncenv: NameResolver) (nenv: NameResolutionEnv) m ad plid (allowObsolete : bool) = +let rec ResolvePartialLongIdentToClassOrRecdFields (ncenv: NameResolver) (nenv: NameResolutionEnv) m ad plid (allowObsolete: bool) = ResolvePartialLongIdentToClassOrRecdFieldsImpl ncenv nenv OpenQualified m ad plid allowObsolete -and ResolvePartialLongIdentToClassOrRecdFieldsImpl (ncenv: NameResolver) (nenv: NameResolutionEnv) fullyQualified m ad plid allowObsolete = +and ResolvePartialLongIdentToClassOrRecdFieldsImpl (ncenv: NameResolver) (nenv: NameResolutionEnv) fullyQualified m ad plid allowObsolete = let g = ncenv.g match plid with | id :: plid when id = "global" -> // this is deliberately not the mangled name // dive deeper ResolvePartialLongIdentToClassOrRecdFieldsImpl ncenv nenv FullyQualified m ad plid allowObsolete - | [] -> - + | [] -> + // empty plid - return namespaces\modules\record types\accessible fields - let mods = + let mods = let moduleOrNamespaceRefs = nenv.ModulesAndNamespaces fullyQualified - |> NameMultiMap.range + |> NameMultiMap.range if isNil moduleOrNamespaceRefs then [] else @@ -4158,34 +4158,34 @@ and ResolvePartialLongIdentToClassOrRecdFieldsImpl (ncenv: NameResolver) (nenv: not (IsTyconUnseen ad g ncenv.amap m modref)) |> List.map ItemForModuleOrNamespaceRef - let recdTyCons = + let recdTyCons = nenv.TyconsByDemangledNameAndArity(fullyQualified).Values |> List.filter (fun tcref -> - not (tcref.LogicalName.Contains(",")) && + not (tcref.LogicalName.Contains ",") && tcref.IsRecordTycon && not (IsTyconUnseen ad g ncenv.amap m tcref)) |> List.map (ItemOfTyconRef ncenv m) - let recdFields = + let recdFields = nenv.eFieldLabels |> Seq.collect (fun (KeyValue(_, v)) -> v) - |> Seq.map (fun fref -> + |> Seq.map (fun fref -> let typeInsts = fref.TyconRef.TyparsNoRange |> List.map (fun tyar -> tyar.AsType) Item.RecdField(RecdFieldInfo(typeInsts, fref))) |> List.ofSeq mods @ recdTyCons @ recdFields - | id::rest -> + | id::rest -> // Get results - let modsOrNs = - PartialResolveLongIndentAsModuleOrNamespaceThen nenv [id] (fun modref -> + let modsOrNs = + PartialResolveLongIndentAsModuleOrNamespaceThen nenv [id] (fun modref -> let allowObsolete = rest <> [] && allowObsolete - if EntityRefContainsSomethingAccessible ncenv m ad modref then + if EntityRefContainsSomethingAccessible ncenv m ad modref then ResolvePartialLongIdentInModuleOrNamespaceForRecordFields ncenv nenv m ad modref rest allowObsolete - else + else []) - let qualifiedFields = + let qualifiedFields = match rest with | [] -> // get record types accessible in given nenv @@ -4202,11 +4202,11 @@ let ResolveCompletionsInTypeForItem (ncenv: NameResolver) nenv m ad statics ty ( seq { let g = ncenv.g let amap = ncenv.amap - + match item with | Item.RecdField _ -> yield! - ncenv.InfoReader.GetRecordOrClassFieldsOfType(None,ad,m,ty) + ncenv.InfoReader.GetRecordOrClassFieldsOfType(None, ad, m, ty) |> List.filter (fun rfref -> rfref.IsStatic = statics && IsFieldInfoAccessible ad rfref) |> List.map Item.RecdField | Item.UnionCase _ -> @@ -4214,23 +4214,23 @@ let ResolveCompletionsInTypeForItem (ncenv: NameResolver) nenv m ad statics ty ( match tryAppTy g ty with | ValueSome(tc, tinst) -> yield! - tc.UnionCasesAsRefList + tc.UnionCasesAsRefList |> List.filter (IsUnionCaseUnseen ad g ncenv.amap m >> not) - |> List.map (fun ucref -> Item.UnionCase(UnionCaseInfo(tinst,ucref),false)) + |> List.map (fun ucref -> Item.UnionCase(UnionCaseInfo(tinst, ucref), false)) | _ -> () | Item.Event _ -> yield! - ncenv.InfoReader.GetEventInfosOfType(None,ad,m,ty) - |> List.filter (fun x -> + ncenv.InfoReader.GetEventInfosOfType(None, ad, m, ty) + |> List.filter (fun x -> IsStandardEventInfo ncenv.InfoReader m ad x && x.IsStatic = statics) |> List.map Item.Event | Item.ILField _ -> yield! - ncenv.InfoReader.GetILFieldInfosOfType(None,ad,m,ty) - |> List.filter (fun x -> + ncenv.InfoReader.GetILFieldInfosOfType(None, ad, m, ty) + |> List.filter (fun x -> not x.IsSpecialName && - x.IsStatic = statics && + x.IsStatic = statics && IsILFieldInfoAccessible g amap m ad x) |> List.map Item.ILField | Item.Types _ -> @@ -4238,74 +4238,74 @@ let ResolveCompletionsInTypeForItem (ncenv: NameResolver) nenv m ad statics ty ( yield! ty |> GetNestedTypesOfType (ad, ncenv, None, TypeNameResolutionStaticArgsInfo.Indefinite, false, m) |> List.map (ItemOfTy g) | _ -> if not statics then - match tryDestAnonRecdTy g ty with - | ValueSome (anonInfo, tys) -> - for (i,id) in Array.indexed anonInfo.SortedIds do + match tryDestAnonRecdTy g ty with + | ValueSome (anonInfo, tys) -> + for (i, id) in Array.indexed anonInfo.SortedIds do yield Item.AnonRecdField(anonInfo, tys, i, id.idRange) | _ -> () - let pinfosIncludingUnseen = - AllPropInfosOfTypeInScope ncenv.InfoReader nenv (None,ad) PreferOverrides m ty - |> List.filter (fun x -> - x.IsStatic = statics && + let pinfosIncludingUnseen = + AllPropInfosOfTypeInScope ncenv.InfoReader nenv (None, ad) PreferOverrides m ty + |> List.filter (fun x -> + x.IsStatic = statics && IsPropInfoAccessible g amap m ad x) - - // Exclude get_ and set_ methods accessed by properties - let pinfoMethNames = - (pinfosIncludingUnseen + + // Exclude get_ and set_ methods accessed by properties + let pinfoMethNames = + (pinfosIncludingUnseen |> List.filter (fun pinfo -> pinfo.HasGetter) |> List.map (fun pinfo -> pinfo.GetterMethod.LogicalName)) @ - (pinfosIncludingUnseen + (pinfosIncludingUnseen |> List.filter (fun pinfo -> pinfo.HasSetter) |> List.map (fun pinfo -> pinfo.SetterMethod.LogicalName)) - - let einfoMethNames = - let einfos = - ncenv.InfoReader.GetEventInfosOfType(None,ad,m,ty) - |> List.filter (fun x -> + + let einfoMethNames = + let einfos = + ncenv.InfoReader.GetEventInfosOfType(None, ad, m, ty) + |> List.filter (fun x -> IsStandardEventInfo ncenv.InfoReader m ad x && x.IsStatic = statics) - - [ for einfo in einfos do + + [ for einfo in einfos do let delegateType = einfo.GetDelegateType(amap, m) - let (SigOfFunctionForDelegate(invokeMethInfo,_,_,_)) = GetSigOfFunctionForDelegate ncenv.InfoReader delegateType m ad + let (SigOfFunctionForDelegate(invokeMethInfo, _, _, _)) = GetSigOfFunctionForDelegate ncenv.InfoReader delegateType m ad // Only events with void return types are suppressed in intellisense. - if slotSigHasVoidReturnTy (invokeMethInfo.GetSlotSig(amap, m)) then + if slotSigHasVoidReturnTy (invokeMethInfo.GetSlotSig(amap, m)) then yield einfo.AddMethod.DisplayName yield einfo.RemoveMethod.DisplayName ] - - - let pinfos = + + + let pinfos = pinfosIncludingUnseen |> List.filter (fun x -> not (PropInfoIsUnseen m x)) - - let minfoFilter (suppressedMethNames:Zset<_>) (minfo: MethInfo) = - // Only show the Finalize, MemberwiseClose etc. methods on System.Object for values whose static type really is - // System.Object. Few of these are typically used from F#. + + let minfoFilter (suppressedMethNames: Zset<_>) (minfo: MethInfo) = + // Only show the Finalize, MemberwiseClose etc. methods on System.Object for values whose static type really is + // System.Object. Few of these are typically used from F#. // // Don't show GetHashCode or Equals for F# types that admit equality as an abnormal operation - let isUnseenDueToBasicObjRules = + let isUnseenDueToBasicObjRules = not (isObjTy g ty) && not minfo.IsExtensionMember && match minfo.LogicalName with | "GetType" -> false | "GetHashCode" -> isObjTy g minfo.ApparentEnclosingType && not (AugmentWithHashCompare.TypeDefinitelyHasEquality g ty) | "ToString" -> false - | "Equals" -> - if not (isObjTy g minfo.ApparentEnclosingType) then + | "Equals" -> + if not (isObjTy g minfo.ApparentEnclosingType) then // declaring type is not System.Object - show it - false + false elif minfo.IsInstance then // System.Object has only one instance Equals method and we want to suppress it unless Augment.TypeDefinitelyHasEquality is true not (AugmentWithHashCompare.TypeDefinitelyHasEquality g ty) else // System.Object has only one static Equals method and we always want to suppress it true - | _ -> + | _ -> // filter out self methods of obj type isObjTy g minfo.ApparentEnclosingType - let result = + let result = not isUnseenDueToBasicObjRules && not minfo.IsInstance = statics && IsMethInfoAccessible amap m ad minfo && @@ -4316,7 +4316,7 @@ let ResolveCompletionsInTypeForItem (ncenv: NameResolver) nenv m ad statics ty ( not (minfo.LogicalName = ".ctor") && not (suppressedMethNames.Contains minfo.LogicalName) result - + let pinfoItems = pinfos |> List.choose (fun pinfo-> @@ -4330,59 +4330,59 @@ let ResolveCompletionsInTypeForItem (ncenv: NameResolver) nenv m ad statics ty ( match item with | Item.MethodGroup _ -> // REVIEW: add a name filter here in the common cases? - let minfos = - let minfos = AllMethInfosOfTypeInScope ncenv.InfoReader nenv (None,ad) PreferOverrides m ty + let minfos = + let minfos = AllMethInfosOfTypeInScope ncenv.InfoReader nenv (None, ad) PreferOverrides m ty if isNil minfos then [] else - + let suppressedMethNames = Zset.ofList String.order (pinfoMethNames @ einfoMethNames) - let minfos = + let minfos = minfos |> List.filter (minfoFilter suppressedMethNames) - - if isNil minfos then + + if isNil minfos then [] else - let minfos = - let addersAndRemovers = + let minfos = + let addersAndRemovers = let hashSet = HashSet() for item in pinfoItems do match item with - | Item.Event(FSEvent(_,_,addValRef,removeValRef)) -> + | Item.Event(FSEvent(_, _, addValRef, removeValRef)) -> hashSet.Add addValRef.LogicalName |> ignore hashSet.Add removeValRef.LogicalName |> ignore | _ -> () hashSet - + if addersAndRemovers.Count = 0 then minfos else minfos |> List.filter (fun minfo -> not (addersAndRemovers.Contains minfo.LogicalName)) - + #if !NO_EXTENSIONTYPING // Filter out the ones with mangled names from applying static parameters - let minfos = - let methsWithStaticParams = - minfos - |> List.filter (fun minfo -> - match minfo.ProvidedStaticParameterInfo with + let minfos = + let methsWithStaticParams = + minfos + |> List.filter (fun minfo -> + match minfo.ProvidedStaticParameterInfo with | Some (_methBeforeArguments, staticParams) -> staticParams.Length <> 0 | _ -> false) |> List.map (fun minfo -> minfo.DisplayName) - + if methsWithStaticParams.IsEmpty then minfos - else minfos |> List.filter (fun minfo -> + else minfos |> List.filter (fun minfo -> let nm = minfo.LogicalName not (nm.Contains "," && methsWithStaticParams |> List.exists (fun m -> nm.StartsWithOrdinal(m)))) #endif - - minfos - + + minfos + // Partition methods into overload sets - let rec partitionl (l:MethInfo list) acc = + let rec partitionl (l: MethInfo list) acc = match l with | [] -> acc - | h::t -> + | h::t -> let nm = h.LogicalName partitionl t (NameMultiMap.add nm h acc) - + yield! List.map Item.MakeMethGroup (NameMap.toList (partitionl minfos Map.empty)) | _ -> () } @@ -4391,51 +4391,51 @@ let rec ResolvePartialLongIdentInTypeForItem (ncenv: NameResolver) nenv m ad sta seq { let g = ncenv.g let amap = ncenv.amap - + match plid with | [] -> yield! ResolveCompletionsInTypeForItem ncenv nenv m ad statics ty item | id :: rest -> - - let rfinfos = - ncenv.InfoReader.GetRecordOrClassFieldsOfType(None,ad,m,ty) + + let rfinfos = + ncenv.InfoReader.GetRecordOrClassFieldsOfType(None, ad, m, ty) |> List.filter (fun fref -> fref.Name = id && IsRecdFieldAccessible ncenv.amap m ad fref.RecdFieldRef && fref.RecdField.IsStatic = statics) - - let nestedTypes = ty |> GetNestedTypesOfType (ad, ncenv, Some id, TypeNameResolutionStaticArgsInfo.Indefinite, false, m) - - // e.g. .. + + let nestedTypes = ty |> GetNestedTypesOfType (ad, ncenv, Some id, TypeNameResolutionStaticArgsInfo.Indefinite, false, m) + + // e.g. .. for rfinfo in rfinfos do yield! ResolvePartialLongIdentInTypeForItem ncenv nenv m ad false rest item rfinfo.FieldType - - // e.g. .. - let fullTypeOfPinfo (pinfo: PropInfo) = - let rty = pinfo.GetPropertyType(amap,m) - let rty = if pinfo.IsIndexer then mkRefTupledTy g (pinfo.GetParamTypes(amap, m)) --> rty else rty - rty - + + // e.g. .. + let fullTypeOfPinfo (pinfo: PropInfo) = + let rty = pinfo.GetPropertyType(amap, m) + let rty = if pinfo.IsIndexer then mkRefTupledTy g (pinfo.GetParamTypes(amap, m)) --> rty else rty + rty + let pinfos = ty - |> AllPropInfosOfTypeInScope ncenv.InfoReader nenv (Some id,ad) IgnoreOverrides m - |> List.filter (fun pinfo -> pinfo.IsStatic = statics && IsPropInfoAccessible g amap m ad pinfo) + |> AllPropInfosOfTypeInScope ncenv.InfoReader nenv (Some id, ad) IgnoreOverrides m + |> List.filter (fun pinfo -> pinfo.IsStatic = statics && IsPropInfoAccessible g amap m ad pinfo) for pinfo in pinfos do yield! (fullTypeOfPinfo pinfo) |> ResolvePartialLongIdentInTypeForItem ncenv nenv m ad false rest item - - match TryFindAnonRecdFieldOfType g ty id with - | Some (Item.AnonRecdField(_anonInfo, tys, i, _)) -> + + match TryFindAnonRecdFieldOfType g ty id with + | Some (Item.AnonRecdField(_anonInfo, tys, i, _)) -> let tyinfo = tys.[i] yield! ResolvePartialLongIdentInTypeForItem ncenv nenv m ad false rest item tyinfo | _ -> () - - // e.g. .. + + // e.g. .. for einfo in ncenv.InfoReader.GetEventInfosOfType(Some id, ad, m, ty) do let tyinfo = PropTypOfEventInfo ncenv.InfoReader m ad einfo yield! ResolvePartialLongIdentInTypeForItem ncenv nenv m ad false rest item tyinfo - + // nested types! for ty in nestedTypes do yield! ResolvePartialLongIdentInTypeForItem ncenv nenv m ad statics rest item ty - - // e.g. .. + + // e.g. .. for finfo in ncenv.InfoReader.GetILFieldInfosOfType(Some id, ad, m, ty) do if not finfo.IsSpecialName && finfo.IsStatic = statics && IsILFieldInfoAccessible g amap m ad finfo then yield! finfo.FieldType(amap, m) |> ResolvePartialLongIdentInTypeForItem ncenv nenv m ad false rest item @@ -4444,10 +4444,10 @@ let rec ResolvePartialLongIdentInTypeForItem (ncenv: NameResolver) nenv m ad sta let rec ResolvePartialLongIdentInModuleOrNamespaceForItem (ncenv: NameResolver) nenv m ad (modref: ModuleOrNamespaceRef) plid (item: Item) = let g = ncenv.g let mty = modref.ModuleOrNamespaceType - + seq { - match plid with - | [] -> + match plid with + | [] -> match item with | Item.Value _ -> // Collect up the accessible values in the module, excluding the members @@ -4457,41 +4457,41 @@ let rec ResolvePartialLongIdentInModuleOrNamespaceForItem (ncenv: NameResolver) |> List.choose (TryMkValRefInModRef modref) // if the assembly load set is incomplete and we get a None value here, then ignore the value |> List.filter (fun vref -> not vref.IsMember && not (IsValUnseen ad g m vref)) |> List.map Item.Value - | Item.UnionCase _ -> - // Collect up the accessible discriminated union cases in the module - yield! - UnionCaseRefsInModuleOrNamespace modref + | Item.UnionCase _ -> + // Collect up the accessible discriminated union cases in the module + yield! + UnionCaseRefsInModuleOrNamespace modref |> List.filter (IsUnionCaseUnseen ad g ncenv.amap m >> not) |> List.map (fun x -> Item.UnionCase(GeneralizeUnionCaseRef x, false)) | Item.ActivePatternCase _ -> - // Collect up the accessible active patterns in the module + // Collect up the accessible active patterns in the module yield! - ActivePatternElemsOfModuleOrNamespace modref + ActivePatternElemsOfModuleOrNamespace modref |> NameMap.range - |> List.filter (fun apref -> apref.ActivePatternVal |> IsValUnseen ad g m |> not) + |> List.filter (fun apref -> apref.ActivePatternVal |> IsValUnseen ad g m |> not) |> List.map Item.ActivePatternCase | Item.ExnCase _ -> - // Collect up the accessible F# exception declarations in the module + // Collect up the accessible F# exception declarations in the module yield! - mty.ExceptionDefinitionsByDemangledName - |> NameMap.range + mty.ExceptionDefinitionsByDemangledName + |> NameMap.range |> List.map modref.NestedTyconRef |> List.filter (IsTyconUnseen ad g ncenv.amap m >> not) |> List.map Item.ExnCase | _ -> - // Collect up the accessible sub-modules. We must yield them even though `item` is not a module or namespace, + // Collect up the accessible sub-modules. We must yield them even though `item` is not a module or namespace, // otherwise we would not resolve long idents which have modules and namespaces in the middle (i.e. all long idents) - - let moduleOrNamespaces = - mty.ModulesAndNamespacesByDemangledName + + let moduleOrNamespaces = + mty.ModulesAndNamespacesByDemangledName |> NameMap.range if not (isNil moduleOrNamespaces) then let ilTyconNames = getFakeContainerModulesFromTycons mty.TypesByAccessNames.Values - + yield! moduleOrNamespaces - |> List.filter (fun x -> + |> List.filter (fun x -> let demangledName = x.DemangledModuleOrNamespaceName notFakeContainerModule ilTyconNames demangledName && IsInterestingModuleName demangledName) |> List.map modref.NestedTyconRef @@ -4500,48 +4500,48 @@ let rec ResolvePartialLongIdentInModuleOrNamespaceForItem (ncenv: NameResolver) EntityRefContainsSomethingAccessible ncenv m ad tcref) |> List.map ItemForModuleOrNamespaceRef - let tycons = + let tycons = mty.TypeDefinitions |> List.filter (fun tcref -> - not (tcref.LogicalName.Contains(",")) && + not (tcref.LogicalName.Contains ",") && not (IsTyconUnseen ad g ncenv.amap m (modref.NestedTyconRef tcref))) // Get all the types and .NET constructor groups accessible from here let nestedTycons = tycons |> List.map modref.NestedTyconRef yield! nestedTycons |> List.map (ItemOfTyconRef ncenv m) yield! nestedTycons |> List.collect (InfosForTyconConstructors ncenv m ad) - - | id :: rest -> - + + | id :: rest -> + match mty.ModulesAndNamespacesByDemangledName.TryGetValue id with - | true, mspec -> + | true, mspec -> let nested = modref.NestedTyconRef mspec if not (IsTyconUnseenObsoleteSpec ad g ncenv.amap m nested true) then yield! ResolvePartialLongIdentInModuleOrNamespaceForItem ncenv nenv m ad nested rest item | _ -> () - + for tycon in LookupTypeNameInEntityNoArity m id modref.ModuleOrNamespaceType do - let tcref = modref.NestedTyconRef tycon - if not (IsTyconUnseenObsoleteSpec ad g ncenv.amap m tcref true) then + let tcref = modref.NestedTyconRef tycon + if not (IsTyconUnseenObsoleteSpec ad g ncenv.amap m tcref true) then yield! tcref |> generalizedTyconRef |> ResolvePartialLongIdentInTypeForItem ncenv nenv m ad true rest item } let rec PartialResolveLookupInModuleOrNamespaceAsModuleOrNamespaceThenLazy f plid (modref: ModuleOrNamespaceRef) = let mty = modref.ModuleOrNamespaceType - match plid with + match plid with | [] -> f modref - | id :: rest -> + | id :: rest -> match mty.ModulesAndNamespacesByDemangledName.TryGetValue id with - | true, mty -> - PartialResolveLookupInModuleOrNamespaceAsModuleOrNamespaceThenLazy f rest (modref.NestedTyconRef mty) + | true, mty -> + PartialResolveLookupInModuleOrNamespaceAsModuleOrNamespaceThenLazy f rest (modref.NestedTyconRef mty) | _ -> Seq.empty -let PartialResolveLongIndentAsModuleOrNamespaceThenLazy (nenv:NameResolutionEnv) plid f = +let PartialResolveLongIndentAsModuleOrNamespaceThenLazy (nenv: NameResolutionEnv) plid f = seq { - match plid with - | id :: rest -> + match plid with + | id :: rest -> match nenv.eModulesAndNamespaces.TryGetValue id with - | true, modrefs -> + | true, modrefs -> for modref in modrefs do yield! PartialResolveLookupInModuleOrNamespaceAsModuleOrNamespaceThenLazy f rest modref | _ -> () @@ -4551,15 +4551,15 @@ let PartialResolveLongIndentAsModuleOrNamespaceThenLazy (nenv:NameResolutionEnv) let rec GetCompletionForItem (ncenv: NameResolver) (nenv: NameResolutionEnv) m ad plid (item: Item) : seq = seq { let g = ncenv.g - + match plid with | "global" :: plid -> // this is deliberately not the mangled name - + yield! GetCompletionForItem ncenv nenv m ad plid item - - | [] -> - /// Include all the entries in the eUnqualifiedItems table. + | [] -> + + /// Include all the entries in the eUnqualifiedItems table. for uitem in nenv.eUnqualifiedItems.Values do match uitem with | Item.UnqualifiedType _ -> () @@ -4572,20 +4572,20 @@ let rec GetCompletionForItem (ncenv: NameResolver) (nenv: NameResolutionEnv) m a let moduleOrNamespaceRefs = nenv.ModulesAndNamespaces OpenQualified |> NameMultiMap.range - + if not (isNil moduleOrNamespaceRefs) then let ilTyconNames = getFakeContainerModulesFromTyconRefs (nenv.TyconsByAccessNames(OpenQualified).Values) - + for ns in moduleOrNamespaceRefs do let demangledName = ns.DemangledModuleOrNamespaceName if IsInterestingModuleName demangledName && notFakeContainerModule ilTyconNames demangledName && EntityRefContainsSomethingAccessible ncenv m ad ns && not (IsTyconUnseen ad g ncenv.amap m ns) then yield ItemForModuleOrNamespaceRef ns - + | Item.Types _ -> for tcref in nenv.TyconsByDemangledNameAndArity(OpenQualified).Values do - if not tcref.IsExceptionDecl + if not tcref.IsExceptionDecl && not (tcref.LogicalName.Contains ",") && not (IsTyconUnseen ad g ncenv.amap m tcref) then yield ItemOfTyconRef ncenv m tcref @@ -4599,40 +4599,40 @@ let rec GetCompletionForItem (ncenv: NameResolver) (nenv: NameResolutionEnv) m a | Item.DelegateCtor _ | Item.FakeInterfaceCtor _ - | Item.CtorGroup _ + | Item.CtorGroup _ | Item.UnqualifiedType _ -> for tcref in nenv.TyconsByDemangledNameAndArity(OpenQualified).Values do if not (IsTyconUnseen ad g ncenv.amap m tcref) then yield! InfosForTyconConstructors ncenv m ad tcref - + | _ -> () - | id :: rest -> - - // Look in the namespaces 'id' + | id :: rest -> + + // Look in the namespaces 'id' yield! - PartialResolveLongIndentAsModuleOrNamespaceThenLazy nenv [id] (fun modref -> - if EntityRefContainsSomethingAccessible ncenv m ad modref then + PartialResolveLongIndentAsModuleOrNamespaceThenLazy nenv [id] (fun modref -> + if EntityRefContainsSomethingAccessible ncenv m ad modref then ResolvePartialLongIdentInModuleOrNamespaceForItem ncenv nenv m ad modref rest item else Seq.empty) - - // Look for values called 'id' that accept the dot-notation + + // Look for values called 'id' that accept the dot-notation match nenv.eUnqualifiedItems.TryGetValue id with | true, Item.Value x -> let ty = x.Type let ty = if x.BaseOrThisInfo = CtorThisVal && isRefCellTy g ty then destRefCellTy g ty else ty yield! ResolvePartialLongIdentInTypeForItem ncenv nenv m ad false rest item ty | _ -> - // type.lookup : lookup a static something in a type + // type.lookup: lookup a static something in a type for tcref in LookupTypeNameInEnvNoArity OpenQualified id nenv do let tcref = ResolveNestedTypeThroughAbbreviation ncenv tcref m let ty = FreshenTycon ncenv m tcref yield! ResolvePartialLongIdentInTypeForItem ncenv nenv m ad true rest item ty } -let IsItemResolvable (ncenv: NameResolver) (nenv: NameResolutionEnv) m ad plid (item: Item) : bool = - protectAssemblyExploration false (fun () -> - GetCompletionForItem ncenv nenv m ad plid item +let IsItemResolvable (ncenv: NameResolver) (nenv: NameResolutionEnv) m ad plid (item: Item) : bool = + protectAssemblyExploration false (fun () -> + GetCompletionForItem ncenv nenv m ad plid item |> Seq.exists (ItemsAreEffectivelyEqual ncenv.g item) ) @@ -4641,13 +4641,13 @@ let GetVisibleNamespacesAndModulesAtPoint (ncenv: NameResolver) (nenv: NameResol let items = nenv.ModulesAndNamespaces FullyQualifiedFlag.OpenQualified |> NameMultiMap.range - + if isNil items then [] else let ilTyconNames = getFakeContainerModulesFromTyconRefs (nenv.TyconsByAccessNames(FullyQualifiedFlag.OpenQualified).Values) items - |> List.filter (fun x -> + |> List.filter (fun x -> let demangledName = x.DemangledModuleOrNamespaceName IsInterestingModuleName demangledName && notFakeContainerModule ilTyconNames demangledName && EntityRefContainsSomethingAccessible ncenv m ad x diff --git a/src/fcs-fable/src/fsharp/NicePrint.fs b/src/fcs-fable/src/fsharp/NicePrint.fs index d201758b73..c718bf9105 100755 --- a/src/fcs-fable/src/fsharp/NicePrint.fs +++ b/src/fcs-fable/src/fsharp/NicePrint.fs @@ -37,17 +37,17 @@ module internal PrintUtilities = let comment str = wordL (tagText (sprintf "(* %s *)" str)) - let layoutsL (ls : layout list) : layout = + let layoutsL (ls: layout list) : layout = match ls with - | [] -> emptyL - | [x] -> x + | [] -> emptyL + | [x] -> x | x :: xs -> List.fold (^^) x xs let suppressInheritanceAndInterfacesForTyInSimplifiedDisplays g amap m ty = isEnumTy g ty || isDelegateTy g ty || ExistsHeadTypeInEntireHierarchy g amap m ty g.exn_tcr || ExistsHeadTypeInEntireHierarchy g amap m ty g.tcref_System_Attribute - let applyMaxMembers maxMembers (alldecls : _ list) = + let applyMaxMembers maxMembers (alldecls: _ list) = match maxMembers with | Some n when alldecls.Length > n -> (alldecls |> List.truncate n) @ [wordL (tagPunctuation "...")] | _ -> alldecls @@ -63,7 +63,7 @@ module internal PrintUtilities = | (x:: rest) -> [ resultFunction x (layoutFunction x -- leftL (tagText (match rest.Length with 1 -> FSComp.SR.nicePrintOtherOverloads1() | n -> FSComp.SR.nicePrintOtherOverloadsN(n)))) ] | _ -> [] - let layoutTyconRefImpl isAttribute (denv: DisplayEnv) (tcref:TyconRef) = + let layoutTyconRefImpl isAttribute (denv: DisplayEnv) (tcref: TyconRef) = let demangled = let name = if denv.includeStaticParametersInTypeNames then @@ -88,9 +88,10 @@ module internal PrintUtilities = if denv.includeStaticParametersInTypeNames then path else - path |> List.map (fun s -> let i = s.IndexOf(',') - if i <> -1 then s.Substring(0,i)+"<...>" // apparently has static params, shorten - else s) + path |> List.map (fun s -> + let i = s.IndexOf(',') + if i <> -1 then s.Substring(0, i)+"<...>" // apparently has static params, shorten + else s) let pathText = trimPathByDisplayEnv denv path if pathText = "" then tyconTextL else leftL (tagUnknownEntity pathText) ^^ tyconTextL @@ -100,34 +101,32 @@ module internal PrintUtilities = module private PrintIL = - open FSharp.Compiler.AbstractIL.IL - - let fullySplitILTypeRef (tref:ILTypeRef) = + let fullySplitILTypeRef (tref: ILTypeRef) = (List.collect IL.splitNamespace (tref.Enclosing @ [PrettyNaming.DemangleGenericTypeName tref.Name])) let layoutILTypeRefName denv path = let path = match path with - | [ "System"; "Void" ] -> ["unit"] + | [ "System"; "Void" ] -> ["unit"] | [ "System"; "Object" ] -> ["obj"] | [ "System"; "String" ] -> ["string"] | [ "System"; "Single" ] -> ["float32"] | [ "System"; "Double" ] -> ["float"] | [ "System"; "Decimal"] -> ["decimal"] - | [ "System"; "Char" ] -> ["char"] - | [ "System"; "Byte" ] -> ["byte"] - | [ "System"; "SByte" ] -> ["sbyte"] - | [ "System"; "Int16" ] -> ["int16"] - | [ "System"; "Int32" ] -> ["int" ] - | [ "System"; "Int64" ] -> ["int64" ] + | [ "System"; "Char" ] -> ["char"] + | [ "System"; "Byte" ] -> ["byte"] + | [ "System"; "SByte" ] -> ["sbyte"] + | [ "System"; "Int16" ] -> ["int16"] + | [ "System"; "Int32" ] -> ["int" ] + | [ "System"; "Int64" ] -> ["int64" ] | [ "System"; "UInt16" ] -> ["uint16" ] | [ "System"; "UInt32" ] -> ["uint32" ] | [ "System"; "UInt64" ] -> ["uint64" ] | [ "System"; "IntPtr" ] -> ["nativeint" ] | [ "System"; "UIntPtr" ] -> ["unativeint" ] | [ "System"; "Boolean"] -> ["bool"] - | _ -> path - let p2,n = List.frontAndBack path + | _ -> path + let p2, n = List.frontAndBack path let tagged = if n = "obj" || n = "string" then tagClass n else tagStruct n if denv.shortTypeNames then wordL tagged @@ -140,106 +139,106 @@ module private PrintIL = /// this fixes up a name just like adjustILName but also handles F# /// operators - let private adjustILMethodName n = + let adjustILMethodName n = let demangleOperatorNameIfNeeded s = if IsMangledOpName s then DemangleOperatorName s else s n |> Lexhelp.Keywords.QuoteIdentifierIfNeeded |> demangleOperatorNameIfNeeded - let private isStaticILEvent (e: ILEventDef) = + let isStaticILEvent (e: ILEventDef) = e.AddMethod.CallingSignature.CallingConv.IsStatic || e.RemoveMethod.CallingSignature.CallingConv.IsStatic - let private layoutILArrayShape (ILArrayShape sh) = + let layoutILArrayShape (ILArrayShape sh) = SepL.leftBracket ^^ wordL (tagPunctuation (sh |> List.tail |> List.map (fun _ -> ",") |> String.concat "")) ^^ RightL.rightBracket // drop off one "," so that a n-dimensional array has n - 1 ","'s - let private layoutILGenericParameterDefs (ps: ILGenericParameterDefs) = + let layoutILGenericParameterDefs (ps: ILGenericParameterDefs) = ps |> List.map (fun x -> "'" + x.Name |> (tagTypeParameter >> wordL)) - let private paramsL (ps: layout list) : layout = + let paramsL (ps: layout list) : layout = match ps with | [] -> emptyL - | _ -> + | _ -> let body = Layout.commaListL ps SepL.leftAngle ^^ body ^^ RightL.rightAngle - let private pruneParms (className: string) (ilTyparSubst: layout list) = - let numParms = + let pruneParams (className: string) (ilTyparSubst: layout list) = + let numParams = // can't find a way to see the number of generic parameters for *this* class (the GenericParams also include type variables for enclosing classes); this will have to do let rightMost = className |> SplitNamesForILPath |> List.last match System.Int32.TryParse(rightMost, System.Globalization.NumberStyles.Integer, System.Globalization.CultureInfo.InvariantCulture) with | true, n -> n | false, _ -> 0 // looks like it's non-generic - ilTyparSubst |> List.rev |> List.truncate numParms |> List.rev - + ilTyparSubst |> List.rev |> List.truncate numParams |> List.rev + let rec layoutILType (denv: DisplayEnv) (ilTyparSubst: layout list) (ty: ILType) : layout = match ty with - | ILType.Void -> WordL.structUnit // These are type-theoretically totally different type-theoretically `void` is Fin 0 and `unit` is Fin (S 0) ... but, this looks like as close as we can get. - | ILType.Array (sh, t) -> layoutILType denv ilTyparSubst t ^^ layoutILArrayShape sh + | ILType.Void -> WordL.structUnit // These are type-theoretically totally different type-theoretically `void` is Fin 0 and `unit` is Fin (S 0) ... but, this looks like as close as we can get. + | ILType.Array (sh, t) -> layoutILType denv ilTyparSubst t ^^ layoutILArrayShape sh | ILType.Value t - | ILType.Boxed t -> layoutILTypeRef denv t.TypeRef ^^ (t.GenericArgs |> List.map (layoutILType denv ilTyparSubst) |> paramsL) + | ILType.Boxed t -> layoutILTypeRef denv t.TypeRef ^^ (t.GenericArgs |> List.map (layoutILType denv ilTyparSubst) |> paramsL) | ILType.Ptr t - | ILType.Byref t -> layoutILType denv ilTyparSubst t - | ILType.FunctionPointer t -> layoutILCallingSignature denv ilTyparSubst None t - | ILType.TypeVar n -> List.item (int n) ilTyparSubst + | ILType.Byref t -> layoutILType denv ilTyparSubst t + | ILType.FunctionPointer t -> layoutILCallingSignature denv ilTyparSubst None t + | ILType.TypeVar n -> List.item (int n) ilTyparSubst | ILType.Modified (_, _, t) -> layoutILType denv ilTyparSubst t // Just recurse through them to the contained ILType /// Layout a function pointer signature using type-only-F#-style. No argument names are printed. - and private layoutILCallingSignature denv ilTyparSubst cons (signatur : ILCallingSignature) = + and private layoutILCallingSignature denv ilTyparSubst cons (signatur: ILCallingSignature) = // We need a special case for // constructors (Their return types are reported as `void`, but this is // incorrect; so if we're dealing with a constructor we require that the // return type be passed along as the `cons` parameter.) let args = signatur.ArgTypes |> List.map (layoutILType denv ilTyparSubst) - let res = + let res = match cons with | Some className -> let names = SplitNamesForILPath (PrettyNaming.DemangleGenericTypeName className) // special case for constructor return-type (viz., the class itself) - layoutILTypeRefName denv names ^^ (pruneParms className ilTyparSubst |> paramsL) + layoutILTypeRefName denv names ^^ (pruneParams className ilTyparSubst |> paramsL) | None -> signatur.ReturnType |> layoutILType denv ilTyparSubst match args with - | [] -> WordL.structUnit ^^ WordL.arrow ^^ res - | [x] -> x ^^ WordL.arrow ^^ res - | _ -> sepListL WordL.star args ^^ WordL.arrow ^^ res + | [] -> WordL.structUnit ^^ WordL.arrow ^^ res + | [x] -> x ^^ WordL.arrow ^^ res + | _ -> sepListL WordL.star args ^^ WordL.arrow ^^ res /// Layout a function pointer signature using type-only-F#-style. No argument names are printed. // // Note, this duplicates functionality in formatParamDataToBuffer - and private layoutILParameter denv ilTyparSubst (p: ILParameter) = + and layoutILParameter denv ilTyparSubst (p: ILParameter) = let preL = let isParamArray = TryFindILAttribute denv.g.attrib_ParamArrayAttribute p.CustomAttrs match isParamArray, p.Name, p.IsOptional with // Layout an optional argument - | _, Some nm, true -> LeftL.questionMark ^^ sepL (tagParameter nm) ^^ SepL.colon + | _, Some nm, true -> LeftL.questionMark ^^ sepL (tagParameter nm) ^^ SepL.colon // Layout an unnamed argument | _, None, _ -> LeftL.colon // Layout a named argument - | true, Some nm,_ -> + | true, Some nm, _ -> layoutBuiltinAttribute denv denv.g.attrib_ParamArrayAttribute ^^ wordL (tagParameter nm) ^^ SepL.colon - | false, Some nm,_ -> leftL (tagParameter nm) ^^ SepL.colon + | false, Some nm, _ -> leftL (tagParameter nm) ^^ SepL.colon preL ^^ (layoutILType denv ilTyparSubst p.Type) - + /// Layout a function pointer signature using type-only-F#-style. No argument names are printed. - and private layoutILParameters denv ilTyparSubst cons (parameters: ILParameters, retType: ILType) = + and layoutILParameters denv ilTyparSubst cons (parameters: ILParameters, retType: ILType) = // We need a special case for constructors (Their return types are reported as `void`, but this is // incorrect; so if we're dealing with a constructor we require that the // return type be passed along as the `cons` parameter.) - let res = + let res = match cons with | Some className -> let names = SplitNamesForILPath (PrettyNaming.DemangleGenericTypeName className) - layoutILTypeRefName denv names ^^ (pruneParms className ilTyparSubst |> paramsL) + layoutILTypeRefName denv names ^^ (pruneParams className ilTyparSubst |> paramsL) | None -> retType |> layoutILType denv ilTyparSubst match parameters with - | [] -> WordL.structUnit ^^ WordL.arrow ^^ res - | [x] -> layoutILParameter denv ilTyparSubst x ^^ WordL.arrow ^^ res - | args -> sepListL WordL.star (List.map (layoutILParameter denv ilTyparSubst) args) ^^ WordL.arrow ^^ res + | [] -> WordL.structUnit ^^ WordL.arrow ^^ res + | [x] -> layoutILParameter denv ilTyparSubst x ^^ WordL.arrow ^^ res + | args -> sepListL WordL.star (List.map (layoutILParameter denv ilTyparSubst) args) ^^ WordL.arrow ^^ res /// Layout a method's signature using type-only-F#-style. No argument names are printed. @@ -249,29 +248,29 @@ module private PrintIL = /// most-deeply-nested element. // // For C# and provided members: - // new : argType1 * ... * argTypeN -> retType - // Method : argType1 * ... * argTypeN -> retType + // new: argType1 * ... * argTypeN -> retType + // Method: argType1 * ... * argTypeN -> retType // - let private layoutILMethodDef denv ilTyparSubst className (m: ILMethodDef) = - let myParms = m.GenericParams |> layoutILGenericParameterDefs - let ilTyparSubst = ilTyparSubst @ myParms - let name = adjustILMethodName m.Name + let layoutILMethodDef denv ilTyparSubst className (m: ILMethodDef) = + let myParms = m.GenericParams |> layoutILGenericParameterDefs + let ilTyparSubst = ilTyparSubst @ myParms + let name = adjustILMethodName m.Name let (nameL, isCons) = match () with | _ when m.IsConstructor -> (WordL.keywordNew, Some className) // we need the unadjusted name here to be able to grab the number of generic parameters - | _ when m.IsStatic -> (WordL.keywordStatic ^^ WordL.keywordMember ^^ wordL (tagMethod name) ^^ (myParms |> paramsL), None) - | _ -> (WordL.keywordMember ^^ wordL (tagMethod name) ^^ (myParms |> paramsL), None) - let signaturL = (m.Parameters, m.Return.Type) |> layoutILParameters denv ilTyparSubst isCons - nameL ^^ WordL.colon ^^ signaturL - - let private layoutILFieldDef (denv: DisplayEnv) (ilTyparSubst: layout list) (f: ILFieldDef) = - let staticL = if f.IsStatic then WordL.keywordStatic else emptyL - let name = adjustILName f.Name - let nameL = wordL (tagField name) - let typL = layoutILType denv ilTyparSubst f.FieldType - staticL ^^ WordL.keywordVal ^^ nameL ^^ WordL.colon ^^ typL + | _ when m.IsStatic -> (WordL.keywordStatic ^^ WordL.keywordMember ^^ wordL (tagMethod name) ^^ (myParms |> paramsL), None) + | _ -> (WordL.keywordMember ^^ wordL (tagMethod name) ^^ (myParms |> paramsL), None) + let signatureL = (m.Parameters, m.Return.Type) |> layoutILParameters denv ilTyparSubst isCons + nameL ^^ WordL.colon ^^ signatureL + + let layoutILFieldDef (denv: DisplayEnv) (ilTyparSubst: layout list) (f: ILFieldDef) = + let staticL = if f.IsStatic then WordL.keywordStatic else emptyL + let name = adjustILName f.Name + let nameL = wordL (tagField name) + let typL = layoutILType denv ilTyparSubst f.FieldType + staticL ^^ WordL.keywordVal ^^ nameL ^^ WordL.colon ^^ typL - let private layoutILEventDef denv ilTyparSubst (e: ILEventDef) = + let layoutILEventDef denv ilTyparSubst (e: ILEventDef) = let staticL = if isStaticILEvent e then WordL.keywordStatic else emptyL let name = adjustILName e.Name let nameL = wordL (tagEvent name) @@ -279,20 +278,20 @@ module private PrintIL = match e.EventType with | Some t -> layoutILType denv ilTyparSubst t | _ -> emptyL - staticL ^^ WordL.keywordEvent ^^ nameL ^^ WordL.colon ^^ typL - - let private layoutILPropertyDef denv ilTyparSubst (p : ILPropertyDef) = - let staticL = if p.CallingConv = ILThisConvention.Static then WordL.keywordStatic else emptyL - let name = adjustILName p.Name - let nameL = wordL (tagProperty name) + staticL ^^ WordL.keywordEvent ^^ nameL ^^ WordL.colon ^^ typL + + let layoutILPropertyDef denv ilTyparSubst (p: ILPropertyDef) = + let staticL = if p.CallingConv = ILThisConvention.Static then WordL.keywordStatic else emptyL + let name = adjustILName p.Name + let nameL = wordL (tagProperty name) - let layoutGetterType (getterRef:ILMethodRef) = + let layoutGetterType (getterRef: ILMethodRef) = if isNil getterRef.ArgTypes then layoutILType denv ilTyparSubst getterRef.ReturnType else layoutILCallingSignature denv ilTyparSubst None getterRef.CallingSignature - let layoutSetterType (setterRef:ILMethodRef) = + let layoutSetterType (setterRef: ILMethodRef) = let argTypes = setterRef.ArgTypes if isNil argTypes then emptyL // shouldn't happen @@ -309,7 +308,7 @@ module private PrintIL = let specGetSetL = match p.GetMethod, p.SetMethod with - | None,None + | None, None | Some _, None -> emptyL | None, Some _ -> WordL.keywordWith ^^ WordL.keywordSet | Some _, Some _ -> WordL.keywordWith ^^ WordL.keywordGet ^^ RightL.comma ^^ WordL.keywordSet @@ -320,63 +319,62 @@ module private PrintIL = match x with | Some init -> match init with - | ILFieldInit.Bool x -> + | ILFieldInit.Bool x -> if x then Some Literals.keywordTrue else Some Literals.keywordFalse - | ILFieldInit.Char c -> ("'" + (char c).ToString () + "'") |> (tagStringLiteral >> Some) - | ILFieldInit.Int8 x -> ((x |> int32 |> string) + "y") |> (tagNumericLiteral >> Some) - | ILFieldInit.Int16 x -> ((x |> int32 |> string) + "s") |> (tagNumericLiteral >> Some) - | ILFieldInit.Int32 x -> x |> (string >> tagNumericLiteral >> Some) - | ILFieldInit.Int64 x -> ((x |> string) + "L") |> (tagNumericLiteral >> Some) - | ILFieldInit.UInt8 x -> ((x |> int32 |> string) + "uy") |> (tagNumericLiteral >> Some) - | ILFieldInit.UInt16 x -> ((x |> int32 |> string) + "us") |> (tagNumericLiteral >> Some) + | ILFieldInit.Char c -> ("'" + (char c).ToString () + "'") |> (tagStringLiteral >> Some) + | ILFieldInit.Int8 x -> ((x |> int32 |> string) + "y") |> (tagNumericLiteral >> Some) + | ILFieldInit.Int16 x -> ((x |> int32 |> string) + "s") |> (tagNumericLiteral >> Some) + | ILFieldInit.Int32 x -> x |> (string >> tagNumericLiteral >> Some) + | ILFieldInit.Int64 x -> ((x |> string) + "L") |> (tagNumericLiteral >> Some) + | ILFieldInit.UInt8 x -> ((x |> int32 |> string) + "uy") |> (tagNumericLiteral >> Some) + | ILFieldInit.UInt16 x -> ((x |> int32 |> string) + "us") |> (tagNumericLiteral >> Some) | ILFieldInit.UInt32 x -> (x |> int64 |> string) + "u" |> (tagNumericLiteral >> Some) - | ILFieldInit.UInt64 x -> ((x |> int64 |> string) + "UL") |> (tagNumericLiteral >> Some) + | ILFieldInit.UInt64 x -> ((x |> int64 |> string) + "UL") |> (tagNumericLiteral >> Some) | ILFieldInit.Single d -> let s = d.ToString ("g12", System.Globalization.CultureInfo.InvariantCulture) let s = - if String.forall (fun c -> System.Char.IsDigit c || c = '-') s + if String.forall (fun c -> System.Char.IsDigit c || c = '-') s then s + ".0" else s (s + "f") |> (tagNumericLiteral >> Some) | ILFieldInit.Double d -> let s = d.ToString ("g12", System.Globalization.CultureInfo.InvariantCulture) let s = - if String.forall (fun c -> System.Char.IsDigit c || c = '-') s + if String.forall (fun c -> System.Char.IsDigit c || c = '-') s then (s + ".0") else s s |> (tagNumericLiteral >> Some) - | _ -> None - | None -> None + | _ -> None + | None -> None match textOpt with - | None -> WordL.equals ^^ (comment "value unavailable") + | None -> WordL.equals ^^ (comment "value unavailable") | Some s -> WordL.equals ^^ wordL s let layoutILEnumDefParts nm litVal = WordL.bar ^^ wordL (tagEnum (adjustILName nm)) ^^ layoutILFieldInit litVal - let private layoutILEnumDef (f : ILFieldDef) = layoutILEnumDefParts f.Name f.LiteralValue + let layoutILEnumDef (f: ILFieldDef) = layoutILEnumDefParts f.Name f.LiteralValue // filtering methods for hiding things we oughtn't show - let private isStaticILProperty (p : ILPropertyDef) = - match p.GetMethod,p.SetMethod with - | Some getter, _ -> getter.CallingSignature.CallingConv.IsStatic + let isStaticILProperty (p: ILPropertyDef) = + match p.GetMethod, p.SetMethod with + | Some getter, _ -> getter.CallingSignature.CallingConv.IsStatic | None, Some setter -> setter.CallingSignature.CallingConv.IsStatic - | None, None -> true + | None, None -> true - - let private isPublicILMethod (m : ILMethodDef) = + let isPublicILMethod (m: ILMethodDef) = (m.Access = ILMemberAccess.Public) - let private isPublicILEvent typeDef (e: ILEventDef) = + let isPublicILEvent typeDef (e: ILEventDef) = try isPublicILMethod(resolveILMethodRef typeDef e.AddMethod) && isPublicILMethod(resolveILMethodRef typeDef e.RemoveMethod) with _ -> false - let private isPublicILProperty typeDef (m : ILPropertyDef) = + let isPublicILProperty typeDef (m: ILPropertyDef) = try match m.GetMethod with | Some ilMethRef -> isPublicILMethod (resolveILMethodRef typeDef ilMethRef) @@ -392,36 +390,36 @@ module private PrintIL = with _ -> false - let private isPublicILCtor (m : ILMethodDef) = + let isPublicILCtor (m: ILMethodDef) = (m.Access = ILMemberAccess.Public && m.IsConstructor) - let private isNotSpecialName (m : ILMethodDef) = + let isNotSpecialName (m: ILMethodDef) = not m.IsSpecialName - let private isPublicILField (f : ILFieldDef) = + let isPublicILField (f: ILFieldDef) = (f.Access = ILMemberAccess.Public) - let private isPublicILTypeDef (c : ILTypeDef) : bool = + let isPublicILTypeDef (c: ILTypeDef) : bool = match c.Access with | ILTypeDefAccess.Public | ILTypeDefAccess.Nested ILMemberAccess.Public -> true - | _ -> false + | _ -> false - let private isShowEnumField (f : ILFieldDef) : bool = f.Name <> "value__" // this appears to be the hard-coded underlying storage field - let private noShow = set [ "System.Object" ; "Object"; "System.ValueType" ; "ValueType"; "obj" ] // hide certain 'obvious' base classes - let private isShowBase (n : layout) : bool = + let isShowEnumField (f: ILFieldDef) : bool = f.Name <> "value__" // this appears to be the hard-coded underlying storage field + let noShow = set [ "System.Object" ; "Object"; "System.ValueType" ; "ValueType"; "obj" ] // hide certain 'obvious' base classes + let isShowBase (n: layout) : bool = not (noShow.Contains(showL n)) - let rec layoutILTypeDef (denv: DisplayEnv) (typeDef : ILTypeDef) : layout = - let ilTyparSubst = typeDef.GenericParams |> layoutILGenericParameterDefs + let rec layoutILTypeDef (denv: DisplayEnv) (typeDef: ILTypeDef) : layout = + let ilTyparSubst = typeDef.GenericParams |> layoutILGenericParameterDefs let renderL pre body post = match pre with | Some pre -> match body with | [] -> emptyL // empty type - | _ -> (pre @@-- aboveListL body) @@ post - | None -> + | _ -> (pre @@-- aboveListL body) @@ post + | None -> aboveListL body if typeDef.IsClass || typeDef.IsStruct || typeDef.IsInterface then @@ -429,26 +427,22 @@ module private PrintIL = if typeDef.IsStruct then Some WordL.keywordStruct else None - let baseT = - match typeDef.Extends with - | Some b -> + let baseTypeL = + [ match typeDef.Extends with + | Some b -> let baseName = layoutILType denv ilTyparSubst b - if isShowBase baseName - then [ WordL.keywordInherit ^^ baseName ] - else [] - | None -> + if isShowBase baseName then + yield WordL.keywordInherit ^^ baseName + | None -> // for interface show inherited interfaces if typeDef.IsInterface then - typeDef.Implements |> List.choose (fun b -> + for b in typeDef.Implements do let baseName = layoutILType denv ilTyparSubst b - if isShowBase baseName - then Some (WordL.keywordInherit ^^ baseName) - else None - ) - else [] - - let memberBlockLs (fieldDefs:ILFieldDefs, methodDefs:ILMethodDefs, propertyDefs:ILPropertyDefs, eventDefs:ILEventDefs) = - let ctors = + if isShowBase baseName then + yield WordL.keywordInherit ^^ baseName ] + + let memberBlockLs (fieldDefs: ILFieldDefs, methodDefs: ILMethodDefs, propertyDefs: ILPropertyDefs, eventDefs: ILEventDefs) = + let ctors = methodDefs.AsList |> List.filter isPublicILCtor |> List.sortBy (fun md -> md.Parameters.Length) @@ -456,7 +450,7 @@ module private PrintIL = let fields = fieldDefs.AsList - |> List.filter isPublicILField + |> List.filter isPublicILField |> List.map (layoutILFieldDef denv ilTyparSubst) let props = @@ -476,41 +470,42 @@ module private PrintIL = |> List.map (fun md -> (md.Name, md.Parameters.Length), md) // collect into overload groups |> List.groupBy (fst >> fst) - |> List.collect (fun (_,group) -> group |> List.sortBy fst |> shrinkOverloads (snd >> layoutILMethodDef denv ilTyparSubst typeDef.Name) (fun x xL -> (fst x,xL))) + |> List.collect (fun (_, group) -> group |> List.sortBy fst |> shrinkOverloads (snd >> layoutILMethodDef denv ilTyparSubst typeDef.Name) (fun x xL -> (fst x, xL))) let members = (props @ meths) |> List.sortBy fst |> List.map snd // (properties and members) are sorted by name/arity - ctors @ fields @ members @ events - let bodyStatic = - memberBlockLs (typeDef.Fields.AsList |> List.filter (fun fd -> fd.IsStatic) |> mkILFields, - typeDef.Methods.AsList |> List.filter (fun md -> md.IsStatic) |> mkILMethods, - typeDef.Properties.AsList |> List.filter (fun pd -> isStaticILProperty pd) |> mkILProperties, - typeDef.Events.AsList |> List.filter (fun ed -> isStaticILEvent ed) |> mkILEvents) + let bodyStatic = + memberBlockLs + (typeDef.Fields.AsList |> List.filter (fun fd -> fd.IsStatic) |> mkILFields, + typeDef.Methods.AsList |> List.filter (fun md -> md.IsStatic) |> mkILMethods, + typeDef.Properties.AsList |> List.filter isStaticILProperty |> mkILProperties, + typeDef.Events.AsList |> List.filter isStaticILEvent |> mkILEvents) let bodyInstance = - memberBlockLs (typeDef.Fields.AsList |> List.filter (fun fd -> not(fd.IsStatic)) |> mkILFields, - typeDef.Methods.AsList |> List.filter (fun md -> not(md.IsStatic)) |> mkILMethods, - typeDef.Properties.AsList |> List.filter (fun pd -> not(isStaticILProperty pd)) |> mkILProperties, - typeDef.Events.AsList |> List.filter (fun ed -> not(isStaticILEvent ed)) |> mkILEvents ) + memberBlockLs + (typeDef.Fields.AsList |> List.filter (fun fd -> not (fd.IsStatic)) |> mkILFields, + typeDef.Methods.AsList |> List.filter (fun md -> not (md.IsStatic)) |> mkILMethods, + typeDef.Properties.AsList |> List.filter (fun pd -> not (isStaticILProperty pd)) |> mkILProperties, + typeDef.Events.AsList |> List.filter (fun ed -> not (isStaticILEvent ed)) |> mkILEvents ) let body = bodyInstance @ bodyStatic // instance "member" before "static member" // Only show at most maxMembers members... let body = applyMaxMembers denv.maxMembers body - let types = + let types = typeDef.NestedTypes.AsList |> List.filter isPublicILTypeDef - |> List.sortBy(fun t -> adjustILName t.Name) + |> List.sortBy(fun t -> adjustILName t.Name) |> List.map (layoutILNestedClassDef denv) - let post = WordL.keywordEnd - renderL pre (baseT @ body @ types ) post + let post = WordL.keywordEnd + renderL pre (baseTypeL @ body @ types ) post elif typeDef.IsEnum then let fldsL = @@ -525,70 +520,70 @@ module private PrintIL = let rhs = match typeDef.Methods.AsList |> List.filter (fun m -> m.Name = "Invoke") with // the delegate delegates to the type of `Invoke` | m :: _ -> layoutILCallingSignature denv ilTyparSubst None m.CallingSignature - | _ -> comment "`Invoke` method could not be found" + | _ -> comment "`Invoke` method could not be found" WordL.keywordDelegate ^^ WordL.keywordOf ^^ rhs - and layoutILNestedClassDef (denv: DisplayEnv) (typeDef : ILTypeDef) = - let name = adjustILName typeDef.Name - let nameL = wordL (tagClass name) - let ilTyparSubst = typeDef.GenericParams |> layoutILGenericParameterDefs - let paramsL = pruneParms typeDef.Name ilTyparSubst |> paramsL + and layoutILNestedClassDef (denv: DisplayEnv) (typeDef: ILTypeDef) = + let name = adjustILName typeDef.Name + let nameL = wordL (tagClass name) + let ilTyparSubst = typeDef.GenericParams |> layoutILGenericParameterDefs + let paramsL = pruneParams typeDef.Name ilTyparSubst |> paramsL if denv.suppressNestedTypes then WordL.keywordNested ^^ WordL.keywordType ^^ nameL ^^ paramsL else - let pre = WordL.keywordNested ^^ WordL.keywordType ^^ nameL ^^ paramsL - let body = layoutILTypeDef denv typeDef + let pre = WordL.keywordNested ^^ WordL.keywordType ^^ nameL ^^ paramsL + let body = layoutILTypeDef denv typeDef (pre ^^ WordL.equals) @@-- body - + module private PrintTypes = // Note: We need nice printing of constants in order to print literals and attributes let layoutConst g ty c = let str = match c with - | Const.Bool x -> if x then Literals.keywordTrue else Literals.keywordFalse - | Const.SByte x -> (x |> string)+"y" |> tagNumericLiteral - | Const.Byte x -> (x |> string)+"uy" |> tagNumericLiteral - | Const.Int16 x -> (x |> string)+"s" |> tagNumericLiteral - | Const.UInt16 x -> (x |> string)+"us" |> tagNumericLiteral - | Const.Int32 x -> (x |> string) |> tagNumericLiteral - | Const.UInt32 x -> (x |> string)+"u" |> tagNumericLiteral - | Const.Int64 x -> (x |> string)+"L" |> tagNumericLiteral - | Const.UInt64 x -> (x |> string)+"UL" |> tagNumericLiteral - | Const.IntPtr x -> (x |> string)+"n" |> tagNumericLiteral - | Const.UIntPtr x -> (x |> string)+"un" |> tagNumericLiteral - | Const.Single d -> - ((let s = d.ToString("g12",System.Globalization.CultureInfo.InvariantCulture) - if String.forall (fun c -> System.Char.IsDigit(c) || c = '-') s + | Const.Bool x -> if x then Literals.keywordTrue else Literals.keywordFalse + | Const.SByte x -> (x |> string)+"y" |> tagNumericLiteral + | Const.Byte x -> (x |> string)+"uy" |> tagNumericLiteral + | Const.Int16 x -> (x |> string)+"s" |> tagNumericLiteral + | Const.UInt16 x -> (x |> string)+"us" |> tagNumericLiteral + | Const.Int32 x -> (x |> string) |> tagNumericLiteral + | Const.UInt32 x -> (x |> string)+"u" |> tagNumericLiteral + | Const.Int64 x -> (x |> string)+"L" |> tagNumericLiteral + | Const.UInt64 x -> (x |> string)+"UL" |> tagNumericLiteral + | Const.IntPtr x -> (x |> string)+"n" |> tagNumericLiteral + | Const.UIntPtr x -> (x |> string)+"un" |> tagNumericLiteral + | Const.Single d -> + ((let s = d.ToString("g12", System.Globalization.CultureInfo.InvariantCulture) + if String.forall (fun c -> System.Char.IsDigit(c) || c = '-') s then s + ".0" else s) + "f") |> tagNumericLiteral - | Const.Double d -> - let s = d.ToString("g12",System.Globalization.CultureInfo.InvariantCulture) - (if String.forall (fun c -> System.Char.IsDigit(c) || c = '-') s + | Const.Double d -> + let s = d.ToString("g12", System.Globalization.CultureInfo.InvariantCulture) + (if String.forall (fun c -> System.Char.IsDigit(c) || c = '-') s then s + ".0" else s) |> tagNumericLiteral - | Const.Char c -> "'" + c.ToString() + "'" |> tagStringLiteral - | Const.String bs -> "\"" + bs + "\"" |> tagNumericLiteral - | Const.Unit -> "()" |> tagPunctuation - | Const.Decimal bs -> string bs + "M" |> tagNumericLiteral + | Const.Char c -> "'" + c.ToString() + "'" |> tagStringLiteral + | Const.String bs -> "\"" + bs + "\"" |> tagNumericLiteral + | Const.Unit -> "()" |> tagPunctuation + | Const.Decimal bs -> string bs + "M" |> tagNumericLiteral // either "null" or "the defaut value for a struct" - | Const.Zero -> tagKeyword(if isRefTy g ty then "null" else "default") + | Const.Zero -> tagKeyword(if isRefTy g ty then "null" else "default") wordL str - let layoutAccessibility (denv:DisplayEnv) accessibility itemL = + let layoutAccessibility (denv: DisplayEnv) accessibility itemL = let isInternalCompPath x = match x with - | CompPath(ILScopeRef.Local,[]) -> true + | CompPath(ILScopeRef.Local, []) -> true | _ -> false let (|Public|Internal|Private|) (TAccess p) = match p with | [] -> Public - | _ when List.forall isInternalCompPath p -> Internal + | _ when List.forall isInternalCompPath p -> Internal | _ -> Private - match denv.contextAccessibility,accessibility with - | Public,Internal -> WordL.keywordInternal ++ itemL // print modifier, since more specific than context - | Public,Private -> WordL.keywordPrivate ++ itemL // print modifier, since more specific than context - | Internal,Private -> WordL.keywordPrivate ++ itemL // print modifier, since more specific than context + match denv.contextAccessibility, accessibility with + | Public, Internal -> WordL.keywordInternal ++ itemL // print modifier, since more specific than context + | Public, Private -> WordL.keywordPrivate ++ itemL // print modifier, since more specific than context + | Internal, Private -> WordL.keywordPrivate ++ itemL // print modifier, since more specific than context | _ -> itemL /// Layout a reference to a type @@ -596,23 +591,24 @@ module private PrintTypes = /// Layout the flags of a member let layoutMemberFlags memFlags = - let stat = if memFlags.IsInstance || (memFlags.MemberKind = MemberKind.Constructor) then emptyL else WordL.keywordStatic - let stat = if memFlags.IsDispatchSlot then stat ++ WordL.keywordAbstract - elif memFlags.IsOverrideOrExplicitImpl then stat ++ WordL.keywordOverride - else stat let stat = - - if memFlags.IsOverrideOrExplicitImpl then stat - else - match memFlags.MemberKind with - | MemberKind.ClassConstructor - | MemberKind.Constructor - | MemberKind.PropertyGetSet -> stat - | MemberKind.Member - | MemberKind.PropertyGet - | MemberKind.PropertySet -> stat ++ WordL.keywordMember - - // let stat = if memFlags.IsFinal then stat ++ wordL "final" else stat in + if memFlags.IsInstance || (memFlags.MemberKind = MemberKind.Constructor) then emptyL + else WordL.keywordStatic + let stat = + if memFlags.IsDispatchSlot then stat ++ WordL.keywordAbstract + elif memFlags.IsOverrideOrExplicitImpl then stat ++ WordL.keywordOverride + else stat + let stat = + if memFlags.IsOverrideOrExplicitImpl then stat else + match memFlags.MemberKind with + | MemberKind.ClassConstructor + | MemberKind.Constructor + | MemberKind.PropertyGetSet -> stat + | MemberKind.Member + | MemberKind.PropertyGet + | MemberKind.PropertySet -> stat ++ WordL.keywordMember + + // let stat = if memFlags.IsFinal then stat ++ wordL "final" else stat in stat /// Layout a single attribute arg, following the cases of 'gen_attr_arg' in ilxgen.fs @@ -620,13 +616,13 @@ module private PrintTypes = /// See also dataExprL - there is overlap between these that should be removed let rec private layoutAttribArg denv arg = match arg with - | Expr.Const(c,_,ty) -> + | Expr.Const(c, _, ty) -> if isEnumTy denv.g ty then WordL.keywordEnum ^^ angleL (layoutType denv ty) ^^ bracketL (layoutConst denv.g ty c) else layoutConst denv.g ty c - | Expr.Op (TOp.Array,[_elemTy],args,_) -> + | Expr.Op (TOp.Array, [_elemTy], args, _) -> LeftL.leftBracketBar ^^ semiListL (List.map (layoutAttribArg denv) args) ^^ RightL.rightBracketBar // Detect 'typeof' calls @@ -637,7 +633,7 @@ module private PrintTypes = | TypeDefOfExpr denv.g ty -> LeftL.keywordTypedefof ^^ wordL (tagPunctuation "<") ^^ layoutType denv ty ^^ rightL (tagPunctuation ">") - | Expr.Op (TOp.Coerce,[tgTy;_],[arg2],_) -> + | Expr.Op (TOp.Coerce, [tgTy;_], [arg2], _) -> leftL (tagPunctuation "(") ^^ layoutAttribArg denv arg2 ^^ wordL (tagPunctuation ":>") ^^ layoutType denv tgTy ^^ rightL (tagPunctuation ")") | AttribBitwiseOrExpr denv.g (arg1, arg2) -> @@ -652,12 +648,12 @@ module private PrintTypes = /// Layout arguments of an attribute 'arg1, ..., argN' and private layoutAttribArgs denv args = - sepListL (rightL (tagPunctuation ",")) (List.map (fun (AttribExpr(e1,_)) -> layoutAttribArg denv e1) args) + sepListL (rightL (tagPunctuation ",")) (List.map (fun (AttribExpr(e1, _)) -> layoutAttribArg denv e1) args) /// Layout an attribute 'Type(arg1, ..., argN)' // // REVIEW: we are ignoring "props" here - and layoutAttrib denv (Attrib(_,k,args,_props,_,_,_)) = + and layoutAttrib denv (Attrib(_, k, args, _props, _, _, _)) = let argsL = bracketL (layoutAttribArgs denv args) match k with | ILAttrib ilMethRef -> @@ -672,48 +668,48 @@ module private PrintTypes = PrintIL.layoutILTypeRef denv tref ++ argsL | FSAttrib vref -> // REVIEW: this is not trimming "Attribute" - let _,_,rty,_ = GetTypeOfMemberInMemberForm denv.g vref + let _, _, rty, _ = GetTypeOfMemberInMemberForm denv.g vref let rty = GetFSharpViewOfReturnType denv.g rty let tcref = tcrefOfAppTy denv.g rty layoutTyconRef denv tcref ++ argsL and layoutILAttribElement denv arg = match arg with - | ILAttribElem.String (Some x) -> wordL (tagStringLiteral ("\"" + x + "\"")) - | ILAttribElem.String None -> wordL (tagStringLiteral "") - | ILAttribElem.Bool x -> if x then WordL.keywordTrue else WordL.keywordFalse - | ILAttribElem.Char x -> wordL (tagStringLiteral ("'" + x.ToString() + "'" )) - | ILAttribElem.SByte x -> wordL (tagNumericLiteral ((x |> string)+"y")) - | ILAttribElem.Int16 x -> wordL (tagNumericLiteral ((x |> string)+"s")) - | ILAttribElem.Int32 x -> wordL (tagNumericLiteral ((x |> string))) - | ILAttribElem.Int64 x -> wordL (tagNumericLiteral ((x |> string)+"L")) - | ILAttribElem.Byte x -> wordL (tagNumericLiteral ((x |> string)+"uy")) - | ILAttribElem.UInt16 x -> wordL (tagNumericLiteral ((x |> string)+"us")) - | ILAttribElem.UInt32 x -> wordL (tagNumericLiteral ((x |> string)+"u")) - | ILAttribElem.UInt64 x -> wordL (tagNumericLiteral ((x |> string)+"UL")) - | ILAttribElem.Single x -> + | ILAttribElem.String (Some x) -> wordL (tagStringLiteral ("\"" + x + "\"")) + | ILAttribElem.String None -> wordL (tagStringLiteral "") + | ILAttribElem.Bool x -> if x then WordL.keywordTrue else WordL.keywordFalse + | ILAttribElem.Char x -> wordL (tagStringLiteral ("'" + x.ToString() + "'" )) + | ILAttribElem.SByte x -> wordL (tagNumericLiteral ((x |> string)+"y")) + | ILAttribElem.Int16 x -> wordL (tagNumericLiteral ((x |> string)+"s")) + | ILAttribElem.Int32 x -> wordL (tagNumericLiteral ((x |> string))) + | ILAttribElem.Int64 x -> wordL (tagNumericLiteral ((x |> string)+"L")) + | ILAttribElem.Byte x -> wordL (tagNumericLiteral ((x |> string)+"uy")) + | ILAttribElem.UInt16 x -> wordL (tagNumericLiteral ((x |> string)+"us")) + | ILAttribElem.UInt32 x -> wordL (tagNumericLiteral ((x |> string)+"u")) + | ILAttribElem.UInt64 x -> wordL (tagNumericLiteral ((x |> string)+"UL")) + | ILAttribElem.Single x -> let str = - let s = x.ToString("g12",System.Globalization.CultureInfo.InvariantCulture) - (if String.forall (fun c -> System.Char.IsDigit(c) || c = '-') s + let s = x.ToString("g12", System.Globalization.CultureInfo.InvariantCulture) + (if String.forall (fun c -> System.Char.IsDigit(c) || c = '-') s then s + ".0" else s) + "f" wordL (tagNumericLiteral str) - | ILAttribElem.Double x -> + | ILAttribElem.Double x -> let str = - let s = x.ToString("g12",System.Globalization.CultureInfo.InvariantCulture) - if String.forall (fun c -> System.Char.IsDigit(c) || c = '-') s + let s = x.ToString("g12", System.Globalization.CultureInfo.InvariantCulture) + if String.forall (fun c -> System.Char.IsDigit(c) || c = '-') s then s + ".0" else s wordL (tagNumericLiteral str) - | ILAttribElem.Null -> wordL (tagKeyword "null") - | ILAttribElem.Array (_, xs) -> - leftL (tagPunctuation "[|") ^^ semiListL (List.map (layoutILAttribElement denv) xs) ^^ RightL.rightBracketBar - | ILAttribElem.Type (Some ty) -> + | ILAttribElem.Null -> wordL (tagKeyword "null") + | ILAttribElem.Array (_, xs) -> + leftL (tagPunctuation "[|") ^^ semiListL (List.map (layoutILAttribElement denv) xs) ^^ RightL.rightBracketBar + | ILAttribElem.Type (Some ty) -> LeftL.keywordTypeof ^^ SepL.leftAngle ^^ PrintIL.layoutILType denv [] ty ^^ RightL.rightAngle - | ILAttribElem.Type None -> wordL (tagText "") + | ILAttribElem.Type None -> wordL (tagText "") | ILAttribElem.TypeRef (Some ty) -> LeftL.keywordTypedefof ^^ SepL.leftAngle ^^ PrintIL.layoutILTypeRef denv ty ^^ RightL.rightAngle - | ILAttribElem.TypeRef None -> emptyL + | ILAttribElem.TypeRef None -> emptyL and layoutILAttrib denv (ty, args) = let argsL = bracketL (sepListL (rightL (tagPunctuation ",")) (List.map (layoutILAttribElement denv) args)) @@ -723,7 +719,7 @@ module private PrintTypes = and layoutAttribs denv ty kind attrs restL = if denv.showAttributes then - // Don't display DllImport attributes in generated signatures + // Don't display DllImport attributes in generated signatures let attrs = attrs |> List.filter (IsMatchingFSharpAttributeOpt denv.g denv.g.attrib_DllImportAttribute >> not) let attrs = attrs |> List.filter (IsMatchingFSharpAttributeOpt denv.g denv.g.attrib_ContextStaticAttribute >> not) let attrs = attrs |> List.filter (IsMatchingFSharpAttributeOpt denv.g denv.g.attrib_ThreadStaticAttribute >> not) @@ -735,37 +731,40 @@ module private PrintTypes = match attrs with | [] -> restL - | _ -> squareAngleL (sepListL (rightL (tagPunctuation ";")) (List.map (layoutAttrib denv) attrs)) @@ - restL + | _ -> + squareAngleL (sepListL (rightL (tagPunctuation ";")) (List.map (layoutAttrib denv) attrs)) @@ + restL elif Tastops.isStructRecordOrUnionTyconTy denv.g ty || - ((Tastops.isUnionTy denv.g ty || Tastops.isRecdTy denv.g ty) && HasFSharpAttribute denv.g denv.g.attrib_StructAttribute attrs) then + ((Tastops.isUnionTy denv.g ty || Tastops.isRecdTy denv.g ty) && HasFSharpAttribute denv.g denv.g.attrib_StructAttribute attrs) then squareAngleL (wordL (tagClass "Struct")) @@ restL else match kind with | TyparKind.Type -> restL | TyparKind.Measure -> squareAngleL (wordL (tagClass "Measure")) @@ restL - and layoutTyparAttribs denv kind attrs restL = + and layoutTyparAttribs denv kind attrs restL = match attrs, kind with | [], TyparKind.Type -> restL - | _, _ -> squareAngleL (sepListL (rightL (tagPunctuation ";")) ((match kind with TyparKind.Type -> [] | TyparKind.Measure -> [wordL (tagText "Measure")]) @ List.map (layoutAttrib denv) attrs)) ^^ restL + | _, _ -> squareAngleL (sepListL (rightL (tagPunctuation ";")) ((match kind with TyparKind.Type -> [] | TyparKind.Measure -> [wordL (tagText "Measure")]) @ List.map (layoutAttrib denv) attrs)) ^^ restL - and private layoutTyparRef denv (typar:Typar) = - wordL (tagTypeParameter (sprintf "%s%s%s" - (if denv.showConstraintTyparAnnotations then prefixOfStaticReq typar.StaticReq else "'") - (if denv.showImperativeTyparAnnotations then prefixOfRigidTypar typar else "") - typar.DisplayName)) + and private layoutTyparRef denv (typar: Typar) = + wordL + (tagTypeParameter + (sprintf "%s%s%s" + (if denv.showConstraintTyparAnnotations then prefixOfStaticReq typar.StaticReq else "'") + (if denv.showImperativeTyparAnnotations then prefixOfRigidTypar typar else "") + typar.DisplayName)) - /// Layout a single type parameter declaration, taking TypeSimplificationInfo into account + /// Layout a single type parameter declaration, taking TypeSimplificationInfo into account /// There are several printing-cases for a typar: /// - /// 'a - is multiple occurrence. + /// 'a - is multiple occurrence. /// _ - singleton occurrence, an underscore preferred over 'b. (OCaml accepts but does not print) /// #Type - inplace coercion constraint and singleton. /// ('a :> Type) - inplace coercion constraint not singleton. - /// ('a.opM : S->T) - inplace operator constraint. + /// ('a.opM: S->T) - inplace operator constraint. /// - and private layoutTyparRefWithInfo denv (env:SimplifyTypes.TypeSimplificationInfo) (typar:Typar) = + and private layoutTyparRefWithInfo denv (env: SimplifyTypes.TypeSimplificationInfo) (typar: Typar) = let varL = layoutTyparRef denv typar let varL = if denv.showAttributes then layoutTyparAttribs denv typar.Kind typar.Attribs varL else varL @@ -782,18 +781,17 @@ module private PrintTypes = /// Layout type parameter constraints, taking TypeSimplificationInfo into account and layoutConstraintsWithInfo denv env cxs = - // Internally member constraints get attached to each type variable in their support. // This means we get too many constraints being printed. // So we normalize the constraints to eliminate duplicate member constraints let cxs = - cxs - |> ListSet.setify (fun (_,cx1) (_,cx2) -> - match cx1,cx2 with - | TyparConstraint.MayResolveMember(traitInfo1,_), - TyparConstraint.MayResolveMember(traitInfo2,_) -> traitsAEquiv denv.g TypeEquivEnv.Empty traitInfo1 traitInfo2 - | _ -> false) - + cxs + |> ListSet.setify (fun (_, cx1) (_, cx2) -> + match cx1, cx2 with + | TyparConstraint.MayResolveMember(traitInfo1, _), + TyparConstraint.MayResolveMember(traitInfo2, _) -> traitsAEquiv denv.g TypeEquivEnv.Empty traitInfo1 traitInfo2 + | _ -> false) + let cxsL = List.collect (layoutConstraintWithInfo denv env) cxs match cxsL with | [] -> emptyL @@ -806,17 +804,17 @@ module private PrintTypes = wordL (tagKeyword "when") ^^ sepListL (wordL (tagKeyword "and")) cxsL /// Layout constraints, taking TypeSimplificationInfo into account - and private layoutConstraintWithInfo denv env (tp,tpc) = + and private layoutConstraintWithInfo denv env (tp, tpc) = let longConstraintPrefix l = layoutTyparRefWithInfo denv env tp ^^ WordL.colon ^^ l match tpc with - | TyparConstraint.CoercesTo(tpct,_) -> + | TyparConstraint.CoercesTo(tpct, _) -> [layoutTyparRefWithInfo denv env tp ^^ wordL (tagOperator ":>") --- layoutTypeWithInfo denv env tpct] - | TyparConstraint.MayResolveMember(traitInfo,_) -> + | TyparConstraint.MayResolveMember(traitInfo, _) -> [layoutTraitWithInfo denv env traitInfo] - | TyparConstraint.DefaultsTo(_,ty,_) -> + | TyparConstraint.DefaultsTo(_, ty, _) -> if denv.showTyparDefaultConstraints then [wordL (tagKeyword "default") ^^ layoutTyparRefWithInfo denv env tp ^^ WordL.colon ^^ layoutTypeWithInfo denv env ty] else [] - | TyparConstraint.IsEnum(ty,_) -> + | TyparConstraint.IsEnum(ty, _) -> if denv.shortConstraints then [wordL (tagKeyword "enum")] else @@ -830,8 +828,8 @@ module private PrintTypes = if denv.shortConstraints then [wordL (tagKeyword "equality")] else - [wordL (tagKeyword "equality") |> longConstraintPrefix] - | TyparConstraint.IsDelegate(aty,bty,_) -> + [wordL (tagKeyword "equality") |> longConstraintPrefix] + | TyparConstraint.IsDelegate(aty, bty, _) -> if denv.shortConstraints then [WordL.keywordDelegate] else @@ -853,7 +851,7 @@ module private PrintTypes = [wordL (tagText "reference type")] else [(wordL (tagKeyword "not") ^^ wordL(tagKeyword "struct")) |> longConstraintPrefix] - | TyparConstraint.SimpleChoice(tys,_) -> + | TyparConstraint.SimpleChoice(tys, _) -> [bracketL (sepListL (sepL (tagPunctuation "|")) (List.map (layoutTypeWithInfo denv env) tys)) |> longConstraintPrefix] | TyparConstraint.RequiresDefaultConstructor _ -> if denv.shortConstraints then @@ -866,7 +864,7 @@ module private PrintTypes = WordL.arrow ^^ (layoutTyparRefWithInfo denv env tp)) |> longConstraintPrefix] - and private layoutTraitWithInfo denv env (TTrait(tys,nm,memFlags,argtys,rty,_)) = + and private layoutTraitWithInfo denv env (TTrait(tys, nm, memFlags, argtys, rty, _)) = let nm = DemangleOperatorName nm if denv.shortConstraints then WordL.keywordMember ^^ wordL (tagMember nm) @@ -878,72 +876,72 @@ module private PrintTypes = match tys with | [ty] -> layoutTypeWithInfo denv env ty | tys -> bracketL (layoutTypesWithInfoAndPrec denv env 2 (wordL (tagKeyword "or")) tys) - tysL ^^ wordL (tagPunctuation ":") --- + tysL ^^ wordL (tagPunctuation ":") --- bracketL (stat ++ wordL (tagMember nm) ^^ wordL (tagPunctuation ":") --- ((layoutTypesWithInfoAndPrec denv env 2 (wordL (tagPunctuation "*")) argtys --- wordL (tagPunctuation "->")) --- (layoutTypeWithInfo denv env rty))) /// Layout a unit expression and private layoutMeasure denv unt = - let sortVars vs = vs |> List.sortBy (fun (v:Typar,_) -> v.DisplayName) - let sortCons cs = cs |> List.sortBy (fun (c:TyconRef,_) -> c.DisplayName) - let negvs,posvs = ListMeasureVarOccsWithNonZeroExponents unt |> sortVars |> List.partition (fun (_,e) -> SignRational e < 0) - let negcs,poscs = ListMeasureConOccsWithNonZeroExponents denv.g false unt |> sortCons |> List.partition (fun (_,e) -> SignRational e < 0) + let sortVars vs = vs |> List.sortBy (fun (v: Typar, _) -> v.DisplayName) + let sortCons cs = cs |> List.sortBy (fun (c: TyconRef, _) -> c.DisplayName) + let negvs, posvs = ListMeasureVarOccsWithNonZeroExponents unt |> sortVars |> List.partition (fun (_, e) -> SignRational e < 0) + let negcs, poscs = ListMeasureConOccsWithNonZeroExponents denv.g false unt |> sortCons |> List.partition (fun (_, e) -> SignRational e < 0) let unparL uv = layoutTyparRef denv uv let unconL tc = layoutTyconRef denv tc let rationalL e = wordL (tagNumericLiteral (RationalToString e)) let measureToPowerL x e = if e = OneRational then x else x -- wordL (tagPunctuation "^") -- rationalL e - let prefix = spaceListL (List.map (fun (v,e) -> measureToPowerL (unparL v) e) posvs @ - List.map (fun (c,e) -> measureToPowerL (unconL c) e) poscs) - let postfix = spaceListL (List.map (fun (v,e) -> measureToPowerL (unparL v) (NegRational e)) negvs @ - List.map (fun (c,e) -> measureToPowerL (unconL c) (NegRational e)) negcs) - match (negvs,negcs) with - | [],[] -> (match posvs,poscs with [],[] -> wordL (tagNumericLiteral "1") | _ -> prefix) + let prefix = spaceListL (List.map (fun (v, e) -> measureToPowerL (unparL v) e) posvs @ + List.map (fun (c, e) -> measureToPowerL (unconL c) e) poscs) + let postfix = spaceListL (List.map (fun (v, e) -> measureToPowerL (unparL v) (NegRational e)) negvs @ + List.map (fun (c, e) -> measureToPowerL (unconL c) (NegRational e)) negcs) + match (negvs, negcs) with + | [], [] -> (match posvs, poscs with [], [] -> wordL (tagNumericLiteral "1") | _ -> prefix) | _ -> prefix ^^ sepL (tagPunctuation "/") ^^ (if List.length negvs + List.length negcs > 1 then sepL (tagPunctuation "(") ^^ postfix ^^ sepL (tagPunctuation ")") else postfix) - /// Layout type arguments, either NAME or (ty,...,ty) NAME *) + /// Layout type arguments, either NAME or (ty, ..., ty) NAME *) and private layoutTypeAppWithInfoAndPrec denv env tcL prec prefix args = - if prefix then + if prefix then match args with | [] -> tcL | [arg] -> tcL ^^ sepL (tagPunctuation "<") ^^ (layoutTypeWithInfoAndPrec denv env 4 arg) ^^ rightL (tagPunctuation">") | args -> bracketIfL (prec <= 1) (tcL ^^ angleL (layoutTypesWithInfoAndPrec denv env 2 (sepL (tagPunctuation ",")) args)) else match args with - | [] -> tcL - | [arg] -> layoutTypeWithInfoAndPrec denv env 2 arg ^^ tcL - | args -> bracketIfL (prec <= 1) (bracketL (layoutTypesWithInfoAndPrec denv env 2 (sepL (tagPunctuation ",")) args) --- tcL) + | [] -> tcL + | [arg] -> layoutTypeWithInfoAndPrec denv env 2 arg ^^ tcL + | args -> bracketIfL (prec <= 1) (bracketL (layoutTypesWithInfoAndPrec denv env 2 (sepL (tagPunctuation ",")) args) --- tcL) /// Layout a type, taking precedence into account to insert brackets where needed and layoutTypeWithInfoAndPrec denv env prec ty = match stripTyparEqns ty with - // Always prefer to format 'byref' as 'inref' - | ty when isInByrefTy denv.g ty && (match ty with TType_app (tc, _) when denv.g.inref_tcr.CanDeref && tyconRefEq denv.g tc denv.g.byref2_tcr -> true | _ -> false) -> + // Always prefer to format 'byref' as 'inref' + | ty when isInByrefTy denv.g ty && (match ty with TType_app (tc, _) when denv.g.inref_tcr.CanDeref && tyconRefEq denv.g tc denv.g.byref2_tcr -> true | _ -> false) -> layoutTypeWithInfoAndPrec denv env prec (mkInByrefTy denv.g (destByrefTy denv.g ty)) - // Always prefer to format 'byref' as 'outref' - | ty when isOutByrefTy denv.g ty && (match ty with TType_app (tc, _) when denv.g.outref_tcr.CanDeref && tyconRefEq denv.g tc denv.g.byref2_tcr -> true | _ -> false) -> + // Always prefer to format 'byref' as 'outref' + | ty when isOutByrefTy denv.g ty && (match ty with TType_app (tc, _) when denv.g.outref_tcr.CanDeref && tyconRefEq denv.g tc denv.g.byref2_tcr -> true | _ -> false) -> layoutTypeWithInfoAndPrec denv env prec (mkOutByrefTy denv.g (destByrefTy denv.g ty)) - // Always prefer to format 'byref' as 'byref' - | ty when isByrefTy denv.g ty && (match ty with TType_app (tc, _) when denv.g.byref_tcr.CanDeref && tyconRefEq denv.g tc denv.g.byref2_tcr -> true | _ -> false) -> + // Always prefer to format 'byref' as 'byref' + | ty when isByrefTy denv.g ty && (match ty with TType_app (tc, _) when denv.g.byref_tcr.CanDeref && tyconRefEq denv.g tc denv.g.byref2_tcr -> true | _ -> false) -> layoutTypeWithInfoAndPrec denv env prec (mkByrefTy denv.g (destByrefTy denv.g ty)) // Always prefer 'float' to 'float<1>' - | TType_app (tc,args) when tc.IsMeasureableReprTycon && List.forall (isDimensionless denv.g) args -> + | TType_app (tc, args) when tc.IsMeasureableReprTycon && List.forall (isDimensionless denv.g) args -> layoutTypeWithInfoAndPrec denv env prec (reduceTyconRefMeasureableOrProvided denv.g tc args) // Layout a type application - | TType_app (tc,args) -> + | TType_app (tc, args) -> layoutTypeAppWithInfoAndPrec denv env (layoutTyconRef denv tc) prec tc.IsPrefixDisplay args - | TType_ucase (UCRef(tc,_),args) -> + | TType_ucase (UCRef(tc, _), args) -> layoutTypeAppWithInfoAndPrec denv env (layoutTyconRef denv tc) prec tc.IsPrefixDisplay args // Layout a tuple type - | TType_anon (anonInfo,tys) -> + | TType_anon (anonInfo, tys) -> let core = sepListL (wordL (tagPunctuation ";")) (List.map2 (fun nm ty -> wordL (tagField nm) ^^ wordL (tagPunctuation ":") ^^ layoutTypeWithInfoAndPrec denv env prec ty) (Array.toList anonInfo.SortedNames) tys) if evalAnonInfoIsStruct anonInfo then WordL.keywordStruct --- braceBarL core @@ -951,17 +949,17 @@ module private PrintTypes = braceBarL core // Layout a tuple type - | TType_tuple (tupInfo,t) -> + | TType_tuple (tupInfo, t) -> if evalTupInfoIsStruct tupInfo then WordL.keywordStruct --- bracketL (layoutTypesWithInfoAndPrec denv env 2 (wordL (tagPunctuation "*")) t) else bracketIfL (prec <= 2) (layoutTypesWithInfoAndPrec denv env 2 (wordL (tagPunctuation "*")) t) // Layout a first-class generic type. - | TType_forall (tps,tau) -> + | TType_forall (tps, tau) -> let tauL = layoutTypeWithInfoAndPrec denv env prec tau match tps with - | [] -> tauL + | [] -> tauL | [h] -> layoutTyparRefWithInfo denv env h ^^ rightL (tagPunctuation ".") --- tauL | (h::t) -> spaceListL (List.map (layoutTyparRefWithInfo denv env) (h::t)) ^^ rightL (tagPunctuation ".") --- tauL @@ -969,7 +967,7 @@ module private PrintTypes = | TType_fun _ -> let rec loop soFarL ty = match stripTyparEqns ty with - | TType_fun (dty,rty) -> loop (soFarL --- (layoutTypeWithInfoAndPrec denv env 4 dty ^^ wordL (tagPunctuation "->"))) rty + | TType_fun (dty, rty) -> loop (soFarL --- (layoutTypeWithInfoAndPrec denv env 4 dty ^^ wordL (tagPunctuation "->"))) rty | rty -> soFarL --- layoutTypeWithInfoAndPrec denv env 5 rty bracketIfL (prec <= 4) (loop emptyL ty) @@ -987,20 +985,20 @@ module private PrintTypes = and private layoutTypeWithInfo denv env ty = layoutTypeWithInfoAndPrec denv env 5 ty - and layoutType denv ty = + and layoutType denv ty = layoutTypeWithInfo denv SimplifyTypes.typeSimplificationInfo0 ty /// Layout a single type used as the type of a member or value let layoutTopType denv env argInfos rty cxs = // Parenthesize the return type to match the topValInfo - let rtyL = layoutTypeWithInfoAndPrec denv env 4 rty + let rtyL = layoutTypeWithInfoAndPrec denv env 4 rty let cxsL = layoutConstraintsWithInfo denv env cxs match argInfos with | [] -> rtyL --- cxsL - | _ -> + | _ -> // Format each argument, including its name and type - let argL (ty,argInfo: ArgReprInfo) = + let argL (ty, argInfo: ArgReprInfo) = // Detect an optional argument let isOptionalArg = HasFSharpAttribute denv.g denv.g.attrib_OptionalArgumentAttribute argInfo.Attribs @@ -1008,14 +1006,14 @@ module private PrintTypes = match argInfo.Name, isOptionalArg, isParamArray, tryDestOptionTy denv.g ty with // Layout an optional argument | Some(id), true, _, ValueSome ty -> - leftL (tagPunctuation "?") ^^ sepL (tagParameter id.idText) ^^ SepL.colon ^^ layoutTypeWithInfoAndPrec denv env 2 ty + leftL (tagPunctuation "?") ^^ sepL (tagParameter id.idText) ^^ SepL.colon ^^ layoutTypeWithInfoAndPrec denv env 2 ty // Layout an unnamed argument - | None, _,_, _ -> + | None, _, _, _ -> layoutTypeWithInfoAndPrec denv env 2 ty // Layout a named argument - | Some id,_,isParamArray,_ -> + | Some id, _, isParamArray, _ -> let prefix = - if isParamArray then + if isParamArray then layoutBuiltinAttribute denv denv.g.attrib_ParamArrayAttribute ^^ leftL (tagParameter id.idText) else leftL (tagParameter id.idText) @@ -1033,12 +1031,12 @@ module private PrintTypes = /// Layout type parameters let layoutTyparDecls denv nmL prefix (typars: Typars) = let env = SimplifyTypes.typeSimplificationInfo0 - let tpcs = typars |> List.collect (fun tp -> List.map (fun tpc -> tp,tpc) tp.Constraints) - match typars,tpcs with - | [],[] -> + let tpcs = typars |> List.collect (fun tp -> List.map (fun tpc -> tp, tpc) tp.Constraints) + match typars, tpcs with + | [], [] -> nmL - | [h],[] when not prefix -> + | [h], [] when not prefix -> layoutTyparRefWithInfo denv env h --- nmL | _ -> @@ -1066,13 +1064,13 @@ module private PrintTypes = // Oddly this is called in multiple places with argInfos=[] and denv.useColonForReturnType=true, as a complex // way of giving give ": ty" let prettyLayoutOfUncurriedSig denv typarInst argInfos retTy = - let (prettyTyparInst, prettyArgInfos,prettyRetTy),cxs = PrettyTypes.PrettifyInstAndUncurriedSig denv.g (typarInst, argInfos, retTy) + let (prettyTyparInst, prettyArgInfos, prettyRetTy), cxs = PrettyTypes.PrettifyInstAndUncurriedSig denv.g (typarInst, argInfos, retTy) prettyTyparInst, prettyLayoutOfTopTypeInfoAux denv [prettyArgInfos] prettyRetTy cxs let prettyLayoutOfCurriedMemberSig denv typarInst argInfos retTy parentTyparTys = - let (prettyTyparInst, parentTyparTys,argInfos,retTy),cxs = PrettyTypes.PrettifyInstAndCurriedSig denv.g (typarInst, parentTyparTys, argInfos, retTy) + let (prettyTyparInst, parentTyparTys, argInfos, retTy), cxs = PrettyTypes.PrettifyInstAndCurriedSig denv.g (typarInst, parentTyparTys, argInfos, retTy) // Filter out the parent typars, which don't get shown in the member signature - let cxs = cxs |> List.filter (fun (tp,_) -> not (parentTyparTys |> List.exists (fun ty -> match tryDestTyparTy denv.g ty with ValueSome destTypar -> typarEq tp destTypar | _ -> false))) + let cxs = cxs |> List.filter (fun (tp, _) -> not (parentTyparTys |> List.exists (fun ty -> match tryDestTyparTy denv.g ty with ValueSome destTypar -> typarEq tp destTypar | _ -> false))) prettyTyparInst, prettyLayoutOfTopTypeInfoAux denv argInfos retTy cxs // Layout: type spec - class, datatype, record, abbrev @@ -1083,7 +1081,7 @@ module private PrintTypes = PrettyTypes.NewPrettyTypars memberToParentInst methTypars methTyparNames let retTy = instType allTyparInst retTy - let argInfos = argInfos |> List.map (fun infos -> if isNil infos then [(denv.g.unit_ty,ValReprInfo.unnamedTopArg1)] else infos |> List.map (map1Of2 (instType allTyparInst))) + let argInfos = argInfos |> List.map (fun infos -> if isNil infos then [(denv.g.unit_ty, ValReprInfo.unnamedTopArg1)] else infos |> List.map (map1Of2 (instType allTyparInst))) // Also format dummy types corresponding to any type variables on the container to make sure they // aren't chosen as names for displayed variables. @@ -1095,7 +1093,7 @@ module private PrintTypes = let prettyLayoutOfMemberType denv v typarInst argInfos retTy = match PartitionValRefTypars denv.g v with - | Some(_,_,memberMethodTypars,memberToParentInst,_) -> + | Some(_, _, memberMethodTypars, memberToParentInst, _) -> prettyLayoutOfMemberSigCore denv memberToParentInst (typarInst, memberMethodTypars, argInfos, retTy) | None -> let prettyTyparInst, layout = prettyLayoutOfUncurriedSig denv typarInst (List.concat argInfos) retTy @@ -1110,14 +1108,14 @@ module private PrintTypes = nameL ^^ wordL (tagPunctuation ":") ^^ tauL let prettyLayoutOfType denv ty = - let ty,cxs = PrettyTypes.PrettifyType denv.g ty + let ty, cxs = PrettyTypes.PrettifyType denv.g ty let env = SimplifyTypes.CollectInfo true [ty] cxs let cxsL = layoutConstraintsWithInfo denv env env.postfixConstraints - layoutTypeWithInfoAndPrec denv env 2 ty --- cxsL + layoutTypeWithInfoAndPrec denv env 2 ty --- cxsL let prettyLayoutOfTypeNoConstraints denv ty = - let ty,_cxs = PrettyTypes.PrettifyType denv.g ty - layoutTypeWithInfoAndPrec denv SimplifyTypes.typeSimplificationInfo0 5 ty + let ty, _cxs = PrettyTypes.PrettifyType denv.g ty + layoutTypeWithInfoAndPrec denv SimplifyTypes.typeSimplificationInfo0 5 ty let layoutAssemblyName _denv (ty: TType) = ty.GetAssemblyName() @@ -1125,11 +1123,11 @@ module private PrintTypes = /// Printing TAST objects module private PrintTastMemberOrVals = open PrintTypes - let private prettyLayoutOfMember denv typarInst (v:Val) = + let private prettyLayoutOfMember denv typarInst (v: Val) = let v = mkLocalValRef v let membInfo = Option.get v.MemberInfo let stat = PrintTypes.layoutMemberFlags membInfo.MemberFlags - let _tps,argInfos,rty,_ = GetTypeOfMemberInFSharpForm denv.g v + let _tps, argInfos, rty, _ = GetTypeOfMemberInFSharpForm denv.g v let mkNameL niceMethodTypars tagFunction name = let nameL = @@ -1145,11 +1143,11 @@ module private PrintTastMemberOrVals = match membInfo.MemberFlags.MemberKind with | MemberKind.Member -> - let prettyTyparInst, niceMethodTypars,tauL = prettyLayoutOfMemberType denv v typarInst argInfos rty + let prettyTyparInst, niceMethodTypars, tauL = prettyLayoutOfMemberType denv v typarInst argInfos rty let nameL = mkNameL niceMethodTypars tagMember v.LogicalName let resL = stat --- (nameL ^^ WordL.colon ^^ tauL) prettyTyparInst, resL - | MemberKind.ClassConstructor + | MemberKind.ClassConstructor | MemberKind.Constructor -> let prettyTyparInst, _, tauL = prettyLayoutOfMemberType denv v typarInst argInfos rty let newL = layoutAccessibility denv v.Accessibility WordL.keywordNew @@ -1160,38 +1158,38 @@ module private PrintTastMemberOrVals = | MemberKind.PropertyGet -> if isNil argInfos then // use error recovery because intellisense on an incomplete file will show this - errorR(Error(FSComp.SR.tastInvalidFormForPropertyGetter(),v.Id.idRange)) + errorR(Error(FSComp.SR.tastInvalidFormForPropertyGetter(), v.Id.idRange)) let nameL = mkNameL [] tagProperty v.CoreDisplayName let resL = stat --- nameL --- (WordL.keywordWith ^^ WordL.keywordGet) emptyTyparInst, resL else let argInfos = match argInfos with - | [[(ty,_)]] when isUnitTy denv.g ty -> [] + | [[(ty, _)]] when isUnitTy denv.g ty -> [] | _ -> argInfos - let prettyTyparInst, niceMethodTypars,tauL = prettyLayoutOfMemberType denv v typarInst argInfos rty + let prettyTyparInst, niceMethodTypars, tauL = prettyLayoutOfMemberType denv v typarInst argInfos rty let nameL = mkNameL niceMethodTypars tagProperty v.CoreDisplayName let resL = stat --- (nameL ^^ WordL.colon ^^ (if isNil argInfos then tauL else tauL --- (WordL.keywordWith ^^ WordL.keywordGet))) prettyTyparInst, resL | MemberKind.PropertySet -> if argInfos.Length <> 1 || isNil argInfos.Head then // use error recovery because intellisense on an incomplete file will show this - errorR(Error(FSComp.SR.tastInvalidFormForPropertySetter(),v.Id.idRange)) + errorR(Error(FSComp.SR.tastInvalidFormForPropertySetter(), v.Id.idRange)) let nameL = mkNameL [] tagProperty v.CoreDisplayName let resL = stat --- nameL --- (WordL.keywordWith ^^ WordL.keywordSet) emptyTyparInst, resL else - let argInfos,valueInfo = List.frontAndBack argInfos.Head + let argInfos, valueInfo = List.frontAndBack argInfos.Head let prettyTyparInst, niceMethodTypars, tauL = prettyLayoutOfMemberType denv v typarInst (if isNil argInfos then [] else [argInfos]) (fst valueInfo) let nameL = mkNameL niceMethodTypars tagProperty v.CoreDisplayName let resL = stat --- (nameL ^^ wordL (tagPunctuation ":") ^^ (tauL --- (WordL.keywordWith ^^ WordL.keywordSet))) prettyTyparInst, resL - let private layoutNonMemberVal denv (tps,v:Val,tau,cxs) = + let private layoutNonMemberVal denv (tps, v: Val, tau, cxs) = let env = SimplifyTypes.CollectInfo true [tau] cxs let cxs = env.postfixConstraints - let argInfos,rty = GetTopTauTypeInFSharpForm denv.g (arityOfVal v).ArgInfos tau v.Range + let argInfos, rty = GetTopTauTypeInFSharpForm denv.g (arityOfVal v).ArgInfos tau v.Range let nameL = (if v.IsModuleBinding then tagModuleBinding else tagUnknownEntity) v.DisplayName |> mkNav v.DefinitionRange @@ -1209,27 +1207,27 @@ module private PrintTastMemberOrVals = nameL let isOverGeneric = List.length (Zset.elements (freeInType CollectTyparsNoCaching tau).FreeTypars) < List.length tps // Bug: 1143 - let isTyFunction = v.IsTypeFunction // Bug: 1143, and innerpoly tests + let isTyFunction = v.IsTypeFunction // Bug: 1143, and innerpoly tests let typarBindingsL = if isTyFunction || isOverGeneric || denv.showTyparBinding then layoutTyparDecls denv nameL true tps else nameL - let valAndTypeL = (WordL.keywordVal ^^ typarBindingsL --- wordL (tagPunctuation ":")) --- layoutTopType denv env argInfos rty cxs + let valAndTypeL = (WordL.keywordVal ^^ typarBindingsL --- wordL (tagPunctuation ":")) --- layoutTopType denv env argInfos rty cxs match denv.generatedValueLayout v with - | None -> valAndTypeL + | None -> valAndTypeL | Some rhsL -> (valAndTypeL ++ wordL (tagPunctuation"=")) --- rhsL - let prettyLayoutOfValOrMember denv typarInst (v:Val) = + let prettyLayoutOfValOrMember denv typarInst (v: Val) = let prettyTyparInst, vL = match v.MemberInfo with | None -> - let tps,tau = v.TypeScheme + let tps, tau = v.TypeScheme // adjust the type in case this is the 'this' pointer stored in a reference cell let tau = StripSelfRefCell(denv.g, v.BaseOrThisInfo, tau) - let (prettyTyparInst, prettyTypars, prettyTauTy),cxs = PrettyTypes.PrettifyInstAndTyparsAndType denv.g (typarInst,tps,tau) - let resL = layoutNonMemberVal denv (prettyTypars,v,prettyTauTy,cxs) + let (prettyTyparInst, prettyTypars, prettyTauTy), cxs = PrettyTypes.PrettifyInstAndTyparsAndType denv.g (typarInst, tps, tau) + let resL = layoutNonMemberVal denv (prettyTypars, v, prettyTauTy, cxs) prettyTyparInst, resL | Some _ -> prettyLayoutOfMember denv typarInst v @@ -1239,10 +1237,10 @@ module private PrintTastMemberOrVals = prettyLayoutOfValOrMember denv emptyTyparInst v |> snd let layoutTyparConstraint denv x = x |> PrintTypes.layoutTyparConstraint denv -let outputType denv os x = x |> PrintTypes.layoutType denv |> bufferL os +let outputType denv os x = x |> PrintTypes.layoutType denv |> bufferL os let layoutType denv x = x |> PrintTypes.layoutType denv -let outputTypars denv nm os x = x |> PrintTypes.layoutTyparDecls denv (wordL nm) true |> bufferL os -let outputTyconRef denv os x = x |> PrintTypes.layoutTyconRef denv |> bufferL os +let outputTypars denv nm os x = x |> PrintTypes.layoutTyparDecls denv (wordL nm) true |> bufferL os +let outputTyconRef denv os x = x |> PrintTypes.layoutTyconRef denv |> bufferL os let layoutTyconRef denv x = x |> PrintTypes.layoutTyconRef denv let layoutConst g ty c = PrintTypes.layoutConst g ty c @@ -1269,15 +1267,15 @@ module InfoMemberPrinting = RightL.colon ^^ PrintTypes.layoutType denv pty // Layout an unnamed argument - | _, None, _,_ -> + | _, None, _, _ -> PrintTypes.layoutType denv pty // Layout a named argument - | true, Some nm,_,_ -> + | true, Some nm, _, _ -> layoutBuiltinAttribute denv denv.g.attrib_ParamArrayAttribute ^^ wordL (tagParameter nm.idText) ^^ RightL.colon ^^ PrintTypes.layoutType denv pty - | false, Some nm,_,_ -> + | false, Some nm, _, _ -> wordL (tagParameter nm.idText) ^^ RightL.colon ^^ PrintTypes.layoutType denv pty @@ -1287,9 +1285,9 @@ module InfoMemberPrinting = /// Format a method info using "F# style". // // That is, this style: - // new : argName1:argType1 * ... * argNameN:argTypeN -> retType - // Method : argName1:argType1 * ... * argNameN:argTypeN -> retType - let private layoutMethInfoFSharpStyleCore amap m denv (minfo:MethInfo) minst = + // new: argName1: argType1 * ... * argNameN: argTypeN -> retType + // Method: argName1: argType1 * ... * argNameN: argTypeN -> retType + let private layoutMethInfoFSharpStyleCore amap m denv (minfo: MethInfo) minst = let layout = if not minfo.IsConstructor && not minfo.IsInstance then WordL.keywordStatic else emptyL @@ -1318,9 +1316,9 @@ module InfoMemberPrinting = /// Format a method info using "half C# style". // // That is, this style: - // Container(argName1:argType1, ..., argNameN:argTypeN) : retType - // Container.Method(argName1:argType1, ..., argNameN:argTypeN) : retType - let private layoutMethInfoCSharpStyle amap m denv (minfo:MethInfo) minst = + // Container(argName1: argType1, ..., argNameN: argTypeN) : retType + // Container.Method(argName1: argType1, ..., argNameN: argTypeN) : retType + let private layoutMethInfoCSharpStyle amap m denv (minfo: MethInfo) minst = let retTy = if minfo.IsConstructor then minfo.ApparentEnclosingType else minfo.GetFSharpReturnTy(amap, m, minst) let layout = if minfo.IsExtensionMember then @@ -1335,11 +1333,11 @@ module InfoMemberPrinting = emptyL let layout = layout ^^ - if minfo.IsConstructor then + if minfo.IsConstructor then SepL.leftParen else SepL.dot ^^ - PrintTypes.layoutTyparDecls denv (wordL (tagMethod minfo.LogicalName)) true minfo.FormalMethodTypars ^^ + PrintTypes.layoutTyparDecls denv (wordL (tagMethod minfo.LogicalName)) true minfo.FormalMethodTypars ^^ SepL.leftParen let paramDatas = minfo.GetParamDatas (amap, m, minst) @@ -1348,13 +1346,13 @@ module InfoMemberPrinting = // Prettify this baby - let prettifyILMethInfo (amap:Import.ImportMap) m (minfo:MethInfo) typarInst ilMethInfo = + let prettifyILMethInfo (amap: Import.ImportMap) m (minfo: MethInfo) typarInst ilMethInfo = let (ILMethInfo(_, apparentTy, dty, mdef, _)) = ilMethInfo let (prettyTyparInst, prettyTys), _ = PrettyTypes.PrettifyInstAndTypes amap.g (typarInst, (apparentTy :: minfo.FormalMethodInst)) let prettyApparentTy, prettyFormalMethInst = List.headAndTail prettyTys let prettyMethInfo = match dty with - | None -> MethInfo.CreateILMeth (amap, m, prettyApparentTy, mdef) + | None -> MethInfo.CreateILMeth (amap, m, prettyApparentTy, mdef) | Some declaringTyconRef -> MethInfo.CreateILExtensionMeth(amap, m, prettyApparentTy, declaringTyconRef, minfo.ExtensionMemberPriorityOption, mdef) prettyTyparInst, prettyMethInfo, prettyFormalMethInst @@ -1366,41 +1364,41 @@ module InfoMemberPrinting = /// to notice this, or they find it helpful. It feels that moving from this position should not be done lightly. // // For F# members: - // new : unit -> retType - // new : argName1:argType1 * ... * argNameN:argTypeN -> retType - // Container.Method : unit -> retType - // Container.Method : argName1:argType1 * ... * argNameN:argTypeN -> retType + // new: unit -> retType + // new: argName1: argType1 * ... * argNameN: argTypeN -> retType + // Container.Method: unit -> retType + // Container.Method: argName1: argType1 * ... * argNameN: argTypeN -> retType // // For F# extension members: - // ApparentContainer.Method : argName1:argType1 * ... * argNameN:argTypeN -> retType + // ApparentContainer.Method: argName1: argType1 * ... * argNameN: argTypeN -> retType // // For C# and provided members: - // Container(argName1:argType1, ..., argNameN:argTypeN) : retType - // Container.Method(argName1:argType1, ..., argNameN:argTypeN) : retType + // Container(argName1: argType1, ..., argNameN: argTypeN) : retType + // Container.Method(argName1: argType1, ..., argNameN: argTypeN) : retType // // For C# extension members: - // ApparentContainer.Method(argName1:argType1, ..., argNameN:argTypeN) : retType + // ApparentContainer.Method(argName1: argType1, ..., argNameN: argTypeN) : retType let prettyLayoutOfMethInfoFreeStyle (amap: Import.ImportMap) m denv typarInst methInfo = match methInfo with | DefaultStructCtor _ -> let prettyTyparInst, _ = PrettyTypes.PrettifyInst amap.g typarInst prettyTyparInst, PrintTypes.layoutTyconRef denv methInfo.ApparentEnclosingTyconRef ^^ wordL (tagPunctuation "()") - | FSMeth(_,_,vref,_) -> + | FSMeth(_, _, vref, _) -> let prettyTyparInst, resL = PrintTastMemberOrVals.prettyLayoutOfValOrMember { denv with showMemberContainers=true } typarInst vref.Deref prettyTyparInst, resL - | ILMeth(_,ilminfo,_) -> + | ILMeth(_, ilminfo, _) -> let prettyTyparInst, prettyMethInfo, minst = prettifyILMethInfo amap m methInfo typarInst ilminfo let resL = layoutMethInfoCSharpStyle amap m denv prettyMethInfo minst prettyTyparInst, resL #if !NO_EXTENSIONTYPING - | ProvidedMeth _ -> + | ProvidedMeth _ -> let prettyTyparInst, _ = PrettyTypes.PrettifyInst amap.g typarInst prettyTyparInst, layoutMethInfoCSharpStyle amap m denv methInfo methInfo.FormalMethodInst #endif - let prettyLayoutOfPropInfoFreeStyle g amap m denv (pinfo: PropInfo) = - let rty = pinfo.GetPropertyType(amap,m) - let rty = if pinfo.IsIndexer then mkRefTupledTy g (pinfo.GetParamTypes(amap, m)) --> rty else rty + let prettyLayoutOfPropInfoFreeStyle g amap m denv (pinfo: PropInfo) = + let rty = pinfo.GetPropertyType(amap, m) + let rty = if pinfo.IsIndexer then mkRefTupledTy g (pinfo.GetParamTypes(amap, m)) --> rty else rty let rty, _ = PrettyTypes.PrettifyType g rty let tagProp = match pinfo.ArbitraryValRef with @@ -1428,22 +1426,22 @@ module InfoMemberPrinting = module private TastDefinitionPrinting = open PrintTypes - let layoutExtensionMember denv (v:Val) = + let layoutExtensionMember denv (v: Val) = let tycon = v.MemberApparentEntity.Deref let nameL = tagMethod tycon.DisplayName |> mkNav v.DefinitionRange |> wordL let nameL = layoutAccessibility denv tycon.Accessibility nameL // "type-accessibility" let tps = match PartitionValTyparsForApparentEnclosingType denv.g v with - | Some(_,memberParentTypars,_,_,_) -> memberParentTypars + | Some(_, memberParentTypars, _, _, _) -> memberParentTypars | None -> [] let lhsL = WordL.keywordType ^^ layoutTyparDecls denv nameL tycon.IsPrefixDisplay tps let memberL = PrintTastMemberOrVals.prettyLayoutOfValOrMemberNoInst denv v (lhsL ^^ WordL.keywordWith) @@-- memberL let layoutExtensionMembers denv vs = - aboveListL (List.map (layoutExtensionMember denv) vs) + aboveListL (List.map (layoutExtensionMember denv) vs) - let layoutRecdField addAccess denv (fld:RecdField) = + let layoutRecdField addAccess denv (fld: RecdField) = let lhs = tagRecordField fld.Name |> mkNav fld.DefinitionRange @@ -1452,15 +1450,15 @@ module private TastDefinitionPrinting = let lhs = if fld.IsMutable then wordL (tagKeyword "mutable") --- lhs else lhs (lhs ^^ RightL.colon) --- layoutType denv fld.FormalType - let layoutUnionOrExceptionField denv isGenerated i (fld : RecdField) = + let layoutUnionOrExceptionField denv isGenerated i (fld: RecdField) = if isGenerated i fld then layoutTypeWithInfoAndPrec denv SimplifyTypes.typeSimplificationInfo0 2 fld.FormalType else layoutRecdField false denv fld - let isGeneratedUnionCaseField pos (f : RecdField) = + let isGeneratedUnionCaseField pos (f: RecdField) = if pos < 0 then f.Name = "Item" else f.Name = "Item" + string (pos + 1) - let isGeneratedExceptionField pos (f : RecdField) = + let isGeneratedExceptionField pos (f: RecdField) = f.Name = "Data" + (string pos) let layoutUnionCaseFields denv isUnionCase fields = @@ -1470,14 +1468,14 @@ module private TastDefinitionPrinting = let isGenerated = if isUnionCase then isGeneratedUnionCaseField else isGeneratedExceptionField sepListL (wordL (tagPunctuation "*")) (List.mapi (layoutUnionOrExceptionField denv isGenerated) fields) - let layoutUnionCase denv prefixL (ucase:UnionCase) = + let layoutUnionCase denv prefixL (ucase: UnionCase) = let nmL = DemangleOperatorNameAsLayout (tagUnionCase >> mkNav ucase.DefinitionRange) ucase.Id.idText //let nmL = layoutAccessibility denv ucase.Accessibility nmL match ucase.RecdFields with | [] -> (prefixL ^^ nmL) | fields -> (prefixL ^^ nmL ^^ WordL.keywordOf) --- layoutUnionCaseFields denv true fields - let layoutUnionCases denv ucases = + let layoutUnionCases denv ucases = let prefixL = WordL.bar // See bug://2964 - always prefix in case preceded by accessibility modifier List.map (layoutUnionCase denv prefixL) ucases @@ -1489,13 +1487,13 @@ module private TastDefinitionPrinting = | TUnionRepr r -> not (isNilOrSingleton r.CasesTable.UnionCasesAsList) | TRecdRepr _ -> true | TAsmRepr _ - | TILObjectRepr _ + | TILObjectRepr _ | TMeasureableRepr _ #if !NO_EXTENSIONTYPING | TProvidedTypeExtensionPoint _ | TProvidedNamespaceExtensionPoint _ #endif - | TNoRepr -> false + | TNoRepr -> false @@ -1503,51 +1501,51 @@ module private TastDefinitionPrinting = let private layoutILFieldInfo denv amap m (e: ILFieldInfo) = let staticL = if e.IsStatic then WordL.keywordStatic else emptyL let nameL = wordL (tagField (adjustILName e.FieldName)) - let typL = layoutType denv (e.FieldType(amap,m)) - staticL ^^ WordL.keywordVal ^^ nameL ^^ WordL.colon ^^ typL + let typL = layoutType denv (e.FieldType(amap, m)) + staticL ^^ WordL.keywordVal ^^ nameL ^^ WordL.colon ^^ typL let private layoutEventInfo denv amap m (e: EventInfo) = let staticL = if e.IsStatic then WordL.keywordStatic else emptyL let nameL = wordL (tagEvent (adjustILName e.EventName)) - let typL = layoutType denv (e.GetDelegateType(amap,m)) - staticL ^^ WordL.keywordEvent ^^ nameL ^^ WordL.colon ^^ typL + let typL = layoutType denv (e.GetDelegateType(amap, m)) + staticL ^^ WordL.keywordEvent ^^ nameL ^^ WordL.colon ^^ typL - let private layoutPropInfo denv amap m (p : PropInfo) = - let staticL = if p.IsStatic then WordL.keywordStatic else emptyL - let nameL = wordL (tagProperty (adjustILName p.PropertyName)) + let private layoutPropInfo denv amap m (p: PropInfo) = + let staticL = if p.IsStatic then WordL.keywordStatic else emptyL + let nameL = wordL (tagProperty (adjustILName p.PropertyName)) - let typL = layoutType denv (p.GetPropertyType(amap,m)) // shouldn't happen + let typL = layoutType denv (p.GetPropertyType(amap, m)) // shouldn't happen let specGetSetL = match p.HasGetter, p.HasSetter with - | false,false | true,false -> emptyL - | false, true -> WordL.keywordWith ^^ WordL.keywordSet - | true, true -> WordL.keywordWith ^^ WordL.keywordGet^^ SepL.comma ^^ WordL.keywordSet + | false, false | true, false -> emptyL + | false, true -> WordL.keywordWith ^^ WordL.keywordSet + | true, true -> WordL.keywordWith ^^ WordL.keywordGet^^ SepL.comma ^^ WordL.keywordSet staticL ^^ WordL.keywordMember ^^ nameL ^^ WordL.colon ^^ typL ^^ specGetSetL /// Another re-implementation of type printing, this time based off provided info objects. - let layoutProvidedTycon (denv:DisplayEnv) (infoReader:InfoReader) ad m start lhsL ty = + let layoutProvidedTycon (denv: DisplayEnv) (infoReader: InfoReader) ad m start lhsL ty = let g = denv.g let tcref = tcrefOfAppTy g ty if isEnumTy g ty then let fieldLs = - infoReader.GetILFieldInfosOfType (None,ad,m,ty) + infoReader.GetILFieldInfosOfType (None, ad, m, ty) |> List.filter (fun x -> x.FieldName <> "value__") |> List.map (fun x -> PrintIL.layoutILEnumDefParts x.FieldName x.LiteralValue) |> aboveListL (lhsL ^^ WordL.equals) @@-- fieldLs else let amap = infoReader.amap - let sortKey (v:MethInfo) = - (not v.IsConstructor, - not v.IsInstance, // instance first - v.DisplayName, // sort by name - List.sum v.NumArgs , // sort by #curried - v.NumArgs.Length) // sort by arity - - let shouldShow (valRef : ValRef option) = + let sortKey (v: MethInfo) = + (not v.IsConstructor, + not v.IsInstance, // instance first + v.DisplayName, // sort by name + List.sum v.NumArgs, // sort by #curried + v.NumArgs.Length) // sort by arity + + let shouldShow (valRef: ValRef option) = match valRef with | None -> true | Some(vr) -> @@ -1559,7 +1557,7 @@ module private TastDefinitionPrinting = |> List.filter (fun v -> shouldShow v.ArbitraryValRef) let meths = - GetImmediateIntrinsicMethInfosOfType (None,ad) g amap m ty + GetImmediateIntrinsicMethInfosOfType (None, ad) g amap m ty |> List.filter (fun v -> shouldShow v.ArbitraryValRef) let iimplsLs = @@ -1569,18 +1567,18 @@ module private TastDefinitionPrinting = GetImmediateInterfacesOfType SkipUnrefInterfaces.Yes g amap m ty |> List.map (fun ity -> wordL (tagKeyword (if isInterfaceTy g ty then "inherit" else "interface")) --- layoutType denv ity) let props = - GetIntrinsicPropInfosOfType infoReader (None,ad,AllowMultiIntfInstantiations.Yes) PreferOverrides m ty + GetIntrinsicPropInfosOfType infoReader (None, ad, AllowMultiIntfInstantiations.Yes) PreferOverrides m ty |> List.filter (fun v -> shouldShow v.ArbitraryValRef) let events = - infoReader.GetEventInfosOfType(None,ad,m,ty) + infoReader.GetEventInfosOfType(None, ad, m, ty) |> List.filter (fun v -> shouldShow v.ArbitraryValRef) let impliedNames = try Set.ofList [ for p in props do if p.HasGetter then yield p.GetterMethod.DisplayName - if p.HasSetter then yield p.SetterMethod.DisplayName + if p.HasSetter then yield p.SetterMethod.DisplayName for e in events do yield e.AddMethod.DisplayName yield e.RemoveMethod.DisplayName ] @@ -1590,28 +1588,28 @@ module private TastDefinitionPrinting = ctors |> shrinkOverloads (InfoMemberPrinting.layoutMethInfoFSharpStyle amap m denv) (fun _ xL -> xL) - let methLs = + let methLs = meths |> List.filter (fun md -> not (impliedNames.Contains md.DisplayName)) |> List.groupBy (fun md -> md.DisplayName) - |> List.collect (fun (_,group) -> shrinkOverloads (InfoMemberPrinting.layoutMethInfoFSharpStyle amap m denv) (fun x xL -> (sortKey x, xL)) group) + |> List.collect (fun (_, group) -> shrinkOverloads (InfoMemberPrinting.layoutMethInfoFSharpStyle amap m denv) (fun x xL -> (sortKey x, xL)) group) let fieldLs = - infoReader.GetILFieldInfosOfType (None,ad,m,ty) - |> List.map (fun x -> (true,x.IsStatic,x.FieldName,0,0),layoutILFieldInfo denv amap m x) + infoReader.GetILFieldInfosOfType (None, ad, m, ty) + |> List.map (fun x -> (true, x.IsStatic, x.FieldName, 0, 0), layoutILFieldInfo denv amap m x) let propLs = props - |> List.map (fun x -> (true,x.IsStatic,x.PropertyName,0,0),layoutPropInfo denv amap m x) + |> List.map (fun x -> (true, x.IsStatic, x.PropertyName, 0, 0), layoutPropInfo denv amap m x) let eventLs = events - |> List.map (fun x -> (true,x.IsStatic,x.EventName,0,0), layoutEventInfo denv amap m x) + |> List.map (fun x -> (true, x.IsStatic, x.EventName, 0, 0), layoutEventInfo denv amap m x) - let membLs = (methLs @ fieldLs @ propLs @ eventLs) |> List.sortBy fst |> List.map snd + let membLs = (methLs @ fieldLs @ propLs @ eventLs) |> List.sortBy fst |> List.map snd - let nestedTypeLs = + let nestedTypeLs = match tcref.TypeReprInfo with | TProvidedTypeExtensionPoint info -> [ @@ -1628,7 +1626,7 @@ module private TastDefinitionPrinting = [] else match GetSuperTypeOfType g amap m ty with - | Some super when not (isObjTy g super) -> [wordL (tagKeyword "inherit") ^^ (layoutType denv super)] + | Some super when not (isObjTy g super) -> [wordL (tagKeyword "inherit") ^^ (layoutType denv super)] | _ -> [] let erasedL = @@ -1647,9 +1645,9 @@ module private TastDefinitionPrinting = (lhsL ^^ WordL.equals) @@-- rhsL #endif - let layoutTycon (denv:DisplayEnv) (infoReader:InfoReader) ad m simplified typewordL (tycon:Tycon) = + let layoutTycon (denv: DisplayEnv) (infoReader: InfoReader) ad m simplified typewordL (tycon: Tycon) = let g = denv.g - let _,ty = generalizeTyconRef (mkLocalTyconRef tycon) + let _, ty = generalizeTyconRef (mkLocalTyconRef tycon) let start, name = let n = tycon.DisplayName if isStructTy g ty then Some "struct", tagStruct n @@ -1672,14 +1670,14 @@ module private TastDefinitionPrinting = #else ignore (infoReader, ad, m) #endif - let memberImplementLs,memberCtorLs,memberInstanceLs,memberStaticLs = + let memberImplementLs, memberCtorLs, memberInstanceLs, memberStaticLs = let adhoc = tycon.MembersOfFSharpTyconSorted |> List.filter (fun v -> not v.IsDispatchSlot) |> List.filter (fun v -> not v.Deref.IsClassConstructor) |> List.filter (fun v -> match v.MemberInfo.Value.ImplementedSlotSigs with - | TSlotSig(_,oty,_,_,_,_) :: _ -> + | TSlotSig(_, oty, _, _, _, _) :: _ -> // Don't print overrides in HTML docs denv.showOverrides && // Don't print individual methods forming interface implementations - these are currently never exported @@ -1688,23 +1686,23 @@ module private TastDefinitionPrinting = |> List.filter (fun v -> denv.showObsoleteMembers || not (CheckFSharpAttributesForObsolete denv.g v.Attribs)) |> List.filter (fun v -> denv.showHiddenMembers || not (CheckFSharpAttributesForHidden denv.g v.Attribs)) // sort - let sortKey (v:ValRef) = (not v.IsConstructor, // constructors before others - v.Id.idText, // sort by name - (if v.IsCompiledAsTopLevel then v.ValReprInfo.Value.NumCurriedArgs else 0), // sort by #curried - (if v.IsCompiledAsTopLevel then v.ValReprInfo.Value.AritiesOfArgs else []) // sort by arity - ) + let sortKey (v: ValRef) = + (not v.IsConstructor, // constructors before others + v.Id.idText, // sort by name + (if v.IsCompiledAsTopLevel then v.ValReprInfo.Value.NumCurriedArgs else 0), // sort by #curried + (if v.IsCompiledAsTopLevel then v.ValReprInfo.Value.AritiesOfArgs else [])) // sort by arity let adhoc = adhoc |> List.sortBy sortKey let iimpls = match tycon.TypeReprInfo with | TFSharpObjectRepr r when (match r.fsobjmodel_kind with TTyconInterface -> true | _ -> false) -> [] | _ -> tycon.ImmediateInterfacesOfFSharpTycon - let iimpls = iimpls |> List.filter (fun (_,compgen,_) -> not compgen) + let iimpls = iimpls |> List.filter (fun (_, compgen, _) -> not compgen) // if TTyconInterface, the iimpls should be printed as inherited interfaces - let iimplsLs = iimpls |> List.map (fun (ty,_,_) -> wordL (tagKeyword "interface") --- layoutType denv ty) - let adhocCtorsLs = adhoc |> List.filter (fun v -> v.IsConstructor) |> List.map (fun vref -> PrintTastMemberOrVals.prettyLayoutOfValOrMemberNoInst denv vref.Deref) - let adhocInstanceLs = adhoc |> List.filter (fun v -> not v.IsConstructor && v.IsInstanceMember) |> List.map (fun vref -> PrintTastMemberOrVals.prettyLayoutOfValOrMemberNoInst denv vref.Deref) - let adhocStaticLs = adhoc |> List.filter (fun v -> not v.IsConstructor && not v.IsInstanceMember) |> List.map (fun vref -> PrintTastMemberOrVals.prettyLayoutOfValOrMemberNoInst denv vref.Deref) - iimplsLs,adhocCtorsLs,adhocInstanceLs,adhocStaticLs + let iimplsLs = iimpls |> List.map (fun (ty, _, _) -> wordL (tagKeyword "interface") --- layoutType denv ty) + let adhocCtorsLs = adhoc |> List.filter (fun v -> v.IsConstructor) |> List.map (fun vref -> PrintTastMemberOrVals.prettyLayoutOfValOrMemberNoInst denv vref.Deref) + let adhocInstanceLs = adhoc |> List.filter (fun v -> not v.IsConstructor && v.IsInstanceMember) |> List.map (fun vref -> PrintTastMemberOrVals.prettyLayoutOfValOrMemberNoInst denv vref.Deref) + let adhocStaticLs = adhoc |> List.filter (fun v -> not v.IsConstructor && not v.IsInstanceMember) |> List.map (fun vref -> PrintTastMemberOrVals.prettyLayoutOfValOrMemberNoInst denv vref.Deref) + iimplsLs, adhocCtorsLs, adhocInstanceLs, adhocStaticLs let memberLs = memberImplementLs @ memberCtorLs @ memberInstanceLs @ memberStaticLs let addMembersAsWithEnd reprL = if isNil memberLs then reprL @@ -1717,13 +1715,13 @@ module private TastDefinitionPrinting = let repr = tycon.TypeReprInfo match repr with | TRecdRepr _ - | TUnionRepr _ + | TUnionRepr _ | TFSharpObjectRepr _ - | TAsmRepr _ + | TAsmRepr _ | TMeasureableRepr _ | TILObjectRepr _ -> - let brk = not (isNil memberLs) || breakTypeDefnEqn repr - let rhsL = + let brk = not (isNil memberLs) || breakTypeDefnEqn repr + let rhsL = let addReprAccessL l = layoutAccessibility denv tycon.TypeReprAccessibility l let denv = denv.AddAccessibility tycon.TypeReprAccessibility match repr with @@ -1734,7 +1732,7 @@ module private TastDefinitionPrinting = | TFSharpObjectRepr r -> match r.fsobjmodel_kind with - | TTyconDelegate (TSlotSig(_,_, _,_,paraml, rty)) -> + | TTyconDelegate (TSlotSig(_, _, _, _, paraml, rty)) -> let rty = GetFSharpViewOfReturnType denv.g rty Some (WordL.keywordDelegate ^^ WordL.keywordOf --- layoutTopType denv SimplifyTypes.typeSimplificationInfo0 (paraml |> List.mapSquared (fun sp -> (sp.Type, ValReprInfo.unnamedTopArg1))) rty []) | _ -> @@ -1753,22 +1751,22 @@ module private TastDefinitionPrinting = | _ -> let inherits = match r.fsobjmodel_kind, tycon.TypeContents.tcaug_super with - | TTyconClass,Some super -> [wordL (tagKeyword "inherit") ^^ (layoutType denv super)] - | TTyconInterface,_ -> + | TTyconClass, Some super -> [wordL (tagKeyword "inherit") ^^ (layoutType denv super)] + | TTyconInterface, _ -> tycon.ImmediateInterfacesOfFSharpTycon - |> List.filter (fun (_,compgen,_) -> not compgen) - |> List.map (fun (ity,_,_) -> wordL (tagKeyword "inherit") ^^ (layoutType denv ity)) + |> List.filter (fun (_, compgen, _) -> not compgen) + |> List.map (fun (ity, _, _) -> wordL (tagKeyword "inherit") ^^ (layoutType denv ity)) | _ -> [] let vsprs = tycon.MembersOfFSharpTyconSorted |> List.filter (fun v -> isNil (Option.get v.MemberInfo).ImplementedSlotSigs) |> List.filter (fun v -> v.IsDispatchSlot) |> List.map (fun vref -> PrintTastMemberOrVals.prettyLayoutOfValOrMemberNoInst denv vref.Deref) - let staticValsLs = + let staticValsLs = tycon.TrueFieldsAsList |> List.filter (fun f -> f.IsStatic) |> List.map (fun f -> WordL.keywordStatic ^^ WordL.keywordVal ^^ layoutRecdField true denv f) - let instanceValsLs = + let instanceValsLs = tycon.TrueFieldsAsList |> List.filter (fun f -> not f.IsStatic) |> List.map (fun f -> WordL.keywordVal ^^ layoutRecdField true denv f) @@ -1780,28 +1778,28 @@ module private TastDefinitionPrinting = let emptyMeasure = match tycon.TypeOrMeasureKind with TyparKind.Measure -> isNil alldecls | _ -> false if emptyMeasure then None else let declsL = aboveListL alldecls - let declsL = match start with Some s -> (wordL s @@-- declsL) @@ wordL (tagKeyword "end") | None -> declsL + let declsL = match start with Some s -> (wordL s @@-- declsL) @@ wordL (tagKeyword "end") | None -> declsL Some declsL - | TUnionRepr _ -> + | TUnionRepr _ -> let layoutUnionCases = tycon.UnionCasesAsList |> layoutUnionCases denv |> applyMaxMembers denv.maxMembers |> aboveListL Some (addMembersAsWithEnd (addReprAccessL layoutUnionCases)) - | TAsmRepr _ -> + | TAsmRepr _ -> Some (wordL (tagText "(# \"\" #)")) - | TMeasureableRepr ty -> + | TMeasureableRepr ty -> Some (layoutType denv ty) | TILObjectRepr _ -> let td = tycon.ILTyconRawMetadata Some (PrintIL.layoutILTypeDef denv td) - | _ -> None + | _ -> None - let brk = match tycon.TypeReprInfo with | TILObjectRepr _ -> true | _ -> brk + let brk = match tycon.TypeReprInfo with | TILObjectRepr _ -> true | _ -> brk match rhsL with - | None -> lhsL + | None -> lhsL | Some rhsL -> if brk then (lhsL ^^ WordL.equals) @@-- rhsL else - (lhsL ^^ WordL.equals) --- rhsL + (lhsL ^^ WordL.equals) --- rhsL | _ -> match tycon.TypeAbbrev with @@ -1812,7 +1810,7 @@ module private TastDefinitionPrinting = layoutAttribs denv ty tycon.TypeOrMeasureKind tycon.Attribs reprL // Layout: exception definition - let layoutExnDefn denv (exnc:Entity) = + let layoutExnDefn denv (exnc: Entity) = let nm = exnc.LogicalName let nmL = wordL (tagClass nm) let nmL = layoutAccessibility denv exnc.TypeReprAccessibility nmL @@ -1820,23 +1818,23 @@ module private TastDefinitionPrinting = let reprL = match exnc.ExceptionInfo with | TExnAbbrevRepr ecref -> WordL.equals --- layoutTyconRef denv ecref - | TExnAsmRepr _ -> WordL.equals --- wordL (tagText "(# ... #)") - | TExnNone -> emptyL - | TExnFresh r -> + | TExnAsmRepr _ -> WordL.equals --- wordL (tagText "(# ... #)") + | TExnNone -> emptyL + | TExnFresh r -> match r.TrueFieldsAsList with - | [] -> emptyL + | [] -> emptyL | r -> WordL.keywordOf --- layoutUnionCaseFields denv false r exnL ^^ reprL // Layout: module spec - let layoutTyconDefns denv infoReader ad m (tycons:Tycon list) = + let layoutTyconDefns denv infoReader ad m (tycons: Tycon list) = match tycons with | [] -> emptyL | [h] when h.IsExceptionDecl -> layoutExnDefn denv h | h :: t -> - let x = layoutTycon denv infoReader ad m false WordL.keywordType h + let x = layoutTycon denv infoReader ad m false WordL.keywordType h let xs = List.map (layoutTycon denv infoReader ad m false (wordL (tagKeyword "and"))) t aboveListL (x::xs) @@ -1851,25 +1849,25 @@ module private InferredSigPrinting = let rec isConcreteNamespace x = match x with - | TMDefRec(_,tycons,mbinds,_) -> - not (isNil tycons) || (mbinds |> List.exists (function ModuleOrNamespaceBinding.Binding _ -> true | ModuleOrNamespaceBinding.Module(x,_) -> not x.IsNamespace)) - | TMDefLet _ -> true - | TMDefDo _ -> true + | TMDefRec(_, tycons, mbinds, _) -> + not (isNil tycons) || (mbinds |> List.exists (function ModuleOrNamespaceBinding.Binding _ -> true | ModuleOrNamespaceBinding.Module(x, _) -> not x.IsNamespace)) + | TMDefLet _ -> true + | TMDefDo _ -> true | TMDefs defs -> defs |> List.exists isConcreteNamespace | TMAbstract(ModuleOrNamespaceExprWithSig(_, def, _)) -> isConcreteNamespace def - let rec imexprLP denv (ModuleOrNamespaceExprWithSig(_, def, _)) = imdefL denv def + let rec imexprLP denv (ModuleOrNamespaceExprWithSig(_, def, _)) = imdefL denv def and imexprL denv (ModuleOrNamespaceExprWithSig(mty, def, m)) = imexprLP denv (ModuleOrNamespaceExprWithSig(mty, def, m)) - and imdefsL denv x = aboveListL (x |> List.map (imdefL denv)) + and imdefsL denv x = aboveListL (x |> List.map (imdefL denv)) - and imdefL denv x = - let filterVal (v:Val) = not v.IsCompilerGenerated && Option.isNone v.MemberInfo - let filterExtMem (v:Val) = v.IsExtensionMember + and imdefL denv x = + let filterVal (v: Val) = not v.IsCompilerGenerated && Option.isNone v.MemberInfo + let filterExtMem (v: Val) = v.IsExtensionMember match x with - | TMDefRec(_,tycons,mbinds,_) -> + | TMDefRec(_, tycons, mbinds, _) -> TastDefinitionPrinting.layoutTyconDefns denv infoReader ad m tycons @@ (mbinds |> List.choose (function ModuleOrNamespaceBinding.Binding bind -> Some bind | _ -> None) @@ -1880,34 +1878,34 @@ module private InferredSigPrinting = (mbinds |> List.choose (function ModuleOrNamespaceBinding.Binding bind -> Some bind | _ -> None) |> valsOfBinds - |> List.filter filterVal - |> List.map (PrintTastMemberOrVals.prettyLayoutOfValOrMemberNoInst denv) + |> List.filter filterVal + |> List.map (PrintTastMemberOrVals.prettyLayoutOfValOrMemberNoInst denv) |> aboveListL) @@ (mbinds - |> List.choose (function ModuleOrNamespaceBinding.Module (mspec,def) -> Some (mspec,def) | _ -> None) + |> List.choose (function ModuleOrNamespaceBinding.Module (mspec, def) -> Some (mspec, def) | _ -> None) |> List.map (imbindL denv) |> aboveListL) - | TMDefLet(bind,_) -> + | TMDefLet(bind, _) -> ([bind.Var] - |> List.filter filterVal + |> List.filter filterVal |> List.map (PrintTastMemberOrVals.prettyLayoutOfValOrMemberNoInst denv) |> aboveListL) | TMDefs defs -> imdefsL denv defs - | TMDefDo _ -> emptyL + | TMDefDo _ -> emptyL | TMAbstract mexpr -> imexprLP denv mexpr - and imbindL denv (mspec, def) = - let nm = mspec.DemangledModuleOrNamespaceName + and imbindL denv (mspec, def) = + let nm = mspec.DemangledModuleOrNamespaceName let innerPath = (fullCompPathOfModuleOrNamespace mspec).AccessPath let outerPath = mspec.CompilationPath.AccessPath let denv = denv.AddOpenPath (List.map fst innerPath) - if mspec.IsNamespace then + if mspec.IsNamespace then let basic = imdefL denv def // Check if this namespace contains anything interesting if isConcreteNamespace def then @@ -1920,11 +1918,11 @@ module private InferredSigPrinting = basic else // This is a module - let nmL = layoutAccessibility denv mspec.Accessibility (wordL (tagModule nm)) - let denv = denv.AddAccessibility mspec.Accessibility + let nmL = layoutAccessibility denv mspec.Accessibility (wordL (tagModule nm)) + let denv = denv.AddAccessibility mspec.Accessibility let basic = imdefL denv def // Check if its an outer module or a nested module - if (outerPath |> List.forall (fun (_,istype) -> istype = Namespace) ) then + if (outerPath |> List.forall (fun (_, istype) -> istype = Namespace) ) then // OK, this is an outer module if showHeader then // OK, we're not in F# Interactive @@ -1934,7 +1932,7 @@ module private InferredSigPrinting = (wordL (tagKeyword "module") ^^ nmL) @@ basic else // Otherwise this is an outer module contained immediately in a namespace - // We already printed the namespace declaration earlier. So just print the + // We already printed the namespace declaration earlier. So just print the // module now. ((wordL (tagKeyword"module") ^^ nmL ^^ WordL.equals ^^ wordL (tagKeyword "begin")) @@-- basic) @@ WordL.keywordEnd else @@ -1955,33 +1953,33 @@ module private PrintData = and private dataExprWrapL denv isAtomic expr = match expr with - | Expr.Const (c,_,ty) -> + | Expr.Const (c, _, ty) -> if isEnumTy denv.g ty then wordL (tagKeyword "enum") ^^ angleL (layoutType denv ty) ^^ bracketL (layoutConst denv.g ty c) else layoutConst denv.g ty c - | Expr.Val (v,_,_) -> wordL (tagLocal v.DisplayName) - | Expr.Link rX -> dataExprWrapL denv isAtomic (!rX) - | Expr.Op (TOp.UnionCase(c),_,args,_) -> + | Expr.Val (v, _, _) -> wordL (tagLocal v.DisplayName) + | Expr.Link rX -> dataExprWrapL denv isAtomic (!rX) + | Expr.Op (TOp.UnionCase(c), _, args, _) -> if denv.g.unionCaseRefEq c denv.g.nil_ucref then wordL (tagPunctuation "[]") elif denv.g.unionCaseRefEq c denv.g.cons_ucref then - let rec strip = function (Expr.Op (TOp.UnionCase _,_,[h;t],_)) -> h::strip t | _ -> [] + let rec strip = function (Expr.Op (TOp.UnionCase _, _, [h;t], _)) -> h::strip t | _ -> [] listL (dataExprL denv) (strip expr) elif isNil args then wordL (tagUnionCase c.CaseName) else (wordL (tagUnionCase c.CaseName) ++ bracketL (commaListL (dataExprsL denv args))) - | Expr.Op (TOp.ExnConstr(c),_,args,_) -> (wordL (tagMethod c.LogicalName) ++ bracketL (commaListL (dataExprsL denv args))) - | Expr.Op (TOp.Tuple _,_,xs,_) -> tupleL (dataExprsL denv xs) - | Expr.Op (TOp.Recd (_,tc),_,xs,_) -> + | Expr.Op (TOp.ExnConstr(c), _, args, _) -> (wordL (tagMethod c.LogicalName) ++ bracketL (commaListL (dataExprsL denv args))) + | Expr.Op (TOp.Tuple _, _, xs, _) -> tupleL (dataExprsL denv xs) + | Expr.Op (TOp.Recd (_, tc), _, xs, _) -> let fields = tc.TrueInstanceFieldsAsList let lay fs x = (wordL (tagRecordField fs.rfield_id.idText) ^^ sepL (tagPunctuation "=")) --- (dataExprL denv x) leftL (tagPunctuation "{") ^^ semiListL (List.map2 lay fields xs) ^^ rightL (tagPunctuation "}") | Expr.Op (TOp.ValFieldGet (RecdFieldRef.RFRef (tcref, name)), _, _, _) -> (layoutTyconRef denv tcref) ^^ sepL (tagPunctuation ".") ^^ wordL (tagField name) - | Expr.Op (TOp.Array,[_],xs,_) -> leftL (tagPunctuation "[|") ^^ semiListL (dataExprsL denv xs) ^^ RightL.rightBracketBar + | Expr.Op (TOp.Array, [_], xs, _) -> leftL (tagPunctuation "[|") ^^ semiListL (dataExprsL denv xs) ^^ RightL.rightBracketBar | _ -> wordL (tagPunctuation "?") and private dataExprsL denv xs = List.map (dataExprL denv) xs @@ -1992,20 +1990,20 @@ let dataExprL denv expr = PrintData.dataExprL denv expr //-------------------------------------------------------------------------- -let outputValOrMember denv os x = x |> PrintTastMemberOrVals.prettyLayoutOfValOrMemberNoInst denv |> bufferL os -let stringValOrMember denv x = x |> PrintTastMemberOrVals.prettyLayoutOfValOrMemberNoInst denv |> showL +let outputValOrMember denv os x = x |> PrintTastMemberOrVals.prettyLayoutOfValOrMemberNoInst denv |> bufferL os +let stringValOrMember denv x = x |> PrintTastMemberOrVals.prettyLayoutOfValOrMemberNoInst denv |> showL /// Print members with a qualification showing the type they are contained in let layoutQualifiedValOrMember denv typarInst v = PrintTastMemberOrVals.prettyLayoutOfValOrMember { denv with showMemberContainers=true; } typarInst v let outputQualifiedValOrMember denv os v = outputValOrMember { denv with showMemberContainers=true; } os v let outputQualifiedValSpec denv os v = outputQualifiedValOrMember denv os v let stringOfQualifiedValOrMember denv v = PrintTastMemberOrVals.prettyLayoutOfValOrMemberNoInst { denv with showMemberContainers=true; } v |> showL - + /// Convert a MethInfo to a string let formatMethInfoToBufferFreeStyle amap m denv buf d = InfoMemberPrinting.formatMethInfoToBufferFreeStyle amap m denv buf d let prettyLayoutOfMethInfoFreeStyle amap m denv typarInst minfo = InfoMemberPrinting.prettyLayoutOfMethInfoFreeStyle amap m denv typarInst minfo /// Convert a PropInfo to a string -let prettyLayoutOfPropInfoFreeStyle g amap m denv d = InfoMemberPrinting.prettyLayoutOfPropInfoFreeStyle g amap m denv d +let prettyLayoutOfPropInfoFreeStyle g amap m denv d = InfoMemberPrinting.prettyLayoutOfPropInfoFreeStyle g amap m denv d /// Convert a MethInfo to a string let stringOfMethInfo amap m denv d = bufs (fun buf -> InfoMemberPrinting.formatMethInfoToBufferFreeStyle amap m denv buf d) @@ -2013,34 +2011,34 @@ let stringOfMethInfo amap m denv d = bufs (fun buf -> InfoMemberPrinting.formatM /// Convert a ParamData to a string let stringOfParamData denv paramData = bufs (fun buf -> InfoMemberPrinting.formatParamDataToBuffer denv buf paramData) let layoutOfParamData denv paramData = InfoMemberPrinting.layoutParamData denv paramData -let outputILTypeRef denv os x = x |> PrintIL.layoutILTypeRef denv |> bufferL os -let layoutILTypeRef denv x = x |> PrintIL.layoutILTypeRef denv -let outputExnDef denv os x = x |> TastDefinitionPrinting.layoutExnDefn denv |> bufferL os -let layoutExnDef denv x = x |> TastDefinitionPrinting.layoutExnDefn denv -let stringOfTyparConstraints denv x = x |> PrintTypes.layoutConstraintsWithInfo denv SimplifyTypes.typeSimplificationInfo0 |> showL -let outputTycon denv infoReader ad m (* width *) os x = TastDefinitionPrinting.layoutTycon denv infoReader ad m true WordL.keywordType x (* |> Layout.squashTo width *) |> bufferL os -let layoutTycon denv infoReader ad m (* width *) x = TastDefinitionPrinting.layoutTycon denv infoReader ad m true WordL.keywordType x (* |> Layout.squashTo width *) -let layoutUnionCases denv x = x |> TastDefinitionPrinting.layoutUnionCaseFields denv true -let outputUnionCases denv os x = x |> TastDefinitionPrinting.layoutUnionCaseFields denv true |> bufferL os +let outputILTypeRef denv os x = x |> PrintIL.layoutILTypeRef denv |> bufferL os +let layoutILTypeRef denv x = x |> PrintIL.layoutILTypeRef denv +let outputExnDef denv os x = x |> TastDefinitionPrinting.layoutExnDefn denv |> bufferL os +let layoutExnDef denv x = x |> TastDefinitionPrinting.layoutExnDefn denv +let stringOfTyparConstraints denv x = x |> PrintTypes.layoutConstraintsWithInfo denv SimplifyTypes.typeSimplificationInfo0 |> showL +let outputTycon denv infoReader ad m (* width *) os x = TastDefinitionPrinting.layoutTycon denv infoReader ad m true WordL.keywordType x (* |> Layout.squashTo width *) |> bufferL os +let layoutTycon denv infoReader ad m (* width *) x = TastDefinitionPrinting.layoutTycon denv infoReader ad m true WordL.keywordType x (* |> Layout.squashTo width *) +let layoutUnionCases denv x = x |> TastDefinitionPrinting.layoutUnionCaseFields denv true +let outputUnionCases denv os x = x |> TastDefinitionPrinting.layoutUnionCaseFields denv true |> bufferL os /// Pass negative number as pos in case of single cased discriminated unions -let isGeneratedUnionCaseField pos f = TastDefinitionPrinting.isGeneratedUnionCaseField pos f -let isGeneratedExceptionField pos f = TastDefinitionPrinting.isGeneratedExceptionField pos f -let stringOfTyparConstraint denv tpc = stringOfTyparConstraints denv [tpc] -let stringOfTy denv x = x |> PrintTypes.layoutType denv |> showL -let prettyLayoutOfType denv x = x |> PrintTypes.prettyLayoutOfType denv -let prettyLayoutOfTypeNoCx denv x = x |> PrintTypes.prettyLayoutOfTypeNoConstraints denv -let prettyStringOfTy denv x = x |> PrintTypes.prettyLayoutOfType denv |> showL -let prettyStringOfTyNoCx denv x = x |> PrintTypes.prettyLayoutOfTypeNoConstraints denv |> showL -let stringOfRecdField denv x = x |> TastDefinitionPrinting.layoutRecdField false denv |> showL -let stringOfUnionCase denv x = x |> TastDefinitionPrinting.layoutUnionCase denv (WordL.bar) |> showL -let stringOfExnDef denv x = x |> TastDefinitionPrinting.layoutExnDefn denv |> showL - -let stringOfFSAttrib denv x = x |> PrintTypes.layoutAttrib denv |> squareAngleL |> showL -let stringOfILAttrib denv x = x |> PrintTypes.layoutILAttrib denv |> squareAngleL |> showL +let isGeneratedUnionCaseField pos f = TastDefinitionPrinting.isGeneratedUnionCaseField pos f +let isGeneratedExceptionField pos f = TastDefinitionPrinting.isGeneratedExceptionField pos f +let stringOfTyparConstraint denv tpc = stringOfTyparConstraints denv [tpc] +let stringOfTy denv x = x |> PrintTypes.layoutType denv |> showL +let prettyLayoutOfType denv x = x |> PrintTypes.prettyLayoutOfType denv +let prettyLayoutOfTypeNoCx denv x = x |> PrintTypes.prettyLayoutOfTypeNoConstraints denv +let prettyStringOfTy denv x = x |> PrintTypes.prettyLayoutOfType denv |> showL +let prettyStringOfTyNoCx denv x = x |> PrintTypes.prettyLayoutOfTypeNoConstraints denv |> showL +let stringOfRecdField denv x = x |> TastDefinitionPrinting.layoutRecdField false denv |> showL +let stringOfUnionCase denv x = x |> TastDefinitionPrinting.layoutUnionCase denv WordL.bar |> showL +let stringOfExnDef denv x = x |> TastDefinitionPrinting.layoutExnDefn denv |> showL + +let stringOfFSAttrib denv x = x |> PrintTypes.layoutAttrib denv |> squareAngleL |> showL +let stringOfILAttrib denv x = x |> PrintTypes.layoutILAttrib denv |> squareAngleL |> showL let layoutInferredSigOfModuleExpr showHeader denv infoReader ad m expr = InferredSigPrinting.layoutInferredSigOfModuleExpr showHeader denv infoReader ad m expr -let prettyLayoutOfValOrMember denv typarInst v = PrintTastMemberOrVals.prettyLayoutOfValOrMember denv typarInst v -let prettyLayoutOfValOrMemberNoInst denv v = PrintTastMemberOrVals.prettyLayoutOfValOrMemberNoInst denv v +let prettyLayoutOfValOrMember denv typarInst v = PrintTastMemberOrVals.prettyLayoutOfValOrMember denv typarInst v +let prettyLayoutOfValOrMemberNoInst denv v = PrintTastMemberOrVals.prettyLayoutOfValOrMemberNoInst denv v let prettyLayoutOfInstAndSig denv x = PrintTypes.prettyLayoutOfInstAndSig denv x /// Generate text for comparing two types. @@ -2048,22 +2046,22 @@ let prettyLayoutOfInstAndSig denv x = PrintTypes.prettyLayoutOfInstAndSig denv x /// If the output text is different without showing constraints and/or imperative type variable /// annotations and/or fully qualifying paths then don't show them! let minimalStringsOfTwoTypes denv t1 t2= - let (t1,t2),tpcs = PrettyTypes.PrettifyTypePair denv.g (t1,t2) + let (t1, t2), tpcs = PrettyTypes.PrettifyTypePair denv.g (t1, t2) // try denv + no type annotations let attempt1 = - let denv = { denv with showImperativeTyparAnnotations=false; showConstraintTyparAnnotations=false } + let denv = { denv with showImperativeTyparAnnotations=false; showConstraintTyparAnnotations=false } let min1 = stringOfTy denv t1 let min2 = stringOfTy denv t2 - if min1 <> min2 then Some (min1,min2,"") else None + if min1 <> min2 then Some (min1, min2, "") else None match attempt1 with | Some res -> res | None -> // try denv + no type annotations + show full paths let attempt2 = - let denv = { denv with showImperativeTyparAnnotations=false; showConstraintTyparAnnotations=false }.SetOpenPaths [] + let denv = { denv with showImperativeTyparAnnotations=false; showConstraintTyparAnnotations=false }.SetOpenPaths [] let min1 = stringOfTy denv t1 let min2 = stringOfTy denv t2 - if min1 <> min2 then Some (min1,min2,"") else None + if min1 <> min2 then Some (min1, min2, "") else None // try denv match attempt2 with | Some res -> res @@ -2071,7 +2069,7 @@ let minimalStringsOfTwoTypes denv t1 t2= let attempt3 = let min1 = stringOfTy denv t1 let min2 = stringOfTy denv t2 - if min1 <> min2 then Some (min1,min2,stringOfTyparConstraints denv tpcs) else None + if min1 <> min2 then Some (min1, min2, stringOfTyparConstraints denv tpcs) else None match attempt3 with | Some res -> res | None -> @@ -2081,7 +2079,7 @@ let minimalStringsOfTwoTypes denv t1 t2= let denv = { denv with includeStaticParametersInTypeNames=true } let min1 = stringOfTy denv t1 let min2 = stringOfTy denv t2 - if min1 <> min2 then Some (min1,min2,stringOfTyparConstraints denv tpcs) else None + if min1 <> min2 then Some (min1, min2, stringOfTyparConstraints denv tpcs) else None match attempt4 with | Some res -> res | None -> @@ -2093,25 +2091,25 @@ let minimalStringsOfTwoTypes denv t1 t2= let assemblyName = PrintTypes.layoutAssemblyName denv t |> function | null | "" -> "" | name -> sprintf " (%s)" name sprintf "%s%s" (stringOfTy denv t1) assemblyName - (makeName t1,makeName t2,stringOfTyparConstraints denv tpcs) + (makeName t1, makeName t2, stringOfTyparConstraints denv tpcs) // Note: Always show imperative annotations when comparing value signatures let minimalStringsOfTwoValues denv v1 v2= - let denvMin = { denv with showImperativeTyparAnnotations=true; showConstraintTyparAnnotations=false } + let denvMin = { denv with showImperativeTyparAnnotations=true; showConstraintTyparAnnotations=false } let min1 = bufs (fun buf -> outputQualifiedValOrMember denvMin buf v1) let min2 = bufs (fun buf -> outputQualifiedValOrMember denvMin buf v2) if min1 <> min2 then - (min1,min2) + (min1, min2) else - let denvMax = { denv with showImperativeTyparAnnotations=true; showConstraintTyparAnnotations=true } + let denvMax = { denv with showImperativeTyparAnnotations=true; showConstraintTyparAnnotations=true } let max1 = bufs (fun buf -> outputQualifiedValOrMember denvMax buf v1) let max2 = bufs (fun buf -> outputQualifiedValOrMember denvMax buf v2) - max1,max2 + max1, max2 let minimalStringOfType denv ty = let ty, _cxs = PrettyTypes.PrettifyType denv.g ty - let denvMin = { denv with showImperativeTyparAnnotations=false; showConstraintTyparAnnotations=false } + let denvMin = { denv with showImperativeTyparAnnotations=false; showConstraintTyparAnnotations=false } showL (PrintTypes.layoutTypeWithInfoAndPrec denvMin SimplifyTypes.typeSimplificationInfo0 2 ty) @@ -2123,7 +2121,7 @@ type DeclSpec = | DModul of ModuleOrNamespace let rangeOfDeclSpec = function - | DVal v -> v.Range + | DVal v -> v.Range | DTycon t -> t.Range | DException t -> t.Range | DModul m -> m.Range @@ -2131,41 +2129,41 @@ let rangeOfDeclSpec = function /// modul - provides (valspec)* - and also types, exns and submodules. /// Each defines a decl block on a given range. /// Can sort on the ranges to recover the original declaration order. -let rec moduleOrNamespaceTypeLP (topLevel : bool) (denv: DisplayEnv) (mtype : ModuleOrNamespaceType) = +let rec moduleOrNamespaceTypeLP (topLevel: bool) (denv: DisplayEnv) (mtype: ModuleOrNamespaceType) = // REVIEW: consider a better way to keep decls in order. - let declSpecs : DeclSpec list = + let declSpecs: DeclSpec list = List.concat - [mtype.AllValsAndMembers |> Seq.toList |> List.filter (fun v -> not v.IsCompilerGenerated && v.MemberInfo.IsNone) |> List.map DVal; - mtype.TypeDefinitions |> List.map DTycon; - mtype.ExceptionDefinitions |> List.map DException; - mtype.ModuleAndNamespaceDefinitions |> List.map DModul; + [ mtype.AllValsAndMembers |> Seq.toList |> List.filter (fun v -> not v.IsCompilerGenerated && v.MemberInfo.IsNone) |> List.map DVal + mtype.TypeDefinitions |> List.map DTycon + mtype.ExceptionDefinitions |> List.map DException + mtype.ModuleAndNamespaceDefinitions |> List.map DModul ] let declSpecs = List.sortWithOrder (Order.orderOn rangeOfDeclSpec rangeOrder) declSpecs let declSpecL = function // only show namespaces / modules at the top level; this is because we've no global namespace - | DVal vspec when not topLevel -> prettyLayoutOfValOrMember denv vspec - | DTycon tycon when not topLevel -> tyconL denv (wordL "type") tycon - | DException tycon when not topLevel -> layoutExnDefn denv tycon - | DModul mspec -> moduleOrNamespaceLP false denv mspec - | _ -> emptyL // this catches non-namespace / modules at the top-level + | DVal vspec when not topLevel -> prettyLayoutOfValOrMember denv vspec + | DTycon tycon when not topLevel -> tyconL denv (wordL "type") tycon + | DException tycon when not topLevel -> layoutExnDefn denv tycon + | DModul mspec -> moduleOrNamespaceLP false denv mspec + | _ -> emptyL // this catches non-namespace / modules at the top-level aboveListL (List.map declSpecL declSpecs) and moduleOrNamespaceLP (topLevel: bool) (denv: DisplayEnv) (mspec: ModuleOrNamespace) = let istype = mspec.ModuleOrNamespaceType.ModuleOrNamespaceKind - let nm = mspec.DemangledModuleOrNamespaceName - let denv = denv.AddOpenModuleOrNamespace (mkLocalModRef mspec) - let nmL = layoutAccessibility denv mspec.Accessibility (wordL nm) - let denv = denv.AddAccessibility mspec.Accessibility - let path = path.Add nm // tack on the current module to be used in calls to linearise all subterms - let body = moduleOrNamespaceTypeLP topLevel denv path mspec.ModuleOrNamespaceType + let nm = mspec.DemangledModuleOrNamespaceName + let denv = denv.AddOpenModuleOrNamespace (mkLocalModRef mspec) + let nmL = layoutAccessibility denv mspec.Accessibility (wordL nm) + let denv = denv.AddAccessibility mspec.Accessibility + let path = path.Add nm // tack on the current module to be used in calls to linearise all subterms + let body = moduleOrNamespaceTypeLP topLevel denv path mspec.ModuleOrNamespaceType if istype = Namespace then (wordL "namespace" ^^ nmL) @@-- body else (wordL "module" ^^ nmL ^^ wordL "= begin") @@-- body @@ wordL "end" -let moduleOrNamespaceTypeL (denv: DisplayEnv) (mtype : ModuleOrNamespaceType) = moduleOrNamespaceTypeLP false denv Path.Empty mtype +let moduleOrNamespaceTypeL (denv: DisplayEnv) (mtype: ModuleOrNamespaceType) = moduleOrNamespaceTypeLP false denv Path.Empty mtype let moduleOrNamespaceL denv mspec = moduleOrNamespaceLP false denv Path.Empty mspec -let assemblyL denv (mspec : ModuleOrNamespace) = moduleOrNamespaceTypeLP true denv Path.Empty mspec.ModuleOrNamespaceType // we seem to get the *assembly* name as an outer module, this strips this off +let assemblyL denv (mspec: ModuleOrNamespace) = moduleOrNamespaceTypeLP true denv Path.Empty mspec.ModuleOrNamespaceType // we seem to get the *assembly* name as an outer module, this strips this off #endif diff --git a/src/fcs-fable/src/fsharp/Optimizer.fs b/src/fcs-fable/src/fsharp/Optimizer.fs index b11d015242..6b9b2c1097 100755 --- a/src/fcs-fable/src/fsharp/Optimizer.fs +++ b/src/fcs-fable/src/fsharp/Optimizer.fs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. //------------------------------------------------------------------------- // The F# expression simplifier. The main aim is to inline simple, known functions @@ -35,7 +35,7 @@ open System.Collections.Generic #if DEBUG let verboseOptimizationInfo = - try not (System.String.IsNullOrEmpty (System.Environment.GetEnvironmentVariable "FSHARP_verboseOptimizationInfo")) with _ -> false + try not (System.String.IsNullOrEmpty (System.Environment.GetEnvironmentVariable "FSHARP_verboseOptimizationInfo")) with _ -> false let verboseOptimizations = try not (System.String.IsNullOrEmpty (System.Environment.GetEnvironmentVariable "FSHARP_verboseOptimizations")) with _ -> false #else @@ -43,64 +43,74 @@ let [] verboseOptimizationInfo = false let [] verboseOptimizations = false #endif -let i_ldlen = [ I_ldlen; (AI_conv DT_I4) ] +let i_ldlen = [ I_ldlen; (AI_conv DT_I4) ] -let [] callSize = 1 // size of a function call -let [] forAndWhileLoopSize = 5 // size of a for/while loop -let [] tryCatchSize = 5 // size of a try/catch -let [] tryFinallySize = 5 // size of a try/finally -let [] closureTotalSize = 10 // Total cost of a closure. Each closure adds a class definition -let [] methodDefnTotalSize = 1 // Total cost of a method definition +/// size of a function call +let [] callSize = 1 -//------------------------------------------------------------------------- -// Partial information about an expression. -// -// We store one of these for each value in the environment, including values -// which we know little or nothing about. -//------------------------------------------------------------------------- +/// size of a for/while loop +let [] forAndWhileLoopSize = 5 + +/// size of a try/catch +let [] tryCatchSize = 5 + +/// size of a try/finally +let [] tryFinallySize = 5 + +/// Total cost of a closure. Each closure adds a class definition +let [] closureTotalSize = 10 + +/// Total cost of a method definition +let [] methodDefnTotalSize = 1 type TypeValueInfo = | UnknownTypeValue +/// Partial information about an expression. +/// +/// We store one of these for each value in the environment, including values +/// which we know little or nothing about. type ExprValueInfo = | UnknownValue /// SizeValue(size, value) /// /// Records size info (maxDepth) for an ExprValueInfo - | SizeValue of int * ExprValueInfo + | SizeValue of int * ExprValueInfo /// ValValue(vref, value) /// /// Records that a value is equal to another value, along with additional /// information. - | ValValue of ValRef * ExprValueInfo + | ValValue of ValRef * ExprValueInfo - | TupleValue of ExprValueInfo[] + | TupleValue of ExprValueInfo[] /// RecdValue(tycon, values) /// /// INVARIANT: values are in field definition order . - | RecdValue of TyconRef * ExprValueInfo[] + | RecdValue of TyconRef * ExprValueInfo[] | UnionCaseValue of UnionCaseRef * ExprValueInfo[] | ConstValue of Const * TType - /// CurriedLambdaValue(id, arity, sz, expr, ty) + /// CurriedLambdaValue(id, arity, size, lambdaExpression, ty) /// /// arities: The number of bunches of untupled args and type args, and /// the number of args in each bunch. NOTE: This include type arguments. /// expr: The value, a lambda term. /// ty: The type of lamba term - | CurriedLambdaValue of Unique * int * int * Expr * TType + | CurriedLambdaValue of Unique * int * int * Expr * TType /// ConstExprValue(size, value) | ConstExprValue of int * Expr type ValInfo = { ValMakesNoCriticalTailcalls: bool - ValExprInfo: ExprValueInfo } + + ValExprInfo: ExprValueInfo + } //------------------------------------------------------------------------- // Partial information about entire namespace fragments or modules @@ -117,13 +127,12 @@ type ValInfo = // It doesn't yet feel like we've got this data structure as good as it could be //------------------------------------------------------------------------- - /// Table of the values contained in one module type ValInfos(entries) = let valInfoTable = lazy (let t = ValHash.Create () - for (vref:ValRef, x) in entries do + for (vref: ValRef, x) in entries do t.Add (vref.Deref, (vref, x)) t) @@ -139,58 +148,68 @@ type ValInfos(entries) = dict) member x.Entries = valInfoTable.Force().Values + member x.Map f = ValInfos(Seq.map f x.Entries) + member x.Filter f = ValInfos(Seq.filter f x.Entries) - member x.TryFind (v:ValRef) = valInfoTable.Force().TryFind v.Deref - member x.TryFindForFslib (v:ValRef) = valInfosForFslib.Force().TryGetValue(v.Deref.GetLinkagePartialKey()) + + member x.TryFind (v: ValRef) = valInfoTable.Force().TryFind v.Deref + + member x.TryFindForFslib (v: ValRef) = valInfosForFslib.Force().TryGetValue(v.Deref.GetLinkagePartialKey()) type ModuleInfo = { ValInfos: ValInfos ModuleOrNamespaceInfos: NameMap } and LazyModuleInfo = Lazy + type ImplFileOptimizationInfo = LazyModuleInfo + type CcuOptimizationInfo = LazyModuleInfo #if DEBUG let braceL x = leftL (tagText "{") ^^ x ^^ rightL (tagText "}") -let seqL xL xs = Seq.fold (fun z x -> z @@ xL x) emptyL xs -let namemapL xL xmap = NameMap.foldBack (fun nm x z -> xL nm x @@ z) xmap emptyL +let seqL xL xs = Seq.fold (fun z x -> z @@ xL x) emptyL xs +let namemapL xL xmap = NameMap.foldBack (fun nm x z -> xL nm x @@ z) xmap emptyL let rec exprValueInfoL g exprVal = match exprVal with - | ConstValue (x, ty) -> NicePrint.layoutConst g ty x - | UnknownValue -> wordL (tagText "?") - | SizeValue (_, vinfo) -> exprValueInfoL g vinfo - | ValValue (vr, vinfo) -> bracketL ((valRefL vr ^^ wordL (tagText "alias")) --- exprValueInfoL g vinfo) - | TupleValue vinfos -> bracketL (exprValueInfosL g vinfos) - | RecdValue (_, vinfos) -> braceL (exprValueInfosL g vinfos) + | ConstValue (x, ty) -> NicePrint.layoutConst g ty x + | UnknownValue -> wordL (tagText "?") + | SizeValue (_, vinfo) -> exprValueInfoL g vinfo + | ValValue (vr, vinfo) -> bracketL ((valRefL vr ^^ wordL (tagText "alias")) --- exprValueInfoL g vinfo) + | TupleValue vinfos -> bracketL (exprValueInfosL g vinfos) + | RecdValue (_, vinfos) -> braceL (exprValueInfosL g vinfos) | UnionCaseValue (ucr, vinfos) -> unionCaseRefL ucr ^^ bracketL (exprValueInfosL g vinfos) - | CurriedLambdaValue(_lambdaId, _arities, _bsize, expr', _ety) -> wordL (tagText "lam") ++ exprL expr' (* (sprintf "lam(size=%d)" bsize) *) - | ConstExprValue (_size, x) -> exprL x + | CurriedLambdaValue(_lambdaId, _arities, _bsize, expr, _ety) -> wordL (tagText "lam") ++ exprL expr (* (sprintf "lam(size=%d)" bsize) *) + | ConstExprValue (_size, x) -> exprL x and exprValueInfosL g vinfos = commaListL (List.map (exprValueInfoL g) (Array.toList vinfos)) -and moduleInfoL g (x:LazyModuleInfo) = +and moduleInfoL g (x: LazyModuleInfo) = let x = x.Force() braceL ((wordL (tagText "Modules: ") @@ (x.ModuleOrNamespaceInfos |> namemapL (fun nm x -> wordL (tagText nm) ^^ moduleInfoL g x) ) ) @@ (wordL (tagText "Values:") @@ (x.ValInfos.Entries |> seqL (fun (vref, x) -> valRefL vref ^^ valInfoL g x) ))) -and valInfoL g (x:ValInfo) = +and valInfoL g (x: ValInfo) = braceL ((wordL (tagText "ValExprInfo: ") @@ exprValueInfoL g x.ValExprInfo) @@ (wordL (tagText "ValMakesNoCriticalTailcalls:") @@ wordL (tagText (if x.ValMakesNoCriticalTailcalls then "true" else "false")))) #endif type Summary<'Info> = { Info: 'Info + /// What's the contribution to the size of this function? FunctionSize: int + /// What's the total contribution to the size of the assembly, including closure classes etc.? TotalSize: int + /// Meaning: could mutate, could non-terminate, could raise exception /// One use: an effect expr can not be eliminated as dead code (e.g. sequencing) /// One use: an effect=false expr can not throw an exception? so try-catch is removed. HasEffect: bool + /// Indicates that a function may make a useful tailcall, hence when called should itself be tailcalled MightMakeCriticalTailcall: bool } @@ -205,17 +224,17 @@ let rec SizeOfValueInfos (arr:_[]) = and SizeOfValueInfo x = match x with - | SizeValue (vdepth, _v) -> vdepth (* terminate recursion at CACHED size nodes *) - | ConstValue (_x, _) -> 1 - | UnknownValue -> 1 - | ValValue (_vr, vinfo) -> SizeOfValueInfo vinfo + 1 + | SizeValue (vdepth, _v) -> vdepth // terminate recursion at CACHED size nodes + | ConstValue (_x, _) -> 1 + | UnknownValue -> 1 + | ValValue (_vr, vinfo) -> SizeOfValueInfo vinfo + 1 | TupleValue vinfos | RecdValue (_, vinfos) | UnionCaseValue (_, vinfos) -> 1 + SizeOfValueInfos vinfos - | CurriedLambdaValue(_lambdaId, _arities, _bsize, _expr', _ety) -> 1 + | CurriedLambdaValue(_lambdaId, _arities, _bsize, _expr, _ety) -> 1 | ConstExprValue (_size, _) -> 1 -let [] minDepthForASizeNode = 5 (* for small vinfos do not record size info, save space *) +let [] minDepthForASizeNode = 5 // for small vinfos do not record size info, save space let rec MakeValueInfoWithCachedSize vdepth v = match v with @@ -233,15 +252,15 @@ let BoundValueInfoBySize vinfo = else match x with | SizeValue (vdepth, vinfo) -> if vdepth < depth then x else MakeSizedValueInfo (bound depth vinfo) - | ValValue (vr, vinfo) -> ValValue (vr, bound (depth-1) vinfo) + | ValValue (vr, vinfo) -> ValValue (vr, bound (depth-1) vinfo) | TupleValue vinfos -> TupleValue (Array.map (bound (depth-1)) vinfos) - | RecdValue (tcref, vinfos) -> RecdValue (tcref, Array.map (bound (depth-1)) vinfos) + | RecdValue (tcref, vinfos) -> RecdValue (tcref, Array.map (bound (depth-1)) vinfos) | UnionCaseValue (ucr, vinfos) -> UnionCaseValue (ucr, Array.map (bound (depth-1)) vinfos) - | ConstValue _ -> x - | UnknownValue -> x - | CurriedLambdaValue(_lambdaId, _arities, _bsize, _expr', _ety) -> x + | ConstValue _ -> x + | UnknownValue -> x + | CurriedLambdaValue(_lambdaId, _arities, _bsize, _expr, _ety) -> x | ConstExprValue (_size, _) -> x - let maxDepth = 6 (* beware huge constants! *) + let maxDepth = 6 (* beware huge constants! *) let trimDepth = 3 let vdepth = SizeOfValueInfo vinfo if vdepth > maxDepth @@ -249,41 +268,52 @@ let BoundValueInfoBySize vinfo = else MakeValueInfoWithCachedSize vdepth vinfo //------------------------------------------------------------------------- -// What we know about the world +// Settings and optimizations //------------------------------------------------------------------------- let [] jitOptDefault = true + let [] localOptDefault = true + let [] crossModuleOptDefault = true type OptimizationSettings = { abstractBigTargets : bool + jitOptUser : bool option + localOptUser : bool option + crossModuleOptUser : bool option + /// size after which we start chopping methods in two, though only at match targets bigTargetSize : int + /// size after which we start enforcing splitting sub-expressions to new methods, to avoid hitting .NET IL limitations veryBigExprSize : int + /// The size after which we don't inline lambdaInlineThreshold : int + /// For unit testing reportingPhase : bool + reportNoNeedToTailcall: bool + reportFunctionSizes : bool + reportHasEffect : bool - reportTotalSizes : bool } + + reportTotalSizes : bool + } static member Defaults = { abstractBigTargets = false jitOptUser = None localOptUser = None - /// size after which we start chopping methods in two, though only at match targets bigTargetSize = 100 - /// size after which we start enforcing splitting sub-expressions to new methods, to avoid hitting .NET IL limitations veryBigExprSize = 3000 crossModuleOptUser = None - /// The size after which we don't inline lambdaInlineThreshold = 6 reportingPhase = false reportNoNeedToTailcall = false @@ -293,58 +323,85 @@ type OptimizationSettings = } member x.jitOpt() = match x.jitOptUser with Some f -> f | None -> jitOptDefault + member x.localOpt () = match x.localOptUser with Some f -> f | None -> localOptDefault + member x.crossModuleOpt () = x.localOpt () && (match x.crossModuleOptUser with Some f -> f | None -> crossModuleOptDefault) member x.KeepOptimizationValues() = x.crossModuleOpt () - /// inline calls * + + /// inline calls? member x.InlineLambdas () = x.localOpt () + /// eliminate unused bindings with no effect member x.EliminateUnusedBindings () = x.localOpt () + /// eliminate try around expr with no effect member x.EliminateTryCatchAndTryFinally () = false // deemed too risky, given tiny overhead of including try/catch. See https://github.com/Microsoft/visualfsharp/pull/376 + /// eliminate first part of seq if no effect member x.EliminateSequential () = x.localOpt () + /// determine branches in pattern matching member x.EliminateSwitch () = x.localOpt () + member x.EliminateRecdFieldGet () = x.localOpt () + member x.EliminateTupleFieldGet () = x.localOpt () + member x.EliminatUnionCaseFieldGet () = x.localOpt () + /// eliminate non-compiler generated immediate bindings member x.EliminateImmediatelyConsumedLocals() = x.localOpt () + /// expand "let x = (exp1, exp2, ...)" bind fields as prior tmps member x.ExpandStructrualValues() = x.localOpt () type cenv = { g: TcGlobals + TcVal : ConstraintSolver.TcValF + amap: Import.ImportMap + optimizing: bool + scope: CcuThunk + localInternalVals: System.Collections.Generic.Dictionary + settings: OptimizationSettings + emitTailcalls: bool - // cache methods with SecurityAttribute applied to them, to prevent unnecessary calls to ExistsInEntireHierarchyOfType - casApplied : Dictionary} - - + + /// cache methods with SecurityAttribute applied to them, to prevent unnecessary calls to ExistsInEntireHierarchyOfType + casApplied : Dictionary + } type IncrementalOptimizationEnv = - { // An identifier to help with name generation + { /// An identifier to help with name generation latestBoundId: Ident option - // The set of lambda IDs we've inlined to reach this point. Helps to prevent recursive inlining + + /// The set of lambda IDs we've inlined to reach this point. Helps to prevent recursive inlining dontInline: Zset - // Recursively bound vars. If an sub-expression that is a candidate for method splitting - // contains any of these variables then don't split it, for fear of mucking up tailcalls. - // See FSharp 1.0 bug 2892 + + /// Recursively bound vars. If an sub-expression that is a candidate for method splitting + /// contains any of these variables then don't split it, for fear of mucking up tailcalls. + /// See FSharp 1.0 bug 2892 dontSplitVars: ValMap - // Disable method splitting in loops + + /// Disable method splitting in loops inLoop: bool + /// The Val for the function binding being generated, if any. functionVal: (Val * Tast.ValReprInfo) option + typarInfos: (Typar * TypeValueInfo) list + localExternalVals: LayeredMap - globalModuleInfos: LayeredMap } + + globalModuleInfos: LayeredMap + } static member Empty = { latestBoundId = None @@ -360,7 +417,8 @@ type IncrementalOptimizationEnv = // IsPartialExprVal - is the expr fully known? //------------------------------------------------------------------------- -let rec IsPartialExprVal x = (* IsPartialExprVal can not rebuild to an expr *) +/// IsPartialExprVal indicates the cases where we cant rebuild an expression +let rec IsPartialExprVal x = match x with | UnknownValue -> true | TupleValue args | RecdValue (_, args) | UnionCaseValue (_, args) -> Array.exists IsPartialExprVal args @@ -368,12 +426,12 @@ let rec IsPartialExprVal x = (* IsPartialExprVal can not rebuild to an expr *) | ValValue (_, a) | SizeValue(_, a) -> IsPartialExprVal a -let CheckInlineValueIsComplete (v:Val) res = +let CheckInlineValueIsComplete (v: Val) res = if v.MustInline && IsPartialExprVal res then errorR(Error(FSComp.SR.optValueMarkedInlineButIncomplete(v.DisplayName), v.Range)) //System.Diagnostics.Debug.Assert(false, sprintf "Break for incomplete inline value %s" v.DisplayName) -let check (vref: ValRef) (res:ValInfo) = +let check (vref: ValRef) (res: ValInfo) = CheckInlineValueIsComplete vref.Deref res.ValExprInfo (vref, res) @@ -381,12 +439,18 @@ let check (vref: ValRef) (res:ValInfo) = // Bind information about values //------------------------------------------------------------------------- -let EmptyModuleInfo = notlazy { ValInfos = ValInfos([]); ModuleOrNamespaceInfos = Map.empty } +let EmptyModuleInfo = + notlazy { ValInfos = ValInfos([]); ModuleOrNamespaceInfos = Map.empty } let rec UnionOptimizationInfos (minfos : seq) = notlazy - { ValInfos = ValInfos(seq { for minfo in minfos do yield! minfo.Force().ValInfos.Entries }) - ModuleOrNamespaceInfos = minfos |> Seq.map (fun m -> m.Force().ModuleOrNamespaceInfos) |> NameMap.union UnionOptimizationInfos } + { ValInfos = + ValInfos(seq { for minfo in minfos do yield! minfo.Force().ValInfos.Entries }) + + ModuleOrNamespaceInfos = + minfos + |> Seq.map (fun m -> m.Force().ModuleOrNamespaceInfos) + |> NameMap.union UnionOptimizationInfos } let FindOrCreateModuleInfo n (ss: Map<_, _>) = match ss.TryFind n with @@ -398,19 +462,19 @@ let FindOrCreateGlobalModuleInfo n (ss: LayeredMap<_, _>) = | Some res -> res | None -> EmptyModuleInfo -let rec BindValueInSubModuleFSharpCore (mp:string[]) i (v:Val) vval ss = - if i < mp.Length then +let rec BindValueInSubModuleFSharpCore (mp: string[]) i (v: Val) vval ss = + if i < mp.Length then {ss with ModuleOrNamespaceInfos = BindValueInModuleForFslib mp.[i] mp (i+1) v vval ss.ModuleOrNamespaceInfos } else // REVIEW: this line looks quadratic for performance when compiling FSharp.Core {ss with ValInfos = ValInfos(Seq.append ss.ValInfos.Entries (Seq.singleton (mkLocalValRef v, vval))) } and BindValueInModuleForFslib n mp i v vval (ss: NameMap<_>) = - let old = FindOrCreateModuleInfo n ss + let old = FindOrCreateModuleInfo n ss Map.add n (notlazy (BindValueInSubModuleFSharpCore mp i v vval (old.Force()))) ss and BindValueInGlobalModuleForFslib n mp i v vval (ss: LayeredMap<_, _>) = - let old = FindOrCreateGlobalModuleInfo n ss + let old = FindOrCreateGlobalModuleInfo n ss ss.Add(n, notlazy (BindValueInSubModuleFSharpCore mp i v vval (old.Force()))) let BindValueForFslib (nlvref : NonLocalValOrMemberRef) v vval env = @@ -418,10 +482,10 @@ let BindValueForFslib (nlvref : NonLocalValOrMemberRef) v vval env = let UnknownValInfo = { ValExprInfo=UnknownValue; ValMakesNoCriticalTailcalls=false } -let mkValInfo info (v:Val) = { ValExprInfo=info.Info; ValMakesNoCriticalTailcalls= v.MakesNoCriticalTailcalls } +let mkValInfo info (v: Val) = { ValExprInfo=info.Info; ValMakesNoCriticalTailcalls= v.MakesNoCriticalTailcalls } (* Bind a value *) -let BindInternalLocalVal cenv (v:Val) vval env = +let BindInternalLocalVal cenv (v: Val) vval env = let vval = if v.IsMutable then UnknownValInfo else vval #if CHECKED #else @@ -432,7 +496,7 @@ let BindInternalLocalVal cenv (v:Val) vval env = cenv.localInternalVals.[v.Stamp] <- vval env -let BindExternalLocalVal cenv (v:Val) vval env = +let BindExternalLocalVal cenv (v: Val) vval env = #if CHECKED CheckInlineValueIsComplete v vval #endif @@ -445,7 +509,7 @@ let BindExternalLocalVal cenv (v:Val) vval env = | UnknownValue -> env | _ -> #endif - { env with localExternalVals=env.localExternalVals.Add (v.Stamp, vval) } + { env with localExternalVals=env.localExternalVals.Add (v.Stamp, vval) } // If we're compiling fslib then also bind the value as a non-local path to // allow us to resolve the compiler-non-local-references that arise from env.fs // @@ -463,11 +527,11 @@ let BindExternalLocalVal cenv (v:Val) vval env = else env env -let rec BindValsInModuleOrNamespace cenv (mval:LazyModuleInfo) env = +let rec BindValsInModuleOrNamespace cenv (mval: LazyModuleInfo) env = let mval = mval.Force() // do all the sub modules - let env = (mval.ModuleOrNamespaceInfos, env) ||> NameMap.foldBackRange (BindValsInModuleOrNamespace cenv) - let env = (env, mval.ValInfos.Entries) ||> Seq.fold (fun env (v:ValRef, vval) -> BindExternalLocalVal cenv v.Deref vval env) + let env = (mval.ModuleOrNamespaceInfos, env) ||> NameMap.foldBackRange (BindValsInModuleOrNamespace cenv) + let env = (env, mval.ValInfos.Entries) ||> Seq.fold (fun env (v: ValRef, vval) -> BindExternalLocalVal cenv v.Deref vval env) env let inline BindInternalValToUnknown cenv v env = @@ -489,29 +553,23 @@ let inline BindInternalValsToUnknown cenv vs env = let BindTypeVar tyv typeinfo env = { env with typarInfos= (tyv, typeinfo)::env.typarInfos } -let BindTypeVarsToUnknown (tps:Typar list) env = +let BindTypeVarsToUnknown (tps: Typar list) env = if isNil tps then env else // The optimizer doesn't use the type values it could track. // However here we mutate to provide better names for generalized type parameters // The names chosen are 'a', 'b' etc. These are also the compiled names in the IL code let nms = PrettyTypes.PrettyTyparNames (fun _ -> true) (env.typarInfos |> List.map (fun (tp, _) -> tp.Name) ) tps (tps, nms) ||> List.iter2 (fun tp nm -> - if PrettyTypes.NeedsPrettyTyparName tp then + if PrettyTypes.NeedsPrettyTyparName tp then tp.typar_id <- ident (nm, tp.Range)) List.fold (fun sofar arg -> BindTypeVar arg UnknownTypeValue sofar) env tps -let BindCcu (ccu:Tast.CcuThunk) mval env (_g:TcGlobals) = - { env with globalModuleInfos=env.globalModuleInfos.Add(ccu.AssemblyName, mval) } +let BindCcu (ccu: Tast.CcuThunk) mval env (_g: TcGlobals) = + { env with globalModuleInfos=env.globalModuleInfos.Add(ccu.AssemblyName, mval) } - - -//------------------------------------------------------------------------- -// Lookup information about values -//------------------------------------------------------------------------- - - -let GetInfoForLocalValue cenv env (v:Val) m = - (* Abstract slots do not have values *) +/// Lookup information about values +let GetInfoForLocalValue cenv env (v: Val) m = + // Abstract slots do not have values if v.IsDispatchSlot then UnknownValInfo else #if FABLE_COMPILER @@ -531,7 +589,7 @@ let GetInfoForLocalValue cenv env (v:Val) m = #endif UnknownValInfo -let TryGetInfoForCcu env (ccu:CcuThunk) = env.globalModuleInfos.TryFind(ccu.AssemblyName) +let TryGetInfoForCcu env (ccu: CcuThunk) = env.globalModuleInfos.TryFind(ccu.AssemblyName) let TryGetInfoForEntity sv n = match sv.ModuleOrNamespaceInfos.TryFind n with @@ -549,7 +607,7 @@ let TryGetInfoForNonLocalEntityRef env (nleref: NonLocalEntityRef) = | Some ccuinfo -> TryGetInfoForPath (ccuinfo.Force()) nleref.Path 0 | None -> None -let GetInfoForNonLocalVal cenv env (vref:ValRef) = +let GetInfoForNonLocalVal cenv env (vref: ValRef) = if vref.IsDispatchSlot then UnknownValInfo #if FABLE_COMPILER @@ -558,7 +616,7 @@ let GetInfoForNonLocalVal cenv env (vref:ValRef) = UnknownValInfo #endif // REVIEW: optionally turn x-module on/off on per-module basis or - elif cenv.settings.crossModuleOpt () || vref.MustInline then + elif cenv.settings.crossModuleOpt () || vref.MustInline then match TryGetInfoForNonLocalEntityRef env vref.nlr.EnclosingEntity.nlr with | Some(structInfo) -> match structInfo.ValInfos.TryFind(vref) with @@ -579,14 +637,14 @@ let GetInfoForNonLocalVal cenv env (vref:ValRef) = else UnknownValInfo -let GetInfoForVal cenv env m (vref:ValRef) = +let GetInfoForVal cenv env m (vref: ValRef) = let res = if vref.IsLocalRef then GetInfoForLocalValue cenv env vref.binding m else GetInfoForNonLocalVal cenv env vref - check (* "its stored value was incomplete" m *) vref res |> ignore + check vref res |> ignore res //------------------------------------------------------------------------- @@ -596,7 +654,7 @@ let GetInfoForVal cenv env m (vref:ValRef) = let rec stripValue = function | ValValue(_, details) -> stripValue details (* step through ValValue "aliases" *) | SizeValue(_, details) -> stripValue details (* step through SizeValue "aliases" *) - | vinfo -> vinfo + | vinfo -> vinfo let (|StripConstValue|_|) ev = match stripValue ev with @@ -624,57 +682,67 @@ let (|StripUnionCaseValue|_|) ev = | _ -> None let mkBoolVal (g: TcGlobals) n = ConstValue(Const.Bool n, g.bool_ty) + let mkInt8Val (g: TcGlobals) n = ConstValue(Const.SByte n, g.sbyte_ty) + let mkInt16Val (g: TcGlobals) n = ConstValue(Const.Int16 n, g.int16_ty) + let mkInt32Val (g: TcGlobals) n = ConstValue(Const.Int32 n, g.int32_ty) + let mkInt64Val (g: TcGlobals) n = ConstValue(Const.Int64 n, g.int64_ty) + let mkUInt8Val (g: TcGlobals) n = ConstValue(Const.Byte n, g.byte_ty) + let mkUInt16Val (g: TcGlobals) n = ConstValue(Const.UInt16 n, g.uint16_ty) + let mkUInt32Val (g: TcGlobals) n = ConstValue(Const.UInt32 n, g.uint32_ty) + let mkUInt64Val (g: TcGlobals) n = ConstValue(Const.UInt64 n, g.uint64_ty) let (|StripInt32Value|_|) = function StripConstValue(Const.Int32 n) -> Some n | _ -> None -//------------------------------------------------------------------------- -// mk value_infos -//------------------------------------------------------------------------- - -let MakeValueInfoForValue g m vref vinfo = +let MakeValueInfoForValue g m vref vinfo = #if DEBUG let rec check x = match x with - | ValValue (vref2, detail) -> if valRefEq g vref vref2 then error(Error(FSComp.SR.optRecursiveValValue(showL(exprValueInfoL g vinfo)), m)) else check detail + | ValValue (vref2, detail) -> if valRefEq g vref vref2 then error(Error(FSComp.SR.optRecursiveValValue(showL(exprValueInfoL g vinfo)), m)) else check detail | SizeValue (_n, detail) -> check detail | _ -> () check vinfo #else ignore g; ignore m #endif - ValValue (vref, vinfo) |> BoundValueInfoBySize + ValValue (vref, vinfo) |> BoundValueInfoBySize + +let MakeValueInfoForRecord tcref argvals = + RecdValue (tcref, argvals) |> BoundValueInfoBySize + +let MakeValueInfoForTuple argvals = + TupleValue argvals |> BoundValueInfoBySize -let MakeValueInfoForRecord tcref argvals = RecdValue (tcref, argvals) |> BoundValueInfoBySize -let MakeValueInfoForTuple argvals = TupleValue argvals |> BoundValueInfoBySize -let MakeValueInfoForUnionCase cspec argvals = UnionCaseValue (cspec, argvals) |> BoundValueInfoBySize -let MakeValueInfoForConst c ty = ConstValue(c, ty) +let MakeValueInfoForUnionCase cspec argvals = + UnionCaseValue (cspec, argvals) |> BoundValueInfoBySize -// Helper to evaluate a unary integer operation over known values +let MakeValueInfoForConst c ty = ConstValue(c, ty) + +/// Helper to evaluate a unary integer operation over known values let inline IntegerUnaryOp g f8 f16 f32 f64 fu8 fu16 fu32 fu64 a = match a with | StripConstValue(c) -> match c with - | Const.Bool a -> Some(mkBoolVal g (f32 (if a then 1 else 0) <> 0)) - | Const.Int32 a -> Some(mkInt32Val g (f32 a)) - | Const.Int64 a -> Some(mkInt64Val g (f64 a)) - | Const.Int16 a -> Some(mkInt16Val g (f16 a)) - | Const.SByte a -> Some(mkInt8Val g (f8 a)) - | Const.Byte a -> Some(mkUInt8Val g (fu8 a)) + | Const.Bool a -> Some(mkBoolVal g (f32 (if a then 1 else 0) <> 0)) + | Const.Int32 a -> Some(mkInt32Val g (f32 a)) + | Const.Int64 a -> Some(mkInt64Val g (f64 a)) + | Const.Int16 a -> Some(mkInt16Val g (f16 a)) + | Const.SByte a -> Some(mkInt8Val g (f8 a)) + | Const.Byte a -> Some(mkUInt8Val g (fu8 a)) | Const.UInt32 a -> Some(mkUInt32Val g (fu32 a)) | Const.UInt64 a -> Some(mkUInt64Val g (fu64 a)) | Const.UInt16 a -> Some(mkUInt16Val g (fu16 a)) | _ -> None | _ -> None -// Helper to evaluate a unary signed integer operation over known values +/// Helper to evaluate a unary signed integer operation over known values let inline SignedIntegerUnaryOp g f8 f16 f32 f64 a = match a with | StripConstValue(c) -> @@ -682,21 +750,21 @@ let inline SignedIntegerUnaryOp g f8 f16 f32 f64 a = | Const.Int32 a -> Some(mkInt32Val g (f32 a)) | Const.Int64 a -> Some(mkInt64Val g (f64 a)) | Const.Int16 a -> Some(mkInt16Val g (f16 a)) - | Const.SByte a -> Some(mkInt8Val g (f8 a)) + | Const.SByte a -> Some(mkInt8Val g (f8 a)) | _ -> None | _ -> None -// Helper to evaluate a binary integer operation over known values +/// Helper to evaluate a binary integer operation over known values let inline IntegerBinaryOp g f8 f16 f32 f64 fu8 fu16 fu32 fu64 a b = match a, b with | StripConstValue(c1), StripConstValue(c2) -> match c1, c2 with - | (Const.Bool a), (Const.Bool b) -> Some(mkBoolVal g (f32 (if a then 1 else 0) (if b then 1 else 0) <> 0)) - | (Const.Int32 a), (Const.Int32 b) -> Some(mkInt32Val g (f32 a b)) - | (Const.Int64 a), (Const.Int64 b) -> Some(mkInt64Val g (f64 a b)) - | (Const.Int16 a), (Const.Int16 b) -> Some(mkInt16Val g (f16 a b)) - | (Const.SByte a), (Const.SByte b) -> Some(mkInt8Val g (f8 a b)) - | (Const.Byte a), (Const.Byte b) -> Some(mkUInt8Val g (fu8 a b)) + | (Const.Bool a), (Const.Bool b) -> Some(mkBoolVal g (f32 (if a then 1 else 0) (if b then 1 else 0) <> 0)) + | (Const.Int32 a), (Const.Int32 b) -> Some(mkInt32Val g (f32 a b)) + | (Const.Int64 a), (Const.Int64 b) -> Some(mkInt64Val g (f64 a b)) + | (Const.Int16 a), (Const.Int16 b) -> Some(mkInt16Val g (f16 a b)) + | (Const.SByte a), (Const.SByte b) -> Some(mkInt8Val g (f8 a b)) + | (Const.Byte a), (Const.Byte b) -> Some(mkUInt8Val g (fu8 a b)) | (Const.UInt16 a), (Const.UInt16 b) -> Some(mkUInt16Val g (fu16 a b)) | (Const.UInt32 a), (Const.UInt32 b) -> Some(mkUInt32Val g (fu32 a b)) | (Const.UInt64 a), (Const.UInt64 b) -> Some(mkUInt64Val g (fu64 a b)) @@ -706,11 +774,10 @@ let inline IntegerBinaryOp g f8 f16 f32 f64 fu8 fu16 fu32 fu64 a b = module Unchecked = Microsoft.FSharp.Core.Operators /// Evaluate primitives based on interpretation of IL instructions. -// -// The implementation -// utilizes F# arithmetic extensively, so a mistake in the implementation of F# arithmetic -// in the core library used by the F# compiler will propagate to be a mistake in optimization. -// The IL instructions appear in the tree through inlining. +/// +/// The implementation utilizes F# arithmetic extensively, so a mistake in the implementation of F# arithmetic +/// in the core library used by the F# compiler will propagate to be a mistake in optimization. +/// The IL instructions appear in the tree through inlining. let mkAssemblyCodeValueInfo g instrs argvals tys = match instrs, argvals, tys with | [ AI_add ], [t1;t2], _ -> @@ -723,29 +790,29 @@ let mkAssemblyCodeValueInfo g instrs argvals tys = match IntegerBinaryOp g Unchecked.(-) Unchecked.(-) Unchecked.(-) Unchecked.(-) Unchecked.(-) Unchecked.(-) Unchecked.(-) Unchecked.(-) t1 t2 with | Some res -> res | _ -> UnknownValue - | [ AI_mul ], [a;b], _ -> (match IntegerBinaryOp g Unchecked.( * ) Unchecked.( * ) Unchecked.( * ) Unchecked.( * ) Unchecked.( * ) Unchecked.( * ) Unchecked.( * ) Unchecked.( * ) a b with Some res -> res | None -> UnknownValue) - | [ AI_and ], [a;b], _ -> (match IntegerBinaryOp g (&&&) (&&&) (&&&) (&&&) (&&&) (&&&) (&&&) (&&&) a b with Some res -> res | None -> UnknownValue) - | [ AI_or ], [a;b], _ -> (match IntegerBinaryOp g (|||) (|||) (|||) (|||) (|||) (|||) (|||) (|||) a b with Some res -> res | None -> UnknownValue) - | [ AI_xor ], [a;b], _ -> (match IntegerBinaryOp g (^^^) (^^^) (^^^) (^^^) (^^^) (^^^) (^^^) (^^^) a b with Some res -> res | None -> UnknownValue) + | [ AI_mul ], [a;b], _ -> (match IntegerBinaryOp g Unchecked.( * ) Unchecked.( * ) Unchecked.( * ) Unchecked.( * ) Unchecked.( * ) Unchecked.( * ) Unchecked.( * ) Unchecked.( * ) a b with Some res -> res | None -> UnknownValue) + | [ AI_and ], [a;b], _ -> (match IntegerBinaryOp g (&&&) (&&&) (&&&) (&&&) (&&&) (&&&) (&&&) (&&&) a b with Some res -> res | None -> UnknownValue) + | [ AI_or ], [a;b], _ -> (match IntegerBinaryOp g (|||) (|||) (|||) (|||) (|||) (|||) (|||) (|||) a b with Some res -> res | None -> UnknownValue) + | [ AI_xor ], [a;b], _ -> (match IntegerBinaryOp g (^^^) (^^^) (^^^) (^^^) (^^^) (^^^) (^^^) (^^^) a b with Some res -> res | None -> UnknownValue) | [ AI_not ], [a], _ -> (match IntegerUnaryOp g (~~~) (~~~) (~~~) (~~~) (~~~) (~~~) (~~~) (~~~) a with Some res -> res | None -> UnknownValue) | [ AI_neg ], [a], _ -> (match SignedIntegerUnaryOp g (~-) (~-) (~-) (~-) a with Some res -> res | None -> UnknownValue) | [ AI_ceq ], [a;b], _ -> match stripValue a, stripValue b with - | ConstValue(Const.Bool a1, _), ConstValue(Const.Bool a2, _) -> mkBoolVal g (a1 = a2) - | ConstValue(Const.SByte a1, _), ConstValue(Const.SByte a2, _) -> mkBoolVal g (a1 = a2) - | ConstValue(Const.Int16 a1, _), ConstValue(Const.Int16 a2, _) -> mkBoolVal g (a1 = a2) - | ConstValue(Const.Int32 a1, _), ConstValue(Const.Int32 a2, _) -> mkBoolVal g (a1 = a2) - | ConstValue(Const.Int64 a1, _), ConstValue(Const.Int64 a2, _) -> mkBoolVal g (a1 = a2) - | ConstValue(Const.Char a1, _), ConstValue(Const.Char a2, _) -> mkBoolVal g (a1 = a2) - | ConstValue(Const.Byte a1, _), ConstValue(Const.Byte a2, _) -> mkBoolVal g (a1 = a2) - | ConstValue(Const.UInt16 a1, _), ConstValue(Const.UInt16 a2, _) -> mkBoolVal g (a1 = a2) - | ConstValue(Const.UInt32 a1, _), ConstValue(Const.UInt32 a2, _) -> mkBoolVal g (a1 = a2) - | ConstValue(Const.UInt64 a1, _), ConstValue(Const.UInt64 a2, _) -> mkBoolVal g (a1 = a2) + | ConstValue(Const.Bool a1, _), ConstValue(Const.Bool a2, _) -> mkBoolVal g (a1 = a2) + | ConstValue(Const.SByte a1, _), ConstValue(Const.SByte a2, _) -> mkBoolVal g (a1 = a2) + | ConstValue(Const.Int16 a1, _), ConstValue(Const.Int16 a2, _) -> mkBoolVal g (a1 = a2) + | ConstValue(Const.Int32 a1, _), ConstValue(Const.Int32 a2, _) -> mkBoolVal g (a1 = a2) + | ConstValue(Const.Int64 a1, _), ConstValue(Const.Int64 a2, _) -> mkBoolVal g (a1 = a2) + | ConstValue(Const.Char a1, _), ConstValue(Const.Char a2, _) -> mkBoolVal g (a1 = a2) + | ConstValue(Const.Byte a1, _), ConstValue(Const.Byte a2, _) -> mkBoolVal g (a1 = a2) + | ConstValue(Const.UInt16 a1, _), ConstValue(Const.UInt16 a2, _) -> mkBoolVal g (a1 = a2) + | ConstValue(Const.UInt32 a1, _), ConstValue(Const.UInt32 a2, _) -> mkBoolVal g (a1 = a2) + | ConstValue(Const.UInt64 a1, _), ConstValue(Const.UInt64 a2, _) -> mkBoolVal g (a1 = a2) | _ -> UnknownValue | [ AI_clt ], [a;b], _ -> match stripValue a, stripValue b with - | ConstValue(Const.Bool a1, _), ConstValue(Const.Bool a2, _) -> mkBoolVal g (a1 < a2) + | ConstValue(Const.Bool a1, _), ConstValue(Const.Bool a2, _) -> mkBoolVal g (a1 < a2) | ConstValue(Const.Int32 a1, _), ConstValue(Const.Int32 a2, _) -> mkBoolVal g (a1 < a2) | ConstValue(Const.Int64 a1, _), ConstValue(Const.Int64 a2, _) -> mkBoolVal g (a1 < a2) | ConstValue(Const.SByte a1, _), ConstValue(Const.SByte a2, _) -> mkBoolVal g (a1 < a2) @@ -753,137 +820,137 @@ let mkAssemblyCodeValueInfo g instrs argvals tys = | _ -> UnknownValue | [ (AI_conv(DT_U1))], [a], [ty] when typeEquiv g ty g.byte_ty -> match stripValue a with - | ConstValue(Const.SByte a, _) -> mkUInt8Val g (Unchecked.byte a) - | ConstValue(Const.Int16 a, _) -> mkUInt8Val g (Unchecked.byte a) - | ConstValue(Const.Int32 a, _) -> mkUInt8Val g (Unchecked.byte a) - | ConstValue(Const.Int64 a, _) -> mkUInt8Val g (Unchecked.byte a) - | ConstValue(Const.Byte a, _) -> mkUInt8Val g (Unchecked.byte a) + | ConstValue(Const.SByte a, _) -> mkUInt8Val g (Unchecked.byte a) + | ConstValue(Const.Int16 a, _) -> mkUInt8Val g (Unchecked.byte a) + | ConstValue(Const.Int32 a, _) -> mkUInt8Val g (Unchecked.byte a) + | ConstValue(Const.Int64 a, _) -> mkUInt8Val g (Unchecked.byte a) + | ConstValue(Const.Byte a, _) -> mkUInt8Val g (Unchecked.byte a) | ConstValue(Const.UInt16 a, _) -> mkUInt8Val g (Unchecked.byte a) | ConstValue(Const.UInt32 a, _) -> mkUInt8Val g (Unchecked.byte a) | ConstValue(Const.UInt64 a, _) -> mkUInt8Val g (Unchecked.byte a) | _ -> UnknownValue | [ (AI_conv(DT_U2))], [a], [ty] when typeEquiv g ty g.uint16_ty -> match stripValue a with - | ConstValue(Const.SByte a, _) -> mkUInt16Val g (Unchecked.uint16 a) - | ConstValue(Const.Int16 a, _) -> mkUInt16Val g (Unchecked.uint16 a) - | ConstValue(Const.Int32 a, _) -> mkUInt16Val g (Unchecked.uint16 a) - | ConstValue(Const.Int64 a, _) -> mkUInt16Val g (Unchecked.uint16 a) - | ConstValue(Const.Byte a, _) -> mkUInt16Val g (Unchecked.uint16 a) + | ConstValue(Const.SByte a, _) -> mkUInt16Val g (Unchecked.uint16 a) + | ConstValue(Const.Int16 a, _) -> mkUInt16Val g (Unchecked.uint16 a) + | ConstValue(Const.Int32 a, _) -> mkUInt16Val g (Unchecked.uint16 a) + | ConstValue(Const.Int64 a, _) -> mkUInt16Val g (Unchecked.uint16 a) + | ConstValue(Const.Byte a, _) -> mkUInt16Val g (Unchecked.uint16 a) | ConstValue(Const.UInt16 a, _) -> mkUInt16Val g (Unchecked.uint16 a) | ConstValue(Const.UInt32 a, _) -> mkUInt16Val g (Unchecked.uint16 a) | ConstValue(Const.UInt64 a, _) -> mkUInt16Val g (Unchecked.uint16 a) | _ -> UnknownValue | [ (AI_conv(DT_U4))], [a], [ty] when typeEquiv g ty g.uint32_ty -> match stripValue a with - | ConstValue(Const.SByte a, _) -> mkUInt32Val g (Unchecked.uint32 a) - | ConstValue(Const.Int16 a, _) -> mkUInt32Val g (Unchecked.uint32 a) - | ConstValue(Const.Int32 a, _) -> mkUInt32Val g (Unchecked.uint32 a) - | ConstValue(Const.Int64 a, _) -> mkUInt32Val g (Unchecked.uint32 a) - | ConstValue(Const.Byte a, _) -> mkUInt32Val g (Unchecked.uint32 a) + | ConstValue(Const.SByte a, _) -> mkUInt32Val g (Unchecked.uint32 a) + | ConstValue(Const.Int16 a, _) -> mkUInt32Val g (Unchecked.uint32 a) + | ConstValue(Const.Int32 a, _) -> mkUInt32Val g (Unchecked.uint32 a) + | ConstValue(Const.Int64 a, _) -> mkUInt32Val g (Unchecked.uint32 a) + | ConstValue(Const.Byte a, _) -> mkUInt32Val g (Unchecked.uint32 a) | ConstValue(Const.UInt16 a, _) -> mkUInt32Val g (Unchecked.uint32 a) | ConstValue(Const.UInt32 a, _) -> mkUInt32Val g (Unchecked.uint32 a) | ConstValue(Const.UInt64 a, _) -> mkUInt32Val g (Unchecked.uint32 a) | _ -> UnknownValue - | [ (AI_conv(DT_U8))], [a], [ty] when typeEquiv g ty g.uint64_ty -> + | [ (AI_conv(DT_U8))], [a], [ty] when typeEquiv g ty g.uint64_ty -> match stripValue a with - | ConstValue(Const.SByte a, _) -> mkUInt64Val g (Unchecked.uint64 a) - | ConstValue(Const.Int16 a, _) -> mkUInt64Val g (Unchecked.uint64 a) - | ConstValue(Const.Int32 a, _) -> mkUInt64Val g (Unchecked.uint64 a) - | ConstValue(Const.Int64 a, _) -> mkUInt64Val g (Unchecked.uint64 a) - | ConstValue(Const.Byte a, _) -> mkUInt64Val g (Unchecked.uint64 a) + | ConstValue(Const.SByte a, _) -> mkUInt64Val g (Unchecked.uint64 a) + | ConstValue(Const.Int16 a, _) -> mkUInt64Val g (Unchecked.uint64 a) + | ConstValue(Const.Int32 a, _) -> mkUInt64Val g (Unchecked.uint64 a) + | ConstValue(Const.Int64 a, _) -> mkUInt64Val g (Unchecked.uint64 a) + | ConstValue(Const.Byte a, _) -> mkUInt64Val g (Unchecked.uint64 a) | ConstValue(Const.UInt16 a, _) -> mkUInt64Val g (Unchecked.uint64 a) | ConstValue(Const.UInt32 a, _) -> mkUInt64Val g (Unchecked.uint64 a) | ConstValue(Const.UInt64 a, _) -> mkUInt64Val g (Unchecked.uint64 a) | _ -> UnknownValue - | [ (AI_conv(DT_I1))], [a], [ty] when typeEquiv g ty g.sbyte_ty -> + | [ (AI_conv(DT_I1))], [a], [ty] when typeEquiv g ty g.sbyte_ty -> match stripValue a with - | ConstValue(Const.SByte a, _) -> mkInt8Val g (Unchecked.sbyte a) - | ConstValue(Const.Int16 a, _) -> mkInt8Val g (Unchecked.sbyte a) - | ConstValue(Const.Int32 a, _) -> mkInt8Val g (Unchecked.sbyte a) - | ConstValue(Const.Int64 a, _) -> mkInt8Val g (Unchecked.sbyte a) - | ConstValue(Const.Byte a, _) -> mkInt8Val g (Unchecked.sbyte a) + | ConstValue(Const.SByte a, _) -> mkInt8Val g (Unchecked.sbyte a) + | ConstValue(Const.Int16 a, _) -> mkInt8Val g (Unchecked.sbyte a) + | ConstValue(Const.Int32 a, _) -> mkInt8Val g (Unchecked.sbyte a) + | ConstValue(Const.Int64 a, _) -> mkInt8Val g (Unchecked.sbyte a) + | ConstValue(Const.Byte a, _) -> mkInt8Val g (Unchecked.sbyte a) | ConstValue(Const.UInt16 a, _) -> mkInt8Val g (Unchecked.sbyte a) | ConstValue(Const.UInt32 a, _) -> mkInt8Val g (Unchecked.sbyte a) | ConstValue(Const.UInt64 a, _) -> mkInt8Val g (Unchecked.sbyte a) | _ -> UnknownValue - | [ (AI_conv(DT_I2))], [a], [ty] when typeEquiv g ty g.int16_ty -> + | [ (AI_conv(DT_I2))], [a], [ty] when typeEquiv g ty g.int16_ty -> match stripValue a with - | ConstValue(Const.Int32 a, _) -> mkInt16Val g (Unchecked.int16 a) - | ConstValue(Const.Int16 a, _) -> mkInt16Val g (Unchecked.int16 a) - | ConstValue(Const.SByte a, _) -> mkInt16Val g (Unchecked.int16 a) - | ConstValue(Const.Int64 a, _) -> mkInt16Val g (Unchecked.int16 a) + | ConstValue(Const.Int32 a, _) -> mkInt16Val g (Unchecked.int16 a) + | ConstValue(Const.Int16 a, _) -> mkInt16Val g (Unchecked.int16 a) + | ConstValue(Const.SByte a, _) -> mkInt16Val g (Unchecked.int16 a) + | ConstValue(Const.Int64 a, _) -> mkInt16Val g (Unchecked.int16 a) | ConstValue(Const.UInt32 a, _) -> mkInt16Val g (Unchecked.int16 a) | ConstValue(Const.UInt16 a, _) -> mkInt16Val g (Unchecked.int16 a) - | ConstValue(Const.Byte a, _) -> mkInt16Val g (Unchecked.int16 a) + | ConstValue(Const.Byte a, _) -> mkInt16Val g (Unchecked.int16 a) | ConstValue(Const.UInt64 a, _) -> mkInt16Val g (Unchecked.int16 a) | _ -> UnknownValue | [ (AI_conv(DT_I4))], [a], [ty] when typeEquiv g ty g.int32_ty -> match stripValue a with - | ConstValue(Const.Int32 a, _) -> mkInt32Val g (Unchecked.int32 a) - | ConstValue(Const.Int16 a, _) -> mkInt32Val g (Unchecked.int32 a) - | ConstValue(Const.SByte a, _) -> mkInt32Val g (Unchecked.int32 a) - | ConstValue(Const.Int64 a, _) -> mkInt32Val g (Unchecked.int32 a) + | ConstValue(Const.Int32 a, _) -> mkInt32Val g (Unchecked.int32 a) + | ConstValue(Const.Int16 a, _) -> mkInt32Val g (Unchecked.int32 a) + | ConstValue(Const.SByte a, _) -> mkInt32Val g (Unchecked.int32 a) + | ConstValue(Const.Int64 a, _) -> mkInt32Val g (Unchecked.int32 a) | ConstValue(Const.UInt32 a, _) -> mkInt32Val g (Unchecked.int32 a) | ConstValue(Const.UInt16 a, _) -> mkInt32Val g (Unchecked.int32 a) - | ConstValue(Const.Byte a, _) -> mkInt32Val g (Unchecked.int32 a) + | ConstValue(Const.Byte a, _) -> mkInt32Val g (Unchecked.int32 a) | ConstValue(Const.UInt64 a, _) -> mkInt32Val g (Unchecked.int32 a) | _ -> UnknownValue - | [ (AI_conv(DT_I8))], [a], [ty] when typeEquiv g ty g.int64_ty -> + | [ (AI_conv(DT_I8))], [a], [ty] when typeEquiv g ty g.int64_ty -> match stripValue a with - | ConstValue(Const.Int32 a, _) -> mkInt64Val g (Unchecked.int64 a) - | ConstValue(Const.Int16 a, _) -> mkInt64Val g (Unchecked.int64 a) - | ConstValue(Const.SByte a, _) -> mkInt64Val g (Unchecked.int64 a) - | ConstValue(Const.Int64 a, _) -> mkInt64Val g (Unchecked.int64 a) + | ConstValue(Const.Int32 a, _) -> mkInt64Val g (Unchecked.int64 a) + | ConstValue(Const.Int16 a, _) -> mkInt64Val g (Unchecked.int64 a) + | ConstValue(Const.SByte a, _) -> mkInt64Val g (Unchecked.int64 a) + | ConstValue(Const.Int64 a, _) -> mkInt64Val g (Unchecked.int64 a) | ConstValue(Const.UInt32 a, _) -> mkInt64Val g (Unchecked.int64 a) | ConstValue(Const.UInt16 a, _) -> mkInt64Val g (Unchecked.int64 a) - | ConstValue(Const.Byte a, _) -> mkInt64Val g (Unchecked.int64 a) + | ConstValue(Const.Byte a, _) -> mkInt64Val g (Unchecked.int64 a) | ConstValue(Const.UInt64 a, _) -> mkInt64Val g (Unchecked.int64 a) | _ -> UnknownValue - | [ AI_clt_un ], [a;b], [ty] when typeEquiv g ty g.bool_ty -> + | [ AI_clt_un ], [a;b], [ty] when typeEquiv g ty g.bool_ty -> match stripValue a, stripValue b with - | ConstValue(Const.Char a1, _), ConstValue(Const.Char a2, _) -> mkBoolVal g (a1 < a2) - | ConstValue(Const.Byte a1, _), ConstValue(Const.Byte a2, _) -> mkBoolVal g (a1 < a2) + | ConstValue(Const.Char a1, _), ConstValue(Const.Char a2, _) -> mkBoolVal g (a1 < a2) + | ConstValue(Const.Byte a1, _), ConstValue(Const.Byte a2, _) -> mkBoolVal g (a1 < a2) | ConstValue(Const.UInt16 a1, _), ConstValue(Const.UInt16 a2, _) -> mkBoolVal g (a1 < a2) | ConstValue(Const.UInt32 a1, _), ConstValue(Const.UInt32 a2, _) -> mkBoolVal g (a1 < a2) | ConstValue(Const.UInt64 a1, _), ConstValue(Const.UInt64 a2, _) -> mkBoolVal g (a1 < a2) | _ -> UnknownValue - | [ AI_cgt ], [a;b], [ty] when typeEquiv g ty g.bool_ty -> + | [ AI_cgt ], [a;b], [ty] when typeEquiv g ty g.bool_ty -> match stripValue a, stripValue b with - | ConstValue(Const.SByte a1, _), ConstValue(Const.SByte a2, _) -> mkBoolVal g (a1 > a2) - | ConstValue(Const.Int16 a1, _), ConstValue(Const.Int16 a2, _) -> mkBoolVal g (a1 > a2) - | ConstValue(Const.Int32 a1, _), ConstValue(Const.Int32 a2, _) -> mkBoolVal g (a1 > a2) - | ConstValue(Const.Int64 a1, _), ConstValue(Const.Int64 a2, _) -> mkBoolVal g (a1 > a2) + | ConstValue(Const.SByte a1, _), ConstValue(Const.SByte a2, _) -> mkBoolVal g (a1 > a2) + | ConstValue(Const.Int16 a1, _), ConstValue(Const.Int16 a2, _) -> mkBoolVal g (a1 > a2) + | ConstValue(Const.Int32 a1, _), ConstValue(Const.Int32 a2, _) -> mkBoolVal g (a1 > a2) + | ConstValue(Const.Int64 a1, _), ConstValue(Const.Int64 a2, _) -> mkBoolVal g (a1 > a2) | _ -> UnknownValue - | [ AI_cgt_un ], [a;b], [ty] when typeEquiv g ty g.bool_ty -> + | [ AI_cgt_un ], [a;b], [ty] when typeEquiv g ty g.bool_ty -> match stripValue a, stripValue b with - | ConstValue(Const.Char a1, _), ConstValue(Const.Char a2, _) -> mkBoolVal g (a1 > a2) - | ConstValue(Const.Byte a1, _), ConstValue(Const.Byte a2, _) -> mkBoolVal g (a1 > a2) + | ConstValue(Const.Char a1, _), ConstValue(Const.Char a2, _) -> mkBoolVal g (a1 > a2) + | ConstValue(Const.Byte a1, _), ConstValue(Const.Byte a2, _) -> mkBoolVal g (a1 > a2) | ConstValue(Const.UInt16 a1, _), ConstValue(Const.UInt16 a2, _) -> mkBoolVal g (a1 > a2) | ConstValue(Const.UInt32 a1, _), ConstValue(Const.UInt32 a2, _) -> mkBoolVal g (a1 > a2) | ConstValue(Const.UInt64 a1, _), ConstValue(Const.UInt64 a2, _) -> mkBoolVal g (a1 > a2) | _ -> UnknownValue | [ AI_shl ], [a;n], _ -> match stripValue a, stripValue n with - | ConstValue(Const.Int64 a, _), ConstValue(Const.Int32 n, _) when n >= 0 && n <= 63 -> (mkInt64Val g (a <<< n)) - | ConstValue(Const.Int32 a, _), ConstValue(Const.Int32 n, _) when n >= 0 && n <= 31 -> (mkInt32Val g (a <<< n)) - | ConstValue(Const.Int16 a, _), ConstValue(Const.Int32 n, _) when n >= 0 && n <= 15 -> (mkInt16Val g (a <<< n)) - | ConstValue(Const.SByte a, _), ConstValue(Const.Int32 n, _) when n >= 0 && n <= 7 -> (mkInt8Val g (a <<< n)) + | ConstValue(Const.Int64 a, _), ConstValue(Const.Int32 n, _) when n >= 0 && n <= 63 -> (mkInt64Val g (a <<< n)) + | ConstValue(Const.Int32 a, _), ConstValue(Const.Int32 n, _) when n >= 0 && n <= 31 -> (mkInt32Val g (a <<< n)) + | ConstValue(Const.Int16 a, _), ConstValue(Const.Int32 n, _) when n >= 0 && n <= 15 -> (mkInt16Val g (a <<< n)) + | ConstValue(Const.SByte a, _), ConstValue(Const.Int32 n, _) when n >= 0 && n <= 7 -> (mkInt8Val g (a <<< n)) | ConstValue(Const.UInt64 a, _), ConstValue(Const.Int32 n, _) when n >= 0 && n <= 63 -> (mkUInt64Val g (a <<< n)) | ConstValue(Const.UInt32 a, _), ConstValue(Const.Int32 n, _) when n >= 0 && n <= 31 -> (mkUInt32Val g (a <<< n)) | ConstValue(Const.UInt16 a, _), ConstValue(Const.Int32 n, _) when n >= 0 && n <= 15 -> (mkUInt16Val g (a <<< n)) - | ConstValue(Const.Byte a, _), ConstValue(Const.Int32 n, _) when n >= 0 && n <= 7 -> (mkUInt8Val g (a <<< n)) + | ConstValue(Const.Byte a, _), ConstValue(Const.Int32 n, _) when n >= 0 && n <= 7 -> (mkUInt8Val g (a <<< n)) | _ -> UnknownValue | [ AI_shr ], [a;n], _ -> match stripValue a, stripValue n with - | ConstValue(Const.SByte a, _), ConstValue(Const.Int32 n, _) when n >= 0 && n <= 7 -> (mkInt8Val g (a >>> n)) + | ConstValue(Const.SByte a, _), ConstValue(Const.Int32 n, _) when n >= 0 && n <= 7 -> (mkInt8Val g (a >>> n)) | ConstValue(Const.Int16 a, _), ConstValue(Const.Int32 n, _) when n >= 0 && n <= 15 -> (mkInt16Val g (a >>> n)) | ConstValue(Const.Int32 a, _), ConstValue(Const.Int32 n, _) when n >= 0 && n <= 31 -> (mkInt32Val g (a >>> n)) | ConstValue(Const.Int64 a, _), ConstValue(Const.Int32 n, _) when n >= 0 && n <= 63 -> (mkInt64Val g (a >>> n)) | _ -> UnknownValue | [ AI_shr_un ], [a;n], _ -> match stripValue a, stripValue n with - | ConstValue(Const.Byte a, _), ConstValue(Const.Int32 n, _) when n >= 0 && n <= 7 -> (mkUInt8Val g (a >>> n)) + | ConstValue(Const.Byte a, _), ConstValue(Const.Int32 n, _) when n >= 0 && n <= 7 -> (mkUInt8Val g (a >>> n)) | ConstValue(Const.UInt16 a, _), ConstValue(Const.Int32 n, _) when n >= 0 && n <= 15 -> (mkUInt16Val g (a >>> n)) | ConstValue(Const.UInt32 a, _), ConstValue(Const.Int32 n, _) when n >= 0 && n <= 31 -> (mkUInt32Val g (a >>> n)) | ConstValue(Const.UInt64 a, _), ConstValue(Const.Int32 n, _) when n >= 0 && n <= 63 -> (mkUInt64Val g (a >>> n)) @@ -895,7 +962,7 @@ let mkAssemblyCodeValueInfo g instrs argvals tys = // We're conservative not to apply any actual data-changing conversions here. | [ ], [v], [ty] -> match stripValue v with - | ConstValue(Const.Bool a, _) -> + | ConstValue(Const.Bool a, _) -> if typeEquiv g ty g.bool_ty then v elif typeEquiv g ty g.sbyte_ty then mkInt8Val g (if a then 1y else 0y) elif typeEquiv g ty g.int16_ty then mkInt16Val g (if a then 1s else 0s) @@ -904,37 +971,37 @@ let mkAssemblyCodeValueInfo g instrs argvals tys = elif typeEquiv g ty g.uint16_ty then mkUInt16Val g (if a then 1us else 0us) elif typeEquiv g ty g.uint32_ty then mkUInt32Val g (if a then 1u else 0u) else UnknownValue - | ConstValue(Const.SByte a, _) -> + | ConstValue(Const.SByte a, _) -> if typeEquiv g ty g.sbyte_ty then v elif typeEquiv g ty g.int16_ty then mkInt16Val g (Unchecked.int16 a) elif typeEquiv g ty g.int32_ty then mkInt32Val g (Unchecked.int32 a) else UnknownValue - | ConstValue(Const.Byte a, _) -> + | ConstValue(Const.Byte a, _) -> if typeEquiv g ty g.byte_ty then v elif typeEquiv g ty g.uint16_ty then mkUInt16Val g (Unchecked.uint16 a) elif typeEquiv g ty g.uint32_ty then mkUInt32Val g (Unchecked.uint32 a) else UnknownValue - | ConstValue(Const.Int16 a, _) -> + | ConstValue(Const.Int16 a, _) -> if typeEquiv g ty g.int16_ty then v elif typeEquiv g ty g.int32_ty then mkInt32Val g (Unchecked.int32 a) else UnknownValue - | ConstValue(Const.UInt16 a, _) -> + | ConstValue(Const.UInt16 a, _) -> if typeEquiv g ty g.uint16_ty then v elif typeEquiv g ty g.uint32_ty then mkUInt32Val g (Unchecked.uint32 a) else UnknownValue - | ConstValue(Const.Int32 a, _) -> + | ConstValue(Const.Int32 a, _) -> if typeEquiv g ty g.int32_ty then v elif typeEquiv g ty g.uint32_ty then mkUInt32Val g (Unchecked.uint32 a) else UnknownValue - | ConstValue(Const.UInt32 a, _) -> + | ConstValue(Const.UInt32 a, _) -> if typeEquiv g ty g.uint32_ty then v elif typeEquiv g ty g.int32_ty then mkInt32Val g (Unchecked.int32 a) else UnknownValue - | ConstValue(Const.Int64 a, _) -> + | ConstValue(Const.Int64 a, _) -> if typeEquiv g ty g.int64_ty then v elif typeEquiv g ty g.uint64_ty then mkUInt64Val g (Unchecked.uint64 a) else UnknownValue - | ConstValue(Const.UInt64 a, _) -> + | ConstValue(Const.UInt64 a, _) -> if typeEquiv g ty g.uint64_ty then v elif typeEquiv g ty g.int64_ty then mkInt64Val g (Unchecked.int64 a) else UnknownValue @@ -948,37 +1015,30 @@ let mkAssemblyCodeValueInfo g instrs argvals tys = let [] localVarSize = 1 -let inline AddTotalSizes l = l |> List.sumBy (fun x -> x.TotalSize) -let inline AddFunctionSizes l = l |> List.sumBy (fun x -> x.FunctionSize) +let AddTotalSizes l = l |> List.sumBy (fun x -> x.TotalSize) -//------------------------------------------------------------------------- -// opt list/array combinators - zipping (_, _) return type -//------------------------------------------------------------------------- -let inline OrEffects l = List.exists (fun x -> x.HasEffect) l +let AddFunctionSizes l = l |> List.sumBy (fun x -> x.FunctionSize) -let inline OrTailcalls l = List.exists (fun x -> x.MightMakeCriticalTailcall) l +/// list/array combinators - zipping (_, _) return type +let OrEffects l = List.exists (fun x -> x.HasEffect) l + +let OrTailcalls l = List.exists (fun x -> x.MightMakeCriticalTailcall) l let OptimizeList f l = l |> List.map f |> List.unzip let NoExprs : (Expr list * list>) = [], [] -//------------------------------------------------------------------------- -// Common ways of building new value infos -//------------------------------------------------------------------------- - +/// Common ways of building new value infos let CombineValueInfos einfos res = - { TotalSize = AddTotalSizes einfos - FunctionSize = AddFunctionSizes einfos + { TotalSize = AddTotalSizes einfos + FunctionSize = AddFunctionSizes einfos HasEffect = OrEffects einfos MightMakeCriticalTailcall = OrTailcalls einfos Info = res } let CombineValueInfosUnknown einfos = CombineValueInfos einfos UnknownValue -//------------------------------------------------------------------------- -// Hide information because of a signature -//------------------------------------------------------------------------- - +/// Hide information because of a signature let AbstractLazyModulInfoByHiding isAssemblyBoundary mhi = // The freevars and FreeTyvars can indicate if the non-public (hidden) items have been used. @@ -993,59 +1053,70 @@ let AbstractLazyModulInfoByHiding isAssemblyBoundary mhi = let rec abstractExprInfo ivalue = match ivalue with - (* Check for escaping value. Revert to old info if possible *) + // Check for escaping value. Revert to old info if possible | ValValue (vref2, detail) -> - let detail' = abstractExprInfo detail + let detailR = abstractExprInfo detail let v2 = vref2.Deref let tyvars = freeInVal CollectAll v2 if (isAssemblyBoundary && not (freeTyvarsAllPublic tyvars)) || Zset.exists hiddenTycon tyvars.FreeTycons || hiddenVal v2 - then detail' - else ValValue (vref2, detail') + then detailR + else ValValue (vref2, detailR) + // Check for escape in lambda | CurriedLambdaValue (_, _, _, expr, _) | ConstExprValue(_, expr) when (let fvs = freeInExpr CollectAll expr (isAssemblyBoundary && not (freeVarsAllPublic fvs)) || - Zset.exists hiddenVal fvs.FreeLocals || - Zset.exists hiddenTycon fvs.FreeTyvars.FreeTycons || - Zset.exists hiddenTyconRepr fvs.FreeLocalTyconReprs || - Zset.exists hiddenRecdField fvs.FreeRecdFields || + Zset.exists hiddenVal fvs.FreeLocals || + Zset.exists hiddenTycon fvs.FreeTyvars.FreeTycons || + Zset.exists hiddenTyconRepr fvs.FreeLocalTyconReprs || + Zset.exists hiddenRecdField fvs.FreeRecdFields || Zset.exists hiddenUnionCase fvs.FreeUnionCases ) -> UnknownValue + // Check for escape in constant | ConstValue(_, ty) when (let ftyvs = freeInType CollectAll ty (isAssemblyBoundary && not (freeTyvarsAllPublic ftyvs)) || Zset.exists hiddenTycon ftyvs.FreeTycons) -> UnknownValue - | TupleValue vinfos -> + + | TupleValue vinfos -> TupleValue (Array.map abstractExprInfo vinfos) - | RecdValue (tcref, vinfos) -> + + | RecdValue (tcref, vinfos) -> if hiddenTyconRepr tcref.Deref || Array.exists (tcref.MakeNestedRecdFieldRef >> hiddenRecdField) tcref.AllFieldsArray then UnknownValue else RecdValue (tcref, Array.map abstractExprInfo vinfos) + | UnionCaseValue(ucref, vinfos) -> let tcref = ucref.TyconRef if hiddenTyconRepr ucref.Tycon || tcref.UnionCasesArray |> Array.exists (tcref.MakeNestedUnionCaseRef >> hiddenUnionCase) then UnknownValue else UnionCaseValue (ucref, Array.map abstractExprInfo vinfos) - | SizeValue(_vdepth, vinfo) -> MakeSizedValueInfo (abstractExprInfo vinfo) + + | SizeValue(_vdepth, vinfo) -> + MakeSizedValueInfo (abstractExprInfo vinfo) + | UnknownValue | ConstExprValue _ | CurriedLambdaValue _ - | ConstValue _ -> ivalue + | ConstValue _ -> ivalue + and abstractValInfo v = { ValExprInfo=abstractExprInfo v.ValExprInfo ValMakesNoCriticalTailcalls=v.ValMakesNoCriticalTailcalls } + and abstractModulInfo ss = { ModuleOrNamespaceInfos = NameMap.map abstractLazyModulInfo ss.ModuleOrNamespaceInfos ValInfos = ValInfos(ss.ValInfos.Entries |> Seq.filter (fun (vref, _) -> not (hiddenVal vref.Deref)) - |> Seq.map (fun (vref, e) -> check (* "its implementation uses a binding hidden by a signature" m *) vref (abstractValInfo e) )) } - and abstractLazyModulInfo (ss:LazyModuleInfo) = + |> Seq.map (fun (vref, e) -> check (* "its implementation uses a binding hidden by a signature" m *) vref (abstractValInfo e) )) } + + and abstractLazyModulInfo (ss: LazyModuleInfo) = ss.Force() |> abstractModulInfo |> notlazy abstractLazyModulInfo @@ -1053,19 +1124,16 @@ let AbstractLazyModulInfoByHiding isAssemblyBoundary mhi = /// Hide all information except what we need for "must inline". We always save this optimization information let AbstractOptimizationInfoToEssentials = - let rec abstractModulInfo (ss:ModuleInfo) = + let rec abstractModulInfo (ss: ModuleInfo) = { ModuleOrNamespaceInfos = NameMap.map (Lazy.force >> abstractModulInfo >> notlazy) ss.ModuleOrNamespaceInfos - ValInfos = ss.ValInfos.Filter (fun (v, _) -> v.MustInline) } + ValInfos = ss.ValInfos.Filter (fun (v, _) -> v.MustInline) } + and abstractLazyModulInfo ss = ss |> Lazy.force |> abstractModulInfo |> notlazy abstractLazyModulInfo - -//------------------------------------------------------------------------- -// Hide information because of a "let ... in ..." or "let rec ... in ... " -//------------------------------------------------------------------------- - -let AbstractExprInfoByVars (boundVars:Val list, boundTyVars) ivalue = +/// Hide information because of a "let ... in ..." or "let rec ... in ... " +let AbstractExprInfoByVars (boundVars: Val list, boundTyVars) ivalue = // Module and member bindings can be skipped when checking abstraction, since abstraction of these values has already been done when // we hit the end of the module and called AbstractLazyModulInfoByHiding. If we don't skip these then we end up quadtratically retraversing // the inferred optimization data, i.e. at each binding all the way up a sequences of 'lets' in a module. @@ -1088,11 +1156,11 @@ let AbstractExprInfoByVars (boundVars:Val list, boundTyVars) ivalue = abstractExprInfo detail | ValValue (v2, detail) -> - let detail' = abstractExprInfo detail - ValValue (v2, detail') + let detailR = abstractExprInfo detail + ValValue (v2, detailR) // Check for escape in lambda - | CurriedLambdaValue (_, _, _, expr, _) | ConstExprValue(_, expr) when + | CurriedLambdaValue (_, _, _, expr, _) | ConstExprValue(_, expr) when (let fvs = freeInExpr (if isNil boundTyVars then CollectLocals else CollectTyparsAndLocals) expr (not (isNil boundVars) && List.exists (Zset.memberOf fvs.FreeLocals) boundVars) || (not (isNil boundTyVars) && List.exists (Zset.memberOf fvs.FreeTyvars.FreeTypars) boundTyVars) || @@ -1123,49 +1191,48 @@ let AbstractExprInfoByVars (boundVars:Val list, boundTyVars) ivalue = ValMakesNoCriticalTailcalls=v.ValMakesNoCriticalTailcalls } and abstractModulInfo ss = - { ModuleOrNamespaceInfos = ss.ModuleOrNamespaceInfos |> NameMap.map (Lazy.force >> abstractModulInfo >> notlazy) + { ModuleOrNamespaceInfos = ss.ModuleOrNamespaceInfos |> NameMap.map (Lazy.force >> abstractModulInfo >> notlazy) ValInfos = ss.ValInfos.Map (fun (vref, e) -> check vref (abstractValInfo e) ) } abstractExprInfo ivalue -//------------------------------------------------------------------------- -// Remap optimization information, e.g. to use public stable references so we can pickle it -// to disk. -//------------------------------------------------------------------------- +/// Remap optimization information, e.g. to use public stable references so we can pickle it +/// to disk. let RemapOptimizationInfo g tmenv = let rec remapExprInfo ivalue = match ivalue with - | ValValue (v, detail) -> ValValue (remapValRef tmenv v, remapExprInfo detail) - | TupleValue vinfos -> TupleValue (Array.map remapExprInfo vinfos) - | RecdValue (tcref, vinfos) -> RecdValue (remapTyconRef tmenv.tyconRefRemap tcref, Array.map remapExprInfo vinfos) + | ValValue (v, detail) -> ValValue (remapValRef tmenv v, remapExprInfo detail) + | TupleValue vinfos -> TupleValue (Array.map remapExprInfo vinfos) + | RecdValue (tcref, vinfos) -> RecdValue (remapTyconRef tmenv.tyconRefRemap tcref, Array.map remapExprInfo vinfos) | UnionCaseValue(cspec, vinfos) -> UnionCaseValue (remapUnionCaseRef tmenv.tyconRefRemap cspec, Array.map remapExprInfo vinfos) | SizeValue(_vdepth, vinfo) -> MakeSizedValueInfo (remapExprInfo vinfo) - | UnknownValue -> UnknownValue - | CurriedLambdaValue (uniq, arity, sz, expr, ty) -> CurriedLambdaValue (uniq, arity, sz, remapExpr g CloneAll tmenv expr, remapPossibleForallTy g tmenv ty) - | ConstValue (c, ty) -> ConstValue (c, remapPossibleForallTy g tmenv ty) - | ConstExprValue (sz, expr) -> ConstExprValue (sz, remapExpr g CloneAll tmenv expr) + | UnknownValue -> UnknownValue + | CurriedLambdaValue (uniq, arity, sz, expr, ty) -> CurriedLambdaValue (uniq, arity, sz, remapExpr g CloneAll tmenv expr, remapPossibleForallTy g tmenv ty) + | ConstValue (c, ty) -> ConstValue (c, remapPossibleForallTy g tmenv ty) + | ConstExprValue (sz, expr) -> ConstExprValue (sz, remapExpr g CloneAll tmenv expr) + + let remapValInfo v = + { ValExprInfo=remapExprInfo v.ValExprInfo + ValMakesNoCriticalTailcalls=v.ValMakesNoCriticalTailcalls } - let remapValInfo v = { ValExprInfo=remapExprInfo v.ValExprInfo; ValMakesNoCriticalTailcalls=v.ValMakesNoCriticalTailcalls } let rec remapModulInfo ss = { ModuleOrNamespaceInfos = ss.ModuleOrNamespaceInfos |> NameMap.map remapLazyModulInfo - ValInfos = ss.ValInfos.Map (fun (vref, vinfo) -> - let vref' = remapValRef tmenv vref - let vinfo = remapValInfo vinfo - // Propagate any inferred ValMakesNoCriticalTailcalls flag from implementation to signature information - if vinfo.ValMakesNoCriticalTailcalls then vref'.Deref.SetMakesNoCriticalTailcalls() - (vref', vinfo)) } + ValInfos = + ss.ValInfos.Map (fun (vref, vinfo) -> + let vrefR = remapValRef tmenv vref + let vinfo = remapValInfo vinfo + // Propagate any inferred ValMakesNoCriticalTailcalls flag from implementation to signature information + if vinfo.ValMakesNoCriticalTailcalls then vrefR.Deref.SetMakesNoCriticalTailcalls() + (vrefR, vinfo)) } and remapLazyModulInfo ss = ss |> Lazy.force |> remapModulInfo |> notlazy remapLazyModulInfo -//------------------------------------------------------------------------- -// Hide information when a value is no longer visible -//------------------------------------------------------------------------- - +/// Hide information when a value is no longer visible let AbstractAndRemapModulInfo msg g m (repackage, hidden) info = let mrpi = mkRepackageRemapping repackage #if DEBUG @@ -1226,13 +1293,23 @@ let ValueOfExpr expr = // member x.Next = let (SingleUnion i) = x in SingleUnion (i+1) // // See https://github.com/Microsoft/visualfsharp/issues/5136 +// +// +// note: allocating an object with observable identity (i.e. a name) +// or reading from a mutable field counts as an 'effect', i.e. +// this context 'effect' has it's usual meaning in the effect analysis literature of +// read-from-mutable +// write-to-mutable +// name-generation +// arbitrary-side-effect (e.g. 'non-termination' or 'fire the missiles') + let IsDiscardableEffectExpr expr = match expr with | Expr.Op (TOp.LValueOp (LByrefGet _, _), [], [], _) -> true | _ -> false /// Checks is a value binding is non-discardable -let ValueIsUsedOrHasEffect cenv fvs (b:Binding, binfo) = +let ValueIsUsedOrHasEffect cenv fvs (b: Binding, binfo) = let v = b.Var not (cenv.settings.EliminateUnusedBindings()) || Option.isSome v.MemberInfo || @@ -1243,32 +1320,16 @@ let ValueIsUsedOrHasEffect cenv fvs (b:Binding, binfo) = let rec SplitValuesByIsUsedOrHasEffect cenv fvs x = x |> List.filter (ValueIsUsedOrHasEffect cenv fvs) |> List.unzip -//------------------------------------------------------------------------- -// -//------------------------------------------------------------------------- - let IlAssemblyCodeInstrHasEffect i = match i with - | ( AI_nop | AI_ldc _ | AI_add | AI_sub | AI_mul | AI_xor | AI_and | AI_or + | ( AI_nop | AI_ldc _ | AI_add | AI_sub | AI_mul | AI_xor | AI_and | AI_or | AI_ceq | AI_cgt | AI_cgt_un | AI_clt | AI_clt_un | AI_conv _ | AI_shl | AI_shr | AI_shr_un | AI_neg | AI_not | AI_ldnull ) - | I_ldstr _ | I_ldtoken _ -> false + | I_ldstr _ | I_ldtoken _ -> false | _ -> true let IlAssemblyCodeHasEffect instrs = List.exists IlAssemblyCodeInstrHasEffect instrs -//------------------------------------------------------------------------- -// Effects -// -// note: allocating an object with observable identity (i.e. a name) -// or reading from a mutable field counts as an 'effect', i.e. -// this context 'effect' has it's usual meaning in the effect analysis literature of -// read-from-mutable -// write-to-mutable -// name-generation -// arbitrary-side-effect (e.g. 'non-termination' or 'fire the missiles') -//------------------------------------------------------------------------- - let rec ExprHasEffect g expr = match expr with | Expr.Val (vref, _, _) -> vref.IsTypeFunction || (vref.IsMutable) @@ -1283,9 +1344,13 @@ let rec ExprHasEffect g expr = | Expr.Let(bind, body, _, _) -> BindingHasEffect g bind || ExprHasEffect g body // REVIEW: could add Expr.Obj on an interface type - these are similar to records of lambda expressions | _ -> true + and ExprsHaveEffect g exprs = List.exists (ExprHasEffect g) exprs + and BindingsHaveEffect g binds = List.exists (BindingHasEffect g) binds + and BindingHasEffect g bind = bind.Expr |> ExprHasEffect g + and OpHasEffect g m op = match op with | TOp.Tuple _ -> false @@ -1305,8 +1370,8 @@ and OpHasEffect g m op = | TOp.ExnFieldGet(ecref, n) -> isExnFieldMutable ecref n | TOp.RefAddrGet _ -> false | TOp.AnonRecdGet _ -> true // conservative - | TOp.ValFieldGet rfref -> rfref.RecdField.IsMutable || (TryFindTyconRefBoolAttribute g Range.range0 g.attrib_AllowNullLiteralAttribute rfref.TyconRef = Some(true)) - | TOp.ValFieldGetAddr (rfref, _readonly) -> rfref.RecdField.IsMutable + | TOp.ValFieldGet rfref -> rfref.RecdField.IsMutable || (TryFindTyconRefBoolAttribute g Range.range0 g.attrib_AllowNullLiteralAttribute rfref.TyconRef = Some(true)) + | TOp.ValFieldGetAddr (rfref, _readonly) -> rfref.RecdField.IsMutable | TOp.UnionCaseFieldGetAddr _ -> false // union case fields are immutable | TOp.LValueOp (LAddrOf _, _) -> false // addresses of values are always constants | TOp.UnionCaseFieldSet _ @@ -1314,19 +1379,19 @@ and OpHasEffect g m op = | TOp.Coerce | TOp.Reraise | TOp.For _ - | TOp.While _ - | TOp.TryCatch _ (* conservative *) + | TOp.While _ + | TOp.TryCatch _ (* conservative *) | TOp.TryFinally _ (* conservative *) | TOp.TraitCall _ | TOp.Goto _ | TOp.Label _ | TOp.Return | TOp.ILCall _ (* conservative *) - | TOp.LValueOp _ (* conservative *) + | TOp.LValueOp _ (* conservative *) | TOp.ValFieldSet _ -> true -let TryEliminateBinding cenv _env (TBind(vspec1, e1, spBind)) e2 _m = +let TryEliminateBinding cenv _env (TBind(vspec1, e1, spBind)) e2 _m = // don't eliminate bindings if we're not optimizing AND the binding is not a compiler generated variable if not (cenv.optimizing && cenv.settings.EliminateImmediatelyConsumedLocals()) && not vspec1.IsCompilerGenerated then @@ -1374,7 +1439,7 @@ let TryEliminateBinding cenv _env (TBind(vspec1, e1, spBind)) e2 _m = | Expr.App(f, f0ty, tyargs, args, m) when not (vspec1.LogicalName.Contains(suffixForVariablesThatMayNotBeEliminated)) -> match GetImmediateUseContext [] (f::args) with - | Some([], rargs) -> Some (MakeApplicationAndBetaReduce cenv.g (e1, f0ty, [tyargs], rargs , m)) + | Some([], rargs) -> Some (MakeApplicationAndBetaReduce cenv.g (e1, f0ty, [tyargs], rargs, m)) | Some(f::largs, rargs) -> Some (MakeApplicationAndBetaReduce cenv.g (f, f0ty, [tyargs], largs @ (e1::rargs), m)) | None -> None @@ -1385,7 +1450,7 @@ let TryEliminateBinding cenv _env (TBind(vspec1, e1, spBind)) e2 _m = | Expr.Op (c1, tyargs1, [Expr.Op (c2, tyargs2, [arg1;arg2], m2);arg3], m1) -> match GetImmediateUseContext [] [arg1;arg2;arg3] with | Some([], [arg2;arg3]) -> Some (Expr.Op (c1, tyargs1, [Expr.Op (c2, tyargs2, [e1;arg2], m2);arg3], m1)) - | Some([arg1], [arg3]) -> Some (Expr.Op (c1, tyargs1, [Expr.Op (c2, tyargs2, [arg1;e1], m2);arg3], m1)) + | Some([arg1], [arg3]) -> Some (Expr.Op (c1, tyargs1, [Expr.Op (c2, tyargs2, [arg1;e1], m2);arg3], m1)) | Some([arg1;arg2], []) -> Some (Expr.Op (c1, tyargs1, [Expr.Op (c2, tyargs2, [arg1;arg2], m2);e1], m1)) | Some _ -> error(InternalError("unexpected return pattern from GetImmediateUseContext", m1)) | None -> None @@ -1402,10 +1467,8 @@ let TryEliminateBinding cenv _env (TBind(vspec1, e1, spBind)) e2 _m = let TryEliminateLet cenv env bind e2 m = match TryEliminateBinding cenv env bind e2 m with - | Some e2' -> e2', -localVarSize (* eliminated a let, hence reduce size estimate *) - | None -> mkLetBind m bind e2 , 0 - -//------------------------------------------------------------------------- + | Some e2R -> e2R, -localVarSize (* eliminated a let, hence reduce size estimate *) + | None -> mkLetBind m bind e2, 0 /// Detect the application of a value to an arbitrary number of arguments let rec (|KnownValApp|_|) expr = @@ -1424,7 +1487,7 @@ let (|TDBoolSwitch|_|) dtree = None /// Check target that have a constant bool value -let (|ConstantBoolTarget|_|) target = +let (|ConstantBoolTarget|_|) target = match target with | TTarget([], Expr.Const (Const.Bool b,_,_),_) -> Some b | _ -> None @@ -1432,33 +1495,33 @@ let (|ConstantBoolTarget|_|) target = /// Is this a tree, where each decision is a two-way switch (to prevent later duplication of trees), and each branch returns or true/false, /// apart from one branch which defers to another expression let rec CountBoolLogicTree ((targets: DecisionTreeTarget[], costOuterCaseTree, costOuterDefaultTree, testBool) as data) tree = - match tree with + match tree with | TDSwitch (_expr, [case], Some defaultTree, _range) -> let tc1,ec1 = CountBoolLogicTree data case.CaseTree let tc2, ec2 = CountBoolLogicTree data defaultTree tc1 + tc2, ec1 + ec2 - | TDSuccess([], idx) -> + | TDSuccess([], idx) -> match targets.[idx] with | ConstantBoolTarget result -> (if result = testBool then costOuterCaseTree else costOuterDefaultTree), 0 | TTarget([], _exp, _) -> costOuterCaseTree + costOuterDefaultTree, 10 | _ -> 100, 100 | _ -> 100, 100 -/// Rewrite a decision tree for which CountBoolLogicTree returned a low number (see below). Produce a new decision +/// Rewrite a decision tree for which CountBoolLogicTree returned a low number (see below). Produce a new decision /// tree where at each ConstantBoolSuccessTree tip we replace with either outerCaseTree or outerDefaultTree /// depending on whether the target result was true/false let rec RewriteBoolLogicTree ((targets: DecisionTreeTarget[], outerCaseTree, outerDefaultTree, testBool) as data) tree = - match tree with + match tree with | TDSwitch (expr, cases, defaultTree, range) -> let cases2 = cases |> List.map (RewriteBoolLogicCase data) let defaultTree2 = defaultTree |> Option.map (RewriteBoolLogicTree data) - TDSwitch (expr, cases2, defaultTree2, range) - | TDSuccess([], idx) -> + TDSwitch (expr, cases2, defaultTree2, range) + | TDSuccess([], idx) -> match targets.[idx] with | ConstantBoolTarget result -> if result = testBool then outerCaseTree else outerDefaultTree | TTarget([], exp, _) -> mkBoolSwitch exp.Range exp (if testBool then outerCaseTree else outerDefaultTree) (if testBool then outerDefaultTree else outerCaseTree) | _ -> failwith "CountBoolLogicTree should exclude this case" - | _ -> failwith "CountBoolLogicTree should exclude this case" + | _ -> failwith "CountBoolLogicTree should exclude this case" and RewriteBoolLogicCase data (TCase(test, tree)) = TCase(test, RewriteBoolLogicTree data tree) @@ -1473,9 +1536,9 @@ let rec CombineBoolLogic expr = | Expr.Match(outerSP, outerMatchRange, TDBoolSwitch(Expr.Match(_innerSP, _innerMatchRange, innerTree, innerTargets, _innerDefaultRange, _innerMatchTy), outerTestBool, outerCaseTree, outerDefaultTree, _outerSwitchRange ), - outerTargets, outerDefaultRange, outerMatchTy) -> + outerTargets, outerDefaultRange, outerMatchTy) -> - let costOuterCaseTree = match outerCaseTree with TDSuccess _ -> 0 | _ -> 1 + let costOuterCaseTree = match outerCaseTree with TDSuccess _ -> 0 | _ -> 1 let costOuterDefaultTree = match outerDefaultTree with TDSuccess _ -> 0 | _ -> 1 let tc, ec = CountBoolLogicTree (innerTargets, costOuterCaseTree, costOuterDefaultTree, outerTestBool) innerTree // At most one expression, no overall duplication of TSwitch nodes @@ -1491,7 +1554,6 @@ let rec CombineBoolLogic expr = | _ -> expr - //------------------------------------------------------------------------- // ExpandStructuralBinding // @@ -1508,17 +1570,18 @@ let CanExpandStructuralBinding (v: Val) = not v.IsMutable let ExprIsValue = function Expr.Val _ -> true | _ -> false + let ExpandStructuralBindingRaw cenv expr = match expr with | Expr.Let (TBind(v, rhs, tgtSeqPtOpt), body, m, _) when (isRefTupleExpr rhs && CanExpandStructuralBinding v) -> - let args = tryDestRefTupleExpr rhs + let args = tryDestRefTupleExpr rhs if List.forall ExprIsValue args then expr (* avoid re-expanding when recursion hits original binding *) else let argTys = destRefTupleTy cenv.g v.Type - let argBind i (arg:Expr) argTy = + let argBind i (arg: Expr) argTy = let name = v.LogicalName + "_" + string i let v, ve = mkCompGenLocal arg.Range name argTy ve, mkCompGenBind v arg @@ -1526,7 +1589,6 @@ let ExpandStructuralBindingRaw cenv expr = let ves, binds = List.mapi2 argBind args argTys |> List.unzip let tuple = mkRefTupled cenv.g m ves argTys mkLetsBind m binds (mkLet tgtSeqPtOpt m v tuple body) - (* REVIEW: other cases - records, explicit lists etc. *) | expr -> expr // Moves outer tuple binding inside near the tupled expression: @@ -1557,63 +1619,51 @@ let ExpandStructuralBinding cenv expr = | None -> expr | e -> ExpandStructuralBindingRaw cenv e -//------------------------------------------------------------------------- -// QueryBuilder.Run elimination helpers -//------------------------------------------------------------------------- - /// Detect a query { ... } let (|QueryRun|_|) g expr = -//#if DEBUG -// g.query_run_value_vref.Deref |> ignore -// g.query_run_enumerable_vref.Deref |> ignore -//#endif match expr with | Expr.App(Expr.Val (vref, _, _), _, _, [_builder; arg], _) when valRefEq g vref g.query_run_value_vref -> Some (arg, None) - | Expr.App(Expr.Val (vref, _, _), _, [ elemTy ] , [_builder; arg], _) when valRefEq g vref g.query_run_enumerable_vref -> + | Expr.App(Expr.Val (vref, _, _), _, [ elemTy ], [_builder; arg], _) when valRefEq g vref g.query_run_enumerable_vref -> Some (arg, Some elemTy) | _ -> None let (|MaybeRefTupled|) e = tryDestRefTupleExpr e + let (|AnyInstanceMethodApp|_|) e = match e with | Expr.App(Expr.Val (vref, _, _), _, tyargs, [obj; MaybeRefTupled args], _) -> Some (vref, tyargs, obj, args) | _ -> None -let (|InstanceMethodApp|_|) g (expectedValRef:ValRef) e = -//#if DEBUG -// expectedValRef.Deref |> ignore -//#endif - //printfn "for vref = %A" (expectedValRef.TryDeref |> Option.map (fun x -> x.DisplayName)) +let (|InstanceMethodApp|_|) g (expectedValRef: ValRef) e = match e with | AnyInstanceMethodApp (vref, tyargs, obj, args) when valRefEq g vref expectedValRef -> Some (tyargs, obj, args) - | _ -> None + | _ -> None let (|QuerySourceEnumerable|_|) g = function - | InstanceMethodApp g g.query_source_vref ([resTy], _builder, [res]) -> Some (resTy, res) - | _ -> None + | InstanceMethodApp g g.query_source_vref ([resTy], _builder, [res]) -> Some (resTy, res) + | _ -> None let (|QueryFor|_|) g = function - | InstanceMethodApp g g.query_for_vref ([srcTy;qTy;resTy;_qInnerTy], _builder, [src;selector]) -> Some (qTy, srcTy, resTy, src, selector) - | _ -> None - + | InstanceMethodApp g g.query_for_vref ([srcTy;qTy;resTy;_qInnerTy], _builder, [src;selector]) -> Some (qTy, srcTy, resTy, src, selector) + | _ -> None let (|QueryYield|_|) g = function - | InstanceMethodApp g g.query_yield_vref ([resTy;qTy], _builder, [res]) -> Some (qTy, resTy, res) - | _ -> None + | InstanceMethodApp g g.query_yield_vref ([resTy;qTy], _builder, [res]) -> Some (qTy, resTy, res) + | _ -> None let (|QueryYieldFrom|_|) g = function - | InstanceMethodApp g g.query_yield_from_vref ([resTy;qTy], _builder, [res]) -> Some (qTy, resTy, res) - | _ -> None + | InstanceMethodApp g g.query_yield_from_vref ([resTy;qTy], _builder, [res]) -> Some (qTy, resTy, res) + | _ -> None let (|QuerySelect|_|) g = function - | InstanceMethodApp g g.query_select_vref ([srcTy;qTy;resTy], _builder, [src;selector]) -> Some (qTy, srcTy, resTy, src, selector) - | _ -> None + | InstanceMethodApp g g.query_select_vref ([srcTy;qTy;resTy], _builder, [src;selector]) -> Some (qTy, srcTy, resTy, src, selector) + | _ -> None let (|QueryZero|_|) g = function - | InstanceMethodApp g g.query_zero_vref ([resTy;qTy], _builder, _) -> Some (qTy, resTy) - | _ -> None + | InstanceMethodApp g g.query_zero_vref ([resTy;qTy], _builder, _) -> Some (qTy, resTy) + | _ -> None /// Look for a possible tuple and transform let (|AnyRefTupleTrans|) e = @@ -1626,35 +1676,32 @@ let (|AnyQueryBuilderOpTrans|_|) g = function | Expr.App((Expr.Val (vref, _, _) as v), vty, tyargs, [builder; AnyRefTupleTrans( (src::rest), replaceArgs) ], m) when (match vref.ApparentEnclosingEntity with Parent tcref -> tyconRefEq g tcref g.query_builder_tcref | ParentNone -> false) -> Some (src, (fun newSource -> Expr.App(v, vty, tyargs, [builder; replaceArgs(newSource::rest)], m))) - | _ -> None + | _ -> None let mkUnitDelayLambda (g: TcGlobals) m e = let uv, _ = mkCompGenLocal m "unitVar" g.unit_ty mkLambda m uv (e, tyOfExpr g e) - +/// If this returns "Some" then the source is not IQueryable. // := // | query.Select(, ) --> Seq.map(qexprInner', ...) -// | query.For(, ) --> IQueryable if qexprInner is IQueryable, otherwise Seq.collect(qexprInner', ...) -// | query.Yield --> not IQueryable -// | query.YieldFrom --> not IQueryable -// | query.Op(, ) --> IQueryable if qexprInner is IQueryable, otherwise query.Op(qexprInner', ) -// | :> seq<_> --> IQueryable if qexprInner is IQueryable +// | query.For(, ) --> IQueryable if qexprInner is IQueryable, otherwise Seq.collect(qexprInner', ...) +// | query.Yield --> not IQueryable +// | query.YieldFrom --> not IQueryable +// | query.Op(, ) --> IQueryable if qexprInner is IQueryable, otherwise query.Op(qexprInner', ) +// | :> seq<_> --> IQueryable if qexprInner is IQueryable // // := // | query.Select(, ) --> IQueryable if qexprInner is IQueryable, otherwise seq { qexprInner' } -// | query.For(, ) --> IQueryable if qexprInner is IQueryable, otherwise seq { qexprInner' } -// | query.Yield --> not IQueryable, seq { } -// | query.YieldFrom --> not IQueryable, seq { yield! } -// | query.Op(, ) --> IQueryable if qexprOuter is IQueryable, otherwise query.Op(qexpOuter', ) - -//printfn "found Query.Quote" -// If this returns "Some" then the source is not IQueryable. +// | query.For(, ) --> IQueryable if qexprInner is IQueryable, otherwise seq { qexprInner' } +// | query.Yield --> not IQueryable, seq { } +// | query.YieldFrom --> not IQueryable, seq { yield! } +// | query.Op(, ) --> IQueryable if qexprOuter is IQueryable, otherwise query.Op(qexpOuter', ) let rec tryRewriteToSeqCombinators g (e: Expr) = let m = e.Range match e with - // query.Yield --> Seq.singleton - | QueryYield g (_, resultElemTy, vExpr) -> Some (mkCallSeqSingleton g m resultElemTy vExpr) + // query.Yield --> Seq.singleton + | QueryYield g (_, resultElemTy, vExpr) -> Some (mkCallSeqSingleton g m resultElemTy vExpr) // query.YieldFrom (query.Source s) --> s | QueryYieldFrom g (_, _, QuerySourceEnumerable g (_, resExpr)) -> Some resExpr @@ -1699,14 +1746,12 @@ let rec tryRewriteToSeqCombinators g (e: Expr) = None -// This detects forms arising from query expressions, i.e. -// query.Run <@ query.Op(, ) @> -// -// We check if the combinators are marked with tag IEnumerable - if do, we optimize the "Run" and quotation away, since RunQueryAsEnumerable simply performs -// an eval. - - -let TryDetectQueryQuoteAndRun cenv (expr:Expr) = +/// This detects forms arising from query expressions, i.e. +/// query.Run <@ query.Op(, ) @> +/// +/// We check if the combinators are marked with tag IEnumerable - if do, we optimize the "Run" and quotation away, since RunQueryAsEnumerable simply performs +/// an eval. +let TryDetectQueryQuoteAndRun cenv (expr: Expr) = let g = cenv.g match expr with | QueryRun g (bodyOfRun, reqdResultInfo) -> @@ -1721,7 +1766,7 @@ let TryDetectQueryQuoteAndRun cenv (expr:Expr) = // When we find the 'core' of the query expression, then if that is using IEnumerable execution, // try to rewrite the core into combinators approximating the compiled form of seq { ... }, which in turn // are eligible for state-machine representation. If that fails, we still rewrite to combinator form. - let rec loopOuter (e:Expr) = + let rec loopOuter (e: Expr) = match e with | QueryFor g (qTy, _, resultElemTy, _, _) @@ -1760,7 +1805,7 @@ let TryDetectQueryQuoteAndRun cenv (expr:Expr) = match reqdResultInfo, exprIsEnumerableInfo with | Some _, Some _ | None, None -> resultExpr // the expression is a QuerySource, the result is a QuerySource, nothing to do | Some resultElemTy, None -> mkCallGetQuerySourceAsEnumerable cenv.g expr.Range resultElemTy (TType_app(cenv.g.tcref_System_Collections_IEnumerable, [])) resultExpr - | None, Some (resultElemTy, qTy) -> mkCallNewQuerySource cenv.g expr.Range resultElemTy qTy resultExpr + | None, Some (resultElemTy, qTy) -> mkCallNewQuerySource cenv.g expr.Range resultElemTy qTy resultExpr Some resultExprAfterConvertToResultTy | None -> None @@ -1783,11 +1828,8 @@ let IsSystemStringConcatArray (methRef: ILMethodRef) = methRef.ReturnType.BasicQualifiedName = "System.String" && methRef.ArgTypes.Length = 1 && methRef.ArgTypes.Head.BasicQualifiedName = "System.String[]" -//------------------------------------------------------------------------- -// The traversal -//------------------------------------------------------------------------- - -let rec OptimizeExpr cenv (env:IncrementalOptimizationEnv) expr = +/// Optimize/analyze an expression +let rec OptimizeExpr cenv (env: IncrementalOptimizationEnv) expr = // Eliminate subsumption coercions for functions. This must be done post-typechecking because we need // complete inference types. @@ -1797,10 +1839,18 @@ let rec OptimizeExpr cenv (env:IncrementalOptimizationEnv) expr = match expr with // treat the common linear cases to avoid stack overflows, using an explicit continuation - | Expr.Sequential _ | Expr.Let _ -> OptimizeLinearExpr cenv env expr (fun x -> x) + | LinearOpExpr _ + | LinearMatchExpr _ + | Expr.Sequential _ + | Expr.Let _ -> + OptimizeLinearExpr cenv env expr (fun x -> x) + + | Expr.Const (c, m, ty) -> + OptimizeConst cenv env expr (c, m, ty) + + | Expr.Val (v, _vFlags, m) -> + OptimizeVal cenv env expr (v, m) - | Expr.Const (c, m, ty) -> OptimizeConst cenv env expr (c, m, ty) - | Expr.Val (v, _vFlags, m) -> OptimizeVal cenv env expr (v, m) | Expr.Quote(ast, splices, isFromQueryExpression, m, ty) -> let splices = ref (splices.Value |> Option.map (map3Of4 (List.map (OptimizeExpr cenv env >> fst)))) Expr.Quote(ast, splices, isFromQueryExpression, m, ty), @@ -1809,93 +1859,100 @@ let rec OptimizeExpr cenv (env:IncrementalOptimizationEnv) expr = HasEffect = false MightMakeCriticalTailcall=false Info=UnknownValue } - | Expr.Obj (_, ty, basev, expr, overrides, iimpls, m) -> OptimizeObjectExpr cenv env (ty, basev, expr, overrides, iimpls, m) - | Expr.Op (c, tyargs, args, m) -> OptimizeExprOp cenv env (c, tyargs, args, m) + + | Expr.Obj (_, ty, basev, createExpr, overrides, iimpls, m) -> + OptimizeObjectExpr cenv env (ty, basev, createExpr, overrides, iimpls, m) + + | Expr.Op (op, tyargs, args, m) -> + OptimizeExprOp cenv env (op, tyargs, args, m) + | Expr.App(f, fty, tyargs, argsl, m) -> // eliminate uses of query match TryDetectQueryQuoteAndRun cenv expr with | Some newExpr -> OptimizeExpr cenv env newExpr | None -> OptimizeApplication cenv env (f, fty, tyargs, argsl, m) - (* REVIEW: fold the next two cases together *) + | Expr.Lambda(_lambdaId, _, _, argvs, _body, m, rty) -> let topValInfo = ValReprInfo ([], [argvs |> List.map (fun _ -> ValReprInfo.unnamedTopArg1)], ValReprInfo.unnamedRetVal) let ty = mkMultiLambdaTy m argvs rty OptimizeLambdas None cenv env topValInfo expr ty - | Expr.TyLambda(_lambdaId, tps, _body, _m, rty) -> + + | Expr.TyLambda(_lambdaId, tps, _body, _m, rty) -> let topValInfo = ValReprInfo (ValReprInfo.InferTyparInfo tps, [], ValReprInfo.unnamedRetVal) let ty = mkForallTyIfNeeded tps rty OptimizeLambdas None cenv env topValInfo expr ty - | Expr.TyChoose _ -> OptimizeExpr cenv env (TypeRelations.ChooseTyparSolutionsForFreeChoiceTypars cenv.g cenv.amap expr) - | Expr.Match(spMatch, exprm, dtree, targets, m, ty) -> OptimizeMatch cenv env (spMatch, exprm, dtree, targets, m, ty) - | Expr.LetRec (binds, e, m, _) -> OptimizeLetRec cenv env (binds, e, m) - | Expr.StaticOptimization (constraints, e2, e3, m) -> - let e2', e2info = OptimizeExpr cenv env e2 - let e3', e3info = OptimizeExpr cenv env e3 - Expr.StaticOptimization(constraints, e2', e3', m), + + | Expr.TyChoose _ -> + OptimizeExpr cenv env (TypeRelations.ChooseTyparSolutionsForFreeChoiceTypars cenv.g cenv.amap expr) + + | Expr.Match(spMatch, exprm, dtree, targets, m, ty) -> + OptimizeMatch cenv env (spMatch, exprm, dtree, targets, m, ty) + + | Expr.LetRec (binds, bodyExpr, m, _) -> + OptimizeLetRec cenv env (binds, bodyExpr, m) + + | Expr.StaticOptimization (constraints, expr2, expr3, m) -> + let expr2R, e2info = OptimizeExpr cenv env expr2 + let expr3R, e3info = OptimizeExpr cenv env expr3 + Expr.StaticOptimization(constraints, expr2R, expr3R, m), { TotalSize = min e2info.TotalSize e3info.TotalSize FunctionSize = min e2info.FunctionSize e3info.FunctionSize HasEffect = e2info.HasEffect || e3info.HasEffect MightMakeCriticalTailcall=e2info.MightMakeCriticalTailcall || e3info.MightMakeCriticalTailcall // seems conservative Info= UnknownValue } + | Expr.Link _eref -> assert ("unexpected reclink" = "") failwith "Unexpected reclink" -//------------------------------------------------------------------------- -// Optimize/analyze an object expression -//------------------------------------------------------------------------- - +/// Optimize/analyze an object expression and OptimizeObjectExpr cenv env (ty, baseValOpt, basecall, overrides, iimpls, m) = - let basecall', basecallinfo = OptimizeExpr cenv env basecall - let overrides', overrideinfos = OptimizeMethods cenv env baseValOpt overrides - let iimpls', iimplsinfos = OptimizeInterfaceImpls cenv env baseValOpt iimpls - let expr'=mkObjExpr(ty, baseValOpt, basecall', overrides', iimpls', m) - expr', { TotalSize=closureTotalSize + basecallinfo.TotalSize + AddTotalSizes overrideinfos + AddTotalSizes iimplsinfos + let basecallR, basecallinfo = OptimizeExpr cenv env basecall + let overridesR, overrideinfos = OptimizeMethods cenv env baseValOpt overrides + let iimplsR, iimplsinfos = OptimizeInterfaceImpls cenv env baseValOpt iimpls + let exprR=mkObjExpr(ty, baseValOpt, basecallR, overridesR, iimplsR, m) + exprR, { TotalSize=closureTotalSize + basecallinfo.TotalSize + AddTotalSizes overrideinfos + AddTotalSizes iimplsinfos FunctionSize=1 (* a newobj *) HasEffect=true MightMakeCriticalTailcall=false // creating an object is not a useful tailcall Info=UnknownValue} -//------------------------------------------------------------------------- -// Optimize/analyze the methods that make up an object expression -//------------------------------------------------------------------------- +/// Optimize/analyze the methods that make up an object expression +and OptimizeMethods cenv env baseValOpt methods = + OptimizeList (OptimizeMethod cenv env baseValOpt) methods -and OptimizeMethods cenv env baseValOpt l = OptimizeList (OptimizeMethod cenv env baseValOpt) l and OptimizeMethod cenv env baseValOpt (TObjExprMethod(slotsig, attribs, tps, vs, e, m) as tmethod) = let env = {env with latestBoundId=Some tmethod.Id; functionVal = None} let env = BindTypeVarsToUnknown tps env let env = BindInternalValsToUnknown cenv vs env let env = Option.foldBack (BindInternalValToUnknown cenv) baseValOpt env - let e', einfo = OptimizeExpr cenv env e - (* REVIEW: if we ever change this from being UnknownValue then we should call AbstractExprInfoByVars *) - TObjExprMethod(slotsig, attribs, tps, vs, e', m), + let eR, einfo = OptimizeExpr cenv env e + // Note: if we ever change this from being UnknownValue then we should call AbstractExprInfoByVars + TObjExprMethod(slotsig, attribs, tps, vs, eR, m), { TotalSize = einfo.TotalSize FunctionSize = 0 HasEffect = false MightMakeCriticalTailcall=false Info=UnknownValue} -//------------------------------------------------------------------------- -// Optimize/analyze the interface implementations that form part of an object expression -//------------------------------------------------------------------------- +/// Optimize/analyze the interface implementations that form part of an object expression +and OptimizeInterfaceImpls cenv env baseValOpt iimpls = + OptimizeList (OptimizeInterfaceImpl cenv env baseValOpt) iimpls -and OptimizeInterfaceImpls cenv env baseValOpt l = OptimizeList (OptimizeInterfaceImpl cenv env baseValOpt) l +/// Optimize/analyze the interface implementations that form part of an object expression and OptimizeInterfaceImpl cenv env baseValOpt (ty, overrides) = - let overrides', overridesinfos = OptimizeMethods cenv env baseValOpt overrides - (ty, overrides'), + let overridesR, overridesinfos = OptimizeMethods cenv env baseValOpt overrides + (ty, overridesR), { TotalSize = AddTotalSizes overridesinfos FunctionSize = 1 HasEffect = false MightMakeCriticalTailcall=false Info=UnknownValue} -//------------------------------------------------------------------------- -// Make and optimize String.Concat calls -//------------------------------------------------------------------------- - +/// Make and optimize String.Concat calls and MakeOptimizedSystemStringConcatCall cenv env m args = - let rec optimizeArg e accArgs = - match e, accArgs with + let rec optimizeArg argExpr accArgs = + match argExpr, accArgs with | Expr.Op(TOp.ILCall(_, _, _, _, _, _, _, methRef, _, _, _), _, [ Expr.Op(TOp.Array, _, args, _) ], _), _ when IsSystemStringConcatArray methRef -> optimizeArgs args accArgs @@ -1914,7 +1971,7 @@ and MakeOptimizedSystemStringConcatCall cenv env m args = let args = optimizeArgs args [] - let e = + let expr = match args with | [ arg ] -> arg @@ -1928,25 +1985,22 @@ and MakeOptimizedSystemStringConcatCall cenv env m args = let arg = mkArray (cenv.g.string_ty, args, m) mkStaticCall_String_Concat_Array cenv.g m arg - match e with + match expr with | Expr.Op(TOp.ILCall(_, _, _, _, _, _, _, methRef, _, _, _) as op, tyargs, args, m) when IsSystemStringConcatOverload methRef || IsSystemStringConcatArray methRef -> OptimizeExprOpReductions cenv env (op, tyargs, args, m) | _ -> - OptimizeExpr cenv env e - -//------------------------------------------------------------------------- -// Optimize/analyze an application of an intrinsic operator to arguments -//------------------------------------------------------------------------- + OptimizeExpr cenv env expr +/// Optimize/analyze an application of an intrinsic operator to arguments and OptimizeExprOp cenv env (op, tyargs, args, m) = // Special cases match op, tyargs, args with - | TOp.Coerce, [toty;fromty], [e] -> - let e', einfo = OptimizeExpr cenv env e - if typeEquiv cenv.g toty fromty then e', einfo + | TOp.Coerce, [toty;fromty], [arg] -> + let argR, einfo = OptimizeExpr cenv env arg + if typeEquiv cenv.g toty fromty then argR, einfo else - mkCoerceExpr(e', toty, m, fromty), + mkCoerceExpr(argR, toty, m, fromty), { TotalSize=einfo.TotalSize + 1 FunctionSize=einfo.FunctionSize + 1 HasEffect = true @@ -1970,10 +2024,10 @@ and OptimizeExprOp cenv env (op, tyargs, args, m) = Info = ValueOfExpr newExpr } // Handle these as special cases since mutables are allowed inside their bodies - | TOp.While (spWhile, marker), _, [Expr.Lambda(_, _, _, [_], e1, _, _);Expr.Lambda(_, _, _, [_], e2, _, _)] -> + | TOp.While (spWhile, marker), _, [Expr.Lambda(_, _, _, [_], e1, _, _);Expr.Lambda(_, _, _, [_], e2, _, _)] -> OptimizeWhileLoop cenv { env with inLoop=true } (spWhile, marker, e1, e2, m) - | TOp.For(spStart, dir), _, [Expr.Lambda(_, _, _, [_], e1, _, _);Expr.Lambda(_, _, _, [_], e2, _, _);Expr.Lambda(_, _, _, [v], e3, _, _)] -> + | TOp.For(spStart, dir), _, [Expr.Lambda(_, _, _, [_], e1, _, _);Expr.Lambda(_, _, _, [_], e2, _, _);Expr.Lambda(_, _, _, [v], e3, _, _)] -> OptimizeFastIntegerForLoop cenv { env with inLoop=true } (spStart, v, e1, dir, e2, e3, m) | TOp.TryFinally(spTry, spFinally), [resty], [Expr.Lambda(_, _, _, [_], e1, _, _); Expr.Lambda(_, _, _, [_], e2, _, _)] -> @@ -1996,7 +2050,6 @@ and OptimizeExprOp cenv env (op, tyargs, args, m) = isArray1DTy cenv.g (tyOfExpr cenv.g arg)) -> OptimizeExpr cenv env (Expr.Op(TOp.ILAsm(i_ldlen, [cenv.g.int_ty]), [], [arg], m)) - // Empty IL instruction lists are used as casts in prim-types.fs. But we can get rid of them // if the types match up. | TOp.ILAsm([], [ty]), _, [a] when typeEquiv cenv.g (tyOfExpr cenv.g a) ty -> OptimizeExpr cenv env a @@ -2012,7 +2065,10 @@ and OptimizeExprOp cenv env (op, tyargs, args, m) = OptimizeExprOpReductions cenv env (op, tyargs, args, m) and OptimizeExprOpReductions cenv env (op, tyargs, args, m) = - let args', arginfos = OptimizeExprsThenConsiderSplits cenv env args + let argsR, arginfos = OptimizeExprsThenConsiderSplits cenv env args + OptimizeExprOpReductionsAfter cenv env (op, tyargs, argsR, arginfos, m) + +and OptimizeExprOpReductionsAfter cenv env (op, tyargs, argsR, arginfos, m) = let knownValue = match op, arginfos with | TOp.ValFieldGet (rf), [e1info] -> TryOptimizeRecordFieldGet cenv env (e1info, rf, tyargs, m) @@ -2021,13 +2077,13 @@ and OptimizeExprOpReductions cenv env (op, tyargs, args, m) = | _ -> None match knownValue with | Some valu -> - match TryOptimizeVal cenv env (false, valu, m) with - | Some res -> OptimizeExpr cenv env res (* discard e1 since guard ensures it has no effects *) - | None -> OptimizeExprOpFallback cenv env (op, tyargs, args', m) arginfos valu - | None -> OptimizeExprOpFallback cenv env (op, tyargs, args', m) arginfos UnknownValue + match TryOptimizeVal cenv env (false, valu, m) with + | Some res -> OptimizeExpr cenv env res (* discard e1 since guard ensures it has no effects *) + | None -> OptimizeExprOpFallback cenv env (op, tyargs, argsR, m) arginfos valu + | None -> OptimizeExprOpFallback cenv env (op, tyargs, argsR, m) arginfos UnknownValue -and OptimizeExprOpFallback cenv env (op, tyargs, args', m) arginfos valu = - // The generic case - we may collect information, but the construction/projection doesn't disappear +and OptimizeExprOpFallback cenv env (op, tyargs, argsR, m) arginfos valu = + // The generic case - we may collect information, but the construction/projection doesnRt disappear let argsTSize = AddTotalSizes arginfos let argsFSize = AddFunctionSizes arginfos let argEffects = OrEffects arginfos @@ -2037,11 +2093,11 @@ and OptimizeExprOpFallback cenv env (op, tyargs, args', m) arginfos valu = match op with | TOp.UnionCase c -> 2, MakeValueInfoForUnionCase c (Array.ofList argValues) | TOp.ExnConstr _ -> 2, valu (* REVIEW: information collection possible here *) - | TOp.Tuple tupInfo -> + | TOp.Tuple tupInfo -> let isStruct = evalTupInfoIsStruct tupInfo if isStruct then 0, valu else 1,MakeValueInfoForTuple (Array.ofList argValues) - | TOp.AnonRecd anonInfo -> + | TOp.AnonRecd anonInfo -> let isStruct = evalAnonInfoIsStruct anonInfo if isStruct then 0, valu else 1, valu @@ -2050,22 +2106,22 @@ and OptimizeExprOpFallback cenv env (op, tyargs, args', m) arginfos valu = | TOp.TupleFieldGet _ | TOp.UnionCaseFieldGet _ | TOp.ExnFieldGet _ - | TOp.UnionCaseTagGet _ -> + | TOp.UnionCaseTagGet _ -> // REVIEW: reduction possible here, and may be very effective 1, valu - | TOp.UnionCaseProof _ -> + | TOp.UnionCaseProof _ -> // We count the proof as size 0 // We maintain the value of the source of the proof-cast if it is known to be a UnionCaseValue let valu = match argValues.[0] with | StripUnionCaseValue (uc, info) -> UnionCaseValue(uc, info) - | _ -> valu + | _ -> valu 0, valu - | TOp.ILAsm(instrs, tys) -> + | TOp.ILAsm(instrs, tys) -> min instrs.Length 1, mkAssemblyCodeValueInfo cenv.g instrs argValues tys - | TOp.Bytes bytes -> bytes.Length/10 , valu - | TOp.UInt16s bytes -> bytes.Length/10 , valu + | TOp.Bytes bytes -> bytes.Length/10, valu + | TOp.UInt16s bytes -> bytes.Length/10, valu | TOp.ValFieldGetAddr _ | TOp.Array | TOp.For _ | TOp.While _ | TOp.TryCatch _ | TOp.TryFinally _ | TOp.ILCall _ | TOp.TraitCall _ | TOp.LValueOp _ | TOp.ValFieldSet _ @@ -2101,20 +2157,17 @@ and OptimizeExprOpFallback cenv env (op, tyargs, args', m) arginfos valu = match TryOptimizeValInfo cenv env m vinfo with | Some res -> res, vinfo | None -> - Expr.Op(op, tyargs, args', m), + Expr.Op(op, tyargs, argsR, m), { TotalSize=argsTSize + cost FunctionSize=argsFSize + cost HasEffect=argEffects || effect MightMakeCriticalTailcall= mayBeCriticalTailcall // discard tailcall info for args - these are not in tailcall position Info=valu } -//------------------------------------------------------------------------- -// Optimize/analyze a constant node -//------------------------------------------------------------------------- - +/// Optimize/analyze a constant node and OptimizeConst cenv env expr (c, m, ty) = match TryEliminateDesugaredConstants cenv.g m c with - | Some(e) -> + | Some e -> OptimizeExpr cenv env e | None -> expr, { TotalSize=(match c with @@ -2125,10 +2178,7 @@ and OptimizeConst cenv env expr (c, m, ty) = MightMakeCriticalTailcall=false Info=MakeValueInfoForConst c ty} -//------------------------------------------------------------------------- -// Optimize/analyze a record lookup. -//------------------------------------------------------------------------- - +/// Optimize/analyze a record lookup. and TryOptimizeRecordFieldGet cenv _env (e1info, (RFRef (rtcref, _) as r), _tinst, m) = match destRecdValue e1info.Info with | Some finfos when cenv.settings.EliminateRecdFieldGet() && not e1info.HasEffect -> @@ -2137,7 +2187,7 @@ and TryOptimizeRecordFieldGet cenv _env (e1info, (RFRef (rtcref, _) as r), _tins | None -> let n = r.Index if n >= finfos.Length then errorR(InternalError( "TryOptimizeRecordFieldGet: term argument out of range", m)) - Some finfos.[n] (* Uses INVARIANT on record ValInfos that exprs are in defn order *) + Some finfos.[n] | _ -> None and TryOptimizeTupleFieldGet cenv _env (_tupInfo, e1info, tys, n, m) = @@ -2156,202 +2206,193 @@ and TryOptimizeUnionCaseGet cenv _env (e1info, cspec, _tys, n, m) = Some args.[n] | _ -> None -//------------------------------------------------------------------------- -// Optimize/analyze a for-loop -//------------------------------------------------------------------------- - +/// Optimize/analyze a for-loop and OptimizeFastIntegerForLoop cenv env (spStart, v, e1, dir, e2, e3, m) = - let e1', e1info = OptimizeExpr cenv env e1 - let e2', e2info = OptimizeExpr cenv env e2 + let e1R, e1info = OptimizeExpr cenv env e1 + let e2R, e2info = OptimizeExpr cenv env e2 let env = BindInternalValToUnknown cenv v env - let e3', e3info = OptimizeExpr cenv env e3 + let e3R, e3info = OptimizeExpr cenv env e3 // Try to replace F#-style loops with C# style loops that recompute their bounds but which are compiled more efficiently by the JITs, e.g. - // F# "for x = 0 to arr.Length - 1 do ..." --> C# "for (int x = 0; x < arr.Length; x++) { ... }" - // F# "for x = 0 to 10 do ..." --> C# "for (int x = 0; x < 11; x++) { ... }" - let e2', dir = - match dir, e2' with + // F# "for x = 0 to arr.Length - 1 do ..." --> C# "for (int x = 0; x < arr.Length; x++) { ... }" + // F# "for x = 0 to 10 do ..." --> C# "for (int x = 0; x < 11; x++) { ... }" + let e2R, dir = + match dir, e2R with // detect upwards for loops with bounds of the form "arr.Length - 1" and convert them to a C#-style for loop | FSharpForLoopUp, Expr.Op(TOp.ILAsm([ (AI_sub | AI_sub_ovf)], _), _, [Expr.Op(TOp.ILAsm([ I_ldlen; (AI_conv DT_I4)], _), _, [arre], _); Expr.Const(Const.Int32 1, _, _)], _) when not (snd(OptimizeExpr cenv env arre)).HasEffect -> - mkLdlen cenv.g (e2'.Range) arre, CSharpForLoopUp + mkLdlen cenv.g (e2R.Range) arre, CSharpForLoopUp // detect upwards for loops with constant bounds, but not MaxValue! | FSharpForLoopUp, Expr.Const(Const.Int32 n, _, _) when n < System.Int32.MaxValue -> - mkIncr cenv.g (e2'.Range) e2', CSharpForLoopUp + mkIncr cenv.g (e2R.Range) e2R, CSharpForLoopUp | _ -> - e2', dir + e2R, dir let einfos = [e1info;e2info;e3info] let eff = OrEffects einfos (* neither bounds nor body has an effect, and loops always terminate, hence eliminate the loop *) if not eff then - mkUnit cenv.g m , { TotalSize=0; FunctionSize=0; HasEffect=false; MightMakeCriticalTailcall=false; Info=UnknownValue } + mkUnit cenv.g m, { TotalSize=0; FunctionSize=0; HasEffect=false; MightMakeCriticalTailcall=false; Info=UnknownValue } else - let expr' = mkFor cenv.g (spStart, v, e1', dir, e2', e3', m) - expr', { TotalSize=AddTotalSizes einfos + forAndWhileLoopSize + let exprR = mkFor cenv.g (spStart, v, e1R, dir, e2R, e3R, m) + exprR, { TotalSize=AddTotalSizes einfos + forAndWhileLoopSize FunctionSize=AddFunctionSizes einfos + forAndWhileLoopSize HasEffect=eff MightMakeCriticalTailcall=false Info=UnknownValue } -//------------------------------------------------------------------------- -// Optimize/analyze a set of recursive bindings -//------------------------------------------------------------------------- - +/// Optimize/analyze a set of recursive bindings and OptimizeLetRec cenv env (binds, bodyExpr, m) = let vs = binds |> List.map (fun v -> v.Var) let env = BindInternalValsToUnknown cenv vs env - let binds', env = OptimizeBindings cenv true env binds - let bodyExpr', einfo = OptimizeExpr cenv env bodyExpr + let bindsR, env = OptimizeBindings cenv true env binds + let bodyExprR, einfo = OptimizeExpr cenv env bodyExpr // REVIEW: graph analysis to determine which items are unused // Eliminate any unused bindings, as in let case - let binds'', bindinfos = - let fvs0 = freeInExpr CollectLocals bodyExpr' - let fvs = List.fold (fun acc x -> unionFreeVars acc (fst x |> freeInBindingRhs CollectLocals)) fvs0 binds' - SplitValuesByIsUsedOrHasEffect cenv (fun () -> fvs.FreeLocals) binds' + let bindsRR, bindinfos = + let fvs0 = freeInExpr CollectLocals bodyExprR + let fvs = List.fold (fun acc x -> unionFreeVars acc (fst x |> freeInBindingRhs CollectLocals)) fvs0 bindsR + SplitValuesByIsUsedOrHasEffect cenv (fun () -> fvs.FreeLocals) bindsR // Trim out any optimization info that involves escaping values - let evalue' = AbstractExprInfoByVars (vs, []) einfo.Info + let evalueR = AbstractExprInfoByVars (vs, []) einfo.Info // REVIEW: size of constructing new closures - should probably add #freevars + #recfixups here - let bodyExpr' = Expr.LetRec(binds'', bodyExpr', m, NewFreeVarsCache()) - let info = CombineValueInfos (einfo :: bindinfos) evalue' - bodyExpr', info - -//------------------------------------------------------------------------- -// Optimize/analyze a linear sequence of sequentioanl execution or 'let' bindings. -//------------------------------------------------------------------------- + let bodyExprR = Expr.LetRec(bindsRR, bodyExprR, m, NewFreeVarsCache()) + let info = CombineValueInfos (einfo :: bindinfos) evalueR + bodyExprR, info +/// Optimize/analyze a linear sequence of sequential execution or RletR bindings. and OptimizeLinearExpr cenv env expr contf = + // Eliminate subsumption coercions for functions. This must be done post-typechecking because we need + // complete inference types. let expr = DetectAndOptimizeForExpression cenv.g OptimizeAllForExpressions expr - let expr = if cenv.settings.ExpandStructrualValues() then ExpandStructuralBinding cenv expr else expr + let expr = stripExpr expr + match expr with | Expr.Sequential (e1, e2, flag, spSeq, m) -> - let e1', e1info = OptimizeExpr cenv env e1 - OptimizeLinearExpr cenv env e2 (contf << (fun (e2', e2info) -> + let e1R, e1info = OptimizeExpr cenv env e1 + OptimizeLinearExpr cenv env e2 (contf << (fun (e2R, e2info) -> if (flag = NormalSeq) && // Always eliminate '(); expr' sequences, even in debug code, to ensure that // conditional method calls don't leave a dangling breakpoint (see FSharp 1.0 bug 6034) - (cenv.settings.EliminateSequential () || (match e1' with Expr.Const(Const.Unit, _, _) -> true | _ -> false)) && + (cenv.settings.EliminateSequential () || (match e1R with Expr.Const(Const.Unit, _, _) -> true | _ -> false)) && not e1info.HasEffect then - e2', e2info + e2R, e2info else - Expr.Sequential(e1', e2', flag, spSeq, m), + Expr.Sequential(e1R, e2R, flag, spSeq, m), { TotalSize = e1info.TotalSize + e2info.TotalSize FunctionSize = e1info.FunctionSize + e2info.FunctionSize HasEffect = flag <> NormalSeq || e1info.HasEffect || e2info.HasEffect - MightMakeCriticalTailcall = (if flag = NormalSeq then e2info.MightMakeCriticalTailcall else e1info.MightMakeCriticalTailcall || e2info.MightMakeCriticalTailcall) - Info = UnknownValue (* can't propagate value: must access result of computation for its effects *) })) + MightMakeCriticalTailcall = + (if flag = NormalSeq then e2info.MightMakeCriticalTailcall + else e1info.MightMakeCriticalTailcall || e2info.MightMakeCriticalTailcall) + // can't propagate value: must access result of computation for its effects + Info = UnknownValue })) | Expr.Let (bind, body, m, _) -> - let (bind', bindingInfo), env = OptimizeBinding cenv false env bind - OptimizeLinearExpr cenv env body (contf << (fun (body', bodyInfo) -> + let (bindR, bindingInfo), env = OptimizeBinding cenv false env bind + OptimizeLinearExpr cenv env body (contf << (fun (bodyR, bodyInfo) -> // PERF: This call to ValueIsUsedOrHasEffect/freeInExpr amounts to 9% of all optimization time. // Is it quadratic or quasi-quadtratic? - if ValueIsUsedOrHasEffect cenv (fun () -> (freeInExpr CollectLocals body').FreeLocals) (bind', bindingInfo) then - (* Eliminate let bindings on the way back up *) - let expr', adjust = TryEliminateLet cenv env bind' body' m - expr', + if ValueIsUsedOrHasEffect cenv (fun () -> (freeInExpr CollectLocals bodyR).FreeLocals) (bindR, bindingInfo) then + // Eliminate let bindings on the way back up + let exprR, adjust = TryEliminateLet cenv env bindR bodyR m + exprR, { TotalSize = bindingInfo.TotalSize + bodyInfo.TotalSize + adjust FunctionSize = bindingInfo.FunctionSize + bodyInfo.FunctionSize + adjust HasEffect=bindingInfo.HasEffect || bodyInfo.HasEffect MightMakeCriticalTailcall = bodyInfo.MightMakeCriticalTailcall // discard tailcall info from binding - not in tailcall position Info = UnknownValue } else - (* On the way back up: Trim out any optimization info that involves escaping values on the way back up *) - let evalue' = AbstractExprInfoByVars ([bind'.Var], []) bodyInfo.Info - body', - { TotalSize = bindingInfo.TotalSize + bodyInfo.TotalSize - localVarSize (* eliminated a local var *) + // On the way back up: Trim out any optimization info that involves escaping values on the way back up + let evalueR = AbstractExprInfoByVars ([bindR.Var], []) bodyInfo.Info + bodyR, + { TotalSize = bindingInfo.TotalSize + bodyInfo.TotalSize - localVarSize // eliminated a local var FunctionSize = bindingInfo.FunctionSize + bodyInfo.FunctionSize - localVarSize (* eliminated a local var *) HasEffect=bindingInfo.HasEffect || bodyInfo.HasEffect MightMakeCriticalTailcall = bodyInfo.MightMakeCriticalTailcall // discard tailcall info from binding - not in tailcall position - Info = evalue' } )) + Info = evalueR } )) | LinearMatchExpr (spMatch, exprm, dtree, tg1, e2, spTarget2, m, ty) -> - let dtree, dinfo = OptimizeDecisionTree cenv env m dtree + let dtreeR, dinfo = OptimizeDecisionTree cenv env m dtree let tg1, tg1info = OptimizeDecisionTreeTarget cenv env m tg1 // tailcall OptimizeLinearExpr cenv env e2 (contf << (fun (e2, e2info) -> + // This ConsiderSplitToMethod is performed because it is present in OptimizeDecisionTreeTarget let e2, e2info = ConsiderSplitToMethod cenv.settings.abstractBigTargets cenv.settings.bigTargetSize cenv env (e2, e2info) let tinfos = [tg1info; e2info] - let tgs = [tg1; TTarget([], e2, spTarget2)] - RebuildOptimizedMatch (spMatch, exprm, m, ty, dtree, tgs, dinfo, tinfos))) + let targetsR = [tg1; TTarget([], e2, spTarget2)] + OptimizeMatchPart2 cenv (spMatch, exprm, dtreeR, targetsR, dinfo, tinfos, m, ty))) + + | LinearOpExpr (op, tyargs, argsHead, argLast, m) -> + let argsHeadR, argsHeadInfosR = OptimizeList (OptimizeExprThenConsiderSplit cenv env) argsHead + // tailcall + OptimizeLinearExpr cenv env argLast (contf << (fun (argLastR, argLastInfo) -> + OptimizeExprOpReductionsAfter cenv env (op, tyargs, argsHeadR @ [argLastR], argsHeadInfosR @ [argLastInfo], m))) | _ -> contf (OptimizeExpr cenv env expr) -//------------------------------------------------------------------------- -// Optimize/analyze a try/finally construct. -//------------------------------------------------------------------------- - +/// Optimize/analyze a try/finally construct. and OptimizeTryFinally cenv env (spTry, spFinally, e1, e2, m, ty) = - let e1', e1info = OptimizeExpr cenv env e1 - let e2', e2info = OptimizeExpr cenv env e2 + let e1R, e1info = OptimizeExpr cenv env e1 + let e2R, e2info = OptimizeExpr cenv env e2 let info = { TotalSize = e1info.TotalSize + e2info.TotalSize + tryFinallySize FunctionSize = e1info.FunctionSize + e2info.FunctionSize + tryFinallySize HasEffect = e1info.HasEffect || e2info.HasEffect MightMakeCriticalTailcall = false // no tailcalls from inside in try/finally Info = UnknownValue } - (* try-finally, so no effect means no exception can be raised, so just sequence the finally *) + // try-finally, so no effect means no exception can be raised, so just sequence the finally if cenv.settings.EliminateTryCatchAndTryFinally () && not e1info.HasEffect then let sp = match spTry with | SequencePointAtTry _ -> SequencePointsAtSeq | SequencePointInBodyOfTry -> SequencePointsAtSeq | NoSequencePointAtTry -> SuppressSequencePointOnExprOfSequential - Expr.Sequential(e1', e2', ThenDoSeq, sp, m), info + Expr.Sequential(e1R, e2R, ThenDoSeq, sp, m), info else - mkTryFinally cenv.g (e1', e2', m, ty, spTry, spFinally), + mkTryFinally cenv.g (e1R, e2R, m, ty, spTry, spFinally), info -//------------------------------------------------------------------------- -// Optimize/analyze a try/catch construct. -//------------------------------------------------------------------------- - +/// Optimize/analyze a try/catch construct. and OptimizeTryCatch cenv env (e1, vf, ef, vh, eh, m, ty, spTry, spWith) = - let e1', e1info = OptimizeExpr cenv env e1 + let e1R, e1info = OptimizeExpr cenv env e1 // try-catch, so no effect means no exception can be raised, so discard the catch if cenv.settings.EliminateTryCatchAndTryFinally () && not e1info.HasEffect then - e1', e1info + e1R, e1info else let envinner = BindInternalValToUnknown cenv vf (BindInternalValToUnknown cenv vh env) - let ef', efinfo = OptimizeExpr cenv envinner ef - let eh', ehinfo = OptimizeExpr cenv envinner eh + let efR, efinfo = OptimizeExpr cenv envinner ef + let ehR, ehinfo = OptimizeExpr cenv envinner eh let info = - { TotalSize = e1info.TotalSize + efinfo.TotalSize+ ehinfo.TotalSize + tryCatchSize - FunctionSize = e1info.FunctionSize + efinfo.FunctionSize+ ehinfo.FunctionSize + tryCatchSize + { TotalSize = e1info.TotalSize + efinfo.TotalSize+ ehinfo.TotalSize + tryCatchSize + FunctionSize = e1info.FunctionSize + efinfo.FunctionSize+ ehinfo.FunctionSize + tryCatchSize HasEffect = e1info.HasEffect || efinfo.HasEffect || ehinfo.HasEffect MightMakeCriticalTailcall = false Info = UnknownValue } - mkTryWith cenv.g (e1', vf, ef', vh, eh', m, ty, spTry, spWith), + mkTryWith cenv.g (e1R, vf, efR, vh, ehR, m, ty, spTry, spWith), info -//------------------------------------------------------------------------- -// Optimize/analyze a while loop -//------------------------------------------------------------------------- - -and OptimizeWhileLoop cenv env (spWhile, marker, e1, e2, m) = - let e1', e1info = OptimizeExpr cenv env e1 - let e2', e2info = OptimizeExpr cenv env e2 - mkWhile cenv.g (spWhile, marker, e1', e2', m), +/// Optimize/analyze a while loop +and OptimizeWhileLoop cenv env (spWhile, marker, e1, e2, m) = + let e1R, e1info = OptimizeExpr cenv env e1 + let e2R, e2info = OptimizeExpr cenv env e2 + mkWhile cenv.g (spWhile, marker, e1R, e2R, m), { TotalSize = e1info.TotalSize + e2info.TotalSize + forAndWhileLoopSize FunctionSize = e1info.FunctionSize + e2info.FunctionSize + forAndWhileLoopSize - HasEffect = true (* may not terminate *) + HasEffect = true // may not terminate MightMakeCriticalTailcall = false Info = UnknownValue } -//------------------------------------------------------------------------- -// Optimize/analyze a call to a 'member' constraint. Try to resolve the call to -// a witness (should always be possible due to compulsory inlining of any -// code that contains calls to member constraints, except when analyzing -// not-yet-inlined generic code) -//------------------------------------------------------------------------- - - -and OptimizeTraitCall cenv env (traitInfo, args, m) = +/// Optimize/analyze a call to a 'member' constraint. Try to resolve the call to +/// a witness (should always be possible due to compulsory inlining of any +/// code that contains calls to member constraints, except when analyzing +/// not-yet-inlined generic code) +and OptimizeTraitCall cenv env (traitInfo, args, m) = // Resolve the static overloading early (during the compulsory rewrite phase) so we can inline. match ConstraintSolver.CodegenWitnessThatTypeSupportsTraitConstraint cenv.TcVal cenv.g cenv.amap m traitInfo args with @@ -2359,44 +2400,51 @@ and OptimizeTraitCall cenv env (traitInfo, args, m) = | OkResult (_, Some expr) -> OptimizeExpr cenv env expr // Resolution fails when optimizing generic code, ignore the failure - | _ -> - let args', arginfos = OptimizeExprsThenConsiderSplits cenv env args - OptimizeExprOpFallback cenv env (TOp.TraitCall(traitInfo), [], args', m) arginfos UnknownValue - -//------------------------------------------------------------------------- -// Make optimization decisions once we know the optimization information -// for a value -//------------------------------------------------------------------------- + | _ -> + let argsR, arginfos = OptimizeExprsThenConsiderSplits cenv env args + OptimizeExprOpFallback cenv env (TOp.TraitCall(traitInfo), [], argsR, m) arginfos UnknownValue +/// Make optimization decisions once we know the optimization information +/// for a value and TryOptimizeVal cenv env (mustInline, valInfoForVal, m) = + match valInfoForVal with // Inline all constants immediately - | ConstValue (c, ty) -> Some (Expr.Const (c, m, ty)) - | SizeValue (_, detail) -> TryOptimizeVal cenv env (mustInline, detail, m) - | ValValue (v', detail) -> + | ConstValue (c, ty) -> + Some (Expr.Const (c, m, ty)) + + | SizeValue (_, detail) -> + TryOptimizeVal cenv env (mustInline, detail, m) + + | ValValue (vR, detail) -> // Inline values bound to other values immediately + // Prefer to inline using the more specific info if possible + // If the more specific info didn't reveal an inline then use the value match TryOptimizeVal cenv env (mustInline, detail, m) with - // Prefer to inline using the more specific info if possible | Some e -> Some e - //If the more specific info didn't reveal an inline then use the value - | None -> Some(exprForValRef m v') + | None -> Some(exprForValRef m vR) + | ConstExprValue(_size, expr) -> Some (remarkExpr m (copyExpr cenv.g CloneAllAndMarkExprValsAsCompilerGenerated expr)) + | CurriedLambdaValue (_, _, _, expr, _) when mustInline -> Some (remarkExpr m (copyExpr cenv.g CloneAllAndMarkExprValsAsCompilerGenerated expr)) - | TupleValue _ | UnionCaseValue _ | RecdValue _ when mustInline -> failwith "tuple, union and record values cannot be marked 'inline'" - | UnknownValue when mustInline -> warning(Error(FSComp.SR.optValueMarkedInlineHasUnexpectedValue(), m)); None - | _ when mustInline -> warning(Error(FSComp.SR.optValueMarkedInlineCouldNotBeInlined(), m)); None + + | TupleValue _ | UnionCaseValue _ | RecdValue _ when mustInline -> + failwith "tuple, union and record values cannot be marked 'inline'" + + | UnknownValue when mustInline -> + warning(Error(FSComp.SR.optValueMarkedInlineHasUnexpectedValue(), m)); None + + | _ when mustInline -> + warning(Error(FSComp.SR.optValueMarkedInlineCouldNotBeInlined(), m)); None | _ -> None and TryOptimizeValInfo cenv env m vinfo = - if vinfo.HasEffect then None else TryOptimizeVal cenv env (false, vinfo.Info , m) + if vinfo.HasEffect then None else TryOptimizeVal cenv env (false, vinfo.Info, m) -//------------------------------------------------------------------------- -// Add 'v1 = v2' information into the information stored about a value -//------------------------------------------------------------------------- - -and AddValEqualityInfo g m (v:ValRef) info = +/// Add 'v1 = v2' information into the information stored about a value +and AddValEqualityInfo g m (v: ValRef) info = // ValValue is information that v = v2, where v2 does not change // So we can't record this information for mutable values. An exception can be made // for "outArg" values arising from method calls since they are only temporarily mutable @@ -2406,11 +2454,8 @@ and AddValEqualityInfo g m (v:ValRef) info = else {info with Info= MakeValueInfoForValue g m v info.Info} -//------------------------------------------------------------------------- -// Optimize/analyze a use of a value -//------------------------------------------------------------------------- - -and OptimizeVal cenv env expr (v:ValRef, m) = +/// Optimize/analyze a use of a value +and OptimizeVal cenv env expr (v: ValRef, m) = let valInfoForVal = GetInfoForVal cenv env m v match TryOptimizeVal cenv env (v.MustInline, valInfoForVal.ValExprInfo, m) with @@ -2443,10 +2488,7 @@ and OptimizeVal cenv env expr (v:ValRef, m) = FunctionSize=1 TotalSize=1}) -//------------------------------------------------------------------------- -// Attempt to replace an application of a value by an alternative value. -//------------------------------------------------------------------------- - +/// Attempt to replace an application of a value by an alternative value. and StripToNominalTyconRef cenv ty = match tryAppTy cenv.g ty with | ValueSome x -> x @@ -2456,7 +2498,7 @@ and StripToNominalTyconRef cenv ty = mkCompiledTupleTyconRef cenv.g false (List.length tyargs), tyargs else failwith "StripToNominalTyconRef: unreachable" -and CanDevirtualizeApplication cenv v vref ty args = +and CanDevirtualizeApplication cenv v vref ty args = valRefEq cenv.g v vref && not (isUnitTy cenv.g ty) && isAppTy cenv.g ty @@ -2466,7 +2508,7 @@ and CanDevirtualizeApplication cenv v vref ty args = // Hence we have to actually have the object argument available to us, && (not (isStructTy cenv.g ty) || not (isNil args)) -and TakeAddressOfStructArgumentIfNeeded cenv (vref:ValRef) ty args m = +and TakeAddressOfStructArgumentIfNeeded cenv (vref: ValRef) ty args m = if vref.IsInstanceMember && isStructTy cenv.g ty then match args with | objArg::rest -> @@ -2482,7 +2524,7 @@ and TakeAddressOfStructArgumentIfNeeded cenv (vref:ValRef) ty args m = else id, args -and DevirtualizeApplication cenv env (vref:ValRef) ty tyargs args m = +and DevirtualizeApplication cenv env (vref: ValRef) ty tyargs args m = let wrap, args = TakeAddressOfStructArgumentIfNeeded cenv vref ty args m let transformedExpr = wrap (MakeApplicationAndBetaReduce cenv.g (exprForValRef m vref, vref.Type, (if isNil tyargs then [] else [tyargs]), args, m)) OptimizeExpr cenv env transformedExpr @@ -2494,8 +2536,8 @@ and TryDevirtualizeApplication cenv env (f, tyargs, args, m) = // to be augmented with a visible comparison value. // // e.g rewrite - // 'LanguagePrimitives.HashCompare.GenericComparisonIntrinsic (x:C) (y:C)' - // --> 'x.CompareTo(y:C)' where this is a direct call to the implementation of CompareTo, i.e. + // 'LanguagePrimitives.HashCompare.GenericComparisonIntrinsic (x: C) (y: C)' + // --> 'x.CompareTo(y: C)' where this is a direct call to the implementation of CompareTo, i.e. // C::CompareTo(C) // not C::CompareTo(obj) // @@ -2505,14 +2547,14 @@ and TryDevirtualizeApplication cenv env (f, tyargs, args, m) = let tcref, tyargs = StripToNominalTyconRef cenv ty match tcref.GeneratedCompareToValues with - | Some (_, vref) -> Some (DevirtualizeApplication cenv env vref ty tyargs args m) + | Some (_, vref) -> Some (DevirtualizeApplication cenv env vref ty tyargs args m) | _ -> None | Expr.Val(v, _, _), [ty], _ when CanDevirtualizeApplication cenv v cenv.g.generic_comparison_withc_inner_vref ty args -> let tcref, tyargs = StripToNominalTyconRef cenv ty match tcref.GeneratedCompareToWithComparerValues, args with - | Some vref, [comp; x; y] -> + | Some vref, [comp; x; y] -> // the target takes a tupled argument, so we need to reorder the arg expressions in the // arg list, and create a tuple of y & comp // push the comparer to the end and box the argument @@ -2528,22 +2570,21 @@ and TryDevirtualizeApplication cenv env (f, tyargs, args, m) = let tcref, tyargs = StripToNominalTyconRef cenv ty match tcref.GeneratedHashAndEqualsValues with - | Some (_, vref) -> Some (DevirtualizeApplication cenv env vref ty tyargs args m) + | Some (_, vref) -> Some (DevirtualizeApplication cenv env vref ty tyargs args m) | _ -> None - // Optimize/analyze calls to LanguagePrimitives.HashCompare.GenericEqualityWithComparerFast | Expr.Val(v, _, _), [ty], _ when CanDevirtualizeApplication cenv v cenv.g.generic_equality_withc_inner_vref ty args -> let tcref, tyargs = StripToNominalTyconRef cenv ty match tcref.GeneratedHashAndEqualsWithComparerValues, args with - | Some (_, _, withcEqualsVal), [comp; x; y] -> + | Some (_, _, withcEqualsVal), [comp; x; y] -> // push the comparer to the end and box the argument let args2 = [x; mkRefTupledNoTypes cenv.g m [mkCoerceExpr(y, cenv.g.obj_ty, m, ty) ; comp]] Some (DevirtualizeApplication cenv env withcEqualsVal ty tyargs args2 m) | _ -> None // Optimize/analyze calls to LanguagePrimitives.HashCompare.GenericEqualityWithComparer - | Expr.Val(v, _, _), [ty], _ when CanDevirtualizeApplication cenv v cenv.g.generic_equality_per_inner_vref ty args && not(isRefTupleTy cenv.g ty) -> + | Expr.Val(v, _, _), [ty], _ when CanDevirtualizeApplication cenv v cenv.g.generic_equality_per_inner_vref ty args && not(isRefTupleTy cenv.g ty) -> let tcref, tyargs = StripToNominalTyconRef cenv ty match tcref.GeneratedHashAndEqualsWithComparerValues, args with | Some (_, _, withcEqualsVal), [x; y] -> @@ -2561,16 +2602,16 @@ and TryDevirtualizeApplication cenv env (f, tyargs, args, m) = | _ -> None // Optimize/analyze calls to LanguagePrimitives.HashCompare.GenericHashWithComparerIntrinsic - | Expr.Val(v, _, _), [ty], _ when CanDevirtualizeApplication cenv v cenv.g.generic_hash_withc_inner_vref ty args -> + | Expr.Val(v, _, _), [ty], _ when CanDevirtualizeApplication cenv v cenv.g.generic_hash_withc_inner_vref ty args -> let tcref, tyargs = StripToNominalTyconRef cenv ty match tcref.GeneratedHashAndEqualsWithComparerValues, args with - | Some (_, withcGetHashCodeVal, _), [comp; x] -> + | Some (_, withcGetHashCodeVal, _), [comp; x] -> let args2 = [x; comp] Some (DevirtualizeApplication cenv env withcGetHashCodeVal ty tyargs args2 m) | _ -> None // Optimize/analyze calls to LanguagePrimitives.HashCompare.GenericComparisonWithComparerIntrinsic for tuple types - | Expr.Val(v, _, _), [ty], _ when valRefEq cenv.g v cenv.g.generic_comparison_inner_vref && isRefTupleTy cenv.g ty -> + | Expr.Val(v, _, _), [ty], _ when valRefEq cenv.g v cenv.g.generic_comparison_inner_vref && isRefTupleTy cenv.g ty -> let tyargs = destRefTupleTy cenv.g ty let vref = match tyargs.Length with @@ -2584,7 +2625,7 @@ and TryDevirtualizeApplication cenv env (f, tyargs, args, m) = | None -> None // Optimize/analyze calls to LanguagePrimitives.HashCompare.GenericHashWithComparerIntrinsic for tuple types - | Expr.Val(v, _, _), [ty], _ when valRefEq cenv.g v cenv.g.generic_hash_inner_vref && isRefTupleTy cenv.g ty -> + | Expr.Val(v, _, _), [ty], _ when valRefEq cenv.g v cenv.g.generic_hash_inner_vref && isRefTupleTy cenv.g ty -> let tyargs = destRefTupleTy cenv.g ty let vref = match tyargs.Length with @@ -2596,12 +2637,11 @@ and TryDevirtualizeApplication cenv env (f, tyargs, args, m) = match vref with | Some vref -> Some (DevirtualizeApplication cenv env vref ty tyargs (mkCallGetGenericEREqualityComparer cenv.g m :: args) m) | None -> None - // Optimize/analyze calls to LanguagePrimitives.HashCompare.GenericEqualityIntrinsic for tuple types // REVIEW (5537): GenericEqualityIntrinsic implements PER semantics, and we are replacing it to something also // implementing PER semantics. However GenericEqualityIntrinsic should implement ER semantics. - | Expr.Val(v, _, _), [ty], _ when valRefEq cenv.g v cenv.g.generic_equality_per_inner_vref && isRefTupleTy cenv.g ty -> + | Expr.Val(v, _, _), [ty], _ when valRefEq cenv.g v cenv.g.generic_equality_per_inner_vref && isRefTupleTy cenv.g ty -> let tyargs = destRefTupleTy cenv.g ty let vref = match tyargs.Length with @@ -2615,7 +2655,7 @@ and TryDevirtualizeApplication cenv env (f, tyargs, args, m) = | None -> None // Optimize/analyze calls to LanguagePrimitives.HashCompare.GenericComparisonWithComparerIntrinsic for tuple types - | Expr.Val(v, _, _), [ty], _ when valRefEq cenv.g v cenv.g.generic_comparison_withc_inner_vref && isRefTupleTy cenv.g ty -> + | Expr.Val(v, _, _), [ty], _ when valRefEq cenv.g v cenv.g.generic_comparison_withc_inner_vref && isRefTupleTy cenv.g ty -> let tyargs = destRefTupleTy cenv.g ty let vref = match tyargs.Length with @@ -2629,7 +2669,7 @@ and TryDevirtualizeApplication cenv env (f, tyargs, args, m) = | None -> None // Optimize/analyze calls to LanguagePrimitives.HashCompare.GenericHashWithComparerIntrinsic for tuple types - | Expr.Val(v, _, _), [ty], _ when valRefEq cenv.g v cenv.g.generic_hash_withc_inner_vref && isRefTupleTy cenv.g ty -> + | Expr.Val(v, _, _), [ty], _ when valRefEq cenv.g v cenv.g.generic_hash_withc_inner_vref && isRefTupleTy cenv.g ty -> let tyargs = destRefTupleTy cenv.g ty let vref = match tyargs.Length with @@ -2643,7 +2683,7 @@ and TryDevirtualizeApplication cenv env (f, tyargs, args, m) = | None -> None // Optimize/analyze calls to LanguagePrimitives.HashCompare.GenericEqualityWithComparerIntrinsic for tuple types - | Expr.Val(v, _, _), [ty], _ when valRefEq cenv.g v cenv.g.generic_equality_withc_inner_vref && isRefTupleTy cenv.g ty -> + | Expr.Val(v, _, _), [ty], _ when valRefEq cenv.g v cenv.g.generic_equality_withc_inner_vref && isRefTupleTy cenv.g ty -> let tyargs = destRefTupleTy cenv.g ty let vref = match tyargs.Length with @@ -2656,7 +2696,6 @@ and TryDevirtualizeApplication cenv env (f, tyargs, args, m) = | Some vref -> Some (DevirtualizeApplication cenv env vref ty tyargs args m) | None -> None - // Calls to LanguagePrimitives.IntrinsicFunctions.UnboxGeneric can be optimized to calls to UnboxFast when we know that the // target type isn't 'NullNotLiked', i.e. that the target type is not an F# union, record etc. // Note UnboxFast is just the .NET IL 'unbox.any' instruction. @@ -2731,7 +2770,7 @@ and TryInlineApplication cenv env finfo (tyargs: TType list, args: Expr list, m) let isSecureMethod = match finfo.Info with - | ValValue(vref, _) -> + | ValValue(vref, _) -> vref.Attribs |> List.exists (fun a -> (IsSecurityAttribute cenv.g cenv.amap cenv.casApplied a m) || (IsSecurityCriticalAttribute cenv.g a)) | _ -> false @@ -2745,25 +2784,22 @@ and TryInlineApplication cenv env finfo (tyargs: TType list, args: Expr list, m) if isGetHashCode then None else // Inlining lambda - (* ---------- printf "Inlining lambda near %a = %s\n" outputRange m (showL (exprL f2)) (* JAMES: *) ----------*) - let f2' = remarkExpr m (copyExpr cenv.g CloneAllAndMarkExprValsAsCompilerGenerated f2) + (* ---------- printf "Inlining lambda near %a = %s\n" outputRange m (showL (exprL f2)) (* JAMES: *) ----------*) + let f2R = remarkExpr m (copyExpr cenv.g CloneAllAndMarkExprValsAsCompilerGenerated f2) // Optimizing arguments after inlining // REVIEW: this is a cheapshot way of optimizing the arg expressions as well without the restriction of recursive // inlining kicking into effect - let args' = args |> List.map (fun e -> let e', _einfo = OptimizeExpr cenv env e in e') + let argsR = args |> List.map (fun e -> let eR, _einfo = OptimizeExpr cenv env e in eR) // Beta reduce. MakeApplicationAndBetaReduce cenv.g does all the hard work. - // Inlining: beta reducing - let expr' = MakeApplicationAndBetaReduce cenv.g (f2', f2ty, [tyargs], args', m) + // Inlining: beta reducing + let exprR = MakeApplicationAndBetaReduce cenv.g (f2R, f2ty, [tyargs], argsR, m) // Inlining: reoptimizing - Some(OptimizeExpr cenv {env with dontInline= Zset.add lambdaId env.dontInline} expr') + Some(OptimizeExpr cenv {env with dontInline= Zset.add lambdaId env.dontInline} exprR) | _ -> None -//------------------------------------------------------------------------- -// Optimize/analyze an application of a function to type and term arguments -//------------------------------------------------------------------------- - +/// Optimize/analyze an application of a function to type and term arguments and OptimizeApplication cenv env (f0, f0ty, tyargs, args, m) = // trying to devirtualize match TryDevirtualizeApplication cenv env (f0, tyargs, args, m) with @@ -2810,14 +2846,14 @@ and OptimizeApplication cenv env (f0, f0ty, tyargs, args, m) = // Determine if this application is a critical tailcall let mayBeCriticalTailcall = match newf0 with - | KnownValApp(vref, _typeArgs, otherArgs) -> + | KnownValApp(vref, _typeArgs, otherArgs) -> // Check if this is a call to a function of known arity that has been inferred to not be a critical tailcall when used as a direct call // This includes recursive calls to the function being defined (in which case we get a non-critical, closed-world tailcall). // Note we also have to check the argument count to ensure this is a direct call (or a partial application). let doesNotMakeCriticalTailcall = vref.MakesNoCriticalTailcalls || - (let valInfoForVal = GetInfoForVal cenv env m vref in valInfoForVal.ValMakesNoCriticalTailcalls) || + (let valInfoForVal = GetInfoForVal cenv env m vref in valInfoForVal.ValMakesNoCriticalTailcalls) || (match env.functionVal with | None -> false | Some (v, _) -> valEq vref.Deref v) if doesNotMakeCriticalTailcall then let numArgs = otherArgs.Length + newArgs.Length @@ -2825,7 +2861,7 @@ and OptimizeApplication cenv env (f0, f0ty, tyargs, args, m) = | Some i -> numArgs > i.NumCurriedArgs | None -> match env.functionVal with - | Some (_v, i) -> numArgs > i.NumCurriedArgs + | Some (_v, i) -> numArgs > i.NumCurriedArgs | None -> true // over-application of a known function, which presumably returns a function. This counts as an indirect call else true // application of a function that may make a critical tailcall @@ -2840,10 +2876,7 @@ and OptimizeApplication cenv env (f0, f0ty, tyargs, args, m) = MightMakeCriticalTailcall = mayBeCriticalTailcall Info=ValueOfExpr newExpr } -//------------------------------------------------------------------------- -// Optimize/analyze a lambda expression -//------------------------------------------------------------------------- - +/// Optimize/analyze a lambda expression and OptimizeLambdas (vspec: Val option) cenv env topValInfo e ety = match e with | Expr.Lambda (lambdaId, _, _, _, _, m, _) @@ -2855,8 +2888,8 @@ and OptimizeLambdas (vspec: Val option) cenv env topValInfo e ety = let env = BindTypeVarsToUnknown tps env let env = List.foldBack (BindInternalValsToUnknown cenv) vsl env let env = BindInternalValsToUnknown cenv (Option.toList baseValOpt) env - let body', bodyinfo = OptimizeExpr cenv env body - let expr' = mkMemberLambdas m tps ctorThisValOpt baseValOpt vsl (body', bodyty) + let bodyR, bodyinfo = OptimizeExpr cenv env body + let exprR = mkMemberLambdas m tps ctorThisValOpt baseValOpt vsl (bodyR, bodyty) let arities = vsl.Length let arities = if isNil tps then arities else 1+arities let bsize = bodyinfo.TotalSize @@ -2877,9 +2910,9 @@ and OptimizeLambdas (vspec: Val option) cenv env topValInfo e ety = else printfn "value %s at line %d does not make a critical tailcall" v.DisplayName v.Range.StartLine if cenv.settings.reportTotalSizes then - printfn "value %s at line %d has total size %d" v.DisplayName v.Range.StartLine bodyinfo.TotalSize + printfn "value %s at line %d has total size %d" v.DisplayName v.Range.StartLine bodyinfo.TotalSize if cenv.settings.reportFunctionSizes then - printfn "value %s at line %d has method size %d" v.DisplayName v.Range.StartLine bodyinfo.FunctionSize + printfn "value %s at line %d has method size %d" v.DisplayName v.Range.StartLine bodyinfo.FunctionSize if cenv.settings.reportHasEffect then if bodyinfo.HasEffect then printfn "function %s at line %d causes side effects or may not terminate" v.DisplayName v.Range.StartLine @@ -2891,13 +2924,13 @@ and OptimizeLambdas (vspec: Val option) cenv env topValInfo e ety = // can't inline any values with semi-recursive object references to self or base let valu = match baseValOpt with - | None -> CurriedLambdaValue (lambdaId, arities, bsize, expr', ety) + | None -> CurriedLambdaValue (lambdaId, arities, bsize, exprR, ety) | Some baseVal -> - let fvs = freeInExpr CollectLocals body' + let fvs = freeInExpr CollectLocals bodyR if fvs.UsesMethodLocalConstructs || fvs.FreeLocals.Contains baseVal then UnknownValue else - let expr2 = mkMemberLambdas m tps ctorThisValOpt None vsl (body', bodyty) + let expr2 = mkMemberLambdas m tps ctorThisValOpt None vsl (bodyR, bodyty) CurriedLambdaValue (lambdaId, arities, bsize, expr2, ety) @@ -2906,20 +2939,15 @@ and OptimizeLambdas (vspec: Val option) cenv env topValInfo e ety = | Some v when v.IsCompiledAsTopLevel -> methodDefnTotalSize | _ -> closureTotalSize - expr', { TotalSize=bsize + estimatedSize (* estimate size of new syntactic closure - expensive, in contrast to a method *) + exprR, { TotalSize=bsize + estimatedSize (* estimate size of new syntactic closure - expensive, in contrast to a method *) FunctionSize=1 HasEffect=false MightMakeCriticalTailcall = false Info= valu } | _ -> OptimizeExpr cenv env e - - -//------------------------------------------------------------------------- -// Recursive calls that first try to make an expression "fit" the a shape -// where it is about to be consumed. -//------------------------------------------------------------------------- - +/// Recursive calls that first try to make an expression "fit" the a shape +/// where it is about to be consumed. and OptimizeExprsThenReshapeAndConsiderSplits cenv env exprs = match exprs with | [] -> NoExprs @@ -2930,7 +2958,6 @@ and OptimizeExprsThenConsiderSplits cenv env exprs = | [] -> NoExprs | _ -> OptimizeList (OptimizeExprThenConsiderSplit cenv env) exprs - and OptimizeExprThenReshapeAndConsiderSplit cenv env (shape, e) = OptimizeExprThenConsiderSplit cenv env (ReshapeExpr cenv (shape, e)) @@ -2947,15 +2974,12 @@ and ReshapeExpr cenv (shape, e) = e and OptimizeExprThenConsiderSplit cenv env e = - let e', einfo = OptimizeExpr cenv env e + let eR, einfo = OptimizeExpr cenv env e // ALWAYS consider splits for enormous sub terms here - otherwise we will create invalid .NET programs - ConsiderSplitToMethod true cenv.settings.veryBigExprSize cenv env (e', einfo) + ConsiderSplitToMethod true cenv.settings.veryBigExprSize cenv env (eR, einfo) -//------------------------------------------------------------------------- -// Decide whether to List.unzip a sub-expression into a new method -//------------------------------------------------------------------------- - -and ComputeSplitToMethodCondition flag threshold cenv env (e:Expr, einfo) = +/// Decide whether to List.unzip a sub-expression into a new method +and ComputeSplitToMethodCondition flag threshold cenv env (e: Expr, einfo) = flag && // REVIEW: The method splitting optimization is completely disabled if we are not taking tailcalls. // REVIEW: This should only apply to methods that actually make self-tailcalls (tested further below). @@ -2968,7 +2992,7 @@ and ComputeSplitToMethodCondition flag threshold cenv env (e:Expr, einfo) = // It can't use any protected or base calls, rethrow(), byrefs etc. let m = e.Range (let fvs = freeInExpr CollectLocals e - not fvs.UsesUnboundRethrow && + not fvs.UsesUnboundRethrow && not fvs.UsesMethodLocalConstructs && fvs.FreeLocals |> Zset.forall (fun v -> // no direct-self-recursive references @@ -3000,15 +3024,15 @@ and ConsiderSplitToMethod flag threshold cenv env (e, einfo) = else e, einfo -//------------------------------------------------------------------------- -// Optimize/analyze a pattern matching expression -//------------------------------------------------------------------------- - +/// Optimize/analyze a pattern matching expression and OptimizeMatch cenv env (spMatch, exprm, dtree, targets, m, ty) = // REVIEW: consider collecting, merging and using information flowing through each line of the decision tree to each target - let dtree', dinfo = OptimizeDecisionTree cenv env m dtree - let targets', tinfos = OptimizeDecisionTreeTargets cenv env m targets - let newExpr, newInfo = RebuildOptimizedMatch (spMatch, exprm, m, ty, dtree', targets', dinfo, tinfos) + let dtreeR, dinfo = OptimizeDecisionTree cenv env m dtree + let targetsR, tinfos = OptimizeDecisionTreeTargets cenv env m targets + OptimizeMatchPart2 cenv (spMatch, exprm, dtreeR, targetsR, dinfo, tinfos, m, ty) + +and OptimizeMatchPart2 cenv (spMatch, exprm, dtreeR, targetsR, dinfo, tinfos, m, ty) = + let newExpr, newInfo = RebuildOptimizedMatch (spMatch, exprm, m, ty, dtreeR, targetsR, dinfo, tinfos) let newExpr2 = if not (cenv.settings.localOpt()) then newExpr else CombineBoolLogic newExpr newExpr2, newInfo @@ -3025,32 +3049,25 @@ and RebuildOptimizedMatch (spMatch, exprm, m, ty, dtree, tgs, dinfo, tinfos) = let einfo = CombineMatchInfos dinfo tinfo expr, einfo -//------------------------------------------------------------------------- -// Optimize/analyze a target of a decision tree -//------------------------------------------------------------------------- - -and OptimizeDecisionTreeTarget cenv env _m (TTarget(vs, e, spTarget)) = - (* REVIEW: this is where we should be using information collected for each target *) +/// Optimize/analyze a target of a decision tree +and OptimizeDecisionTreeTarget cenv env _m (TTarget(vs, expr, spTarget)) = let env = BindInternalValsToUnknown cenv vs env - let e', einfo = OptimizeExpr cenv env e - let e', einfo = ConsiderSplitToMethod cenv.settings.abstractBigTargets cenv.settings.bigTargetSize cenv env (e', einfo) - let evalue' = AbstractExprInfoByVars (vs, []) einfo.Info - TTarget(vs, e', spTarget), + let exprR, einfo = OptimizeExpr cenv env expr + let exprR, einfo = ConsiderSplitToMethod cenv.settings.abstractBigTargets cenv.settings.bigTargetSize cenv env (exprR, einfo) + let evalueR = AbstractExprInfoByVars (vs, []) einfo.Info + TTarget(vs, exprR, spTarget), { TotalSize=einfo.TotalSize FunctionSize=einfo.FunctionSize HasEffect=einfo.HasEffect MightMakeCriticalTailcall = einfo.MightMakeCriticalTailcall - Info=evalue' } - -//------------------------------------------------------------------------- -// Optimize/analyze a decision tree -//------------------------------------------------------------------------- + Info=evalueR } +/// Optimize/analyze a decision tree and OptimizeDecisionTree cenv env m x = match x with | TDSuccess (es, n) -> - let es', einfos = OptimizeExprsThenConsiderSplits cenv env es - TDSuccess(es', n), CombineValueInfosUnknown einfos + let esR, einfos = OptimizeExprsThenConsiderSplits cenv env es + TDSuccess(esR, n), CombineValueInfosUnknown einfos | TDBind(bind, rest) -> let (bind, binfo), envinner = OptimizeBinding cenv false env bind let rest, rinfo = OptimizeDecisionTree cenv envinner m rest @@ -3081,7 +3098,7 @@ and OptimizeDecisionTree cenv env m x = and TryOptimizeDecisionTreeTest cenv test vinfo = match test, vinfo with - | DecisionTreeTest.UnionCase (c1, _), StripUnionCaseValue(c2, _) -> Some(cenv.g.unionCaseRefEq c1 c2) + | DecisionTreeTest.UnionCase (c1, _), StripUnionCaseValue(c2, _) -> Some(cenv.g.unionCaseRefEq c1 c2) | DecisionTreeTest.ArrayLength (_, _), _ -> None | DecisionTreeTest.Const c1, StripConstValue(c2) -> if c1 = Const.Zero || c2 = Const.Zero then None else Some(c1=c2) | DecisionTreeTest.IsNull, StripConstValue(c2) -> Some(c2=Const.Zero) @@ -3092,12 +3109,12 @@ and TryOptimizeDecisionTreeTest cenv test vinfo = /// Optimize/analyze a switch construct from pattern matching and OptimizeSwitch cenv env (e, cases, dflt, m) = - let e', einfo = OptimizeExpr cenv env e + let eR, einfo = OptimizeExpr cenv env e let cases, dflt = if cenv.settings.EliminateSwitch() && not einfo.HasEffect then // Attempt to find a definite success, i.e. the first case where there is definite success - match (List.tryFind (function (TCase(d2, _)) when TryOptimizeDecisionTreeTest cenv d2 einfo.Info = Some(true) -> true | _ -> false) cases) with + match (List.tryFind (function (TCase(d2, _)) when TryOptimizeDecisionTreeTest cenv d2 einfo.Info = Some(true) -> true | _ -> false) cases) with | Some(TCase(_, case)) -> [], Some(case) | _ -> // Filter definite failures @@ -3105,18 +3122,24 @@ and OptimizeSwitch cenv env (e, cases, dflt, m) = dflt else cases, dflt - // OK, see what we're left with and continue + // OK, see what weRre left with and continue match cases, dflt with | [], Some case -> OptimizeDecisionTree cenv env m case - | _ -> OptimizeSwitchFallback cenv env (e', einfo, cases, dflt, m) - -and OptimizeSwitchFallback cenv env (e', einfo, cases, dflt, m) = - let cases', cinfos = List.unzip (List.map (fun (TCase(discrim, e)) -> let e', einfo = OptimizeDecisionTree cenv env m e in TCase(discrim, e'), einfo) cases) - let dflt', dinfos = match dflt with None -> None, [] | Some df -> let df', einfo = OptimizeDecisionTree cenv env m df in Some df', [einfo] + | _ -> OptimizeSwitchFallback cenv env (eR, einfo, cases, dflt, m) + +and OptimizeSwitchFallback cenv env (eR, einfo, cases, dflt, m) = + let casesR, cinfos = + cases + |> List.map (fun (TCase(discrim, e)) -> let eR, einfo = OptimizeDecisionTree cenv env m e in TCase(discrim, eR), einfo) + |> List.unzip + let dfltR, dinfos = + match dflt with + | None -> None, [] + | Some df -> let dfR, einfo = OptimizeDecisionTree cenv env m df in Some dfR, [einfo] let size = (dinfos.Length + cinfos.Length) * 2 let info = CombineValueInfosUnknown (einfo :: cinfos @ dinfos) - let info = { info with TotalSize = info.TotalSize + size; FunctionSize = info.FunctionSize + size; } - TDSwitch (e', cases', dflt', m), info + let info = { info with TotalSize = info.TotalSize + size; FunctionSize = info.FunctionSize + size; } + TDSwitch (eR, casesR, dfltR, m), info and OptimizeBinding cenv isRec env (TBind(vref, expr, spBind)) = try @@ -3126,14 +3149,14 @@ and OptimizeBinding cenv isRec env (TBind(vref, expr, spBind)) = // any expression that contains a reference to any value in RVS. // This doesn't prevent splitting for mutually recursive references. See FSharp 1.0 bug 2892. let env = - if isRec then { env with dontSplitVars = env.dontSplitVars.Add vref () } + if isRec then { env with dontSplitVars = env.dontSplitVars.Add vref () } else env let exprOptimized, einfo = let env = if vref.IsCompilerGenerated && Option.isSome env.latestBoundId then env else {env with latestBoundId=Some vref.Id} let cenv = if vref.InlineInfo = ValInline.PseudoVal then { cenv with optimizing=false} else cenv let arityInfo = InferArityOfExprBinding cenv.g AllowTypeDirectedDetupling.No vref expr - let exprOptimized, einfo = OptimizeLambdas (Some vref) cenv env arityInfo expr vref.Type + let exprOptimized, einfo = OptimizeLambdas (Some vref) cenv env arityInfo expr vref.Type let size = localVarSize exprOptimized, {einfo with FunctionSize=einfo.FunctionSize+size; TotalSize = einfo.TotalSize+size} @@ -3143,13 +3166,13 @@ and OptimizeBinding cenv isRec env (TBind(vref, expr, spBind)) = match ivalue with | CurriedLambdaValue (_, arities, size, body, _) -> if size > (cenv.settings.lambdaInlineThreshold + arities + 2) then - // Discarding lambda for binding v.LogicalName - UnknownValue (* trim large *) + // Discarding lambda for large binding + UnknownValue else let fvs = freeInExpr CollectLocals body if fvs.UsesMethodLocalConstructs then - // Discarding lambda for bindingbecause uses protected members - UnknownValue (* trim protected *) + // Discarding lambda for binding because uses protected members + UnknownValue else ivalue @@ -3157,9 +3180,11 @@ and OptimizeBinding cenv isRec env (TBind(vref, expr, spBind)) = | TupleValue a -> TupleValue(Array.map cut a) | RecdValue (tcref, a) -> RecdValue(tcref, Array.map cut a) | UnionCaseValue (a, b) -> UnionCaseValue (a, Array.map cut b) - | UnknownValue | ConstValue _ | ConstExprValue _ -> ivalue + | UnknownValue | ConstValue _ | ConstExprValue _ -> ivalue | SizeValue(_, a) -> MakeSizedValueInfo (cut a) - let einfo = if vref.MustInline then einfo else {einfo with Info = cut einfo.Info } + + let einfo = if vref.MustInline then einfo else {einfo with Info = cut einfo.Info } + let einfo = if (not vref.MustInline && not (cenv.settings.KeepOptimizationValues())) || @@ -3176,7 +3201,7 @@ and OptimizeBinding cenv isRec env (TBind(vref, expr, spBind)) = | None -> false | Some mbrTyconRef -> // Check we can deref system_MarshalByRefObject_tcref. When compiling against the Silverlight mscorlib we can't - if ValueOptionInternal.isSome mbrTyconRef.TryDeref then + if mbrTyconRef.TryDeref.IsSome then // Check if this is a subtype of MarshalByRefObject assert (cenv.g.system_MarshalByRefObject_ty.IsSome) ExistsSameHeadTypeInHierarchy cenv.g cenv.amap vref.Range (generalizedTyconRef tcref) cenv.g.system_MarshalByRefObject_ty.Value @@ -3208,7 +3233,7 @@ and OptimizeBinding cenv isRec env (TBind(vref, expr, spBind)) = valRefEq cenv.g nvref cenv.g.generic_hash_inner_vref)) then {einfo with Info=UnknownValue} else einfo - if vref.MustInline && IsPartialExprVal einfo.Info then + if vref.MustInline && IsPartialExprVal einfo.Info then errorR(InternalError("the mustinline value '"+vref.LogicalName+"' was not inferred to have a known value", vref.Range)) let env = BindInternalLocalVal cenv vref (mkValInfo einfo vref) env @@ -3259,14 +3284,15 @@ and OptimizeModuleExpr cenv env x = // // It may be wise to move to a non-mutating implementation at some point here. Copying expressions is // probably more costly than copying specs anyway. - let rec elimModTy (mtyp:ModuleOrNamespaceType) = + let rec elimModTy (mtyp: ModuleOrNamespaceType) = let mty = new ModuleOrNamespaceType(kind=mtyp.ModuleOrNamespaceKind, vals= (mtyp.AllValsAndMembers |> QueueList.filter (Zset.memberOf deadSet >> not)), entities= mtyp.AllEntities) mtyp.ModuleAndNamespaceDefinitions |> List.iter elimModSpec mty - and elimModSpec (mspec:ModuleOrNamespace) = + + and elimModSpec (mspec: ModuleOrNamespace) = let mtyp = elimModTy mspec.ModuleOrNamespaceType mspec.entity_modul_contents <- MaybeLazy.Strict mtyp @@ -3275,11 +3301,12 @@ and OptimizeModuleExpr cenv env x = | TMDefRec(isRec, tycons, mbinds, m) -> let mbinds = mbinds |> List.choose elimModuleBinding TMDefRec(isRec, tycons, mbinds, m) - | TMDefLet(bind, m) -> + | TMDefLet(bind, m) -> if Zset.contains bind.Var deadSet then TMDefRec(false, [], [], m) else x - | TMDefDo _ -> x + | TMDefDo _ -> x | TMDefs(defs) -> TMDefs(List.map elimModDef defs) - | TMAbstract _ -> x + | TMAbstract _ -> x + and elimModuleBinding x = match x with | ModuleOrNamespaceBinding.Binding bind -> @@ -3296,7 +3323,7 @@ and OptimizeModuleExpr cenv env x = ModuleOrNamespaceExprWithSig(mty, def, m), info -and mkValBind (bind:Binding) info = +and mkValBind (bind: Binding) info = (mkLocalValRef bind.Var, info) and OptimizeModuleDef cenv (env, bindInfosColl) x = @@ -3309,27 +3336,28 @@ and OptimizeModuleDef cenv (env, bindInfosColl) x = let binfos = minfos |> List.choose (function Choice1Of2 (_, x) -> Some x | _ -> None) let minfos = minfos |> List.choose (function Choice2Of2 x -> Some x | _ -> None) - (* REVIEW: Eliminate let bindings on the way back up *) (TMDefRec(isRec, tycons, mbinds, m), notlazy { ValInfos = ValInfos(List.map2 (fun bind binfo -> mkValBind bind (mkValInfo binfo bind.Var)) binds binfos) ModuleOrNamespaceInfos = NameMap.ofList minfos}), (env, bindInfosColl) + | TMAbstract(mexpr) -> let mexpr, info = OptimizeModuleExpr cenv env mexpr let env = BindValsInModuleOrNamespace cenv info env (TMAbstract(mexpr), info), (env, bindInfosColl) - | TMDefLet(bind, m) -> - let ((bind', binfo) as bindInfo), env = OptimizeBinding cenv false env bind - (* REVIEW: Eliminate unused let bindings from modules *) - (TMDefLet(bind', m), + + | TMDefLet(bind, m) -> + let ((bindR, binfo) as bindInfo), env = OptimizeBinding cenv false env bind + (TMDefLet(bindR, m), notlazy { ValInfos=ValInfos [mkValBind bind (mkValInfo binfo bind.Var)] ModuleOrNamespaceInfos = NameMap.empty }), - (env , ([bindInfo]::bindInfosColl)) + (env, ([bindInfo]::bindInfosColl)) - | TMDefDo(e, m) -> + | TMDefDo(e, m) -> let (e, _einfo) = OptimizeExpr cenv env e (TMDefDo(e, m), EmptyModuleInfo), - (env , bindInfosColl) + (env, bindInfosColl) + | TMDefs(defs) -> let (defs, info), (env, bindInfosColl) = OptimizeModuleDefs cenv (env, bindInfosColl) defs (TMDefs(defs), info), (env, bindInfosColl) @@ -3339,8 +3367,8 @@ and OptimizeModuleBindings cenv (env, bindInfosColl) xs = List.mapFold (Optimize and OptimizeModuleBinding cenv (env, bindInfosColl) x = match x with | ModuleOrNamespaceBinding.Binding bind -> - let ((bind', binfo) as bindInfo), env = OptimizeBinding cenv true env bind - (ModuleOrNamespaceBinding.Binding bind', Choice1Of2 (bind', binfo)), (env, [ bindInfo ] :: bindInfosColl) + let ((bindR, binfo) as bindInfo), env = OptimizeBinding cenv true env bind + (ModuleOrNamespaceBinding.Binding bindR, Choice1Of2 (bindR, binfo)), (env, [ bindInfo ] :: bindInfosColl) | ModuleOrNamespaceBinding.Module(mspec, def) -> let id = mspec.Id let (def, info), (_, bindInfosColl) = OptimizeModuleDef cenv (env, bindInfosColl) def @@ -3354,7 +3382,7 @@ and OptimizeModuleDefs cenv (env, bindInfosColl) defs = (defs, UnionOptimizationInfos minfos), (env, bindInfosColl) and OptimizeImplFileInternal cenv env isIncrementalFragment hidden (TImplFile(qname, pragmas, mexpr, hasExplicitEntryPoint, isScript, anonRecdTypes)) = - let env, mexpr', minfo = + let env, mexprR, minfo = match mexpr with // FSI: FSI compiles everything as if you're typing incrementally into one module // This means the fragment is not truly a constrained module as later fragments will be typechecked @@ -3363,21 +3391,18 @@ and OptimizeImplFileInternal cenv env isIncrementalFragment hidden (TImplFile(qn | ModuleOrNamespaceExprWithSig(mty, def, m) when isIncrementalFragment -> let (def, minfo), (env, _bindInfosColl) = OptimizeModuleDef cenv (env, []) def env, ModuleOrNamespaceExprWithSig(mty, def, m), minfo - | _ -> - let mexpr', minfo = OptimizeModuleExpr cenv env mexpr + | _ -> + let mexprR, minfo = OptimizeModuleExpr cenv env mexpr let env = BindValsInModuleOrNamespace cenv minfo env let env = { env with localExternalVals=env.localExternalVals.MarkAsCollapsible() } // take the chance to flatten to a dictionary - env, mexpr', minfo + env, mexprR, minfo let hidden = ComputeHidingInfoAtAssemblyBoundary mexpr.Type hidden let minfo = AbstractLazyModulInfoByHiding true hidden minfo - env, TImplFile(qname, pragmas, mexpr', hasExplicitEntryPoint, isScript, anonRecdTypes), minfo, hidden - -//------------------------------------------------------------------------- -// Entry point -//------------------------------------------------------------------------- + env, TImplFile(qname, pragmas, mexprR, hasExplicitEntryPoint, isScript, anonRecdTypes), minfo, hidden +/// Entry point let OptimizeImplFile(settings, ccu, tcGlobals, tcVal, importMap, optEnv, isIncrementalFragment, emitTailcalls, hidden, mimpls) = let cenv = { settings=settings @@ -3393,49 +3418,62 @@ let OptimizeImplFile(settings, ccu, tcGlobals, tcVal, importMap, optEnv, isIncre let optimizeDuringCodeGen expr = OptimizeExpr cenv optEnvNew expr |> fst results, optimizeDuringCodeGen -//------------------------------------------------------------------------- -// Pickle to stable format for cross-module optimization data -//------------------------------------------------------------------------- - +/// Pickle to stable format for cross-module optimization data let rec p_ExprValueInfo x st = match x with - | ConstValue (c, ty) -> p_byte 0 st; p_tup2 p_const p_ty (c, ty) st - | UnknownValue -> p_byte 1 st - | ValValue (a, b) -> p_byte 2 st; p_tup2 (p_vref "optval") p_ExprValueInfo (a, b) st - | TupleValue a -> p_byte 3 st; p_array p_ExprValueInfo a st - | UnionCaseValue (a, b) -> p_byte 4 st; p_tup2 p_ucref (p_array p_ExprValueInfo) (a, b) st - | CurriedLambdaValue (_, b, c, d, e) -> p_byte 5 st; p_tup4 p_int p_int p_expr p_ty (b, c, d, e) st - | ConstExprValue (a, b) -> p_byte 6 st; p_tup2 p_int p_expr (a, b) st - | RecdValue (tcref, a) -> p_byte 7 st; p_tup2 (p_tcref "opt data") (p_array p_ExprValueInfo) (tcref, a) st - | SizeValue (_adepth, a) -> p_ExprValueInfo a st - -and p_ValInfo (v:ValInfo) st = - p_tup2 p_ExprValueInfo p_bool (v.ValExprInfo, v.ValMakesNoCriticalTailcalls) st + | ConstValue (c, ty) -> + p_byte 0 st + p_tup2 p_const p_ty (c, ty) st + | UnknownValue -> + p_byte 1 st + | ValValue (a, b) -> + p_byte 2 st + p_tup2 (p_vref "optval") p_ExprValueInfo (a, b) st + | TupleValue a -> + p_byte 3 st + p_array p_ExprValueInfo a st + | UnionCaseValue (a, b) -> + p_byte 4 st + p_tup2 p_ucref (p_array p_ExprValueInfo) (a, b) st + | CurriedLambdaValue (_, b, c, d, e) -> + p_byte 5 st + p_tup4 p_int p_int p_expr p_ty (b, c, d, e) st + | ConstExprValue (a, b) -> + p_byte 6 st + p_tup2 p_int p_expr (a, b) st + | RecdValue (tcref, a) -> + p_byte 7 st + p_tcref "opt data" tcref st + p_array p_ExprValueInfo a st + | SizeValue (_adepth, a) -> + p_ExprValueInfo a st + +and p_ValInfo (v: ValInfo) st = + p_ExprValueInfo v.ValExprInfo st + p_bool v.ValMakesNoCriticalTailcalls st and p_ModuleInfo x st = - p_tup2 - (p_array (p_tup2 (p_vref "opttab") p_ValInfo)) - (p_namemap p_LazyModuleInfo) - ((x.ValInfos.Entries |> Seq.toArray) , x.ModuleOrNamespaceInfos) - st + p_array (p_tup2 (p_vref "opttab") p_ValInfo) (x.ValInfos.Entries |> Seq.toArray) st + p_namemap p_LazyModuleInfo x.ModuleOrNamespaceInfos st and p_LazyModuleInfo x st = p_lazy p_ModuleInfo x st + let p_CcuOptimizationInfo x st = p_LazyModuleInfo x st let rec u_ExprInfo st = let rec loop st = let tag = u_byte st match tag with - | 0 -> u_tup2 u_const u_ty st |> (fun (c, ty) -> ConstValue(c, ty)) + | 0 -> u_tup2 u_const u_ty st |> (fun (c, ty) -> ConstValue(c, ty)) | 1 -> UnknownValue - | 2 -> u_tup2 u_vref loop st |> (fun (a, b) -> ValValue (a, b)) - | 3 -> u_array loop st |> (fun a -> TupleValue a) - | 4 -> u_tup2 u_ucref (u_array loop) st |> (fun (a, b) -> UnionCaseValue (a, b)) - | 5 -> u_tup4 u_int u_int u_expr u_ty st |> (fun (b, c, d, e) -> CurriedLambdaValue (newUnique(), b, c, d, e)) - | 6 -> u_tup2 u_int u_expr st |> (fun (a, b) -> ConstExprValue (a, b)) - | 7 -> u_tup2 u_tcref (u_array loop) st |> (fun (a, b) -> RecdValue (a, b)) + | 2 -> u_tup2 u_vref loop st |> (fun (a, b) -> ValValue (a, b)) + | 3 -> u_array loop st |> (fun a -> TupleValue a) + | 4 -> u_tup2 u_ucref (u_array loop) st |> (fun (a, b) -> UnionCaseValue (a, b)) + | 5 -> u_tup4 u_int u_int u_expr u_ty st |> (fun (b, c, d, e) -> CurriedLambdaValue (newUnique(), b, c, d, e)) + | 6 -> u_tup2 u_int u_expr st |> (fun (a, b) -> ConstExprValue (a, b)) + | 7 -> u_tup2 u_tcref (u_array loop) st |> (fun (a, b) -> RecdValue (a, b)) | _ -> failwith "loop" MakeSizedValueInfo (loop st) (* calc size of unpicked ExprValueInfo *) diff --git a/src/fcs-fable/src/fsharp/PatternMatchCompilation.fs b/src/fcs-fable/src/fsharp/PatternMatchCompilation.fs index d5e5587906..0f4bf494ca 100755 --- a/src/fcs-fable/src/fsharp/PatternMatchCompilation.fs +++ b/src/fcs-fable/src/fsharp/PatternMatchCompilation.fs @@ -3,10 +3,10 @@ module internal FSharp.Compiler.PatternMatchCompilation open System.Collections.Generic -open FSharp.Compiler +open FSharp.Compiler open FSharp.Compiler.AbstractIL.IL open FSharp.Compiler.AbstractIL.Internal.Library -open FSharp.Compiler.AbstractIL.Diagnostics +open FSharp.Compiler.AbstractIL.Diagnostics open FSharp.Compiler.Range open FSharp.Compiler.Ast open FSharp.Compiler.ErrorLogger @@ -22,18 +22,18 @@ exception MatchIncomplete of bool * (string * bool) option * range exception RuleNeverMatched of range exception EnumMatchIncomplete of bool * (string * bool) option * range -type ActionOnFailure = - | ThrowIncompleteMatchException - | IgnoreWithWarning - | Throw - | Rethrow +type ActionOnFailure = + | ThrowIncompleteMatchException + | IgnoreWithWarning + | Throw + | Rethrow | FailFilter [] /// Represents type-checked patterns type Pattern = | TPat_const of Const * range - | TPat_wild of range (* note = TPat_disjs([],m), but we haven't yet removed that duplication *) + | TPat_wild of range (* note = TPat_disjs([], m), but we haven't yet removed that duplication *) | TPat_as of Pattern * PatternValBinding * range (* note: can be replaced by TPat_var, i.e. equals TPat_conjs([TPat_var; pat]) *) | TPat_disjs of Pattern list * range | TPat_conjs of Pattern list * range @@ -48,84 +48,84 @@ type Pattern = | TPat_isinst of TType * TType * PatternValBinding option * range member this.Range = match this with - | TPat_const(_,m) -> m + | TPat_const(_, m) -> m | TPat_wild m -> m - | TPat_as(_,_,m) -> m - | TPat_disjs(_,m) -> m - | TPat_conjs(_,m) -> m - | TPat_query(_,_,m) -> m - | TPat_unioncase(_,_,_,m) -> m - | TPat_exnconstr(_,_,m) -> m - | TPat_tuple(_,_,_,m) -> m - | TPat_array(_,_,m) -> m - | TPat_recd(_,_,_,m) -> m - | TPat_range(_,_,m) -> m + | TPat_as(_, _, m) -> m + | TPat_disjs(_, m) -> m + | TPat_conjs(_, m) -> m + | TPat_query(_, _, m) -> m + | TPat_unioncase(_, _, _, m) -> m + | TPat_exnconstr(_, _, m) -> m + | TPat_tuple(_, _, _, m) -> m + | TPat_array(_, _, m) -> m + | TPat_recd(_, _, _, m) -> m + | TPat_range(_, _, m) -> m | TPat_null(m) -> m - | TPat_isinst(_,_,_,m) -> m + | TPat_isinst(_, _, _, m) -> m and PatternValBinding = PBind of Val * TypeScheme -and TypedMatchClause = +and TypedMatchClause = | TClause of Pattern * Expr option * DecisionTreeTarget * range - member c.GuardExpr = let (TClause(_,whenOpt,_,_)) = c in whenOpt - member c.Pattern = let (TClause(p,_,_,_)) = c in p - member c.Range = let (TClause(_,_,_,m)) = c in m - member c.Target = let (TClause(_,_,tg,_)) = c in tg - member c.BoundVals = let (TClause(_p,_whenOpt,TTarget(vs,_,_),_m)) = c in vs + member c.GuardExpr = let (TClause(_, whenOpt, _, _)) = c in whenOpt + member c.Pattern = let (TClause(p, _, _, _)) = c in p + member c.Range = let (TClause(_, _, _, m)) = c in m + member c.Target = let (TClause(_, _, tg, _)) = c in tg + member c.BoundVals = let (TClause(_p, _whenOpt, TTarget(vs, _, _), _m)) = c in vs let debug = false //--------------------------------------------------------------------------- -// Nasty stuff to permit obscure generic bindings such as -// let x,y = [],[] +// Nasty stuff to permit obscure generic bindings such as +// let x, y = [], [] // // BindSubExprOfInput actually produces the binding -// e.g. let v2 = \Gamma ['a,'b]. ([] : 'a ,[] : 'b) -// let (x,y) = p. -// When v = x, gtvs = 'a,'b. We must bind: -// x --> \Gamma A. fst (v2[A,]) -// y --> \Gamma A. snd (v2[,A]). -// +// e.g. let v2 = \Gamma ['a, 'b]. ([] : 'a, [] : 'b) +// let (x, y) = p. +// When v = x, gtvs = 'a, 'b. We must bind: +// x --> \Gamma A. fst (v2[A, ]) +// y --> \Gamma A. snd (v2[, A]). +// // GetSubExprOfInput is just used to get a concrete value from a type // function in the middle of the "test" part of pattern matching. -// For example, e.g. let [x; y] = [ (\x.x); (\x.x) ] +// For example, e.g. let [x; y] = [ (\x.x); (\x.x) ] // Here the constructor test needs a real list, even though the // r.h.s. is actually a polymorphic type function. To do the // test, we apply the r.h.s. to a dummy type - it doesn't matter // which (unless the r.h.s. actually looks at it's type argument...) //--------------------------------------------------------------------------- -type SubExprOfInput = +type SubExprOfInput = | SubExpr of (TyparInst -> Expr -> Expr) * (Expr * Val) -let BindSubExprOfInput g amap gtps (PBind(v,tyscheme)) m (SubExpr(accessf,(ve2,v2))) = - let e' = - if isNil gtps then - accessf [] ve2 - else - let tyargs = +let BindSubExprOfInput g amap gtps (PBind(v, tyscheme)) m (SubExpr(accessf, (ve2, v2))) = + let e' = + if isNil gtps then + accessf [] ve2 + else + let tyargs = let someSolved = ref false - let freezeVar gtp = - if isBeingGeneralized gtp tyscheme then - mkTyparTy gtp - else + let freezeVar gtp = + if isBeingGeneralized gtp tyscheme then + mkTyparTy gtp + else someSolved := true TypeRelations.ChooseTyparSolution g amap gtp let solutions = List.map freezeVar gtps - if !someSolved then + if !someSolved then TypeRelations.IterativelySubstituteTyparSolutions g gtps solutions else solutions let tinst = mkTyparInst gtps tyargs - accessf tinst (mkApps g ((ve2,v2.Type),[tyargs],[],v2.Range)) + accessf tinst (mkApps g ((ve2, v2.Type), [tyargs], [], v2.Range)) - v,mkGenericBindRhs g m [] tyscheme e' + v, mkGenericBindRhs g m [] tyscheme e' -let GetSubExprOfInput g (gtps,tyargs,tinst) (SubExpr(accessf,(ve2,v2))) = +let GetSubExprOfInput g (gtps, tyargs, tinst) (SubExpr(accessf, (ve2, v2))) = if isNil gtps then accessf [] ve2 else - accessf tinst (mkApps g ((ve2,v2.Type),[tyargs],[],v2.Range)) + accessf tinst (mkApps g ((ve2, v2.Type), [tyargs], [], v2.Range)) //--------------------------------------------------------------------------- // path, frontier @@ -133,7 +133,7 @@ let GetSubExprOfInput g (gtps,tyargs,tinst) (SubExpr(accessf,(ve2,v2))) = // A path reaches into a pattern. // The ints record which choices taken, e.g. tuple/record fields. -type Path = +type Path = | PathQuery of Path * Unique | PathConj of Path * int | PathTuple of Path * TypeInst * int @@ -141,27 +141,27 @@ type Path = | PathUnionConstr of Path * UnionCaseRef * TypeInst * int | PathArray of Path * TType * int * int | PathExnConstr of Path * TyconRef * int - | PathEmpty of TType - -let rec pathEq p1 p2 = - match p1,p2 with - | PathQuery(p1,n1), PathQuery(p2,n2) -> (n1 = n2) && pathEq p1 p2 - | PathConj(p1,n1), PathConj(p2,n2) -> (n1 = n2) && pathEq p1 p2 - | PathTuple(p1,_,n1), PathTuple(p2,_,n2) -> (n1 = n2) && pathEq p1 p2 - | PathRecd(p1,_,_,n1), PathRecd(p2,_,_,n2) -> (n1 = n2) && pathEq p1 p2 - | PathUnionConstr(p1,_,_,n1), PathUnionConstr(p2,_,_,n2) -> (n1 = n2) && pathEq p1 p2 - | PathArray(p1,_,_,n1), PathArray(p2,_,_,n2) -> (n1 = n2) && pathEq p1 p2 - | PathExnConstr(p1,_,n1), PathExnConstr(p2,_,n2) -> (n1 = n2) && pathEq p1 p2 + | PathEmpty of TType + +let rec pathEq p1 p2 = + match p1, p2 with + | PathQuery(p1, n1), PathQuery(p2, n2) -> (n1 = n2) && pathEq p1 p2 + | PathConj(p1, n1), PathConj(p2, n2) -> (n1 = n2) && pathEq p1 p2 + | PathTuple(p1, _, n1), PathTuple(p2, _, n2) -> (n1 = n2) && pathEq p1 p2 + | PathRecd(p1, _, _, n1), PathRecd(p2, _, _, n2) -> (n1 = n2) && pathEq p1 p2 + | PathUnionConstr(p1, _, _, n1), PathUnionConstr(p2, _, _, n2) -> (n1 = n2) && pathEq p1 p2 + | PathArray(p1, _, _, n1), PathArray(p2, _, _, n2) -> (n1 = n2) && pathEq p1 p2 + | PathExnConstr(p1, _, n1), PathExnConstr(p2, _, n2) -> (n1 = n2) && pathEq p1 p2 | PathEmpty(_), PathEmpty(_) -> true | _ -> false //--------------------------------------------------------------------------- -// Counter example generation +// Counter example generation //--------------------------------------------------------------------------- -type RefutedSet = - /// A value RefutedInvestigation(path,discrim) indicates that the value at the given path is known +type RefutedSet = + /// A value RefutedInvestigation(path, discrim) indicates that the value at the given path is known /// to NOT be matched by the given discriminator | RefutedInvestigation of Path * DecisionTreeTest list /// A value RefutedWhenClause indicates that a 'when' clause failed @@ -173,7 +173,7 @@ let otherSubtypeText = "some-other-subtype" /// Create a TAST const value from an IL-initialized field read from .NET metadata // (Originally moved from TcFieldInit in TypeChecker.fs -- feel free to move this somewhere more appropriate) let ilFieldToTastConst lit = - match lit with + match lit with | ILFieldInit.String s -> Const.String s | ILFieldInit.Null -> Const.Zero | ILFieldInit.Bool b -> Const.Bool b @@ -187,37 +187,37 @@ let ilFieldToTastConst lit = | ILFieldInit.UInt32 x -> Const.UInt32 x | ILFieldInit.UInt64 x -> Const.UInt64 x | ILFieldInit.Single f -> Const.Single f - | ILFieldInit.Double f -> Const.Double f + | ILFieldInit.Double f -> Const.Double f exception CannotRefute -let RefuteDiscrimSet g m path discrims = +let RefuteDiscrimSet g m path discrims = let mkUnknown ty = snd(mkCompGenLocal m "_" ty) - let rec go path tm = - match path with + let rec go path tm = + match path with | PathQuery _ -> raise CannotRefute - | PathConj (p,_j) -> + | PathConj (p, _j) -> go p tm - | PathTuple (p,tys,j) -> + | PathTuple (p, tys, j) -> let k, eCoversVals = mkOneKnown tm j tys go p (fun _ -> mkRefTupled g m k tys, eCoversVals) - | PathRecd (p,tcref,tinst,j) -> + | PathRecd (p, tcref, tinst, j) -> let flds, eCoversVals = tcref |> actualTysOfInstanceRecdFields (mkTyconRefInst tcref tinst) |> mkOneKnown tm j - go p (fun _ -> Expr.Op(TOp.Recd(RecdExpr, tcref),tinst, flds,m), eCoversVals) + go p (fun _ -> Expr.Op(TOp.Recd(RecdExpr, tcref), tinst, flds, m), eCoversVals) - | PathUnionConstr (p,ucref,tinst,j) -> + | PathUnionConstr (p, ucref, tinst, j) -> let flds, eCoversVals = ucref |> actualTysOfUnionCaseFields (mkTyconRefInst ucref.TyconRef tinst)|> mkOneKnown tm j - go p (fun _ -> Expr.Op(TOp.UnionCase(ucref),tinst, flds,m), eCoversVals) + go p (fun _ -> Expr.Op(TOp.UnionCase(ucref), tinst, flds, m), eCoversVals) - | PathArray (p,ty,len,n) -> + | PathArray (p, ty, len, n) -> let flds, eCoversVals = mkOneKnown tm n (List.replicate len ty) - go p (fun _ -> Expr.Op(TOp.Array,[ty], flds ,m), eCoversVals) + go p (fun _ -> Expr.Op(TOp.Array, [ty], flds, m), eCoversVals) - | PathExnConstr (p,ecref,n) -> + | PathExnConstr (p, ecref, n) -> let flds, eCoversVals = ecref |> recdFieldTysOfExnDefRef |> mkOneKnown tm n - go p (fun _ -> Expr.Op(TOp.ExnConstr(ecref),[], flds,m), eCoversVals) + go p (fun _ -> Expr.Op(TOp.ExnConstr(ecref), [], flds, m), eCoversVals) | PathEmpty(ty) -> tm ty - + and mkOneKnown tm n tys = let flds = List.mapi (fun i ty -> if i = n then tm ty else (mkUnknown ty, false)) tys List.map fst flds, List.fold (fun acc (_, eCoversVals) -> eCoversVals || acc) false flds @@ -227,7 +227,7 @@ let RefuteDiscrimSet g m path discrims = match discrims with | [DecisionTreeTest.IsNull] -> snd(mkCompGenLocal m notNullText ty), false - | [DecisionTreeTest.IsInst (_,_)] -> + | [DecisionTreeTest.IsInst (_, _)] -> snd(mkCompGenLocal m otherSubtypeText ty), false | (DecisionTreeTest.Const c :: rest) -> let consts = Set.ofList (c :: List.choose (function DecisionTreeTest.Const(c) -> Some c | _ -> None) rest) @@ -248,12 +248,12 @@ let RefuteDiscrimSet g m path discrims = | Const.Double _ -> seq { 0 .. System.Int32.MaxValue } |> Seq.map (fun v -> Const.Double(float v)) | Const.Single _ -> seq { 0 .. System.Int32.MaxValue } |> Seq.map (fun v -> Const.Single(float32 v)) | Const.Char _ -> seq { 32us .. System.UInt16.MaxValue } |> Seq.map (fun v -> Const.Char(char v)) - | Const.String _ -> seq { 1 .. System.Int32.MaxValue } |> Seq.map (fun v -> Const.String(new System.String('a',v))) + | Const.String _ -> seq { 1 .. System.Int32.MaxValue } |> Seq.map (fun v -> Const.String(new System.String('a', v))) | Const.Decimal _ -> seq { 1 .. System.Int32.MaxValue } |> Seq.map (fun v -> Const.Decimal(decimal v)) - | _ -> + | _ -> raise CannotRefute) - - match c' with + + match c' with | None -> raise CannotRefute | Some c -> match tryDestAppTy g ty with @@ -275,16 +275,16 @@ let RefuteDiscrimSet g m path discrims = | _ -> None) let nonCoveredEnumValues = Seq.tryFind (fun (_, fldValue) -> not (consts.Contains fldValue)) enumValues - + match nonCoveredEnumValues with - | None -> Expr.Const(c,m,ty), true + | None -> Expr.Const(c, m, ty), true | Some (fldName, _) -> let v = RecdFieldRef.RFRef(tcref, fldName) Expr.Op(TOp.ValFieldGet v, [ty], [], m), false - | _ -> Expr.Const(c,m,ty), false - - | (DecisionTreeTest.UnionCase (ucref1,tinst) :: rest) -> - let ucrefs = ucref1 :: List.choose (function DecisionTreeTest.UnionCase(ucref,_) -> Some ucref | _ -> None) rest + | _ -> Expr.Const(c, m, ty), false + + | (DecisionTreeTest.UnionCase (ucref1, tinst) :: rest) -> + let ucrefs = ucref1 :: List.choose (function DecisionTreeTest.UnionCase(ucref, _) -> Some ucref | _ -> None) rest let tcref = ucref1.TyconRef (* Choose the first ucref based on ordering of names *) let others = @@ -295,37 +295,37 @@ let RefuteDiscrimSet g m path discrims = | [] -> raise CannotRefute | ucref2 :: _ -> let flds = ucref2 |> actualTysOfUnionCaseFields (mkTyconRefInst tcref tinst) |> mkUnknowns - Expr.Op(TOp.UnionCase(ucref2),tinst, flds,m), false - - | [DecisionTreeTest.ArrayLength (n,ty)] -> - Expr.Op(TOp.Array,[ty], mkUnknowns (List.replicate (n+1) ty) ,m), false - - | _ -> + Expr.Op(TOp.UnionCase(ucref2), tinst, flds, m), false + + | [DecisionTreeTest.ArrayLength (n, ty)] -> + Expr.Op(TOp.Array, [ty], mkUnknowns (List.replicate (n+1) ty), m), false + + | _ -> raise CannotRefute go path tm let rec CombineRefutations g r1 r2 = - match r1,r2 with - | Expr.Val(vref,_,_), other | other, Expr.Val(vref,_,_) when vref.LogicalName = "_" -> other - | Expr.Val(vref,_,_), other | other, Expr.Val(vref,_,_) when vref.LogicalName = notNullText -> other - | Expr.Val(vref,_,_), other | other, Expr.Val(vref,_,_) when vref.LogicalName = otherSubtypeText -> other + match r1, r2 with + | Expr.Val(vref, _, _), other | other, Expr.Val(vref, _, _) when vref.LogicalName = "_" -> other + | Expr.Val(vref, _, _), other | other, Expr.Val(vref, _, _) when vref.LogicalName = notNullText -> other + | Expr.Val(vref, _, _), other | other, Expr.Val(vref, _, _) when vref.LogicalName = otherSubtypeText -> other - | Expr.Op((TOp.ExnConstr(ecref1) as op1), tinst1,flds1,m1), Expr.Op(TOp.ExnConstr(ecref2), _,flds2,_) when tyconRefEq g ecref1 ecref2 -> - Expr.Op(op1, tinst1,List.map2 (CombineRefutations g) flds1 flds2,m1) + | Expr.Op((TOp.ExnConstr(ecref1) as op1), tinst1, flds1, m1), Expr.Op(TOp.ExnConstr(ecref2), _, flds2, _) when tyconRefEq g ecref1 ecref2 -> + Expr.Op(op1, tinst1, List.map2 (CombineRefutations g) flds1 flds2, m1) - | Expr.Op((TOp.UnionCase(ucref1) as op1), tinst1,flds1,m1), Expr.Op(TOp.UnionCase(ucref2), _,flds2,_) -> + | Expr.Op((TOp.UnionCase(ucref1) as op1), tinst1, flds1, m1), Expr.Op(TOp.UnionCase(ucref2), _, flds2, _) -> if g.unionCaseRefEq ucref1 ucref2 then - Expr.Op(op1, tinst1,List.map2 (CombineRefutations g) flds1 flds2,m1) + Expr.Op(op1, tinst1, List.map2 (CombineRefutations g) flds1 flds2, m1) (* Choose the greater of the two ucrefs based on name ordering *) elif ucref1.CaseName < ucref2.CaseName then r2 - else + else r1 - - | Expr.Op(op1, tinst1,flds1,m1), Expr.Op(_, _,flds2,_) -> - Expr.Op(op1, tinst1,List.map2 (CombineRefutations g) flds1 flds2,m1) - - | Expr.Const(c1, m1, ty1), Expr.Const(c2,_,_) -> + + | Expr.Op(op1, tinst1, flds1, m1), Expr.Op(_, _, flds2, _) -> + Expr.Op(op1, tinst1, List.map2 (CombineRefutations g) flds1 flds2, m1) + + | Expr.Const(c1, m1, ty1), Expr.Const(c2, _, _) -> let c12 = // Make sure longer strings are greater, not the case in the default ordinal comparison @@ -336,19 +336,19 @@ let rec CombineRefutations g r1 r2 = elif c > 0 then s1 elif s1 < s2 then s2 else s1 - - match c1,c2 with + + match c1, c2 with | Const.String(s1), Const.String(s2) -> Const.String(MaxStrings s1 s2) | Const.Decimal(s1), Const.Decimal(s2) -> Const.Decimal(max s1 s2) | _ -> max c1 c2 - + Expr.Const(c12, m1, ty1) | _ -> r1 let ShowCounterExample g denv m refuted = try - let refutations = refuted |> List.collect (function RefutedWhenClause -> [] | (RefutedInvestigation(path,discrim)) -> [RefuteDiscrimSet g m path discrim]) + let refutations = refuted |> List.collect (function RefutedWhenClause -> [] | (RefutedInvestigation(path, discrim)) -> [RefuteDiscrimSet g m path discrim]) let counterExample, enumCoversKnown = match refutations with | [] -> raise CannotRefute @@ -358,19 +358,19 @@ let ShowCounterExample g denv m refuted = CombineRefutations g rAcc r, eckAcc || eck) (r, eck) t let text = Layout.showL (NicePrint.dataExprL denv counterExample) let failingWhenClause = refuted |> List.exists (function RefutedWhenClause -> true | _ -> false) - Some(text,failingWhenClause,enumCoversKnown) - + Some(text, failingWhenClause, enumCoversKnown) + with | CannotRefute -> None | e -> - warning(InternalError(sprintf "" (e.ToString()),m)) + warning(InternalError(sprintf "" (e.ToString()), m)) None - + //--------------------------------------------------------------------------- // Basic problem specification //--------------------------------------------------------------------------- - + type RuleNumber = int type Active = Active of Path * SubExprOfInput * Pattern @@ -381,49 +381,49 @@ type Frontier = Frontier of RuleNumber * Actives * ValMap type InvestigationPoint = Investigation of RuleNumber * DecisionTreeTest * Path -// Note: actives must be a SortedDictionary -// REVIEW: improve these data structures, though surprisingly these functions don't tend to show up -// on profiling runs -let rec isMemOfActives p1 actives = - match actives with - | [] -> false - | (Active(p2,_,_)) :: rest -> pathEq p1 p2 || isMemOfActives p1 rest +// Note: actives must be a SortedDictionary +// REVIEW: improve these data structures, though surprisingly these functions don't tend to show up +// on profiling runs +let rec isMemOfActives p1 actives = + match actives with + | [] -> false + | (Active(p2, _, _)) :: rest -> pathEq p1 p2 || isMemOfActives p1 rest -let rec lookupActive x l = - match l with +let rec lookupActive x l = + match l with | [] -> raise (KeyNotFoundException()) - | (Active(h,r1,r2)::t) -> if pathEq x h then (r1,r2) else lookupActive x t + | (Active(h, r1, r2)::t) -> if pathEq x h then (r1, r2) else lookupActive x t -let rec removeActive x l = - match l with +let rec removeActive x l = + match l with | [] -> [] - | ((Active(h,_,_) as p) ::t) -> if pathEq x h then t else p:: removeActive x t + | ((Active(h, _, _) as p) ::t) -> if pathEq x h then t else p:: removeActive x t //--------------------------------------------------------------------------- // Utilities //--------------------------------------------------------------------------- -// tpinst is required because the pattern is specified w.r.t. generalized type variables. -let getDiscrimOfPattern (g: TcGlobals) tpinst t = - match t with - | TPat_null _m -> +// tpinst is required because the pattern is specified w.r.t. generalized type variables. +let getDiscrimOfPattern (g: TcGlobals) tpinst t = + match t with + | TPat_null _m -> Some(DecisionTreeTest.IsNull) - | TPat_isinst (srcty,tgty,_,_m) -> - Some(DecisionTreeTest.IsInst (instType tpinst srcty,instType tpinst tgty)) - | TPat_exnconstr(tcref,_,_m) -> - Some(DecisionTreeTest.IsInst (g.exn_ty,mkAppTy tcref [])) - | TPat_const (c,_m) -> + | TPat_isinst (srcty, tgty, _, _m) -> + Some(DecisionTreeTest.IsInst (instType tpinst srcty, instType tpinst tgty)) + | TPat_exnconstr(tcref, _, _m) -> + Some(DecisionTreeTest.IsInst (g.exn_ty, mkAppTy tcref [])) + | TPat_const (c, _m) -> Some(DecisionTreeTest.Const c) - | TPat_unioncase (c,tyargs',_,_m) -> - Some(DecisionTreeTest.UnionCase (c,instTypes tpinst tyargs')) - | TPat_array (args,ty,_m) -> - Some(DecisionTreeTest.ArrayLength (args.Length,ty)) - | TPat_query ((activePatExpr,resTys,apatVrefOpt,idx,apinfo),_,_m) -> + | TPat_unioncase (c, tyargs', _, _m) -> + Some(DecisionTreeTest.UnionCase (c, instTypes tpinst tyargs')) + | TPat_array (args, ty, _m) -> + Some(DecisionTreeTest.ArrayLength (args.Length, ty)) + | TPat_query ((activePatExpr, resTys, apatVrefOpt, idx, apinfo), _, _m) -> Some(DecisionTreeTest.ActivePatternCase (activePatExpr, instTypes tpinst resTys, apatVrefOpt, idx, apinfo)) | _ -> None let constOfDiscrim discrim = - match discrim with + match discrim with | DecisionTreeTest.Const x -> x | _ -> failwith "not a const case" @@ -431,60 +431,60 @@ let constOfCase (c: DecisionTreeCase) = constOfDiscrim c.Discriminator /// Compute pattern identity let discrimsEq (g: TcGlobals) d1 d2 = - match d1,d2 with - | DecisionTreeTest.UnionCase (c1,_), DecisionTreeTest.UnionCase(c2,_) -> g.unionCaseRefEq c1 c2 - | DecisionTreeTest.ArrayLength (n1,_), DecisionTreeTest.ArrayLength(n2,_) -> (n1=n2) + match d1, d2 with + | DecisionTreeTest.UnionCase (c1, _), DecisionTreeTest.UnionCase(c2, _) -> g.unionCaseRefEq c1 c2 + | DecisionTreeTest.ArrayLength (n1, _), DecisionTreeTest.ArrayLength(n2, _) -> (n1=n2) | DecisionTreeTest.Const c1, DecisionTreeTest.Const c2 -> (c1=c2) - | DecisionTreeTest.IsNull , DecisionTreeTest.IsNull -> true - | DecisionTreeTest.IsInst (srcty1,tgty1), DecisionTreeTest.IsInst (srcty2,tgty2) -> typeEquiv g srcty1 srcty2 && typeEquiv g tgty1 tgty2 - | DecisionTreeTest.ActivePatternCase (_,_,vrefOpt1,n1,_), DecisionTreeTest.ActivePatternCase (_,_,vrefOpt2,n2,_) -> - match vrefOpt1, vrefOpt2 with + | DecisionTreeTest.IsNull, DecisionTreeTest.IsNull -> true + | DecisionTreeTest.IsInst (srcty1, tgty1), DecisionTreeTest.IsInst (srcty2, tgty2) -> typeEquiv g srcty1 srcty2 && typeEquiv g tgty1 tgty2 + | DecisionTreeTest.ActivePatternCase (_, _, vrefOpt1, n1, _), DecisionTreeTest.ActivePatternCase (_, _, vrefOpt2, n2, _) -> + match vrefOpt1, vrefOpt2 with | Some (vref1, tinst1), Some (vref2, tinst2) -> valRefEq g vref1 vref2 && n1 = n2 && not (doesActivePatternHaveFreeTypars g vref1) && List.lengthsEqAndForall2 (typeEquiv g) tinst1 tinst2 | _ -> false (* for equality purposes these are considered unequal! This is because adhoc computed patterns have no identity. *) | _ -> false - -/// Redundancy of 'isinst' patterns + +/// Redundancy of 'isinst' patterns let isDiscrimSubsumedBy g amap m d1 d2 = - (discrimsEq g d1 d2) + (discrimsEq g d1 d2) || - (match d1,d2 with - | DecisionTreeTest.IsInst (_,tgty1), DecisionTreeTest.IsInst (_,tgty2) -> + (match d1, d2 with + | DecisionTreeTest.IsInst (_, tgty1), DecisionTreeTest.IsInst (_, tgty2) -> TypeDefinitelySubsumesTypeNoCoercion 0 g amap m tgty2 tgty1 | _ -> false) - -/// Choose a set of investigations that can be performed simultaneously + +/// Choose a set of investigations that can be performed simultaneously let rec chooseSimultaneousEdgeSet prevOpt f l = - match l with - | [] -> [],[] - | h::t -> - match f prevOpt h with - | Some x,_ -> - let l,r = chooseSimultaneousEdgeSet (Some x) f t + match l with + | [] -> [], [] + | h::t -> + match f prevOpt h with + | Some x, _ -> + let l, r = chooseSimultaneousEdgeSet (Some x) f t x :: l, r - | None,_cont -> - let l,r = chooseSimultaneousEdgeSet prevOpt f t + | None, _cont -> + let l, r = chooseSimultaneousEdgeSet prevOpt f t l, h :: r /// Can we represent a integer discrimination as a 'switch' -let canCompactConstantClass c = - match c with - | Const.SByte _ | Const.Int16 _ | Const.Int32 _ - | Const.Byte _ | Const.UInt16 _ | Const.UInt32 _ +let canCompactConstantClass c = + match c with + | Const.SByte _ | Const.Int16 _ | Const.Int32 _ + | Const.Byte _ | Const.UInt16 _ | Const.UInt32 _ | Const.Char _ -> true | _ -> false - + /// Can two discriminators in a 'column' be decided simultaneously? let discrimsHaveSameSimultaneousClass g d1 d2 = - match d1,d2 with - | DecisionTreeTest.Const _, DecisionTreeTest.Const _ - | DecisionTreeTest.IsNull , DecisionTreeTest.IsNull + match d1, d2 with + | DecisionTreeTest.Const _, DecisionTreeTest.Const _ + | DecisionTreeTest.IsNull, DecisionTreeTest.IsNull | DecisionTreeTest.ArrayLength _, DecisionTreeTest.ArrayLength _ | DecisionTreeTest.UnionCase _, DecisionTreeTest.UnionCase _ -> true | DecisionTreeTest.IsInst _, DecisionTreeTest.IsInst _ -> false - | DecisionTreeTest.ActivePatternCase (_,_,apatVrefOpt1,_,_), DecisionTreeTest.ActivePatternCase (_,_,apatVrefOpt2,_,_) -> - match apatVrefOpt1, apatVrefOpt2 with + | DecisionTreeTest.ActivePatternCase (_, _, apatVrefOpt1, _, _), DecisionTreeTest.ActivePatternCase (_, _, apatVrefOpt2, _, _) -> + match apatVrefOpt1, apatVrefOpt2 with | Some (vref1, tinst1), Some (vref2, tinst2) -> valRefEq g vref1 vref2 && not (doesActivePatternHaveFreeTypars g vref1) && List.lengthsEqAndForall2 (typeEquiv g) tinst1 tinst2 | _ -> false (* for equality purposes these are considered different classes of discriminators! This is because adhoc computed patterns have no identity! *) @@ -493,12 +493,12 @@ let discrimsHaveSameSimultaneousClass g d1 d2 = /// Decide the next pattern to investigate let ChooseInvestigationPointLeftToRight frontiers = - match frontiers with - | Frontier (_i,actives,_) ::_t -> - let rec choose l = - match l with + match frontiers with + | Frontier (_i, actives, _) ::_t -> + let rec choose l = + match l with | [] -> failwith "ChooseInvestigationPointLeftToRight: no non-immediate patterns in first rule" - | (Active(_,_,(TPat_null _ | TPat_isinst _ | TPat_exnconstr _ | TPat_unioncase _ | TPat_array _ | TPat_const _ | TPat_query _ | TPat_range _)) as active) + | (Active(_, _, (TPat_null _ | TPat_isinst _ | TPat_exnconstr _ | TPat_unioncase _ | TPat_array _ | TPat_const _ | TPat_query _ | TPat_range _)) as active) :: _ -> active | _ :: t -> choose t choose actives @@ -511,43 +511,43 @@ let ChooseInvestigationPointLeftToRight frontiers = // The problem with this technique is that it creates extra locals which inhibit the process of converting pattern matches into linear let bindings. let (|ListConsDiscrim|_|) g = function - | (DecisionTreeTest.UnionCase (ucref,tinst)) + | (DecisionTreeTest.UnionCase (ucref, tinst)) (* check we can use a simple 'isinst' instruction *) when tyconRefEq g ucref.TyconRef g.list_tcr_canon & ucref.CaseName = "op_ColonColon" -> Some tinst | _ -> None let (|ListEmptyDiscrim|_|) g = function - | (DecisionTreeTest.UnionCase (ucref,tinst)) + | (DecisionTreeTest.UnionCase (ucref, tinst)) (* check we can use a simple 'isinst' instruction *) - when tyconRefEq g ucref.TyconRef g.list_tcr_canon & ucref.CaseName = "op_Nil" -> Some tinst + when tyconRefEq g ucref.TyconRef g.list_tcr_canon & ucref.CaseName = "op_Nil" -> Some tinst | _ -> None #endif -let (|ConstNeedsDefaultCase|_|) c = - match c with - | Const.Decimal _ - | Const.String _ - | Const.Single _ - | Const.Double _ - | Const.SByte _ +let (|ConstNeedsDefaultCase|_|) c = + match c with + | Const.Decimal _ + | Const.String _ + | Const.Single _ + | Const.Double _ + | Const.SByte _ | Const.Byte _ - | Const.Int16 _ - | Const.UInt16 _ - | Const.Int32 _ - | Const.UInt32 _ - | Const.Int64 _ - | Const.UInt64 _ - | Const.IntPtr _ - | Const.UIntPtr _ + | Const.Int16 _ + | Const.UInt16 _ + | Const.Int32 _ + | Const.UInt32 _ + | Const.Int64 _ + | Const.UInt64 _ + | Const.IntPtr _ + | Const.UIntPtr _ | Const.Char _ -> Some () | _ -> None -/// Build a dtree, equivalent to: TDSwitch("expr",edges,default,m) +/// Build a dtree, equivalent to: TDSwitch("expr", edges, default, m) /// /// Once we've chosen a particular active to investigate, we compile the -/// set of edges affected by this investigation into a switch. +/// set of edges affected by this investigation into a switch. /// -/// - For DecisionTreeTest.ActivePatternCase(...,None,...) there is only one edge +/// - For DecisionTreeTest.ActivePatternCase(..., None, ...) there is only one edge /// /// - For DecisionTreeTest.IsInst there are multiple edges, which we can't deal with /// one switch, so we make an iterated if-then-else to cover the cases. We @@ -557,167 +557,167 @@ let (|ConstNeedsDefaultCase|_|) c = /// switches, string switches and floating point switches are treated in the /// same way as DecisionTreeTest.IsInst. let rec BuildSwitch inpExprOpt g expr edges dflt m = - if verbose then dprintf "--> BuildSwitch@%a, #edges = %A, dflt.IsSome = %A\n" outputRange m (List.length edges) (Option.isSome dflt) - match edges,dflt with + if verbose then dprintf "--> BuildSwitch@%a, #edges = %A, dflt.IsSome = %A\n" outputRange m (List.length edges) (Option.isSome dflt) + match edges, dflt with | [], None -> failwith "internal error: no edges and no default" | [], Some dflt -> dflt (* NOTE: first time around, edges<>[] *) - // Optimize the case where the match always succeeds - | [TCase(_,tree)], None -> tree + // Optimize the case where the match always succeeds + | [TCase(_, tree)], None -> tree + + // 'isinst' tests where we have stored the result of the 'isinst' in a variable + // In this case the 'expr' already holds the result of the 'isinst' test. - // 'isinst' tests where we have stored the result of the 'isinst' in a variable - // In this case the 'expr' already holds the result of the 'isinst' test. + | (TCase(DecisionTreeTest.IsInst _, success)):: edges, dflt when Option.isSome inpExprOpt -> + TDSwitch(expr, [TCase(DecisionTreeTest.IsNull, BuildSwitch None g expr edges dflt m)], Some success, m) - | (TCase(DecisionTreeTest.IsInst _,success)):: edges, dflt when Option.isSome inpExprOpt -> - TDSwitch(expr,[TCase(DecisionTreeTest.IsNull,BuildSwitch None g expr edges dflt m)],Some success,m) - // isnull and isinst tests - | (TCase((DecisionTreeTest.IsNull | DecisionTreeTest.IsInst _),_) as edge):: edges, dflt -> - TDSwitch(expr,[edge],Some (BuildSwitch inpExprOpt g expr edges dflt m),m) + | (TCase((DecisionTreeTest.IsNull | DecisionTreeTest.IsInst _), _) as edge):: edges, dflt -> + TDSwitch(expr, [edge], Some (BuildSwitch inpExprOpt g expr edges dflt m), m) #if OPTIMIZE_LIST_MATCHING - // 'cons/nil' tests where we have stored the result of the cons test in an 'isinst' in a variable - // In this case the 'expr' already holds the result of the 'isinst' test. - | [TCase(ListConsDiscrim g tinst, consCase)], Some emptyCase - | [TCase(ListEmptyDiscrim g tinst, emptyCase)], Some consCase + // 'cons/nil' tests where we have stored the result of the cons test in an 'isinst' in a variable + // In this case the 'expr' already holds the result of the 'isinst' test. + | [TCase(ListConsDiscrim g tinst, consCase)], Some emptyCase + | [TCase(ListEmptyDiscrim g tinst, emptyCase)], Some consCase | [TCase(ListEmptyDiscrim g _, emptyCase); TCase(ListConsDiscrim g tinst, consCase)], None | [TCase(ListConsDiscrim g tinst, consCase); TCase(ListEmptyDiscrim g _, emptyCase)], None - when Option.isSome inpExprOpt -> - TDSwitch(expr, [TCase(DecisionTreeTest.IsNull, emptyCase)], Some consCase, m) + when Option.isSome inpExprOpt -> + TDSwitch(expr, [TCase(DecisionTreeTest.IsNull, emptyCase)], Some consCase, m) #endif - - // All these should also always have default cases - | (TCase(DecisionTreeTest.Const ConstNeedsDefaultCase,_) :: _), None -> - error(InternalError("inexhaustive match - need a default cases!",m)) - - // Split string, float, uint64, int64, unativeint, nativeint matches into serial equality tests - | TCase((DecisionTreeTest.ArrayLength _ | DecisionTreeTest.Const (Const.Single _ | Const.Double _ | Const.String _ | Const.Decimal _ | Const.Int64 _ | Const.UInt64 _ | Const.IntPtr _ | Const.UIntPtr _)),_) :: _, Some dflt -> - List.foldBack - (fun (TCase(discrim,tree)) sofar -> + + // All these should also always have default cases + | (TCase(DecisionTreeTest.Const ConstNeedsDefaultCase, _) :: _), None -> + error(InternalError("inexhaustive match - need a default cases!", m)) + + // Split string, float, uint64, int64, unativeint, nativeint matches into serial equality tests + | TCase((DecisionTreeTest.ArrayLength _ | DecisionTreeTest.Const (Const.Single _ | Const.Double _ | Const.String _ | Const.Decimal _ | Const.Int64 _ | Const.UInt64 _ | Const.IntPtr _ | Const.UIntPtr _)), _) :: _, Some dflt -> + List.foldBack + (fun (TCase(discrim, tree)) sofar -> let testexpr = expr - let testexpr = - match discrim with - | DecisionTreeTest.ArrayLength(n,_) -> - let _v,vExpr,bind = mkCompGenLocalAndInvisbleBind g "testExpr" m testexpr + let testexpr = + match discrim with + | DecisionTreeTest.ArrayLength(n, _) -> + let _v, vExpr, bind = mkCompGenLocalAndInvisbleBind g "testExpr" m testexpr mkLetBind m bind (mkLazyAnd g m (mkNonNullTest g m vExpr) (mkILAsmCeq g m (mkLdlen g m vExpr) (mkInt g m n))) - | DecisionTreeTest.Const (Const.String _ as c) -> - mkCallEqualsOperator g m g.string_ty testexpr (Expr.Const(c,m,g.string_ty)) - | DecisionTreeTest.Const (Const.Decimal _ as c) -> - mkCallEqualsOperator g m g.decimal_ty testexpr (Expr.Const(c,m,g.decimal_ty)) - | DecisionTreeTest.Const ((Const.Double _ | Const.Single _ | Const.Int64 _ | Const.UInt64 _ | Const.IntPtr _ | Const.UIntPtr _) as c) -> - mkILAsmCeq g m testexpr (Expr.Const(c,m,tyOfExpr g testexpr)) - | _ -> error(InternalError("strange switch",m)) + | DecisionTreeTest.Const (Const.String _ as c) -> + mkCallEqualsOperator g m g.string_ty testexpr (Expr.Const(c, m, g.string_ty)) + | DecisionTreeTest.Const (Const.Decimal _ as c) -> + mkCallEqualsOperator g m g.decimal_ty testexpr (Expr.Const(c, m, g.decimal_ty)) + | DecisionTreeTest.Const ((Const.Double _ | Const.Single _ | Const.Int64 _ | Const.UInt64 _ | Const.IntPtr _ | Const.UIntPtr _) as c) -> + mkILAsmCeq g m testexpr (Expr.Const(c, m, tyOfExpr g testexpr)) + | _ -> error(InternalError("strange switch", m)) mkBoolSwitch m testexpr tree sofar) edges dflt - // Split integer and char matches into compact fragments which will themselves become switch statements. - | TCase(DecisionTreeTest.Const c,_) :: _, Some dflt when canCompactConstantClass c -> - let edgeCompare c1 c2 = - match constOfCase c1,constOfCase c2 with - | (Const.SByte i1),(Const.SByte i2) -> compare i1 i2 - | (Const.Int16 i1),(Const.Int16 i2) -> compare i1 i2 - | (Const.Int32 i1),(Const.Int32 i2) -> compare i1 i2 - | (Const.Byte i1),(Const.Byte i2) -> compare i1 i2 - | (Const.UInt16 i1),(Const.UInt16 i2) -> compare i1 i2 - | (Const.UInt32 i1),(Const.UInt32 i2) -> compare i1 i2 - | (Const.Char c1),(Const.Char c2) -> compare c1 c2 - | _ -> failwith "illtyped term during pattern compilation" + // Split integer and char matches into compact fragments which will themselves become switch statements. + | TCase(DecisionTreeTest.Const c, _) :: _, Some dflt when canCompactConstantClass c -> + let edgeCompare c1 c2 = + match constOfCase c1, constOfCase c2 with + | (Const.SByte i1), (Const.SByte i2) -> compare i1 i2 + | (Const.Int16 i1), (Const.Int16 i2) -> compare i1 i2 + | (Const.Int32 i1), (Const.Int32 i2) -> compare i1 i2 + | (Const.Byte i1), (Const.Byte i2) -> compare i1 i2 + | (Const.UInt16 i1), (Const.UInt16 i2) -> compare i1 i2 + | (Const.UInt32 i1), (Const.UInt32 i2) -> compare i1 i2 + | (Const.Char c1), (Const.Char c2) -> compare c1 c2 + | _ -> failwith "illtyped term during pattern compilation" let edges' = List.sortWith edgeCompare edges - let rec compactify curr edges = - match curr,edges with - | None,[] -> [] - | Some last,[] -> [List.rev last] - | None,h::t -> compactify (Some [h]) t - | Some (prev::moreprev),h::t -> - match constOfCase prev,constOfCase h with - | Const.SByte iprev,Const.SByte inext when int32(iprev) + 1 = int32 inext -> + let rec compactify curr edges = + match curr, edges with + | None, [] -> [] + | Some last, [] -> [List.rev last] + | None, h::t -> compactify (Some [h]) t + | Some (prev::moreprev), h::t -> + match constOfCase prev, constOfCase h with + | Const.SByte iprev, Const.SByte inext when int32(iprev) + 1 = int32 inext -> compactify (Some (h::prev::moreprev)) t - | Const.Int16 iprev,Const.Int16 inext when int32(iprev) + 1 = int32 inext -> + | Const.Int16 iprev, Const.Int16 inext when int32(iprev) + 1 = int32 inext -> compactify (Some (h::prev::moreprev)) t - | Const.Int32 iprev,Const.Int32 inext when iprev+1 = inext -> + | Const.Int32 iprev, Const.Int32 inext when iprev+1 = inext -> compactify (Some (h::prev::moreprev)) t - | Const.Byte iprev,Const.Byte inext when int32(iprev) + 1 = int32 inext -> + | Const.Byte iprev, Const.Byte inext when int32(iprev) + 1 = int32 inext -> compactify (Some (h::prev::moreprev)) t - | Const.UInt16 iprev,Const.UInt16 inext when int32(iprev)+1 = int32 inext -> + | Const.UInt16 iprev, Const.UInt16 inext when int32(iprev)+1 = int32 inext -> compactify (Some (h::prev::moreprev)) t - | Const.UInt32 iprev,Const.UInt32 inext when int32(iprev)+1 = int32 inext -> + | Const.UInt32 iprev, Const.UInt32 inext when int32(iprev)+1 = int32 inext -> compactify (Some (h::prev::moreprev)) t - | Const.Char cprev,Const.Char cnext when (int32 cprev + 1 = int32 cnext) -> + | Const.Char cprev, Const.Char cnext when (int32 cprev + 1 = int32 cnext) -> compactify (Some (h::prev::moreprev)) t | _ -> (List.rev (prev::moreprev)) :: compactify None edges | _ -> failwith "internal error: compactify" let edgeGroups = compactify None edges' - (edgeGroups, dflt) ||> List.foldBack (fun edgeGroup sofar -> TDSwitch(expr,edgeGroup,Some sofar,m)) + (edgeGroups, dflt) ||> List.foldBack (fun edgeGroup sofar -> TDSwitch(expr, edgeGroup, Some sofar, m)) - // For a total pattern match, run the active pattern, bind the result and - // recursively build a switch in the choice type - | (TCase(DecisionTreeTest.ActivePatternCase _,_)::_), _ -> - error(InternalError("DecisionTreeTest.ActivePatternCase should have been eliminated",m)) + // For a total pattern match, run the active pattern, bind the result and + // recursively build a switch in the choice type + | (TCase(DecisionTreeTest.ActivePatternCase _, _)::_), _ -> + error(InternalError("DecisionTreeTest.ActivePatternCase should have been eliminated", m)) - // For a complete match, optimize one test to be the default - | (TCase(_,tree)::rest), None -> TDSwitch (expr,rest,Some tree,m) + // For a complete match, optimize one test to be the default + | (TCase(_, tree)::rest), None -> TDSwitch (expr, rest, Some tree, m) - // Otherwise let codegen make the choices - | _ -> TDSwitch (expr,edges,dflt,m) + // Otherwise let codegen make the choices + | _ -> TDSwitch (expr, edges, dflt, m) #if DEBUG -let rec layoutPat pat = +let rec layoutPat pat = match pat with - | TPat_query (_,pat,_) -> Layout.(--) (Layout.wordL (Layout.TaggedTextOps.tagText "query")) (layoutPat pat) + | TPat_query (_, pat, _) -> Layout.(--) (Layout.wordL (Layout.TaggedTextOps.tagText "query")) (layoutPat pat) | TPat_wild _ -> Layout.wordL (Layout.TaggedTextOps.tagText "wild") | TPat_as _ -> Layout.wordL (Layout.TaggedTextOps.tagText "var") - | TPat_tuple (_, pats, _, _) + | TPat_tuple (_, pats, _, _) | TPat_array (pats, _, _) -> Layout.bracketL (Layout.tupleL (List.map layoutPat pats)) | _ -> Layout.wordL (Layout.TaggedTextOps.tagText "?") - + let layoutPath _p = Layout.wordL (Layout.TaggedTextOps.tagText "") - + let layoutActive (Active (path, _subexpr, pat)) = - Layout.(--) (Layout.wordL (Layout.TaggedTextOps.tagText "Active")) (Layout.tupleL [layoutPath path; layoutPat pat]) - -let layoutFrontier (Frontier (i,actives,_)) = - Layout.(--) (Layout.wordL (Layout.TaggedTextOps.tagText "Frontier ")) (Layout.tupleL [intL i; Layout.listL layoutActive actives]) + Layout.(--) (Layout.wordL (Layout.TaggedTextOps.tagText "Active")) (Layout.tupleL [layoutPath path; layoutPat pat]) + +let layoutFrontier (Frontier (i, actives, _)) = + Layout.(--) (Layout.wordL (Layout.TaggedTextOps.tagText "Frontier ")) (Layout.tupleL [intL i; Layout.listL layoutActive actives]) #endif -let mkFrontiers investigations i = - List.map (fun (actives,valMap) -> Frontier(i,actives,valMap)) investigations +let mkFrontiers investigations i = + List.map (fun (actives, valMap) -> Frontier(i, actives, valMap)) investigations -let getRuleIndex (Frontier (i,_active,_valMap)) = i +let getRuleIndex (Frontier (i, _active, _valMap)) = i /// Is a pattern a partial pattern? -let rec isPatternPartial p = - match p with - | TPat_query ((_,_,_,_,apinfo),p,_m) -> not apinfo.IsTotal || isPatternPartial p +let rec isPatternPartial p = + match p with + | TPat_query ((_, _, _, _, apinfo), p, _m) -> not apinfo.IsTotal || isPatternPartial p | TPat_const _ -> false | TPat_wild _ -> false - | TPat_as (p,_,_) -> isPatternPartial p - | TPat_disjs (ps,_) | TPat_conjs(ps,_) - | TPat_tuple (_,ps,_,_) | TPat_exnconstr(_,ps,_) - | TPat_array (ps,_,_) | TPat_unioncase (_,_,ps,_) - | TPat_recd (_,_,ps,_) -> List.exists isPatternPartial ps + | TPat_as (p, _, _) -> isPatternPartial p + | TPat_disjs (ps, _) | TPat_conjs(ps, _) + | TPat_tuple (_, ps, _, _) | TPat_exnconstr(_, ps, _) + | TPat_array (ps, _, _) | TPat_unioncase (_, _, ps, _) + | TPat_recd (_, _, ps, _) -> List.exists isPatternPartial ps | TPat_range _ -> false | TPat_null _ -> false | TPat_isinst _ -> false -let rec erasePartialPatterns inpp = - match inpp with - | TPat_query ((expr,resTys,apatVrefOpt,idx,apinfo),p,m) -> - if apinfo.IsTotal then TPat_query ((expr,resTys,apatVrefOpt,idx,apinfo),erasePartialPatterns p,m) - else TPat_disjs ([],m) (* always fail *) - | TPat_as (p,x,m) -> TPat_as (erasePartialPatterns p,x,m) - | TPat_disjs (ps,m) -> TPat_disjs(erasePartials ps, m) - | TPat_conjs(ps,m) -> TPat_conjs(erasePartials ps, m) - | TPat_tuple (tupInfo,ps,x,m) -> TPat_tuple(tupInfo,erasePartials ps, x, m) - | TPat_exnconstr(x,ps,m) -> TPat_exnconstr(x,erasePartials ps,m) - | TPat_array (ps,x,m) -> TPat_array (erasePartials ps,x,m) - | TPat_unioncase (x,y,ps,m) -> TPat_unioncase (x,y,erasePartials ps,m) - | TPat_recd (x,y,ps,m) -> TPat_recd (x,y,List.map erasePartialPatterns ps,m) - | TPat_const _ - | TPat_wild _ - | TPat_range _ - | TPat_null _ +let rec erasePartialPatterns inpp = + match inpp with + | TPat_query ((expr, resTys, apatVrefOpt, idx, apinfo), p, m) -> + if apinfo.IsTotal then TPat_query ((expr, resTys, apatVrefOpt, idx, apinfo), erasePartialPatterns p, m) + else TPat_disjs ([], m) (* always fail *) + | TPat_as (p, x, m) -> TPat_as (erasePartialPatterns p, x, m) + | TPat_disjs (ps, m) -> TPat_disjs(erasePartials ps, m) + | TPat_conjs(ps, m) -> TPat_conjs(erasePartials ps, m) + | TPat_tuple (tupInfo, ps, x, m) -> TPat_tuple(tupInfo, erasePartials ps, x, m) + | TPat_exnconstr(x, ps, m) -> TPat_exnconstr(x, erasePartials ps, m) + | TPat_array (ps, x, m) -> TPat_array (erasePartials ps, x, m) + | TPat_unioncase (x, y, ps, m) -> TPat_unioncase (x, y, erasePartials ps, m) + | TPat_recd (x, y, ps, m) -> TPat_recd (x, y, List.map erasePartialPatterns ps, m) + | TPat_const _ + | TPat_wild _ + | TPat_range _ + | TPat_null _ | TPat_isinst _ -> inpp and erasePartials inps = List.map erasePartialPatterns inps @@ -727,171 +727,171 @@ and erasePartials inps = List.map erasePartialPatterns inps //--------------------------------------------------------------------------- type EdgeDiscrim = EdgeDiscrim of int * DecisionTreeTest * range -let getDiscrim (EdgeDiscrim(_,discrim,_)) = discrim +let getDiscrim (EdgeDiscrim(_, discrim, _)) = discrim -let CompilePatternBasic - g denv amap exprm matchm - warnOnUnused - warnOnIncomplete - actionOnFailure - (origInputVal, origInputValTypars, _origInputExprOpt: Expr option) +let CompilePatternBasic + g denv amap exprm matchm + warnOnUnused + warnOnIncomplete + actionOnFailure + (origInputVal, origInputValTypars, _origInputExprOpt: Expr option) (clausesL: TypedMatchClause list) inputTy - resultTy = - // Add the targets to a match builder + resultTy = + // Add the targets to a match builder // Note the input expression has already been evaluated and saved into a variable. // Hence no need for a new sequence point. - let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding,exprm) + let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding, exprm) clausesL |> List.iteri (fun _i c -> mbuilder.AddTarget c.Target |> ignore) - - // Add the incomplete or rethrow match clause on demand, printing a - // warning if necessary (only if it is ever exercised) + + // Add the incomplete or rethrow match clause on demand, printing a + // warning if necessary (only if it is ever exercised) let incompleteMatchClauseOnce = ref None - let getIncompleteMatchClause (refuted) = - // This is lazy because emit a - // warning when the lazy thunk gets evaluated - match !incompleteMatchClauseOnce with - | None -> - (* Emit the incomplete match warning *) - if warnOnIncomplete then - match actionOnFailure with + let getIncompleteMatchClause (refuted) = + // This is lazy because emit a + // warning when the lazy thunk gets evaluated + match !incompleteMatchClauseOnce with + | None -> + (* Emit the incomplete match warning *) + if warnOnIncomplete then + match actionOnFailure with | ThrowIncompleteMatchException | IgnoreWithWarning -> let ignoreWithWarning = (actionOnFailure = IgnoreWithWarning) match ShowCounterExample g denv matchm refuted with - | Some(text,failingWhenClause,true) -> - warning (EnumMatchIncomplete(ignoreWithWarning, Some(text,failingWhenClause), matchm)) - | Some(text,failingWhenClause,false) -> - warning (MatchIncomplete(ignoreWithWarning, Some(text,failingWhenClause), matchm)) + | Some(text, failingWhenClause, true) -> + warning (EnumMatchIncomplete(ignoreWithWarning, Some(text, failingWhenClause), matchm)) + | Some(text, failingWhenClause, false) -> + warning (MatchIncomplete(ignoreWithWarning, Some(text, failingWhenClause), matchm)) | None -> warning (MatchIncomplete(ignoreWithWarning, None, matchm)) - | _ -> + | _ -> () - + let throwExpr = match actionOnFailure with - | FailFilter -> + | FailFilter -> // Return 0 from the .NET exception filter mkInt g matchm 0 - | Rethrow -> + | Rethrow -> // Rethrow unmatched try-catch exn. No sequence point at the target since its not // real code. - mkReraise matchm resultTy - - | Throw -> + mkReraise matchm resultTy + + | Throw -> // We throw instead of rethrow on unmatched try-catch in a computation expression. But why? // Because this isn't a real .NET exception filter/handler but just a function we're passing // to a computation expression builder to simulate one. - mkThrow matchm resultTy (exprForVal matchm origInputVal) - - | ThrowIncompleteMatchException -> - mkThrow matchm resultTy - (mkExnExpr(mk_MFCore_tcref g.fslibCcu "MatchFailureException", - [ mkString g matchm matchm.FileName - mkInt g matchm matchm.StartLine - mkInt g matchm matchm.StartColumn],matchm)) - - | IgnoreWithWarning -> + mkThrow matchm resultTy (exprForVal matchm origInputVal) + + | ThrowIncompleteMatchException -> + mkThrow matchm resultTy + (mkExnExpr(mk_MFCore_tcref g.fslibCcu "MatchFailureException", + [ mkString g matchm matchm.FileName + mkInt g matchm matchm.StartLine + mkInt g matchm matchm.StartColumn], matchm)) + + | IgnoreWithWarning -> mkUnit g matchm - // We don't emit a sequence point at any of the above cases because they don't correspond to - // user code. + // We don't emit a sequence point at any of the above cases because they don't correspond to + // user code. // // Note we don't emit sequence points at either the succeeding or failing - // targets of filters since if the exception is filtered successfully then we + // targets of filters since if the exception is filtered successfully then we // will run the handler and hit the sequence point there. // That sequence point will have the pattern variables bound, which is exactly what we want. - let tg = TTarget(List.empty,throwExpr,SuppressSequencePointAtTarget ) + let tg = TTarget(List.empty, throwExpr, SuppressSequencePointAtTarget ) mbuilder.AddTarget tg |> ignore - let clause = TClause(TPat_wild matchm,None,tg,matchm) + let clause = TClause(TPat_wild matchm, None, tg, matchm) incompleteMatchClauseOnce := Some(clause) clause - + | Some c -> c - // Helpers to get the variables bound at a target. We conceptually add a dummy clause that will always succeed with a "throw" + // Helpers to get the variables bound at a target. We conceptually add a dummy clause that will always succeed with a "throw" let clausesA = Array.ofList clausesL let nclauses = clausesA.Length - let GetClause i refuted = - if i < nclauses then - clausesA.[i] + let GetClause i refuted = + if i < nclauses then + clausesA.[i] elif i = nclauses then getIncompleteMatchClause(refuted) else failwith "GetClause" let GetValsBoundByClause i refuted = (GetClause i refuted).BoundVals let GetWhenGuardOfClause i refuted = (GetClause i refuted).GuardExpr - - // Different uses of parameterized active patterns have different identities as far as paths + + // Different uses of parameterized active patterns have different identities as far as paths // are concerned. Here we generate unique numbers that are completely different to any stamp // by usig negative numbers. let genUniquePathId() = - (newUnique()) - // Build versions of these functions which apply a dummy instantiation to the overall type arguments - let GetSubExprOfInput,getDiscrimOfPattern = + // Build versions of these functions which apply a dummy instantiation to the overall type arguments + let GetSubExprOfInput, getDiscrimOfPattern = let tyargs = List.map (fun _ -> g.unit_ty) origInputValTypars let unit_tpinst = mkTyparInst origInputValTypars tyargs - GetSubExprOfInput g (origInputValTypars,tyargs,unit_tpinst), + GetSubExprOfInput g (origInputValTypars, tyargs, unit_tpinst), getDiscrimOfPattern g unit_tpinst - // The main recursive loop of the pattern match compiler - let rec InvestigateFrontiers refuted frontiers = + // The main recursive loop of the pattern match compiler + let rec InvestigateFrontiers refuted frontiers = match frontiers with - | [] -> failwith "CompilePattern:compile - empty clauses: at least the final clause should always succeed" - | (Frontier (i,active,valMap)) :: rest -> + | [] -> failwith "CompilePattern: compile - empty clauses: at least the final clause should always succeed" + | (Frontier (i, active, valMap)) :: rest -> - // Check to see if we've got a succeeding clause. There may still be a 'when' condition for the clause + // Check to see if we've got a succeeding clause. There may still be a 'when' condition for the clause match active with - | [] -> CompileSuccessPointAndGuard i refuted valMap rest + | [] -> CompileSuccessPointAndGuard i refuted valMap rest - | _ -> + | _ -> (* Otherwise choose a point (i.e. a path) to investigate. *) - let (Active(path,subexpr,pat)) = ChooseInvestigationPointLeftToRight frontiers + let (Active(path, subexpr, pat)) = ChooseInvestigationPointLeftToRight frontiers match pat with - // All these constructs should have been eliminated in BindProjectionPattern + // All these constructs should have been eliminated in BindProjectionPattern | TPat_as _ | TPat_tuple _ | TPat_wild _ | TPat_disjs _ | TPat_conjs _ | TPat_recd _ -> failwith "Unexpected pattern" - // Leaving the ones where we have real work to do - | _ -> + // Leaving the ones where we have real work to do + | _ -> + + let simulSetOfEdgeDiscrims, fallthroughPathFrontiers = ChooseSimultaneousEdges frontiers path + + let inpExprOpt, bindOpt = ChoosePreBinder simulSetOfEdgeDiscrims subexpr - let simulSetOfEdgeDiscrims,fallthroughPathFrontiers = ChooseSimultaneousEdges frontiers path + // For each case, recursively compile the residue decision trees that result if that case successfully matches + let simulSetOfCases, _ = CompileSimultaneousSet frontiers path refuted subexpr simulSetOfEdgeDiscrims inpExprOpt - let inpExprOpt, bindOpt = ChoosePreBinder simulSetOfEdgeDiscrims subexpr - - // For each case, recursively compile the residue decision trees that result if that case successfully matches - let simulSetOfCases, _ = CompileSimultaneousSet frontiers path refuted subexpr simulSetOfEdgeDiscrims inpExprOpt - assert (not (isNil simulSetOfCases)) - // Work out what the default/fall-through tree looks like, is any - // Check if match is complete, if so optimize the default case away. - + // Work out what the default/fall-through tree looks like, is any + // Check if match is complete, if so optimize the default case away. + let defaultTreeOpt : DecisionTree option = CompileFallThroughTree fallthroughPathFrontiers path refuted simulSetOfCases - // OK, build the whole tree and whack on the binding if any - let finalDecisionTree = + // OK, build the whole tree and whack on the binding if any + let finalDecisionTree = let inpExprToSwitch = (match inpExprOpt with Some vExpr -> vExpr | None -> GetSubExprOfInput subexpr) let tree = BuildSwitch inpExprOpt g inpExprToSwitch simulSetOfCases defaultTreeOpt matchm - match bindOpt with + match bindOpt with | None -> tree - | Some bind -> TDBind (bind,tree) - + | Some bind -> TDBind (bind, tree) + finalDecisionTree and CompileSuccessPointAndGuard i refuted valMap rest = let vs2 = GetValsBoundByClause i refuted - let es2 = - vs2 |> List.map (fun v -> - match valMap.TryFind v with - | None -> error(Error(FSComp.SR.patcMissingVariable(v.DisplayName),v.Range)) + let es2 = + vs2 |> List.map (fun v -> + match valMap.TryFind v with + | None -> error(Error(FSComp.SR.patcMissingVariable(v.DisplayName), v.Range)) | Some res -> res) let rhs' = TDSuccess(es2, i) - match GetWhenGuardOfClause i refuted with - | Some whenExpr -> + match GetWhenGuardOfClause i refuted with + | Some whenExpr -> let m = whenExpr.Range - // SEQUENCE POINTS: REVIEW: Build a sequence point at 'when' + // SEQUENCE POINTS: REVIEW: Build a sequence point at 'when' let whenExpr = mkLetsFromBindings m (mkInvisibleBinds vs2 es2) whenExpr // We must duplicate both the bindings and the guard expression to ensure uniqueness of bound variables. @@ -899,57 +899,57 @@ let CompilePatternBasic // // let whenExpr = copyExpr g CloneAll whenExpr // - // However, we are not allowed to copy expressions until type checking is complete, because this + // However, we are not allowed to copy expressions until type checking is complete, because this // would lose recursive fixup points within the expressions (see FSharp 1.0 bug 4821). mkBoolSwitch m whenExpr rhs' (InvestigateFrontiers (RefutedWhenClause::refuted) rest) - | None -> rhs' + | None -> rhs' - /// Select the set of discriminators which we can handle in one test, or as a series of - /// iterated tests, e.g. in the case of TPat_isinst. Ensure we only take at most one class of TPat_query(_) at a time. - /// Record the rule numbers so we know which rule the TPat_query cam from, so that when we project through - /// the frontier we only project the right rule. + /// Select the set of discriminators which we can handle in one test, or as a series of + /// iterated tests, e.g. in the case of TPat_isinst. Ensure we only take at most one class of TPat_query(_) at a time. + /// Record the rule numbers so we know which rule the TPat_query cam from, so that when we project through + /// the frontier we only project the right rule. and ChooseSimultaneousEdges frontiers path = - frontiers |> chooseSimultaneousEdgeSet None (fun prevOpt (Frontier (i',active',_)) -> - if isMemOfActives path active' then + frontiers |> chooseSimultaneousEdgeSet None (fun prevOpt (Frontier (i', active', _)) -> + if isMemOfActives path active' then let p = lookupActive path active' |> snd match getDiscrimOfPattern p with - | Some discrim -> - if (match prevOpt with None -> true | Some (EdgeDiscrim(_,discrimPrev,_)) -> discrimsHaveSameSimultaneousClass g discrim discrimPrev) then - Some (EdgeDiscrim(i',discrim,p.Range)),true - else - None,false - - | None -> - None,true - else - None,true) - - and IsCopyableInputExpr origInputExpr = - match origInputExpr with - | Expr.Op (TOp.LValueOp (LByrefGet, v), [], [], _) when not v.IsMutable -> true + | Some discrim -> + if (match prevOpt with None -> true | Some (EdgeDiscrim(_, discrimPrev, _)) -> discrimsHaveSameSimultaneousClass g discrim discrimPrev) then + Some (EdgeDiscrim(i', discrim, p.Range)), true + else + None, false + + | None -> + None, true + else + None, true) + + and IsCopyableInputExpr origInputExpr = + match origInputExpr with + | Expr.Op (TOp.LValueOp (LByrefGet, v), [], [], _) when not v.IsMutable -> true | _ -> false and ChoosePreBinder simulSetOfEdgeDiscrims subexpr = - match simulSetOfEdgeDiscrims with - // Very simple 'isinst' tests: put the result of 'isinst' in a local variable + match simulSetOfEdgeDiscrims with + // Very simple 'isinst' tests: put the result of 'isinst' in a local variable // - // That is, transform - // 'if istype e then ...unbox e .... ' + // That is, transform + // 'if istype e then ...unbox e .... ' // into - // 'let v = isinst e in .... if nonnull v then ...v .... ' + // 'let v = isinst e in .... if nonnull v then ...v .... ' // // This is really an optimization that could be done more effectively in opt.fs - // if we flowed a bit of information through + // if we flowed a bit of information through + - - | EdgeDiscrim(_i',(DecisionTreeTest.IsInst (_srcty,tgty)),m) :: _rest + | EdgeDiscrim(_i', (DecisionTreeTest.IsInst (_srcty, tgty)), m) :: _rest (* check we can use a simple 'isinst' instruction *) when canUseTypeTestFast g tgty && isNil origInputValTypars -> - let v,vExpr = mkCompGenLocal m "typeTestResult" tgty - if origInputVal.IsMemberOrModuleBinding then + let v, vExpr = mkCompGenLocal m "typeTestResult" tgty + if origInputVal.IsMemberOrModuleBinding then AdjustValToTopVal v origInputVal.DeclaringEntity ValReprInfo.emptyValData let argExpr = GetSubExprOfInput subexpr let appExpr = mkIsInst tgty argExpr matchm @@ -957,26 +957,26 @@ let CompilePatternBasic // Any match on a struct union must take the address of its input. // We can shortcut the addrof when the original input is a deref of a byref value. - | EdgeDiscrim(_i',(DecisionTreeTest.UnionCase (ucref, _)),_) :: _rest + | EdgeDiscrim(_i', (DecisionTreeTest.UnionCase (ucref, _)), _) :: _rest when isNil origInputValTypars && ucref.Tycon.IsStructRecordOrUnionTycon -> let argExpr = GetSubExprOfInput subexpr - let argExpr = - match argExpr, _origInputExprOpt with + let argExpr = + match argExpr, _origInputExprOpt with | Expr.Val(v1, _, _), Some origInputExpr when valEq origInputVal v1.Deref && IsCopyableInputExpr origInputExpr -> origInputExpr | _ -> argExpr let vOpt, addrExp, _readonly, _writeonly = mkExprAddrOfExprAux g true false NeverMutates argExpr None matchm - match vOpt with + match vOpt with | None -> Some addrExp, None - | Some (v,e) -> - if origInputVal.IsMemberOrModuleBinding then + | Some (v, e) -> + if origInputVal.IsMemberOrModuleBinding then AdjustValToTopVal v origInputVal.DeclaringEntity ValReprInfo.emptyValData - Some addrExp, Some (mkInvisibleBind v e) - + Some addrExp, Some (mkInvisibleBind v e) + #if OPTIMIZE_LIST_MATCHING - | [EdgeDiscrim(_, ListConsDiscrim g tinst,m); EdgeDiscrim(_, ListEmptyDiscrim g _, _)] + | [EdgeDiscrim(_, ListConsDiscrim g tinst, m); EdgeDiscrim(_, ListEmptyDiscrim g _, _)] | [EdgeDiscrim(_, ListEmptyDiscrim g _, _); EdgeDiscrim(_, ListConsDiscrim g tinst, m)] | [EdgeDiscrim(_, ListConsDiscrim g tinst, m)] | [EdgeDiscrim(_, ListEmptyDiscrim g tinst, m)] @@ -984,132 +984,132 @@ let CompilePatternBasic when isNil origInputValTypars -> let ucaseTy = (mkProvenUnionCaseTy g.cons_ucref tinst) - let v,vExpr = mkCompGenLocal m "unionTestResult" ucaseTy - if origInputVal.IsMemberOrModuleBinding then + let v, vExpr = mkCompGenLocal m "unionTestResult" ucaseTy + if origInputVal.IsMemberOrModuleBinding then AdjustValToTopVal v origInputVal.DeclaringEntity ValReprInfo.emptyValData let argExpr = GetSubExprOfInput subexpr let appExpr = mkIsInst ucaseTy argExpr matchm - Some vExpr,Some (mkInvisibleBind v appExpr) + Some vExpr, Some (mkInvisibleBind v appExpr) #endif - // Active pattern matches: create a variable to hold the results of executing the active pattern. - | (EdgeDiscrim(_,(DecisionTreeTest.ActivePatternCase(activePatExpr,resTys,_,_,apinfo)),m) :: _) -> - - if not (isNil origInputValTypars) then error(InternalError("Unexpected generalized type variables when compiling an active pattern",m)) + // Active pattern matches: create a variable to hold the results of executing the active pattern. + | (EdgeDiscrim(_, (DecisionTreeTest.ActivePatternCase(activePatExpr, resTys, _, _, apinfo)), m) :: _) -> + + if not (isNil origInputValTypars) then error(InternalError("Unexpected generalized type variables when compiling an active pattern", m)) let resTy = apinfo.ResultType g m resTys - let v,vExpr = mkCompGenLocal m ("activePatternResult" + string (newUnique())) resTy - if origInputVal.IsMemberOrModuleBinding then + let v, vExpr = mkCompGenLocal m ("activePatternResult" + string (newUnique())) resTy + if origInputVal.IsMemberOrModuleBinding then AdjustValToTopVal v origInputVal.DeclaringEntity ValReprInfo.emptyValData let argExpr = GetSubExprOfInput subexpr - let appExpr = mkApps g ((activePatExpr, tyOfExpr g activePatExpr), [], [argExpr],m) - - Some(vExpr),Some(mkInvisibleBind v appExpr) - | _ -> None,None - + let appExpr = mkApps g ((activePatExpr, tyOfExpr g activePatExpr), [], [argExpr], m) + + Some(vExpr), Some(mkInvisibleBind v appExpr) + | _ -> None, None + and CompileSimultaneousSet frontiers path refuted subexpr simulSetOfEdgeDiscrims (inpExprOpt: Expr option) = - ([],simulSetOfEdgeDiscrims) ||> List.collectFold (fun taken (EdgeDiscrim(i',discrim,m)) -> - // Check to see if we've already collected the edge for this case, in which case skip it. - if List.exists (isDiscrimSubsumedBy g amap m discrim) taken then - // Skip this edge: it is refuted - ([],taken) - else + ([], simulSetOfEdgeDiscrims) ||> List.collectFold (fun taken (EdgeDiscrim(i', discrim, m)) -> + // Check to see if we've already collected the edge for this case, in which case skip it. + if List.exists (isDiscrimSubsumedBy g amap m discrim) taken then + // Skip this edge: it is refuted + ([], taken) + else // Make a resVar to hold the results of the successful "proof" that a union value is - // a successful union case. That is, transform - // 'match v with - // | A _ -> ... - // | B _ -> ...' + // a successful union case. That is, transform + // 'match v with + // | A _ -> ... + // | B _ -> ...' // into - // 'match v with - // | A _ -> let vA = (v ~~> A) in .... - // | B _ -> let vB = (v ~~> B) in .... ' + // 'match v with + // | A _ -> let vA = (v ~~> A) in .... + // | B _ -> let vB = (v ~~> B) in .... ' // // Only do this for union cases that actually have some fields and with more than one case - let resPostBindOpt,ucaseBindOpt = - match discrim with - | DecisionTreeTest.UnionCase (ucref, tinst) when + let resPostBindOpt, ucaseBindOpt = + match discrim with + | DecisionTreeTest.UnionCase (ucref, tinst) when #if OPTIMIZE_LIST_MATCHING isNone inpExprOpt && #endif - (isNil origInputValTypars && - not origInputVal.IsMemberOrModuleBinding && + (isNil origInputValTypars && + not origInputVal.IsMemberOrModuleBinding && not ucref.Tycon.IsStructRecordOrUnionTycon && - ucref.UnionCase.RecdFields.Length >= 1 && + ucref.UnionCase.RecdFields.Length >= 1 && ucref.Tycon.UnionCasesArray.Length > 1) -> - let v,vExpr = mkCompGenLocal m "unionCase" (mkProvenUnionCaseTy ucref tinst) + let v, vExpr = mkCompGenLocal m "unionCase" (mkProvenUnionCaseTy ucref tinst) let argExpr = GetSubExprOfInput subexpr - let appExpr = mkUnionCaseProof (argExpr, ucref,tinst,m) - Some vExpr,Some(mkInvisibleBind v appExpr) - | _ -> - None,None - - // Convert active pattern edges to tests on results data - let discrim' = - match discrim with - | DecisionTreeTest.ActivePatternCase(_pexp,resTys,_apatVrefOpt,idx,apinfo) -> + let appExpr = mkUnionCaseProof (argExpr, ucref, tinst, m) + Some vExpr, Some(mkInvisibleBind v appExpr) + | _ -> + None, None + + // Convert active pattern edges to tests on results data + let discrim' = + match discrim with + | DecisionTreeTest.ActivePatternCase(_pexp, resTys, _apatVrefOpt, idx, apinfo) -> let aparity = apinfo.Names.Length let total = apinfo.IsTotal - if not total && aparity > 1 then - error(Error(FSComp.SR.patcPartialActivePatternsGenerateOneResult(),m)) - - if not total then DecisionTreeTest.UnionCase(mkSomeCase g,resTys) - elif aparity <= 1 then DecisionTreeTest.Const(Const.Unit) - else DecisionTreeTest.UnionCase(mkChoiceCaseRef g m aparity idx,resTys) + if not total && aparity > 1 then + error(Error(FSComp.SR.patcPartialActivePatternsGenerateOneResult(), m)) + + if not total then DecisionTreeTest.UnionCase(mkSomeCase g, resTys) + elif aparity <= 1 then DecisionTreeTest.Const(Const.Unit) + else DecisionTreeTest.UnionCase(mkChoiceCaseRef g m aparity idx, resTys) | _ -> discrim - - // Project a successful edge through the frontiers. - let investigation = Investigation(i',discrim,path) - let frontiers = frontiers |> List.collect (GenerateNewFrontiersAfterSucccessfulInvestigation inpExprOpt resPostBindOpt investigation) + // Project a successful edge through the frontiers. + let investigation = Investigation(i', discrim, path) + + let frontiers = frontiers |> List.collect (GenerateNewFrontiersAfterSucccessfulInvestigation inpExprOpt resPostBindOpt investigation) let tree = InvestigateFrontiers refuted frontiers // Bind the resVar for the union case, if we have one - let tree = - match ucaseBindOpt with + let tree = + match ucaseBindOpt with | None -> tree - | Some bind -> TDBind (bind,tree) - // Return the edge - let edge = TCase(discrim',tree) + | Some bind -> TDBind (bind, tree) + // Return the edge + let edge = TCase(discrim', tree) [edge], (discrim :: taken) ) and CompileFallThroughTree fallthroughPathFrontiers path refuted (simulSetOfCases: DecisionTreeCase list) = let simulSetOfDiscrims = simulSetOfCases |> List.map (fun c -> c.Discriminator) - let isRefuted (Frontier (_i',active',_)) = + let isRefuted (Frontier (_i', active', _)) = isMemOfActives path active' && let p = lookupActive path active' |> snd - match getDiscrimOfPattern p with - | Some(discrim) -> List.exists (isDiscrimSubsumedBy g amap exprm discrim) simulSetOfDiscrims + match getDiscrimOfPattern p with + | Some(discrim) -> List.exists (isDiscrimSubsumedBy g amap exprm discrim) simulSetOfDiscrims | None -> false - match simulSetOfDiscrims with + match simulSetOfDiscrims with | DecisionTreeTest.Const (Const.Bool _b) :: _ when simulSetOfCases.Length = 2 -> None | DecisionTreeTest.Const (Const.Unit) :: _ -> None - | DecisionTreeTest.UnionCase (ucref,_) :: _ when simulSetOfCases.Length = ucref.TyconRef.UnionCasesArray.Length -> None - | DecisionTreeTest.ActivePatternCase _ :: _ -> error(InternalError("DecisionTreeTest.ActivePatternCase should have been eliminated",matchm)) - | _ -> + | DecisionTreeTest.UnionCase (ucref, _) :: _ when simulSetOfCases.Length = ucref.TyconRef.UnionCasesArray.Length -> None + | DecisionTreeTest.ActivePatternCase _ :: _ -> error(InternalError("DecisionTreeTest.ActivePatternCase should have been eliminated", matchm)) + | _ -> let fallthroughPathFrontiers = List.filter (isRefuted >> not) fallthroughPathFrontiers - + (* Add to the refuted set *) - let refuted = (RefutedInvestigation(path,simulSetOfDiscrims)) :: refuted - + let refuted = (RefutedInvestigation(path, simulSetOfDiscrims)) :: refuted + match fallthroughPathFrontiers with - | [] -> + | [] -> None - | _ -> + | _ -> Some(InvestigateFrontiers refuted fallthroughPathFrontiers) - - // Build a new frontier that represents the result of a successful investigation - // at rule point (i',discrim,path) - and GenerateNewFrontiersAfterSucccessfulInvestigation inpExprOpt resPostBindOpt (Investigation(i',discrim,path)) (Frontier (i, active,valMap) as frontier) = + + // Build a new frontier that represents the result of a successful investigation + // at rule point (i', discrim, path) + and GenerateNewFrontiersAfterSucccessfulInvestigation inpExprOpt resPostBindOpt (Investigation(i', discrim, path)) (Frontier (i, active, valMap) as frontier) = if (isMemOfActives path active) then - let (SubExpr(accessf,ve)),pat = lookupActive path active + let (SubExpr(accessf, ve)), pat = lookupActive path active - let mkSubFrontiers path accessf' active' argpats pathBuilder = - let mkSubActive j p = + let mkSubFrontiers path accessf' active' argpats pathBuilder = + let mkSubActive j p = let newSubExpr = SubExpr(accessf' j, ve) let newPath = pathBuilder path j Active(newPath, newSubExpr, p) @@ -1118,248 +1118,248 @@ let CompilePatternBasic mkFrontiers investigations i let active' = removeActive path active - match pat with + match pat with | TPat_wild _ | TPat_as _ | TPat_tuple _ | TPat_disjs _ | TPat_conjs _ | TPat_recd _ -> failwith "Unexpected projection pattern" - | TPat_query ((_,resTys,apatVrefOpt,idx,apinfo),p,m) -> - + | TPat_query ((_, resTys, apatVrefOpt, idx, apinfo), p, m) -> + if apinfo.IsTotal then - let hasParam = (match apatVrefOpt with None -> true | Some (vref,_) -> doesActivePatternHaveFreeTypars g vref) + let hasParam = (match apatVrefOpt with None -> true | Some (vref, _) -> doesActivePatternHaveFreeTypars g vref) if (hasParam && i = i') || (discrimsEq g discrim (Option.get (getDiscrimOfPattern pat))) then let aparity = apinfo.Names.Length - let accessf' j tpinst _e' = + let accessf' j tpinst _e' = assert inpExprOpt.IsSome - if aparity <= 1 then - Option.get inpExprOpt + if aparity <= 1 then + Option.get inpExprOpt else let ucref = mkChoiceCaseRef g m aparity idx // TODO: In the future we will want active patterns to be able to return struct-unions // In that eventuality, we need to check we are taking the address correctly - mkUnionCaseFieldGetUnprovenViaExprAddr (Option.get inpExprOpt,ucref,instTypes tpinst resTys,j,exprm) - mkSubFrontiers path accessf' active' [p] (fun path j -> PathQuery(path,int64 j)) + mkUnionCaseFieldGetUnprovenViaExprAddr (Option.get inpExprOpt, ucref, instTypes tpinst resTys, j, exprm) + mkSubFrontiers path accessf' active' [p] (fun path j -> PathQuery(path, int64 j)) elif hasParam then // Successful active patterns don't refute other patterns - [frontier] + [frontier] else [] - else + else if i = i' then - let accessf' _j tpinst _ = + let accessf' _j tpinst _ = // TODO: In the future we will want active patterns to be able to return struct-unions // In that eventuality, we need to check we are taking the address correctly mkUnionCaseFieldGetUnprovenViaExprAddr (Option.get inpExprOpt, mkSomeCase g, instTypes tpinst resTys, 0, exprm) - mkSubFrontiers path accessf' active' [p] (fun path j -> PathQuery(path,int64 j)) - else + mkSubFrontiers path accessf' active' [p] (fun path j -> PathQuery(path, int64 j)) + else // Successful active patterns don't refute other patterns - [frontier] + [frontier] - | TPat_unioncase (ucref1, tyargs, argpats,_) -> - match discrim with + | TPat_unioncase (ucref1, tyargs, argpats, _) -> + match discrim with | DecisionTreeTest.UnionCase (ucref2, tinst) when g.unionCaseRefEq ucref1 ucref2 -> - let accessf' j tpinst exprIn = - match resPostBindOpt with - | Some e -> mkUnionCaseFieldGetProvenViaExprAddr (e,ucref1,tinst,j,exprm) - | None -> - let exprIn = - match inpExprOpt with + let accessf' j tpinst exprIn = + match resPostBindOpt with + | Some e -> mkUnionCaseFieldGetProvenViaExprAddr (e, ucref1, tinst, j, exprm) + | None -> + let exprIn = + match inpExprOpt with | Some addrExp -> addrExp | None -> accessf tpinst exprIn - mkUnionCaseFieldGetUnprovenViaExprAddr (exprIn,ucref1,instTypes tpinst tyargs,j,exprm) - - mkSubFrontiers path accessf' active' argpats (fun path j -> PathUnionConstr(path,ucref1,tyargs,j)) + mkUnionCaseFieldGetUnprovenViaExprAddr (exprIn, ucref1, instTypes tpinst tyargs, j, exprm) + + mkSubFrontiers path accessf' active' argpats (fun path j -> PathUnionConstr(path, ucref1, tyargs, j)) | DecisionTreeTest.UnionCase _ -> // Successful union case tests DO refute all other union case tests (no overlapping union cases) [] - | _ -> + | _ -> // Successful union case tests don't refute any other patterns [frontier] - | TPat_array (argpats,ty,_) -> + | TPat_array (argpats, ty, _) -> match discrim with - | DecisionTreeTest.ArrayLength (n,_) when List.length argpats = n -> + | DecisionTreeTest.ArrayLength (n, _) when List.length argpats = n -> let accessf' j tpinst exprIn = mkCallArrayGet g exprm ty (accessf tpinst exprIn) (mkInt g exprm j) - mkSubFrontiers path accessf' active' argpats (fun path j -> PathArray(path,ty,List.length argpats,j)) + mkSubFrontiers path accessf' active' argpats (fun path j -> PathArray(path, ty, List.length argpats, j)) // Successful length tests refute all other lengths - | DecisionTreeTest.ArrayLength _ -> + | DecisionTreeTest.ArrayLength _ -> [] - | _ -> + | _ -> [frontier] - | TPat_exnconstr (ecref, argpats,_) -> - match discrim with - | DecisionTreeTest.IsInst (_srcTy,tgtTy) when typeEquiv g (mkAppTy ecref []) tgtTy -> - let accessf' j tpinst exprIn = mkExnCaseFieldGet(accessf tpinst exprIn,ecref,j,exprm) - mkSubFrontiers path accessf' active' argpats (fun path j -> PathExnConstr(path,ecref,j)) - | _ -> + | TPat_exnconstr (ecref, argpats, _) -> + match discrim with + | DecisionTreeTest.IsInst (_srcTy, tgtTy) when typeEquiv g (mkAppTy ecref []) tgtTy -> + let accessf' j tpinst exprIn = mkExnCaseFieldGet(accessf tpinst exprIn, ecref, j, exprm) + mkSubFrontiers path accessf' active' argpats (fun path j -> PathExnConstr(path, ecref, j)) + | _ -> // Successful type tests against one sealed type refute all other sealed types // REVIEW: Successful type tests against one sealed type should refute all other sealed types [frontier] - | TPat_isinst (_srcty,tgtTy1,pbindOpt,_) -> - match discrim with - | DecisionTreeTest.IsInst (_srcTy,tgtTy2) when typeEquiv g tgtTy1 tgtTy2 -> - match pbindOpt with - | Some pbind -> - let accessf' tpinst exprIn = + | TPat_isinst (_srcty, tgtTy1, pbindOpt, _) -> + match discrim with + | DecisionTreeTest.IsInst (_srcTy, tgtTy2) when typeEquiv g tgtTy1 tgtTy2 -> + match pbindOpt with + | Some pbind -> + let accessf' tpinst exprIn = // Fetch the result from the place where we saved it, if possible - match inpExprOpt with - | Some e -> e - | _ -> + match inpExprOpt with + | Some e -> e + | _ -> // Otherwise call the helper mkCallUnboxFast g exprm (instType tpinst tgtTy1) (accessf tpinst exprIn) - let (v,exprIn) = BindSubExprOfInput g amap origInputValTypars pbind exprm (SubExpr(accessf',ve)) + let (v, exprIn) = BindSubExprOfInput g amap origInputValTypars pbind exprm (SubExpr(accessf', ve)) [Frontier (i, active', valMap.Add v exprIn )] - | None -> + | None -> [Frontier (i, active', valMap)] - + | _ -> // Successful type tests against other types don't refute anything // REVIEW: Successful type tests against one sealed type should refute all other sealed types [frontier] - | TPat_null _ -> - match discrim with - | DecisionTreeTest.IsNull -> - [Frontier (i, active',valMap)] + | TPat_null _ -> + match discrim with + | DecisionTreeTest.IsNull -> + [Frontier (i, active', valMap)] | _ -> - // Successful null tests don't refute any other patterns + // Successful null tests don't refute any other patterns [frontier] - | TPat_const (c1,_) -> - match discrim with - | DecisionTreeTest.Const c2 when (c1=c2) -> - [Frontier (i, active',valMap)] - | DecisionTreeTest.Const _ -> + | TPat_const (c1, _) -> + match discrim with + | DecisionTreeTest.Const c2 when (c1=c2) -> + [Frontier (i, active', valMap)] + | DecisionTreeTest.Const _ -> // All constants refute all other constants (no overlapping between constants!) [] | _ -> [frontier] | _ -> failwith "pattern compilation: GenerateNewFrontiersAfterSucccessfulInvestigation" - else [frontier] - - and BindProjectionPattern (Active(path,subExpr,p) as inp) ((accActive,accValMap) as s) = - let (SubExpr(accessf,ve)) = subExpr - let mkSubActive pathBuilder accessf' j p' = - Active(pathBuilder path j,SubExpr(accessf' j,ve),p') - - match p with - | TPat_wild _ -> - BindProjectionPatterns [] s - | TPat_as(p',pbind,m) -> - let (v,subExpr') = BindSubExprOfInput g amap origInputValTypars pbind m subExpr - BindProjectionPattern (Active(path,subExpr,p')) (accActive,accValMap.Add v subExpr' ) - | TPat_tuple(tupInfo,ps,tyargs,_m) -> - let accessf' j tpinst subExpr' = mkTupleFieldGet g (tupInfo,accessf tpinst subExpr',instTypes tpinst tyargs,j,exprm) - let pathBuilder path j = PathTuple(path,tyargs,j) + else [frontier] + + and BindProjectionPattern (Active(path, subExpr, p) as inp) ((accActive, accValMap) as s) = + let (SubExpr(accessf, ve)) = subExpr + let mkSubActive pathBuilder accessf' j p' = + Active(pathBuilder path j, SubExpr(accessf' j, ve), p') + + match p with + | TPat_wild _ -> + BindProjectionPatterns [] s + | TPat_as(p', pbind, m) -> + let (v, subExpr') = BindSubExprOfInput g amap origInputValTypars pbind m subExpr + BindProjectionPattern (Active(path, subExpr, p')) (accActive, accValMap.Add v subExpr' ) + | TPat_tuple(tupInfo, ps, tyargs, _m) -> + let accessf' j tpinst subExpr' = mkTupleFieldGet g (tupInfo, accessf tpinst subExpr', instTypes tpinst tyargs, j, exprm) + let pathBuilder path j = PathTuple(path, tyargs, j) let newActives = List.mapi (mkSubActive pathBuilder accessf') ps - BindProjectionPatterns newActives s - | TPat_recd(tcref,tinst,ps,_m) -> - let newActives = - (ps,tcref.TrueInstanceFieldsAsRefList) ||> List.mapi2 (fun j p fref -> - let accessf' fref _j tpinst exprIn = mkRecdFieldGet g (accessf tpinst exprIn,fref,instTypes tpinst tinst,exprm) - let pathBuilder path j = PathRecd(path,tcref,tinst,j) - mkSubActive pathBuilder (accessf' fref) j p) - BindProjectionPatterns newActives s - | TPat_disjs(ps,_m) -> - List.collect (fun p -> BindProjectionPattern (Active(path,subExpr,p)) s) ps - | TPat_conjs(ps,_m) -> - let newActives = List.mapi (mkSubActive (fun path j -> PathConj(path,j)) (fun _j -> accessf)) ps - BindProjectionPatterns newActives s - - | TPat_range (c1,c2,m) -> + BindProjectionPatterns newActives s + | TPat_recd(tcref, tinst, ps, _m) -> + let newActives = + (ps, tcref.TrueInstanceFieldsAsRefList) ||> List.mapi2 (fun j p fref -> + let accessf' fref _j tpinst exprIn = mkRecdFieldGet g (accessf tpinst exprIn, fref, instTypes tpinst tinst, exprm) + let pathBuilder path j = PathRecd(path, tcref, tinst, j) + mkSubActive pathBuilder (accessf' fref) j p) + BindProjectionPatterns newActives s + | TPat_disjs(ps, _m) -> + List.collect (fun p -> BindProjectionPattern (Active(path, subExpr, p)) s) ps + | TPat_conjs(ps, _m) -> + let newActives = List.mapi (mkSubActive (fun path j -> PathConj(path, j)) (fun _j -> accessf)) ps + BindProjectionPatterns newActives s + + | TPat_range (c1, c2, m) -> let res = ref [] for i = int c1 to int c2 do - res := BindProjectionPattern (Active(path,subExpr,TPat_const(Const.Char(char i),m))) s @ !res + res := BindProjectionPattern (Active(path, subExpr, TPat_const(Const.Char(char i), m))) s @ !res !res - // Assign an identifier to each TPat_query based on our knowledge of the 'identity' of the active pattern, if any - | TPat_query ((_,_,apatVrefOpt,_,_),_,_) -> - let uniqId = - match apatVrefOpt with - | Some (vref,_) when not (doesActivePatternHaveFreeTypars g vref) -> vref.Stamp - | _ -> genUniquePathId() - let inp = Active(PathQuery(path,uniqId),subExpr,p) - [(inp::accActive, accValMap)] - | _ -> - [(inp::accActive, accValMap)] + // Assign an identifier to each TPat_query based on our knowledge of the 'identity' of the active pattern, if any + | TPat_query ((_, _, apatVrefOpt, _, _), _, _) -> + let uniqId = + match apatVrefOpt with + | Some (vref, _) when not (doesActivePatternHaveFreeTypars g vref) -> vref.Stamp + | _ -> genUniquePathId() + let inp = Active(PathQuery(path, uniqId), subExpr, p) + [(inp::accActive, accValMap)] + | _ -> + [(inp::accActive, accValMap)] and BindProjectionPatterns ps s = - List.foldBack (fun p sofar -> List.collect (BindProjectionPattern p) sofar) ps [s] + List.foldBack (fun p sofar -> List.collect (BindProjectionPattern p) sofar) ps [s] (* The setup routine of the match compiler *) - let frontiers = - ((clausesL - |> List.mapi (fun i c -> - let initialSubExpr = SubExpr((fun _tpinst x -> x),(exprForVal origInputVal.Range origInputVal,origInputVal)) - let investigations = BindProjectionPattern (Active(PathEmpty(inputTy),initialSubExpr,c.Pattern)) ([],ValMap<_>.Empty) - mkFrontiers investigations i) + let frontiers = + ((clausesL + |> List.mapi (fun i c -> + let initialSubExpr = SubExpr((fun _tpinst x -> x), (exprForVal origInputVal.Range origInputVal, origInputVal)) + let investigations = BindProjectionPattern (Active(PathEmpty(inputTy), initialSubExpr, c.Pattern)) ([], ValMap<_>.Empty) + mkFrontiers investigations i) |> List.concat) - @ - mkFrontiers [([],ValMap<_>.Empty)] nclauses) - let dtree = + @ + mkFrontiers [([], ValMap<_>.Empty)] nclauses) + let dtree = InvestigateFrontiers [] frontiers let targets = mbuilder.CloseTargets() - - // Report unused targets - if warnOnUnused then - let used = HashSet<_>(accTargetsOfDecisionTree dtree [] |> List.toSeq, HashIdentity.Structural) - clausesL |> List.iteri (fun i c -> - if not (used.Contains i) then warning (RuleNeverMatched c.Range)) + // Report unused targets + if warnOnUnused then + let used = HashSet<_>(accTargetsOfDecisionTree dtree [], HashIdentity.Structural) - dtree,targets - -let isPartialOrWhenClause (c:TypedMatchClause) = isPatternPartial c.Pattern || c.GuardExpr.IsSome + clausesL |> List.iteri (fun i c -> + if not (used.Contains i) then warning (RuleNeverMatched c.Range)) + dtree, targets -let rec CompilePattern g denv amap exprm matchm warnOnUnused actionOnFailure (origInputVal,origInputValTypars,origInputExprOpt) (clausesL: TypedMatchClause list) inputTy resultTy = - match clausesL with +let isPartialOrWhenClause (c: TypedMatchClause) = isPatternPartial c.Pattern || c.GuardExpr.IsSome + + +let rec CompilePattern g denv amap exprm matchm warnOnUnused actionOnFailure (origInputVal, origInputValTypars, origInputExprOpt) (clausesL: TypedMatchClause list) inputTy resultTy = + match clausesL with | _ when List.exists isPartialOrWhenClause clausesL -> - // Partial clauses cause major code explosion if treated naively - // Hence treat any pattern matches with any partial clauses clause-by-clause - - // First make sure we generate at least some of the obvious incomplete match warnings. + // Partial clauses cause major code explosion if treated naively + // Hence treat any pattern matches with any partial clauses clause-by-clause + + // First make sure we generate at least some of the obvious incomplete match warnings. let warnOnUnused = false in (* we can't turn this on since we're pretending all partial's fail in order to control the complexity of this. *) let warnOnIncomplete = true - let clausesPretendAllPartialFail = List.collect (fun (TClause(p,whenOpt,tg,m)) -> [TClause(erasePartialPatterns p,whenOpt,tg,m)]) clausesL - let _ = CompilePatternBasic g denv amap exprm matchm warnOnUnused warnOnIncomplete actionOnFailure (origInputVal,origInputValTypars,origInputExprOpt) clausesPretendAllPartialFail inputTy resultTy + let clausesPretendAllPartialFail = List.collect (fun (TClause(p, whenOpt, tg, m)) -> [TClause(erasePartialPatterns p, whenOpt, tg, m)]) clausesL + let _ = CompilePatternBasic g denv amap exprm matchm warnOnUnused warnOnIncomplete actionOnFailure (origInputVal, origInputValTypars, origInputExprOpt) clausesPretendAllPartialFail inputTy resultTy let warnOnIncomplete = false - - let rec atMostOnePartialAtATime clauses = - match List.takeUntil isPartialOrWhenClause clauses with - | l,[] -> - CompilePatternBasic g denv amap exprm matchm warnOnUnused warnOnIncomplete actionOnFailure (origInputVal,origInputValTypars,origInputExprOpt) l inputTy resultTy - | l,(h :: t) -> - // Add the partial clause + + let rec atMostOnePartialAtATime clauses = + match List.takeUntil isPartialOrWhenClause clauses with + | l, [] -> + CompilePatternBasic g denv amap exprm matchm warnOnUnused warnOnIncomplete actionOnFailure (origInputVal, origInputValTypars, origInputExprOpt) l inputTy resultTy + | l, (h :: t) -> + // Add the partial clause doGroupWithAtMostOnePartial (l @ [h]) t - and doGroupWithAtMostOnePartial group rest = + and doGroupWithAtMostOnePartial group rest = // Compile the remaining clauses - let dtree,targets = atMostOnePartialAtATime rest + let dtree, targets = atMostOnePartialAtATime rest // Make the expression that represents the remaining cases of the pattern match let expr = mkAndSimplifyMatch NoSequencePointAtInvisibleBinding exprm matchm resultTy dtree targets - + // If the remainder of the match boiled away to nothing interesting. // We measure this simply by seeing if the range of the resulting expression is identical to matchm. - let spTarget = - if expr.Range = matchm then SuppressSequencePointAtTarget + let spTarget = + if expr.Range = matchm then SuppressSequencePointAtTarget else SequencePointAtTarget // Make the clause that represents the remaining cases of the pattern match - let clauseForRestOfMatch = TClause(TPat_wild matchm,None,TTarget(List.empty,expr,spTarget),matchm) - - CompilePatternBasic g denv amap exprm matchm warnOnUnused warnOnIncomplete actionOnFailure (origInputVal,origInputValTypars,origInputExprOpt) (group @ [clauseForRestOfMatch]) inputTy resultTy - + let clauseForRestOfMatch = TClause(TPat_wild matchm, None, TTarget(List.empty, expr, spTarget), matchm) + + CompilePatternBasic g denv amap exprm matchm warnOnUnused warnOnIncomplete actionOnFailure (origInputVal, origInputValTypars, origInputExprOpt) (group @ [clauseForRestOfMatch]) inputTy resultTy + atMostOnePartialAtATime clausesL - - | _ -> - CompilePatternBasic g denv amap exprm matchm warnOnUnused true actionOnFailure (origInputVal,origInputValTypars,origInputExprOpt) clausesL inputTy resultTy + + | _ -> + CompilePatternBasic g denv amap exprm matchm warnOnUnused true actionOnFailure (origInputVal, origInputValTypars, origInputExprOpt) clausesL inputTy resultTy diff --git a/src/fcs-fable/src/fsharp/PostInferenceChecks.fs b/src/fcs-fable/src/fsharp/PostInferenceChecks.fs index f2c8f370da..cf4d4e4ad9 100755 --- a/src/fcs-fable/src/fsharp/PostInferenceChecks.fs +++ b/src/fcs-fable/src/fsharp/PostInferenceChecks.fs @@ -25,22 +25,6 @@ open FSharp.Compiler.PrettyNaming open FSharp.Compiler.InfoReader open FSharp.Compiler.TypeRelations -//-------------------------------------------------------------------------- -// TestHooks - for dumping range to support source transforms -//-------------------------------------------------------------------------- - -let testFlagMemberBody = ref false -let testHookMemberBody (membInfo: ValMemberInfo) (expr:Expr) = - if !testFlagMemberBody then - let m = expr.Range - printf "TestMemberBody,%A,%s,%d,%d,%d,%d\n" - membInfo.MemberFlags.MemberKind - m.FileName - m.StartLine - m.StartColumn - m.EndLine - m.EndColumn - //-------------------------------------------------------------------------- // NOTES: reraise safety checks //-------------------------------------------------------------------------- @@ -111,25 +95,25 @@ type env = /// Are we in an app expression (Expr.App)? isInAppExpr: bool } -let BindTypar env (tp:Typar) = +let BindTypar env (tp: Typar) = { env with boundTyparNames = tp.Name :: env.boundTyparNames boundTypars = env.boundTypars.Add (tp, ()) } -let BindTypars g env (tps:Typar list) = +let BindTypars g env (tps: Typar list) = let tps = NormalizeDeclaredTyparsForEquiRecursiveInference g tps if isNil tps then env else // Here we mutate to provide better names for generalized type parameters let nms = PrettyTypes.PrettyTyparNames (fun _ -> true) env.boundTyparNames tps - (tps,nms) ||> List.iter2 (fun tp nm -> + (tps, nms) ||> List.iter2 (fun tp nm -> if PrettyTypes.NeedsPrettyTyparName tp then - tp.typar_id <- ident (nm,tp.Range)) + tp.typar_id <- ident (nm, tp.Range)) List.fold BindTypar env tps /// Set the set of vals which are arguments in the active lambda. We are allowed to return /// byref arguments as byref returns. let BindArgVals env (vs: Val list) = - { env with argVals = ValMap.OfList (List.map (fun v -> (v,())) vs) } + { env with argVals = ValMap.OfList (List.map (fun v -> (v, ())) vs) } /// Limit flags represent a type(s) returned from checking an expression(s) that is interesting to impose rules on. [] @@ -167,7 +151,7 @@ let CombineTwoLimits limit1 limit2 = let isLimited1 = isByRef1 || isStackSpan1 let isLimited2 = isByRef2 || isStackSpan2 - // A limit that has a stack referring span-like but not a by-ref, + // A limit that has a stack referring span-like but not a by-ref, // we force the scope to 1. This is to handle call sites // that return a by-ref and have stack referring span-likes as arguments. // This is to ensure we can only prevent out of scope at the method level rather than visibility. @@ -214,7 +198,7 @@ type cenv = isInternalTestSpanStackReferring: bool // outputs mutable usesQuotations : bool - mutable entryPointGiven:bool } + mutable entryPointGiven: bool } /// Check if the value is an argument of a function let IsValArgument env (v: Val) = @@ -278,10 +262,10 @@ let GetLimitValByRef cenv env m v = { scope = scope; flags = flags } -let LimitVal cenv (v:Val) limit = +let LimitVal cenv (v: Val) limit = cenv.limitVals.[v.Stamp] <- limit -let BindVal cenv env (v:Val) = +let BindVal cenv env (v: Val) = //printfn "binding %s..." v.DisplayName let alreadyDone = cenv.boundVals.ContainsKey v.Stamp cenv.boundVals.[v.Stamp] <- 1 @@ -305,19 +289,19 @@ let BindVals cenv env vs = List.iter (BindVal cenv env) vs // approx walk of type //-------------------------------------------------------------------------- -let rec CheckTypeDeep (cenv: cenv) ((visitTy,visitTyconRefOpt,visitAppTyOpt,visitTraitSolutionOpt, visitTyparOpt) as f) g env isInner ty = +let rec CheckTypeDeep (cenv: cenv) ((visitTy, visitTyconRefOpt, visitAppTyOpt, visitTraitSolutionOpt, visitTyparOpt) as f) g env isInner ty = // We iterate the _solved_ constraints as well, to pick up any record of trait constraint solutions // This means we walk _all_ the constraints _everywhere_ in a type, including // those attached to _solved_ type variables. This is used by PostTypeCheckSemanticChecks to detect uses of // values as solutions to trait constraints and determine if inference has caused the value to escape its scope. // The only record of these solutions is in the _solved_ constraints of types. - // In an ideal world we would, instead, record the solutions to these constraints as "witness variables" in expressions, + // In an ideal world we would, instead, record the solutions to these constraints as "witness variables" in expressions, // rather than solely in types. match ty with | TType_var tp when tp.Solution.IsSome -> tp.Constraints |> List.iter (fun cx -> match cx with - | TyparConstraint.MayResolveMember((TTrait(_,_,_,_,_,soln)),_) -> + | TyparConstraint.MayResolveMember((TTrait(_, _, _, _, _, soln)), _) -> match visitTraitSolutionOpt, !soln with | Some visitTraitSolution, Some sln -> visitTraitSolution sln | _ -> () @@ -328,13 +312,13 @@ let rec CheckTypeDeep (cenv: cenv) ((visitTy,visitTyconRefOpt,visitAppTyOpt,visi visitTy ty match ty with - | TType_forall (tps,body) -> + | TType_forall (tps, body) -> let env = BindTypars g env tps CheckTypeDeep cenv f g env isInner body tps |> List.iter (fun tp -> tp.Constraints |> List.iter (CheckTypeConstraintDeep cenv f g env)) | TType_measure _ -> () - | TType_app (tcref,tinst) -> + | TType_app (tcref, tinst) -> match visitTyconRefOpt with | Some visitTyconRef -> visitTyconRef isInner tcref | None -> () @@ -349,20 +333,20 @@ let rec CheckTypeDeep (cenv: cenv) ((visitTy,visitTyconRefOpt,visitAppTyOpt,visi match visitAppTyOpt with | Some visitAppTy -> visitAppTy (tcref, tinst) | None -> () - | TType_anon (anonInfo,tys) -> + | TType_anon (anonInfo, tys) -> if not (cenv.anonRecdTypes.ContainsKey anonInfo.Stamp) then cenv.anonRecdTypes <- cenv.anonRecdTypes.Add(anonInfo.Stamp, anonInfo) CheckTypesDeep cenv f g env tys - | TType_ucase (_,tinst) -> CheckTypesDeep cenv f g env tinst - | TType_tuple (_,tys) -> CheckTypesDeep cenv f g env tys - | TType_fun (s,t) -> CheckTypeDeep cenv f g env true s; CheckTypeDeep cenv f g env true t + | TType_ucase (_, tinst) -> CheckTypesDeep cenv f g env tinst + | TType_tuple (_, tys) -> CheckTypesDeep cenv f g env tys + | TType_fun (s, t) -> CheckTypeDeep cenv f g env true s; CheckTypeDeep cenv f g env true t | TType_var tp -> if not tp.IsSolved then match visitTyparOpt with | None -> () | Some visitTyar -> - visitTyar (env,tp) + visitTyar (env, tp) and CheckTypesDeep cenv f g env tys = tys |> List.iter (CheckTypeDeep cenv f g env true) @@ -372,12 +356,12 @@ and CheckTypesDeepNoInner cenv f g env tys = and CheckTypeConstraintDeep cenv f g env x = match x with - | TyparConstraint.CoercesTo(ty,_) -> CheckTypeDeep cenv f g env true ty - | TyparConstraint.MayResolveMember(traitInfo,_) -> CheckTraitInfoDeep cenv f g env traitInfo - | TyparConstraint.DefaultsTo(_,ty,_) -> CheckTypeDeep cenv f g env true ty - | TyparConstraint.SimpleChoice(tys,_) -> CheckTypesDeep cenv f g env tys - | TyparConstraint.IsEnum(uty,_) -> CheckTypeDeep cenv f g env true uty - | TyparConstraint.IsDelegate(aty,bty,_) -> CheckTypeDeep cenv f g env true aty; CheckTypeDeep cenv f g env true bty + | TyparConstraint.CoercesTo(ty, _) -> CheckTypeDeep cenv f g env true ty + | TyparConstraint.MayResolveMember(traitInfo, _) -> CheckTraitInfoDeep cenv f g env traitInfo + | TyparConstraint.DefaultsTo(_, ty, _) -> CheckTypeDeep cenv f g env true ty + | TyparConstraint.SimpleChoice(tys, _) -> CheckTypesDeep cenv f g env tys + | TyparConstraint.IsEnum(uty, _) -> CheckTypeDeep cenv f g env true uty + | TyparConstraint.IsDelegate(aty, bty, _) -> CheckTypeDeep cenv f g env true aty; CheckTypeDeep cenv f g env true bty | TyparConstraint.SupportsComparison _ | TyparConstraint.SupportsEquality _ | TyparConstraint.SupportsNull _ @@ -386,7 +370,7 @@ and CheckTypeConstraintDeep cenv f g env x = | TyparConstraint.IsReferenceType _ | TyparConstraint.RequiresDefaultConstructor _ -> () -and CheckTraitInfoDeep cenv ((_,_,_,visitTraitSolutionOpt,_) as f) g env (TTrait(tys,_,_,argtys,rty,soln)) = +and CheckTraitInfoDeep cenv ((_, _, _, visitTraitSolutionOpt, _) as f) g env (TTrait(tys, _, _, argtys, rty, soln)) = CheckTypesDeep cenv f g env tys CheckTypesDeep cenv f g env argtys Option.iter (CheckTypeDeep cenv f g env true ) rty @@ -404,9 +388,9 @@ let CheckForByrefType cenv env ty check = /// check captures under lambdas /// -/// This is the definition of what can/can't be free in a lambda expression. This is checked at lambdas OR TBind(v,e) nodes OR TObjExprMethod nodes. -/// For TBind(v,e) nodes we may know an 'arity' which gives as a larger set of legitimate syntactic arguments for a lambda. -/// For TObjExprMethod(v,e) nodes we always know the legitimate syntactic arguments. +/// This is the definition of what can/can't be free in a lambda expression. This is checked at lambdas OR TBind(v, e) nodes OR TObjExprMethod nodes. +/// For TBind(v, e) nodes we may know an 'arity' which gives as a larger set of legitimate syntactic arguments for a lambda. +/// For TObjExprMethod(v, e) nodes we always know the legitimate syntactic arguments. let CheckEscapes cenv allowProtected m syntacticArgs body = (* m is a range suited to error reporting *) if cenv.reportErrors then let cantBeFree (v: Val) = @@ -451,11 +435,11 @@ let AccessInternalsVisibleToAsInternal thisCompPath internalsVisibleToPaths acce // Each internalsVisibleToPath is a compPath for the internals of some assembly. // Replace those by the compPath for the internals of this assembly. // This makes those internals visible here, but still internal. Bug://3737 - (access,internalsVisibleToPaths) ||> List.fold (fun access internalsVisibleToPath -> - accessSubstPaths (thisCompPath,internalsVisibleToPath) access) + (access, internalsVisibleToPaths) ||> List.fold (fun access internalsVisibleToPath -> + accessSubstPaths (thisCompPath, internalsVisibleToPath) access) -let CheckTypeForAccess (cenv:cenv) env objName valAcc m ty = +let CheckTypeForAccess (cenv: cenv) env objName valAcc m ty = if cenv.reportErrors then let visitType ty = @@ -471,7 +455,7 @@ let CheckTypeForAccess (cenv:cenv) env objName valAcc m ty = CheckTypeDeep cenv (visitType, None, None, None, None) cenv.g env false ty -let WarnOnWrongTypeForAccess (cenv:cenv) env objName valAcc m ty = +let WarnOnWrongTypeForAccess (cenv: cenv) env objName valAcc m ty = if cenv.reportErrors then let visitType ty = @@ -549,7 +533,7 @@ let mkArgsPermit n = else PermitByRefExpr.YesTupleOfArgs n /// Work out what byref-values are allowed at input positions to named F# functions or members -let mkArgsForAppliedVal isBaseCall (vref:ValRef) argsl = +let mkArgsForAppliedVal isBaseCall (vref: ValRef) argsl = match vref.ValReprInfo with | Some topValInfo -> let argArities = topValInfo.AritiesOfArgs @@ -565,22 +549,22 @@ let mkArgsForAppliedVal isBaseCall (vref:ValRef) argsl = let rec mkArgsForAppliedExpr isBaseCall argsl x = match stripExpr x with // recognise val - | Expr.Val (vref,_,_) -> mkArgsForAppliedVal isBaseCall vref argsl + | Expr.Val (vref, _, _) -> mkArgsForAppliedVal isBaseCall vref argsl // step through instantiations - | Expr.App(f,_fty,_tyargs,[],_) -> mkArgsForAppliedExpr isBaseCall argsl f + | Expr.App(f, _fty, _tyargs, [], _) -> mkArgsForAppliedExpr isBaseCall argsl f // step through subsumption coercions - | Expr.Op(TOp.Coerce,_,[f],_) -> mkArgsForAppliedExpr isBaseCall argsl f + | Expr.Op(TOp.Coerce, _, [f], _) -> mkArgsForAppliedExpr isBaseCall argsl f | _ -> [] /// Check types occurring in the TAST. -let CheckTypeAux permitByRefLike (cenv:cenv) env m ty onInnerByrefError = +let CheckTypeAux permitByRefLike (cenv: cenv) env m ty onInnerByrefError = if cenv.reportErrors then - let visitTyar (env,tp) = + let visitTyar (env, tp) = if not (env.boundTypars.ContainsKey tp) then if tp.IsCompilerGenerated then - errorR (Error(FSComp.SR.checkNotSufficientlyGenericBecauseOfScopeAnon(),m)) + errorR (Error(FSComp.SR.checkNotSufficientlyGenericBecauseOfScopeAnon(), m)) else - errorR (Error(FSComp.SR.checkNotSufficientlyGenericBecauseOfScope(tp.DisplayName),m)) + errorR (Error(FSComp.SR.checkNotSufficientlyGenericBecauseOfScope(tp.DisplayName), m)) let visitTyconRef isInner tcref = @@ -599,7 +583,7 @@ let CheckTypeAux permitByRefLike (cenv:cenv) env m ty onInnerByrefError = errorR(Error(FSComp.SR.chkSystemVoidOnlyInTypeof(), m)) // check if T contains byref types in case of byref - let visitAppTy (tcref,tinst) = + let visitAppTy (tcref, tinst) = if isByrefLikeTyconRef cenv.g m tcref then let visitType ty0 = match tryDestAppTy cenv.g ty0 with @@ -611,11 +595,11 @@ let CheckTypeAux permitByRefLike (cenv:cenv) env m ty onInnerByrefError = let visitTraitSolution info = match info with - | FSMethSln(_,vref,_) -> + | FSMethSln(_, vref, _) -> //printfn "considering %s..." vref.DisplayName if valRefInThisAssembly cenv.g.compilingFslib vref && not (cenv.boundVals.ContainsKey(vref.Stamp)) then //printfn "recording %s..." vref.DisplayName - cenv.potentialUnboundUsesOfVals <- cenv.potentialUnboundUsesOfVals.Add(vref.Stamp,m) + cenv.potentialUnboundUsesOfVals <- cenv.potentialUnboundUsesOfVals.Add(vref.Stamp, m) | _ -> () CheckTypeDeep cenv (ignore, Some visitTyconRef, Some visitAppTy, Some visitTraitSolution, Some visitTyar) cenv.g env false ty @@ -625,13 +609,13 @@ let CheckType permitByRefLike cenv env m ty = /// Check types occurring in TAST (like CheckType) and additionally reject any byrefs. /// The additional byref checks are to catch "byref instantiations" - one place were byref are not permitted. -let CheckTypeNoByrefs (cenv:cenv) env m ty = CheckType PermitByRefType.None cenv env m ty +let CheckTypeNoByrefs (cenv: cenv) env m ty = CheckType PermitByRefType.None cenv env m ty /// Check types occurring in TAST but allow a Span or similar -let CheckTypePermitSpanLike (cenv:cenv) env m ty = CheckType PermitByRefType.SpanLike cenv env m ty +let CheckTypePermitSpanLike (cenv: cenv) env m ty = CheckType PermitByRefType.SpanLike cenv env m ty /// Check types occurring in TAST but allow all byrefs. Only used on internally-generated types -let CheckTypePermitAllByrefs (cenv:cenv) env m ty = CheckType PermitByRefType.All cenv env m ty +let CheckTypePermitAllByrefs (cenv: cenv) env m ty = CheckType PermitByRefType.All cenv env m ty /// Check types ocurring in TAST but disallow inner types to be byref or byref-like types. let CheckTypeNoInnerByrefs cenv env m ty = CheckType PermitByRefType.NoInnerByRefLike cenv env m ty @@ -651,7 +635,7 @@ let (|OptionalCoerce|) = function | x -> x /// Check an expression doesn't contain a 'reraise' -let CheckNoReraise cenv freesOpt (body:Expr) = +let CheckNoReraise cenv freesOpt (body: Expr) = if cenv.reportErrors then // Avoid recomputing the free variables let fvs = match freesOpt with None -> freeInExpr CollectLocals body | Some fvs -> fvs @@ -672,19 +656,19 @@ let CheckMultipleInterfaceInstantiations cenv interfaces m = tyconRefEq cenv.g (tcrefOfAppTy cenv.g typ1) (tcrefOfAppTy cenv.g typ2) && // different instantiations not (typeEquivAux EraseNone cenv.g typ1 typ2) - then Some (typ1,typ2) + then Some (typ1, typ2) else None)) match firstInterfaceWithMultipleGenericInstantiations with | None -> () - | Some (typ1,typ2) -> - errorR(Error(FSComp.SR.chkMultipleGenericInterfaceInstantiations((NicePrint.minimalStringOfType cenv.denv typ1), (NicePrint.minimalStringOfType cenv.denv typ2)),m)) + | Some (typ1, typ2) -> + errorR(Error(FSComp.SR.chkMultipleGenericInterfaceInstantiations((NicePrint.minimalStringOfType cenv.denv typ1), (NicePrint.minimalStringOfType cenv.denv typ2)), m)) /// Check an expression, where the expression is in a position where byrefs can be generated let rec CheckExprNoByrefs cenv env expr = CheckExpr cenv env expr PermitByRefExpr.No |> ignore /// Check a value -and CheckValRef (cenv:cenv) (env:env) v m (context: PermitByRefExpr) = +and CheckValRef (cenv: cenv) (env: env) v m (context: PermitByRefExpr) = if cenv.reportErrors then if isSpliceOperator cenv.g v && not env.quote then errorR(Error(FSComp.SR.chkSplicingOnlyInQuotations(), m)) @@ -719,7 +703,7 @@ and CheckValUse (cenv: cenv) (env: env) (vref: ValRef, vFlags, m) (context: Perm (match vref.DeclaringEntity with Parent tcref -> isAbstractTycon tcref.Deref | _ -> false) if isCallOfConstructorOfAbstractType then - errorR(Error(FSComp.SR.tcAbstractTypeCannotBeInstantiated(),m)) + errorR(Error(FSComp.SR.tcAbstractTypeCannotBeInstantiated(), m)) // This is used to handle this case: // let x = 1 @@ -752,13 +736,13 @@ and CheckValUse (cenv: cenv) (env: env) (vref: ValRef, vFlags, m) (context: Perm limit /// Check an expression, given information about the position of the expression -and CheckForOverAppliedExceptionRaisingPrimitive (cenv:cenv) expr = +and CheckForOverAppliedExceptionRaisingPrimitive (cenv: cenv) expr = let g = cenv.g let expr = stripExpr expr // Some things are more easily checked prior to NormalizeAndAdjustPossibleSubsumptionExprs match expr with - | Expr.App(f,_fty,_tyargs,argsl,_m) -> + | Expr.App(f, _fty, _tyargs, argsl, _m) -> if cenv.reportErrors then @@ -879,29 +863,14 @@ and CheckCallWithReceiver cenv env m returnTy args contexts context = limitArgs CheckCallLimitArgs cenv env m returnTy limitArgs context -/// Check an expression, given information about the position of the expression -and CheckExpr (cenv:cenv) (env:env) origExpr (context:PermitByRefExpr) : Limit = - let g = cenv.g - - let origExpr = stripExpr origExpr - - // CheckForOverAppliedExceptionRaisingPrimitive is more easily checked prior to NormalizeAndAdjustPossibleSubsumptionExprs - CheckForOverAppliedExceptionRaisingPrimitive cenv origExpr - let expr = NormalizeAndAdjustPossibleSubsumptionExprs g origExpr - let expr = stripExpr expr - +and CheckExprLinear (cenv: cenv) (env: env) expr (context: PermitByRefExpr) (contf : Limit -> Limit) = match expr with - | Expr.Sequential (e1,e2,dir,_,_) -> + | Expr.Sequential (e1, e2, NormalSeq, _, _) -> CheckExprNoByrefs cenv env e1 + // tailcall + CheckExprLinear cenv env e2 context contf - match dir with - | NormalSeq -> - CheckExpr cenv env e2 context // carry context into _;RHS (normal sequencing only) - | ThenDoSeq -> - CheckExprNoByrefs cenv {env with ctorLimitedZone=false} e2 - NoLimit - - | Expr.Let ((TBind(v,_bindRhs,_) as bind),body,_,_) -> + | Expr.Let ((TBind(v, _bindRhs, _) as bind), body, _, _) -> let isByRef = isByrefTy cenv.g v.Type let bindingContext = @@ -913,25 +882,66 @@ and CheckExpr (cenv:cenv) (env:env) origExpr (context:PermitByRefExpr) : Limit = let limit = CheckBinding cenv { env with returnScope = env.returnScope + 1 } false bindingContext bind BindVal cenv env v LimitVal cenv v { limit with scope = if isByRef then limit.scope else env.returnScope } - CheckExpr cenv env body context + // tailcall + CheckExprLinear cenv env body context contf - | Expr.Const (_,m,ty) -> + | LinearOpExpr (_op, tyargs, argsHead, argLast, m) -> + CheckTypeInstNoByrefs cenv env m tyargs + argsHead |> List.iter (CheckExprNoByrefs cenv env) + // tailcall + CheckExprLinear cenv env argLast PermitByRefExpr.No (fun _ -> contf NoLimit) + + | LinearMatchExpr (_spMatch, _exprm, dtree, tg1, e2, _spTarget2, m, ty) -> + CheckTypeNoInnerByrefs cenv env m ty + CheckDecisionTree cenv env dtree + let lim1 = CheckDecisionTreeTarget cenv env context tg1 + // tailcall + CheckExprLinear cenv env e2 context (fun lim2 -> contf (CombineLimits [ lim1; lim2 ])) + + | _ -> + // not a linear expression + contf (CheckExpr cenv env expr context) + +/// Check an expression, given information about the position of the expression +and CheckExpr (cenv: cenv) (env: env) origExpr (context: PermitByRefExpr) : Limit = + let g = cenv.g + + let origExpr = stripExpr origExpr + + // CheckForOverAppliedExceptionRaisingPrimitive is more easily checked prior to NormalizeAndAdjustPossibleSubsumptionExprs + CheckForOverAppliedExceptionRaisingPrimitive cenv origExpr + let expr = NormalizeAndAdjustPossibleSubsumptionExprs g origExpr + let expr = stripExpr expr + + match expr with + | LinearOpExpr _ + | LinearMatchExpr _ + | Expr.Let _ + | Expr.Sequential (_, _, NormalSeq, _, _) -> + CheckExprLinear cenv env expr context id + + | Expr.Sequential (e1,e2,ThenDoSeq,_,_) -> + CheckExprNoByrefs cenv env e1 + CheckExprNoByrefs cenv {env with ctorLimitedZone=false} e2 + NoLimit + + | Expr.Const (_, m, ty) -> CheckTypeNoInnerByrefs cenv env m ty NoLimit - | Expr.Val (vref,vFlags,m) -> + | Expr.Val (vref, vFlags, m) -> CheckValUse cenv env (vref, vFlags, m) context - | Expr.Quote(ast,savedConv,_isFromQueryExpression,m,ty) -> + | Expr.Quote(ast, savedConv, _isFromQueryExpression, m, ty) -> CheckExprNoByrefs cenv {env with quote=true} ast if cenv.reportErrors then cenv.usesQuotations <- true // Translate to quotation data try - let qscope = QuotationTranslator.QuotationGenerationScope.Create (g,cenv.amap,cenv.viewCcu, QuotationTranslator.IsReflectedDefinition.No) + let qscope = QuotationTranslator.QuotationGenerationScope.Create (g, cenv.amap, cenv.viewCcu, QuotationTranslator.IsReflectedDefinition.No) let qdata = QuotationTranslator.ConvExprPublic qscope QuotationTranslator.QuotationTranslationEnv.Empty ast - let typeDefs,spliceTypes,spliceExprs = qscope.Close() + let typeDefs, spliceTypes, spliceExprs = qscope.Close() match savedConv.Value with | None -> savedConv:= Some (typeDefs, List.map fst spliceTypes, List.map fst spliceExprs, qdata) | Some _ -> () @@ -941,7 +951,7 @@ and CheckExpr (cenv:cenv) (env:env) origExpr (context:PermitByRefExpr) : Limit = CheckTypeNoByrefs cenv env m ty NoLimit - | Expr.Obj (_,ty,basev,superInitCall,overrides,iimpls,m) -> + | Expr.Obj (_, ty, basev, superInitCall, overrides, iimpls, m) -> CheckExprNoByrefs cenv env superInitCall CheckMethods cenv env basev overrides CheckInterfaceImpls cenv env basev iimpls @@ -950,7 +960,7 @@ and CheckExpr (cenv:cenv) (env:env) origExpr (context:PermitByRefExpr) : Limit = let interfaces = [ if isInterfaceTy g ty then yield! AllSuperTypesOfType g cenv.amap m AllowMultiIntfInstantiations.Yes ty - for (ty,_) in iimpls do + for (ty, _) in iimpls do yield! AllSuperTypesOfType g cenv.amap m AllowMultiIntfInstantiations.Yes ty ] |> List.filter (isInterfaceTy g) @@ -958,13 +968,13 @@ and CheckExpr (cenv:cenv) (env:env) origExpr (context:PermitByRefExpr) : Limit = NoLimit // Allow base calls to F# methods - | Expr.App((InnerExprPat(ExprValWithPossibleTypeInst(v,vFlags,_,_) as f)),_fty,tyargs,(Expr.Val(baseVal,_,_) :: rest),m) + | Expr.App((InnerExprPat(ExprValWithPossibleTypeInst(v, vFlags, _, _) as f)), _fty, tyargs, (Expr.Val(baseVal, _, _) :: rest), m) when ((match vFlags with VSlotDirectCall -> true | _ -> false) && baseVal.BaseOrThisInfo = BaseVal) -> let memberInfo = Option.get v.MemberInfo if memberInfo.MemberFlags.IsDispatchSlot then - errorR(Error(FSComp.SR.tcCannotCallAbstractBaseMember(v.DisplayName),m)) + errorR(Error(FSComp.SR.tcCannotCallAbstractBaseMember(v.DisplayName), m)) NoLimit else let env = { env with isInAppExpr = true } @@ -977,7 +987,7 @@ and CheckExpr (cenv:cenv) (env:env) origExpr (context:PermitByRefExpr) : Limit = CheckExprs cenv env rest (mkArgsForAppliedExpr true rest f) // Allow base calls to IL methods - | Expr.Op (TOp.ILCall (virt,_,_,_,_,_,_,mref,enclTypeArgs,methTypeArgs,tys),tyargs,(Expr.Val(baseVal,_,_)::rest),m) + | Expr.Op (TOp.ILCall (virt, _, _, _, _, _, _, mref, enclTypeArgs, methTypeArgs, tys), tyargs, (Expr.Val(baseVal, _, _)::rest), m) when not virt && baseVal.BaseOrThisInfo = BaseVal -> // Disallow calls to abstract base methods on IL types. @@ -990,7 +1000,7 @@ and CheckExpr (cenv:cenv) (env:env) origExpr (context:PermitByRefExpr) : Limit = // equality. It would be better to make this check in tc.fs when we have the Abstract IL metadata for the method to hand. let mdef = resolveILMethodRef tcref.ILTyconRawMetadata mref if mdef.IsAbstract then - errorR(Error(FSComp.SR.tcCannotCallAbstractBaseMember(mdef.Name),m)) + errorR(Error(FSComp.SR.tcCannotCallAbstractBaseMember(mdef.Name), m)) with _ -> () // defensive coding | _ -> () @@ -1001,8 +1011,8 @@ and CheckExpr (cenv:cenv) (env:env) origExpr (context:PermitByRefExpr) : Limit = CheckValRef cenv env baseVal m PermitByRefExpr.No CheckExprsPermitByRefLike cenv env rest - | Expr.Op (c,tyargs,args,m) -> - CheckExprOp cenv env (c,tyargs,args,m) context expr + | Expr.Op (c, tyargs, args, m) -> + CheckExprOp cenv env (c, tyargs, args, m) context expr // Allow 'typeof' calls as a special case, the only accepted use of System.Void! | TypeOfExpr g ty when isVoidTy g ty -> @@ -1013,13 +1023,13 @@ and CheckExpr (cenv:cenv) (env:env) origExpr (context:PermitByRefExpr) : Limit = NoLimit // Allow '%expr' in quotations - | Expr.App(Expr.Val(vref,_,_),_,tinst,[arg],m) when isSpliceOperator g vref && env.quote -> + | Expr.App(Expr.Val(vref, _, _), _, tinst, [arg], m) when isSpliceOperator g vref && env.quote -> CheckTypeInstNoInnerByrefs cenv env m tinst // it's the splice operator, a byref instantiation is allowed CheckExprNoByrefs cenv env arg NoLimit // Check an application - | Expr.App(f,_fty,tyargs,argsl,m) -> + | Expr.App(f, _fty, tyargs, argsl, m) -> let returnTy = tyOfExpr g expr // This is to handle recursive cases. Don't check 'returnTy' again if we are still inside a app expression. @@ -1042,37 +1052,37 @@ and CheckExpr (cenv:cenv) (env:env) origExpr (context:PermitByRefExpr) : Limit = else CheckCall cenv env m returnTy argsl contexts context - | Expr.Lambda(_,_ctorThisValOpt,_baseValOpt,argvs,_,m,rty) -> - let topValInfo = ValReprInfo ([],[argvs |> List.map (fun _ -> ValReprInfo.unnamedTopArg1)],ValReprInfo.unnamedRetVal) + | Expr.Lambda(_, _ctorThisValOpt, _baseValOpt, argvs, _, m, rty) -> + let topValInfo = ValReprInfo ([], [argvs |> List.map (fun _ -> ValReprInfo.unnamedTopArg1)], ValReprInfo.unnamedRetVal) let ty = mkMultiLambdaTy m argvs rty in CheckLambdas false None cenv env false topValInfo false expr m ty PermitByRefExpr.Yes - | Expr.TyLambda(_,tps,_,m,rty) -> - let topValInfo = ValReprInfo (ValReprInfo.InferTyparInfo tps,[],ValReprInfo.unnamedRetVal) + | Expr.TyLambda(_, tps, _, m, rty) -> + let topValInfo = ValReprInfo (ValReprInfo.InferTyparInfo tps, [], ValReprInfo.unnamedRetVal) let ty = mkForallTyIfNeeded tps rty in CheckLambdas false None cenv env false topValInfo false expr m ty PermitByRefExpr.Yes - | Expr.TyChoose(tps,e1,_) -> + | Expr.TyChoose(tps, e1, _) -> let env = BindTypars g env tps CheckExprNoByrefs cenv env e1 NoLimit - | Expr.Match(_,_,dtree,targets,m,ty) -> + | Expr.Match(_, _, dtree, targets, m, ty) -> CheckTypeNoInnerByrefs cenv env m ty // computed byrefs allowed at each branch CheckDecisionTree cenv env dtree CheckDecisionTreeTargets cenv env targets context - | Expr.LetRec (binds,e,_,_) -> + | Expr.LetRec (binds, e, _, _) -> BindVals cenv env (valsOfBinds binds) CheckBindings cenv env binds CheckExprNoByrefs cenv env e NoLimit - | Expr.StaticOptimization (constraints,e2,e3,m) -> + | Expr.StaticOptimization (constraints, e2, e3, m) -> CheckExprNoByrefs cenv env e2 CheckExprNoByrefs cenv env e3 constraints |> List.iter (function - | TTyconEqualsTycon(ty1,ty2) -> + | TTyconEqualsTycon(ty1, ty2) -> CheckTypeNoByrefs cenv env m ty1 CheckTypeNoByrefs cenv env m ty2 | TTyconIsStruct(ty1) -> @@ -1085,7 +1095,7 @@ and CheckExpr (cenv:cenv) (env:env) origExpr (context:PermitByRefExpr) : Limit = and CheckMethods cenv env baseValOpt methods = methods |> List.iter (CheckMethod cenv env baseValOpt) -and CheckMethod cenv env baseValOpt (TObjExprMethod(_,attribs,tps,vs,body,m)) = +and CheckMethod cenv env baseValOpt (TObjExprMethod(_, attribs, tps, vs, body, m)) = let env = BindTypars cenv.g env tps let vs = List.concat vs let env = BindArgVals env vs @@ -1097,33 +1107,33 @@ and CheckMethod cenv env baseValOpt (TObjExprMethod(_,attribs,tps,vs,body,m)) = and CheckInterfaceImpls cenv env baseValOpt l = l |> List.iter (CheckInterfaceImpl cenv env baseValOpt) -and CheckInterfaceImpl cenv env baseValOpt (_ty,overrides) = +and CheckInterfaceImpl cenv env baseValOpt (_ty, overrides) = CheckMethods cenv env baseValOpt overrides -and CheckExprOp cenv env (op,tyargs,args,m) context expr = +and CheckExprOp cenv env (op, tyargs, args, m) context expr = let g = cenv.g let ctorLimitedZoneCheck() = if env.ctorLimitedZone then errorR(Error(FSComp.SR.chkObjCtorsCantUseExceptionHandling(), m)) (* Special cases *) - match op,tyargs,args with + match op, tyargs, args with // Handle these as special cases since mutables are allowed inside their bodies - | TOp.While _,_,[Expr.Lambda(_,_,_,[_],e1,_,_);Expr.Lambda(_,_,_,[_],e2,_,_)] -> + | TOp.While _, _, [Expr.Lambda(_, _, _, [_], e1, _, _);Expr.Lambda(_, _, _, [_], e2, _, _)] -> CheckTypeInstNoByrefs cenv env m tyargs CheckExprsNoByRefLike cenv env [e1;e2] - | TOp.TryFinally _,[_],[Expr.Lambda(_,_,_,[_],e1,_,_); Expr.Lambda(_,_,_,[_],e2,_,_)] -> + | TOp.TryFinally _, [_], [Expr.Lambda(_, _, _, [_], e1, _, _); Expr.Lambda(_, _, _, [_], e2, _, _)] -> CheckTypeInstNoInnerByrefs cenv env m tyargs // result of a try/finally can be a byref ctorLimitedZoneCheck() let limit = CheckExpr cenv env e1 context // result of a try/finally can be a byref if in a position where the overall expression is can be a byref CheckExprNoByrefs cenv env e2 limit - | TOp.For(_),_,[Expr.Lambda(_,_,_,[_],e1,_,_);Expr.Lambda(_,_,_,[_],e2,_,_);Expr.Lambda(_,_,_,[_],e3,_,_)] -> + | TOp.For(_), _, [Expr.Lambda(_, _, _, [_], e1, _, _);Expr.Lambda(_, _, _, [_], e2, _, _);Expr.Lambda(_, _, _, [_], e3, _, _)] -> CheckTypeInstNoByrefs cenv env m tyargs CheckExprsNoByRefLike cenv env [e1;e2;e3] - | TOp.TryCatch _,[_],[Expr.Lambda(_,_,_,[_],e1,_,_); Expr.Lambda(_,_,_,[_],_e2,_,_); Expr.Lambda(_,_,_,[_],e3,_,_)] -> + | TOp.TryCatch _, [_], [Expr.Lambda(_, _, _, [_], e1, _, _); Expr.Lambda(_, _, _, [_], _e2, _, _); Expr.Lambda(_, _, _, [_], e3, _, _)] -> CheckTypeInstNoInnerByrefs cenv env m tyargs // result of a try/catch can be a byref ctorLimitedZoneCheck() let limit1 = CheckExpr cenv env e1 context // result of a try/catch can be a byref if in a position where the overall expression is can be a byref @@ -1131,7 +1141,7 @@ and CheckExprOp cenv env (op,tyargs,args,m) context expr = let limit2 = CheckExpr cenv env e3 context // result of a try/catch can be a byref if in a position where the overall expression is can be a byref CombineTwoLimits limit1 limit2 - | TOp.ILCall (_,_,_,_,_,_,_,methRef,enclTypeArgs,methTypeArgs,tys),_,_ -> + | TOp.ILCall (_, _, _, _, _, _, _, methRef, enclTypeArgs, methTypeArgs, tys), _, _ -> CheckTypeInstNoByrefs cenv env m tyargs CheckTypeInstNoByrefs cenv env m enclTypeArgs CheckTypeInstNoByrefs cenv env m methTypeArgs @@ -1157,12 +1167,12 @@ and CheckExprOp cenv env (op,tyargs,args,m) context expr = else CheckCall cenv env m returnTy args argContexts PermitByRefExpr.Yes - | TOp.Tuple tupInfo,_,_ when not (evalTupInfoIsStruct tupInfo) -> + | TOp.Tuple tupInfo, _, _ when not (evalTupInfoIsStruct tupInfo) -> match context with | PermitByRefExpr.YesTupleOfArgs nArity -> if cenv.reportErrors then if args.Length <> nArity then - errorR(InternalError("Tuple arity does not correspond to planned function argument arity",m)) + errorR(InternalError("Tuple arity does not correspond to planned function argument arity", m)) // This tuple should not be generated. The known function arity // means it just bundles arguments. CheckExprsPermitByRefLike cenv env args @@ -1170,7 +1180,7 @@ and CheckExprOp cenv env (op,tyargs,args,m) context expr = CheckTypeInstNoByrefs cenv env m tyargs CheckExprsNoByRefLike cenv env args - | TOp.LValueOp(LAddrOf _,vref),_,_ -> + | TOp.LValueOp(LAddrOf _, vref), _, _ -> let limit1 = GetLimitValByRef cenv env m vref.Deref let limit2 = CheckExprsNoByRefLike cenv env args let limit = CombineTwoLimits limit1 limit2 @@ -1193,7 +1203,7 @@ and CheckExprOp cenv env (op,tyargs,args,m) context expr = limit - | TOp.LValueOp(LByrefSet,vref),_,[arg] -> + | TOp.LValueOp(LByrefSet, vref), _, [arg] -> let limit = GetLimitVal cenv env m vref.Deref let isVrefLimited = not (HasLimitFlag LimitFlags.ByRefOfStackReferringSpanLike limit) let isArgLimited = HasLimitFlag LimitFlags.StackReferringSpanLike (CheckExprPermitByRefLike cenv env arg) @@ -1201,7 +1211,7 @@ and CheckExprOp cenv env (op,tyargs,args,m) context expr = errorR(Error(FSComp.SR.chkNoWriteToLimitedSpan(vref.DisplayName), m)) NoLimit - | TOp.LValueOp(LByrefGet,vref),_,[] -> + | TOp.LValueOp(LByrefGet, vref), _, [] -> let limit = GetLimitVal cenv env m vref.Deref if HasLimitFlag LimitFlags.ByRefOfStackReferringSpanLike limit then @@ -1217,25 +1227,25 @@ and CheckExprOp cenv env (op,tyargs,args,m) context expr = else { scope = 1; flags = LimitFlags.None } - | TOp.LValueOp(LSet _, vref),_,[arg] -> + | TOp.LValueOp(LSet _, vref), _, [arg] -> let isVrefLimited = not (HasLimitFlag LimitFlags.StackReferringSpanLike (GetLimitVal cenv env m vref.Deref)) let isArgLimited = HasLimitFlag LimitFlags.StackReferringSpanLike (CheckExprPermitByRefLike cenv env arg) if isVrefLimited && isArgLimited then errorR(Error(FSComp.SR.chkNoWriteToLimitedSpan(vref.DisplayName), m)) NoLimit - | TOp.AnonRecdGet _,_,[arg1] - | TOp.TupleFieldGet _,_,[arg1] -> + | TOp.AnonRecdGet _, _, [arg1] + | TOp.TupleFieldGet _, _, [arg1] -> CheckTypeInstNoByrefs cenv env m tyargs CheckExprsPermitByRefLike cenv env [arg1] (* Compiled pattern matches on immutable value structs come through here. *) - | TOp.ValFieldGet _rf,_,[arg1] -> + | TOp.ValFieldGet _rf, _, [arg1] -> CheckTypeInstNoByrefs cenv env m tyargs //See mkRecdFieldGetViaExprAddr -- byref arg1 when #args =1 // Property getters on mutable structs come through here. CheckExprsPermitByRefLike cenv env [arg1] - | TOp.ValFieldSet rf,_,[arg1;arg2] -> + | TOp.ValFieldSet rf, _, [arg1;arg2] -> CheckTypeInstNoByrefs cenv env m tyargs // See mkRecdFieldSetViaExprAddr -- byref arg1 when #args=2 // Field setters on mutable structs come through here @@ -1248,7 +1258,7 @@ and CheckExprOp cenv env (op,tyargs,args,m) context expr = errorR(Error(FSComp.SR.chkNoWriteToLimitedSpan(rf.FieldName), m)) NoLimit - | TOp.Coerce,[tgty;srcty],[x] -> + | TOp.Coerce, [tgty;srcty], [x] -> if TypeRelations.TypeDefinitelySubsumesTypeNoCoercion 0 g cenv.amap m tgty srcty then CheckExpr cenv env x context else @@ -1256,12 +1266,12 @@ and CheckExprOp cenv env (op,tyargs,args,m) context expr = CheckExprNoByrefs cenv env x NoLimit - | TOp.Reraise,[_ty1],[] -> + | TOp.Reraise, [_ty1], [] -> CheckTypeInstNoByrefs cenv env m tyargs NoLimit // Check get of static field - | TOp.ValFieldGetAddr (rfref, _readonly),tyargs,[] -> + | TOp.ValFieldGetAddr (rfref, _readonly), tyargs, [] -> if context.Disallow && cenv.reportErrors && isByrefLikeTy g m (tyOfExpr g expr) then errorR(Error(FSComp.SR.chkNoAddressStaticFieldAtThisPoint(rfref.FieldName), m)) @@ -1270,7 +1280,7 @@ and CheckExprOp cenv env (op,tyargs,args,m) context expr = NoLimit // Check get of instance field - | TOp.ValFieldGetAddr (rfref, _readonly),tyargs,[obj] -> + | TOp.ValFieldGetAddr (rfref, _readonly), tyargs, [obj] -> if context.Disallow && cenv.reportErrors && isByrefLikeTy g m (tyOfExpr g expr) then errorR(Error(FSComp.SR.chkNoAddressFieldAtThisPoint(rfref.FieldName), m)) @@ -1290,15 +1300,15 @@ and CheckExprOp cenv env (op,tyargs,args,m) context expr = // Recursively check in same context, e.g. if at PermitOnlyReturnable the obj arg must also be returnable CheckExpr cenv env obj context - | TOp.UnionCaseFieldGet _,_,[arg1] -> + | TOp.UnionCaseFieldGet _, _, [arg1] -> CheckTypeInstNoByrefs cenv env m tyargs CheckExprPermitByRefLike cenv env arg1 - | TOp.UnionCaseTagGet _,_,[arg1] -> + | TOp.UnionCaseTagGet _, _, [arg1] -> CheckTypeInstNoByrefs cenv env m tyargs CheckExprPermitByRefLike cenv env arg1 // allow byref - it may be address-of-struct - | TOp.UnionCaseFieldGetAddr (uref, _idx, _readonly),tyargs,[obj] -> + | TOp.UnionCaseFieldGetAddr (uref, _idx, _readonly), tyargs, [obj] -> if context.Disallow && cenv.reportErrors && isByrefLikeTy g m (tyOfExpr g expr) then errorR(Error(FSComp.SR.chkNoAddressFieldAtThisPoint(uref.CaseName), m)) @@ -1311,23 +1321,23 @@ and CheckExprOp cenv env (op,tyargs,args,m) context expr = // Recursively check in same context, e.g. if at PermitOnlyReturnable the obj arg must also be returnable CheckExpr cenv env obj context - | TOp.ILAsm (instrs,tys),_,_ -> + | TOp.ILAsm (instrs, tys), _, _ -> CheckTypeInstNoInnerByrefs cenv env m tys CheckTypeInstNoByrefs cenv env m tyargs - match instrs,args with + match instrs, args with // Write a .NET instance field - | [ I_stfld (_alignment,_vol,_fspec) ],_ -> + | [ I_stfld (_alignment, _vol, _fspec) ], _ -> // permit byref for lhs lvalue // permit byref for rhs lvalue (field would have to have ByRefLike type, i.e. be a field in another ByRefLike type) CheckExprsPermitByRefLike cenv env args // Read a .NET instance field - | [ I_ldfld (_alignment,_vol,_fspec) ],_ -> + | [ I_ldfld (_alignment, _vol, _fspec) ], _ -> // permit byref for lhs lvalue CheckExprsPermitByRefLike cenv env args // Read a .NET instance field - | [ I_ldfld (_alignment,_vol,_fspec); AI_nop ],_ -> + | [ I_ldfld (_alignment, _vol, _fspec); AI_nop ], _ -> // permit byref for lhs lvalue of readonly value CheckExprsPermitByRefLike cenv env args @@ -1344,7 +1354,7 @@ and CheckExprOp cenv env (op,tyargs,args,m) context expr = // Recursively check in same context, e.g. if at PermitOnlyReturnable the obj arg must also be returnable CheckExpr cenv env obj context - | [ I_ldelema (_,isNativePtr,_,_) ],lhsArray::indices -> + | [ I_ldelema (_, isNativePtr, _, _) ], lhsArray::indices -> if context.Disallow && cenv.reportErrors && not isNativePtr && isByrefLikeTy g m (tyOfExpr g expr) then errorR(Error(FSComp.SR.chkNoAddressOfArrayElementAtThisPoint(), m)) // permit byref for lhs lvalue @@ -1352,14 +1362,14 @@ and CheckExprOp cenv env (op,tyargs,args,m) context expr = CheckExprsNoByRefLike cenv env indices |> ignore limit - | [ AI_conv _ ],_ -> + | [ AI_conv _ ], _ -> // permit byref for args to conv CheckExprsPermitByRefLike cenv env args | _ -> CheckExprsNoByRefLike cenv env args - | TOp.TraitCall _,_,_ -> + | TOp.TraitCall _, _, _ -> CheckTypeInstNoByrefs cenv env m tyargs // allow args to be byref here CheckExprsPermitByRefLike cenv env args @@ -1377,13 +1387,13 @@ and CheckLambdas isTop (memInfo: ValMemberInfo option) cenv env inlined topValIn // The topValInfo here says we are _guaranteeing_ to compile a function value // as a .NET method with precisely the corresponding argument counts. match e with - | Expr.TyChoose(tps,e1,m) -> + | Expr.TyChoose(tps, e1, m) -> let env = BindTypars g env tps CheckLambdas isTop memInfo cenv env inlined topValInfo alwaysCheckNoReraise e1 m ety context - | Expr.Lambda (_,_,_,_,_,m,_) - | Expr.TyLambda(_,_,_,m,_) -> - let tps,ctorThisValOpt,baseValOpt,vsl,body,bodyty = destTopLambda g cenv.amap topValInfo (e, ety) in + | Expr.Lambda (_, _, _, _, _, m, _) + | Expr.TyLambda(_, _, _, m, _) -> + let tps, ctorThisValOpt, baseValOpt, vsl, body, bodyty = destTopLambda g cenv.amap topValInfo (e, ety) in let env = BindTypars g env tps let thisAndBase = Option.toList ctorThisValOpt @ Option.toList baseValOpt let restArgs = List.concat vsl @@ -1426,11 +1436,6 @@ and CheckLambdas isTop (memInfo: ValMemberInfo option) cenv env inlined topValIn syntacticArgs |> List.iter (BindVal cenv env) - // Trigger a test hook - match memInfo with - | None -> () - | Some membInfo -> testHookMemberBody membInfo body - // Check escapes in the body. Allow access to protected things within members. let freesOpt = CheckEscapes cenv memInfo.IsSome m syntacticArgs body @@ -1456,7 +1461,7 @@ and CheckLambdas isTop (memInfo: ValMemberInfo option) cenv env inlined topValIn errorR(Error(FSComp.SR.chkReturnTypeNoByref(), m))) for tp in tps do - if tp.Constraints |> List.sumBy (function TyparConstraint.CoercesTo(ty,_) when isClassTy g ty -> 1 | _ -> 0) > 1 then + if tp.Constraints |> List.sumBy (function TyparConstraint.CoercesTo(ty, _) when isClassTy g ty -> 1 | _ -> 0) > 1 then errorR(Error(FSComp.SR.chkTyparMultipleClassConstraints(), m)) NoLimit @@ -1511,40 +1516,40 @@ and CheckDecisionTreeTargets cenv env targets context = |> Array.map (CheckDecisionTreeTarget cenv env context) |> (CombineLimits << List.ofArray) -and CheckDecisionTreeTarget cenv env context (TTarget(vs,e,_)) = +and CheckDecisionTreeTarget cenv env context (TTarget(vs, e, _)) = BindVals cenv env vs vs |> List.iter (CheckValSpec PermitByRefType.All cenv env) CheckExpr cenv env e context and CheckDecisionTree cenv env x = match x with - | TDSuccess (es,_) -> + | TDSuccess (es, _) -> CheckExprsNoByRefLike cenv env es |> ignore - | TDBind(bind,rest) -> + | TDBind(bind, rest) -> CheckBinding cenv env false PermitByRefExpr.Yes bind |> ignore CheckDecisionTree cenv env rest - | TDSwitch (e,cases,dflt,m) -> - CheckDecisionTreeSwitch cenv env (e,cases,dflt,m) + | TDSwitch (e, cases, dflt, m) -> + CheckDecisionTreeSwitch cenv env (e, cases, dflt, m) -and CheckDecisionTreeSwitch cenv env (e,cases,dflt,m) = +and CheckDecisionTreeSwitch cenv env (e, cases, dflt, m) = CheckExprPermitByRefLike cenv env e |> ignore// can be byref for struct union switch - cases |> List.iter (fun (TCase(discrim,e)) -> CheckDecisionTreeTest cenv env m discrim; CheckDecisionTree cenv env e) + cases |> List.iter (fun (TCase(discrim, e)) -> CheckDecisionTreeTest cenv env m discrim; CheckDecisionTree cenv env e) dflt |> Option.iter (CheckDecisionTree cenv env) and CheckDecisionTreeTest cenv env m discrim = match discrim with - | DecisionTreeTest.UnionCase (_,tinst) -> CheckTypeInstNoInnerByrefs cenv env m tinst - | DecisionTreeTest.ArrayLength (_,ty) -> CheckTypeNoInnerByrefs cenv env m ty + | DecisionTreeTest.UnionCase (_, tinst) -> CheckTypeInstNoInnerByrefs cenv env m tinst + | DecisionTreeTest.ArrayLength (_, ty) -> CheckTypeNoInnerByrefs cenv env m ty | DecisionTreeTest.Const _ -> () | DecisionTreeTest.IsNull -> () - | DecisionTreeTest.IsInst (srcTy,tgtTy) -> CheckTypeNoInnerByrefs cenv env m srcTy; CheckTypeNoInnerByrefs cenv env m tgtTy - | DecisionTreeTest.ActivePatternCase (exp,_,_,_,_) -> CheckExprNoByrefs cenv env exp + | DecisionTreeTest.IsInst (srcTy, tgtTy) -> CheckTypeNoInnerByrefs cenv env m srcTy; CheckTypeNoInnerByrefs cenv env m tgtTy + | DecisionTreeTest.ActivePatternCase (exp, _, _, _, _) -> CheckExprNoByrefs cenv env exp -and CheckAttrib cenv env (Attrib(_,_,args,props,_,_,_)) = - props |> List.iter (fun (AttribNamedArg(_,_,_,expr)) -> CheckAttribExpr cenv env expr) +and CheckAttrib cenv env (Attrib(_, _, args, props, _, _, _)) = + props |> List.iter (fun (AttribNamedArg(_, _, _, expr)) -> CheckAttribExpr cenv env expr) args |> List.iter (CheckAttribExpr cenv env) -and CheckAttribExpr cenv env (AttribExpr(expr,vexpr)) = +and CheckAttribExpr cenv env (AttribExpr(expr, vexpr)) = CheckExprNoByrefs cenv env expr CheckExprNoByrefs cenv env vexpr CheckNoReraise cenv None expr @@ -1555,7 +1560,7 @@ and CheckAttribArgExpr cenv env expr = match expr with // Detect standard constants - | Expr.Const(c,m,_) -> + | Expr.Const(c, m, _) -> match c with | Const.Bool _ | Const.Int32 _ @@ -1576,17 +1581,17 @@ and CheckAttribArgExpr cenv env expr = if cenv.reportErrors then errorR (Error (FSComp.SR.tastNotAConstantExpression(), m)) - | Expr.Op(TOp.Array,[_elemTy],args,_m) -> + | Expr.Op(TOp.Array, [_elemTy], args, _m) -> List.iter (CheckAttribArgExpr cenv env) args | TypeOfExpr g _ -> () | TypeDefOfExpr g _ -> () - | Expr.Op(TOp.Coerce,_,[arg],_) -> + | Expr.Op(TOp.Coerce, _, [arg], _) -> CheckAttribArgExpr cenv env arg | EnumExpr g arg1 -> CheckAttribArgExpr cenv env arg1 - | AttribBitwiseOrExpr g (arg1,arg2) -> + | AttribBitwiseOrExpr g (arg1, arg2) -> CheckAttribArgExpr cenv env arg1 CheckAttribArgExpr cenv env arg2 | _ -> @@ -1595,33 +1600,33 @@ and CheckAttribArgExpr cenv env expr = and CheckAttribs cenv env (attribs: Attribs) = if isNil attribs then () else - let tcrefs = [ for (Attrib(tcref,_,_,_,_,_,m)) in attribs -> (tcref,m) ] + let tcrefs = [ for (Attrib(tcref, _, _, _, _, _, m)) in attribs -> (tcref, m) ] // Check for violations of allowMultiple = false let duplicates = tcrefs - |> Seq.groupBy (fun (tcref,_) -> tcref.Stamp) - |> Seq.map (fun (_,elems) -> List.last (List.ofSeq elems), Seq.length elems) - |> Seq.filter (fun (_,count) -> count > 1) + |> Seq.groupBy (fun (tcref, _) -> tcref.Stamp) + |> Seq.map (fun (_, elems) -> List.last (List.ofSeq elems), Seq.length elems) + |> Seq.filter (fun (_, count) -> count > 1) |> Seq.map fst |> Seq.toList // Filter for allowMultiple = false - |> List.filter (fun (tcref,m) -> TryFindAttributeUsageAttribute cenv.g m tcref <> Some(true)) + |> List.filter (fun (tcref, m) -> TryFindAttributeUsageAttribute cenv.g m tcref <> Some(true)) if cenv.reportErrors then - for (tcref,m) in duplicates do + for (tcref, m) in duplicates do errorR(Error(FSComp.SR.chkAttrHasAllowMultiFalse(tcref.DisplayName), m)) attribs |> List.iter (CheckAttrib cenv env) -and CheckValInfo cenv env (ValReprInfo(_,args,ret)) = +and CheckValInfo cenv env (ValReprInfo(_, args, ret)) = args |> List.iterSquared (CheckArgInfo cenv env) ret |> CheckArgInfo cenv env and CheckArgInfo cenv env (argInfo : ArgReprInfo) = CheckAttribs cenv env argInfo.Attribs -and CheckValSpecAux permitByRefLike cenv env (v:Val) onInnerByrefError = +and CheckValSpecAux permitByRefLike cenv env (v: Val) onInnerByrefError = v.Attribs |> CheckAttribs cenv env v.ValReprInfo |> Option.iter (CheckValInfo cenv env) CheckTypeAux permitByRefLike cenv env v.Range v.Type onInnerByrefError @@ -1634,11 +1639,11 @@ and AdjustAccess isHidden (cpath: unit -> CompilationPath) access = let (TAccess(l)) = access // FSharp 1.0 bug 1908: Values hidden by signatures are implicitly at least 'internal' let scoref = cpath().ILScopeRef - TAccess(CompPath(scoref,[])::l) + TAccess(CompPath(scoref, [])::l) else access -and CheckBinding cenv env alwaysCheckNoReraise context (TBind(v,bindRhs,_) as bind) : Limit = +and CheckBinding cenv env alwaysCheckNoReraise context (TBind(v, bindRhs, _) as bind) : Limit = let g = cenv.g let isTop = Option.isSome bind.Var.ValReprInfo //printfn "visiting %s..." v.DisplayName @@ -1649,7 +1654,7 @@ and CheckBinding cenv env alwaysCheckNoReraise context (TBind(v,bindRhs,_) as bi match TryGetActivePatternInfo (mkLocalValRef v) with | Some _apinfo when _apinfo.ActiveTags.Length > 1 -> if doesActivePatternHaveFreeTypars g (mkLocalValRef v) then - errorR(Error(FSComp.SR.activePatternChoiceHasFreeTypars(v.LogicalName),v.Range)) + errorR(Error(FSComp.SR.activePatternChoiceHasFreeTypars(v.LogicalName), v.Range)) | _ -> () match cenv.potentialUnboundUsesOfVals.TryFind v.Stamp with @@ -1674,7 +1679,7 @@ and CheckBinding cenv env alwaysCheckNoReraise context (TBind(v,bindRhs,_) as bi // Check top-level let-bound values match bind.Var.ValReprInfo with | Some info when info.HasNoArgs -> - CheckForByrefLikeType cenv env v.Range v.Type (fun () -> errorR(Error(FSComp.SR.chkNoByrefAsTopValue(),v.Range))) + CheckForByrefLikeType cenv env v.Range v.Type (fun () -> errorR(Error(FSComp.SR.chkNoByrefAsTopValue(), v.Range))) | _ -> () match v.PublicPath with @@ -1695,7 +1700,7 @@ and CheckBinding cenv env alwaysCheckNoReraise context (TBind(v,bindRhs,_) as bi HasFSharpAttribute g g.attrib_ReflectedDefinitionAttribute v.TopValDeclaringEntity.Attribs) then if v.IsInstanceMember && v.MemberApparentEntity.IsStructOrEnumTycon then - errorR(Error(FSComp.SR.chkNoReflectedDefinitionOnStructMember(),v.Range)) + errorR(Error(FSComp.SR.chkNoReflectedDefinitionOnStructMember(), v.Range)) cenv.usesQuotations <- true // If we've already recorded a definition then skip this @@ -1708,14 +1713,14 @@ and CheckBinding cenv env alwaysCheckNoReraise context (TBind(v,bindRhs,_) as bi // one blob for pickling to the binary format try let ety = tyOfExpr g bindRhs - let tps,taue,_ = + let tps, taue, _ = match bindRhs with - | Expr.TyLambda (_,tps,b,_,_) -> tps,b,applyForallTy g ety (List.map mkTyparTy tps) - | _ -> [],bindRhs,ety + | Expr.TyLambda (_, tps, b, _, _) -> tps, b, applyForallTy g ety (List.map mkTyparTy tps) + | _ -> [], bindRhs, ety let env = QuotationTranslator.QuotationTranslationEnv.Empty.BindTypars tps - let qscope = QuotationTranslator.QuotationGenerationScope.Create (g,cenv.amap,cenv.viewCcu, QuotationTranslator.IsReflectedDefinition.Yes) + let qscope = QuotationTranslator.QuotationGenerationScope.Create (g, cenv.amap, cenv.viewCcu, QuotationTranslator.IsReflectedDefinition.Yes) QuotationTranslator.ConvExprPublic qscope env taue |> ignore - let _,_,argExprs = qscope.Close() + let _, _, argExprs = qscope.Close() if not (isNil argExprs) then errorR(Error(FSComp.SR.chkReflectedDefCantSplice(), v.Range)) QuotationTranslator.ConvMethodBase qscope env (v.CompiledName, v) |> ignore @@ -1743,7 +1748,7 @@ and CheckBindings cenv env xs = xs |> List.iter (CheckBinding cenv env false PermitByRefExpr.Yes >> ignore) // Top binds introduce expression, check they are reraise free. -let CheckModuleBinding cenv env (TBind(v,e,_) as bind) = +let CheckModuleBinding cenv env (TBind(v, e, _) as bind) = let g = cenv.g let isExplicitEntryPoint = HasFSharpAttribute g g.attrib_EntryPointAttribute v.Attribs if isExplicitEntryPoint then @@ -1763,7 +1768,7 @@ let CheckModuleBinding cenv env (TBind(v,e,_) as bind) = IsSimpleSyntacticConstantExpr g e && // Check the thing is actually compiled as a property IsCompiledAsStaticProperty g v || - (g.compilingFslib && v.Attribs |> List.exists(fun (Attrib(tc,_,_,_,_,_,_)) -> tc.CompiledName = "ValueAsStaticPropertyAttribute")) + (g.compilingFslib && v.Attribs |> List.exists(fun (Attrib(tc, _, _, _, _, _, _)) -> tc.CompiledName = "ValueAsStaticPropertyAttribute")) then v.SetIsCompiledAsStaticPropertyWithoutField() @@ -1783,7 +1788,7 @@ let CheckModuleBinding cenv env (TBind(v,e,_) as bind) = let hasDefaultAugmentation = tcref.IsUnionTycon && match TryFindFSharpAttribute g g.attrib_DefaultAugmentationAttribute tcref.Attribs with - | Some(Attrib(_,_,[ AttribBoolArg(b) ],_,_,_,_)) -> b + | Some(Attrib(_, _, [ AttribBoolArg(b) ], _, _, _, _)) -> b | _ -> true (* not hiddenRepr *) let kind = (if v.IsMember then "member" else "value") @@ -1793,20 +1798,20 @@ let CheckModuleBinding cenv env (TBind(v,e,_) as bind) = tcref.ModuleOrNamespaceType.AllValsByLogicalName.ContainsKey(nm) && not (valEq tcref.ModuleOrNamespaceType.AllValsByLogicalName.[nm] v) then - error(Duplicate(kind,v.DisplayName,v.Range)) + error(Duplicate(kind, v.DisplayName, v.Range)) #if CASES_IN_NESTED_CLASS if tcref.IsUnionTycon && nm = "Cases" then - errorR(NameClash(nm,kind,v.DisplayName,v.Range, "generated type","Cases",tcref.Range)) + errorR(NameClash(nm, kind, v.DisplayName, v.Range, "generated type", "Cases", tcref.Range)) #endif if tcref.IsUnionTycon then match nm with - | "Tag" -> errorR(NameClash(nm,kind,v.DisplayName,v.Range, FSComp.SR.typeInfoGeneratedProperty(),"Tag",tcref.Range)) - | "Tags" -> errorR(NameClash(nm,kind,v.DisplayName,v.Range, FSComp.SR.typeInfoGeneratedType(),"Tags",tcref.Range)) + | "Tag" -> errorR(NameClash(nm, kind, v.DisplayName, v.Range, FSComp.SR.typeInfoGeneratedProperty(), "Tag", tcref.Range)) + | "Tags" -> errorR(NameClash(nm, kind, v.DisplayName, v.Range, FSComp.SR.typeInfoGeneratedType(), "Tags", tcref.Range)) | _ -> if hasDefaultAugmentation then match tcref.GetUnionCaseByName(nm) with - | Some(uc) -> error(NameClash(nm,kind,v.DisplayName,v.Range, FSComp.SR.typeInfoUnionCase(),uc.DisplayName,uc.Range)) + | Some(uc) -> error(NameClash(nm, kind, v.DisplayName, v.Range, FSComp.SR.typeInfoUnionCase(), uc.DisplayName, uc.Range)) | None -> () let hasNoArgs = @@ -1818,24 +1823,24 @@ let CheckModuleBinding cenv env (TBind(v,e,_) as bind) = if tcref.UnionCasesArray.Length = 1 && hasNoArgs then let ucase1 = tcref.UnionCasesArray.[0] for f in ucase1.RecdFieldsArray do - if f.Name = nm then error(NameClash(nm,kind,v.DisplayName,v.Range, FSComp.SR.typeInfoGeneratedProperty(),f.Name,ucase1.Range)) + if f.Name = nm then error(NameClash(nm, kind, v.DisplayName, v.Range, FSComp.SR.typeInfoGeneratedProperty(), f.Name, ucase1.Range)) // Default augmentation contains the nasty 'Case' etc. let prefix = "New" if nm.StartsWithOrdinal(prefix) then match tcref.GetUnionCaseByName(nm.[prefix.Length ..]) with - | Some(uc) -> error(NameClash(nm,kind,v.DisplayName,v.Range, FSComp.SR.chkUnionCaseCompiledForm(),uc.DisplayName,uc.Range)) + | Some(uc) -> error(NameClash(nm, kind, v.DisplayName, v.Range, FSComp.SR.chkUnionCaseCompiledForm(), uc.DisplayName, uc.Range)) | None -> () // Default augmentation contains the nasty 'Is' etc. let prefix = "Is" if nm.StartsWithOrdinal(prefix) && hasDefaultAugmentation then match tcref.GetUnionCaseByName(nm.[prefix.Length ..]) with - | Some(uc) -> error(NameClash(nm,kind,v.DisplayName,v.Range, FSComp.SR.chkUnionCaseDefaultAugmentation(),uc.DisplayName,uc.Range)) + | Some(uc) -> error(NameClash(nm, kind, v.DisplayName, v.Range, FSComp.SR.chkUnionCaseDefaultAugmentation(), uc.DisplayName, uc.Range)) | None -> () match tcref.GetFieldByName(nm) with - | Some(rf) -> error(NameClash(nm,kind,v.DisplayName,v.Range,"field",rf.Name,rf.Range)) + | Some(rf) -> error(NameClash(nm, kind, v.DisplayName, v.Range, "field", rf.Name, rf.Range)) | None -> () check false v.CoreDisplayName @@ -1850,7 +1855,7 @@ let CheckModuleBinding cenv env (TBind(v,e,_) as bind) = let minfo2 = FSMeth(g, generalizedTyconRef tcref, mkLocalValRef v2, Some 0UL) if tyconRefEq g v.MemberApparentEntity v2.MemberApparentEntity && MethInfosEquivByNameAndSig EraseAll true g cenv.amap v.Range minfo1 minfo2 then - errorR(Duplicate(kind,v.DisplayName,v.Range))) + errorR(Duplicate(kind, v.DisplayName, v.Range))) // Properties get 'get_X', only if there are no args // Properties get 'get_X' @@ -1875,7 +1880,7 @@ let CheckModuleBindings cenv env binds = // check tycons //-------------------------------------------------------------------------- -let CheckRecdField isUnion cenv env (tycon:Tycon) (rfield:RecdField) = +let CheckRecdField isUnion cenv env (tycon: Tycon) (rfield: RecdField) = let g = cenv.g let tcref = mkLocalTyconRef tycon let m = rfield.Range @@ -1900,7 +1905,7 @@ let CheckRecdField isUnion cenv env (tycon:Tycon) (rfield:RecdField) = CheckAttribs cenv env rfield.PropertyAttribs CheckAttribs cenv env rfield.FieldAttribs -let CheckEntityDefn cenv env (tycon:Entity) = +let CheckEntityDefn cenv env (tycon: Entity) = #if !NO_EXTENSIONTYPING if not tycon.IsProvidedGeneratedTycon then #endif @@ -1925,24 +1930,24 @@ let CheckEntityDefn cenv env (tycon:Entity) = let allVirtualMethsInParent = match GetSuperTypeOfType g cenv.amap m ty with | Some super -> - GetIntrinsicMethInfosOfType cenv.infoReader (None,AccessibleFromSomewhere,AllowMultiIntfInstantiations.Yes) IgnoreOverrides m super + GetIntrinsicMethInfosOfType cenv.infoReader (None, AccessibleFromSomewhere, AllowMultiIntfInstantiations.Yes) IgnoreOverrides m super |> List.filter (fun minfo -> minfo.IsVirtual) | None -> [] let namesOfMethodsThatMayDifferOnlyInReturnType = ["op_Explicit";"op_Implicit"] (* hardwired *) - let methodUniquenessIncludesReturnType (minfo:MethInfo) = List.contains minfo.LogicalName namesOfMethodsThatMayDifferOnlyInReturnType + let methodUniquenessIncludesReturnType (minfo: MethInfo) = List.contains minfo.LogicalName namesOfMethodsThatMayDifferOnlyInReturnType let MethInfosEquivWrtUniqueness eraseFlag m minfo minfo2 = if methodUniquenessIncludesReturnType minfo then MethInfosEquivByNameAndSig eraseFlag true g cenv.amap m minfo minfo2 else MethInfosEquivByNameAndPartialSig eraseFlag true g cenv.amap m minfo minfo2 (* partial ignores return type *) let immediateMeths = - [ for v in tycon.AllGeneratedValues do yield FSMeth (g,ty,v,None) - yield! GetImmediateIntrinsicMethInfosOfType (None,AccessibleFromSomewhere) g cenv.amap m ty ] + [ for v in tycon.AllGeneratedValues do yield FSMeth (g, ty, v, None) + yield! GetImmediateIntrinsicMethInfosOfType (None, AccessibleFromSomewhere) g cenv.amap m ty ] - let immediateProps = GetImmediateIntrinsicPropInfosOfType (None,AccessibleFromSomewhere) g cenv.amap m ty + let immediateProps = GetImmediateIntrinsicPropInfosOfType (None, AccessibleFromSomewhere) g cenv.amap m ty - let getHash (hash:Dictionary) nm = + let getHash (hash: Dictionary) nm = match hash.TryGetValue(nm) with | true, h -> h | _ -> [] @@ -1967,15 +1972,15 @@ let CheckEntityDefn cenv env (tycon:Entity) = yield m ] - let hashOfImmediateProps = new Dictionary() + let hashOfImmediateProps = new Dictionary() for minfo in immediateMeths do let nm = minfo.LogicalName let m = (match minfo.ArbitraryValRef with None -> m | Some vref -> vref.DefinitionRange) let others = getOtherMethods minfo // abstract/default pairs of duplicate methods are OK - let IsAbstractDefaultPair (x:MethInfo) (y:MethInfo) = + let IsAbstractDefaultPair (x: MethInfo) (y: MethInfo) = x.IsDispatchSlot && y.IsDefiniteFSharpOverride - let IsAbstractDefaultPair2 (minfo:MethInfo) (minfo2:MethInfo) = + let IsAbstractDefaultPair2 (minfo: MethInfo) (minfo2: MethInfo) = IsAbstractDefaultPair minfo minfo2 || IsAbstractDefaultPair minfo2 minfo let checkForDup erasureFlag (minfo2: MethInfo) = not (IsAbstractDefaultPair2 minfo minfo2) @@ -1984,14 +1989,14 @@ let CheckEntityDefn cenv env (tycon:Entity) = if others |> List.exists (checkForDup EraseAll) then if others |> List.exists (checkForDup EraseNone) then - errorR(Error(FSComp.SR.chkDuplicateMethod(nm, NicePrint.minimalStringOfType cenv.denv ty),m)) + errorR(Error(FSComp.SR.chkDuplicateMethod(nm, NicePrint.minimalStringOfType cenv.denv ty), m)) else - errorR(Error(FSComp.SR.chkDuplicateMethodWithSuffix(nm, NicePrint.minimalStringOfType cenv.denv ty),m)) + errorR(Error(FSComp.SR.chkDuplicateMethodWithSuffix(nm, NicePrint.minimalStringOfType cenv.denv ty), m)) let numCurriedArgSets = minfo.NumArgs.Length if numCurriedArgSets > 1 && others |> List.exists (fun minfo2 -> not (IsAbstractDefaultPair2 minfo minfo2)) then - errorR(Error(FSComp.SR.chkDuplicateMethodCurried(nm, NicePrint.minimalStringOfType cenv.denv ty),m)) + errorR(Error(FSComp.SR.chkDuplicateMethodCurried(nm, NicePrint.minimalStringOfType cenv.denv ty), m)) if numCurriedArgSets > 1 && (minfo.GetParamDatas(cenv.amap, m, minfo.FormalMethodInst) @@ -2005,25 +2010,25 @@ let CheckEntityDefn cenv env (tycon:Entity) = ignore isInArg match (optArgInfo, callerInfo) with | _, NoCallerInfo -> () - | NotOptional, _ -> errorR(Error(FSComp.SR.tcCallerInfoNotOptional(callerInfo.ToString()),m)) + | NotOptional, _ -> errorR(Error(FSComp.SR.tcCallerInfoNotOptional(callerInfo.ToString()), m)) | CallerSide(_), CallerLineNumber -> if not (typeEquiv g g.int32_ty ty) then - errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfo.ToString(), "int", NicePrint.minimalStringOfType cenv.denv ty),m)) + errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfo.ToString(), "int", NicePrint.minimalStringOfType cenv.denv ty), m)) | CalleeSide, CallerLineNumber -> if not ((isOptionTy g ty) && (typeEquiv g g.int32_ty (destOptionTy g ty))) then - errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfo.ToString(), "int", NicePrint.minimalStringOfType cenv.denv (destOptionTy g ty)),m)) + errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfo.ToString(), "int", NicePrint.minimalStringOfType cenv.denv (destOptionTy g ty)), m)) | CallerSide(_), CallerFilePath -> if not (typeEquiv g g.string_ty ty) then - errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfo.ToString(), "string", NicePrint.minimalStringOfType cenv.denv ty),m)) + errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfo.ToString(), "string", NicePrint.minimalStringOfType cenv.denv ty), m)) | CalleeSide, CallerFilePath -> if not ((isOptionTy g ty) && (typeEquiv g g.string_ty (destOptionTy g ty))) then - errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfo.ToString(), "string", NicePrint.minimalStringOfType cenv.denv (destOptionTy g ty)),m)) + errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfo.ToString(), "string", NicePrint.minimalStringOfType cenv.denv (destOptionTy g ty)), m)) | CallerSide(_), CallerMemberName -> if not (typeEquiv g g.string_ty ty) then - errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfo.ToString(), "string", NicePrint.minimalStringOfType cenv.denv ty),m)) + errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfo.ToString(), "string", NicePrint.minimalStringOfType cenv.denv ty), m)) | CalleeSide, CallerMemberName -> if not ((isOptionTy g ty) && (typeEquiv g g.string_ty (destOptionTy g ty))) then - errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfo.ToString(), "string", NicePrint.minimalStringOfType cenv.denv (destOptionTy g ty)),m))) + errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfo.ToString(), "string", NicePrint.minimalStringOfType cenv.denv (destOptionTy g ty)), m))) for pinfo in immediateProps do let nm = pinfo.PropertyName @@ -2033,16 +2038,16 @@ let CheckEntityDefn cenv env (tycon:Entity) = | Some vref -> vref.DefinitionRange if hashOfImmediateMeths.ContainsKey nm then - errorR(Error(FSComp.SR.chkPropertySameNameMethod(nm, NicePrint.minimalStringOfType cenv.denv ty),m)) + errorR(Error(FSComp.SR.chkPropertySameNameMethod(nm, NicePrint.minimalStringOfType cenv.denv ty), m)) let others = getHash hashOfImmediateProps nm if pinfo.HasGetter && pinfo.HasSetter && pinfo.GetterMethod.IsVirtual <> pinfo.SetterMethod.IsVirtual then - errorR(Error(FSComp.SR.chkGetterSetterDoNotMatchAbstract(nm, NicePrint.minimalStringOfType cenv.denv ty),m)) + errorR(Error(FSComp.SR.chkGetterSetterDoNotMatchAbstract(nm, NicePrint.minimalStringOfType cenv.denv ty), m)) let checkForDup erasureFlag pinfo2 = // abstract/default pairs of duplicate properties are OK - let IsAbstractDefaultPair (x:PropInfo) (y:PropInfo) = + let IsAbstractDefaultPair (x: PropInfo) (y: PropInfo) = x.IsDispatchSlot && y.IsDefiniteFSharpOverride not (IsAbstractDefaultPair pinfo pinfo2 || IsAbstractDefaultPair pinfo2 pinfo) @@ -2050,34 +2055,34 @@ let CheckEntityDefn cenv env (tycon:Entity) = if others |> List.exists (checkForDup EraseAll) then if others |> List.exists (checkForDup EraseNone) then - errorR(Error(FSComp.SR.chkDuplicateProperty(nm, NicePrint.minimalStringOfType cenv.denv ty) ,m)) + errorR(Error(FSComp.SR.chkDuplicateProperty(nm, NicePrint.minimalStringOfType cenv.denv ty), m)) else - errorR(Error(FSComp.SR.chkDuplicatePropertyWithSuffix(nm, NicePrint.minimalStringOfType cenv.denv ty) ,m)) + errorR(Error(FSComp.SR.chkDuplicatePropertyWithSuffix(nm, NicePrint.minimalStringOfType cenv.denv ty), m)) // Check to see if one is an indexer and one is not if ( (pinfo.HasGetter && pinfo.HasSetter && - let setterArgs = pinfo.DropGetter.GetParamTypes(cenv.amap,m) - let getterArgs = pinfo.DropSetter.GetParamTypes(cenv.amap,m) + let setterArgs = pinfo.DropGetter.GetParamTypes(cenv.amap, m) + let getterArgs = pinfo.DropSetter.GetParamTypes(cenv.amap, m) setterArgs.Length <> getterArgs.Length) || - (let nargs = pinfo.GetParamTypes(cenv.amap,m).Length - others |> List.exists (fun pinfo2 -> (isNil(pinfo2.GetParamTypes(cenv.amap,m))) <> (nargs = 0)))) then + (let nargs = pinfo.GetParamTypes(cenv.amap, m).Length + others |> List.exists (fun pinfo2 -> (isNil(pinfo2.GetParamTypes(cenv.amap, m))) <> (nargs = 0)))) then - errorR(Error(FSComp.SR.chkPropertySameNameIndexer(nm, NicePrint.minimalStringOfType cenv.denv ty),m)) + errorR(Error(FSComp.SR.chkPropertySameNameIndexer(nm, NicePrint.minimalStringOfType cenv.denv ty), m)) // Check to see if the signatures of the both getter and the setter imply the same property type if pinfo.HasGetter && pinfo.HasSetter && not pinfo.IsIndexer then - let ty1 = pinfo.DropSetter.GetPropertyType(cenv.amap,m) - let ty2 = pinfo.DropGetter.GetPropertyType(cenv.amap,m) + let ty1 = pinfo.DropSetter.GetPropertyType(cenv.amap, m) + let ty2 = pinfo.DropGetter.GetPropertyType(cenv.amap, m) if not (typeEquivAux EraseNone cenv.amap.g ty1 ty2) then - errorR(Error(FSComp.SR.chkGetterAndSetterHaveSamePropertyType(pinfo.PropertyName, NicePrint.minimalStringOfType cenv.denv ty1, NicePrint.minimalStringOfType cenv.denv ty2),m)) + errorR(Error(FSComp.SR.chkGetterAndSetterHaveSamePropertyType(pinfo.PropertyName, NicePrint.minimalStringOfType cenv.denv ty1, NicePrint.minimalStringOfType cenv.denv ty2), m)) hashOfImmediateProps.[nm] <- pinfo::others if not (isInterfaceTy g ty) then - let hashOfAllVirtualMethsInParent = new Dictionary() + let hashOfAllVirtualMethsInParent = new Dictionary() for minfo in allVirtualMethsInParent do let nm = minfo.LogicalName let others = getHash hashOfAllVirtualMethsInParent nm @@ -2087,15 +2092,15 @@ let CheckEntityDefn cenv env (tycon:Entity) = let nm = minfo.LogicalName let m = (match minfo.ArbitraryValRef with None -> m | Some vref -> vref.DefinitionRange) let parentMethsOfSameName = getHash hashOfAllVirtualMethsInParent nm - let checkForDup erasureFlag (minfo2:MethInfo) = minfo2.IsDispatchSlot && MethInfosEquivByNameAndSig erasureFlag true g cenv.amap m minfo minfo2 + let checkForDup erasureFlag (minfo2: MethInfo) = minfo2.IsDispatchSlot && MethInfosEquivByNameAndSig erasureFlag true g cenv.amap m minfo minfo2 match parentMethsOfSameName |> List.tryFind (checkForDup EraseAll) with | None -> () | Some minfo -> let mtext = NicePrint.stringOfMethInfo cenv.amap m cenv.denv minfo if parentMethsOfSameName |> List.exists (checkForDup EraseNone) then - warning(Error(FSComp.SR.tcNewMemberHidesAbstractMember(mtext),m)) + warning(Error(FSComp.SR.tcNewMemberHidesAbstractMember(mtext), m)) else - warning(Error(FSComp.SR.tcNewMemberHidesAbstractMemberWithSuffix(mtext),m)) + warning(Error(FSComp.SR.tcNewMemberHidesAbstractMemberWithSuffix(mtext), m)) if minfo.IsDispatchSlot then @@ -2106,9 +2111,9 @@ let CheckEntityDefn cenv env (tycon:Entity) = if parentMethsOfSameName |> List.exists (checkForDup EraseAll) then if parentMethsOfSameName |> List.exists (checkForDup EraseNone) then - errorR(Error(FSComp.SR.chkDuplicateMethodInheritedType(nm),m)) + errorR(Error(FSComp.SR.chkDuplicateMethodInheritedType(nm), m)) else - errorR(Error(FSComp.SR.chkDuplicateMethodInheritedTypeWithSuffix(nm),m)) + errorR(Error(FSComp.SR.chkDuplicateMethodInheritedTypeWithSuffix(nm), m)) if TyconRefHasAttribute g m g.attrib_IsByRefLikeAttribute tcref && not tycon.IsStructOrEnumTycon then errorR(Error(FSComp.SR.tcByRefLikeNotStruct(), tycon.Range)) @@ -2117,7 +2122,7 @@ let CheckEntityDefn cenv env (tycon:Entity) = errorR(Error(FSComp.SR.tcIsReadOnlyNotStruct(), tycon.Range)) // Considers TFSharpObjectRepr, TRecdRepr and TUnionRepr. - // [Review] are all cases covered: TILObjectRepr,TAsmRepr. [Yes - these are FSharp.Core.dll only] + // [Review] are all cases covered: TILObjectRepr, TAsmRepr. [Yes - these are FSharp.Core.dll only] tycon.AllFieldsArray |> Array.iter (CheckRecdField false cenv env tycon) // Abstract slots can have byref arguments and returns @@ -2161,7 +2166,7 @@ let CheckEntityDefn cenv env (tycon:Entity) = //ss.ClassTypars //ss.MethodTypars ss.FormalReturnType |> Option.iter visitType - ss.FormalParams |> List.iterSquared (fun (TSlotParam(_,ty,_,_,_,_)) -> visitType ty) + ss.FormalParams |> List.iterSquared (fun (TSlotParam(_, ty, _, _, _, _)) -> visitType ty) | _ -> () | _ -> () @@ -2174,7 +2179,7 @@ let CheckEntityDefn cenv env (tycon:Entity) = List.iter visitType interfaces // Check inherited interface is as accessible if not (isRecdOrStructTyconRefAssumedImmutable g tcref) && isRecdOrStructTyconRefReadOnly g m tcref then - errorR(Error(FSComp.SR.readOnlyAttributeOnStructWithMutableField(),m)) + errorR(Error(FSComp.SR.readOnlyAttributeOnStructWithMutableField(), m)) if cenv.reportErrors then if not tycon.IsTypeAbbrev then @@ -2212,8 +2217,8 @@ let CheckEntityDefns cenv env tycons = let rec CheckModuleExpr cenv env x = match x with | ModuleOrNamespaceExprWithSig(mty, def, _) -> - let (rpi,mhi) = ComputeRemappingFromImplementationToSignature cenv.g def mty - let env = { env with sigToImplRemapInfo = (mkRepackageRemapping rpi,mhi) :: env.sigToImplRemapInfo } + let (rpi, mhi) = ComputeRemappingFromImplementationToSignature cenv.g def mty + let env = { env with sigToImplRemapInfo = (mkRepackageRemapping rpi, mhi) :: env.sigToImplRemapInfo } CheckDefnInModule cenv env def and CheckDefnsInModule cenv env x = @@ -2225,16 +2230,16 @@ and CheckNothingAfterEntryPoint cenv m = and CheckDefnInModule cenv env x = match x with - | TMDefRec(isRec,tycons,mspecs,m) -> + | TMDefRec(isRec, tycons, mspecs, m) -> CheckNothingAfterEntryPoint cenv m if isRec then BindVals cenv env (allValsOfModDef x |> Seq.toList) CheckEntityDefns cenv env tycons List.iter (CheckModuleSpec cenv env) mspecs - | TMDefLet(bind,m) -> + | TMDefLet(bind, m) -> CheckNothingAfterEntryPoint cenv m CheckModuleBinding cenv env bind BindVal cenv env bind.Var - | TMDefDo(e,m) -> + | TMDefDo(e, m) -> CheckNothingAfterEntryPoint cenv m CheckNoReraise cenv None e CheckExprNoByrefs cenv env e @@ -2251,12 +2256,12 @@ and CheckModuleSpec cenv env x = let env = { env with reflect = env.reflect || HasFSharpAttribute cenv.g cenv.g.attrib_ReflectedDefinitionAttribute mspec.Attribs } CheckDefnInModule cenv env rhs -let CheckTopImpl (g,amap,reportErrors,infoReader,internalsVisibleToPaths,viewCcu,denv ,mexpr,extraAttribs,(isLastCompiland:bool*bool),isInternalTestSpanStackReferring) = +let CheckTopImpl (g, amap, reportErrors, infoReader, internalsVisibleToPaths, viewCcu, denv, mexpr, extraAttribs, (isLastCompiland: bool*bool), isInternalTestSpanStackReferring) = let cenv = { g =g reportErrors=reportErrors - boundVals= new Dictionary<_,_>(100, HashIdentity.Structural) - limitVals= new Dictionary<_,_>(100, HashIdentity.Structural) + boundVals= new Dictionary<_, _>(100, HashIdentity.Structural) + limitVals= new Dictionary<_, _>(100, HashIdentity.Structural) potentialUnboundUsesOfVals=Map.empty anonRecdTypes = StampMap.Empty usesQuotations=false diff --git a/src/fcs-fable/src/fsharp/PostInferenceChecks.fsi b/src/fcs-fable/src/fsharp/PostInferenceChecks.fsi index 54f4ba7db1..25c6bf3ac3 100644 --- a/src/fcs-fable/src/fsharp/PostInferenceChecks.fsi +++ b/src/fcs-fable/src/fsharp/PostInferenceChecks.fsi @@ -10,7 +10,5 @@ open FSharp.Compiler.Tast open FSharp.Compiler.Tastops open FSharp.Compiler.TcGlobals -val testFlagMemberBody : bool ref - /// Perform the checks on the TAST for a file after type inference is complete. val CheckTopImpl : TcGlobals * ImportMap * bool * InfoReader * CompilationPath list * CcuThunk * DisplayEnv * ModuleOrNamespaceExprWithSig * Attribs * (bool * bool) * isInternalTestSpanStackReferring: bool -> bool * StampMap diff --git a/src/fcs-fable/src/fsharp/PrettyNaming.fs b/src/fcs-fable/src/fsharp/PrettyNaming.fs index 0dda86bdeb..a1ea08317b 100755 --- a/src/fcs-fable/src/fsharp/PrettyNaming.fs +++ b/src/fcs-fable/src/fsharp/PrettyNaming.fs @@ -19,10 +19,6 @@ module public FSharp.Compiler.PrettyNaming open Internal.Utilities.StructuredFormat open Internal.Utilities.StructuredFormat.LayoutOps -#if FX_RESHAPED_REFLECTION - open Microsoft.FSharp.Core.ReflectionAdapters -#endif - //------------------------------------------------------------------------ // Operator name compilation //----------------------------------------------------------------------- @@ -63,8 +59,8 @@ module public FSharp.Compiler.PrettyNaming ("&&", "op_BooleanAnd") ("||", "op_BooleanOr") ("<=", "op_LessThanOrEqual") - ("=","op_Equality") - ("<>","op_Inequality") + ("=", "op_Equality") + ("<>", "op_Inequality") (">=", "op_GreaterThanOrEqual") ("<", "op_LessThan") (">", "op_GreaterThan") @@ -123,7 +119,7 @@ module public FSharp.Compiler.PrettyNaming /// The set of characters usable in custom operators. let private opCharSet = let t = new HashSet<_>() - for (c,_) in opCharTranslateTable do + for (c, _) in opCharTranslateTable do t.Add(c) |> ignore t @@ -143,7 +139,7 @@ module public FSharp.Compiler.PrettyNaming // there is single operator containing a space - range operator with step: `.. ..` name = ".. .." || name |> Seq.forall (fun c -> c <> ' ' && opCharSet.Contains c) - let IsMangledOpName (n:string) = + let IsMangledOpName (n: string) = n.StartsWithOrdinal(opNamePrefix) /// Compiles a custom operator into a mangled operator name. @@ -171,7 +167,7 @@ module public FSharp.Compiler.PrettyNaming fun opp -> // Has this operator already been compiled? - compiledOperators.GetOrAdd(opp, fun (op:string) -> + compiledOperators.GetOrAdd(opp, fun (op: string) -> let opLength = op.Length let sb = new Text.StringBuilder (opNamePrefix, opNamePrefix.Length + (opLength * maxOperatorNameLength)) for i = 0 to opLength - 1 do @@ -285,7 +281,7 @@ module public FSharp.Compiler.PrettyNaming let standardOps = let ops = Dictionary (opNameTable.Length, StringComparer.Ordinal) for x, y in opNameTable do - ops.Add(y,x) + ops.Add(y, x) ops fun opName -> @@ -463,13 +459,13 @@ module public FSharp.Compiler.PrettyNaming let [] private compilerGeneratedMarkerChar = '@' - let IsCompilerGeneratedName (nm:string) = + let IsCompilerGeneratedName (nm: string) = nm.IndexOf compilerGeneratedMarkerChar <> -1 let CompilerGeneratedName nm = if IsCompilerGeneratedName nm then nm else nm+compilerGeneratedMarker - let GetBasicNameOfPossibleCompilerGeneratedName (name:string) = + let GetBasicNameOfPossibleCompilerGeneratedName (name: string) = #if FABLE_COMPILER match name.IndexOf(compilerGeneratedMarker) with #else @@ -478,7 +474,7 @@ module public FSharp.Compiler.PrettyNaming | -1 | 0 -> name | n -> name.[0..n-1] - let CompilerGeneratedNameSuffix (basicName:string) suffix = + let CompilerGeneratedNameSuffix (basicName: string) suffix = basicName+compilerGeneratedMarker+suffix @@ -488,7 +484,7 @@ module public FSharp.Compiler.PrettyNaming let [] private mangledGenericTypeNameSym = '`' - let TryDemangleGenericNameAndPos (n:string) = + let TryDemangleGenericNameAndPos (n: string) = (* check what comes after the symbol is a number *) let pos = n.LastIndexOf mangledGenericTypeNameSym if pos = -1 then ValueNone else @@ -506,20 +502,20 @@ module public FSharp.Compiler.PrettyNaming type NameArityPair = NameArityPair of string * int - let DecodeGenericTypeName pos (mangledName:string) = - let res = mangledName.Substring(0,pos) - let num = mangledName.Substring(pos+1,mangledName.Length - pos - 1) + let DecodeGenericTypeName pos (mangledName: string) = + let res = mangledName.Substring(0, pos) + let num = mangledName.Substring(pos+1, mangledName.Length - pos - 1) NameArityPair(res, int32 num) - let DemangleGenericTypeNameWithPos pos (mangledName:string) = - mangledName.Substring(0,pos) + let DemangleGenericTypeNameWithPos pos (mangledName: string) = + mangledName.Substring(0, pos) - let DemangleGenericTypeName (mangledName:string) = + let DemangleGenericTypeName (mangledName: string) = match TryDemangleGenericNameAndPos mangledName with | ValueSome pos -> DemangleGenericTypeNameWithPos pos mangledName | _ -> mangledName - let private chopStringTo (s:string) (c:char) = + let private chopStringTo (s: string) (c: char) = match s.IndexOf c with | -1 -> s | idx -> @@ -555,7 +551,7 @@ module public FSharp.Compiler.PrettyNaming /// Return a string array delimited by the given separator. /// Note that a quoted string is not going to be mangled into pieces. let inline private isNotQuotedQuotation (text: string) n = n > 0 && text.[n-1] <> '\\' - let private splitAroundQuotation (text:string) (separator:char) = + let private splitAroundQuotation (text: string) (separator: char) = let length = text.Length let result = ResizeArray() let mutable insideQuotation = false @@ -582,7 +578,7 @@ module public FSharp.Compiler.PrettyNaming /// Return a string array delimited by the given separator up to the maximum number. /// Note that a quoted string is not going to be mangled into pieces. - let private splitAroundQuotationWithCount (text:string) (separator:char) (count:int)= + let private splitAroundQuotationWithCount (text: string) (separator: char) (count: int)= if count <= 1 then [| text |] else let mangledText = splitAroundQuotation text separator match mangledText.Length > count with @@ -596,7 +592,7 @@ module public FSharp.Compiler.PrettyNaming let IllegalCharactersInTypeAndNamespaceNames = [| '.'; '+'; '$'; '&'; '['; ']'; '/'; '\\'; '*'; '\"'; '`' |] /// Determines if the specified name is a valid name for an active pattern. - let IsActivePatternName (nm:string) = + let IsActivePatternName (nm: string) = let nameLen = nm.Length // The name must start and end with '|' (nm.IndexOf '|' = 0) && @@ -620,19 +616,19 @@ module public FSharp.Compiler.PrettyNaming type ActivePatternInfo = | APInfo of bool * (string * Range.range) list * Range.range - member x.IsTotal = let (APInfo(p,_,_)) = x in p + member x.IsTotal = let (APInfo(p, _, _)) = x in p - member x.ActiveTags = let (APInfo(_,tags,_)) = x in List.map fst tags + member x.ActiveTags = let (APInfo(_, tags, _)) = x in List.map fst tags - member x.ActiveTagsWithRanges = let (APInfo(_,tags,_)) = x in tags + member x.ActiveTagsWithRanges = let (APInfo(_, tags, _)) = x in tags - member x.Range = let (APInfo(_,_,m)) = x in m + member x.Range = let (APInfo(_, _, m)) = x in m - let ActivePatternInfoOfValName nm (m:Range.range) = + let ActivePatternInfoOfValName nm (m: Range.range) = // Note: The approximate range calculations in this code assume the name is of the form "(|A|B|)" not "(| A | B |)" // The ranges are used for IDE refactoring support etc. If names of the second type are used, // renaming may be inaccurate/buggy. However names of the first form are dominant in F# code. - let rec loop (nm:string) (mp:Range.range) = + let rec loop (nm: string) (mp: Range.range) = let n = nm.IndexOf '|' if n > 0 then let m1 = Range.mkRange mp.FileName mp.Start (Range.mkPos mp.StartLine (mp.StartColumn + n)) @@ -646,31 +642,31 @@ module public FSharp.Compiler.PrettyNaming // Skip the '|' at each end when recovering ranges let m0 = Range.mkRange m.FileName (Range.mkPos m.StartLine (m.StartColumn + 1)) (Range.mkPos m.EndLine (m.EndColumn - 1)) let names = loop nm.[1..nm.Length-2] m0 - let resH,resT = List.frontAndBack names - Some(if fst resT = "_" then APInfo(false,resH,m) else APInfo(true,names,m)) + let resH, resT = List.frontAndBack names + Some(if fst resT = "_" then APInfo(false, resH, m) else APInfo(true, names, m)) else None - let private mangleStaticStringArg (nm:string,v:string) = + let private mangleStaticStringArg (nm: string, v: string) = nm + "=" + "\"" + v.Replace("\\", "\\\\").Replace("\"", "\\\"") + "\"" - let private tryDemangleStaticStringArg (mangledText:string) = + let private tryDemangleStaticStringArg (mangledText: string) = match splitAroundQuotationWithCount mangledText '=' 2 with | [| nm; v |] -> if v.Length >= 2 then - Some(nm,v.[1..v.Length-2].Replace("\\\\","\\").Replace("\\\"","\"")) + Some(nm, v.[1..v.Length-2].Replace("\\\\", "\\").Replace("\\\"", "\"")) else - Some(nm,v) + Some(nm, v) | _ -> None exception InvalidMangledStaticArg of string /// Demangle the static parameters - let demangleProvidedTypeName (typeLogicalName:string) = + let demangleProvidedTypeName (typeLogicalName: string) = if typeLogicalName.Contains "," then let pieces = splitAroundQuotation typeLogicalName ',' match pieces with - | [| x; "" |] -> x, [| |] + | [| x; "" |] -> x, [| |] | _ -> let argNamesAndValues = pieces.[1..] |> Array.choose tryDemangleStaticStringArg if argNamesAndValues.Length = (pieces.Length - 1) then @@ -696,7 +692,7 @@ module public FSharp.Compiler.PrettyNaming /// Mangle the static parameters for a provided type or method let computeMangledNameWithoutDefaultArgValues(nm, staticArgs, defaultArgValues) = let nonDefaultArgs = - (staticArgs,defaultArgValues) + (staticArgs, defaultArgValues) ||> Array.zip |> Array.choose (fun (staticArg, (defaultArgName, defaultArgValue)) -> let actualArgValue = string staticArg diff --git a/src/fcs-fable/src/fsharp/QuotationPickler.fs b/src/fcs-fable/src/fsharp/QuotationPickler.fs index 7cd8cb9918..df71827809 100755 --- a/src/fcs-fable/src/fsharp/QuotationPickler.fs +++ b/src/fcs-fable/src/fsharp/QuotationPickler.fs @@ -2,14 +2,13 @@ module internal FSharp.Compiler.QuotationPickler - open System.Text open Internal.Utilities.Collections open FSharp.Compiler.AbstractIL.Internal open FSharp.Compiler open FSharp.Compiler.Lib -let mkRLinear mk (vs,body) = List.foldBack (fun v acc -> mk (v,acc)) vs body +let mkRLinear mk (vs, body) = List.foldBack (fun v acc -> mk (v, acc)) vs body type TypeVarData = { tvName: string; } @@ -27,24 +26,24 @@ type TypeData = | AppType of TypeCombOp * TypeData list let mkVarTy v = VarType v -let mkFunTy (x1,x2) = AppType(FunTyOp, [x1; x2]) -let mkArrayTy (n,x) = AppType(ArrayTyOp n, [x]) -let mkILNamedTy (r,l) = AppType(NamedTyOp r,l) +let mkFunTy (x1, x2) = AppType(FunTyOp, [x1; x2]) +let mkArrayTy (n, x) = AppType(ArrayTyOp n, [x]) +let mkILNamedTy (r, l) = AppType(NamedTyOp r, l) type CtorData = - { ctorParent: NamedTypeData; + { ctorParent: NamedTypeData ctorArgTypes: TypeData list; } type MethodData = - { methParent: NamedTypeData; - methName: string; - methArgTypes: TypeData list; - methRetType: TypeData; + { methParent: NamedTypeData + methName: string + methArgTypes: TypeData list + methRetType: TypeData numGenericArgs: int } type VarData = - { vText: string; - vType: TypeData; + { vText: string + vType: TypeData vMutable: bool } type FieldData = NamedTypeData * string @@ -114,69 +113,119 @@ type ExprData = | QuoteRawExpr of ExprData let mkVar v = VarExpr v -let mkHole (v,idx) = HoleExpr (v ,idx) -let mkApp (a,b) = CombExpr(AppOp, [], [a; b]) -let mkLambda (a,b) = LambdaExpr (a,b) + +let mkHole (v, idx) = HoleExpr (v, idx) + +let mkApp (a, b) = CombExpr(AppOp, [], [a; b]) + +let mkLambda (a, b) = LambdaExpr (a, b) + let mkQuote (a) = QuoteExpr (a) + let mkQuoteRaw40 (a) = QuoteRawExpr (a) -let mkCond (x1,x2,x3) = CombExpr(CondOp,[], [x1;x2;x3]) -let mkModuleValueApp (tcref,nm,isProp,tyargs,args: ExprData list list) = CombExpr(ModuleValueOp(tcref,nm,isProp),tyargs,List.concat args) -let mkTuple (ty,x) = CombExpr(TupleMkOp,[ty],x) -let mkLet ((v,e),b) = CombExpr(LetOp,[],[e;mkLambda (v,b)]) (* nb. order preserves source order *) +let mkCond (x1, x2, x3) = CombExpr(CondOp, [], [x1;x2;x3]) + +let mkModuleValueApp (tcref, nm, isProp, tyargs, args: ExprData list list) = CombExpr(ModuleValueOp(tcref, nm, isProp), tyargs, List.concat args) + +let mkTuple (ty, x) = CombExpr(TupleMkOp, [ty], x) + +let mkLet ((v, e), b) = CombExpr(LetOp, [], [e;mkLambda (v, b)]) (* nb. order preserves source order *) + let mkUnit () = CombExpr(UnitOp, [], []) + let mkNull ty = CombExpr(NullOp, [ty], []) -let mkLetRecRaw e1 = CombExpr(LetRecOp,[],[e1]) -let mkLetRecCombRaw args = CombExpr(LetRecCombOp,[], args) -let mkLetRec (ves,body) = - let vs,es = List.unzip ves +let mkLetRecRaw e1 = CombExpr(LetRecOp, [], [e1]) + +let mkLetRecCombRaw args = CombExpr(LetRecCombOp, [], args) + +let mkLetRec (ves, body) = + let vs, es = List.unzip ves mkLetRecRaw(mkRLinear mkLambda (vs, mkLetRecCombRaw (body::es))) -let mkRecdMk (n,tys,args) = CombExpr(RecdMkOp n,tys,args) -let mkRecdGet ((d1,d2),tyargs,args) = CombExpr(RecdGetOp(d1,d2),tyargs,args) -let mkRecdSet ((d1,d2),tyargs,args) = CombExpr(RecdSetOp(d1,d2),tyargs,args) -let mkUnion ((d1,d2),tyargs,args) = CombExpr(SumMkOp(d1,d2),tyargs,args) -let mkUnionFieldGet ((d1,d2,d3),tyargs,arg) = CombExpr(SumFieldGetOp(d1,d2,d3),tyargs,[arg]) -let mkUnionCaseTagTest ((d1,d2),tyargs,arg) = CombExpr(SumTagTestOp(d1,d2),tyargs,[arg]) -let mkTupleGet (ty,n,e) = CombExpr(TupleGetOp n,[ty],[e]) - -let mkCoerce (ty,arg) = CombExpr(CoerceOp,[ty],[arg]) -let mkTypeTest (ty,arg) = CombExpr(TypeTestOp,[ty],[arg]) -let mkAddressOf (arg) = CombExpr(AddressOfOp,[],[arg]) -let mkAddressSet (arg1,arg2) = CombExpr(AddressSetOp,[],[arg1;arg2]) -let mkVarSet (arg1,arg2) = CombExpr(ExprSetOp,[],[arg1;arg2]) -let mkDefaultValue (ty) = CombExpr(DefaultValueOp,[ty],[]) +let mkRecdMk (n, tys, args) = CombExpr(RecdMkOp n, tys, args) + +let mkRecdGet ((d1, d2), tyargs, args) = CombExpr(RecdGetOp(d1, d2), tyargs, args) + +let mkRecdSet ((d1, d2), tyargs, args) = CombExpr(RecdSetOp(d1, d2), tyargs, args) + +let mkUnion ((d1, d2), tyargs, args) = CombExpr(SumMkOp(d1, d2), tyargs, args) + +let mkUnionFieldGet ((d1, d2, d3), tyargs, arg) = CombExpr(SumFieldGetOp(d1, d2, d3), tyargs, [arg]) + +let mkUnionCaseTagTest ((d1, d2), tyargs, arg) = CombExpr(SumTagTestOp(d1, d2), tyargs, [arg]) + +let mkTupleGet (ty, n, e) = CombExpr(TupleGetOp n, [ty], [e]) + +let mkCoerce (ty, arg) = CombExpr(CoerceOp, [ty], [arg]) + +let mkTypeTest (ty, arg) = CombExpr(TypeTestOp, [ty], [arg]) + +let mkAddressOf (arg) = CombExpr(AddressOfOp, [], [arg]) + +let mkAddressSet (arg1, arg2) = CombExpr(AddressSetOp, [], [arg1;arg2]) + +let mkVarSet (arg1, arg2) = CombExpr(ExprSetOp, [], [arg1;arg2]) + +let mkDefaultValue (ty) = CombExpr(DefaultValueOp, [ty], []) + let mkThisVar (ty) = ThisVarExpr(ty) -let mkNewArray (ty,args) = CombExpr(NewArrayOp,[ty],args) - -let mkBool (v, ty) = CombExpr(BoolOp v,[ty],[]) -let mkString (v, ty) = CombExpr(StringOp v,[ty],[]) -let mkSingle (v, ty) = CombExpr(SingleOp v,[ty],[]) -let mkDouble (v, ty) = CombExpr(DoubleOp v,[ty],[]) -let mkChar (v, ty) = CombExpr(CharOp v,[ty],[]) -let mkSByte (v, ty) = CombExpr(SByteOp v,[ty],[]) -let mkByte (v, ty) = CombExpr(ByteOp v,[ty],[]) -let mkInt16 (v, ty) = CombExpr(Int16Op v,[ty],[]) -let mkUInt16 (v, ty) = CombExpr(UInt16Op v,[ty],[]) -let mkInt32 (v, ty) = CombExpr(Int32Op v,[ty],[]) -let mkUInt32 (v, ty) = CombExpr(UInt32Op v,[ty],[]) -let mkInt64 (v, ty) = CombExpr(Int64Op v,[ty],[]) -let mkUInt64 (v, ty) = CombExpr(UInt64Op v,[ty],[]) - -let mkSequential (e1,e2) = CombExpr(SeqOp,[],[e1;e2]) -let mkForLoop (x1,x2,x3) = CombExpr(ForLoopOp,[], [x1;x2;x3]) -let mkWhileLoop (e1,e2) = CombExpr(WhileLoopOp,[],[e1;e2]) -let mkTryFinally(e1,e2) = CombExpr(TryFinallyOp,[],[e1;e2]) -let mkTryWith(e1,vf,ef,vh,eh) = CombExpr(TryWithOp,[],[e1;mkLambda(vf,ef);mkLambda(vh,eh)]) -let mkDelegate (ty,e) = CombExpr(DelegateOp,[ty],[e]) -let mkPropGet (d,tyargs,args) = CombExpr(PropGetOp(d),tyargs,args) -let mkPropSet (d,tyargs,args) = CombExpr(PropSetOp(d),tyargs,args) -let mkFieldGet ((d1,d2),tyargs,args) = CombExpr(FieldGetOp(d1,d2),tyargs,args) -let mkFieldSet ((d1,d2),tyargs,args) = CombExpr(FieldSetOp(d1,d2),tyargs,args) -let mkCtorCall (d,tyargs,args) = CombExpr(CtorCallOp(d),tyargs,args) -let mkMethodCall (d,tyargs,args) = CombExpr(MethodCallOp(d),tyargs,args) -let mkAttributedExpression(e,attr) = AttrExpr(e,[attr]) + +let mkNewArray (ty, args) = CombExpr(NewArrayOp, [ty], args) + +let mkBool (v, ty) = CombExpr(BoolOp v, [ty], []) + +let mkString (v, ty) = CombExpr(StringOp v, [ty], []) + +let mkSingle (v, ty) = CombExpr(SingleOp v, [ty], []) + +let mkDouble (v, ty) = CombExpr(DoubleOp v, [ty], []) + +let mkChar (v, ty) = CombExpr(CharOp v, [ty], []) + +let mkSByte (v, ty) = CombExpr(SByteOp v, [ty], []) + +let mkByte (v, ty) = CombExpr(ByteOp v, [ty], []) + +let mkInt16 (v, ty) = CombExpr(Int16Op v, [ty], []) + +let mkUInt16 (v, ty) = CombExpr(UInt16Op v, [ty], []) + +let mkInt32 (v, ty) = CombExpr(Int32Op v, [ty], []) + +let mkUInt32 (v, ty) = CombExpr(UInt32Op v, [ty], []) + +let mkInt64 (v, ty) = CombExpr(Int64Op v, [ty], []) + +let mkUInt64 (v, ty) = CombExpr(UInt64Op v, [ty], []) + +let mkSequential (e1, e2) = CombExpr(SeqOp, [], [e1;e2]) + +let mkForLoop (x1, x2, x3) = CombExpr(ForLoopOp, [], [x1;x2;x3]) + +let mkWhileLoop (e1, e2) = CombExpr(WhileLoopOp, [], [e1;e2]) + +let mkTryFinally(e1, e2) = CombExpr(TryFinallyOp, [], [e1;e2]) + +let mkTryWith(e1, vf, ef, vh, eh) = CombExpr(TryWithOp, [], [e1;mkLambda(vf, ef);mkLambda(vh, eh)]) + +let mkDelegate (ty, e) = CombExpr(DelegateOp, [ty], [e]) + +let mkPropGet (d, tyargs, args) = CombExpr(PropGetOp(d), tyargs, args) + +let mkPropSet (d, tyargs, args) = CombExpr(PropSetOp(d), tyargs, args) + +let mkFieldGet ((d1, d2), tyargs, args) = CombExpr(FieldGetOp(d1, d2), tyargs, args) + +let mkFieldSet ((d1, d2), tyargs, args) = CombExpr(FieldSetOp(d1, d2), tyargs, args) + +let mkCtorCall (d, tyargs, args) = CombExpr(CtorCallOp(d), tyargs, args) + +let mkMethodCall (d, tyargs, args) = CombExpr(MethodCallOp(d), tyargs, args) + +let mkAttributedExpression(e, attr) = AttrExpr(e, [attr]) + let isAttributedExpression e = match e with AttrExpr(_, _) -> true | _ -> false //--------------------------------------------------------------------------- @@ -191,23 +240,24 @@ let freshVar (n, ty, mut) = { vText=n; vType=ty; vMutable=mut } module SimplePickle = type Table<'T> = - { tbl: HashMultiMap<'T,int>; // This should be "Dictionary" - mutable rows: 'T list; + { tbl: HashMultiMap<'T, int> // This should be "Dictionary" + mutable rows: 'T list mutable count: int } static member Create () = { tbl = HashMultiMap(20, HashIdentity.Structural) - rows=[]; + rows=[] count=0; } member tbl.AsList = List.rev tbl.rows + member tbl.Count = tbl.rows.Length member tbl.Add x = let n = tbl.count - tbl.count <- tbl.count + 1; - tbl.tbl.Add(x,n) - tbl.rows <- x :: tbl.rows; + tbl.count <- tbl.count + 1 + tbl.tbl.Add(x, n) + tbl.rows <- x :: tbl.rows n member tbl.FindOrAdd x = @@ -219,17 +269,21 @@ module SimplePickle = member tbl.ContainsKey x = tbl.tbl.ContainsKey x type QuotationPickleOutState = - { os: ByteBuffer; + { os: ByteBuffer ostrings: Table } let p_byte b st = st.os.EmitIntAsByte b + let p_bool b st = p_byte (if b then 1 else 0) st + let p_void (_os: QuotationPickleOutState) = () + let p_unit () (_os: QuotationPickleOutState) = () + let prim_pint32 i st = - p_byte (Bits.b0 i) st; - p_byte (Bits.b1 i) st; - p_byte (Bits.b2 i) st; + p_byte (Bits.b0 i) st + p_byte (Bits.b1 i) st + p_byte (Bits.b2 i) st p_byte (Bits.b3 i) st // compress integers according to the same scheme used by CLR metadata @@ -238,78 +292,92 @@ module SimplePickle = if n >= 0 && n <= 0x7F then p_byte (Bits.b0 n) st else if n >= 0x80 && n <= 0x3FFF then - p_byte (0x80 ||| (n >>> 8)) st; + p_byte (0x80 ||| (n >>> 8)) st p_byte (n &&& 0xFF) st else - p_byte 0xFF st; + p_byte 0xFF st prim_pint32 n st let p_bytes (s:byte[]) st = let len = s.Length - p_int32 (len) st; + p_int32 (len) st st.os.EmitBytes s let prim_pstring (s:string) st = let bytes = Encoding.UTF8.GetBytes s let len = bytes.Length - p_int32 (len) st; + p_int32 (len) st st.os.EmitBytes bytes let p_int (c:int) st = p_int32 c st + let p_int8 (i:int8) st = p_int32 (int32 i) st + let p_uint8 (i:uint8) st = p_byte (int i) st + let p_int16 (i:int16) st = p_int32 (int32 i) st + let p_uint16 (x:uint16) st = p_int32 (int32 x) st + let puint32 (x:uint32) st = p_int32 (int32 x) st + let p_int64 i st = - p_int32 (int32 (i &&& 0xFFFFFFFFL)) st; + p_int32 (int32 (i &&& 0xFFFFFFFFL)) st p_int32 (int32 (i >>> 32)) st - let bits_of_float32 (x:float32) = System.BitConverter.ToInt32(System.BitConverter.GetBytes(x),0) - let bits_of_float (x:float) = System.BitConverter.ToInt64(System.BitConverter.GetBytes(x),0) + let bits_of_float32 (x:float32) = System.BitConverter.ToInt32(System.BitConverter.GetBytes(x), 0) + + let bits_of_float (x:float) = System.BitConverter.ToInt64(System.BitConverter.GetBytes(x), 0) let p_uint64 x st = p_int64 (int64 x) st + let p_double i st = p_int64 (bits_of_float i) st + let p_single i st = p_int32 (bits_of_float32 i) st + let p_char i st = p_uint16 (uint16 (int32 i)) st - let inline p_tup2 p1 p2 (a,b) (st:QuotationPickleOutState) = (p1 a st : unit); (p2 b st : unit) - let inline p_tup3 p1 p2 p3 (a,b,c) st = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit) - let inline p_tup4 p1 p2 p3 p4 (a,b,c,d) st = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit) - let inline p_tup5 p1 p2 p3 p4 p5 (a,b,c,d,e) st = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit); (p5 e st : unit) + + let inline p_tup2 p1 p2 (a, b) (st:QuotationPickleOutState) = (p1 a st : unit); (p2 b st : unit) + + let inline p_tup3 p1 p2 p3 (a, b, c) st = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit) + + let inline p_tup4 p1 p2 p3 p4 (a, b, c, d) st = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit) + + let inline p_tup5 p1 p2 p3 p4 p5 (a, b, c, d, e) st = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit); (p5 e st : unit) + let puniq (tbl: Table<_>) key st = p_int (tbl.FindOrAdd key) st + let p_string s st = puniq st.ostrings s st + let rec p_list f x st = match x with | [] -> p_byte 0 st | h :: t -> p_byte 1 st; f h st; p_list f t st - let pickle_obj p x = - let stringTab,phase1bytes = + let stringTab, phase1bytes = let st1 = - { os = ByteBuffer.Create 100000; - ostrings=Table<_>.Create(); } - p x st1; + { os = ByteBuffer.Create 100000 + ostrings=Table<_>.Create() } + p x st1 st1.ostrings.AsList, st1.os.Close() - let phase2data = (stringTab,phase1bytes) + let phase2data = (stringTab, phase1bytes) let phase2bytes = let st2 = - { os = ByteBuffer.Create 100000; - ostrings=Table<_>.Create();} - p_tup2 (p_list prim_pstring) p_bytes phase2data st2; + { os = ByteBuffer.Create 100000 + ostrings=Table<_>.Create() } + p_tup2 (p_list prim_pstring) p_bytes phase2data st2 st2.os.Close() phase2bytes - open SimplePickle - let p_assemblyref x st = p_string x st let p_NamedType x st = match x with | Idx n -> p_tup2 p_string p_assemblyref (string n, "") st - | Named (nm,a) -> p_tup2 p_string p_assemblyref (nm, a) st + | Named (nm, a) -> p_tup2 p_string p_assemblyref (nm, a) st let p_tycon x st = match x with @@ -320,7 +388,7 @@ let p_tycon x st = let rec p_type x st = match x with | VarType v -> p_byte 0 st; p_int v st - | AppType(c,ts) -> p_byte 1 st; p_tup2 p_tycon p_types (c,ts) st + | AppType(c, ts) -> p_byte 1 st; p_tup2 p_tycon p_types (c, ts) st and p_types x st = p_list p_type x st @@ -331,10 +399,10 @@ let p_recdFieldSpec v st = p_tup2 p_NamedType p_string v st let p_ucaseSpec v st = p_tup2 p_NamedType p_string v st let p_MethodData a st = - p_tup5 p_NamedType p_types p_type p_string p_int (a.methParent,a.methArgTypes,a.methRetType, a.methName, a.numGenericArgs) st + p_tup5 p_NamedType p_types p_type p_string p_int (a.methParent, a.methArgTypes, a.methRetType, a.methName, a.numGenericArgs) st let p_CtorData a st = - p_tup2 p_NamedType p_types (a.ctorParent,a.ctorArgTypes) st + p_tup2 p_NamedType p_types (a.ctorParent, a.ctorArgTypes) st let p_PropInfoData a st = p_tup4 p_NamedType p_string p_type p_types a st @@ -342,13 +410,13 @@ let p_PropInfoData a st = let p_CombOp x st = match x with | CondOp -> p_byte 0 st - | ModuleValueOp (x,y,z) -> p_byte 1 st; p_tup3 p_NamedType p_string p_bool (x,y,z) st + | ModuleValueOp (x, y, z) -> p_byte 1 st; p_tup3 p_NamedType p_string p_bool (x, y, z) st | LetRecOp -> p_byte 2 st | RecdMkOp a -> p_byte 3 st; p_NamedType a st - | RecdGetOp (x,y) -> p_byte 4 st; p_recdFieldSpec (x,y) st - | SumMkOp (x,y) -> p_byte 5 st; p_ucaseSpec (x,y) st - | SumFieldGetOp (a,b,c) -> p_byte 6 st; p_tup2 p_ucaseSpec p_int ((a,b),c) st - | SumTagTestOp (x,y) -> p_byte 7 st; p_ucaseSpec (x,y) st + | RecdGetOp (x, y) -> p_byte 4 st; p_recdFieldSpec (x, y) st + | SumMkOp (x, y) -> p_byte 5 st; p_ucaseSpec (x, y) st + | SumFieldGetOp (a, b, c) -> p_byte 6 st; p_tup2 p_ucaseSpec p_int ((a, b), c) st + | SumTagTestOp (x, y) -> p_byte 7 st; p_ucaseSpec (x, y) st | TupleMkOp -> p_byte 8 st | TupleGetOp a -> p_byte 9 st; p_int a st | BoolOp a -> p_byte 11 st; p_bool a st @@ -375,14 +443,14 @@ let p_CombOp x st = | DelegateOp -> p_byte 33 st | WhileLoopOp -> p_byte 34 st | LetOp -> p_byte 35 st - | RecdSetOp (x,y) -> p_byte 36 st; p_recdFieldSpec (x,y) st - | FieldGetOp (a,b) -> p_byte 37 st; p_tup2 p_NamedType p_string (a, b) st + | RecdSetOp (x, y) -> p_byte 36 st; p_recdFieldSpec (x, y) st + | FieldGetOp (a, b) -> p_byte 37 st; p_tup2 p_NamedType p_string (a, b) st | LetRecCombOp -> p_byte 38 st | AppOp -> p_byte 39 st | NullOp -> p_byte 40 st | DefaultValueOp -> p_byte 41 st | PropSetOp d -> p_byte 42 st; p_PropInfoData d st - | FieldSetOp (a,b) -> p_byte 43 st; p_tup2 p_NamedType p_string (a, b) st + | FieldSetOp (a, b) -> p_byte 43 st; p_tup2 p_NamedType p_string (a, b) st | AddressOfOp -> p_byte 44 st | AddressSetOp -> p_byte 45 st | TypeTestOp -> p_byte 46 st @@ -392,18 +460,18 @@ let p_CombOp x st = let rec p_expr x st = match x with - | CombExpr(c,ts,args) -> p_byte 0 st; p_tup3 p_CombOp p_types (p_list p_expr) (c,ts,args) st + | CombExpr(c, ts, args) -> p_byte 0 st; p_tup3 p_CombOp p_types (p_list p_expr) (c, ts, args) st | VarExpr v -> p_byte 1 st; p_int v st - | LambdaExpr(v,e) -> p_byte 2 st; p_tup2 p_varDecl p_expr (v,e) st - | HoleExpr(ty,idx) -> p_byte 3 st; p_type ty st; p_int idx st + | LambdaExpr(v, e) -> p_byte 2 st; p_tup2 p_varDecl p_expr (v, e) st + | HoleExpr(ty, idx) -> p_byte 3 st; p_type ty st; p_int idx st | QuoteExpr(tm) -> p_byte 4 st; p_expr tm st - | AttrExpr(e,attrs) -> p_byte 5 st; p_tup2 p_expr (p_list p_expr) (e,attrs) st + | AttrExpr(e, attrs) -> p_byte 5 st; p_tup2 p_expr (p_list p_expr) (e, attrs) st | ThisVarExpr(ty) -> p_byte 6 st; p_type ty st | QuoteRawExpr(tm) -> p_byte 7 st; p_expr tm st type ModuleDefnData = - { Module: NamedTypeData; - Name: string; + { Module: NamedTypeData + Name: string IsProperty: bool } type MethodBaseData = @@ -416,15 +484,15 @@ let pickle = pickle_obj p_expr let p_MethodBase x st = match x with | ModuleDefn md -> - p_byte 0 st; - p_NamedType md.Module st; - p_string md.Name st; + p_byte 0 st + p_NamedType md.Module st + p_string md.Name st p_bool md.IsProperty st | Method md -> - p_byte 1 st; + p_byte 1 st p_MethodData md st | Ctor md -> - p_byte 2 st; + p_byte 2 st p_CtorData md st let PickleDefns = pickle_obj (p_list (p_tup2 p_MethodBase p_expr)) diff --git a/src/fcs-fable/src/fsharp/QuotationTranslator.fs b/src/fcs-fable/src/fsharp/QuotationTranslator.fs index fa94c81c51..5cdafc871f 100755 --- a/src/fcs-fable/src/fsharp/QuotationTranslator.fs +++ b/src/fcs-fable/src/fsharp/QuotationTranslator.fs @@ -3,8 +3,8 @@ module internal FSharp.Compiler.QuotationTranslator open Internal.Utilities -open FSharp.Compiler -open FSharp.Compiler.AbstractIL.IL +open FSharp.Compiler +open FSharp.Compiler.AbstractIL.IL open FSharp.Compiler.AbstractIL.Internal.Library open FSharp.Compiler.AbstractIL.Diagnostics open FSharp.Compiler.Tast @@ -36,106 +36,113 @@ type QuotationSerializationFormat = | FSharp_40_Plus | FSharp_20_Plus -type QuotationGenerationScope = - { g: TcGlobals +type QuotationGenerationScope = + { g: TcGlobals amap: Import.ImportMap - scope: CcuThunk + scope: CcuThunk // Accumulate the references to type definitions referencedTypeDefs: ResizeArray referencedTypeDefsTable: Dictionary // Accumulate the type splices (i.e. captured type parameters) into here typeSplices: ResizeArray // Accumulate the expression splices into here - exprSplices: ResizeArray + exprSplices: ResizeArray isReflectedDefinition : IsReflectedDefinition quotationFormat : QuotationSerializationFormat mutable emitDebugInfoInQuotations : bool } - static member Create (g: TcGlobals, amap, scope, isReflectedDefinition) = + static member Create (g: TcGlobals, amap, scope, isReflectedDefinition) = { g = g scope = scope amap = amap - referencedTypeDefs = new ResizeArray<_>() - referencedTypeDefsTable = new Dictionary<_,_>() - typeSplices = new ResizeArray<_>() - exprSplices = new ResizeArray<_>() - isReflectedDefinition = isReflectedDefinition + referencedTypeDefs = new ResizeArray<_>() + referencedTypeDefsTable = new Dictionary<_, _>() + typeSplices = new ResizeArray<_>() + exprSplices = new ResizeArray<_>() + isReflectedDefinition = isReflectedDefinition quotationFormat = QuotationGenerationScope.ComputeQuotationFormat g - emitDebugInfoInQuotations = g.emitDebugInfoInQuotations } + emitDebugInfoInQuotations = g.emitDebugInfoInQuotations } - member cenv.Close() = - cenv.referencedTypeDefs |> ResizeArray.toList, - cenv.typeSplices |> ResizeArray.map (fun (ty,m) -> mkTyparTy ty, m) |> ResizeArray.toList, + member cenv.Close() = + cenv.referencedTypeDefs |> ResizeArray.toList, + cenv.typeSplices |> ResizeArray.map (fun (ty, m) -> mkTyparTy ty, m) |> ResizeArray.toList, cenv.exprSplices |> ResizeArray.toList - static member ComputeQuotationFormat g = - let deserializeExValRef = ValRefForIntrinsic g.deserialize_quoted_FSharp_40_plus_info - if ValueOptionInternal.isSome deserializeExValRef.TryDeref then + static member ComputeQuotationFormat g = + let deserializeExValRef = ValRefForIntrinsic g.deserialize_quoted_FSharp_40_plus_info + if deserializeExValRef.TryDeref.IsSome then QuotationSerializationFormat.FSharp_40_Plus - else + else QuotationSerializationFormat.FSharp_20_Plus -type QuotationTranslationEnv = - { /// Map from Val to binding index - vs: ValMap +type QuotationTranslationEnv = + { + /// Map from Val to binding index + vs: ValMap + nvs: int + /// Map from typar stamps to binding index tyvs: StampMap - // Map for values bound by the - // 'let v = isinst e in .... if nonnull v then ...v .... ' + + // Map for values bound by the + // 'let v = isinst e in .... if nonnull v then ...v .... ' // construct arising out the compilation of pattern matching. We decode these back to the form - // 'if istype v then ...unbox v .... ' - isinstVals: ValMap - substVals: ValMap } + // 'if istype v then ...unbox v .... ' + isinstVals: ValMap + + substVals: ValMap + } - static member Empty = - { vs = ValMap<_>.Empty + static member Empty = + { vs = ValMap<_>.Empty nvs = 0 - tyvs = Map.empty - isinstVals = ValMap<_>.Empty + tyvs = Map.empty + isinstVals = ValMap<_>.Empty substVals = ValMap<_>.Empty } - member env.BindTypar (v:Typar) = + member env.BindTypar (v: Typar) = let idx = env.tyvs.Count - { env with tyvs = env.tyvs.Add(v.Stamp,idx ) } + { env with tyvs = env.tyvs.Add(v.Stamp, idx ) } - member env.BindTypars vs = - (env, vs) ||> List.fold (fun env v -> env.BindTypar v) // fold left-to-right because indexes are left-to-right + member env.BindTypars vs = + (env, vs) ||> List.fold (fun env v -> env.BindTypar v) // fold left-to-right because indexes are left-to-right -let BindFormalTypars (env:QuotationTranslationEnv) vs = - { env with tyvs = Map.empty }.BindTypars vs +let BindFormalTypars (env: QuotationTranslationEnv) vs = + { env with tyvs = Map.empty }.BindTypars vs let BindVal env v = - { env with + { env with vs = env.vs.Add v env.nvs nvs = env.nvs + 1 } -let BindIsInstVal env v (ty,e) = - { env with isinstVals = env.isinstVals.Add v (ty,e) } +let BindIsInstVal env v (ty, e) = + { env with isinstVals = env.isinstVals.Add v (ty, e) } -let BindSubstVal env v e = +let BindSubstVal env v e = { env with substVals = env.substVals.Add v e } +let BindVals env vs = List.fold BindVal env vs // fold left-to-right because indexes are left-to-right -let BindVals env vs = List.fold BindVal env vs // fold left-to-right because indexes are left-to-right -let BindFlatVals env vs = List.fold BindVal env vs // fold left-to-right because indexes are left-to-right +let BindFlatVals env vs = List.fold BindVal env vs // fold left-to-right because indexes are left-to-right exception InvalidQuotedTerm of exn + exception IgnoringPartOfQuotedTermWarning of string * Range.range let wfail e = raise (InvalidQuotedTerm e) -let (|ModuleValueOrMemberUse|_|) g expr = - let rec loop expr args = - match stripExpr expr with - | Expr.App((InnerExprPat(Expr.Val(vref,vFlags,_) as f)),fty,tyargs,actualArgs,_m) when vref.IsMemberOrModuleBinding -> - Some(vref,vFlags,f,fty,tyargs,actualArgs @ args) - | Expr.App(f,_fty,[],actualArgs,_) -> +let (|ModuleValueOrMemberUse|_|) g expr = + let rec loop expr args = + match stripExpr expr with + | Expr.App((InnerExprPat(Expr.Val(vref, vFlags, _) as f)), fty, tyargs, actualArgs, _m) when vref.IsMemberOrModuleBinding -> + Some(vref, vFlags, f, fty, tyargs, actualArgs @ args) + | Expr.App(f, _fty, [], actualArgs, _) -> loop f (actualArgs @ args) - | (Expr.Val(vref,vFlags,_m) as f) when (match vref.DeclaringEntity with ParentNone -> false | _ -> true) -> + | (Expr.Val(vref, vFlags, _m) as f) when (match vref.DeclaringEntity with ParentNone -> false | _ -> true) -> let fty = tyOfExpr g f - Some(vref,vFlags,f,fty,[],args) - | _ -> + Some(vref, vFlags, f, fty, [], args) + | _ -> None loop expr [] @@ -144,26 +151,26 @@ let (|SimpleArrayLoopUpperBound|_|) expr = | Expr.Op(TOp.ILAsm([AI_sub], _), _, [Expr.Op(TOp.ILAsm([I_ldlen; AI_conv ILBasicType.DT_I4], _), _, _, _); Expr.Const(Const.Int32 1, _, _) ], _) -> Some () | _ -> None -let (|SimpleArrayLoopBody|_|) g expr = +let (|SimpleArrayLoopBody|_|) g expr = match expr with - | Expr.Lambda(_, a, b, ([_] as args), Expr.Let(TBind(forVarLoop, Expr.Op(TOp.ILAsm([I_ldelem_any(ILArrayShape [(Some 0, None)], _)], _), [elemTy], [arr; idx], m1), seqPoint), body, m2, freeVars), m, ty) -> + | Expr.Lambda(_, a, b, ([_] as args), Expr.Let(TBind(forVarLoop, Expr.Op(TOp.ILAsm([I_ldelem_any(ILArrayShape [(Some 0, None)], _)], _), [elemTy], [arr; idx], m1), seqPoint), body, m2, freeVars), m, ty) -> let body = Expr.Let(TBind(forVarLoop, mkCallArrayGet g m1 elemTy arr idx, seqPoint), body, m2, freeVars) let expr = Expr.Lambda(newUnique(), a, b, args, body, m, ty) Some (arr, elemTy, expr) | _ -> None -let (|ObjectInitializationCheck|_|) g expr = +let (|ObjectInitializationCheck|_|) g expr = // recognize "if this.init@ < 1 then failinit" match expr with | Expr.Match ( - _, _, - TDSwitch + _, _, + TDSwitch ( - Expr.Op(TOp.ILAsm([AI_clt], _), _, [Expr.Op(TOp.ValFieldGet((RFRef(_, name))), _, [Expr.Val(selfRef, NormalValUse, _)], _); Expr.Const(Const.Int32 1, _, _)], _), _, _, _ - ), + Expr.Op(TOp.ILAsm([AI_clt], _), _, [Expr.Op(TOp.ValFieldGet((RFRef(_, name))), _, [Expr.Val(selfRef, NormalValUse, _)], _); Expr.Const(Const.Int32 1, _, _)], _), _, _, _ + ), [| TTarget([], Expr.App(Expr.Val(failInitRef, _, _), _, _, _, _), _); _ |], _, resultTy - ) when + ) when IsCompilerGeneratedName name && name.StartsWithOrdinal("init") && selfRef.BaseOrThisInfo = MemberThisVal && @@ -180,15 +187,15 @@ let rec EmitDebugInfoIfNecessary cenv env m astExpr : QP.ExprData = try let mk_tuple g m es = mkRefTupled g m es (List.map (tyOfExpr g) es) - let rangeExpr = - mk_tuple cenv.g m - [ mkString cenv.g m m.FileName - mkInt cenv.g m m.StartLine - mkInt cenv.g m m.StartColumn - mkInt cenv.g m m.EndLine - mkInt cenv.g m m.EndColumn ] - let attrExpr = - mk_tuple cenv.g m + let rangeExpr = + mk_tuple cenv.g m + [ mkString cenv.g m m.FileName + mkInt cenv.g m m.StartLine + mkInt cenv.g m m.StartColumn + mkInt cenv.g m m.EndLine + mkInt cenv.g m m.EndColumn ] + let attrExpr = + mk_tuple cenv.g m [ mkString cenv.g m "DebugRange" rangeExpr ] @@ -197,13 +204,13 @@ let rec EmitDebugInfoIfNecessary cenv env m astExpr : QP.ExprData = QP.mkAttributedExpression(astExpr, attrExprR) finally cenv.emitDebugInfoInQuotations <- true - else + else astExpr and ConvExpr cenv env (expr : Expr) = EmitDebugInfoIfNecessary cenv env expr.Range (ConvExprCore cenv env expr) -and private ConvExprCore cenv (env : QuotationTranslationEnv) (expr: Expr) : QP.ExprData = +and private ConvExprCore cenv (env : QuotationTranslationEnv) (expr: Expr) : QP.ExprData = let expr = DetectAndOptimizeForExpression cenv.g OptimizeIntRangesOnly expr @@ -212,369 +219,369 @@ and private ConvExprCore cenv (env : QuotationTranslationEnv) (expr: Expr) : QP. let expr = NormalizeAndAdjustPossibleSubsumptionExprs cenv.g expr // Remove TExpr_ref nodes - let expr = stripExpr expr + let expr = stripExpr expr - // Recognize F# object model calls - // Recognize applications of module functions. - match expr with + // Recognize F# object model calls + // Recognize applications of module functions. + match expr with // Detect expression tree exprSplices - | Expr.App(InnerExprPat(Expr.Val(vf,_,_)),_,_,x0::rest,m) - when isSplice cenv.g vf -> + | Expr.App(InnerExprPat(Expr.Val(vf, _, _)), _, _, x0::rest, m) + when isSplice cenv.g vf -> let idx = cenv.exprSplices.Count let ty = tyOfExpr cenv.g expr - - match (freeInExpr CollectTyparsAndLocalsNoCaching x0).FreeLocals |> Seq.tryPick (fun v -> if env.vs.ContainsVal v then Some v else None) with + + match (freeInExpr CollectTyparsAndLocalsNoCaching x0).FreeLocals |> Seq.tryPick (fun v -> if env.vs.ContainsVal v then Some v else None) with | Some v -> errorR(Error(FSComp.SR.crefBoundVarUsedInSplice(v.DisplayName), v.Range)) | None -> () cenv.exprSplices.Add((x0, m)) - let hole = QP.mkHole(ConvType cenv env m ty,idx) - (hole, rest) ||> List.fold (fun fR arg -> QP.mkApp (fR,ConvExpr cenv env arg)) + let hole = QP.mkHole(ConvType cenv env m ty, idx) + (hole, rest) ||> List.fold (fun fR arg -> QP.mkApp (fR, ConvExpr cenv env arg)) - | ModuleValueOrMemberUse cenv.g (vref,vFlags,_f,_fty,tyargs,curriedArgs) + | ModuleValueOrMemberUse cenv.g (vref, vFlags, _f, _fty, tyargs, curriedArgs) when not (isSplice cenv.g vref) -> - let m = expr.Range + let m = expr.Range - let (numEnclTypeArgs,_,isNewObj,valUseFlags,isSelfInit,takesInstanceArg,isPropGet,isPropSet) = - GetMemberCallInfo cenv.g (vref,vFlags) + let (numEnclTypeArgs, _, isNewObj, valUseFlags, isSelfInit, takesInstanceArg, isPropGet, isPropSet) = + GetMemberCallInfo cenv.g (vref, vFlags) - let isMember,tps,curriedArgInfos,retTy = - match vref.MemberInfo with - | Some _ when not vref.IsExtensionMember -> + let isMember, tps, curriedArgInfos, retTy = + match vref.MemberInfo with + | Some _ when not vref.IsExtensionMember -> // This is an application of a member method // We only count one argument block for these. - let tps,curriedArgInfos,retTy,_ = GetTypeOfIntrinsicMemberInCompiledForm cenv.g vref - true,tps,curriedArgInfos,retTy - | _ -> + let tps, curriedArgInfos, retTy, _ = GetTypeOfIntrinsicMemberInCompiledForm cenv.g vref + true, tps, curriedArgInfos, retTy + | _ -> // This is an application of a module value or extension member - let arities = arityOfVal vref.Deref - let tps,curriedArgInfos,retTy,_ = GetTopValTypeInCompiledForm cenv.g arities vref.Type m - false,tps,curriedArgInfos,retTy + let arities = arityOfVal vref.Deref + let tps, curriedArgInfos, retTy, _ = GetTopValTypeInCompiledForm cenv.g arities vref.Type m + false, tps, curriedArgInfos, retTy // Compute the object arguments as they appear in a compiled call // Strip off the object argument, if any. The curriedArgInfos are already adjusted to compiled member form - let objArgs,curriedArgs = - match takesInstanceArg,curriedArgs with - | false,curriedArgs -> [],curriedArgs - | true,(objArg::curriedArgs) -> [objArg],curriedArgs - | true,[] -> wfail(InternalError("warning: unexpected missing object argument when generating quotation for call to F# object member " + vref.LogicalName,m)) + let objArgs, curriedArgs = + match takesInstanceArg, curriedArgs with + | false, curriedArgs -> [], curriedArgs + | true, (objArg::curriedArgs) -> [objArg], curriedArgs + | true, [] -> wfail(InternalError("warning: unexpected missing object argument when generating quotation for call to F# object member " + vref.LogicalName, m)) - if verboseCReflect then - dprintfn "vref.DisplayName = %A, #objArgs = %A, #curriedArgs = %A" vref.DisplayName objArgs.Length curriedArgs.Length + if verboseCReflect then + dprintfn "vref.DisplayName = %A, #objArgs = %A, #curriedArgs = %A" vref.DisplayName objArgs.Length curriedArgs.Length // Check to see if there aren't enough arguments or if there is a tuple-arity mismatch // If so, adjust and try again let nCurriedArgInfos = curriedArgInfos.Length if curriedArgs.Length < nCurriedArgInfos || - ((List.truncate nCurriedArgInfos curriedArgs,curriedArgInfos) ||> List.exists2 (fun arg argInfo -> + ((List.truncate nCurriedArgInfos curriedArgs, curriedArgInfos) ||> List.exists2 (fun arg argInfo -> (argInfo.Length > (tryDestRefTupleExpr arg).Length))) then - if verboseCReflect then - dprintfn "vref.DisplayName = %A was under applied" vref.DisplayName - // Too few arguments or incorrect tupling? Convert to a lambda and beta-reduce the - // partially applied arguments to 'let' bindings - let topValInfo = - match vref.ValReprInfo with - | None -> error(InternalError("no arity information found for F# value " + vref.LogicalName,vref.Range)) - | Some a -> a - - let expr,exprty = AdjustValForExpectedArity cenv.g m vref vFlags topValInfo - ConvExpr cenv env (MakeApplicationAndBetaReduce cenv.g (expr,exprty,[tyargs],curriedArgs,m)) + if verboseCReflect then + dprintfn "vref.DisplayName = %A was under applied" vref.DisplayName + // Too few arguments or incorrect tupling? Convert to a lambda and beta-reduce the + // partially applied arguments to 'let' bindings + let topValInfo = + match vref.ValReprInfo with + | None -> error(InternalError("no arity information found for F# value " + vref.LogicalName, vref.Range)) + | Some a -> a + + let expr, exprty = AdjustValForExpectedArity cenv.g m vref vFlags topValInfo + ConvExpr cenv env (MakeApplicationAndBetaReduce cenv.g (expr, exprty, [tyargs], curriedArgs, m)) else - // Too many arguments? Chop - let (curriedArgs:Expr list ),laterArgs = List.splitAt nCurriedArgInfos curriedArgs + // Too many arguments? Chop + let (curriedArgs: Expr list ), laterArgs = List.splitAt nCurriedArgInfos curriedArgs - let callR = + let callR = // We now have the right number of arguments, w.r.t. currying and tupling. - // Next work out what kind of object model call and build an object model call node. - + // Next work out what kind of object model call and build an object model call node. + // detuple the args - let untupledCurriedArgs = - (curriedArgs,curriedArgInfos) ||> List.map2 (fun arg curriedArgInfo -> - let numUntupledArgs = curriedArgInfo.Length - (if numUntupledArgs = 0 then [] - elif numUntupledArgs = 1 then [arg] + let untupledCurriedArgs = + (curriedArgs, curriedArgInfos) ||> List.map2 (fun arg curriedArgInfo -> + let numUntupledArgs = curriedArgInfo.Length + (if numUntupledArgs = 0 then [] + elif numUntupledArgs = 1 then [arg] else tryDestRefTupleExpr arg)) - if verboseCReflect then - dprintfn "vref.DisplayName = %A , after unit adjust, #untupledCurriedArgs = %A, #curriedArgInfos = %d" vref.DisplayName (List.map List.length untupledCurriedArgs) curriedArgInfos.Length + if verboseCReflect then + dprintfn "vref.DisplayName = %A, after unit adjust, #untupledCurriedArgs = %A, #curriedArgInfos = %d" vref.DisplayName (List.map List.length untupledCurriedArgs) curriedArgInfos.Length let subCall = - if isMember then + if isMember then // This is an application of a member method // We only count one argument block for these. let callArgs = (objArgs::untupledCurriedArgs) |> List.concat - let parentTyconR = ConvTyconRef cenv vref.TopValDeclaringEntity m + let parentTyconR = ConvTyconRef cenv vref.TopValDeclaringEntity m let isNewObj = isNewObj || valUseFlags || isSelfInit - // The signature types are w.r.t. to the formal context - let envinner = BindFormalTypars env tps + // The signature types are w.r.t. to the formal context + let envinner = BindFormalTypars env tps let argTys = curriedArgInfos |> List.concat |> List.map fst - let methArgTypesR = ConvTypes cenv envinner m argTys + let methArgTypesR = ConvTypes cenv envinner m argTys let methRetTypeR = ConvReturnType cenv envinner m retTy - let methName = vref.CompiledName - let numGenericArgs = tyargs.Length - numEnclTypeArgs - ConvObjectModelCall cenv env m (isPropGet,isPropSet,isNewObj,parentTyconR,methArgTypesR,methRetTypeR,methName,tyargs,numGenericArgs,callArgs) + let methName = vref.CompiledName + let numGenericArgs = tyargs.Length - numEnclTypeArgs + ConvObjectModelCall cenv env m (isPropGet, isPropSet, isNewObj, parentTyconR, methArgTypesR, methRetTypeR, methName, tyargs, numGenericArgs, callArgs) else - // This is an application of the module value. + // This is an application of the module value. ConvModuleValueApp cenv env m vref tyargs untupledCurriedArgs - match curriedArgs,curriedArgInfos with + match curriedArgs, curriedArgInfos with // static member and module value unit argument elimination - | [arg:Expr],[[]] -> + | [arg: Expr], [[]] -> // we got here if quotation is represents a call with unit argument // let f () = () // <@ f @> // => (\arg -> f arg) => arg is Expr.Val - no-effects, first case // <@ f() @> // Expr.Const(Unit) - no-effects - first case // <@ f (someFunctionThatReturnsUnit) @> - potential effects - second case match arg with - | Expr.Val _ - | Expr.Const(Const.Unit,_,_) -> subCall + | Expr.Val _ + | Expr.Const(Const.Unit, _, _) -> subCall | _ -> - let argQ = ConvExpr cenv env arg + let argQ = ConvExpr cenv env arg QP.mkSequential(argQ, subCall) | _ -> subCall - List.fold (fun fR arg -> QP.mkApp (fR,ConvExpr cenv env arg)) callR laterArgs + List.fold (fun fR arg -> QP.mkApp (fR, ConvExpr cenv env arg)) callR laterArgs - // Blast type application nodes and expression application nodes apart so values are left with just their type arguments - | Expr.App(f,fty,(_ :: _ as tyargs),(_ :: _ as args),m) -> + // Blast type application nodes and expression application nodes apart so values are left with just their type arguments + | Expr.App(f, fty, (_ :: _ as tyargs), (_ :: _ as args), m) -> let rfty = applyForallTy cenv.g fty tyargs - ConvExpr cenv env (primMkApp (primMkApp (f,fty) tyargs [] m, rfty) [] args m) + ConvExpr cenv env (primMkApp (primMkApp (f, fty) tyargs [] m, rfty) [] args m) - // Uses of possibly-polymorphic values - | Expr.App(InnerExprPat(Expr.Val(vref,_vFlags,m)),_fty,tyargs,[],_) -> + // Uses of possibly-polymorphic values + | Expr.App(InnerExprPat(Expr.Val(vref, _vFlags, m)), _fty, tyargs, [], _) -> ConvValRef true cenv env m vref tyargs - // Simple applications - | Expr.App(f,_fty,tyargs,args,m) -> + // Simple applications + | Expr.App(f, _fty, tyargs, args, m) -> if not (List.isEmpty tyargs) then wfail(Error(FSComp.SR.crefQuotationsCantContainGenericExprs(), m)) - List.fold (fun fR arg -> QP.mkApp (fR,ConvExpr cenv env arg)) (ConvExpr cenv env f) args - - // REVIEW: what is the quotation view of literals accessing enumerations? Currently they show up as integers. - | Expr.Const(c,m,ty) -> + List.fold (fun fR arg -> QP.mkApp (fR, ConvExpr cenv env arg)) (ConvExpr cenv env f) args + + // REVIEW: what is the quotation view of literals accessing enumerations? Currently they show up as integers. + | Expr.Const(c, m, ty) -> ConvConst cenv env m c ty - | Expr.Val(vref,_vFlags,m) -> + | Expr.Val(vref, _vFlags, m) -> ConvValRef true cenv env m vref [] - | Expr.Let(bind,body,_,_) -> + | Expr.Let(bind, body, _, _) -> // The binding may be a compiler-generated binding that gets removed in the quotation presentation - match ConvLetBind cenv env bind with + match ConvLetBind cenv env bind with | None, env -> ConvExpr cenv env body - | Some(bindR),env -> QP.mkLet(bindR,ConvExpr cenv env body) - - | Expr.LetRec(binds,body,_,_) -> + | Some(bindR), env -> QP.mkLet(bindR, ConvExpr cenv env body) + + | Expr.LetRec(binds, body, _, _) -> let vs = valsOfBinds binds - let vsR = vs |> List.map (ConvVal cenv env) + let vsR = vs |> List.map (ConvVal cenv env) let env = BindFlatVals env vs - let bodyR = ConvExpr cenv env body + let bodyR = ConvExpr cenv env body let bindsR = List.zip vsR (binds |> List.map (fun b -> ConvExpr cenv env b.Expr)) - QP.mkLetRec(bindsR,bodyR) + QP.mkLetRec(bindsR, bodyR) - | Expr.Lambda(_,_,_,vs,b,_,_) -> - let v,b = MultiLambdaToTupledLambda cenv.g vs b - let vR = ConvVal cenv env v - let bR = ConvExpr cenv (BindVal env v) b + | Expr.Lambda(_, _, _, vs, b, _, _) -> + let v, b = MultiLambdaToTupledLambda cenv.g vs b + let vR = ConvVal cenv env v + let bR = ConvExpr cenv (BindVal env v) b QP.mkLambda(vR, bR) - | Expr.Quote(ast,_,_,_,ety) -> + | Expr.Quote(ast, _, _, _, ety) -> // F# 2.0-3.1 had a bug with nested 'raw' quotations. F# 4.0 + FSharp.Core 4.4.0.0+ allows us to do the right thing. - if cenv.quotationFormat = QuotationSerializationFormat.FSharp_40_Plus && + if cenv.quotationFormat = QuotationSerializationFormat.FSharp_40_Plus && // Look for a 'raw' quotation - tyconRefEq cenv.g (tcrefOfAppTy cenv.g ety) cenv.g.raw_expr_tcr + tyconRefEq cenv.g (tcrefOfAppTy cenv.g ety) cenv.g.raw_expr_tcr then QP.mkQuoteRaw40(ConvExpr cenv env ast) else QP.mkQuote(ConvExpr cenv env ast) - | Expr.TyLambda (_,_,_,m,_) -> + | Expr.TyLambda (_, _, _, m, _) -> wfail(Error(FSComp.SR.crefQuotationsCantContainGenericFunctions(), m)) - | Expr.Match (_spBind,m,dtree,tgs,_,retTy) -> - let typR = ConvType cenv env m retTy - ConvDecisionTree cenv env tgs typR dtree - + | Expr.Match (_spBind, m, dtree, tgs, _, retTy) -> + let typR = ConvType cenv env m retTy + ConvDecisionTree cenv env tgs typR dtree + // initialization check | Expr.Sequential(ObjectInitializationCheck cenv.g, x1, NormalSeq, _, _) -> ConvExpr cenv env x1 - | Expr.Sequential (x0,x1,NormalSeq,_,_) -> QP.mkSequential(ConvExpr cenv env x0, ConvExpr cenv env x1) - | Expr.Obj (_,ty,_,_,[TObjExprMethod(TSlotSig(_,ctyp, _,_,_,_),_,tps,[tmvs],e,_) as tmethod],_,m) when isDelegateTy cenv.g ty -> - let f = mkLambdas m tps tmvs (e,GetFSharpViewOfReturnType cenv.g (returnTyOfMethod cenv.g tmethod)) - let fR = ConvExpr cenv env f - let tyargR = ConvType cenv env m ctyp + | Expr.Sequential (x0, x1, NormalSeq, _, _) -> QP.mkSequential(ConvExpr cenv env x0, ConvExpr cenv env x1) + | Expr.Obj (_, ty, _, _, [TObjExprMethod(TSlotSig(_, ctyp, _, _, _, _), _, tps, [tmvs], e, _) as tmethod], _, m) when isDelegateTy cenv.g ty -> + let f = mkLambdas m tps tmvs (e, GetFSharpViewOfReturnType cenv.g (returnTyOfMethod cenv.g tmethod)) + let fR = ConvExpr cenv env f + let tyargR = ConvType cenv env m ctyp QP.mkDelegate(tyargR, fR) - | Expr.StaticOptimization (_,_,x,_) -> ConvExpr cenv env x + | Expr.StaticOptimization (_, _, x, _) -> ConvExpr cenv env x | Expr.TyChoose _ -> ConvExpr cenv env (TypeRelations.ChooseTyparSolutionsForFreeChoiceTypars cenv.g cenv.amap expr) - | Expr.Sequential (x0,x1,ThenDoSeq,_,_) -> QP.mkSequential(ConvExpr cenv env x0, ConvExpr cenv env x1) - | Expr.Obj (_lambdaId,_typ,_basev,_basecall,_overrides,_iimpls,m) -> wfail(Error(FSComp.SR.crefQuotationsCantContainObjExprs(),m)) + | Expr.Sequential (x0, x1, ThenDoSeq, _, _) -> QP.mkSequential(ConvExpr cenv env x0, ConvExpr cenv env x1) + | Expr.Obj (_lambdaId, _typ, _basev, _basecall, _overrides, _iimpls, m) -> wfail(Error(FSComp.SR.crefQuotationsCantContainObjExprs(), m)) - | Expr.Op(op,tyargs,args,m) -> - match op,tyargs,args with - | TOp.UnionCase ucref,_,_ -> + | Expr.Op(op, tyargs, args, m) -> + match op, tyargs, args with + | TOp.UnionCase ucref, _, _ -> let mkR = ConvUnionCaseRef cenv ucref m let tyargsR = ConvTypes cenv env m tyargs let argsR = ConvExprs cenv env args - QP.mkUnion(mkR,tyargsR,argsR) + QP.mkUnion(mkR, tyargsR, argsR) - | TOp.Tuple tupInfo,tyargs,_ -> + | TOp.Tuple tupInfo, tyargs, _ -> let tyR = ConvType cenv env m (mkAnyTupledTy cenv.g tupInfo tyargs) let argsR = ConvExprs cenv env args - QP.mkTuple(tyR,argsR) // TODO: propagate to quotations + QP.mkTuple(tyR, argsR) // TODO: propagate to quotations - | TOp.Recd (_,tcref),_,_ -> + | TOp.Recd (_, tcref), _, _ -> let rgtypR = ConvTyconRef cenv tcref m let tyargsR = ConvTypes cenv env m tyargs let argsR = ConvExprs cenv env args - QP.mkRecdMk(rgtypR,tyargsR,argsR) + QP.mkRecdMk(rgtypR, tyargsR, argsR) - | TOp.AnonRecd anonInfo, _, _ -> + | TOp.AnonRecd anonInfo, _, _ -> let tref = anonInfo.ILTypeRef let rgtypR = ConvILTypeRef cenv tref let tyargsR = ConvTypes cenv env m tyargs let argsR = ConvExprs cenv env args - QP.mkRecdMk(rgtypR,tyargsR,argsR) + QP.mkRecdMk(rgtypR, tyargsR, argsR) - | TOp.AnonRecdGet (anonInfo, n), _, _ -> + | TOp.AnonRecdGet (anonInfo, n), _, _ -> let tref = anonInfo.ILTypeRef let rgtypR = ConvILTypeRef cenv tref let tyargsR = ConvTypes cenv env m tyargs let argsR = ConvExprs cenv env args - QP.mkRecdGet((rgtypR,anonInfo.SortedNames.[n]),tyargsR,argsR) + QP.mkRecdGet((rgtypR, anonInfo.SortedNames.[n]), tyargsR, argsR) - | TOp.UnionCaseFieldGet (ucref,n),tyargs,[e] -> + | TOp.UnionCaseFieldGet (ucref, n), tyargs, [e] -> ConvUnionFieldGet cenv env m ucref n tyargs e - | TOp.ValFieldGetAddr(_rfref, _readonly),_tyargs,_ -> - wfail(Error(FSComp.SR.crefQuotationsCantContainAddressOf(), m)) + | TOp.ValFieldGetAddr(_rfref, _readonly), _tyargs, _ -> + wfail(Error(FSComp.SR.crefQuotationsCantContainAddressOf(), m)) - | TOp.UnionCaseFieldGetAddr _,_tyargs,_ -> - wfail(Error(FSComp.SR.crefQuotationsCantContainAddressOf(), m)) + | TOp.UnionCaseFieldGetAddr _, _tyargs, _ -> + wfail(Error(FSComp.SR.crefQuotationsCantContainAddressOf(), m)) - | TOp.ValFieldGet(_rfref),_tyargs,[] -> - wfail(Error(FSComp.SR.crefQuotationsCantContainStaticFieldRef(),m)) + | TOp.ValFieldGet(_rfref), _tyargs, [] -> + wfail(Error(FSComp.SR.crefQuotationsCantContainStaticFieldRef(), m)) - | TOp.ValFieldGet(rfref),tyargs,args -> - ConvClassOrRecdFieldGet cenv env m rfref tyargs args + | TOp.ValFieldGet(rfref), tyargs, args -> + ConvClassOrRecdFieldGet cenv env m rfref tyargs args - | TOp.TupleFieldGet(tupInfo,n),tyargs,[e] -> + | TOp.TupleFieldGet(tupInfo, n), tyargs, [e] -> let eR = ConvLValueExpr cenv env e let tyR = ConvType cenv env m (mkAnyTupledTy cenv.g tupInfo tyargs) QP.mkTupleGet(tyR, n, eR) - | TOp.ILAsm(([ I_ldfld(_,_,fspec) ] - | [ I_ldfld(_,_,fspec); AI_nop ] - | [ I_ldsfld (_,fspec) ] - | [ I_ldsfld (_,fspec); AI_nop ]),_),enclTypeArgs,args -> + | TOp.ILAsm(([ I_ldfld(_, _, fspec) ] + | [ I_ldfld(_, _, fspec); AI_nop ] + | [ I_ldsfld (_, fspec) ] + | [ I_ldsfld (_, fspec); AI_nop ]), _), enclTypeArgs, args -> ConvLdfld cenv env m fspec enclTypeArgs args - | TOp.ILAsm([ I_stfld(_,_,fspec) | I_stsfld (_,fspec) ],_),enclTypeArgs,args -> + | TOp.ILAsm([ I_stfld(_, _, fspec) | I_stsfld (_, fspec) ], _), enclTypeArgs, args -> let tyargsR = ConvTypes cenv env m enclTypeArgs let parentTyconR = ConvILTypeRefUnadjusted cenv m fspec.DeclaringTypeRef let argsR = ConvLValueArgs cenv env args - QP.mkFieldSet( (parentTyconR, fspec.Name),tyargsR, argsR) + QP.mkFieldSet( (parentTyconR, fspec.Name), tyargsR, argsR) - | TOp.ILAsm([ AI_ceq ],_),_,[arg1;arg2] -> + | TOp.ILAsm([ AI_ceq ], _), _, [arg1;arg2] -> let ty = tyOfExpr cenv.g arg1 let eq = mkCallEqualsOperator cenv.g m ty arg1 arg2 ConvExpr cenv env eq - | TOp.ILAsm([ I_throw ],_),_,[arg1] -> - let raiseExpr = mkCallRaise cenv.g m (tyOfExpr cenv.g expr) arg1 - ConvExpr cenv env raiseExpr + | TOp.ILAsm([ I_throw ], _), _, [arg1] -> + let raiseExpr = mkCallRaise cenv.g m (tyOfExpr cenv.g expr) arg1 + ConvExpr cenv env raiseExpr - | TOp.ILAsm(_il,_),_,_ -> + | TOp.ILAsm(_il, _), _, _ -> wfail(Error(FSComp.SR.crefQuotationsCantContainInlineIL(), m)) - | TOp.ExnConstr tcref,_,args -> + | TOp.ExnConstr tcref, _, args -> let _rgtypR = ConvTyconRef cenv tcref m let _typ = mkAppTy tcref [] - let parentTyconR = ConvTyconRef cenv tcref m - let argtys = tcref |> recdFieldsOfExnDefRef |> List.map (fun rfld -> rfld.FormalType) + let parentTyconR = ConvTyconRef cenv tcref m + let argtys = tcref |> recdFieldsOfExnDefRef |> List.map (fun rfld -> rfld.FormalType) let methArgTypesR = ConvTypes cenv env m argtys let argsR = ConvExprs cenv env args - let objR = - QP.mkCtorCall( { ctorParent = parentTyconR + let objR = + QP.mkCtorCall( { ctorParent = parentTyconR ctorArgTypes = methArgTypesR }, [], argsR) let exnTypeR = ConvType cenv env m cenv.g.exn_ty QP.mkCoerce(exnTypeR, objR) - | TOp.ValFieldSet rfref, _tinst,args -> - let argsR = ConvLValueArgs cenv env args + | TOp.ValFieldSet rfref, _tinst, args -> + let argsR = ConvLValueArgs cenv env args let tyargsR = ConvTypes cenv env m tyargs - let ((_parentTyconR,fldOrPropName) as projR) = ConvRecdFieldRef cenv rfref m + let ((_parentTyconR, fldOrPropName) as projR) = ConvRecdFieldRef cenv rfref m if rfref.TyconRef.IsRecordTycon then - QP.mkRecdSet(projR,tyargsR,argsR) + QP.mkRecdSet(projR, tyargsR, argsR) else - let fspec = rfref.RecdField + let fspec = rfref.RecdField let tcref = rfref.TyconRef let parentTyconR = ConvTyconRef cenv tcref m if useGenuineField tcref.Deref fspec then - QP.mkFieldSet( projR,tyargsR, argsR) + QP.mkFieldSet( projR, tyargsR, argsR) else let envinner = BindFormalTypars env (tcref.TyparsNoRange) let propRetTypeR = ConvType cenv envinner m fspec.FormalType - QP.mkPropSet( (parentTyconR, fldOrPropName,propRetTypeR,[]),tyargsR, argsR) + QP.mkPropSet( (parentTyconR, fldOrPropName, propRetTypeR, []), tyargsR, argsR) - | TOp.ExnFieldGet(tcref,i),[],[obj] -> + | TOp.ExnFieldGet(tcref, i), [], [obj] -> let exnc = stripExnEqns tcref let fspec = exnc.TrueInstanceFieldsAsList.[i] - let parentTyconR = ConvTyconRef cenv tcref m + let parentTyconR = ConvTyconRef cenv tcref m let propRetTypeR = ConvType cenv env m fspec.FormalType let callArgR = ConvExpr cenv env obj let exnTypeR = ConvType cenv env m (generalizedTyconRef tcref) - QP.mkPropGet( (parentTyconR, fspec.Name,propRetTypeR,[]),[], [QP.mkCoerce (exnTypeR, callArgR)]) + QP.mkPropGet( (parentTyconR, fspec.Name, propRetTypeR, []), [], [QP.mkCoerce (exnTypeR, callArgR)]) - | TOp.Coerce,[tgtTy;srcTy],[x] -> + | TOp.Coerce, [tgtTy;srcTy], [x] -> let xR = ConvExpr cenv env x - if typeEquiv cenv.g tgtTy srcTy then + if typeEquiv cenv.g tgtTy srcTy then xR else - QP.mkCoerce(ConvType cenv env m tgtTy,xR) + QP.mkCoerce(ConvType cenv env m tgtTy, xR) - | TOp.Reraise,[toTy],[] -> - // rebuild reraise() and Convert - mkReraiseLibCall cenv.g toTy m |> ConvExpr cenv env + | TOp.Reraise, [toTy], [] -> + // rebuild reraise() and Convert + mkReraiseLibCall cenv.g toTy m |> ConvExpr cenv env - | TOp.LValueOp(LAddrOf _,vref),[],[] -> + | TOp.LValueOp(LAddrOf _, vref), [], [] -> QP.mkAddressOf(ConvValRef false cenv env m vref []) - | TOp.LValueOp(LByrefSet,vref),[],[e] -> + | TOp.LValueOp(LByrefSet, vref), [], [e] -> QP.mkAddressSet(ConvValRef false cenv env m vref [], ConvExpr cenv env e) - | TOp.LValueOp(LSet,vref),[],[e] -> + | TOp.LValueOp(LSet, vref), [], [e] -> // Sets of module values become property sets - match vref.DeclaringEntity with - | Parent tcref when IsCompiledAsStaticProperty cenv.g vref.Deref -> - let parentTyconR = ConvTyconRef cenv tcref m + match vref.DeclaringEntity with + | Parent tcref when IsCompiledAsStaticProperty cenv.g vref.Deref -> + let parentTyconR = ConvTyconRef cenv tcref m let propName = vref.CompiledName - let propTy = ConvType cenv env m vref.Type - QP.mkPropSet( (parentTyconR, propName,propTy,[]),[], [ConvExpr cenv env e]) - | _ -> + let propTy = ConvType cenv env m vref.Type + QP.mkPropSet( (parentTyconR, propName, propTy, []), [], [ConvExpr cenv env e]) + | _ -> QP.mkVarSet( ConvValRef false cenv env m vref [], ConvExpr cenv env e) - | TOp.LValueOp(LByrefGet,vref),[],[] -> + | TOp.LValueOp(LByrefGet, vref), [], [] -> ConvValRef false cenv env m vref [] - | TOp.Array,[ty],xa -> - QP.mkNewArray(ConvType cenv env m ty,ConvExprs cenv env xa) + | TOp.Array, [ty], xa -> + QP.mkNewArray(ConvType cenv env m ty, ConvExprs cenv env xa) - | TOp.While _,[],[Expr.Lambda(_,_,_,[_],test,_,_);Expr.Lambda(_,_,_,[_],body,_,_)] -> + | TOp.While _, [], [Expr.Lambda(_, _, _, [_], test, _, _);Expr.Lambda(_, _, _, [_], body, _, _)] -> QP.mkWhileLoop(ConvExpr cenv env test, ConvExpr cenv env body) - - | TOp.For(_, FSharpForLoopUp), [], [Expr.Lambda(_,_,_,[_], lim0,_,_); Expr.Lambda(_,_,_,[_], SimpleArrayLoopUpperBound, lm,_); SimpleArrayLoopBody cenv.g (arr, elemTy, body)] -> - let lim1 = + + | TOp.For(_, FSharpForLoopUp), [], [Expr.Lambda(_, _, _, [_], lim0, _, _); Expr.Lambda(_, _, _, [_], SimpleArrayLoopUpperBound, lm, _); SimpleArrayLoopBody cenv.g (arr, elemTy, body)] -> + let lim1 = let len = mkCallArrayLength cenv.g lm elemTy arr // Array.length arr mkCallSubtractionOperator cenv.g lm cenv.g.int32_ty len (Expr.Const(Const.Int32 1, m, cenv.g.int32_ty)) // len - 1 QP.mkForLoop(ConvExpr cenv env lim0, ConvExpr cenv env lim1, ConvExpr cenv env body) - | TOp.For(_,dir),[],[Expr.Lambda(_,_,_,[_],lim0,_,_);Expr.Lambda(_,_,_,[_],lim1,_,_);body] -> - match dir with - | FSharpForLoopUp -> QP.mkForLoop(ConvExpr cenv env lim0,ConvExpr cenv env lim1, ConvExpr cenv env body) + | TOp.For(_, dir), [], [Expr.Lambda(_, _, _, [_], lim0, _, _);Expr.Lambda(_, _, _, [_], lim1, _, _);body] -> + match dir with + | FSharpForLoopUp -> QP.mkForLoop(ConvExpr cenv env lim0, ConvExpr cenv env lim1, ConvExpr cenv env body) | _ -> wfail(Error(FSComp.SR.crefQuotationsCantContainDescendingForLoops(), m)) - | TOp.ILCall(_,_,_,isNewObj,valUseFlags,isProp,_,ilMethRef,enclTypeArgs,methTypeArgs,_tys),[],callArgs -> + | TOp.ILCall(_, _, _, isNewObj, valUseFlags, isProp, _, ilMethRef, enclTypeArgs, methTypeArgs, _tys), [], callArgs -> let parentTyconR = ConvILTypeRefUnadjusted cenv m ilMethRef.DeclaringTypeRef let isNewObj = isNewObj || (match valUseFlags with CtorValUsedAsSuperInit | CtorValUsedAsSelfInit -> true | _ -> false) let methArgTypesR = List.map (ConvILType cenv env m) ilMethRef.ArgTypes @@ -583,114 +590,114 @@ and private ConvExprCore cenv (env : QuotationTranslationEnv) (expr: Expr) : QP. let isPropGet = isProp && methName.StartsWithOrdinal("get_") let isPropSet = isProp && methName.StartsWithOrdinal("set_") let tyargs = (enclTypeArgs@methTypeArgs) - ConvObjectModelCall cenv env m (isPropGet,isPropSet,isNewObj,parentTyconR,methArgTypesR,methRetTypeR,methName,tyargs,methTypeArgs.Length,callArgs) + ConvObjectModelCall cenv env m (isPropGet, isPropSet, isNewObj, parentTyconR, methArgTypesR, methRetTypeR, methName, tyargs, methTypeArgs.Length, callArgs) - | TOp.TryFinally _,[_resty],[Expr.Lambda(_,_,_,[_],e1,_,_); Expr.Lambda(_,_,_,[_],e2,_,_)] -> - QP.mkTryFinally(ConvExpr cenv env e1,ConvExpr cenv env e2) + | TOp.TryFinally _, [_resty], [Expr.Lambda(_, _, _, [_], e1, _, _); Expr.Lambda(_, _, _, [_], e2, _, _)] -> + QP.mkTryFinally(ConvExpr cenv env e1, ConvExpr cenv env e2) - | TOp.TryCatch _,[_resty],[Expr.Lambda(_,_,_,[_],e1,_,_); Expr.Lambda(_,_,_,[vf],ef,_,_); Expr.Lambda(_,_,_,[vh],eh,_,_)] -> + | TOp.TryCatch _, [_resty], [Expr.Lambda(_, _, _, [_], e1, _, _); Expr.Lambda(_, _, _, [vf], ef, _, _); Expr.Lambda(_, _, _, [vh], eh, _, _)] -> let vfR = ConvVal cenv env vf let envf = BindVal env vf let vhR = ConvVal cenv env vh let envh = BindVal env vh - QP.mkTryWith(ConvExpr cenv env e1,vfR,ConvExpr cenv envf ef,vhR,ConvExpr cenv envh eh) + QP.mkTryWith(ConvExpr cenv env e1, vfR, ConvExpr cenv envf ef, vhR, ConvExpr cenv envh eh) - | TOp.Bytes bytes,[],[] -> + | TOp.Bytes bytes, [], [] -> ConvExpr cenv env (Expr.Op(TOp.Array, [cenv.g.byte_ty], List.ofArray (Array.map (mkByte cenv.g m) bytes), m)) - | TOp.UInt16s arr,[],[] -> + | TOp.UInt16s arr, [], [] -> ConvExpr cenv env (Expr.Op(TOp.Array, [cenv.g.uint16_ty], List.ofArray (Array.map (mkUInt16 cenv.g m) arr), m)) - - | TOp.UnionCaseProof _,_,[e] -> ConvExpr cenv env e // Note: we erase the union case proof conversions when converting to quotations - | TOp.UnionCaseTagGet _tycr,_tinst,[_cx] -> wfail(Error(FSComp.SR.crefQuotationsCantFetchUnionIndexes(), m)) - | TOp.UnionCaseFieldSet (_c,_i),_tinst,[_cx;_x] -> wfail(Error(FSComp.SR.crefQuotationsCantSetUnionFields(), m)) - | TOp.ExnFieldSet(_tcref,_i),[],[_ex;_x] -> wfail(Error(FSComp.SR.crefQuotationsCantSetExceptionFields(), m)) - | TOp.RefAddrGet _,_,_ -> wfail(Error(FSComp.SR.crefQuotationsCantRequireByref(), m)) - | TOp.TraitCall (_ss),_,_ -> wfail(Error(FSComp.SR.crefQuotationsCantCallTraitMembers(), m)) - | _ -> - wfail(InternalError( "Unexpected expression shape",m)) - - | _ -> - wfail(InternalError(sprintf "unhandled construct in AST: %A" expr,expr.Range)) + + | TOp.UnionCaseProof _, _, [e] -> ConvExpr cenv env e // Note: we erase the union case proof conversions when converting to quotations + | TOp.UnionCaseTagGet _tycr, _tinst, [_cx] -> wfail(Error(FSComp.SR.crefQuotationsCantFetchUnionIndexes(), m)) + | TOp.UnionCaseFieldSet (_c, _i), _tinst, [_cx;_x] -> wfail(Error(FSComp.SR.crefQuotationsCantSetUnionFields(), m)) + | TOp.ExnFieldSet(_tcref, _i), [], [_ex;_x] -> wfail(Error(FSComp.SR.crefQuotationsCantSetExceptionFields(), m)) + | TOp.RefAddrGet _, _, _ -> wfail(Error(FSComp.SR.crefQuotationsCantRequireByref(), m)) + | TOp.TraitCall (_ss), _, _ -> wfail(Error(FSComp.SR.crefQuotationsCantCallTraitMembers(), m)) + | _ -> + wfail(InternalError( "Unexpected expression shape", m)) + + | _ -> + wfail(InternalError(sprintf "unhandled construct in AST: %A" expr, expr.Range)) and ConvLdfld cenv env m (fspec: ILFieldSpec) enclTypeArgs args = let tyargsR = ConvTypes cenv env m enclTypeArgs let parentTyconR = ConvILTypeRefUnadjusted cenv m fspec.DeclaringTypeRef let argsR = ConvLValueArgs cenv env args - QP.mkFieldGet( (parentTyconR, fspec.Name),tyargsR, argsR) + QP.mkFieldGet( (parentTyconR, fspec.Name), tyargsR, argsR) and ConvUnionFieldGet cenv env m ucref n tyargs e = let tyargsR = ConvTypes cenv env m tyargs - let tcR,s = ConvUnionCaseRef cenv ucref m - let projR = (tcR,s,n) + let tcR, s = ConvUnionCaseRef cenv ucref m + let projR = (tcR, s, n) let eR = ConvLValueExpr cenv env e QP.mkUnionFieldGet(projR, tyargsR, eR) and ConvClassOrRecdFieldGet cenv env m rfref tyargs args = EmitDebugInfoIfNecessary cenv env m (ConvClassOrRecdFieldGetCore cenv env m rfref tyargs args) -and private ConvClassOrRecdFieldGetCore cenv env m rfref tyargs args = +and private ConvClassOrRecdFieldGetCore cenv env m rfref tyargs args = let tyargsR = ConvTypes cenv env m tyargs - let argsR = ConvLValueArgs cenv env args - let ((parentTyconR,fldOrPropName) as projR) = ConvRecdFieldRef cenv rfref m + let argsR = ConvLValueArgs cenv env args + let ((parentTyconR, fldOrPropName) as projR) = ConvRecdFieldRef cenv rfref m if rfref.TyconRef.IsRecordTycon then - QP.mkRecdGet(projR,tyargsR,argsR) + QP.mkRecdGet(projR, tyargsR, argsR) else - let fspec = rfref.RecdField + let fspec = rfref.RecdField let tcref = rfref.TyconRef if useGenuineField tcref.Deref fspec then - QP.mkFieldGet(projR,tyargsR, argsR) + QP.mkFieldGet(projR, tyargsR, argsR) else let envinner = BindFormalTypars env tcref.TyparsNoRange let propRetTypeR = ConvType cenv envinner m fspec.FormalType - QP.mkPropGet( (parentTyconR, fldOrPropName,propRetTypeR,[]),tyargsR, argsR) + QP.mkPropGet( (parentTyconR, fldOrPropName, propRetTypeR, []), tyargsR, argsR) -and ConvLetBind cenv env (bind : Binding) = - match bind.Expr with - // Map for values bound by the - // 'let v = isinst e in .... if nonnull v then ...v .... ' +and ConvLetBind cenv env (bind : Binding) = + match bind.Expr with + // Map for values bound by the + // 'let v = isinst e in .... if nonnull v then ...v .... ' // construct arising out the compilation of pattern matching. We decode these back to the form - // 'if istype e then ...unbox e .... ' - // It's bit annoying that pattern matching does this transformation. Like all premature optimization we pay a + // 'if istype e then ...unbox e .... ' + // It's bit annoying that pattern matching does this transformation. Like all premature optimization we pay a // cost here to undo it. - | Expr.Op(TOp.ILAsm([ I_isinst _ ],_),[ty],[e],_) -> - None, BindIsInstVal env bind.Var (ty,e) - + | Expr.Op(TOp.ILAsm([ I_isinst _ ], _), [ty], [e], _) -> + None, BindIsInstVal env bind.Var (ty, e) + // Remove let = from quotation tree - | Expr.Val _ when bind.Var.IsCompilerGenerated -> + | Expr.Val _ when bind.Var.IsCompilerGenerated -> None, BindSubstVal env bind.Var bind.Expr // Remove let unionCase = ... from quotation tree - | Expr.Op(TOp.UnionCaseProof _,_,[e],_) -> + | Expr.Op(TOp.UnionCaseProof _, _, [e], _) -> None, BindSubstVal env bind.Var e | _ -> let v = bind.Var - let vR = ConvVal cenv env v + let vR = ConvVal cenv env v let rhsR = ConvExpr cenv env bind.Expr let envinner = BindVal env v - Some(vR,rhsR),envinner + Some(vR, rhsR), envinner -and ConvLValueArgs cenv env args = - match args with +and ConvLValueArgs cenv env args = + match args with | obj::rest -> ConvLValueExpr cenv env obj :: ConvExprs cenv env rest | [] -> [] -and ConvLValueExpr cenv env expr = +and ConvLValueExpr cenv env expr = EmitDebugInfoIfNecessary cenv env expr.Range (ConvLValueExprCore cenv env expr) -// This function has to undo the work of mkExprAddrOfExpr -and ConvLValueExprCore cenv env expr = - match expr with - | Expr.Op(op,tyargs,args,m) -> +// This function has to undo the work of mkExprAddrOfExpr +and ConvLValueExprCore cenv env expr = + match expr with + | Expr.Op(op, tyargs, args, m) -> match op, args, tyargs with - | TOp.LValueOp(LAddrOf _,vref),_,_ -> ConvValRef false cenv env m vref [] - | TOp.ValFieldGetAddr(rfref, _),_,_ -> ConvClassOrRecdFieldGet cenv env m rfref tyargs args - | TOp.UnionCaseFieldGetAddr(ucref,n, _),[e],_ -> ConvUnionFieldGet cenv env m ucref n tyargs e - | TOp.ILAsm([ I_ldflda(fspec) ],_rtys),_,_ -> ConvLdfld cenv env m fspec tyargs args - | TOp.ILAsm([ I_ldsflda(fspec) ],_rtys),_,_ -> ConvLdfld cenv env m fspec tyargs args - | TOp.ILAsm(([ I_ldelema(_ro,_isNativePtr,shape,_tyarg) ] ),_), (arr::idxs), [elemty] -> - match shape.Rank, idxs with + | TOp.LValueOp(LAddrOf _, vref), _, _ -> ConvValRef false cenv env m vref [] + | TOp.ValFieldGetAddr(rfref, _), _, _ -> ConvClassOrRecdFieldGet cenv env m rfref tyargs args + | TOp.UnionCaseFieldGetAddr(ucref, n, _), [e], _ -> ConvUnionFieldGet cenv env m ucref n tyargs e + | TOp.ILAsm([ I_ldflda(fspec) ], _rtys), _, _ -> ConvLdfld cenv env m fspec tyargs args + | TOp.ILAsm([ I_ldsflda(fspec) ], _rtys), _, _ -> ConvLdfld cenv env m fspec tyargs args + | TOp.ILAsm(([ I_ldelema(_ro, _isNativePtr, shape, _tyarg) ] ), _), (arr::idxs), [elemty] -> + match shape.Rank, idxs with | 1, [idx1] -> ConvExpr cenv env (mkCallArrayGet cenv.g m elemty arr idx1) | 2, [idx1; idx2] -> ConvExpr cenv env (mkCallArray2DGet cenv.g m elemty arr idx1 idx2) | 3, [idx1; idx2; idx3] -> ConvExpr cenv env (mkCallArray3DGet cenv.g m elemty arr idx1 idx2 idx3) @@ -698,150 +705,150 @@ and ConvLValueExprCore cenv env expr = | _ -> ConvExpr cenv env expr | _ -> ConvExpr cenv env expr | _ -> ConvExpr cenv env expr - + and ConvObjectModelCall cenv env m callInfo = EmitDebugInfoIfNecessary cenv env m (ConvObjectModelCallCore cenv env m callInfo) -and ConvObjectModelCallCore cenv env m (isPropGet,isPropSet,isNewObj,parentTyconR,methArgTypesR,methRetTypeR,methName,tyargs,numGenericArgs,callArgs) = +and ConvObjectModelCallCore cenv env m (isPropGet, isPropSet, isNewObj, parentTyconR, methArgTypesR, methRetTypeR, methName, tyargs, numGenericArgs, callArgs) = let tyargsR = ConvTypes cenv env m tyargs let callArgsR = ConvLValueArgs cenv env callArgs - if isPropGet || isPropSet then + if isPropGet || isPropSet then let propName = ChopPropertyName methName - if isPropGet then - QP.mkPropGet( (parentTyconR, propName,methRetTypeR,methArgTypesR),tyargsR, callArgsR) - else - let args,propTy = List.frontAndBack methArgTypesR - QP.mkPropSet( (parentTyconR, propName,propTy,args),tyargsR, callArgsR) - - elif isNewObj then - let ctorR : QuotationPickler.CtorData = - { ctorParent = parentTyconR - ctorArgTypes = methArgTypesR } + if isPropGet then + QP.mkPropGet( (parentTyconR, propName, methRetTypeR, methArgTypesR), tyargsR, callArgsR) + else + let args, propTy = List.frontAndBack methArgTypesR + QP.mkPropSet( (parentTyconR, propName, propTy, args), tyargsR, callArgsR) + + elif isNewObj then + let ctorR : QuotationPickler.CtorData = + { ctorParent = parentTyconR + ctorArgTypes = methArgTypesR } QP.mkCtorCall(ctorR, tyargsR, callArgsR) - else - let methR : QuotationPickler.MethodData = - { methParent = parentTyconR + else + let methR : QuotationPickler.MethodData = + { methParent = parentTyconR methArgTypes = methArgTypesR methRetType = methRetTypeR methName = methName numGenericArgs = numGenericArgs } QP.mkMethodCall(methR, tyargsR, callArgsR) -and ConvModuleValueApp cenv env m (vref:ValRef) tyargs (args: Expr list list) = +and ConvModuleValueApp cenv env m (vref: ValRef) tyargs (args: Expr list list) = EmitDebugInfoIfNecessary cenv env m (ConvModuleValueAppCore cenv env m vref tyargs args) -and ConvModuleValueAppCore cenv env m (vref:ValRef) tyargs (args: Expr list list) = - match vref.DeclaringEntity with +and ConvModuleValueAppCore cenv env m (vref: ValRef) tyargs (args: Expr list list) = + match vref.DeclaringEntity with | ParentNone -> failwith "ConvModuleValueApp" - | Parent(tcref) -> + | Parent(tcref) -> let isProperty = IsCompiledAsStaticProperty cenv.g vref.Deref - let tcrefR = ConvTyconRef cenv tcref m - let tyargsR = ConvTypes cenv env m tyargs + let tcrefR = ConvTyconRef cenv tcref m + let tyargsR = ConvTypes cenv env m tyargs let nm = vref.CompiledName let argsR = List.map (ConvExprs cenv env) args - QP.mkModuleValueApp(tcrefR,nm,isProperty,tyargsR,argsR) + QP.mkModuleValueApp(tcrefR, nm, isProperty, tyargsR, argsR) and ConvExprs cenv env args = - List.map (ConvExpr cenv env) args + List.map (ConvExpr cenv env) args -and ConvValRef holeOk cenv env m (vref:ValRef) tyargs = +and ConvValRef holeOk cenv env m (vref: ValRef) tyargs = EmitDebugInfoIfNecessary cenv env m (ConvValRefCore holeOk cenv env m vref tyargs) -and private ConvValRefCore holeOk cenv env m (vref:ValRef) tyargs = +and private ConvValRefCore holeOk cenv env m (vref: ValRef) tyargs = let v = vref.Deref - if env.isinstVals.ContainsVal v then - let (ty,e) = env.isinstVals.[v] + if env.isinstVals.ContainsVal v then + let (ty, e) = env.isinstVals.[v] ConvExpr cenv env (mkCallUnbox cenv.g m ty e) - elif env.substVals.ContainsVal v then + elif env.substVals.ContainsVal v then let e = env.substVals.[v] ConvExpr cenv env e - elif env.vs.ContainsVal v then - if not (List.isEmpty tyargs) then wfail(InternalError("ignoring generic application of local quoted variable",m)) + elif env.vs.ContainsVal v then + if not (List.isEmpty tyargs) then wfail(InternalError("ignoring generic application of local quoted variable", m)) QP.mkVar(env.vs.[v]) - elif v.BaseOrThisInfo = CtorThisVal && cenv.isReflectedDefinition = IsReflectedDefinition.Yes then + elif v.BaseOrThisInfo = CtorThisVal && cenv.isReflectedDefinition = IsReflectedDefinition.Yes then QP.mkThisVar(ConvType cenv env m v.Type) - else + else let vty = v.Type - match v.DeclaringEntity with - | ParentNone -> + match v.DeclaringEntity with + | ParentNone -> // References to local values are embedded by value - if not holeOk then wfail(Error(FSComp.SR.crefNoSetOfHole(),m)) - let idx = cenv.exprSplices.Count + if not holeOk then wfail(Error(FSComp.SR.crefNoSetOfHole(), m)) + let idx = cenv.exprSplices.Count cenv.exprSplices.Add((mkCallLiftValueWithName cenv.g m vty v.LogicalName (exprForValRef m vref), m)) - QP.mkHole(ConvType cenv env m vty,idx) - | Parent _ -> + QP.mkHole(ConvType cenv env m vty, idx) + | Parent _ -> ConvModuleValueApp cenv env m vref tyargs [] -and ConvUnionCaseRef cenv (ucref:UnionCaseRef) m = +and ConvUnionCaseRef cenv (ucref: UnionCaseRef) m = let ucgtypR = ConvTyconRef cenv ucref.TyconRef m - let nm = + let nm = if cenv.g.unionCaseRefEq ucref cenv.g.cons_ucref then "Cons" elif cenv.g.unionCaseRefEq ucref cenv.g.nil_ucref then "Empty" - else ucref.CaseName - (ucgtypR,nm) + else ucref.CaseName + (ucgtypR, nm) -and ConvRecdFieldRef cenv (rfref:RecdFieldRef) m = +and ConvRecdFieldRef cenv (rfref: RecdFieldRef) m = let typR = ConvTyconRef cenv rfref.TyconRef m - let nm = + let nm = if useGenuineField rfref.TyconRef.Deref rfref.RecdField then ComputeFieldName rfref.TyconRef.Deref rfref.RecdField - else + else rfref.FieldName - (typR,nm) + (typR, nm) -and ConvVal cenv env (v:Val) = +and ConvVal cenv env (v: Val) = let tyR = ConvType cenv env v.Range v.Type QP.freshVar (v.CompiledName, tyR, v.IsMutable) -and ConvTyparRef cenv env m (tp:Typar) = +and ConvTyparRef cenv env m (tp: Typar) = match env.tyvs.TryFind tp.Stamp with | Some x -> x - | None -> - match ResizeArray.tryFindIndex (fun (tp2,_m) -> typarEq tp tp2) cenv.typeSplices with + | None -> + match ResizeArray.tryFindIndex (fun (tp2, _m) -> typarEq tp tp2) cenv.typeSplices with | Some idx -> idx | None -> - let idx = cenv.typeSplices.Count + let idx = cenv.typeSplices.Count cenv.typeSplices.Add((tp, m)) idx -and FilterMeasureTyargs tys = - tys |> List.filter (fun ty -> match ty with TType_measure _ -> false | _ -> true) +and FilterMeasureTyargs tys = + tys |> List.filter (fun ty -> match ty with TType_measure _ -> false | _ -> true) and ConvType cenv env m ty = - match stripTyEqnsAndMeasureEqns cenv.g ty with - | TType_app(tcref,[tyarg]) when isArrayTyconRef cenv.g tcref -> - QP.mkArrayTy(rankOfArrayTyconRef cenv.g tcref,ConvType cenv env m tyarg) + match stripTyEqnsAndMeasureEqns cenv.g ty with + | TType_app(tcref, [tyarg]) when isArrayTyconRef cenv.g tcref -> + QP.mkArrayTy(rankOfArrayTyconRef cenv.g tcref, ConvType cenv env m tyarg) - | TType_ucase(UCRef(tcref,_),tyargs) // Note: we erase union case 'types' when converting to quotations - | TType_app(tcref,tyargs) -> + | TType_ucase(UCRef(tcref, _), tyargs) // Note: we erase union case 'types' when converting to quotations + | TType_app(tcref, tyargs) -> #if !NO_EXTENSIONTYPING - match TryElimErasableTyconRef cenv m tcref with + match TryElimErasableTyconRef cenv m tcref with | Some baseTy -> ConvType cenv env m baseTy - | _ -> + | _ -> #endif QP.mkILNamedTy(ConvTyconRef cenv tcref m, ConvTypes cenv env m tyargs) - | TType_fun(a,b) -> QP.mkFunTy(ConvType cenv env m a,ConvType cenv env m b) - | TType_tuple(tupInfo,l) -> ConvType cenv env m (mkCompiledTupleTy cenv.g (evalTupInfoIsStruct tupInfo) l) - | TType_anon(anonInfo,tinst) -> + | TType_fun(a, b) -> QP.mkFunTy(ConvType cenv env m a, ConvType cenv env m b) + | TType_tuple(tupInfo, l) -> ConvType cenv env m (mkCompiledTupleTy cenv.g (evalTupInfoIsStruct tupInfo) l) + | TType_anon(anonInfo, tinst) -> let tref = anonInfo.ILTypeRef let tinstR = ConvTypes cenv env m tinst QP.mkILNamedTy(ConvILTypeRefUnadjusted cenv m tref, tinstR) | TType_var(tp) -> QP.mkVarTy(ConvTyparRef cenv env m tp) - | TType_forall(_spec,_ty) -> wfail(Error(FSComp.SR.crefNoInnerGenericsInQuotations(),m)) - | _ -> wfail(Error (FSComp.SR.crefQuotationsCantContainThisType(),m)) + | TType_forall(_spec, _ty) -> wfail(Error(FSComp.SR.crefNoInnerGenericsInQuotations(), m)) + | _ -> wfail(Error (FSComp.SR.crefQuotationsCantContainThisType(), m)) and ConvTypes cenv env m tys = List.map (ConvType cenv env m) (FilterMeasureTyargs tys) and ConvConst cenv env m c ty = - match TryEliminateDesugaredConstants cenv.g m c with + match TryEliminateDesugaredConstants cenv.g m c with | Some e -> ConvExpr cenv env e | None -> let tyR = ConvType cenv env m ty - match c with + match c with | Const.Bool i -> QP.mkBool (i, tyR) | Const.SByte i -> QP.mkSByte (i, tyR) | Const.Byte i -> QP.mkByte (i, tyR) @@ -856,191 +863,191 @@ and ConvConst cenv env m c ty = | Const.String s -> QP.mkString (s, tyR) | Const.Char c -> QP.mkChar (c, tyR) | Const.Unit -> QP.mkUnit() - | Const.Zero -> - if isRefTy cenv.g ty then + | Const.Zero -> + if isRefTy cenv.g ty then QP.mkNull tyR else QP.mkDefaultValue tyR - | _ -> + | _ -> wfail(Error (FSComp.SR.crefQuotationsCantContainThisConstant(), m)) -and ConvDecisionTree cenv env tgs typR x = - match x with - | TDSwitch(e1,csl,dfltOpt,m) -> - let acc = - match dfltOpt with - | Some d -> ConvDecisionTree cenv env tgs typR d +and ConvDecisionTree cenv env tgs typR x = + match x with + | TDSwitch(e1, csl, dfltOpt, m) -> + let acc = + match dfltOpt with + | Some d -> ConvDecisionTree cenv env tgs typR d | None -> wfail(Error(FSComp.SR.crefQuotationsCantContainThisPatternMatch(), m)) - let converted = - (csl,acc) ||> List.foldBack (fun (TCase(discrim,dtree)) acc -> + let converted = + (csl, acc) ||> List.foldBack (fun (TCase(discrim, dtree)) acc -> - match discrim with - | DecisionTreeTest.UnionCase (ucref, tyargs) -> + match discrim with + | DecisionTreeTest.UnionCase (ucref, tyargs) -> let e1R = ConvLValueExpr cenv env e1 let ucR = ConvUnionCaseRef cenv ucref m let tyargsR = ConvTypes cenv env m tyargs QP.mkCond (QP.mkUnionCaseTagTest (ucR, tyargsR, e1R), ConvDecisionTree cenv env tgs typR dtree, acc) - | DecisionTreeTest.Const (Const.Bool true) -> + | DecisionTreeTest.Const (Const.Bool true) -> let e1R = ConvExpr cenv env e1 QP.mkCond (e1R, ConvDecisionTree cenv env tgs typR dtree, acc) - | DecisionTreeTest.Const (Const.Bool false) -> + | DecisionTreeTest.Const (Const.Bool false) -> let e1R = ConvExpr cenv env e1 // Note, reverse the branches QP.mkCond (e1R, acc, ConvDecisionTree cenv env tgs typR dtree) - | DecisionTreeTest.Const c -> + | DecisionTreeTest.Const c -> let ty = tyOfExpr cenv.g e1 let eq = mkCallEqualsOperator cenv.g m ty e1 (Expr.Const (c, m, ty)) - let eqR = ConvExpr cenv env eq + let eqR = ConvExpr cenv env eq QP.mkCond (eqR, ConvDecisionTree cenv env tgs typR dtree, acc) - | DecisionTreeTest.IsNull -> + | DecisionTreeTest.IsNull -> // Decompile cached isinst tests - match e1 with - | Expr.Val(vref,_,_) when env.isinstVals.ContainsVal vref.Deref -> - let (ty,e) = env.isinstVals.[vref.Deref] + match e1 with + | Expr.Val(vref, _, _) when env.isinstVals.ContainsVal vref.Deref -> + let (ty, e) = env.isinstVals.[vref.Deref] let tyR = ConvType cenv env m ty let eR = ConvExpr cenv env e // note: reverse the branches - a null test is a failure of an isinst test - QP.mkCond (QP.mkTypeTest (tyR,eR), acc, ConvDecisionTree cenv env tgs typR dtree) - | _ -> + QP.mkCond (QP.mkTypeTest (tyR, eR), acc, ConvDecisionTree cenv env tgs typR dtree) + | _ -> let ty = tyOfExpr cenv.g e1 let eq = mkCallEqualsOperator cenv.g m ty e1 (Expr.Const (Const.Zero, m, ty)) - let eqR = ConvExpr cenv env eq + let eqR = ConvExpr cenv env eq QP.mkCond (eqR, ConvDecisionTree cenv env tgs typR dtree, acc) - | DecisionTreeTest.IsInst (_srcty, tgty) -> + | DecisionTreeTest.IsInst (_srcty, tgty) -> let e1R = ConvExpr cenv env e1 QP.mkCond (QP.mkTypeTest (ConvType cenv env m tgty, e1R), ConvDecisionTree cenv env tgs typR dtree, acc) - | DecisionTreeTest.ActivePatternCase _ -> wfail(InternalError( "DecisionTreeTest.ActivePatternCase test in quoted expression",m)) + | DecisionTreeTest.ActivePatternCase _ -> wfail(InternalError( "DecisionTreeTest.ActivePatternCase test in quoted expression", m)) | DecisionTreeTest.ArrayLength _ -> wfail(Error(FSComp.SR.crefQuotationsCantContainArrayPatternMatching(), m)) ) EmitDebugInfoIfNecessary cenv env m converted - | TDSuccess (args,n) -> - let (TTarget(vars,rhs,_)) = tgs.[n] + | TDSuccess (args, n) -> + let (TTarget(vars, rhs, _)) = tgs.[n] // TAST stores pattern bindings in reverse order for some reason // Reverse them here to give a good presentation to the user let args = List.rev args let vars = List.rev vars - - let varsR = vars |> List.map (ConvVal cenv env) + + let varsR = vars |> List.map (ConvVal cenv env) let targetR = ConvExpr cenv (BindVals env vars) rhs - (varsR,args,targetR) |||> List.foldBack2 (fun vR arg acc -> QP.mkLet((vR,ConvExpr cenv env arg), acc) ) - - | TDBind(bind,rest) -> + (varsR, args, targetR) |||> List.foldBack2 (fun vR arg acc -> QP.mkLet((vR, ConvExpr cenv env arg), acc) ) + + | TDBind(bind, rest) -> // The binding may be a compiler-generated binding that gets removed in the quotation presentation - match ConvLetBind cenv env bind with - | None, env -> ConvDecisionTree cenv env tgs typR rest - | Some(bindR),env -> QP.mkLet(bindR,ConvDecisionTree cenv env tgs typR rest) + match ConvLetBind cenv env bind with + | None, env -> ConvDecisionTree cenv env tgs typR rest + | Some(bindR), env -> QP.mkLet(bindR, ConvDecisionTree cenv env tgs typR rest) // Check if this is an provider-generated assembly that will be statically linked -and IsILTypeRefStaticLinkLocal cenv m (tr:ILTypeRef) = +and IsILTypeRefStaticLinkLocal cenv m (tr: ILTypeRef) = ignore cenv; ignore m - match tr.Scope with + match tr.Scope with #if !NO_EXTENSIONTYPING - | ILScopeRef.Assembly aref + | ILScopeRef.Assembly aref when not cenv.g.isInteractive && aref.Name <> cenv.g.ilg.primaryAssemblyName && // optimization to avoid this check in the common case // Explanation: This represents an unchecked invariant in the hosted compiler: that any operations // which import types (and resolve assemblies from the tcImports tables) happen on the compilation thread. - let ctok = AssumeCompilationThreadWithoutEvidence() + let ctok = AssumeCompilationThreadWithoutEvidence() - (match cenv.amap.assemblyLoader.FindCcuFromAssemblyRef (ctok, m,aref) with + (match cenv.amap.assemblyLoader.FindCcuFromAssemblyRef (ctok, m, aref) with | ResolvedCcu ccu -> ccu.IsProviderGenerated - | UnresolvedCcu _ -> false) + | UnresolvedCcu _ -> false) -> true #endif | _ -> false // Adjust for static linking information, then convert -and ConvILTypeRefUnadjusted cenv m (tr:ILTypeRef) = - let trefAdjusted = - if IsILTypeRefStaticLinkLocal cenv m tr then - ILTypeRef.Create(ILScopeRef.Local, tr.Enclosing, tr.Name) +and ConvILTypeRefUnadjusted cenv m (tr: ILTypeRef) = + let trefAdjusted = + if IsILTypeRefStaticLinkLocal cenv m tr then + ILTypeRef.Create(ILScopeRef.Local, tr.Enclosing, tr.Name) else tr ConvILTypeRef cenv trefAdjusted - -and ConvILTypeRef cenv (tr:ILTypeRef) = + +and ConvILTypeRef cenv (tr: ILTypeRef) = match cenv.quotationFormat with | QuotationSerializationFormat.FSharp_40_Plus -> - let idx = + let idx = match cenv.referencedTypeDefsTable.TryGetValue tr with | true, idx -> idx - | _ -> + | _ -> let idx = cenv.referencedTypeDefs.Count cenv.referencedTypeDefs.Add tr cenv.referencedTypeDefsTable.[tr] <- idx idx QP.Idx idx - + | QuotationSerializationFormat.FSharp_20_Plus -> - let assemblyRef = - match tr.Scope with + let assemblyRef = + match tr.Scope with | ILScopeRef.Local -> "." - | _ -> tr.Scope.QualifiedName + | _ -> tr.Scope.QualifiedName QP.Named(tr.BasicQualifiedName, assemblyRef) - + and ConvVoidType cenv m = QP.mkILNamedTy(ConvTyconRef cenv cenv.g.system_Void_tcref m, []) -and ConvILType cenv env m ty = - match ty with +and ConvILType cenv env m ty = + match ty with | ILType.Boxed tspec | ILType.Value tspec -> QP.mkILNamedTy(ConvILTypeRefUnadjusted cenv m tspec.TypeRef, List.map (ConvILType cenv env m) tspec.GenericArgs) - | ILType.Array (shape,ty) -> QP.mkArrayTy(shape.Rank,ConvILType cenv env m ty) + | ILType.Array (shape, ty) -> QP.mkArrayTy(shape.Rank, ConvILType cenv env m ty) | ILType.TypeVar idx -> QP.mkVarTy(int idx) | ILType.Void -> ConvVoidType cenv m - | ILType.Ptr _ - | ILType.Byref _ - | ILType.Modified _ + | ILType.Ptr _ + | ILType.Byref _ + | ILType.Modified _ | ILType.FunctionPointer _ -> wfail(Error(FSComp.SR.crefQuotationsCantContainThisType(), m)) - + #if !NO_EXTENSIONTYPING -and TryElimErasableTyconRef cenv m (tcref:TyconRef) = - match tcref.TypeReprInfo with +and TryElimErasableTyconRef cenv m (tcref: TyconRef) = + match tcref.TypeReprInfo with // Get the base type | TProvidedTypeExtensionPoint info when info.IsErased -> Some (info.BaseTypeForErased (m, cenv.g.obj_ty)) | _ -> None #endif -and ConvTyconRef cenv (tcref:TyconRef) m = +and ConvTyconRef cenv (tcref: TyconRef) m = #if !NO_EXTENSIONTYPING - match TryElimErasableTyconRef cenv m tcref with + match TryElimErasableTyconRef cenv m tcref with | Some baseTy -> ConvTyconRef cenv (tcrefOfAppTy cenv.g baseTy) m - | None -> - match tcref.TypeReprInfo with - | TProvidedTypeExtensionPoint info when not cenv.g.isInteractive && not info.IsErased -> + | None -> + match tcref.TypeReprInfo with + | TProvidedTypeExtensionPoint info when not cenv.g.isInteractive && not info.IsErased -> // Note, generated types are (currently) non-generic let tref = ExtensionTyping.GetILTypeRefOfProvidedType (info.ProvidedType, m) ConvILTypeRefUnadjusted cenv m tref - | _ -> + | _ -> #endif let repr = tcref.CompiledRepresentation - match repr with - | CompiledTypeRepr.ILAsmOpen asm -> - match asm with - | ILType.Boxed tspec | ILType.Value tspec -> + match repr with + | CompiledTypeRepr.ILAsmOpen asm -> + match asm with + | ILType.Boxed tspec | ILType.Value tspec -> ConvILTypeRef cenv tspec.TypeRef - | _ -> - wfail(Error(FSComp.SR.crefQuotationsCantContainThisType(),m)) - | CompiledTypeRepr.ILAsmNamed (tref,_boxity,_) -> + | _ -> + wfail(Error(FSComp.SR.crefQuotationsCantContainThisType(), m)) + | CompiledTypeRepr.ILAsmNamed (tref, _boxity, _) -> ConvILTypeRefUnadjusted cenv m tref and ConvReturnType cenv envinner m retTy = - match retTy with + match retTy with | None -> ConvVoidType cenv m | Some ty -> ConvType cenv envinner m ty -let ConvExprPublic cenv env e = - let astExpr = +let ConvExprPublic cenv env e = + let astExpr = let astExpr = ConvExpr cenv env e // always emit debug info for the top level expression cenv.emitDebugInfoInQuotations <- true @@ -1049,49 +1056,49 @@ let ConvExprPublic cenv env e = astExpr -let ConvMethodBase cenv env (methName, v:Val) = - let m = v.Range - let parentTyconR = ConvTyconRef cenv v.TopValDeclaringEntity m +let ConvMethodBase cenv env (methName, v: Val) = + let m = v.Range + let parentTyconR = ConvTyconRef cenv v.TopValDeclaringEntity m - match v.MemberInfo with - | Some vspr when not v.IsExtensionMember -> + match v.MemberInfo with + | Some vspr when not v.IsExtensionMember -> let vref = mkLocalValRef v - let tps,argInfos,retTy,_ = GetTypeOfMemberInMemberForm cenv.g vref + let tps, argInfos, retTy, _ = GetTypeOfMemberInMemberForm cenv.g vref let numEnclTypeArgs = vref.MemberApparentEntity.TyparsNoRange.Length - let argTys = argInfos |> List.concat |> List.map fst + let argTys = argInfos |> List.concat |> List.map fst let isNewObj = (vspr.MemberFlags.MemberKind = MemberKind.Constructor) - // The signature types are w.r.t. to the formal context - let envinner = BindFormalTypars env tps - let methArgTypesR = ConvTypes cenv envinner m argTys + // The signature types are w.r.t. to the formal context + let envinner = BindFormalTypars env tps + let methArgTypesR = ConvTypes cenv envinner m argTys let methRetTypeR = ConvReturnType cenv envinner m retTy - let numGenericArgs = tps.Length-numEnclTypeArgs + let numGenericArgs = tps.Length-numEnclTypeArgs - if isNewObj then - QP.MethodBaseData.Ctor - { ctorParent = parentTyconR + if isNewObj then + QP.MethodBaseData.Ctor + { ctorParent = parentTyconR ctorArgTypes = methArgTypesR } - else - QP.MethodBaseData.Method - { methParent = parentTyconR + else + QP.MethodBaseData.Method + { methParent = parentTyconR methArgTypes = methArgTypesR methRetType = methRetTypeR methName = methName numGenericArgs=numGenericArgs } - | _ when v.IsExtensionMember -> + | _ when v.IsExtensionMember -> - let tps,argInfos,retTy,_ = GetTopValTypeInCompiledForm cenv.g v.ValReprInfo.Value v.Type v.Range - let argTys = argInfos |> List.concat |> List.map fst - let envinner = BindFormalTypars env tps - let methArgTypesR = ConvTypes cenv envinner m argTys + let tps, argInfos, retTy, _ = GetTopValTypeInCompiledForm cenv.g v.ValReprInfo.Value v.Type v.Range + let argTys = argInfos |> List.concat |> List.map fst + let envinner = BindFormalTypars env tps + let methArgTypesR = ConvTypes cenv envinner m argTys let methRetTypeR = ConvReturnType cenv envinner m retTy let numGenericArgs = tps.Length - QP.MethodBaseData.Method + QP.MethodBaseData.Method { methParent = parentTyconR methArgTypes = methArgTypesR methRetType = methRetTypeR diff --git a/src/fcs-fable/src/fsharp/SignatureConformance.fs b/src/fcs-fable/src/fsharp/SignatureConformance.fs index a9db8a883a..6ba6dad410 100644 --- a/src/fcs-fable/src/fsharp/SignatureConformance.fs +++ b/src/fcs-fable/src/fsharp/SignatureConformance.fs @@ -37,8 +37,8 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = // Used when checking attributes. let sigToImplRemap = let remap = Remap.Empty - let remap = (remapInfo.RepackagedEntities,remap) ||> List.foldBack (fun (implTcref ,signTcref) acc -> addTyconRefRemap signTcref implTcref acc) - let remap = (remapInfo.RepackagedVals ,remap) ||> List.foldBack (fun (implValRef,signValRef) acc -> addValRemap signValRef.Deref implValRef.Deref acc) + let remap = (remapInfo.RepackagedEntities, remap) ||> List.foldBack (fun (implTcref, signTcref) acc -> addTyconRefRemap signTcref implTcref acc) + let remap = (remapInfo.RepackagedVals, remap) ||> List.foldBack (fun (implValRef, signValRef) acc -> addValRemap signValRef.Deref implValRef.Deref acc) remap // For all attributable elements (types, modules, exceptions, record fields, unions, parameters, generic type parameters) @@ -49,7 +49,7 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = // b. If an attribute is found in ASig that has the same attribute type, then a warning is given and the attribute in the implementation is ignored // c. Otherwise, the attribute in the implementation is kept // (c) The attributes appearing in the compiled element are the compiled forms of the attributes from the signature and the kept attributes from the implementation - let checkAttribs _aenv (implAttribs:Attribs) (sigAttribs:Attribs) fixup = + let checkAttribs _aenv (implAttribs: Attribs) (sigAttribs: Attribs) fixup = // Remap the signature attributes to make them look as if they were declared in // the implementation. This allows us to compare them and propagate them to the implementation @@ -57,25 +57,25 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = let sigAttribs = sigAttribs |> List.map (remapAttrib g sigToImplRemap) // Helper to check for equality of evaluated attribute expressions - let attribExprEq (AttribExpr(_,e1)) (AttribExpr(_,e2)) = EvaledAttribExprEquality g e1 e2 + let attribExprEq (AttribExpr(_, e1)) (AttribExpr(_, e2)) = EvaledAttribExprEquality g e1 e2 // Helper to check for equality of evaluated named attribute arguments - let attribNamedArgEq (AttribNamedArg(nm1,ty1,isProp1,e1)) (AttribNamedArg(nm2,ty2,isProp2,e2)) = + let attribNamedArgEq (AttribNamedArg(nm1, ty1, isProp1, e1)) (AttribNamedArg(nm2, ty2, isProp2, e2)) = (nm1 = nm2) && typeEquiv g ty1 ty2 && (isProp1 = isProp2) && attribExprEq e1 e2 let attribsEq attrib1 attrib2 = - let (Attrib(implTcref,_,implArgs,implNamedArgs,_,_,_implRange)) = attrib1 - let (Attrib(signTcref,_,signArgs,signNamedArgs,_,_,_signRange)) = attrib2 + let (Attrib(implTcref, _, implArgs, implNamedArgs, _, _, _implRange)) = attrib1 + let (Attrib(signTcref, _, signArgs, signNamedArgs, _, _, _signRange)) = attrib2 tyconRefEq g signTcref implTcref && - (implArgs,signArgs) ||> List.lengthsEqAndForall2 attribExprEq && + (implArgs, signArgs) ||> List.lengthsEqAndForall2 attribExprEq && (implNamedArgs, signNamedArgs) ||> List.lengthsEqAndForall2 attribNamedArgEq let attribsHaveSameTycon attrib1 attrib2 = - let (Attrib(implTcref,_,_,_,_,_,_)) = attrib1 - let (Attrib(signTcref,_,_,_,_,_,_)) = attrib2 + let (Attrib(implTcref, _, _, _, _, _, _)) = attrib1 + let (Attrib(signTcref, _, _, _, _, _, _)) = attrib2 tyconRefEq g signTcref implTcref // For each implementation attribute, only keep if it is not mentioned in the signature. @@ -96,7 +96,7 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = let existsSimilarAttrib = sigAttribs |> List.exists (attribsHaveSameTycon implAttrib) if existsSimilarAttrib then - let (Attrib(implTcref,_,_,_,_,_,implRange)) = implAttrib + let (Attrib(implTcref, _, _, _, _, _, implRange)) = implAttrib warning(Error(FSComp.SR.tcAttribArgsDiffer(implTcref.DisplayName), implRange)) check keptImplAttribsRev remainingImplAttribs sigAttribs else @@ -107,13 +107,13 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = fixup (sigAttribs @ keptImplAttribs) true - let rec checkTypars m (aenv: TypeEquivEnv) (implTypars:Typars) (sigTypars:Typars) = + let rec checkTypars m (aenv: TypeEquivEnv) (implTypars: Typars) (sigTypars: Typars) = if implTypars.Length <> sigTypars.Length then - errorR (Error(FSComp.SR.typrelSigImplNotCompatibleParamCountsDiffer(),m)) + errorR (Error(FSComp.SR.typrelSigImplNotCompatibleParamCountsDiffer(), m)) false else let aenv = aenv.BindEquivTypars implTypars sigTypars - (implTypars,sigTypars) ||> List.forall2 (fun implTypar sigTypar -> + (implTypars, sigTypars) ||> List.forall2 (fun implTypar sigTypar -> let m = sigTypar.Range if implTypar.StaticReq <> sigTypar.StaticReq then errorR (Error(FSComp.SR.typrelSigImplNotCompatibleCompileTimeRequirementsDiffer(), m)) @@ -128,28 +128,28 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = implTypar.Constraints |> List.forall (fun implTyparCx -> match implTyparCx with // defaults can be dropped in the signature - | TyparConstraint.DefaultsTo(_,_acty,_) -> true + | TyparConstraint.DefaultsTo(_, _acty, _) -> true | _ -> if not (List.exists (typarConstraintsAEquiv g aenv implTyparCx) sigTypar.Constraints) - then (errorR(Error(FSComp.SR.typrelSigImplNotCompatibleConstraintsDiffer(sigTypar.Name, Layout.showL(NicePrint.layoutTyparConstraint denv (implTypar,implTyparCx))),m)); false) + then (errorR(Error(FSComp.SR.typrelSigImplNotCompatibleConstraintsDiffer(sigTypar.Name, Layout.showL(NicePrint.layoutTyparConstraint denv (implTypar, implTyparCx))), m)); false) else true) && // Check the constraints in the signature are present in the implementation sigTypar.Constraints |> List.forall (fun sigTyparCx -> match sigTyparCx with // defaults can be present in the signature and not in the implementation because they are erased - | TyparConstraint.DefaultsTo(_,_acty,_) -> true + | TyparConstraint.DefaultsTo(_, _acty, _) -> true // 'comparison' and 'equality' constraints can be present in the signature and not in the implementation because they are erased | TyparConstraint.SupportsComparison _ -> true | TyparConstraint.SupportsEquality _ -> true | _ -> if not (List.exists (fun implTyparCx -> typarConstraintsAEquiv g aenv implTyparCx sigTyparCx) implTypar.Constraints) then - (errorR(Error(FSComp.SR.typrelSigImplNotCompatibleConstraintsDifferRemove(sigTypar.Name, Layout.showL(NicePrint.layoutTyparConstraint denv (sigTypar,sigTyparCx))),m)); false) + (errorR(Error(FSComp.SR.typrelSigImplNotCompatibleConstraintsDifferRemove(sigTypar.Name, Layout.showL(NicePrint.layoutTyparConstraint denv (sigTypar, sigTyparCx))), m)); false) else true) && (not checkingSig || checkAttribs aenv implTypar.Attribs sigTypar.Attribs (fun attribs -> implTypar.SetAttribs attribs))) - and checkTypeDef (aenv: TypeEquivEnv) (implTycon:Tycon) (sigTycon:Tycon) = + and checkTypeDef (aenv: TypeEquivEnv) (implTycon: Tycon) (sigTycon: Tycon) = let m = implTycon.Range // Propagate defn location information from implementation to signature . @@ -157,32 +157,32 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = implTycon.SetOtherRange (sigTycon.Range, false) if implTycon.LogicalName <> sigTycon.LogicalName then - errorR (Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleNamesDiffer(implTycon.TypeOrMeasureKind.ToString(),sigTycon.LogicalName,implTycon.LogicalName),m)) + errorR (Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleNamesDiffer(implTycon.TypeOrMeasureKind.ToString(), sigTycon.LogicalName, implTycon.LogicalName), m)) false else if implTycon.CompiledName <> sigTycon.CompiledName then - errorR (Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleNamesDiffer(implTycon.TypeOrMeasureKind.ToString(),sigTycon.CompiledName,implTycon.CompiledName),m)) + errorR (Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleNamesDiffer(implTycon.TypeOrMeasureKind.ToString(), sigTycon.CompiledName, implTycon.CompiledName), m)) false else - checkExnInfo (fun f -> ExnconstrNotContained(denv,implTycon,sigTycon,f)) aenv implTycon.ExceptionInfo sigTycon.ExceptionInfo && + checkExnInfo (fun f -> ExnconstrNotContained(denv, implTycon, sigTycon, f)) aenv implTycon.ExceptionInfo sigTycon.ExceptionInfo && let implTypars = implTycon.Typars m let sigTypars = sigTycon.Typars m if implTypars.Length <> sigTypars.Length then - errorR (Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleParameterCountsDiffer(implTycon.TypeOrMeasureKind.ToString(),implTycon.DisplayName),m)) + errorR (Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleParameterCountsDiffer(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName), m)) false elif isLessAccessible implTycon.Accessibility sigTycon.Accessibility then - errorR(Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleAccessibilityDiffer(implTycon.TypeOrMeasureKind.ToString(),implTycon.DisplayName),m)) + errorR(Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleAccessibilityDiffer(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName), m)) false else let aenv = aenv.BindEquivTypars implTypars sigTypars let aintfs = implTycon.ImmediateInterfaceTypesOfFSharpTycon let fintfs = sigTycon.ImmediateInterfaceTypesOfFSharpTycon - let aintfsUser = implTycon.TypeContents.tcaug_interfaces |> List.filter (fun (_,compgen,_) -> not compgen) |> List.map p13 + let aintfsUser = implTycon.TypeContents.tcaug_interfaces |> List.filter (fun (_, compgen, _) -> not compgen) |> List.map p13 let flatten tys = tys |> List.collect (AllSuperTypesOfType g amap m AllowMultiIntfInstantiations.Yes) @@ -194,55 +194,55 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = let unimpl = ListSet.subtract (fun fity aity -> typeAEquiv g aenv aity fity) fintfs aintfs (unimpl |> List.forall (fun ity -> - let errorMessage = FSComp.SR.DefinitionsInSigAndImplNotCompatibleMissingInterface(implTycon.TypeOrMeasureKind.ToString(),implTycon.DisplayName, NicePrint.minimalStringOfType denv ity) - errorR (Error(errorMessage,m)); false)) && + let errorMessage = FSComp.SR.DefinitionsInSigAndImplNotCompatibleMissingInterface(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName, NicePrint.minimalStringOfType denv ity) + errorR (Error(errorMessage, m)); false)) && let aintfsUser = flatten aintfsUser let hidden = ListSet.subtract (typeAEquiv g aenv) aintfsUser fintfs - let continueChecks,warningOrError = if implTycon.IsFSharpInterfaceTycon then false,errorR else true,warning - (hidden |> List.forall (fun ity -> warningOrError (InterfaceNotRevealed(denv,ity,implTycon.Range)); continueChecks)) && + let continueChecks, warningOrError = if implTycon.IsFSharpInterfaceTycon then false, errorR else true, warning + (hidden |> List.forall (fun ity -> warningOrError (InterfaceNotRevealed(denv, ity, implTycon.Range)); continueChecks)) && let aNull = IsUnionTypeWithNullAsTrueValue g implTycon let fNull = IsUnionTypeWithNullAsTrueValue g sigTycon if aNull && not fNull then - errorR(Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleImplementationSaysNull(implTycon.TypeOrMeasureKind.ToString(),implTycon.DisplayName),m)) + errorR(Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleImplementationSaysNull(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName), m)) false elif fNull && not aNull then - errorR(Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleSignatureSaysNull(implTycon.TypeOrMeasureKind.ToString(),implTycon.DisplayName),m)) + errorR(Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleSignatureSaysNull(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName), m)) false else let aNull2 = TypeNullIsExtraValue g m (generalizedTyconRef (mkLocalTyconRef implTycon)) let fNull2 = TypeNullIsExtraValue g m (generalizedTyconRef (mkLocalTyconRef implTycon)) if aNull2 && not fNull2 then - errorR(Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleImplementationSaysNull2(implTycon.TypeOrMeasureKind.ToString(),implTycon.DisplayName),m)) + errorR(Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleImplementationSaysNull2(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName), m)) false elif fNull2 && not aNull2 then - errorR(Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleSignatureSaysNull2(implTycon.TypeOrMeasureKind.ToString(),implTycon.DisplayName),m)) + errorR(Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleSignatureSaysNull2(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName), m)) false else let aSealed = isSealedTy g (generalizedTyconRef (mkLocalTyconRef implTycon)) let fSealed = isSealedTy g (generalizedTyconRef (mkLocalTyconRef sigTycon)) if aSealed && not fSealed then - errorR(Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleImplementationSealed(implTycon.TypeOrMeasureKind.ToString(),implTycon.DisplayName),m)) + errorR(Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleImplementationSealed(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName), m)) false elif not aSealed && fSealed then - errorR(Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleImplementationIsNotSealed(implTycon.TypeOrMeasureKind.ToString(),implTycon.DisplayName),m)) + errorR(Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleImplementationIsNotSealed(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName), m)) false else let aPartial = isAbstractTycon implTycon let fPartial = isAbstractTycon sigTycon if aPartial && not fPartial then - errorR(Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleImplementationIsAbstract(implTycon.TypeOrMeasureKind.ToString(),implTycon.DisplayName),m)) + errorR(Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleImplementationIsAbstract(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName), m)) false elif not aPartial && fPartial then - errorR(Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleSignatureIsAbstract(implTycon.TypeOrMeasureKind.ToString(),implTycon.DisplayName),m)) + errorR(Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleSignatureIsAbstract(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName), m)) false elif not (typeAEquiv g aenv (superOfTycon g implTycon) (superOfTycon g sigTycon)) then - errorR (Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleTypesHaveDifferentBaseTypes(implTycon.TypeOrMeasureKind.ToString(),implTycon.DisplayName),m)) + errorR (Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleTypesHaveDifferentBaseTypes(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName), m)) false else @@ -255,9 +255,9 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = and checkValInfo aenv err (implVal : Val) (sigVal : Val) = let id = implVal.Id match implVal.ValReprInfo, sigVal.ValReprInfo with - | _,None -> true + | _, None -> true | None, Some _ -> err(FSComp.SR.ValueNotContainedMutabilityArityNotInferred) - | Some (ValReprInfo (implTyparNames,implArgInfos,implRetInfo) as implValInfo), Some (ValReprInfo (sigTyparNames,sigArgInfos,sigRetInfo) as sigValInfo) -> + | Some (ValReprInfo (implTyparNames, implArgInfos, implRetInfo) as implValInfo), Some (ValReprInfo (sigTyparNames, sigArgInfos, sigRetInfo) as sigValInfo) -> let ntps = implTyparNames.Length let mtps = sigTyparNames.Length let nSigArgInfos = sigArgInfos.Length @@ -277,11 +277,11 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = // This ensures that the compiled form of the value matches the signature rather than // the implementation. This also propagates argument names from signature to implementation let res = - (implArgInfos,sigArgInfos) ||> List.forall2 (List.forall2 (fun implArgInfo sigArgInfo -> + (implArgInfos, sigArgInfos) ||> List.forall2 (List.forall2 (fun implArgInfo sigArgInfo -> checkAttribs aenv implArgInfo.Attribs sigArgInfo.Attribs (fun attribs -> match implArgInfo.Name, sigArgInfo.Name with | Some iname, Some sname when sname.idText <> iname.idText -> - warning(Error (FSComp.SR.ArgumentsInSigAndImplMismatch(sname.idText, iname.idText),iname.idRange)) + warning(Error (FSComp.SR.ArgumentsInSigAndImplMismatch(sname.idText, iname.idText), iname.idRange)) | _ -> () implArgInfo.Name <- sigArgInfo.Name @@ -291,16 +291,16 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = implRetInfo.Name <- sigRetInfo.Name implRetInfo.Attribs <- attribs) - implVal.SetValReprInfo (Some (ValReprInfo (sigTyparNames,implArgInfos,implRetInfo))) + implVal.SetValReprInfo (Some (ValReprInfo (sigTyparNames, implArgInfos, implRetInfo))) res - and checkVal implModRef (aenv:TypeEquivEnv) (implVal:Val) (sigVal:Val) = + and checkVal implModRef (aenv: TypeEquivEnv) (implVal: Val) (sigVal: Val) = // Propagate defn location information from implementation to signature . sigVal.SetOtherRange (implVal.Range, true) implVal.SetOtherRange (sigVal.Range, false) - let mk_err denv f = ValueNotContained(denv,implModRef,implVal,sigVal,f) + let mk_err denv f = ValueNotContained(denv, implModRef, implVal, sigVal, f) let err denv f = errorR(mk_err denv f); false let m = implVal.Range if implVal.IsMutable <> sigVal.IsMutable then (err denv FSComp.SR.ValueNotContainedMutabilityAttributesDiffer) @@ -312,20 +312,20 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = elif implVal.LiteralValue <> sigVal.LiteralValue then (err denv FSComp.SR.ValueNotContainedMutabilityLiteralConstantValuesDiffer) elif implVal.IsTypeFunction <> sigVal.IsTypeFunction then (err denv FSComp.SR.ValueNotContainedMutabilityOneIsTypeFunction) else - let implTypars,atau = implVal.TypeScheme - let sigTypars,ftau = sigVal.TypeScheme + let implTypars, atau = implVal.TypeScheme + let sigTypars, ftau = sigVal.TypeScheme if implTypars.Length <> sigTypars.Length then (err {denv with showTyparBinding=true} FSComp.SR.ValueNotContainedMutabilityParameterCountsDiffer) else let aenv = aenv.BindEquivTypars implTypars sigTypars checkTypars m aenv implTypars sigTypars && if not (typeAEquiv g aenv atau ftau) then err denv (FSComp.SR.ValueNotContainedMutabilityTypesDiffer) elif not (checkValInfo aenv (err denv) implVal sigVal) then false elif not (implVal.IsExtensionMember = sigVal.IsExtensionMember) then err denv (FSComp.SR.ValueNotContainedMutabilityExtensionsDiffer) - elif not (checkMemberDatasConform (err denv) (implVal.Attribs, implVal,implVal.MemberInfo) (sigVal.Attribs,sigVal,sigVal.MemberInfo)) then false + elif not (checkMemberDatasConform (err denv) (implVal.Attribs, implVal, implVal.MemberInfo) (sigVal.Attribs, sigVal, sigVal.MemberInfo)) then false else checkAttribs aenv implVal.Attribs sigVal.Attribs (fun attribs -> implVal.SetAttribs attribs) and checkExnInfo err aenv implTypeRepr sigTypeRepr = - match implTypeRepr,sigTypeRepr with + match implTypeRepr, sigTypeRepr with | TExnAsmRepr _, TExnFresh _ -> (errorR (err FSComp.SR.ExceptionDefsNotCompatibleHiddenBySignature); false) | TExnAsmRepr tcr1, TExnAsmRepr tcr2 -> @@ -337,12 +337,12 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = (errorR (err FSComp.SR.ExceptionDefsNotCompatibleSignaturesDiffer); false) else true | TExnFresh r1, TExnFresh r2-> checkRecordFieldsForExn g denv err aenv r1 r2 - | TExnNone,TExnNone -> true + | TExnNone, TExnNone -> true | _ -> (errorR (err FSComp.SR.ExceptionDefsNotCompatibleExceptionDeclarationsDiffer); false) and checkUnionCase aenv implUnionCase sigUnionCase = - let err f = errorR(ConstrNotContained(denv,implUnionCase,sigUnionCase,f));false + let err f = errorR(ConstrNotContained(denv, implUnionCase, sigUnionCase, f));false sigUnionCase.OtherRangeOpt <- Some (implUnionCase.Range, true) implUnionCase.OtherRangeOpt <- Some (sigUnionCase.Range, false) if implUnionCase.Id.idText <> sigUnionCase.Id.idText then err FSComp.SR.ModuleContainsConstructorButNamesDiffer @@ -352,7 +352,7 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = else checkAttribs aenv implUnionCase.Attribs sigUnionCase.Attribs (fun attribs -> implUnionCase.Attribs <- attribs) and checkField aenv implField sigField = - let err f = errorR(FieldNotContained(denv,implField,sigField,f)); false + let err f = errorR(FieldNotContained(denv, implField, sigField, f)); false sigField.rfield_other_range <- Some (implField.Range, true) implField.rfield_other_range <- Some (sigField.Range, false) if implField.rfield_id.idText <> sigField.rfield_id.idText then err FSComp.SR.FieldNotContainedNamesDiffer @@ -365,9 +365,9 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = checkAttribs aenv implField.FieldAttribs sigField.FieldAttribs (fun attribs -> implField.rfield_fattribs <- attribs) && checkAttribs aenv implField.PropertyAttribs sigField.PropertyAttribs (fun attribs -> implField.rfield_pattribs <- attribs) - and checkMemberDatasConform err (_implAttrs,implVal,implMemberInfo) (_sigAttrs, sigVal,sigMemberInfo) = - match implMemberInfo,sigMemberInfo with - | None,None -> true + and checkMemberDatasConform err (_implAttrs, implVal, implMemberInfo) (_sigAttrs, sigVal, sigMemberInfo) = + match implMemberInfo, sigMemberInfo with + | None, None -> true | Some implMembInfo, Some sigMembInfo -> if not (implVal.CompiledName = sigVal.CompiledName) then err(FSComp.SR.ValueNotContainedMutabilityDotNetNamesDiffer) @@ -408,25 +408,25 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = // sig for err then checkRecordFieldsForExn. // ------------------------------------------------------------------------------- - and checkRecordFields m aenv (implTycon:Tycon) (implFields:TyconRecdFields) (sigFields:TyconRecdFields) = + and checkRecordFields m aenv (implTycon: Tycon) (implFields: TyconRecdFields) (sigFields: TyconRecdFields) = let implFields = implFields.TrueFieldsAsList let sigFields = sigFields.TrueFieldsAsList let m1 = implFields |> NameMap.ofKeyedList (fun rfld -> rfld.Name) let m2 = sigFields |> NameMap.ofKeyedList (fun rfld -> rfld.Name) NameMap.suball2 - (fun fieldName _ -> errorR(Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleFieldRequiredButNotSpecified(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName, fieldName),m)); false) + (fun fieldName _ -> errorR(Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleFieldRequiredButNotSpecified(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName, fieldName), m)); false) (checkField aenv) m1 m2 && NameMap.suball2 - (fun fieldName _ -> errorR(Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleFieldWasPresent(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName, fieldName),m)); false) + (fun fieldName _ -> errorR(Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleFieldWasPresent(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName, fieldName), m)); false) (fun x y -> checkField aenv y x) m2 m1 && // This check is required because constructors etc. are externally visible // and thus compiled representations do pick up dependencies on the field order (if List.forall2 (checkField aenv) implFields sigFields then true - else (errorR(Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleFieldOrderDiffer(implTycon.TypeOrMeasureKind.ToString(),implTycon.DisplayName),m)); false)) + else (errorR(Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleFieldOrderDiffer(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName), m)); false)) - and checkRecordFieldsForExn _g _denv err aenv (implFields:TyconRecdFields) (sigFields:TyconRecdFields) = + and checkRecordFieldsForExn _g _denv err aenv (implFields: TyconRecdFields) (sigFields: TyconRecdFields) = let implFields = implFields.TrueFieldsAsList let sigFields = sigFields.TrueFieldsAsList let m1 = implFields |> NameMap.ofKeyedList (fun rfld -> rfld.Name) @@ -439,47 +439,47 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = then true else (errorR(err (FSComp.SR.ExceptionDefsNotCompatibleFieldOrderDiffers)); false)) - and checkVirtualSlots denv m (implTycon:Tycon) implAbstractSlots sigAbstractSlots = - let m1 = NameMap.ofKeyedList (fun (v:ValRef) -> v.DisplayName) implAbstractSlots - let m2 = NameMap.ofKeyedList (fun (v:ValRef) -> v.DisplayName) sigAbstractSlots - (m1,m2) ||> NameMap.suball2 (fun _s vref -> + and checkVirtualSlots denv m (implTycon: Tycon) implAbstractSlots sigAbstractSlots = + let m1 = NameMap.ofKeyedList (fun (v: ValRef) -> v.DisplayName) implAbstractSlots + let m2 = NameMap.ofKeyedList (fun (v: ValRef) -> v.DisplayName) sigAbstractSlots + (m1, m2) ||> NameMap.suball2 (fun _s vref -> let kindText = implTycon.TypeOrMeasureKind.ToString() let valText = NicePrint.stringValOrMember denv vref.Deref - errorR(Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleAbstractMemberMissingInImpl(kindText, implTycon.DisplayName, valText),m)); false) (fun _x _y -> true) && + errorR(Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleAbstractMemberMissingInImpl(kindText, implTycon.DisplayName, valText), m)); false) (fun _x _y -> true) && - (m2,m1) ||> NameMap.suball2 (fun _s vref -> + (m2, m1) ||> NameMap.suball2 (fun _s vref -> let kindText = implTycon.TypeOrMeasureKind.ToString() let valText = NicePrint.stringValOrMember denv vref.Deref - errorR(Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleAbstractMemberMissingInSig(kindText, implTycon.DisplayName, valText),m)); false) (fun _x _y -> true) + errorR(Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleAbstractMemberMissingInSig(kindText, implTycon.DisplayName, valText), m)); false) (fun _x _y -> true) - and checkClassFields isStruct m aenv (implTycon:Tycon) (implFields:TyconRecdFields) (sigFields:TyconRecdFields) = + and checkClassFields isStruct m aenv (implTycon: Tycon) (implFields: TyconRecdFields) (sigFields: TyconRecdFields) = let implFields = implFields.TrueFieldsAsList let sigFields = sigFields.TrueFieldsAsList let m1 = implFields |> NameMap.ofKeyedList (fun rfld -> rfld.Name) let m2 = sigFields |> NameMap.ofKeyedList (fun rfld -> rfld.Name) NameMap.suball2 - (fun fieldName _ -> errorR(Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleFieldRequiredButNotSpecified(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName, fieldName),m)); false) + (fun fieldName _ -> errorR(Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleFieldRequiredButNotSpecified(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName, fieldName), m)); false) (checkField aenv) m1 m2 && (if isStruct then NameMap.suball2 - (fun fieldName _ -> warning(Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleFieldIsInImplButNotSig(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName, fieldName),m)); true) + (fun fieldName _ -> warning(Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleFieldIsInImplButNotSig(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName, fieldName), m)); true) (fun x y -> checkField aenv y x) m2 m1 else true) - and checkTypeRepr m aenv (implTycon:Tycon) sigTypeRepr = + and checkTypeRepr m aenv (implTycon: Tycon) sigTypeRepr = let reportNiceError k s1 s2 = let aset = NameSet.ofList s1 let fset = NameSet.ofList s2 match Zset.elements (Zset.diff aset fset) with | [] -> match Zset.elements (Zset.diff fset aset) with - | [] -> (errorR (Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleNumbersDiffer(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName, k),m)); false) - | l -> (errorR (Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleSignatureDefinesButImplDoesNot(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName, k, String.concat ";" l),m)); false) - | l -> (errorR (Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleImplDefinesButSignatureDoesNot(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName, k, String.concat ";" l),m)); false) + | [] -> (errorR (Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleNumbersDiffer(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName, k), m)); false) + | l -> (errorR (Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleSignatureDefinesButImplDoesNot(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName, k, String.concat ";" l), m)); false) + | l -> (errorR (Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleImplDefinesButSignatureDoesNot(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName, k, String.concat ";" l), m)); false) - match implTycon.TypeReprInfo,sigTypeRepr with + match implTycon.TypeReprInfo, sigTypeRepr with | (TRecdRepr _ | TUnionRepr _ | TILObjectRepr _ @@ -491,13 +491,13 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = | (TFSharpObjectRepr r), TNoRepr -> match r.fsobjmodel_kind with | TTyconStruct | TTyconEnum -> - (errorR (Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleImplDefinesStruct(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName),m)); false) + (errorR (Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleImplDefinesStruct(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName), m)); false) | _ -> true | (TAsmRepr _), TNoRepr -> - (errorR (Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleDotNetTypeRepresentationIsHidden(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName),m)); false) + (errorR (Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleDotNetTypeRepresentationIsHidden(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName), m)); false) | (TMeasureableRepr _), TNoRepr -> - (errorR (Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleTypeIsHidden(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName),m)); false) + (errorR (Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleTypeIsHidden(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName), m)); false) | (TUnionRepr r1), (TUnionRepr r2) -> let ucases1 = r1.UnionCasesAsList let ucases2 = r2.UnionCasesAsList @@ -508,13 +508,13 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = | (TRecdRepr implFields), (TRecdRepr sigFields) -> checkRecordFields m aenv implTycon implFields sigFields | (TFSharpObjectRepr r1), (TFSharpObjectRepr r2) -> - if not (match r1.fsobjmodel_kind,r2.fsobjmodel_kind with - | TTyconClass,TTyconClass -> true - | TTyconInterface,TTyconInterface -> true - | TTyconStruct,TTyconStruct -> true + if not (match r1.fsobjmodel_kind, r2.fsobjmodel_kind with + | TTyconClass, TTyconClass -> true + | TTyconInterface, TTyconInterface -> true + | TTyconStruct, TTyconStruct -> true | TTyconEnum, TTyconEnum -> true - | TTyconDelegate (TSlotSig(_,typ1,ctps1,mtps1,ps1, rty1)), - TTyconDelegate (TSlotSig(_,typ2,ctps2,mtps2,ps2, rty2)) -> + | TTyconDelegate (TSlotSig(_, typ1, ctps1, mtps1, ps1, rty1)), + TTyconDelegate (TSlotSig(_, typ2, ctps2, mtps2, ps2, rty2)) -> (typeAEquiv g aenv typ1 typ2) && (ctps1.Length = ctps2.Length) && (let aenv = aenv.BindEquivTypars ctps1 ctps2 @@ -522,71 +522,71 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = (mtps1.Length = mtps2.Length) && (let aenv = aenv.BindEquivTypars mtps1 mtps2 (typarsAEquiv g aenv mtps1 mtps2) && - ((ps1,ps2) ||> List.lengthsEqAndForall2 (List.lengthsEqAndForall2 (fun p1 p2 -> typeAEquiv g aenv p1.Type p2.Type))) && + ((ps1, ps2) ||> List.lengthsEqAndForall2 (List.lengthsEqAndForall2 (fun p1 p2 -> typeAEquiv g aenv p1.Type p2.Type))) && (returnTypesAEquiv g aenv rty1 rty2))) - | _,_ -> false) then - (errorR (Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleTypeIsDifferentKind(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName),m)); false) + | _, _ -> false) then + (errorR (Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleTypeIsDifferentKind(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName), m)); false) else let isStruct = (match r1.fsobjmodel_kind with TTyconStruct -> true | _ -> false) checkClassFields isStruct m aenv implTycon r1.fsobjmodel_rfields r2.fsobjmodel_rfields && checkVirtualSlots denv m implTycon r1.fsobjmodel_vslots r2.fsobjmodel_vslots | (TAsmRepr tcr1), (TAsmRepr tcr2) -> - if tcr1 <> tcr2 then (errorR (Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleILDiffer(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName),m)); false) else true + if tcr1 <> tcr2 then (errorR (Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleILDiffer(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName), m)); false) else true | (TMeasureableRepr ty1), (TMeasureableRepr ty2) -> - if typeAEquiv g aenv ty1 ty2 then true else (errorR (Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleRepresentationsDiffer(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName),m)); false) + if typeAEquiv g aenv ty1 ty2 then true else (errorR (Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleRepresentationsDiffer(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName), m)); false) | TNoRepr, TNoRepr -> true #if !NO_EXTENSIONTYPING - | TProvidedTypeExtensionPoint info1 , TProvidedTypeExtensionPoint info2 -> - Tainted.EqTainted info1.ProvidedType.TypeProvider info2.ProvidedType.TypeProvider && ProvidedType.TaintedEquals(info1.ProvidedType,info2.ProvidedType) + | TProvidedTypeExtensionPoint info1, TProvidedTypeExtensionPoint info2 -> + Tainted.EqTainted info1.ProvidedType.TypeProvider info2.ProvidedType.TypeProvider && ProvidedType.TaintedEquals(info1.ProvidedType, info2.ProvidedType) | TProvidedNamespaceExtensionPoint _, TProvidedNamespaceExtensionPoint _ -> System.Diagnostics.Debug.Assert(false, "unreachable: TProvidedNamespaceExtensionPoint only on namespaces, not types" ) true #endif - | TNoRepr, _ -> (errorR (Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleRepresentationsDiffer(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName),m)); false) - | _, _ -> (errorR (Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleRepresentationsDiffer(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName),m)); false) + | TNoRepr, _ -> (errorR (Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleRepresentationsDiffer(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName), m)); false) + | _, _ -> (errorR (Error(FSComp.SR.DefinitionsInSigAndImplNotCompatibleRepresentationsDiffer(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName), m)); false) - and checkTypeAbbrev m aenv (implTycon:Tycon) (sigTycon:Tycon) = + and checkTypeAbbrev m aenv (implTycon: Tycon) (sigTycon: Tycon) = let kind1 = implTycon.TypeOrMeasureKind let kind2 = sigTycon.TypeOrMeasureKind - if kind1 <> kind2 then (errorR (Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleSignatureDeclaresDiffer(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName, kind2.ToString(), kind1.ToString()),m)); false) + if kind1 <> kind2 then (errorR (Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleSignatureDeclaresDiffer(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName, kind2.ToString(), kind1.ToString()), m)); false) else - match implTycon.TypeAbbrev,sigTycon.TypeAbbrev with + match implTycon.TypeAbbrev, sigTycon.TypeAbbrev with | Some ty1, Some ty2 -> if not (typeAEquiv g aenv ty1 ty2) then let s1, s2, _ = NicePrint.minimalStringsOfTwoTypes denv ty1 ty2 - errorR (Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleAbbreviationsDiffer(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName, s1, s2),m)) + errorR (Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleAbbreviationsDiffer(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName, s1, s2), m)) false else true - | None,None -> true - | Some _, None -> (errorR (Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleAbbreviationHiddenBySig(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName),m)); false) - | None, Some _ -> (errorR (Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleSigHasAbbreviation(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName),m)); false) + | None, None -> true + | Some _, None -> (errorR (Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleAbbreviationHiddenBySig(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName), m)); false) + | None, Some _ -> (errorR (Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleSigHasAbbreviation(implTycon.TypeOrMeasureKind.ToString(), implTycon.DisplayName), m)); false) - and checkModuleOrNamespaceContents m aenv (implModRef:ModuleOrNamespaceRef) (signModType:ModuleOrNamespaceType) = + and checkModuleOrNamespaceContents m aenv (implModRef: ModuleOrNamespaceRef) (signModType: ModuleOrNamespaceType) = let implModType = implModRef.ModuleOrNamespaceType - (if implModType.ModuleOrNamespaceKind <> signModType.ModuleOrNamespaceKind then errorR(Error(FSComp.SR.typrelModuleNamespaceAttributesDifferInSigAndImpl(),m))) + (if implModType.ModuleOrNamespaceKind <> signModType.ModuleOrNamespaceKind then errorR(Error(FSComp.SR.typrelModuleNamespaceAttributesDifferInSigAndImpl(), m))) - (implModType.TypesByMangledName , signModType.TypesByMangledName) + (implModType.TypesByMangledName, signModType.TypesByMangledName) ||> NameMap.suball2 - (fun s _fx -> errorR(RequiredButNotSpecified(denv,implModRef,"type",(fun os -> Printf.bprintf os "%s" s),m)); false) + (fun s _fx -> errorR(RequiredButNotSpecified(denv, implModRef, "type", (fun os -> Printf.bprintf os "%s" s), m)); false) (checkTypeDef aenv) && (implModType.ModulesAndNamespacesByDemangledName, signModType.ModulesAndNamespacesByDemangledName ) ||> NameMap.suball2 - (fun s fx -> errorR(RequiredButNotSpecified(denv,implModRef,(if fx.IsModule then "module" else "namespace"),(fun os -> Printf.bprintf os "%s" s),m)); false) + (fun s fx -> errorR(RequiredButNotSpecified(denv, implModRef, (if fx.IsModule then "module" else "namespace"), (fun os -> Printf.bprintf os "%s" s), m)); false) (fun x1 x2 -> checkModuleOrNamespace aenv (mkLocalModRef x1) x2) && - let sigValHadNoMatchingImplementation (fx:Val) (_closeActualVal: Val option) = - errorR(RequiredButNotSpecified(denv,implModRef,"value",(fun os -> + let sigValHadNoMatchingImplementation (fx: Val) (_closeActualVal: Val option) = + errorR(RequiredButNotSpecified(denv, implModRef, "value", (fun os -> (* In the case of missing members show the full required enclosing type and signature *) if fx.IsMember then NicePrint.outputQualifiedValOrMember denv os fx else - Printf.bprintf os "%s" fx.DisplayName),m)) + Printf.bprintf os "%s" fx.DisplayName), m)) - let valuesPartiallyMatch (av:Val) (fv:Val) = + let valuesPartiallyMatch (av: Val) (fv: Val) = let akey = av.GetLinkagePartialKey() let fkey = fv.GetLinkagePartialKey() (akey.MemberParentMangledName = fkey.MemberParentMangledName) && @@ -595,11 +595,11 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = (implModType.AllValsAndMembersByLogicalNameUncached, signModType.AllValsAndMembersByLogicalNameUncached) ||> NameMap.suball2 - (fun _s (fxs:Val list) -> sigValHadNoMatchingImplementation fxs.Head None; false) + (fun _s (fxs: Val list) -> sigValHadNoMatchingImplementation fxs.Head None; false) (fun avs fvs -> - match avs,fvs with - | [],_ | _,[] -> failwith "unreachable" - | [av],[fv] -> + match avs, fvs with + | [], _ | _, [] -> failwith "unreachable" + | [av], [fv] -> if valuesPartiallyMatch av fv then checkVal implModRef aenv av fv else @@ -611,19 +611,19 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = fvs |> List.choose (fun fv -> match avs |> List.tryFind (fun av -> valLinkageAEquiv g aenv av fv) with | None -> None - | Some av -> Some(fv,av)) + | Some av -> Some(fv, av)) // Check the ones with matching linkage - let allPairsOk = matchingPairs |> List.map (fun (fv,av) -> checkVal implModRef aenv av fv) |> List.forall id + let allPairsOk = matchingPairs |> List.map (fun (fv, av) -> checkVal implModRef aenv av fv) |> List.forall id let someNotOk = matchingPairs.Length < fvs.Length // Report an error for those that don't. Try pairing up by enclosing-type/name if someNotOk then - let noMatches,partialMatchingPairs = + let noMatches, partialMatchingPairs = fvs |> List.splitChoose (fun fv -> match avs |> List.tryFind (fun av -> valuesPartiallyMatch av fv) with | None -> Choice1Of2 fv - | Some av -> Choice2Of2(fv,av)) - for (fv,av) in partialMatchingPairs do + | Some av -> Choice2Of2(fv, av)) + for (fv, av) in partialMatchingPairs do checkVal implModRef aenv av fv |> ignore for fv in noMatches do sigValHadNoMatchingImplementation fv None @@ -637,7 +637,7 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = checkModuleOrNamespaceContents implModRef.Range aenv implModRef sigModRef.ModuleOrNamespaceType && checkAttribs aenv implModRef.Attribs sigModRef.Attribs implModRef.Deref.SetAttribs - member __.CheckSignature aenv (implModRef:ModuleOrNamespaceRef) (signModType:ModuleOrNamespaceType) = + member __.CheckSignature aenv (implModRef: ModuleOrNamespaceRef) (signModType: ModuleOrNamespaceType) = checkModuleOrNamespaceContents implModRef.Range aenv implModRef signModType member __.CheckTypars m aenv (implTypars: Typars) (signTypars: Typars) = @@ -645,33 +645,33 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = /// Check the names add up between a signature and its implementation. We check this first. -let rec CheckNamesOfModuleOrNamespaceContents denv (implModRef:ModuleOrNamespaceRef) (signModType:ModuleOrNamespaceType) = +let rec CheckNamesOfModuleOrNamespaceContents denv (implModRef: ModuleOrNamespaceRef) (signModType: ModuleOrNamespaceType) = let m = implModRef.Range let implModType = implModRef.ModuleOrNamespaceType NameMap.suball2 - (fun s _fx -> errorR(RequiredButNotSpecified(denv,implModRef,"type",(fun os -> Printf.bprintf os "%s" s),m)); false) + (fun s _fx -> errorR(RequiredButNotSpecified(denv, implModRef, "type", (fun os -> Printf.bprintf os "%s" s), m)); false) (fun _ _ -> true) implModType.TypesByMangledName signModType.TypesByMangledName && (implModType.ModulesAndNamespacesByDemangledName, signModType.ModulesAndNamespacesByDemangledName ) ||> NameMap.suball2 - (fun s fx -> errorR(RequiredButNotSpecified(denv,implModRef,(if fx.IsModule then "module" else "namespace"),(fun os -> Printf.bprintf os "%s" s),m)); false) - (fun x1 (x2:ModuleOrNamespace) -> CheckNamesOfModuleOrNamespace denv (mkLocalModRef x1) x2.ModuleOrNamespaceType) && + (fun s fx -> errorR(RequiredButNotSpecified(denv, implModRef, (if fx.IsModule then "module" else "namespace"), (fun os -> Printf.bprintf os "%s" s), m)); false) + (fun x1 (x2: ModuleOrNamespace) -> CheckNamesOfModuleOrNamespace denv (mkLocalModRef x1) x2.ModuleOrNamespaceType) && - (implModType.AllValsAndMembersByLogicalNameUncached , signModType.AllValsAndMembersByLogicalNameUncached) + (implModType.AllValsAndMembersByLogicalNameUncached, signModType.AllValsAndMembersByLogicalNameUncached) ||> NameMap.suball2 - (fun _s (fxs:Val list) -> + (fun _s (fxs: Val list) -> let fx = fxs.Head - errorR(RequiredButNotSpecified(denv,implModRef,"value",(fun os -> + errorR(RequiredButNotSpecified(denv, implModRef, "value", (fun os -> // In the case of missing members show the full required enclosing type and signature if Option.isSome fx.MemberInfo then NicePrint.outputQualifiedValOrMember denv os fx else - Printf.bprintf os "%s" fx.DisplayName),m)); false) + Printf.bprintf os "%s" fx.DisplayName), m)); false) (fun _ _ -> true) -and CheckNamesOfModuleOrNamespace denv (implModRef:ModuleOrNamespaceRef) signModType = +and CheckNamesOfModuleOrNamespace denv (implModRef: ModuleOrNamespaceRef) signModType = CheckNamesOfModuleOrNamespaceContents denv implModRef signModType diff --git a/src/fcs-fable/src/fsharp/SimulatedMSBuildReferenceResolver.fs b/src/fcs-fable/src/fsharp/SimulatedMSBuildReferenceResolver.fs index 387611b6c3..cf0aeecf80 100644 --- a/src/fcs-fable/src/fsharp/SimulatedMSBuildReferenceResolver.fs +++ b/src/fcs-fable/src/fsharp/SimulatedMSBuildReferenceResolver.fs @@ -16,14 +16,14 @@ open FSharp.Compiler.AbstractIL.Internal.Library let internal SimulatedMSBuildResolver = let supportedFrameworks = [| - "v4.7.2"; - "v4.7.1"; - "v4.7"; - "v4.6.2"; - "v4.6.1"; - "v4.6"; - "v4.5.1"; - "v4.5"; + "v4.7.2" + "v4.7.1" + "v4.7" + "v4.6.2" + "v4.6.1" + "v4.6" + "v4.5.1" + "v4.5" "v4.0" |] { new Resolver with @@ -52,7 +52,7 @@ let internal SimulatedMSBuildResolver = #if !FX_NO_WIN_REGISTRY let registrySearchPaths() = - [ let registryKey = @"Software\Microsoft\.NetFramework"; + [ let registryKey = @"Software\Microsoft\.NetFramework" use key = Registry.LocalMachine.OpenSubKey(registryKey) match key with | null -> () diff --git a/src/fcs-fable/src/fsharp/TastOps.fs b/src/fcs-fable/src/fsharp/TastOps.fs index c023716330..cb5050592d 100644 --- a/src/fcs-fable/src/fsharp/TastOps.fs +++ b/src/fcs-fable/src/fsharp/TastOps.fs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. /// Defines derived expression manipulation and construction functions. module internal FSharp.Compiler.Tastops @@ -51,18 +51,18 @@ type TyparMap<'T> = let (TPMap m) = tm TPMap (m.Add(v.Stamp, x)) - static member Empty : TyparMap<'T> = TPMap Map.empty + static member Empty: TyparMap<'T> = TPMap Map.empty [] type TyconRefMap<'T>(imap: StampMap<'T>) = member m.Item with get (v: TyconRef) = imap.[v.Stamp] member m.TryFind (v: TyconRef) = imap.TryFind v.Stamp - member m.ContainsKey (v: TyconRef) = imap.ContainsKey v.Stamp + member m.ContainsKey (v: TyconRef) = imap.ContainsKey v.Stamp member m.Add (v: TyconRef) x = TyconRefMap (imap.Add (v.Stamp, x)) member m.Remove (v: TyconRef) = TyconRefMap (imap.Remove v.Stamp) member m.IsEmpty = imap.IsEmpty - static member Empty : TyconRefMap<'T> = TyconRefMap Map.empty + static member Empty: TyconRefMap<'T> = TyconRefMap Map.empty static member OfList vs = (vs, TyconRefMap<'T>.Empty) ||> List.foldBack (fun (x, y) acc -> acc.Add x y) [] @@ -70,7 +70,7 @@ type TyconRefMap<'T>(imap: StampMap<'T>) = type ValMap<'T>(imap: StampMap<'T>) = member m.Contents = imap - member m.Item with get (v:Val) = imap.[v.Stamp] + member m.Item with get (v: Val) = imap.[v.Stamp] member m.TryFind (v: Val) = imap.TryFind v.Stamp member m.ContainsVal (v: Val) = imap.ContainsKey v.Stamp member m.Add (v: Val) x = ValMap (imap.Add(v.Stamp, x)) @@ -88,20 +88,20 @@ type TyparInst = (Typar * TType) list type TyconRefRemap = TyconRefMap type ValRemap = ValMap -let emptyTyconRefRemap : TyconRefRemap = TyconRefMap<_>.Empty -let emptyTyparInst = ([] : TyparInst) +let emptyTyconRefRemap: TyconRefRemap = TyconRefMap<_>.Empty +let emptyTyparInst = ([]: TyparInst) [] type Remap = - { tpinst : TyparInst + { tpinst: TyparInst valRemap: ValRemap - tyconRefRemap : TyconRefRemap + tyconRefRemap: TyconRefRemap removeTraitSolutions: bool } let emptyRemap = - { tpinst = emptyTyparInst; + { tpinst = emptyTyparInst tyconRefRemap = emptyTyconRefRemap - valRemap = ValMap.Empty + valRemap = ValMap.Empty removeTraitSolutions = false } type Remap with @@ -119,20 +119,20 @@ let isRemapEmpty remap = remap.tyconRefRemap.IsEmpty && remap.valRemap.IsEmpty -let rec instTyparRef tpinst ty tp = +let rec instTyparRef tpinst ty tp = match tpinst with | [] -> ty - | (tp', ty')::t -> + | (tp', ty'):: t -> if typarEq tp tp' then ty' else instTyparRef t ty tp -let instMeasureTyparRef tpinst unt (tp:Typar) = +let instMeasureTyparRef tpinst unt (tp: Typar) = match tp.Kind with | TyparKind.Measure -> let rec loop tpinst = match tpinst with | [] -> unt - | (tp', ty')::t -> + | (tp', ty'):: t -> if typarEq tp tp' then match ty' with | TType_measure unt -> unt @@ -142,10 +142,10 @@ let instMeasureTyparRef tpinst unt (tp:Typar) = loop tpinst | _ -> failwith "instMeasureTyparRef: kind=Type" -let remapTyconRef (tcmap: TyconRefMap<_>) tcr = - match tcmap.TryFind tcr with - | Some tcr -> tcr - | None -> tcr +let remapTyconRef (tcmap: TyconRefMap<_>) tcref = + match tcmap.TryFind tcref with + | Some tcref -> tcref + | None -> tcref let remapUnionCaseRef tcmap (UCRef(tcref, nm)) = UCRef(remapTyconRef tcmap tcref, nm) let remapRecdFieldRef tcmap (RFRef(tcref, nm)) = RFRef(remapTyconRef tcmap tcref, nm) @@ -153,20 +153,20 @@ let remapRecdFieldRef tcmap (RFRef(tcref, nm)) = RFRef(remapTyconRef tcmap tcref let mkTyparInst (typars: Typars) tyargs = #if CHECKED if List.length typars <> List.length tyargs then - failwith ("mkTyparInst: invalid type" + (sprintf " %d <> %d" (List.length typars) (List.length tyargs))); + failwith ("mkTyparInst: invalid type" + (sprintf " %d <> %d" (List.length typars) (List.length tyargs))) #endif - (List.zip typars tyargs : TyparInst) + (List.zip typars tyargs: TyparInst) let generalizeTypar tp = mkTyparTy tp let generalizeTypars tps = List.map generalizeTypar tps -let rec remapTypeAux (tyenv : Remap) (ty:TType) = +let rec remapTypeAux (tyenv: Remap) (ty: TType) = let ty = stripTyparEqns ty match ty with - | TType_var tp as ty -> instTyparRef tyenv.tpinst ty tp - | TType_app (tcr, tinst) as ty -> - match tyenv.tyconRefRemap.TryFind tcr with - | Some tcr' -> TType_app (tcr', remapTypesAux tyenv tinst) + | TType_var tp as ty -> instTyparRef tyenv.tpinst ty tp + | TType_app (tcref, tinst) as ty -> + match tyenv.tyconRefRemap.TryFind tcref with + | Some tcref' -> TType_app (tcref', remapTypesAux tyenv tinst) | None -> match tinst with | [] -> ty // optimization to avoid re-allocation of TType_app node in the common case @@ -174,26 +174,26 @@ let rec remapTypeAux (tyenv : Remap) (ty:TType) = // avoid reallocation on idempotent let tinst' = remapTypesAux tyenv tinst if tinst === tinst' then ty else - TType_app (tcr, tinst') + TType_app (tcref, tinst') - | TType_ucase (UCRef(tcr, n), tinst) -> - match tyenv.tyconRefRemap.TryFind tcr with - | Some tcr' -> TType_ucase (UCRef(tcr', n), remapTypesAux tyenv tinst) - | None -> TType_ucase (UCRef(tcr, n), remapTypesAux tyenv tinst) + | TType_ucase (UCRef(tcref, n), tinst) -> + match tyenv.tyconRefRemap.TryFind tcref with + | Some tcref' -> TType_ucase (UCRef(tcref', n), remapTypesAux tyenv tinst) + | None -> TType_ucase (UCRef(tcref, n), remapTypesAux tyenv tinst) - | TType_anon (anonInfo, l) as ty -> + | TType_anon (anonInfo, l) as ty -> let tupInfo' = remapTupInfoAux tyenv anonInfo.TupInfo let l' = remapTypesAux tyenv l if anonInfo.TupInfo === tupInfo' && l === l' then ty else TType_anon (AnonRecdTypeInfo.Create(anonInfo.Assembly, tupInfo', anonInfo.SortedIds), l') - | TType_tuple (tupInfo, l) as ty -> + | TType_tuple (tupInfo, l) as ty -> let tupInfo' = remapTupInfoAux tyenv tupInfo let l' = remapTypesAux tyenv l if tupInfo === tupInfo' && l === l' then ty else TType_tuple (tupInfo', l') - | TType_fun (d, r) as ty -> + | TType_fun (d, r) as ty -> let d' = remapTypeAux tyenv d let r' = remapTypeAux tyenv r if d === d' && r === r' then ty else @@ -210,9 +210,9 @@ let rec remapTypeAux (tyenv : Remap) (ty:TType) = and remapMeasureAux tyenv unt = match unt with | Measure.One -> unt - | Measure.Con tcr -> - match tyenv.tyconRefRemap.TryFind tcr with - | Some tcr -> Measure.Con tcr + | Measure.Con tcref -> + match tyenv.tyconRefRemap.TryFind tcref with + | Some tcref -> Measure.Con tcref | None -> unt | Measure.Prod(u1, u2) -> Measure.Prod(remapMeasureAux tyenv u1, remapMeasureAux tyenv u2) | Measure.RationalPower(u, q) -> Measure.RationalPower(remapMeasureAux tyenv u, q) @@ -247,8 +247,8 @@ and remapTyparConstraintsAux tyenv cs = | TyparConstraint.IsDelegate(uty1, uty2, m) -> Some(TyparConstraint.IsDelegate(remapTypeAux tyenv uty1, remapTypeAux tyenv uty2, m)) | TyparConstraint.SimpleChoice(tys, m) -> Some(TyparConstraint.SimpleChoice(remapTypesAux tyenv tys, m)) - | TyparConstraint.SupportsComparison _ - | TyparConstraint.SupportsEquality _ + | TyparConstraint.SupportsComparison _ + | TyparConstraint.SupportsEquality _ | TyparConstraint.SupportsNull _ | TyparConstraint.IsUnmanaged _ | TyparConstraint.IsNonNullableStruct _ @@ -300,7 +300,7 @@ and copyAndRemapAndBindTyparsFull remapAttrib tyenv tps = let tps' = copyTypars tps let tyenv = { tyenv with tpinst = bindTypars tps (generalizeTypars tps') tyenv.tpinst } (tps, tps') ||> List.iter2 (fun tporig tp -> - tp.SetConstraints (remapTyparConstraintsAux tyenv tporig.Constraints) + tp.SetConstraints (remapTyparConstraintsAux tyenv tporig.Constraints) tp.SetAttribs (tporig.Attribs |> remapAttrib)) tps', tyenv @@ -320,17 +320,17 @@ and remapValLinkage tyenv (vlink: ValLinkageFullKey) = if tyOpt === tyOpt' then vlink else ValLinkageFullKey(vlink.PartialKey, tyOpt') -and remapNonLocalValRef tyenv (nlvref:NonLocalValOrMemberRef) = +and remapNonLocalValRef tyenv (nlvref: NonLocalValOrMemberRef) = let eref = nlvref.EnclosingEntity let eref' = remapTyconRef tyenv.tyconRefRemap eref let vlink = nlvref.ItemKey let vlink' = remapValLinkage tyenv vlink if eref === eref' && vlink === vlink' then nlvref else { EnclosingEntity = eref' - ItemKey = vlink' } + ItemKey = vlink' } and remapValRef tmenv (vref: ValRef) = - match tmenv.valRemap.TryFind vref.Deref with + match tmenv.valRemap.TryFind vref.Deref with | None -> if vref.IsLocalRef then vref else let nlvref = vref.nlr @@ -375,14 +375,14 @@ let remapSlotSig remapAttrib tyenv (TSlotSig(nm, ty, ctps, methTypars, paraml, r let mkInstRemap tpinst = { tyconRefRemap = emptyTyconRefRemap - tpinst = tpinst - valRemap = ValMap.Empty + tpinst = tpinst + valRemap = ValMap.Empty removeTraitSolutions = false } // entry points for "typar -> TType" instantiation -let instType tpinst x = if isNil tpinst then x else remapTypeAux (mkInstRemap tpinst) x -let instTypes tpinst x = if isNil tpinst then x else remapTypesAux (mkInstRemap tpinst) x -let instTrait tpinst x = if isNil tpinst then x else remapTraitAux (mkInstRemap tpinst) x +let instType tpinst x = if isNil tpinst then x else remapTypeAux (mkInstRemap tpinst) x +let instTypes tpinst x = if isNil tpinst then x else remapTypesAux (mkInstRemap tpinst) x +let instTrait tpinst x = if isNil tpinst then x else remapTraitAux (mkInstRemap tpinst) x let instTyparConstraints tpinst x = if isNil tpinst then x else remapTyparConstraintsAux (mkInstRemap tpinst) x let instSlotSig tpinst ss = remapSlotSig (fun _ -> []) (mkInstRemap tpinst) ss let copySlotSig ss = remapSlotSig (fun _ -> []) Remap.Empty ss @@ -392,21 +392,21 @@ let mkTyparToTyparRenaming tpsOrig tps = let tinst = generalizeTypars tps mkTyparInst tpsOrig tinst, tinst -let mkTyconInst (tycon:Tycon) tinst = mkTyparInst tycon.TyparsNoRange tinst -let mkTyconRefInst (tcref:TyconRef) tinst = mkTyconInst tcref.Deref tinst +let mkTyconInst (tycon: Tycon) tinst = mkTyparInst tycon.TyparsNoRange tinst +let mkTyconRefInst (tcref: TyconRef) tinst = mkTyconInst tcref.Deref tinst //--------------------------------------------------------------------------- // Basic equalites //--------------------------------------------------------------------------- -let tyconRefEq (g:TcGlobals) tcref1 tcref2 = primEntityRefEq g.compilingFslib g.fslibCcu tcref1 tcref2 -let valRefEq (g:TcGlobals) vref1 vref2 = primValRefEq g.compilingFslib g.fslibCcu vref1 vref2 +let tyconRefEq (g: TcGlobals) tcref1 tcref2 = primEntityRefEq g.compilingFslib g.fslibCcu tcref1 tcref2 +let valRefEq (g: TcGlobals) vref1 vref2 = primValRefEq g.compilingFslib g.fslibCcu vref1 vref2 //--------------------------------------------------------------------------- // Remove inference equations and abbreviations from units //--------------------------------------------------------------------------- -let reduceTyconRefAbbrevMeasureable (tcref:TyconRef) = +let reduceTyconRefAbbrevMeasureable (tcref: TyconRef) = let abbrev = tcref.TypeAbbrev match abbrev with | Some (TType_measure ms) -> ms @@ -414,7 +414,7 @@ let reduceTyconRefAbbrevMeasureable (tcref:TyconRef) = let rec stripUnitEqnsFromMeasureAux canShortcut unt = match stripUnitEqnsAux canShortcut unt with - | Measure.Con tcref when tcref.IsTypeAbbrev -> + | Measure.Con tcref when tcref.IsTypeAbbrev -> stripUnitEqnsFromMeasureAux canShortcut (reduceTyconRefAbbrevMeasureable tcref) | m -> m @@ -456,7 +456,7 @@ let rec MeasureVarExponent tp unt = let ListMeasureVarOccs unt = let rec gather acc unt = match stripUnitEqnsFromMeasure unt with - | Measure.Var tp -> if List.exists (typarEq tp) acc then acc else tp::acc + | Measure.Var tp -> if List.exists (typarEq tp) acc then acc else tp:: acc | Measure.Prod(unt1, unt2) -> gather (gather acc unt1) unt2 | Measure.RationalPower(unt', _) -> gather acc unt' | Measure.Inv unt' -> gather acc unt' @@ -471,7 +471,7 @@ let ListMeasureVarOccsWithNonZeroExponents untexpr = if List.exists (fun (tp', _) -> typarEq tp tp') acc then acc else let e = MeasureVarExponent tp untexpr - if e = ZeroRational then acc else (tp, e)::acc + if e = ZeroRational then acc else (tp, e):: acc | Measure.Prod(unt1, unt2) -> gather (gather acc unt1) unt2 | Measure.Inv unt' -> gather acc unt' | Measure.RationalPower(unt', _) -> gather acc unt' @@ -485,7 +485,7 @@ let ListMeasureConOccsWithNonZeroExponents g eraseAbbrevs untexpr = | Measure.Con c -> if List.exists (fun (c', _) -> tyconRefEq g c c') acc then acc else let e = MeasureExprConExponent g eraseAbbrevs c untexpr - if e = ZeroRational then acc else (c, e)::acc + if e = ZeroRational then acc else (c, e):: acc | Measure.Prod(unt1, unt2) -> gather (gather acc unt1) unt2 | Measure.Inv unt' -> gather acc unt' | Measure.RationalPower(unt', _) -> gather acc unt' @@ -497,7 +497,7 @@ let ListMeasureConOccsWithNonZeroExponents g eraseAbbrevs untexpr = let ListMeasureConOccsAfterRemapping g r unt = let rec gather acc unt = match stripUnitEqnsFromMeasure unt with - | Measure.Con c -> if List.exists (tyconRefEq g (r c)) acc then acc else r c::acc + | Measure.Con c -> if List.exists (tyconRefEq g (r c)) acc then acc else r c:: acc | Measure.Prod(unt1, unt2) -> gather (gather acc unt1) unt2 | Measure.RationalPower(unt', _) -> gather acc unt' | Measure.Inv unt' -> gather acc unt' @@ -521,7 +521,7 @@ let MeasureProdOpt m1 m2 = let ProdMeasures ms = match ms with | [] -> Measure.One - | m::ms -> List.foldBack MeasureProdOpt ms m + | m:: ms -> List.foldBack MeasureProdOpt ms m let isDimensionless g tyarg = match stripTyparEqns tyarg with @@ -568,21 +568,21 @@ let tryNormalizeMeasureInType g ty = // Some basic type builders //--------------------------------------------------------------------------- -let mkNativePtrTy (g:TcGlobals) ty = +let mkNativePtrTy (g: TcGlobals) ty = assert g.nativeptr_tcr.CanDeref // this should always be available, but check anyway TType_app (g.nativeptr_tcr, [ty]) -let mkByrefTy (g:TcGlobals) ty = +let mkByrefTy (g: TcGlobals) ty = assert g.byref_tcr.CanDeref // this should always be available, but check anyway TType_app (g.byref_tcr, [ty]) -let mkInByrefTy (g:TcGlobals) ty = +let mkInByrefTy (g: TcGlobals) ty = if g.inref_tcr.CanDeref then // If not using sufficient FSharp.Core, then inref = byref, see RFC FS-1053.md TType_app (g.inref_tcr, [ty]) else mkByrefTy g ty -let mkOutByrefTy (g:TcGlobals) ty = +let mkOutByrefTy (g: TcGlobals) ty = if g.outref_tcr.CanDeref then // If not using sufficient FSharp.Core, then outref = byref, see RFC FS-1053.md TType_app (g.outref_tcr, [ty]) else @@ -594,21 +594,21 @@ let mkByrefTyWithFlag g readonly ty = else mkByrefTy g ty -let mkByref2Ty (g:TcGlobals) ty1 ty2 = +let mkByref2Ty (g: TcGlobals) ty1 ty2 = assert g.byref2_tcr.CanDeref // check we are using sufficient FSharp.Core, caller should check this TType_app (g.byref2_tcr, [ty1; ty2]) -let mkVoidPtrTy (g:TcGlobals) = - assert g.voidptr_tcr.CanDeref // check we are using sufficient FSharp.Core , caller should check this +let mkVoidPtrTy (g: TcGlobals) = + assert g.voidptr_tcr.CanDeref // check we are using sufficient FSharp.Core, caller should check this TType_app (g.voidptr_tcr, []) -let mkByrefTyWithInference (g:TcGlobals) ty1 ty2 = +let mkByrefTyWithInference (g: TcGlobals) ty1 ty2 = if g.byref2_tcr.CanDeref then // If not using sufficient FSharp.Core, then inref = byref, see RFC FS-1053.md TType_app (g.byref2_tcr, [ty1; ty2]) else TType_app (g.byref_tcr, [ty1]) -let mkArrayTy (g:TcGlobals) rank ty m = +let mkArrayTy (g: TcGlobals) rank ty m = if rank < 1 || rank > 32 then errorR(Error(FSComp.SR.tastopsMaxArrayThirtyTwo(rank), m)) TType_app (g.il_arr_tcr_map.[3], [ty]) @@ -640,8 +640,8 @@ let isCompiledTupleTyconRef g tcref = tyconRefEq g g.struct_tuple7_tcr tcref || tyconRefEq g g.struct_tuple8_tcr tcref -let mkCompiledTupleTyconRef (g:TcGlobals) isStruct n = - if n = 1 then (if isStruct then g.struct_tuple1_tcr else g.ref_tuple1_tcr) +let mkCompiledTupleTyconRef (g: TcGlobals) isStruct n = + if n = 1 then (if isStruct then g.struct_tuple1_tcr else g.ref_tuple1_tcr) elif n = 2 then (if isStruct then g.struct_tuple2_tcr else g.ref_tuple2_tcr) elif n = 3 then (if isStruct then g.struct_tuple3_tcr else g.ref_tuple3_tcr) elif n = 4 then (if isStruct then g.struct_tuple4_tcr else g.ref_tuple4_tcr) @@ -685,17 +685,17 @@ let applyTyconAbbrev abbrevTy tycon tyargs = if isNil tyargs then abbrevTy else instType (mkTyconInst tycon tyargs) abbrevTy -let reduceTyconAbbrev (tycon:Tycon) tyargs = +let reduceTyconAbbrev (tycon: Tycon) tyargs = let abbrev = tycon.TypeAbbrev match abbrev with - | None -> invalidArg "tycon" "this type definition is not an abbreviation"; + | None -> invalidArg "tycon" "this type definition is not an abbreviation" | Some abbrevTy -> applyTyconAbbrev abbrevTy tycon tyargs -let reduceTyconRefAbbrev (tcref:TyconRef) tyargs = +let reduceTyconRefAbbrev (tcref: TyconRef) tyargs = reduceTyconAbbrev tcref.Deref tyargs -let reduceTyconMeasureableOrProvided (g:TcGlobals) (tycon:Tycon) tyargs = +let reduceTyconMeasureableOrProvided (g: TcGlobals) (tycon: Tycon) tyargs = #if NO_EXTENSIONTYPING ignore g // otherwise g would be unused #endif @@ -708,7 +708,7 @@ let reduceTyconMeasureableOrProvided (g:TcGlobals) (tycon:Tycon) tyargs = #endif | _ -> invalidArg "tc" "this type definition is not a refinement" -let reduceTyconRefMeasureableOrProvided (g:TcGlobals) (tcref:TyconRef) tyargs = +let reduceTyconRefMeasureableOrProvided (g: TcGlobals) (tcref: TyconRef) tyargs = reduceTyconMeasureableOrProvided g tcref.Deref tyargs let rec stripTyEqnsA g canShortcut ty = @@ -725,8 +725,8 @@ let rec stripTyEqnsA g canShortcut ty = // // Add the equation byref<'T> = byref<'T, ByRefKinds.InOut> for when using sufficient FSharp.Core // See RFC FS-1053.md - if tyconRefEq g tcref g.byref_tcr && g.byref2_tcr.CanDeref && g.byrefkind_InOut_tcr.CanDeref then - mkByref2Ty g tinst.[0] (TType_app(g.byrefkind_InOut_tcr, [])) + if tyconRefEq g tcref g.byref_tcr && g.byref2_tcr.CanDeref && g.byrefkind_InOut_tcr.CanDeref then + mkByref2Ty g tinst.[0] (TType_app(g.byrefkind_InOut_tcr, [])) // Add the equation double<1> = double for units of measure. elif tycon.IsMeasureableReprTycon && List.forall (isDimensionless g) tinst then @@ -748,12 +748,12 @@ let evalAnonInfoIsStruct (anonInfo: AnonRecdTypeInfo) = /// and measureable types (float<_>). /// It also optionally erases all "compilation representations", i.e. function and /// tuple types, and also "nativeptr<'T> --> System.IntPtr" -let rec stripTyEqnsAndErase eraseFuncAndTuple (g:TcGlobals) ty = +let rec stripTyEqnsAndErase eraseFuncAndTuple (g: TcGlobals) ty = let ty = stripTyEqns g ty match ty with | TType_app (tcref, args) -> let tycon = tcref.Deref - if tycon.IsErased then + if tycon.IsErased then stripTyEqnsAndErase eraseFuncAndTuple g (reduceTyconMeasureableOrProvided g tycon args) elif tyconRefEq g tcref g.nativeptr_tcr && eraseFuncAndTuple then stripTyEqnsAndErase eraseFuncAndTuple g g.nativeint_ty @@ -774,67 +774,66 @@ let stripTyEqnsWrtErasure erasureFlag g ty = | EraseMeasures -> stripTyEqnsAndErase false g ty | _ -> stripTyEqns g ty -let rec stripExnEqns (eref:TyconRef) = +let rec stripExnEqns (eref: TyconRef) = let exnc = eref.Deref match exnc.ExceptionInfo with | TExnAbbrevRepr eref -> stripExnEqns eref | _ -> exnc - let primDestForallTy g ty = ty |> stripTyEqns g |> (function TType_forall (tyvs, tau) -> (tyvs, tau) | _ -> failwith "primDestForallTy: not a forall type") -let destFunTy g ty = ty |> stripTyEqns g |> (function TType_fun (tyv, tau) -> (tyv, tau) | _ -> failwith "destFunTy: not a function type") -let destAnyTupleTy g ty = ty |> stripTyEqns g |> (function TType_tuple (tupInfo, l) -> tupInfo, l | _ -> failwith "destAnyTupleTy: not a tuple type") -let destRefTupleTy g ty = ty |> stripTyEqns g |> (function TType_tuple (tupInfo, l) when not (evalTupInfoIsStruct tupInfo) -> l | _ -> failwith "destRefTupleTy: not a reference tuple type") -let destStructTupleTy g ty = ty |> stripTyEqns g |> (function TType_tuple (tupInfo, l) when evalTupInfoIsStruct tupInfo -> l | _ -> failwith "destStructTupleTy: not a struct tuple type") -let destTyparTy g ty = ty |> stripTyEqns g |> (function TType_var v -> v | _ -> failwith "destTyparTy: not a typar type") -let destAnyParTy g ty = ty |> stripTyEqns g |> (function TType_var v -> v | TType_measure unt -> destUnitParMeasure g unt | _ -> failwith "destAnyParTy: not a typar or unpar type") -let destMeasureTy g ty = ty |> stripTyEqns g |> (function TType_measure m -> m | _ -> failwith "destMeasureTy: not a unit-of-measure type") -let isFunTy g ty = ty |> stripTyEqns g |> (function TType_fun _ -> true | _ -> false) -let isForallTy g ty = ty |> stripTyEqns g |> (function TType_forall _ -> true | _ -> false) -let isAnyTupleTy g ty = ty |> stripTyEqns g |> (function TType_tuple _ -> true | _ -> false) -let isRefTupleTy g ty = ty |> stripTyEqns g |> (function TType_tuple (tupInfo, _) -> not (evalTupInfoIsStruct tupInfo) | _ -> false) -let isStructTupleTy g ty = ty |> stripTyEqns g |> (function TType_tuple (tupInfo, _) -> evalTupInfoIsStruct tupInfo | _ -> false) -let isAnonRecdTy g ty = ty |> stripTyEqns g |> (function TType_anon _ -> true | _ -> false) -let isStructAnonRecdTy g ty = ty |> stripTyEqns g |> (function TType_anon (anonInfo, _) -> evalAnonInfoIsStruct anonInfo | _ -> false) -let isUnionTy g ty = ty |> stripTyEqns g |> (function TType_app(tcr, _) -> tcr.IsUnionTycon | _ -> false) -let isReprHiddenTy g ty = ty |> stripTyEqns g |> (function TType_app(tcr, _) -> tcr.IsHiddenReprTycon | _ -> false) -let isFSharpObjModelTy g ty = ty |> stripTyEqns g |> (function TType_app(tcr, _) -> tcr.IsFSharpObjectModelTycon | _ -> false) -let isRecdTy g ty = ty |> stripTyEqns g |> (function TType_app(tcr, _) -> tcr.IsRecordTycon | _ -> false) -let isFSharpStructOrEnumTy g ty = ty |> stripTyEqns g |> (function TType_app(tcr, _) -> tcr.IsFSharpStructOrEnumTycon | _ -> false) -let isFSharpEnumTy g ty = ty |> stripTyEqns g |> (function TType_app(tcr, _) -> tcr.IsFSharpEnumTycon | _ -> false) -let isTyparTy g ty = ty |> stripTyEqns g |> (function TType_var _ -> true | _ -> false) -let isAnyParTy g ty = ty |> stripTyEqns g |> (function TType_var _ -> true | TType_measure unt -> isUnitParMeasure g unt | _ -> false) -let isMeasureTy g ty = ty |> stripTyEqns g |> (function TType_measure _ -> true | _ -> false) +let destFunTy g ty = ty |> stripTyEqns g |> (function TType_fun (tyv, tau) -> (tyv, tau) | _ -> failwith "destFunTy: not a function type") +let destAnyTupleTy g ty = ty |> stripTyEqns g |> (function TType_tuple (tupInfo, l) -> tupInfo, l | _ -> failwith "destAnyTupleTy: not a tuple type") +let destRefTupleTy g ty = ty |> stripTyEqns g |> (function TType_tuple (tupInfo, l) when not (evalTupInfoIsStruct tupInfo) -> l | _ -> failwith "destRefTupleTy: not a reference tuple type") +let destStructTupleTy g ty = ty |> stripTyEqns g |> (function TType_tuple (tupInfo, l) when evalTupInfoIsStruct tupInfo -> l | _ -> failwith "destStructTupleTy: not a struct tuple type") +let destTyparTy g ty = ty |> stripTyEqns g |> (function TType_var v -> v | _ -> failwith "destTyparTy: not a typar type") +let destAnyParTy g ty = ty |> stripTyEqns g |> (function TType_var v -> v | TType_measure unt -> destUnitParMeasure g unt | _ -> failwith "destAnyParTy: not a typar or unpar type") +let destMeasureTy g ty = ty |> stripTyEqns g |> (function TType_measure m -> m | _ -> failwith "destMeasureTy: not a unit-of-measure type") +let isFunTy g ty = ty |> stripTyEqns g |> (function TType_fun _ -> true | _ -> false) +let isForallTy g ty = ty |> stripTyEqns g |> (function TType_forall _ -> true | _ -> false) +let isAnyTupleTy g ty = ty |> stripTyEqns g |> (function TType_tuple _ -> true | _ -> false) +let isRefTupleTy g ty = ty |> stripTyEqns g |> (function TType_tuple (tupInfo, _) -> not (evalTupInfoIsStruct tupInfo) | _ -> false) +let isStructTupleTy g ty = ty |> stripTyEqns g |> (function TType_tuple (tupInfo, _) -> evalTupInfoIsStruct tupInfo | _ -> false) +let isAnonRecdTy g ty = ty |> stripTyEqns g |> (function TType_anon _ -> true | _ -> false) +let isStructAnonRecdTy g ty = ty |> stripTyEqns g |> (function TType_anon (anonInfo, _) -> evalAnonInfoIsStruct anonInfo | _ -> false) +let isUnionTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tcref.IsUnionTycon | _ -> false) +let isReprHiddenTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tcref.IsHiddenReprTycon | _ -> false) +let isFSharpObjModelTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tcref.IsFSharpObjectModelTycon | _ -> false) +let isRecdTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tcref.IsRecordTycon | _ -> false) +let isFSharpStructOrEnumTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tcref.IsFSharpStructOrEnumTycon | _ -> false) +let isFSharpEnumTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tcref.IsFSharpEnumTycon | _ -> false) +let isTyparTy g ty = ty |> stripTyEqns g |> (function TType_var _ -> true | _ -> false) +let isAnyParTy g ty = ty |> stripTyEqns g |> (function TType_var _ -> true | TType_measure unt -> isUnitParMeasure g unt | _ -> false) +let isMeasureTy g ty = ty |> stripTyEqns g |> (function TType_measure _ -> true | _ -> false) let isProvenUnionCaseTy ty = match ty with TType_ucase _ -> true | _ -> false let mkAppTy tcref tyargs = TType_app(tcref, tyargs) let mkProvenUnionCaseTy ucref tyargs = TType_ucase(ucref, tyargs) -let isAppTy g ty = ty |> stripTyEqns g |> (function TType_app _ -> true | _ -> false) +let isAppTy g ty = ty |> stripTyEqns g |> (function TType_app _ -> true | _ -> false) let tryAppTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, tinst) -> ValueSome (tcref, tinst) | _ -> ValueNone) let destAppTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, tinst) -> tcref, tinst | _ -> failwith "destAppTy") -let tcrefOfAppTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tcref | _ -> failwith "tcrefOfAppTy") -let argsOfAppTy g ty = ty |> stripTyEqns g |> (function TType_app(_, tinst) -> tinst | _ -> []) +let tcrefOfAppTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tcref | _ -> failwith "tcrefOfAppTy") +let argsOfAppTy g ty = ty |> stripTyEqns g |> (function TType_app(_, tinst) -> tinst | _ -> []) let tryDestTyparTy g ty = ty |> stripTyEqns g |> (function TType_var v -> ValueSome v | _ -> ValueNone) -let tryDestFunTy g ty = ty |> stripTyEqns g |> (function TType_fun (tyv, tau) -> ValueSome(tyv, tau) | _ -> ValueNone) -let tryDestAppTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> ValueSome tcref | _ -> ValueNone) +let tryDestFunTy g ty = ty |> stripTyEqns g |> (function TType_fun (tyv, tau) -> ValueSome(tyv, tau) | _ -> ValueNone) +let tryDestAppTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> ValueSome tcref | _ -> ValueNone) let tryDestAnonRecdTy g ty = ty |> stripTyEqns g |> (function TType_anon (anonInfo, tys) -> ValueSome (anonInfo, tys) | _ -> ValueNone) -let tryAnyParTy g ty = ty |> stripTyEqns g |> (function TType_var v -> ValueSome v | TType_measure unt when isUnitParMeasure g unt -> ValueSome(destUnitParMeasure g unt) | _ -> ValueNone) -let tryAnyParTyOption g ty = ty |> stripTyEqns g |> (function TType_var v -> Some v | TType_measure unt when isUnitParMeasure g unt -> Some(destUnitParMeasure g unt) | _ -> None) +let tryAnyParTy g ty = ty |> stripTyEqns g |> (function TType_var v -> ValueSome v | TType_measure unt when isUnitParMeasure g unt -> ValueSome(destUnitParMeasure g unt) | _ -> ValueNone) +let tryAnyParTyOption g ty = ty |> stripTyEqns g |> (function TType_var v -> Some v | TType_measure unt when isUnitParMeasure g unt -> Some(destUnitParMeasure g unt) | _ -> None) let (|AppTy|_|) g ty = ty |> stripTyEqns g |> (function TType_app(tcref, tinst) -> Some (tcref, tinst) | _ -> None) let (|RefTupleTy|_|) g ty = ty |> stripTyEqns g |> (function TType_tuple(tupInfo, tys) when not (evalTupInfoIsStruct tupInfo) -> Some tys | _ -> None) let (|FunTy|_|) g ty = ty |> stripTyEqns g |> (function TType_fun(dty, rty) -> Some (dty, rty) | _ -> None) -let tryNiceEntityRefOfTy ty = +let tryNiceEntityRefOfTy ty = let ty = stripTyparEqnsAux false ty match ty with | TType_app (tcref, _) -> ValueSome tcref | TType_measure (Measure.Con tcref) -> ValueSome tcref | _ -> ValueNone -let tryNiceEntityRefOfTyOption ty = +let tryNiceEntityRefOfTyOption ty = let ty = stripTyparEqnsAux false ty match ty with | TType_app (tcref, _) -> Some tcref @@ -843,12 +842,12 @@ let tryNiceEntityRefOfTyOption ty = let (|NullableTy|_|) g ty = match tryAppTy g ty with - | ValueSome (tcr, [tyarg]) when tyconRefEq g tcr g.system_Nullable_tcref -> Some tyarg + | ValueSome (tcref, [tyarg]) when tyconRefEq g tcref g.system_Nullable_tcref -> Some tyarg | _ -> None let (|StripNullableTy|) g ty = match tryAppTy g ty with - | ValueSome (tcr, [tyarg]) when tyconRefEq g tcr g.system_Nullable_tcref -> tyarg + | ValueSome (tcref, [tyarg]) when tyconRefEq g tcref g.system_Nullable_tcref -> tyarg | _ -> ty let mkInstForAppTy g ty = @@ -857,7 +856,7 @@ let mkInstForAppTy g ty = | _ -> [] let domainOfFunTy g ty = fst (destFunTy g ty) -let rangeOfFunTy g ty = snd (destFunTy g ty) +let rangeOfFunTy g ty = snd (destFunTy g ty) let convertToTypeWithMetadataIfPossible g ty = if isAnyTupleTy g ty then @@ -937,16 +936,16 @@ and typarConstraintsAEquivAux erasureFlag g aenv tpc1 tpc2 = | TyparConstraint.SimpleChoice (tys1, _), TyparConstraint.SimpleChoice(tys2, _) -> ListSet.equals (typeAEquivAux erasureFlag g aenv) tys1 tys2 - | TyparConstraint.SupportsComparison _ , TyparConstraint.SupportsComparison _ - | TyparConstraint.SupportsEquality _ , TyparConstraint.SupportsEquality _ - | TyparConstraint.SupportsNull _ , TyparConstraint.SupportsNull _ - | TyparConstraint.IsNonNullableStruct _ , TyparConstraint.IsNonNullableStruct _ - | TyparConstraint.IsReferenceType _ , TyparConstraint.IsReferenceType _ - | TyparConstraint.IsUnmanaged _ , TyparConstraint.IsUnmanaged _ + | TyparConstraint.SupportsComparison _, TyparConstraint.SupportsComparison _ + | TyparConstraint.SupportsEquality _, TyparConstraint.SupportsEquality _ + | TyparConstraint.SupportsNull _, TyparConstraint.SupportsNull _ + | TyparConstraint.IsNonNullableStruct _, TyparConstraint.IsNonNullableStruct _ + | TyparConstraint.IsReferenceType _, TyparConstraint.IsReferenceType _ + | TyparConstraint.IsUnmanaged _, TyparConstraint.IsUnmanaged _ | TyparConstraint.RequiresDefaultConstructor _, TyparConstraint.RequiresDefaultConstructor _ -> true | _ -> false -and typarConstraintSetsAEquivAux erasureFlag g aenv (tp1:Typar) (tp2:Typar) = +and typarConstraintSetsAEquivAux erasureFlag g aenv (tp1: Typar) (tp2: Typar) = tp1.StaticReq = tp2.StaticReq && ListSet.equals (typarConstraintsAEquivAux erasureFlag g aenv) tp1.Constraints tp2.Constraints @@ -971,10 +970,10 @@ and typeAEquivAux erasureFlag g aenv ty1 ty2 = match aenv.EquivTypars.TryFind tp1 with | Some v -> typeEquivAux erasureFlag g v ty2 | None -> false - | TType_app (tc1, b1) , TType_app (tc2, b2) -> + | TType_app (tc1, b1), TType_app (tc2, b2) -> tcrefAEquiv g aenv tc1 tc2 && typesAEquivAux erasureFlag g aenv b1 b2 - | TType_ucase (UCRef(tc1, n1), b1) , TType_ucase (UCRef(tc2, n2), b2) -> + | TType_ucase (UCRef(tc1, n1), b1), TType_ucase (UCRef(tc2, n2), b2) -> n1=n2 && tcrefAEquiv g aenv tc1 tc2 && typesAEquivAux erasureFlag g aenv b1 b2 @@ -1057,7 +1056,7 @@ let rec getErasedTypes g ty = let valOrder = { new IComparer with member __.Compare(v1, v2) = compare v1.Stamp v2.Stamp } let tyconOrder = { new IComparer with member __.Compare(tc1, tc2) = compare tc1.Stamp tc2.Stamp } -let recdFieldRefOrder = +let recdFieldRefOrder = { new IComparer with member __.Compare(RFRef(tcref1, nm1), RFRef(tcref2, nm2)) = let c = tyconOrder.Compare (tcref1.Deref, tcref2.Deref) @@ -1076,10 +1075,15 @@ let unionCaseRefOrder = //--------------------------------------------------------------------------- let mkFunTy d r = TType_fun (d, r) + let (-->) d r = mkFunTy d r + let mkForallTy d r = TType_forall (d, r) + let mkForallTyIfNeeded d r = if isNil d then r else mkForallTy d r + let (+->) d r = mkForallTyIfNeeded d r + let mkIteratedFunTy dl r = List.foldBack (-->) dl r let mkLambdaArgTy m tys = @@ -1096,16 +1100,16 @@ let mkLambdaTy tps tys rty = mkForallTyIfNeeded tps (mkIteratedFunTy tys rty) /// the library arising from env.fs. Part of this means that we have to be able to resolve these /// references. This function artificially forces the existence of a module or namespace at a /// particular point in order to do this. -let ensureCcuHasModuleOrNamespaceAtPath (ccu:CcuThunk) path (CompPath(_, cpath)) xml = +let ensureCcuHasModuleOrNamespaceAtPath (ccu: CcuThunk) path (CompPath(_, cpath)) xml = let scoref = ccu.ILScopeRef - let rec loop prior_cpath (path:Ident list) cpath (modul:ModuleOrNamespace) = + let rec loop prior_cpath (path: Ident list) cpath (modul: ModuleOrNamespace) = let mtype = modul.ModuleOrNamespaceType match path, cpath with - | (hpath::tpath), ((_, mkind)::tcpath) -> + | (hpath:: tpath), ((_, mkind):: tcpath) -> let modName = hpath.idText if not (Map.containsKey modName mtype.AllEntitiesByCompiledAndLogicalMangledNames) then let smodul = NewModuleOrNamespace (Some(CompPath(scoref, prior_cpath))) taccessPublic hpath xml [] (MaybeLazy.Strict (NewEmptyModuleOrNamespaceType mkind)) - mtype.AddModuleOrNamespaceByMutation(smodul); + mtype.AddModuleOrNamespaceByMutation(smodul) let modul = Map.find modName mtype.AllEntitiesByCompiledAndLogicalMangledNames loop (prior_cpath@[(modName, Namespace)]) tpath tcpath modul @@ -1135,7 +1139,7 @@ let tryDestRefTupleExpr e = match e with Expr.Op (TOp.Tuple tupInfo, _, es, _) w let rec rangeOfExpr x = match x with - | Expr.Val (_, _, m) | Expr.Op (_, _, _, m) | Expr.Const (_, m, _) | Expr.Quote (_, _, _, m, _) + | Expr.Val (_, _, m) | Expr.Op (_, _, _, m) | Expr.Const (_, m, _) | Expr.Quote (_, _, _, m, _) | Expr.Obj (_, _, _, _, _, _, m) | Expr.App(_, _, _, _, m) | Expr.Sequential (_, _, _, _, m) | Expr.StaticOptimization (_, _, _, m) | Expr.Lambda (_, _, _, _, _, m, _) | Expr.TyLambda (_, _, _, m, _)| Expr.TyChoose (_, _, m) | Expr.LetRec (_, _, m, _) | Expr.Let (_, _, m, _) | Expr.Match (_, _, _, _, m, _) -> m @@ -1163,7 +1167,7 @@ type MatchBuilder(spBind, inpRange: Range.range) = member x.CloseTargets() = targets |> ResizeArray.toList - member x.Close(dtree, m, ty) = primMkMatch (spBind, inpRange, dtree, targets.ToArray(), m, ty) + member x.Close(dtree, m, ty) = primMkMatch (spBind, inpRange, dtree, targets.ToArray(), m, ty) let mkBoolSwitch m g t e = TDSwitch(g, [TCase(DecisionTreeTest.Const(Const.Bool(true)), t)], Some e, m) @@ -1172,25 +1176,25 @@ let primMkCond spBind spTarget1 spTarget2 m ty e1 e2 e3 = let dtree = mkBoolSwitch m e1 (mbuilder.AddResultTarget(e2, spTarget1)) (mbuilder.AddResultTarget(e3, spTarget2)) mbuilder.Close(dtree, m, ty) -let mkCond spBind spTarget m ty e1 e2 e3 = primMkCond spBind spTarget spTarget m ty e1 e2 e3 +let mkCond spBind spTarget m ty e1 e2 e3 = primMkCond spBind spTarget spTarget m ty e1 e2 e3 //--------------------------------------------------------------------------- // Primitive constructors //--------------------------------------------------------------------------- -let exprForValRef m vref = Expr.Val(vref, NormalValUse, m) -let exprForVal m v = exprForValRef m (mkLocalValRef v) +let exprForValRef m vref = Expr.Val(vref, NormalValUse, m) +let exprForVal m v = exprForValRef m (mkLocalValRef v) let mkLocalAux m s ty mut compgen = let thisv = NewVal(s, m, None, ty, mut, compgen, None, taccessPublic, ValNotInRecScope, None, NormalVal, [], ValInline.Optional, XmlDoc.Empty, false, false, false, false, false, false, None, ParentNone) thisv, exprForVal m thisv -let mkLocal m s ty = mkLocalAux m s ty Immutable false +let mkLocal m s ty = mkLocalAux m s ty Immutable false let mkCompGenLocal m s ty = mkLocalAux m s ty Immutable true let mkMutableCompGenLocal m s ty = mkLocalAux m s ty Mutable true -// Type gives return type. For type-lambdas this is the formal return type. +// Type gives return type. For type-lambdas this is the formal return type. let mkMultiLambda m vs (b, rty) = Expr.Lambda (newUnique(), None, None, vs, b, m, rty) let rebuildLambda m ctorThisValOpt baseValOpt vs (b, rty) = Expr.Lambda (newUnique(), ctorThisValOpt, baseValOpt, vs, b, m, rty) let mkLambda m v (b, rty) = mkMultiLambda m [v] (b, rty) @@ -1200,7 +1204,7 @@ let mkTypeChoose m vs b = match vs with [] -> b | _ -> Expr.TyChoose (vs, b, m) let mkObjExpr (ty, basev, basecall, overrides, iimpls, m) = Expr.Obj (newUnique(), ty, basev, basecall, overrides, iimpls, m) -let mkLambdas m tps (vs:Val list) (b, rty) = +let mkLambdas m tps (vs: Val list) (b, rty) = mkTypeLambda m tps (List.foldBack (fun v (e, ty) -> mkLambda m v (e, ty), v.Type --> ty) vs (b, rty)) let mkMultiLambdasCore m vsl (b, rty) = @@ -1216,12 +1220,12 @@ let mkMemberLambdas m tps ctorThisValOpt baseValOpt vsl (b, rty) = | _ -> match vsl with | [] -> error(InternalError("mk_basev_multi_lambdas_core: can't attach a basev to a non-lambda expression", m)) - | h::t -> + | h:: t -> let b, rty = mkMultiLambdasCore m t (b, rty) (rebuildLambda m ctorThisValOpt baseValOpt h (b, rty), (typeOfLambdaArg m h --> rty)) mkTypeLambda m tps expr -let mkMultiLambdaBind v letSeqPtOpt m tps vsl (b, rty) = +let mkMultiLambdaBind v letSeqPtOpt m tps vsl (b, rty) = TBind(v, mkMultiLambdas m tps vsl (b, rty), letSeqPtOpt) let mkBind seqPtOpt v e = TBind(v, e, seqPtOpt) @@ -1293,68 +1297,68 @@ let isBeingGeneralized tp typeScheme = // Build conditional expressions... //------------------------------------------------------------------------- -let mkLazyAnd (g:TcGlobals) m e1 e2 = mkCond NoSequencePointAtStickyBinding SuppressSequencePointAtTarget m g.bool_ty e1 e2 (Expr.Const(Const.Bool false, m, g.bool_ty)) -let mkLazyOr (g:TcGlobals) m e1 e2 = mkCond NoSequencePointAtStickyBinding SuppressSequencePointAtTarget m g.bool_ty e1 (Expr.Const(Const.Bool true, m, g.bool_ty)) e2 +let mkLazyAnd (g: TcGlobals) m e1 e2 = mkCond NoSequencePointAtStickyBinding SuppressSequencePointAtTarget m g.bool_ty e1 e2 (Expr.Const(Const.Bool false, m, g.bool_ty)) +let mkLazyOr (g: TcGlobals) m e1 e2 = mkCond NoSequencePointAtStickyBinding SuppressSequencePointAtTarget m g.bool_ty e1 (Expr.Const(Const.Bool true, m, g.bool_ty)) e2 -let mkCoerceExpr(e, to_ty, m, from_ty) = Expr.Op (TOp.Coerce, [to_ty;from_ty], [e], m) +let mkCoerceExpr(e, to_ty, m, from_ty) = Expr.Op (TOp.Coerce, [to_ty;from_ty], [e], m) -let mkAsmExpr(code, tinst, args, rettys, m) = Expr.Op (TOp.ILAsm(code, rettys), tinst, args, m) -let mkUnionCaseExpr(uc, tinst, args, m) = Expr.Op (TOp.UnionCase uc, tinst, args, m) -let mkExnExpr(uc, args, m) = Expr.Op (TOp.ExnConstr uc, [], args, m) -let mkTupleFieldGetViaExprAddr(tupInfo, e, tinst, i, m) = Expr.Op (TOp.TupleFieldGet(tupInfo, i), tinst, [e], m) -let mkAnonRecdFieldGetViaExprAddr(anonInfo, e, tinst, i, m) = Expr.Op (TOp.AnonRecdGet(anonInfo, i), tinst, [e], m) +let mkAsmExpr(code, tinst, args, rettys, m) = Expr.Op (TOp.ILAsm(code, rettys), tinst, args, m) +let mkUnionCaseExpr(uc, tinst, args, m) = Expr.Op (TOp.UnionCase uc, tinst, args, m) +let mkExnExpr(uc, args, m) = Expr.Op (TOp.ExnConstr uc, [], args, m) +let mkTupleFieldGetViaExprAddr(tupInfo, e, tinst, i, m) = Expr.Op (TOp.TupleFieldGet(tupInfo, i), tinst, [e], m) +let mkAnonRecdFieldGetViaExprAddr(anonInfo, e, tinst, i, m) = Expr.Op (TOp.AnonRecdGet(anonInfo, i), tinst, [e], m) -let mkRecdFieldGetViaExprAddr(e, fref, tinst, m) = Expr.Op (TOp.ValFieldGet(fref), tinst, [e], m) +let mkRecdFieldGetViaExprAddr(e, fref, tinst, m) = Expr.Op (TOp.ValFieldGet(fref), tinst, [e], m) let mkRecdFieldGetAddrViaExprAddr(readonly, e, fref, tinst, m) = Expr.Op (TOp.ValFieldGetAddr(fref, readonly), tinst, [e], m) let mkStaticRecdFieldGetAddr(readonly, fref, tinst, m) = Expr.Op (TOp.ValFieldGetAddr(fref, readonly), tinst, [], m) -let mkStaticRecdFieldGet(fref, tinst, m) = Expr.Op (TOp.ValFieldGet(fref), tinst, [], m) -let mkStaticRecdFieldSet(fref, tinst, e, m) = Expr.Op (TOp.ValFieldSet(fref), tinst, [e], m) +let mkStaticRecdFieldGet(fref, tinst, m) = Expr.Op (TOp.ValFieldGet(fref), tinst, [], m) +let mkStaticRecdFieldSet(fref, tinst, e, m) = Expr.Op (TOp.ValFieldSet(fref), tinst, [e], m) let mkArrayElemAddress g (readonly, ilInstrReadOnlyAnnotation, isNativePtr, shape, elemTy, exprs, m) = Expr.Op (TOp.ILAsm ([IL.I_ldelema(ilInstrReadOnlyAnnotation, isNativePtr, shape, mkILTyvarTy 0us)], [mkByrefTyWithFlag g readonly elemTy]), [elemTy], exprs, m) -let mkRecdFieldSetViaExprAddr (e1, fref, tinst, e2, m) = Expr.Op (TOp.ValFieldSet(fref), tinst, [e1;e2], m) +let mkRecdFieldSetViaExprAddr (e1, fref, tinst, e2, m) = Expr.Op (TOp.ValFieldSet(fref), tinst, [e1;e2], m) -let mkUnionCaseTagGetViaExprAddr (e1, cref, tinst, m) = Expr.Op (TOp.UnionCaseTagGet(cref), tinst, [e1], m) +let mkUnionCaseTagGetViaExprAddr (e1, cref, tinst, m) = Expr.Op (TOp.UnionCaseTagGet(cref), tinst, [e1], m) /// Make a 'TOp.UnionCaseProof' expression, which proves a union value is over a particular case (used only for ref-unions, not struct-unions) -let mkUnionCaseProof (e1, cref:UnionCaseRef, tinst, m) = if cref.Tycon.IsStructOrEnumTycon then e1 else Expr.Op (TOp.UnionCaseProof(cref), tinst, [e1], m) +let mkUnionCaseProof (e1, cref: UnionCaseRef, tinst, m) = if cref.Tycon.IsStructOrEnumTycon then e1 else Expr.Op (TOp.UnionCaseProof(cref), tinst, [e1], m) /// 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 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. -let mkUnionCaseFieldGetProvenViaExprAddr (e1, cref, tinst, j, m) = Expr.Op (TOp.UnionCaseFieldGet(cref, j), tinst, [e1], m) +let mkUnionCaseFieldGetProvenViaExprAddr (e1, cref, tinst, j, m) = Expr.Op (TOp.UnionCaseFieldGet(cref, j), tinst, [e1], m) /// 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. -let mkUnionCaseFieldGetAddrProvenViaExprAddr (readonly, e1, cref, tinst, j, m) = Expr.Op (TOp.UnionCaseFieldGetAddr(cref, j, readonly), tinst, [e1], m) +let mkUnionCaseFieldGetAddrProvenViaExprAddr (readonly, e1, cref, tinst, j, m) = Expr.Op (TOp.UnionCaseFieldGetAddr(cref, j, readonly), tinst, [e1], m) /// Build a 'get' expression for something we've already determined to be a particular union case, but where /// the static type of the input is not yet proven to be that particular union case. This requires a type /// cast to 'prove' the condition. -let mkUnionCaseFieldGetUnprovenViaExprAddr (e1, cref, tinst, j, m) = mkUnionCaseFieldGetProvenViaExprAddr(mkUnionCaseProof(e1, cref, tinst, m), cref, tinst, j, m) +let mkUnionCaseFieldGetUnprovenViaExprAddr (e1, cref, tinst, j, m) = mkUnionCaseFieldGetProvenViaExprAddr(mkUnionCaseProof(e1, cref, tinst, m), cref, tinst, j, m) -let mkUnionCaseFieldSet (e1, cref, tinst, j, e2, m) = Expr.Op (TOp.UnionCaseFieldSet(cref, j), tinst, [e1;e2], m) +let mkUnionCaseFieldSet (e1, cref, tinst, j, e2, m) = Expr.Op (TOp.UnionCaseFieldSet(cref, j), tinst, [e1;e2], m) -let mkExnCaseFieldGet (e1, ecref, j, m) = Expr.Op (TOp.ExnFieldGet(ecref, j), [], [e1], m) -let mkExnCaseFieldSet (e1, ecref, j, e2, m) = Expr.Op (TOp.ExnFieldSet(ecref, j), [], [e1;e2], m) +let mkExnCaseFieldGet (e1, ecref, j, m) = Expr.Op (TOp.ExnFieldGet(ecref, j), [], [e1], m) +let mkExnCaseFieldSet (e1, ecref, j, e2, m) = Expr.Op (TOp.ExnFieldSet(ecref, j), [], [e1;e2], m) -let mkDummyLambda (g:TcGlobals) (e:Expr, ety) = +let mkDummyLambda (g: TcGlobals) (e: Expr, ety) = let m = e.Range mkLambda m (fst (mkCompGenLocal m "unitVar" g.unit_ty)) (e, ety) -let mkWhile (g:TcGlobals) (spWhile, marker, e1, e2, m) = - Expr.Op (TOp.While (spWhile, marker), [] , [mkDummyLambda g (e1, g.bool_ty);mkDummyLambda g (e2, g.unit_ty)], m) +let mkWhile (g: TcGlobals) (spWhile, marker, e1, e2, m) = + Expr.Op (TOp.While (spWhile, marker), [], [mkDummyLambda g (e1, g.bool_ty);mkDummyLambda g (e2, g.unit_ty)], m) -let mkFor (g:TcGlobals) (spFor, v, e1, dir, e2, e3:Expr, m) = - Expr.Op (TOp.For (spFor, dir) , [] , [mkDummyLambda g (e1, g.int_ty) ;mkDummyLambda g (e2, g.int_ty);mkLambda e3.Range v (e3, g.unit_ty)], m) +let mkFor (g: TcGlobals) (spFor, v, e1, dir, e2, e3: Expr, m) = + Expr.Op (TOp.For (spFor, dir), [], [mkDummyLambda g (e1, g.int_ty) ;mkDummyLambda g (e2, g.int_ty);mkLambda e3.Range v (e3, g.unit_ty)], m) -let mkTryWith g (e1, vf, ef:Expr, vh, eh:Expr, m, ty, spTry, spWith) = +let mkTryWith g (e1, vf, ef: Expr, vh, eh: Expr, m, ty, spTry, spWith) = Expr.Op (TOp.TryCatch(spTry, spWith), [ty], [mkDummyLambda g (e1, ty);mkLambda ef.Range vf (ef, ty);mkLambda eh.Range vh (eh, ty)], m) -let mkTryFinally (g:TcGlobals) (e1, e2, m, ty, spTry, spFinally) = +let mkTryFinally (g: TcGlobals) (e1, e2, m, ty, spTry, spFinally) = Expr.Op (TOp.TryFinally(spTry, spFinally), [ty], [mkDummyLambda g (e1, ty);mkDummyLambda g (e2, g.unit_ty)], m) let mkDefault (m, ty) = Expr.Const(Const.Zero, m, ty) @@ -1376,13 +1380,13 @@ type ValHash<'T> = let (ValHash t) = ht t.Values :> seq<'T> - member ht.TryFind (v:Val) = + member ht.TryFind (v: Val) = let (ValHash t) = ht match t.TryGetValue v.Stamp with | true, v -> Some v | _ -> None - member ht.Add (v:Val, x) = + member ht.Add (v: Val, x) = let (ValHash t) = ht t.[v.Stamp] <- x @@ -1399,7 +1403,7 @@ type ValMultiMap<'T>(contents: StampMap<'T list>) = | Some vals -> vals | _ -> [] - member m.Add (v:Val, x) = ValMultiMap<'T>(contents.Add (v.Stamp, x :: m.Find v)) + member m.Add (v: Val, x) = ValMultiMap<'T>(contents.Add (v.Stamp, x :: m.Find v)) member m.Remove (v: Val) = ValMultiMap<'T>(contents.Remove v.Stamp) @@ -1424,13 +1428,13 @@ type TyconRefMultiMap<'T>(contents: TyconRefMap<'T list>) = //-------------------------------------------------------------------------- /// Try to create a EntityRef suitable for accessing the given Entity from another assembly -let tryRescopeEntity viewedCcu (entity:Entity) : ValueOption = +let tryRescopeEntity viewedCcu (entity: Entity) : ValueOption = match entity.PublicPath with | Some pubpath -> ValueSome (ERefNonLocal (rescopePubPath viewedCcu pubpath)) | None -> ValueNone /// Try to create a ValRef suitable for accessing the given Val from another assembly -let tryRescopeVal viewedCcu (entityRemap:Remap) (vspec:Val) : ValueOption = +let tryRescopeVal viewedCcu (entityRemap: Remap) (vspec: Val) : ValueOption = match vspec.PublicPath with | Some (ValPubPath(p, fullLinkageKey)) -> // The type information in the val linkage doesn't need to keep any information to trait solutions. @@ -1452,15 +1456,15 @@ let tryRescopeVal viewedCcu (entityRemap:Remap) (vspec:Val) : ValueOption actualTysOfRecdFields inst +let actualTysOfInstanceRecdFields inst (tcref: TyconRef) = tcref.AllInstanceFieldsAsList |> actualTysOfRecdFields inst -let actualTysOfUnionCaseFields inst (x:UnionCaseRef) = actualTysOfRecdFields inst x.AllFieldsAsList +let actualTysOfUnionCaseFields inst (x: UnionCaseRef) = actualTysOfRecdFields inst x.AllFieldsAsList -let actualResultTyOfUnionCase tinst (x:UnionCaseRef) = +let actualResultTyOfUnionCase tinst (x: UnionCaseRef) = instType (mkTyconRefInst x.TyconRef tinst) x.ReturnType let recdFieldsOfExnDefRef x = (stripExnEqns x).TrueInstanceFieldsAsList @@ -1470,13 +1474,13 @@ let recdFieldTysOfExnDefRef x = actualTysOfRecdFields [] (recdFieldsOfExnDefRef let recdFieldTyOfExnDefRefByIdx x j = actualTyOfRecdField [] (recdFieldOfExnDefRefByIdx x j) -let actualTyOfRecdFieldForTycon tycon tinst (fspec:RecdField) = +let actualTyOfRecdFieldForTycon tycon tinst (fspec: RecdField) = instType (mkTyconInst tycon tinst) fspec.FormalType -let actualTyOfRecdFieldRef (fref:RecdFieldRef) tinst = +let actualTyOfRecdFieldRef (fref: RecdFieldRef) tinst = actualTyOfRecdFieldForTycon fref.Tycon tinst fref.RecdField -let actualTyOfUnionFieldRef (fref:UnionCaseRef) n tinst = +let actualTyOfUnionFieldRef (fref: UnionCaseRef) n tinst = actualTyOfRecdFieldForTycon fref.Tycon tinst (fref.FieldByIndex(n)) @@ -1494,12 +1498,11 @@ let destForallTy g ty = let tryDestForallTy g ty = if isForallTy g ty then destForallTy g ty else [], ty - let rec stripFunTy g ty = if isFunTy g ty then let (d, r) = destFunTy g ty let more, rty = stripFunTy g r - d::more, rty + d:: more, rty else [], ty let applyForallTy g ty tyargs = @@ -1524,10 +1527,10 @@ let formalApplyTys g functy (tyargs, args) = args let rec stripFunTyN g n ty = - assert (n >= 0); + assert (n >= 0) if n > 0 && isFunTy g ty then let (d, r) = destFunTy g ty - let more, rty = stripFunTyN g (n-1) r in d::more, rty + let more, rty = stripFunTyN g (n-1) r in d:: more, rty else [], ty @@ -1557,7 +1560,7 @@ let GetTopTauTypeInFSharpForm g (curriedArgInfos: ArgReprInfo list list) tau m = let destTopForallTy g (ValReprInfo (ntps, _, _)) ty = let tps, tau = (if isNil ntps then [], ty else tryDestForallTy g ty) #if CHECKED - if tps.Length <> kinds.Length then failwith (sprintf "destTopForallTy: internal error, #tps = %d, #ntps = %d" (List.length tps) ntps); + if tps.Length <> kinds.Length then failwith (sprintf "destTopForallTy: internal error, #tps = %d, #ntps = %d" (List.length tps) ntps) #endif // tps may be have been equated to other tps in equi-recursive type inference. Normalize them here let tps = NormalizeDeclaredTyparsForEquiRecursiveInference g tps @@ -1565,11 +1568,10 @@ let destTopForallTy g (ValReprInfo (ntps, _, _)) ty = let GetTopValTypeInFSharpForm g (ValReprInfo(_, argInfos, retInfo) as topValInfo) ty m = let tps, tau = destTopForallTy g topValInfo ty - let argtysl, rty = GetTopTauTypeInFSharpForm g argInfos tau m - tps, argtysl, rty, retInfo + let curriedArgTys, returnTy = GetTopTauTypeInFSharpForm g argInfos tau m + tps, curriedArgTys, returnTy, retInfo - -let IsCompiledAsStaticProperty g (v:Val) = +let IsCompiledAsStaticProperty g (v: Val) = match v.ValReprInfo with | Some valReprInfoValue -> match GetTopValTypeInFSharpForm g valReprInfoValue v.Type v.Range with @@ -1577,19 +1579,19 @@ let IsCompiledAsStaticProperty g (v:Val) = | _ -> false | _ -> false -let IsCompiledAsStaticPropertyWithField g (v:Val) = +let IsCompiledAsStaticPropertyWithField g (v: Val) = (not v.IsCompiledAsStaticPropertyWithoutField && IsCompiledAsStaticProperty g v) //------------------------------------------------------------------------- // Multi-dimensional array types... //------------------------------------------------------------------------- -let isArrayTyconRef (g:TcGlobals) tcr = +let isArrayTyconRef (g: TcGlobals) tcref = g.il_arr_tcr_map - |> Array.exists (tyconRefEq g tcr) + |> Array.exists (tyconRefEq g tcref) -let rankOfArrayTyconRef (g:TcGlobals) tcr = - match g.il_arr_tcr_map |> Array.tryFindIndex (tyconRefEq g tcr) with +let rankOfArrayTyconRef (g: TcGlobals) tcref = + match g.il_arr_tcr_map |> Array.tryFindIndex (tyconRefEq g tcref) with | Some idx -> idx + 1 | None -> @@ -1599,12 +1601,12 @@ let rankOfArrayTyconRef (g:TcGlobals) tcr = // Misc functions on F# types //------------------------------------------------------------------------- -let destArrayTy (g:TcGlobals) ty = +let destArrayTy (g: TcGlobals) ty = match tryAppTy g ty with | ValueSome (tcref, [ty]) when isArrayTyconRef g tcref -> ty | _ -> failwith "destArrayTy" -let destListTy (g:TcGlobals) ty = +let destListTy (g: TcGlobals) ty = match tryAppTy g ty with | ValueSome (tcref, [ty]) when tyconRefEq g tcref g.list_tcr_canon -> ty | _ -> failwith "destListTy" @@ -1614,17 +1616,17 @@ let tyconRefEqOpt g tcOpt tc = | None -> false | Some tc2 -> tyconRefEq g tc2 tc -let isStringTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tyconRefEq g tcref g.system_String_tcref | _ -> false) -let isListTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tyconRefEq g tcref g.list_tcr_canon | _ -> false) -let isArrayTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> isArrayTyconRef g tcref | _ -> false) -let isArray1DTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tyconRefEq g tcref g.il_arr_tcr_map.[0] | _ -> false) -let isUnitTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tyconRefEq g g.unit_tcr_canon tcref | _ -> false) -let isObjTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tyconRefEq g g.system_Object_tcref tcref | _ -> false) -let isVoidTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tyconRefEq g g.system_Void_tcref tcref | _ -> false) -let isILAppTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tcref.IsILTycon | _ -> false) -let isNativePtrTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tyconRefEq g g.nativeptr_tcr tcref | _ -> false) - -let isByrefTy g ty = +let isStringTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tyconRefEq g tcref g.system_String_tcref | _ -> false) +let isListTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tyconRefEq g tcref g.list_tcr_canon | _ -> false) +let isArrayTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> isArrayTyconRef g tcref | _ -> false) +let isArray1DTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tyconRefEq g tcref g.il_arr_tcr_map.[0] | _ -> false) +let isUnitTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tyconRefEq g g.unit_tcr_canon tcref | _ -> false) +let isObjTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tyconRefEq g g.system_Object_tcref tcref | _ -> false) +let isVoidTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tyconRefEq g g.system_Void_tcref tcref | _ -> false) +let isILAppTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tcref.IsILTycon | _ -> false) +let isNativePtrTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tyconRefEq g g.nativeptr_tcr tcref | _ -> false) + +let isByrefTy g ty = ty |> stripTyEqns g |> (function | TType_app(tcref, _) when g.byref2_tcr.CanDeref -> tyconRefEq g g.byref2_tcr tcref | TType_app(tcref, _) -> tyconRefEq g g.byref_tcr tcref @@ -1633,27 +1635,27 @@ let isByrefTy g ty = let isInByrefTag g ty = ty |> stripTyEqns g |> (function TType_app(tcref, []) -> tyconRefEq g g.byrefkind_In_tcr tcref | _ -> false) let isInByrefTy g ty = ty |> stripTyEqns g |> (function - | TType_app(tcref, [_; tag]) when g.byref2_tcr.CanDeref -> tyconRefEq g g.byref2_tcr tcref && isInByrefTag g tag + | TType_app(tcref, [_; tag]) when g.byref2_tcr.CanDeref -> tyconRefEq g g.byref2_tcr tcref && isInByrefTag g tag | _ -> false) let isOutByrefTag g ty = ty |> stripTyEqns g |> (function TType_app(tcref, []) -> tyconRefEq g g.byrefkind_Out_tcr tcref | _ -> false) let isOutByrefTy g ty = ty |> stripTyEqns g |> (function - | TType_app(tcref, [_; tag]) when g.byref2_tcr.CanDeref -> tyconRefEq g g.byref2_tcr tcref && isOutByrefTag g tag + | TType_app(tcref, [_; tag]) when g.byref2_tcr.CanDeref -> tyconRefEq g g.byref2_tcr tcref && isOutByrefTag g tag | _ -> false) #if !NO_EXTENSIONTYPING -let extensionInfoOfTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tcref.TypeReprInfo | _ -> TNoRepr) +let extensionInfoOfTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tcref.TypeReprInfo | _ -> TNoRepr) #endif type TypeDefMetadata = | ILTypeMetadata of TILObjectReprData | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata #if !NO_EXTENSIONTYPING - | ProvidedTypeMetadata of TProvidedTypeInfo + | ProvidedTypeMetadata of TProvidedTypeInfo #endif -let metadataOfTycon (tycon:Tycon) = +let metadataOfTycon (tycon: Tycon) = #if !NO_EXTENSIONTYPING match tycon.TypeReprInfo with | TProvidedTypeExtensionPoint info -> ProvidedTypeMetadata info @@ -1686,7 +1688,7 @@ let isILReferenceTy g ty = | ILTypeMetadata (TILObjectReprData(_, _, td)) -> not td.IsStructOrEnum | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> isArrayTy g ty -let isILInterfaceTycon (tycon:Tycon) = +let isILInterfaceTycon (tycon: Tycon) = match metadataOfTycon tycon with #if !NO_EXTENSIONTYPING | ProvidedTypeMetadata info -> info.IsInterface @@ -1698,9 +1700,9 @@ let rankOfArrayTy g ty = rankOfArrayTyconRef g (tcrefOfAppTy g ty) let isFSharpObjModelRefTy g ty = isFSharpObjModelTy g ty && - let tcr = tcrefOfAppTy g ty - match tcr.FSharpObjectModelTypeInfo.fsobjmodel_kind with - | TTyconClass | TTyconInterface | TTyconDelegate _ -> true + let tcref = tcrefOfAppTy g ty + match tcref.FSharpObjectModelTypeInfo.fsobjmodel_kind with + | TTyconClass | TTyconInterface | TTyconDelegate _ -> true | TTyconStruct | TTyconEnum -> false let isFSharpClassTy g ty = @@ -1789,8 +1791,8 @@ let rec isUnmanagedTy g ty = let ty = stripTyEqnsAndMeasureEqns g ty match tryDestAppTy g ty with | ValueSome tcref -> - let isEq tcref2 = tyconRefEq g tcref tcref2 - if isEq g.nativeptr_tcr || isEq g.nativeint_tcr || + let isEq tcref2 = tyconRefEq g tcref tcref2 + if isEq g.nativeptr_tcr || isEq g.nativeint_tcr || isEq g.sbyte_tcr || isEq g.byte_tcr || isEq g.int16_tcr || isEq g.uint16_tcr || isEq g.int32_tcr || isEq g.uint32_tcr || @@ -1837,7 +1839,7 @@ let returnTyOfMethod g (TObjExprMethod((TSlotSig(_, parentTy, _, _, _, _) as ss) actualReturnTyOfSlotSig tinst methTyInst ss /// Is the type 'abstract' in C#-speak -let isAbstractTycon (tycon:Tycon) = +let isAbstractTycon (tycon: Tycon) = if tycon.IsFSharpObjectModelTycon then not tycon.IsFSharpDelegateTycon && tycon.TypeContents.tcaug_abstract @@ -1848,18 +1850,18 @@ let isAbstractTycon (tycon:Tycon) = // Determine if a member/Val/ValRef is an explicit impl //--------------------------------------------------------------------------- -let MemberIsExplicitImpl g (membInfo:ValMemberInfo) = +let MemberIsExplicitImpl g (membInfo: ValMemberInfo) = membInfo.MemberFlags.IsOverrideOrExplicitImpl && match membInfo.ImplementedSlotSigs with | [] -> false | slotsigs -> slotsigs |> List.forall (fun slotsig -> isInterfaceTy g slotsig.ImplementedType) -let ValIsExplicitImpl g (v:Val) = +let ValIsExplicitImpl g (v: Val) = match v.MemberInfo with | Some membInfo -> MemberIsExplicitImpl g membInfo | _ -> false -let ValRefIsExplicitImpl g (vref:ValRef) = ValIsExplicitImpl g vref.Deref +let ValRefIsExplicitImpl g (vref: ValRef) = ValIsExplicitImpl g vref.Deref //--------------------------------------------------------------------------- // Find all type variables in a type, apart from those that have had @@ -1892,7 +1894,7 @@ let unionFreeTycons s1 s2 = let typarOrder = { new System.Collections.Generic.IComparer with - member x.Compare (v1:Typar, v2:Typar) = compare v1.Stamp v2.Stamp } + member x.Compare (v1: Typar, v2: Typar) = compare v1.Stamp v2.Stamp } let emptyFreeTypars = Zset.empty typarOrder let unionFreeTypars s1 s2 = @@ -1913,9 +1915,9 @@ let isEmptyFreeTyvars ftyvs = let unionFreeTyvars fvs1 fvs2 = if fvs1 === emptyFreeTyvars then fvs2 else if fvs2 === emptyFreeTyvars then fvs1 else - { FreeTycons = unionFreeTycons fvs1.FreeTycons fvs2.FreeTycons - FreeTraitSolutions = unionFreeLocals fvs1.FreeTraitSolutions fvs2.FreeTraitSolutions - FreeTypars = unionFreeTypars fvs1.FreeTypars fvs2.FreeTypars } + { FreeTycons = unionFreeTycons fvs1.FreeTycons fvs2.FreeTycons + FreeTraitSolutions = unionFreeLocals fvs1.FreeTraitSolutions fvs2.FreeTraitSolutions + FreeTypars = unionFreeTypars fvs1.FreeTypars fvs2.FreeTypars } type FreeVarOptions = { canCache: bool @@ -1923,9 +1925,9 @@ type FreeVarOptions = includeLocalTycons: bool includeTypars: bool includeLocalTyconReprs: bool - includeRecdFields : bool - includeUnionCases : bool - includeLocals : bool } + includeRecdFields: bool + includeUnionCases: bool + includeLocals: bool } let CollectAllNoCaching = { canCache = false @@ -1934,7 +1936,7 @@ let CollectAllNoCaching = includeLocalTyconReprs = true includeRecdFields = true includeUnionCases = true - includeTypars = true; + includeTypars = true includeLocals = true } let CollectTyparsNoCaching = @@ -1974,7 +1976,7 @@ let CollectAll = includeLocalTyconReprs = true includeRecdFields = true includeUnionCases = true - includeTypars = true; + includeTypars = true includeLocals = true } let CollectTyparsAndLocals = // CollectAll @@ -1998,15 +2000,15 @@ let accFreeLocalTycon opts x acc = if Zset.contains x acc.FreeTycons then acc else { acc with FreeTycons = Zset.add x acc.FreeTycons } -let accFreeTycon opts (tcr:TyconRef) acc = +let accFreeTycon opts (tcref: TyconRef) acc = if not opts.includeLocalTycons then acc - elif tcr.IsLocalRef then accFreeLocalTycon opts tcr.PrivateTarget acc + elif tcref.IsLocalRef then accFreeLocalTycon opts tcref.PrivateTarget acc else acc let rec boundTypars opts tps acc = - // Bound type vars form a recursively-referential set due to constraints, e.g. A : I, B : I + // Bound type vars form a recursively-referential set due to constraints, e.g. A: I, B: I // So collect up free vars in all constraints first, then bind all variables - let acc = List.foldBack (fun (tp:Typar) acc -> accFreeInTyparConstraints opts tp.Constraints acc) tps acc + let acc = List.foldBack (fun (tp: Typar) acc -> accFreeInTyparConstraints opts tp.Constraints acc) tps acc List.foldBack (fun tp acc -> { acc with FreeTypars = Zset.remove tp acc.FreeTypars}) tps acc and accFreeInTyparConstraints opts cxs acc = @@ -2054,21 +2056,21 @@ and accFreeLocalValInTraitSln _opts v fvs = if Zset.contains v fvs.FreeTraitSolutions then fvs else { fvs with FreeTraitSolutions = Zset.add v fvs.FreeTraitSolutions} -and accFreeValRefInTraitSln opts (vref:ValRef) fvs = +and accFreeValRefInTraitSln opts (vref: ValRef) fvs = if vref.IsLocalRef then accFreeLocalValInTraitSln opts vref.PrivateTarget fvs else // non-local values do not contain free variables fvs -and accFreeTyparRef opts (tp:Typar) acc = +and accFreeTyparRef opts (tp: Typar) acc = if not opts.includeTypars then acc else if Zset.contains tp acc.FreeTypars then acc else accFreeInTyparConstraints opts tp.Constraints { acc with FreeTypars = Zset.add tp acc.FreeTypars} -and accFreeInType opts ty acc = +and accFreeInType opts ty acc = match stripTyparEqns ty with | TType_tuple (tupInfo, l) -> accFreeInTypes opts l (accFreeInTupInfo opts tupInfo acc) | TType_anon (anonInfo, l) -> accFreeInTypes opts l (accFreeInTupInfo opts anonInfo.TupInfo acc) @@ -2078,7 +2080,7 @@ and accFreeInType opts ty acc = | [] -> acc // optimization to avoid unneeded call | [h] -> accFreeInType opts h acc // optimization to avoid unneeded call | _ -> accFreeInTypes opts tinst acc - | TType_ucase (UCRef(tc, _), tinst) -> accFreeInTypes opts tinst (accFreeTycon opts tc acc) + | TType_ucase (UCRef(tc, _), tinst) -> accFreeInTypes opts tinst (accFreeTycon opts tc acc) | TType_fun (d, r) -> accFreeInType opts d (accFreeInType opts r acc) | TType_var r -> accFreeTyparRef opts r acc | TType_forall (tps, r) -> unionFreeTyvars (boundTypars opts tps (freeInType opts r)) acc @@ -2094,16 +2096,16 @@ and accFreeInTypes opts tys acc = | h :: t -> accFreeInTypes opts t (accFreeInType opts h acc) and freeInType opts ty = accFreeInType opts ty emptyFreeTyvars -and accFreeInVal opts (v:Val) acc = accFreeInType opts v.val_type acc +and accFreeInVal opts (v: Val) acc = accFreeInType opts v.val_type acc let freeInTypes opts tys = accFreeInTypes opts tys emptyFreeTyvars let freeInVal opts v = accFreeInVal opts v emptyFreeTyvars let freeInTyparConstraints opts v = accFreeInTyparConstraints opts v emptyFreeTyvars let accFreeInTypars opts tps acc = List.foldBack (accFreeTyparRef opts) tps acc -let rec addFreeInModuleTy (mtyp:ModuleOrNamespaceType) acc = +let rec addFreeInModuleTy (mtyp: ModuleOrNamespaceType) acc = QueueList.foldBack (typeOfVal >> accFreeInType CollectAllNoCaching) mtyp.AllValsAndMembers - (QueueList.foldBack (fun (mspec:ModuleOrNamespace) acc -> addFreeInModuleTy mspec.ModuleOrNamespaceType acc) mtyp.AllEntities acc) + (QueueList.foldBack (fun (mspec: ModuleOrNamespace) acc -> addFreeInModuleTy mspec.ModuleOrNamespaceType acc) mtyp.AllEntities acc) let freeInModuleTy mtyp = addFreeInModuleTy mtyp emptyFreeTyvars @@ -2111,29 +2113,35 @@ let freeInModuleTy mtyp = addFreeInModuleTy mtyp emptyFreeTyvars //-------------------------------------------------------------------------- // Free in type, left-to-right order preserved. This is used to determine the // order of type variables for top-level definitions based on their signature, -// so be careful not to change the order. We accumulate in reverse +// so be careful not to change the order. We accumulate in reverse // order. //-------------------------------------------------------------------------- let emptyFreeTyparsLeftToRight = [] let unionFreeTyparsLeftToRight fvs1 fvs2 = ListSet.unionFavourRight typarEq fvs1 fvs2 -let rec boundTyparsLeftToRight g cxFlag thruFlag acc tps = - // Bound type vars form a recursively-referential set due to constraints, e.g. A : I, B : I +let rec boundTyparsLeftToRight g cxFlag thruFlag acc tps = + // Bound type vars form a recursively-referential set due to constraints, e.g. A: I, B: I // So collect up free vars in all constraints first, then bind all variables - List.fold (fun acc (tp:Typar) -> accFreeInTyparConstraintsLeftToRight g cxFlag thruFlag acc tp.Constraints) tps acc + List.fold (fun acc (tp: Typar) -> accFreeInTyparConstraintsLeftToRight g cxFlag thruFlag acc tp.Constraints) tps acc and accFreeInTyparConstraintsLeftToRight g cxFlag thruFlag acc cxs = List.fold (accFreeInTyparConstraintLeftToRight g cxFlag thruFlag) acc cxs and accFreeInTyparConstraintLeftToRight g cxFlag thruFlag acc tpc = match tpc with - | TyparConstraint.CoercesTo(ty, _) -> accFreeInTypeLeftToRight g cxFlag thruFlag acc ty - | TyparConstraint.MayResolveMember (traitInfo, _) -> accFreeInTraitLeftToRight g cxFlag thruFlag acc traitInfo - | TyparConstraint.DefaultsTo(_, rty, _) -> accFreeInTypeLeftToRight g cxFlag thruFlag acc rty - | TyparConstraint.SimpleChoice(tys, _) -> accFreeInTypesLeftToRight g cxFlag thruFlag acc tys - | TyparConstraint.IsEnum(uty, _) -> accFreeInTypeLeftToRight g cxFlag thruFlag acc uty - | TyparConstraint.IsDelegate(aty, bty, _) -> accFreeInTypeLeftToRight g cxFlag thruFlag (accFreeInTypeLeftToRight g cxFlag thruFlag acc aty) bty + | TyparConstraint.CoercesTo(ty, _) -> + accFreeInTypeLeftToRight g cxFlag thruFlag acc ty + | TyparConstraint.MayResolveMember (traitInfo, _) -> + accFreeInTraitLeftToRight g cxFlag thruFlag acc traitInfo + | TyparConstraint.DefaultsTo(_, rty, _) -> + accFreeInTypeLeftToRight g cxFlag thruFlag acc rty + | TyparConstraint.SimpleChoice(tys, _) -> + accFreeInTypesLeftToRight g cxFlag thruFlag acc tys + | TyparConstraint.IsEnum(uty, _) -> + accFreeInTypeLeftToRight g cxFlag thruFlag acc uty + | TyparConstraint.IsDelegate(aty, bty, _) -> + accFreeInTypeLeftToRight g cxFlag thruFlag (accFreeInTypeLeftToRight g cxFlag thruFlag acc aty) bty | TyparConstraint.SupportsComparison _ | TyparConstraint.SupportsEquality _ | TyparConstraint.SupportsNull _ @@ -2142,13 +2150,13 @@ and accFreeInTyparConstraintLeftToRight g cxFlag thruFlag acc tpc = | TyparConstraint.IsReferenceType _ | TyparConstraint.RequiresDefaultConstructor _ -> acc -and accFreeInTraitLeftToRight g cxFlag thruFlag acc (TTrait(tys, _, _, argtys, rty, _)) = +and accFreeInTraitLeftToRight g cxFlag thruFlag acc (TTrait(tys, _, _, argtys, rty, _)) = let acc = accFreeInTypesLeftToRight g cxFlag thruFlag acc tys let acc = accFreeInTypesLeftToRight g cxFlag thruFlag acc argtys let acc = Option.fold (accFreeInTypeLeftToRight g cxFlag thruFlag) acc rty acc -and accFreeTyparRefLeftToRight g cxFlag thruFlag acc (tp:Typar) = +and accFreeTyparRefLeftToRight g cxFlag thruFlag acc (tp: Typar) = if ListSet.contains typarEq tp acc then acc else @@ -2158,21 +2166,29 @@ and accFreeTyparRefLeftToRight g cxFlag thruFlag acc (tp:Typar) = else acc -and accFreeInTypeLeftToRight g cxFlag thruFlag acc ty = - if verbose then dprintf "--> accFreeInTypeLeftToRight \n" +and accFreeInTypeLeftToRight g cxFlag thruFlag acc ty = match (if thruFlag then stripTyEqns g ty else stripTyparEqns ty) with - | TType_anon (anonInfo, l) -> + | TType_anon (anonInfo, anonTys) -> let acc = accFreeInTupInfoLeftToRight g cxFlag thruFlag acc anonInfo.TupInfo - accFreeInTypesLeftToRight g cxFlag thruFlag acc l - | TType_tuple (tupInfo, l) -> + accFreeInTypesLeftToRight g cxFlag thruFlag acc anonTys + | TType_tuple (tupInfo, tupTys) -> let acc = accFreeInTupInfoLeftToRight g cxFlag thruFlag acc tupInfo - accFreeInTypesLeftToRight g cxFlag thruFlag acc l - | TType_app (_, tinst) -> accFreeInTypesLeftToRight g cxFlag thruFlag acc tinst - | TType_ucase (_, tinst) -> accFreeInTypesLeftToRight g cxFlag thruFlag acc tinst - | TType_fun (d, r) -> accFreeInTypeLeftToRight g cxFlag thruFlag (accFreeInTypeLeftToRight g cxFlag thruFlag acc d ) r - | TType_var r -> accFreeTyparRefLeftToRight g cxFlag thruFlag acc r - | TType_forall (tps, r) -> unionFreeTyparsLeftToRight (boundTyparsLeftToRight g cxFlag thruFlag tps (accFreeInTypeLeftToRight g cxFlag thruFlag emptyFreeTyparsLeftToRight r)) acc - | TType_measure unt -> List.foldBack (fun (tp, _) acc -> accFreeTyparRefLeftToRight g cxFlag thruFlag acc tp) (ListMeasureVarOccsWithNonZeroExponents unt) acc + accFreeInTypesLeftToRight g cxFlag thruFlag acc tupTys + | TType_app (_, tinst) -> + accFreeInTypesLeftToRight g cxFlag thruFlag acc tinst + | TType_ucase (_, tinst) -> + accFreeInTypesLeftToRight g cxFlag thruFlag acc tinst + | TType_fun (d, r) -> + let dacc = accFreeInTypeLeftToRight g cxFlag thruFlag acc d + accFreeInTypeLeftToRight g cxFlag thruFlag dacc r + | TType_var r -> + accFreeTyparRefLeftToRight g cxFlag thruFlag acc r + | TType_forall (tps, r) -> + let racc = accFreeInTypeLeftToRight g cxFlag thruFlag emptyFreeTyparsLeftToRight r + unionFreeTyparsLeftToRight (boundTyparsLeftToRight g cxFlag thruFlag tps racc) acc + | TType_measure unt -> + let mvars = ListMeasureVarOccsWithNonZeroExponents unt + List.foldBack (fun (tp, _) acc -> accFreeTyparRefLeftToRight g cxFlag thruFlag acc tp) mvars acc and accFreeInTupInfoLeftToRight _g _cxFlag _thruFlag acc unt = match unt with @@ -2183,12 +2199,18 @@ and accFreeInTypesLeftToRight g cxFlag thruFlag acc tys = | [] -> acc | h :: t -> accFreeInTypesLeftToRight g cxFlag thruFlag (accFreeInTypeLeftToRight g cxFlag thruFlag acc h) t -let freeInTypeLeftToRight g thruFlag ty = accFreeInTypeLeftToRight g true thruFlag emptyFreeTyparsLeftToRight ty |> List.rev -let freeInTypesLeftToRight g thruFlag ty = accFreeInTypesLeftToRight g true thruFlag emptyFreeTyparsLeftToRight ty |> List.rev -let freeInTypesLeftToRightSkippingConstraints g ty = accFreeInTypesLeftToRight g false true emptyFreeTyparsLeftToRight ty |> List.rev +let freeInTypeLeftToRight g thruFlag ty = + accFreeInTypeLeftToRight g true thruFlag emptyFreeTyparsLeftToRight ty |> List.rev + +let freeInTypesLeftToRight g thruFlag ty = + accFreeInTypesLeftToRight g true thruFlag emptyFreeTyparsLeftToRight ty |> List.rev + +let freeInTypesLeftToRightSkippingConstraints g ty = + accFreeInTypesLeftToRight g false true emptyFreeTyparsLeftToRight ty |> List.rev -let valOfBind (b:Binding) = b.Var -let valsOfBinds (binds:Bindings) = binds |> List.map (fun b -> b.Var) +let valOfBind (b: Binding) = b.Var + +let valsOfBinds (binds: Bindings) = binds |> List.map (fun b -> b.Var) //-------------------------------------------------------------------------- // Values representing member functions on F# types @@ -2205,7 +2227,7 @@ let GetMemberTypeInFSharpForm g memberFlags arities ty m = | [] -> errorR(InternalError("value does not have a valid member type", m)) argInfos - | _::t -> t + | _:: t -> t else argInfos tps, argInfos, rty, retInfo @@ -2213,11 +2235,11 @@ let GetMemberTypeInFSharpForm g memberFlags arities ty m = // It will also always have an arity (inferred from syntax). let checkMemberVal membInfo arity m = match membInfo, arity with - | None, _ -> error(InternalError("checkMemberVal - no membInfo" , m)) + | None, _ -> error(InternalError("checkMemberVal - no membInfo", m)) | _, None -> error(InternalError("checkMemberVal - no arity", m)) | Some membInfo, Some arity -> (membInfo, arity) -let checkMemberValRef (vref:ValRef) = +let checkMemberValRef (vref: ValRef) = checkMemberVal vref.MemberInfo vref.ValReprInfo vref.Range let GetTopValTypeInCompiledForm g topValInfo ty m = @@ -2226,11 +2248,11 @@ let GetTopValTypeInCompiledForm g topValInfo ty m = let paramArgInfos = match paramArgInfos, topValInfo.ArgInfos with // static member and module value unit argument elimination - | [[(_argType, _)]] , [[]] -> + | [[(_argType, _)]], [[]] -> //assert isUnitTy g argType [[]] // instance member unit argument elimination - | [objInfo;[(_argType, _)]] , [[_objArg];[]] -> + | [objInfo;[(_argType, _)]], [[_objArg];[]] -> //assert isUnitTy g argType [objInfo; []] | _ -> @@ -2252,11 +2274,11 @@ let GetMemberTypeInMemberForm g memberFlags topValInfo ty m = let paramArgInfos = match paramArgInfos, topValInfo.ArgInfos with // static member and module value unit argument elimination - | [[(argType, _)]] , [[]] -> + | [[(argType, _)]], [[]] -> assert isUnitTy g argType [[]] // instance member unit argument elimination - | [[(argType, _)]] , [[_objArg];[]] -> + | [[(argType, _)]], [[_objArg];[]] -> assert isUnitTy g argType [[]] | _ -> @@ -2264,16 +2286,16 @@ let GetMemberTypeInMemberForm g memberFlags topValInfo ty m = let rty = if isUnitTy g rty then None else Some rty (tps, paramArgInfos, rty, retInfo) -let GetTypeOfMemberInMemberForm g (vref:ValRef) = +let GetTypeOfMemberInMemberForm g (vref: ValRef) = //assert (not vref.IsExtensionMember) let membInfo, topValInfo = checkMemberValRef vref GetMemberTypeInMemberForm g membInfo.MemberFlags topValInfo vref.Type vref.Range -let GetTypeOfMemberInFSharpForm g (vref:ValRef) = +let GetTypeOfMemberInFSharpForm g (vref: ValRef) = let membInfo, topValInfo = checkMemberValRef vref GetMemberTypeInFSharpForm g membInfo.MemberFlags topValInfo vref.Type vref.Range -let PartitionValTyparsForApparentEnclosingType g (v:Val) = +let PartitionValTyparsForApparentEnclosingType g (v: Val) = match v.ValReprInfo with | None -> error(InternalError("PartitionValTypars: not a top value", v.Range)) | Some arities -> @@ -2289,7 +2311,7 @@ let PartitionValTyparsForApparentEnclosingType g (v:Val) = /// Match up the type variables on an member value with the type /// variables on the apparent enclosing type -let PartitionValTypars g (v:Val) = +let PartitionValTypars g (v: Val) = match v.ValReprInfo with | None -> error(InternalError("PartitionValTypars: not a top value", v.Range)) | Some arities -> @@ -2302,7 +2324,7 @@ let PartitionValTypars g (v:Val) = let PartitionValRefTypars g (vref: ValRef) = PartitionValTypars g vref.Deref /// Get the arguments for an F# value that represents an object model method -let ArgInfosOfMemberVal g (v:Val) = +let ArgInfosOfMemberVal g (v: Val) = let membInfo, topValInfo = checkMemberVal v.MemberInfo v.ValReprInfo v.Range let _, arginfos, _, _ = GetMemberTypeInMemberForm g membInfo.MemberFlags topValInfo v.Type v.Range arginfos @@ -2310,15 +2332,15 @@ let ArgInfosOfMemberVal g (v:Val) = let ArgInfosOfMember g (vref: ValRef) = ArgInfosOfMemberVal g vref.Deref -let GetFSharpViewOfReturnType (g:TcGlobals) retTy = +let GetFSharpViewOfReturnType (g: TcGlobals) retTy = match retTy with | None -> g.unit_ty - | Some retTy -> retTy + | Some retTy -> retTy /// Get the property "type" (getter return type) for an F# value that represents a getter or setter /// of an object model property. -let ReturnTypeOfPropertyVal g (v:Val) = +let ReturnTypeOfPropertyVal g (v: Val) = let membInfo, topValInfo = checkMemberVal v.MemberInfo v.ValReprInfo v.Range match membInfo.MemberFlags.MemberKind with | MemberKind.PropertySet -> @@ -2326,7 +2348,7 @@ let ReturnTypeOfPropertyVal g (v:Val) = if not arginfos.IsEmpty && not arginfos.Head.IsEmpty then arginfos.Head |> List.last |> fst else - error(Error(FSComp.SR.tastValueDoesNotHaveSetterType(), v.Range)); + error(Error(FSComp.SR.tastValueDoesNotHaveSetterType(), v.Range)) | MemberKind.PropertyGet -> let _, _, rty, _ = GetMemberTypeInMemberForm g membInfo.MemberFlags topValInfo v.Type v.Range GetFSharpViewOfReturnType g rty @@ -2335,7 +2357,7 @@ let ReturnTypeOfPropertyVal g (v:Val) = /// Get the property arguments for an F# value that represents a getter or setter /// of an object model property. -let ArgInfosOfPropertyVal g (v:Val) = +let ArgInfosOfPropertyVal g (v: Val) = let membInfo, topValInfo = checkMemberVal v.MemberInfo v.ValReprInfo v.Range match membInfo.MemberFlags.MemberKind with | MemberKind.PropertyGet -> @@ -2345,7 +2367,7 @@ let ArgInfosOfPropertyVal g (v:Val) = if not arginfos.IsEmpty && not arginfos.Head.IsEmpty then arginfos.Head |> List.frontAndBack |> fst else - error(Error(FSComp.SR.tastValueDoesNotHaveSetterType(), v.Range)); + error(Error(FSComp.SR.tastValueDoesNotHaveSetterType(), v.Range)) | _ -> error(InternalError("ArgInfosOfPropertyVal", v.Range)) @@ -2353,7 +2375,7 @@ let ArgInfosOfPropertyVal g (v:Val) = // Generalize type constructors to types //--------------------------------------------------------------------------- -let generalTyconRefInst (tc:TyconRef) = generalizeTypars tc.TyparsNoRange +let generalTyconRefInst (tc: TyconRef) = generalizeTypars tc.TyparsNoRange let generalizeTyconRef tc = let tinst = generalTyconRefInst tc @@ -2373,7 +2395,7 @@ let prefixOfStaticReq s = | NoStaticReq -> "'" | HeadTypeStaticReq -> " ^" -let prefixOfRigidTypar (typar:Typar) = +let prefixOfRigidTypar (typar: Typar) = if (typar.Rigidity <> TyparRigidity.Rigid) then "_" else "" //--------------------------------------------------------------------------- @@ -2383,39 +2405,39 @@ let prefixOfRigidTypar (typar:Typar) = type TyparConstraintsWithTypars = (Typar * TyparConstraint) list module PrettyTypes = - let newPrettyTypar (tp:Typar) nm = + let newPrettyTypar (tp: Typar) nm = NewTypar (tp.Kind, tp.Rigidity, Typar(ident(nm, tp.Range), tp.StaticReq, false), false, TyparDynamicReq.Yes, [], false, false) let NewPrettyTypars renaming tps names = let niceTypars = List.map2 newPrettyTypar tps names let tl, _tt = mkTyparToTyparRenaming tps niceTypars in let renaming = renaming @ tl - (tps, niceTypars) ||> List.iter2 (fun tp tpnice -> tpnice.SetConstraints (instTyparConstraints renaming tp.Constraints)) ; + (tps, niceTypars) ||> List.iter2 (fun tp tpnice -> tpnice.SetConstraints (instTyparConstraints renaming tp.Constraints)) niceTypars, renaming // We choose names for type parameters from 'a'..'t' // We choose names for unit-of-measure from 'u'..'z' // If we run off the end of these ranges, we use 'aX' for positive integer X or 'uX' for positive integer X // Finally, we skip any names already in use - let NeedsPrettyTyparName (tp:Typar) = + let NeedsPrettyTyparName (tp: Typar) = tp.IsCompilerGenerated && tp.ILName.IsNone && (tp.typar_id.idText = unassignedTyparName) let PrettyTyparNames pred alreadyInUse tps = - let rec choose (tps:Typar list) (typeIndex, measureIndex) acc = + let rec choose (tps: Typar list) (typeIndex, measureIndex) acc = match tps with | [] -> List.rev acc - | tp::tps -> + | tp:: tps -> // Use a particular name, possibly after incrementing indexes let useThisName (nm, typeIndex, measureIndex) = - choose tps (typeIndex, measureIndex) (nm::acc) + choose tps (typeIndex, measureIndex) (nm:: acc) // Give up, try again with incremented indexes let tryAgain (typeIndex, measureIndex) = - choose (tp::tps) (typeIndex, measureIndex) acc + choose (tp:: tps) (typeIndex, measureIndex) acc let tryName (nm, typeIndex, measureIndex) f = if List.contains nm alreadyInUse then @@ -2432,7 +2454,7 @@ module PrettyTypes = let nm = if i < letters then String.make 1 (char(int baseName + i)) else String.make 1 baseName + string (i-letters+1) - tryName (nm, typeIndex, measureIndex) (fun () -> + tryName (nm, typeIndex, measureIndex) (fun () -> tryAgain (typeIndex, measureIndex)) else @@ -2446,7 +2468,6 @@ module PrettyTypes = tryAgain (typeIndex, measureIndex))) else useThisName (tp.Name, typeIndex, measureIndex) - choose tps (0, 0) [] @@ -2457,14 +2478,14 @@ module PrettyTypes = match tps with | [] -> List.rev keep, List.rev change | tp :: rest -> - if not (NeedsPrettyTyparName tp) && (not (keep |> List.exists (fun tp2 -> tp.Name = tp2.Name))) then + if not (NeedsPrettyTyparName tp) && (not (keep |> List.exists (fun tp2 -> tp.Name = tp2.Name))) then computeKeep (tp :: keep) change rest else computeKeep keep (tp :: change) rest let keep, change = computeKeep [] [] ftps - // change |> List.iter (fun tp -> dprintf "change typar: %s %s %d\n" tp.Name (tp.DisplayName) (stamp_of_typar tp)); - // keep |> List.iter (fun tp -> dprintf "keep typar: %s %s %d\n" tp.Name (tp.DisplayName) (stamp_of_typar tp)); + // change |> List.iter (fun tp -> dprintf "change typar: %s %s %d\n" tp.Name (tp.DisplayName) (stamp_of_typar tp)) + // keep |> List.iter (fun tp -> dprintf "keep typar: %s %s %d\n" tp.Name (tp.DisplayName) (stamp_of_typar tp)) let alreadyInUse = keep |> List.map (fun x -> x.Name) let names = PrettyTyparNames (fun x -> List.memq x change) alreadyInUse ftps @@ -2479,14 +2500,14 @@ module PrettyTypes = let prettyThings = mapTys (instType renaming) tauThings // niceTypars |> List.iter (fun tp -> dprintf "nice typar: %d\n" (stamp_of_typar tp)); * - let tpconstraints = niceTypars |> List.collect (fun tpnice -> List.map (fun tpc -> tpnice, tpc) tpnice.Constraints) + let tpconstraints = niceTypars |> List.collect (fun tpnice -> List.map (fun tpc -> tpnice, tpc) tpnice.Constraints) prettyThings, tpconstraints let PrettifyType g x = PrettifyThings g id id x let PrettifyTypePair g x = PrettifyThings g (fun f -> foldPair (f, f)) (fun f -> mapPair (f, f)) x - let PrettifyTypes g x = PrettifyThings g List.fold List.map x - let PrettifyCurriedTypes g x = PrettifyThings g (fun f -> List.fold (List.fold f)) List.mapSquared x + let PrettifyTypes g x = PrettifyThings g List.fold List.map x + let PrettifyCurriedTypes g x = PrettifyThings g (fun f -> List.fold (List.fold f)) List.mapSquared x let PrettifyCurriedSigTypes g x = PrettifyThings g (fun f -> foldPair (List.fold (List.fold f), f)) (fun f -> mapPair (List.mapSquared f, f)) x // Badly formed code may instantiate rigid declared typars to types. @@ -2500,10 +2521,10 @@ module PrettyTypes = let foldTypar f z (x: Typar) = foldOn mkTyparTy f z x let mapTypar g f (x: Typar) : Typar = (mkTyparTy >> f >> safeDestAnyParTy x g) x - let foldTypars f z (x: Typars) = List.fold (foldTypar f) z x + let foldTypars f z (x: Typars) = List.fold (foldTypar f) z x let mapTypars g f (x: Typars) : Typars = List.map (mapTypar g f) x - let foldTyparInst f z (x: TyparInst) = List.fold (foldPair (foldTypar f, f)) z x + let foldTyparInst f z (x: TyparInst) = List.fold (foldPair (foldTypar f, f)) z x let mapTyparInst g f (x: TyparInst) : TyparInst = List.map (mapPair (mapTypar g f, f)) x let PrettifyInstAndTyparsAndType g x = @@ -2512,10 +2533,10 @@ module PrettyTypes = (fun f-> mapTriple (mapTyparInst g f, mapTypars g f, f)) x - let PrettifyInstAndUncurriedSig g (x: TyparInst * UncurriedArgInfos * TType) = + let PrettifyInstAndUncurriedSig g (x: TyparInst * UncurriedArgInfos * TType) = PrettifyThings g (fun f -> foldTriple (foldTyparInst f, foldUnurriedArgInfos f, f)) - (fun f -> mapTriple (mapTyparInst g f, List.map (map1Of2 f), f)) + (fun f -> mapTriple (mapTyparInst g f, List.map (map1Of2 f), f)) x let PrettifyInstAndCurriedSig g (x: TyparInst * TTypes * CurriedArgInfos * TType) = @@ -2560,9 +2581,9 @@ module SimplifyTypes = | TType_ucase (_, tys) | TType_anon (_, tys) | TType_tuple (_, tys) -> List.fold (foldTypeButNotConstraints f) z tys - | TType_fun (s, t) -> foldTypeButNotConstraints f (foldTypeButNotConstraints f z s) t - | TType_var _ -> z - | TType_measure _ -> z + | TType_fun (s, t) -> foldTypeButNotConstraints f (foldTypeButNotConstraints f z s) t + | TType_var _ -> z + | TType_measure _ -> z let incM x m = if Zmap.mem x m then Zmap.add x (1 + Zmap.find x m) m @@ -2570,7 +2591,7 @@ module SimplifyTypes = let accTyparCounts z ty = // Walk type to determine typars and their counts (for pprinting decisions) - foldTypeButNotConstraints (fun z ty -> match ty with | TType_var tp when tp.Rigidity = TyparRigidity.Rigid -> incM tp z | _ -> z) z ty + foldTypeButNotConstraints (fun z ty -> match ty with | TType_var tp when tp.Rigidity = TyparRigidity.Rigid -> incM tp z | _ -> z) z ty let emptyTyparCounts = Zmap.empty typarOrder @@ -2578,12 +2599,12 @@ module SimplifyTypes = let accTyparCountsMulti acc l = List.fold accTyparCounts acc l type TypeSimplificationInfo = - { singletons : Typar Zset - inplaceConstraints : Zmap - postfixConstraints : (Typar * TyparConstraint) list } + { singletons: Typar Zset + inplaceConstraints: Zmap + postfixConstraints: (Typar * TyparConstraint) list } let typeSimplificationInfo0 = - { singletons = Zset.empty typarOrder + { singletons = Zset.empty typarOrder inplaceConstraints = Zmap.empty typarOrder postfixConstraints = [] } @@ -2605,7 +2626,7 @@ module SimplifyTypes = tp.Constraints.Length = 1) let inplace = inplace |> List.map (function (tp, TyparConstraint.CoercesTo(ty, _)) -> tp, ty | _ -> failwith "not isTTyparCoercesToType") - { singletons = singletons + { singletons = singletons inplaceConstraints = Zmap.ofList typarOrder inplace postfixConstraints = postfix } let CollectInfo simplify tys cxs = @@ -2617,28 +2638,28 @@ module SimplifyTypes = [] type DisplayEnv = - { includeStaticParametersInTypeNames : bool - openTopPathsSorted : Lazy - openTopPathsRaw : string list list - shortTypeNames : bool - suppressNestedTypes : bool - maxMembers : int option - showObsoleteMembers : bool - showHiddenMembers : bool - showTyparBinding : bool - showImperativeTyparAnnotations : bool - suppressInlineKeyword : bool - suppressMutableKeyword : bool - showMemberContainers : bool - shortConstraints : bool - useColonForReturnType : bool - showAttributes : bool - showOverrides : bool - showConstraintTyparAnnotations : bool - abbreviateAdditionalConstraints : bool - showTyparDefaultConstraints : bool - g : TcGlobals - contextAccessibility : Accessibility + { includeStaticParametersInTypeNames: bool + openTopPathsSorted: Lazy + openTopPathsRaw: string list list + shortTypeNames: bool + suppressNestedTypes: bool + maxMembers: int option + showObsoleteMembers: bool + showHiddenMembers: bool + showTyparBinding: bool + showImperativeTyparAnnotations: bool + suppressInlineKeyword: bool + suppressMutableKeyword: bool + showMemberContainers: bool + shortConstraints: bool + useColonForReturnType: bool + showAttributes: bool + showOverrides: bool + showConstraintTyparAnnotations: bool + abbreviateAdditionalConstraints: bool + showTyparDefaultConstraints: bool + g: TcGlobals + contextAccessibility: Accessibility generatedValueLayout : (Val -> layout option) } member x.SetOpenPaths(paths) = @@ -2679,12 +2700,12 @@ type DisplayEnv = member denv.AddOpenModuleOrNamespace (modref: ModuleOrNamespaceRef) = denv.AddOpenPath (fullCompPathOfModuleOrNamespace modref.Deref).DemangledPath - member denv.AddAccessibility access = + member denv.AddAccessibility access = { denv with contextAccessibility = combineAccess denv.contextAccessibility access } let (+.+) s1 s2 = if s1 = "" then s2 else s1+"."+s2 -let layoutOfPath p = +let layoutOfPath p = sepListL SepL.dot (List.map (tagNamespace >> wordL) p) let fullNameOfParentOfPubPath pp = @@ -2702,11 +2723,11 @@ let fullNameOfPubPathAsLayout (PubPath(p)) = layoutOfPath (Array.toList p) let fullNameOfParentOfNonLocalEntityRef (nlr: NonLocalEntityRef) = if nlr.Path.Length < 2 then ValueNone - else ValueSome (textOfPath nlr.EnclosingMangledPath) // <--- BAD BAD BAD: this is a mangled path. This is wrong for nested modules + else ValueSome (textOfPath nlr.EnclosingMangledPath) let fullNameOfParentOfNonLocalEntityRefAsLayout (nlr: NonLocalEntityRef) = if nlr.Path.Length < 2 then ValueNone - else ValueSome (layoutOfPath (List.ofArray nlr.EnclosingMangledPath)) // <--- BAD BAD BAD: this is a mangled path. This is wrong for nested modules + else ValueSome (layoutOfPath (List.ofArray nlr.EnclosingMangledPath)) let fullNameOfParentOfEntityRef eref = match eref with @@ -2741,14 +2762,15 @@ let tagEntityRefName (xref: EntityRef) name = elif xref.IsRecordTycon then tagRecord name else tagClass name -let fullDisplayTextOfTyconRef r = fullNameOfEntityRef (fun (tc:TyconRef) -> tc.DisplayNameWithStaticParametersAndUnderscoreTypars) r +let fullDisplayTextOfTyconRef (tc: TyconRef) = + fullNameOfEntityRef (fun tc -> tc.DisplayNameWithStaticParametersAndUnderscoreTypars) tc let fullNameOfEntityRefAsLayout nmF (xref: EntityRef) = let navigableText = tagEntityRefName xref (nmF xref) |> mkNav xref.DefinitionRange |> wordL - match fullNameOfParentOfEntityRefAsLayout xref with + match fullNameOfParentOfEntityRefAsLayout xref with | ValueNone -> navigableText | ValueSome pathText -> pathText ^^ SepL.dot ^^ navigableText @@ -2759,7 +2781,7 @@ let fullNameOfParentOfValRef vref = | None -> ValueNone | Some (ValPubPath(pp, _)) -> ValueSome(fullNameOfPubPath pp) | VRefNonLocal nlr -> - ValueSome (fullNameOfEntityRef (fun (x:EntityRef) -> x.DemangledModuleOrNamespaceName) nlr.EnclosingEntity) + ValueSome (fullNameOfEntityRef (fun (x: EntityRef) -> x.DemangledModuleOrNamespaceName) nlr.EnclosingEntity) let fullNameOfParentOfValRefAsLayout vref = match vref with @@ -2768,25 +2790,25 @@ let fullNameOfParentOfValRefAsLayout vref = | None -> ValueNone | Some (ValPubPath(pp, _)) -> ValueSome(fullNameOfPubPathAsLayout pp) | VRefNonLocal nlr -> - ValueSome (fullNameOfEntityRefAsLayout (fun (x:EntityRef) -> x.DemangledModuleOrNamespaceName) nlr.EnclosingEntity) + ValueSome (fullNameOfEntityRefAsLayout (fun (x: EntityRef) -> x.DemangledModuleOrNamespaceName) nlr.EnclosingEntity) let fullDisplayTextOfParentOfModRef r = fullNameOfParentOfEntityRef r -let fullDisplayTextOfModRef r = fullNameOfEntityRef (fun (x:EntityRef) -> x.DemangledModuleOrNamespaceName) r -let fullDisplayTextOfTyconRefAsLayout r = fullNameOfEntityRefAsLayout (fun (tc:TyconRef) -> tc.DisplayNameWithStaticParametersAndUnderscoreTypars) r -let fullDisplayTextOfExnRef r = fullNameOfEntityRef (fun (tc:TyconRef) -> tc.DisplayNameWithStaticParametersAndUnderscoreTypars) r -let fullDisplayTextOfExnRefAsLayout r = fullNameOfEntityRefAsLayout (fun (tc:TyconRef) -> tc.DisplayNameWithStaticParametersAndUnderscoreTypars) r +let fullDisplayTextOfModRef r = fullNameOfEntityRef (fun (x: EntityRef) -> x.DemangledModuleOrNamespaceName) r +let fullDisplayTextOfTyconRefAsLayout r = fullNameOfEntityRefAsLayout (fun (tc: TyconRef) -> tc.DisplayNameWithStaticParametersAndUnderscoreTypars) r +let fullDisplayTextOfExnRef r = fullNameOfEntityRef (fun (tc: TyconRef) -> tc.DisplayNameWithStaticParametersAndUnderscoreTypars) r +let fullDisplayTextOfExnRefAsLayout r = fullNameOfEntityRefAsLayout (fun (tc: TyconRef) -> tc.DisplayNameWithStaticParametersAndUnderscoreTypars) r -let fullDisplayTextOfUnionCaseRef (ucref:UnionCaseRef) = fullDisplayTextOfTyconRef ucref.TyconRef +.+ ucref.CaseName -let fullDisplayTextOfRecdFieldRef (rfref:RecdFieldRef) = fullDisplayTextOfTyconRef rfref.TyconRef +.+ rfref.FieldName +let fullDisplayTextOfUnionCaseRef (ucref: UnionCaseRef) = fullDisplayTextOfTyconRef ucref.TyconRef +.+ ucref.CaseName +let fullDisplayTextOfRecdFieldRef (rfref: RecdFieldRef) = fullDisplayTextOfTyconRef rfref.TyconRef +.+ rfref.FieldName -let fullDisplayTextOfValRef (vref:ValRef) = - match fullNameOfParentOfValRef vref with +let fullDisplayTextOfValRef (vref: ValRef) = + match fullNameOfParentOfValRef vref with | ValueNone -> vref.DisplayName | ValueSome pathText -> pathText +.+ vref.DisplayName -let fullDisplayTextOfValRefAsLayout (vref:ValRef) = +let fullDisplayTextOfValRefAsLayout (vref: ValRef) = let n = match vref.MemberInfo with | None -> @@ -2800,14 +2822,14 @@ let fullDisplayTextOfValRefAsLayout (vref:ValRef) = | MemberKind.ClassConstructor | MemberKind.Constructor -> tagMethod vref.DisplayName | MemberKind.Member -> tagMember vref.DisplayName - match fullNameOfParentOfValRefAsLayout vref with + match fullNameOfParentOfValRefAsLayout vref with | ValueNone -> wordL n | ValueSome pathText -> pathText ^^ SepL.dot ^^ wordL n //pathText +.+ vref.DisplayName -let fullMangledPathToTyconRef (tcref:TyconRef) = +let fullMangledPathToTyconRef (tcref: TyconRef) = match tcref with | ERefLocal _ -> (match tcref.PublicPath with None -> [| |] | Some pp -> pp.EnclosingPath) | ERefNonLocal nlr -> nlr.EnclosingMangledPath @@ -2818,13 +2840,13 @@ let qualifiedMangledNameOfTyconRef tcref nm = let rec firstEq p1 p2 = match p1 with | [] -> true - | h1::t1 -> + | h1:: t1 -> match p2 with - | h2::t2 -> h1 = h2 && firstEq t1 t2 + | h2:: t2 -> h1 = h2 && firstEq t1 t2 | _ -> false let rec firstRem p1 p2 = - match p1 with [] -> p2 | _::t1 -> firstRem t1 (List.tail p2) + match p1 with [] -> p2 | _:: t1 -> firstRem t1 (List.tail p2) let trimPathByDisplayEnv denv path = let findOpenedNamespace openedPath = @@ -2836,10 +2858,10 @@ let trimPathByDisplayEnv denv path = match List.tryPick findOpenedNamespace (denv.openTopPathsSorted.Force()) with | Some s -> s - | None -> if isNil path then "" else textOfPath path + "." + | None -> if isNil path then "" else textOfPath path + "." -let superOfTycon (g:TcGlobals) (tycon:Tycon) = +let superOfTycon (g: TcGlobals) (tycon: Tycon) = match tycon.TypeContents.tcaug_super with | None -> g.obj_ty | Some ty -> ty @@ -2849,12 +2871,12 @@ let superOfTycon (g:TcGlobals) (tycon:Tycon) = //---------------------------------------------------------------------------- // AbsIL view of attributes (we read these from .NET binaries) -let isILAttribByName (tencl:string list, tname: string) (attr: ILAttribute) = +let isILAttribByName (tencl: string list, tname: string) (attr: ILAttribute) = (attr.Method.DeclaringType.TypeSpec.Name = tname) && (attr.Method.DeclaringType.TypeSpec.Enclosing = tencl) // AbsIL view of attributes (we read these from .NET binaries). The comparison is done by name. -let isILAttrib (tref:ILTypeRef) (attr: ILAttribute) = +let isILAttrib (tref: ILTypeRef) (attr: ILAttribute) = isILAttribByName (tref.Enclosing, tref.Name) attr // REVIEW: consider supporting querying on Abstract IL custom attributes. @@ -2864,18 +2886,18 @@ let isILAttrib (tref:ILTypeRef) (attr: ILAttribute) = let HasILAttribute tref (attrs: ILAttributes) = attrs.AsArray |> Array.exists (isILAttrib tref) -let TryDecodeILAttribute (g:TcGlobals) tref (attrs: ILAttributes) = - attrs.AsArray |> Array.tryPick (fun x -> if isILAttrib tref x then Some(decodeILAttribData g.ilg x) else None) +let TryDecodeILAttribute (g: TcGlobals) tref (attrs: ILAttributes) = + attrs.AsArray |> Array.tryPick (fun x -> if isILAttrib tref x then Some(decodeILAttribData g.ilg x) else None) // F# view of attributes (these get converted to AbsIL attributes in ilxgen) -let IsMatchingFSharpAttribute g (AttribInfo(_, tcref)) (Attrib(tcref2, _, _, _, _, _, _)) = tyconRefEq g tcref tcref2 +let IsMatchingFSharpAttribute g (AttribInfo(_, tcref)) (Attrib(tcref2, _, _, _, _, _, _)) = tyconRefEq g tcref tcref2 let HasFSharpAttribute g tref attrs = List.exists (IsMatchingFSharpAttribute g tref) attrs let findAttrib g tref attrs = List.find (IsMatchingFSharpAttribute g tref) attrs let TryFindFSharpAttribute g tref attrs = List.tryFind (IsMatchingFSharpAttribute g tref) attrs let TryFindFSharpAttributeOpt g tref attrs = match tref with None -> None | Some tref -> List.tryFind (IsMatchingFSharpAttribute g tref) attrs let HasFSharpAttributeOpt g trefOpt attrs = match trefOpt with Some tref -> List.exists (IsMatchingFSharpAttribute g tref) attrs | _ -> false -let IsMatchingFSharpAttributeOpt g attrOpt (Attrib(tcref2, _, _, _, _, _, _)) = match attrOpt with Some ((AttribInfo(_, tcref))) -> tyconRefEq g tcref tcref2 | _ -> false +let IsMatchingFSharpAttributeOpt g attrOpt (Attrib(tcref2, _, _, _, _, _, _)) = match attrOpt with Some ((AttribInfo(_, tcref))) -> tyconRefEq g tcref tcref2 | _ -> false let (|ExtractAttribNamedArg|_|) nm args = args |> List.tryPick (function (AttribNamedArg(nm2, _, _, v)) when nm = nm2 -> Some v | _ -> None) @@ -2916,7 +2938,7 @@ let TryFindILAttributeOpt attr attrs = /// provided attributes. // // This is used for AttributeUsageAttribute, DefaultMemberAttribute and ConditionalAttribute (on attribute types) -let TryBindTyconRefAttribute g (m:range) (AttribInfo (atref, _) as args) (tcref:TyconRef) f1 f2 f3 = +let TryBindTyconRefAttribute g (m: range) (AttribInfo (atref, _) as args) (tcref: TyconRef) f1 f2 f3 = ignore m; ignore f3 match metadataOfTycon tcref.Deref with #if !NO_EXTENSIONTYPING @@ -2935,39 +2957,39 @@ let TryBindTyconRefAttribute g (m:range) (AttribInfo (atref, _) as args) (tcref: | Some attr -> f2 attr | _ -> None -let TryFindTyconRefBoolAttribute g m attribSpec tcref = +let TryFindTyconRefBoolAttribute g m attribSpec tcref = TryBindTyconRefAttribute g m attribSpec tcref (function | ([ ], _) -> Some true | ([ILAttribElem.Bool (v) ], _) -> Some v | _ -> None) (function - | (Attrib(_, _, [ ], _, _, _, _)) -> Some true - | (Attrib(_, _, [ AttribBoolArg v ], _, _, _, _)) -> Some v + | (Attrib(_, _, [ ], _, _, _, _)) -> Some true + | (Attrib(_, _, [ AttribBoolArg v ], _, _, _, _)) -> Some v | _ -> None) (function | ([ ], _) -> Some true | ([ Some ((:? bool as v) : obj) ], _) -> Some v | _ -> None) -let TryFindAttributeUsageAttribute g m tcref = +let TryFindAttributeUsageAttribute g m tcref = TryBindTyconRefAttribute g m g.attrib_AttributeUsageAttribute tcref - (fun (_, named) -> named |> List.tryPick (function ("AllowMultiple", _, _, ILAttribElem.Bool res) -> Some res | _ -> None)) + (fun (_, named) -> named |> List.tryPick (function ("AllowMultiple", _, _, ILAttribElem.Bool res) -> Some res | _ -> None)) (fun (Attrib(_, _, _, named, _, _, _)) -> named |> List.tryPick (function AttribNamedArg("AllowMultiple", _, _, AttribBoolArg(res) ) -> Some res | _ -> None)) - (fun (_, named) -> named |> List.tryPick (function ("AllowMultiple", Some ((:? bool as res) : obj)) -> Some res | _ -> None)) + (fun (_, named) -> named |> List.tryPick (function ("AllowMultiple", Some ((:? bool as res) : obj)) -> Some res | _ -> None)) /// 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) -let TryFindTyconRefStringAttribute g m attribSpec tcref = +let TryFindTyconRefStringAttribute g m attribSpec tcref = TryBindTyconRefAttribute g m attribSpec tcref (function ([ILAttribElem.String (Some(msg)) ], _) -> Some msg | _ -> None) - (function (Attrib(_, _, [ AttribStringArg(msg) ], _, _, _, _)) -> Some msg | _ -> None) + (function (Attrib(_, _, [ AttribStringArg(msg) ], _, _, _, _)) -> Some msg | _ -> None) (function ([ Some ((:? string as msg) : obj) ], _) -> Some msg | _ -> None) /// Check if a type definition has a specific attribute -let TyconRefHasAttribute g m attribSpec tcref = +let TyconRefHasAttribute g m attribSpec tcref = TryBindTyconRefAttribute g m attribSpec tcref (fun _ -> Some ()) (fun _ -> Some ()) @@ -3000,7 +3022,7 @@ let isSpanLikeTyconRef g m tcref = not (isByrefTyconRef g tcref) let isByrefLikeTy g m ty = - ty |> stripTyEqns g |> (function TType_app(tcref, _) -> isByrefLikeTyconRef g m tcref | _ -> false) + ty |> stripTyEqns g |> (function TType_app(tcref, _) -> isByrefLikeTyconRef g m tcref | _ -> false) let isSpanLikeTy g m ty = isByrefLikeTy g m ty && @@ -3025,7 +3047,7 @@ let destNativePtrTy g ty = | TType_app(tcref, [x]) when tyconRefEq g g.nativeptr_tcr tcref -> x | _ -> failwith "destNativePtrTy: not a native ptr type" -let isRefCellTy g ty = +let isRefCellTy g ty = match tryDestAppTy g ty with | ValueNone -> false | ValueSome tcref -> tyconRefEq g g.refcell_tcr_canon tcref @@ -3035,22 +3057,22 @@ let destRefCellTy g ty = | TType_app(tcref, [x]) when tyconRefEq g g.refcell_tcr_canon tcref -> x | _ -> failwith "destRefCellTy: not a ref type" -let StripSelfRefCell(g:TcGlobals, baseOrThisInfo:ValBaseOrThisInfo, tau: TType) : TType = +let StripSelfRefCell(g: TcGlobals, baseOrThisInfo: ValBaseOrThisInfo, tau: TType) : TType = if baseOrThisInfo = CtorThisVal && isRefCellTy g tau then destRefCellTy g tau else tau -let mkRefCellTy (g:TcGlobals) ty = TType_app(g.refcell_tcr_nice, [ty]) +let mkRefCellTy (g: TcGlobals) ty = TType_app(g.refcell_tcr_nice, [ty]) -let mkLazyTy (g:TcGlobals) ty = TType_app(g.lazy_tcr_nice, [ty]) +let mkLazyTy (g: TcGlobals) ty = TType_app(g.lazy_tcr_nice, [ty]) -let mkPrintfFormatTy (g:TcGlobals) aty bty cty dty ety = TType_app(g.format_tcr, [aty;bty;cty;dty; ety]) +let mkPrintfFormatTy (g: TcGlobals) aty bty cty dty ety = TType_app(g.format_tcr, [aty;bty;cty;dty; ety]) -let mkOptionTy (g:TcGlobals) ty = TType_app (g.option_tcr_nice, [ty]) +let mkOptionTy (g: TcGlobals) ty = TType_app (g.option_tcr_nice, [ty]) -let mkListTy (g:TcGlobals) ty = TType_app (g.list_tcr_nice, [ty]) +let mkListTy (g: TcGlobals) ty = TType_app (g.list_tcr_nice, [ty]) -let isOptionTy (g:TcGlobals) ty = +let isOptionTy (g: TcGlobals) ty = match tryDestAppTy g ty with | ValueNone -> false | ValueSome tcref -> tyconRefEq g g.option_tcr_canon tcref @@ -3072,7 +3094,7 @@ let isLinqExpressionTy g ty = let tryDestLinqExpressionTy g ty = match argsOfAppTy g ty with - | [ty1] when isLinqExpressionTy g ty -> Some ty1 + | [ty1] when isLinqExpressionTy g ty -> Some ty1 | _ -> None let destLinqExpressionTy g ty = @@ -3080,8 +3102,8 @@ let destLinqExpressionTy g ty = | Some ty -> ty | None -> failwith "destLinqExpressionTy: not an expression type" -let mkNoneCase (g:TcGlobals) = mkUnionCaseRef g.option_tcr_canon "None" -let mkSomeCase (g:TcGlobals) = mkUnionCaseRef g.option_tcr_canon "Some" +let mkNoneCase (g: TcGlobals) = mkUnionCaseRef g.option_tcr_canon "None" +let mkSomeCase (g: TcGlobals) = mkUnionCaseRef g.option_tcr_canon "Some" type ValRef with member vref.IsDispatchSlot = @@ -3099,9 +3121,9 @@ let (|BinopExpr|_|) _g expr = | Expr.App(Expr.Val(vref, _, _), _, _, [arg1;arg2], _) -> Some (vref, arg1, arg2) | _ -> None -let (|SpecificUnopExpr|_|) g vrefReqd expr = +let (|SpecificUnopExpr|_|) g vrefReqd expr = match expr with - | UnopExpr g (vref, arg1) when valRefEq g vref vrefReqd -> Some arg1 + | UnopExpr g (vref, arg1) when valRefEq g vref vrefReqd -> Some arg1 | _ -> None let (|SpecificBinopExpr|_|) g vrefReqd expr = @@ -3123,7 +3145,7 @@ let (|AttribBitwiseOrExpr|_|) g expr = // is defined. These get through type checking because enums implicitly support the '|||' operator through // the automatic resolution of undefined operators (see tc.fs, Item.ImplicitOp). This then compiles as an // application of a lambda to two arguments. We recognize this pattern here - | Expr.App(Expr.Lambda _, _, _, [arg1;arg2], _) when g.compilingFslib -> + | Expr.App(Expr.Lambda _, _, _, [arg1;arg2], _) when g.compilingFslib -> Some(arg1, arg2) | _ -> None @@ -3149,43 +3171,44 @@ let isTypeDefOfValRef g vref = let (|UncheckedDefaultOfExpr|_|) g expr = match expr with - | Expr.App(Expr.Val(vref, _, _), _, [ty], [], _) when isUncheckedDefaultOfValRef g vref -> Some ty + | Expr.App(Expr.Val(vref, _, _), _, [ty], [], _) when isUncheckedDefaultOfValRef g vref -> Some ty | _ -> None let (|TypeOfExpr|_|) g expr = match expr with - | Expr.App(Expr.Val(vref, _, _), _, [ty], [], _) when isTypeOfValRef g vref -> Some ty + | Expr.App(Expr.Val(vref, _, _), _, [ty], [], _) when isTypeOfValRef g vref -> Some ty | _ -> None let (|SizeOfExpr|_|) g expr = match expr with - | Expr.App(Expr.Val(vref, _, _), _, [ty], [], _) when isSizeOfValRef g vref -> Some ty + | Expr.App(Expr.Val(vref, _, _), _, [ty], [], _) when isSizeOfValRef g vref -> Some ty | _ -> None let (|TypeDefOfExpr|_|) g expr = match expr with - | Expr.App(Expr.Val(vref, _, _), _, [ty], [], _) when isTypeDefOfValRef g vref -> Some ty + | Expr.App(Expr.Val(vref, _, _), _, [ty], [], _) when isTypeDefOfValRef g vref -> Some ty | _ -> None - - //-------------------------------------------------------------------------- // DEBUG layout //--------------------------------------------------------------------------- -module DebugPrint = begin - open FSharp.Compiler.Layout - open PrettyTypes - let layoutRanges = ref false +module DebugPrint = + let layoutRanges = ref false let squareAngleL x = LeftL.leftBracketAngle ^^ x ^^ RightL.rightBracketAngle + let angleL x = sepL Literals.leftAngle ^^ x ^^ rightL Literals.rightAngle - let braceL x = leftL Literals.leftBrace ^^ x ^^ rightL Literals.rightBrace - let braceBarL x = leftL Literals.leftBraceBar ^^ x ^^ rightL Literals.rightBraceBar + + let braceL x = leftL Literals.leftBrace ^^ x ^^ rightL Literals.rightBrace + + let braceBarL x = leftL Literals.leftBraceBar ^^ x ^^ rightL Literals.rightBraceBar + let boolL = function true -> WordL.keywordTrue | false -> WordL.keywordFalse - let intL (n:int) = wordL (tagNumericLiteral (string n )) - let int64L (n:int64) = wordL (tagNumericLiteral (string n )) + let intL (n: int) = wordL (tagNumericLiteral (string n )) + + let int64L (n: int64) = wordL (tagNumericLiteral (string n )) let jlistL xL xmap = QueueList.foldBack (fun x z -> z @@ xL x) xmap emptyL @@ -3193,44 +3216,47 @@ module DebugPrint = begin let lvalopL x = match x with - | LAddrOf readonly -> wordL (tagText (sprintf "LAddrOf(%b)" readonly)) + | LAddrOf readonly -> wordL (tagText (sprintf "LAddrOf(%b)" readonly)) | LByrefGet -> wordL (tagText "LByrefGet") - | LSet -> wordL (tagText "LSet") + | LSet -> wordL (tagText "LSet") | LByrefSet -> wordL (tagText "LByrefSet") let angleBracketL l = leftL (tagText "<") ^^ l ^^ rightL (tagText ">") - let angleBracketListL l = angleBracketL (sepListL (sepL (tagText ",")) l) + let angleBracketListL l = angleBracketL (sepListL (sepL (tagText ",")) l) let layoutMemberFlags memFlags = - let stat = if memFlags.IsInstance || (memFlags.MemberKind = MemberKind.Constructor) then emptyL else wordL (tagText "static") - let stat = if memFlags.IsDispatchSlot then stat ++ wordL (tagText "abstract") - elif memFlags.IsOverrideOrExplicitImpl then stat ++ wordL (tagText "override") - else stat + let stat = + if memFlags.IsInstance || (memFlags.MemberKind = MemberKind.Constructor) then emptyL + else wordL (tagText "static") + let stat = + if memFlags.IsDispatchSlot then stat ++ wordL (tagText "abstract") + elif memFlags.IsOverrideOrExplicitImpl then stat ++ wordL (tagText "override") + else stat stat let stampL _n w = w - let layoutTyconRef (tc:TyconRef) = wordL (tagText tc.DisplayNameWithStaticParameters) |> stampL tc.Stamp - + let layoutTyconRef (tc: TyconRef) = + wordL (tagText tc.DisplayNameWithStaticParameters) |> stampL tc.Stamp let rec auxTypeL env ty = auxTypeWrapL env false ty - and auxTypeAtomL env ty = auxTypeWrapL env true ty + and auxTypeAtomL env ty = auxTypeWrapL env true ty and auxTyparsL env tcL prefix tinst = match tinst with | [] -> tcL | [t] -> let tL = auxTypeAtomL env t - if prefix then tcL ^^ angleBracketL tL - else tL ^^ tcL + if prefix then tcL ^^ angleBracketL tL + else tL ^^ tcL | _ -> let tinstL = List.map (auxTypeL env) tinst - if prefix then + if prefix then tcL ^^ angleBracketListL tinstL - else + else tupleL tinstL ^^ tcL and auxTypeWrapL env isAtomic ty = @@ -3238,15 +3264,15 @@ module DebugPrint = begin match stripTyparEqns ty with | TType_forall (typars, rty) -> (leftL (tagText "!") ^^ layoutTyparDecls typars --- auxTypeL env rty) |> wrap - | TType_ucase (UCRef(tcref, _), tinst) - | TType_app (tcref, tinst) -> + | TType_ucase (UCRef(tcref, _), tinst) + | TType_app (tcref, tinst) -> let prefix = tcref.IsPrefixDisplay let tcL = layoutTyconRef tcref auxTyparsL env tcL prefix tinst | TType_anon (anonInfo, tys) -> braceBarL (sepListL (wordL (tagText ";")) (List.map2 (fun nm ty -> wordL (tagField nm) --- auxTypeAtomL env ty) (Array.toList anonInfo.SortedNames) tys)) | TType_tuple (_tupInfo, tys) -> sepListL (wordL (tagText "*")) (List.map (auxTypeAtomL env) tys) |> wrap - | TType_fun (f, x) -> ((auxTypeAtomL env f ^^ wordL (tagText "->")) --- auxTypeL env x) |> wrap - | TType_var typar -> auxTyparWrapL env isAtomic typar + | TType_fun (f, x) -> ((auxTypeAtomL env f ^^ wordL (tagText "->")) --- auxTypeL env x) |> wrap + | TType_var typar -> auxTyparWrapL env isAtomic typar | TType_measure unt -> #if DEBUG leftL (tagText "{") ^^ @@ -3255,16 +3281,20 @@ module DebugPrint = begin | Some g -> let sortVars (vs:(Typar * Rational) list) = vs |> List.sortBy (fun (v, _) -> v.DisplayName) let sortCons (cs:(TyconRef * Rational) list) = cs |> List.sortBy (fun (c, _) -> c.DisplayName) - let negvs, posvs = ListMeasureVarOccsWithNonZeroExponents unt |> sortVars |> List.partition (fun (_, e) -> SignRational e < 0) + let negvs, posvs = ListMeasureVarOccsWithNonZeroExponents unt |> sortVars |> List.partition (fun (_, e) -> SignRational e < 0) let negcs, poscs = ListMeasureConOccsWithNonZeroExponents g false unt |> sortCons |> List.partition (fun (_, e) -> SignRational e < 0) - let unparL (uv:Typar) = wordL (tagText ("'" + uv.DisplayName)) + let unparL (uv: Typar) = wordL (tagText ("'" + uv.DisplayName)) let unconL tc = layoutTyconRef tc let rationalL e = wordL (tagText(RationalToString e)) let measureToPowerL x e = if e = OneRational then x else x -- wordL (tagText "^") -- rationalL e - let prefix = spaceListL (List.map (fun (v, e) -> measureToPowerL (unparL v) e) posvs @ - List.map (fun (c, e) -> measureToPowerL (unconL c) e) poscs) - let postfix = spaceListL (List.map (fun (v, e) -> measureToPowerL (unparL v) (NegRational e)) negvs @ - List.map (fun (c, e) -> measureToPowerL (unconL c) (NegRational e)) negcs) + let prefix = + spaceListL + (List.map (fun (v, e) -> measureToPowerL (unparL v) e) posvs @ + List.map (fun (c, e) -> measureToPowerL (unconL c) e) poscs) + let postfix = + spaceListL + (List.map (fun (v, e) -> measureToPowerL (unparL v) (NegRational e)) negvs @ + List.map (fun (c, e) -> measureToPowerL (unconL c) (NegRational e)) negcs) match (negvs, negcs) with | [], [] -> prefix | _ -> prefix ^^ sepL (tagText "/") ^^ postfix) ^^ @@ -3274,14 +3304,14 @@ module DebugPrint = begin wordL(tagText "") #endif - and auxTyparWrapL (env:SimplifyTypes.TypeSimplificationInfo) isAtomic (typar:Typar) = + and auxTyparWrapL (env: SimplifyTypes.TypeSimplificationInfo) isAtomic (typar: Typar) = let wrap x = bracketIfL isAtomic x in // wrap iff require atomic expr // There are several cases for pprinting of typar. // - // 'a - is multiple occurrence. - // #Type - inplace coercion constraint and singleton - // ('a :> Type) - inplace coercion constraint not singleton - // ('a.opM : S->T) - inplace operator constraint + // 'a - is multiple occurrence. + // #Type - inplace coercion constraint and singleton + // ('a :> Type) - inplace coercion constraint not singleton + // ('a.opM: S->T) - inplace operator constraint let tpL = wordL (tagText (prefixOfStaticReq typar.StaticReq + prefixOfRigidTypar typar @@ -3296,9 +3326,9 @@ module DebugPrint = begin (varL ^^ sepL (tagText ":>") ^^ auxTyparConstraintTypL env typarConstraintTy) |> wrap | _ -> varL - and auxTypar2L env typar = auxTyparWrapL env false typar + and auxTypar2L env typar = auxTyparWrapL env false typar - and auxTyparAtomL env typar = auxTyparWrapL env true typar + and auxTyparAtomL env typar = auxTyparWrapL env true typar and auxTyparConstraintTypL env ty = auxTypeL env ty @@ -3311,7 +3341,7 @@ module DebugPrint = begin let rty = GetFSharpViewOfReturnType g rty let stat = layoutMemberFlags memFlags let argsL = sepListL (wordL (tagText "*")) (List.map (auxTypeAtomL env) argtys) - let resL = auxTypeL env rty + let resL = auxTypeL env rty let methodTypeL = (argsL ^^ wordL (tagText "->")) ++ resL bracketL (stat ++ bracketL (sepListL (wordL (tagText "or")) (List.map (auxTypeAtomL env) tys)) ++ wordL (tagText "member") --- (wordL (tagText nm) ^^ wordL (tagText ":") -- methodTypeL)) #else @@ -3325,11 +3355,11 @@ module DebugPrint = begin | TyparConstraint.CoercesTo(typarConstraintTy, _) -> auxTypar2L env tp ^^ wordL (tagText ":>") --- auxTyparConstraintTypL env typarConstraintTy | TyparConstraint.MayResolveMember(traitInfo, _) -> - auxTypar2L env tp ^^ wordL (tagText ":") --- auxTraitL env traitInfo + auxTypar2L env tp ^^ wordL (tagText ":") --- auxTraitL env traitInfo | TyparConstraint.DefaultsTo(_, ty, _) -> - wordL (tagText "default") ^^ auxTypar2L env tp ^^ wordL (tagText ":") ^^ auxTypeL env ty + wordL (tagText "default") ^^ auxTypar2L env tp ^^ wordL (tagText ":") ^^ auxTypeL env ty | TyparConstraint.IsEnum(ty, _) -> - auxTyparsL env (wordL (tagText "enum")) true [ty] |> constraintPrefix + auxTyparsL env (wordL (tagText "enum")) true [ty] |> constraintPrefix | TyparConstraint.IsDelegate(aty, bty, _) -> auxTyparsL env (wordL (tagText "delegate")) true [aty; bty] |> constraintPrefix | TyparConstraint.SupportsNull _ -> @@ -3339,22 +3369,23 @@ module DebugPrint = begin | TyparConstraint.SupportsEquality _ -> wordL (tagText "equality") |> constraintPrefix | TyparConstraint.IsNonNullableStruct _ -> - wordL (tagText "struct") |> constraintPrefix + wordL (tagText "struct") |> constraintPrefix | TyparConstraint.IsReferenceType _ -> wordL (tagText "not struct") |> constraintPrefix | TyparConstraint.IsUnmanaged _ -> wordL (tagText "unmanaged") |> constraintPrefix | TyparConstraint.SimpleChoice(tys, _) -> - bracketL (sepListL (sepL (tagText "|")) (List.map (auxTypeL env) tys)) |> constraintPrefix + bracketL (sepListL (sepL (tagText "|")) (List.map (auxTypeL env) tys)) |> constraintPrefix | TyparConstraint.RequiresDefaultConstructor _ -> - bracketL (wordL (tagText "new : unit -> ") ^^ (auxTypar2L env tp)) |> constraintPrefix + bracketL (wordL (tagText "new : unit -> ") ^^ (auxTypar2L env tp)) |> constraintPrefix and auxTyparConstraintsL env x = match x with - | [] -> emptyL - | cxs -> wordL (tagText "when") --- aboveListL (List.map (auxTyparConstraintL env) cxs) + | [] -> emptyL + | cxs -> wordL (tagText "when") --- aboveListL (List.map (auxTyparConstraintL env) cxs) + + and typarL tp = auxTypar2L SimplifyTypes.typeSimplificationInfo0 tp - and typarL tp = auxTypar2L SimplifyTypes.typeSimplificationInfo0 tp and typarAtomL tp = auxTyparAtomL SimplifyTypes.typeSimplificationInfo0 tp and typeAtomL tau = @@ -3377,27 +3408,23 @@ module DebugPrint = begin match env.postfixConstraints with | [] -> auxTypeL env tau | _ -> (auxTypeL env tau --- auxTyparConstraintsL env env.postfixConstraints) - and layoutTyparDecls tps = angleBracketListL (List.map typarDeclL tps) + and layoutTyparDecls tps = angleBracketListL (List.map typarDeclL tps) - //-------------------------------------------------------------------------- - // DEBUG layout - types - //-------------------------------------------------------------------------- - let rangeL m = wordL (tagText (stringOfRange m)) let instL tyL tys = match tys with - | [] -> emptyL + | [] -> emptyL | tys -> sepL (tagText "@[") ^^ commaListL (List.map tyL tys) ^^ rightL (tagText "]") - let valRefL (vr:ValRef) = + let valRefL (vr: ValRef) = wordL (tagText vr.LogicalName) |> stampL vr.Stamp let layoutAttrib (Attrib(_, k, _, _, _, _, _)) = leftL (tagText "[<") ^^ (match k with - | ILAttrib (ilmeth) -> wordL (tagText ilmeth.Name) - | FSAttrib (vref) -> valRefL vref) ^^ + | ILAttrib ilmeth -> wordL (tagText ilmeth.Name) + | FSAttrib vref -> valRefL vref) ^^ rightL (tagText ">]") let layoutAttribs attribs = aboveListL (List.map layoutAttrib attribs) @@ -3407,26 +3434,26 @@ module DebugPrint = begin leftL (tagText "arity<") ^^ intL tpNames.Length ^^ sepL (tagText ">[") ^^ commaListL (List.map intL ns) ^^ rightL (tagText "]") - let valL (vspec:Val) = - let vsL = wordL (tagText (DecompileOpName vspec.LogicalName)) |> stampL vspec.Stamp - let vsL = vsL -- layoutAttribs (vspec.Attribs) + let valL (v: Val) = + let vsL = wordL (tagText (DecompileOpName v.LogicalName)) |> stampL v.Stamp + let vsL = vsL -- layoutAttribs (v.Attribs) vsL - let typeOfValL (v:Val) = + let typeOfValL (v: Val) = (valL v - ^^ (if v.MustInline then wordL (tagText "inline ") else emptyL) + ^^ (if v.MustInline then wordL (tagText "inline ") else emptyL) ^^ (if v.IsMutable then wordL(tagText "mutable ") else emptyL) ^^ wordL (tagText ":")) -- typeL v.Type - let tslotparamL(TSlotParam(nmOpt, ty, inFlag, outFlag, _, _)) = + let tslotparamL (TSlotParam(nmOpt, ty, inFlag, outFlag, _, _)) = (optionL (tagText >> wordL) nmOpt) ^^ wordL(tagText ":") ^^ typeL ty ^^ - (if inFlag then wordL(tagText "[in]") else emptyL) ^^ - (if outFlag then wordL(tagText "[out]") else emptyL) ^^ + (if inFlag then wordL(tagText "[in]") else emptyL) ^^ + (if outFlag then wordL(tagText "[out]") else emptyL) ^^ (if inFlag then wordL(tagText "[opt]") else emptyL) - let slotSigL (slotsig:SlotSig) = + let slotSigL (slotsig: SlotSig) = #if DEBUG let (TSlotSig(nm, ty, tps1, tps2, pms, rty)) = slotsig match !global_g with @@ -3434,62 +3461,67 @@ module DebugPrint = begin | Some g -> let rty = GetFSharpViewOfReturnType g rty (wordL(tagText "slot") --- (wordL (tagText nm)) ^^ wordL(tagText "@") ^^ typeL ty) -- - (wordL(tagText "LAM") --- spaceListL (List.map typarL tps1) ^^ rightL(tagText ".")) --- - (wordL(tagText "LAM") --- spaceListL (List.map typarL tps2) ^^ rightL(tagText ".")) --- + (wordL(tagText "LAM") --- spaceListL (List.map typarL tps1) ^^ rightL(tagText ".")) --- + (wordL(tagText "LAM") --- spaceListL (List.map typarL tps2) ^^ rightL(tagText ".")) --- (commaListL (List.map (List.map tslotparamL >> tupleL) pms)) ^^ (wordL(tagText "-> ")) --- (typeL rty) #else ignore slotsig wordL(tagText "slotsig") #endif - let rec MemberL (v:Val) (membInfo:ValMemberInfo) = - (aboveListL [ wordL(tagText "compiled_name! = ") ^^ wordL (tagText v.CompiledName) ; - wordL(tagText "membInfo-slotsig! = ") ^^ listL slotSigL membInfo.ImplementedSlotSigs ]) - and valAtBindL v = - let vL = valL v in + let rec memberL (v: Val) (membInfo: ValMemberInfo) = + aboveListL + [ wordL(tagText "compiled_name! = ") ^^ wordL (tagText v.CompiledName) + wordL(tagText "membInfo-slotsig! = ") ^^ listL slotSigL membInfo.ImplementedSlotSigs ] + + and valAtBindL v = + let vL = valL v let mutL = (if v.IsMutable then wordL(tagText "mutable") ++ vL else vL) - mutL --- (aboveListL (List.concat [[wordL(tagText ":") ^^ typeL v.Type]; - (match v.MemberInfo with None -> [] | Some mem_info -> [wordL(tagText "!") ^^ MemberL v mem_info]); - (match v.ValReprInfo with None -> [] | Some arity_info -> [wordL(tagText "#") ^^ arityInfoL arity_info])])) + mutL --- + aboveListL + [ yield wordL(tagText ":") ^^ typeL v.Type + match v.MemberInfo with None -> () | Some mem_info -> yield wordL(tagText "!") ^^ memberL v mem_info + match v.ValReprInfo with None -> () | Some arity_info -> yield wordL(tagText "#") ^^ arityInfoL arity_info] + + let unionCaseRefL (ucr: UnionCaseRef) = wordL (tagText ucr.CaseName) - let unionCaseRefL (ucr:UnionCaseRef) = wordL (tagText ucr.CaseName) - let recdFieldRefL (rfref:RecdFieldRef) = wordL (tagText rfref.FieldName) + let recdFieldRefL (rfref: RecdFieldRef) = wordL (tagText rfref.FieldName) - let identL (id:Ident) = wordL (tagText id.idText) + let identL (id: Ident) = wordL (tagText id.idText) // Note: We need nice printing of constants in order to print literals and attributes let constL c = let str = match c with - | Const.Bool x -> if x then "true" else "false" - | Const.SByte x -> (x |> string)+"y" - | Const.Byte x -> (x |> string)+"uy" - | Const.Int16 x -> (x |> string)+"s" - | Const.UInt16 x -> (x |> string)+"us" - | Const.Int32 x -> (x |> string) - | Const.UInt32 x -> (x |> string)+"u" - | Const.Int64 x -> (x |> string)+"L" - | Const.UInt64 x -> (x |> string)+"UL" - | Const.IntPtr x -> (x |> string)+"n" - | Const.UIntPtr x -> (x |> string)+"un" - | Const.Single d -> - let s = d.ToString("g12", System.Globalization.CultureInfo.InvariantCulture) - (if String.forall (fun c -> System.Char.IsDigit(c) || c = '-') s + | Const.Bool x -> if x then "true" else "false" + | Const.SByte x -> (x |> string)+"y" + | Const.Byte x -> (x |> string)+"uy" + | Const.Int16 x -> (x |> string)+"s" + | Const.UInt16 x -> (x |> string)+"us" + | Const.Int32 x -> (x |> string) + | Const.UInt32 x -> (x |> string)+"u" + | Const.Int64 x -> (x |> string)+"L" + | Const.UInt64 x -> (x |> string)+"UL" + | Const.IntPtr x -> (x |> string)+"n" + | Const.UIntPtr x -> (x |> string)+"un" + | Const.Single d -> + (let s = d.ToString("g12", System.Globalization.CultureInfo.InvariantCulture) + if String.forall (fun c -> System.Char.IsDigit(c) || c = '-') s then s + ".0" else s) + "f" - | Const.Double d -> + | Const.Double d -> let s = d.ToString("g12", System.Globalization.CultureInfo.InvariantCulture) - if String.forall (fun c -> System.Char.IsDigit(c) || c = '-') s + if String.forall (fun c -> System.Char.IsDigit(c) || c = '-') s then s + ".0" else s - | Const.Char c -> "'" + c.ToString() + "'" - | Const.String bs -> "\"" + bs + "\"" - | Const.Unit -> "()" - | Const.Decimal bs -> string bs + "M" - | Const.Zero -> "default" + | Const.Char c -> "'" + c.ToString() + "'" + | Const.String bs -> "\"" + bs + "\"" + | Const.Unit -> "()" + | Const.Decimal bs -> string bs + "M" + | Const.Zero -> "default" wordL (tagText str) - let rec tyconL (tycon:Tycon) = + let rec tyconL (tycon: Tycon) = if tycon.IsModuleOrNamespace then entityL tycon else let lhsL = wordL (tagText (match tycon.TypeOrMeasureKind with TyparKind.Measure -> "[] type" | TyparKind.Type -> "type")) ^^ wordL (tagText tycon.DisplayName) ^^ layoutTyparDecls tycon.TyparsNoRange @@ -3507,11 +3539,11 @@ module DebugPrint = begin | _ -> tycon.ImmediateInterfacesOfFSharpTycon let iimpls = iimpls |> List.filter (fun (_, compgen, _) -> not compgen) // if TTyconInterface, the iimpls should be printed as inherited interfaces - if isNil adhoc && isNil iimpls - then emptyL + if isNil adhoc && isNil iimpls then + emptyL else let iimplsLs = iimpls |> List.map (fun (ty, _, _) -> wordL(tagText "interface") --- typeL ty) - let adhocLs = adhoc |> List.map (fun vref -> valAtBindL vref.Deref) + let adhocLs = adhoc |> List.map (fun vref -> valAtBindL vref.Deref) (wordL(tagText "with") @@-- aboveListL (iimplsLs @ adhocLs)) @@ wordL(tagText "end") let layoutUnionCaseArgTypes argtys = sepListL (wordL(tagText "*")) (List.map typeL argtys) @@ -3519,22 +3551,22 @@ module DebugPrint = begin let ucaseL prefixL (ucase: UnionCase) = let nmL = wordL (tagText (DemangleOperatorName ucase.Id.idText)) match ucase.RecdFields |> List.map (fun rfld -> rfld.FormalType) with - | [] -> (prefixL ^^ nmL) + | [] -> (prefixL ^^ nmL) | argtys -> (prefixL ^^ nmL ^^ wordL(tagText "of")) --- layoutUnionCaseArgTypes argtys let layoutUnionCases ucases = let prefixL = if not (isNilOrSingleton ucases) then wordL(tagText "|") else emptyL List.map (ucaseL prefixL) ucases - let layoutRecdField (fld:RecdField) = + let layoutRecdField (fld: RecdField) = let lhs = wordL (tagText fld.Name) let lhs = if fld.IsMutable then wordL(tagText "mutable") --- lhs else lhs (lhs ^^ rightL(tagText ":")) --- typeL fld.FormalType - let tyconReprL (repr, tycon:Tycon) = + let tyconReprL (repr, tycon: Tycon) = match repr with | TRecdRepr _ -> - tycon.TrueFieldsAsList |> List.map (fun fld -> layoutRecdField fld ^^ rightL(tagText ";")) |> aboveListL + tycon.TrueFieldsAsList |> List.map (fun fld -> layoutRecdField fld ^^ rightL(tagText ";")) |> aboveListL | TFSharpObjectRepr r -> match r.fsobjmodel_kind with | TTyconDelegate _ -> @@ -3559,15 +3591,16 @@ module DebugPrint = begin tycon.MembersOfFSharpTyconSorted |> List.filter (fun v -> v.IsDispatchSlot) |> List.map (fun vref -> valAtBindL vref.Deref) - let vals = tycon.TrueFieldsAsList |> List.map (fun f -> (if f.IsStatic then wordL(tagText "static") else emptyL) ^^ wordL(tagText "val") ^^ layoutRecdField f) + let vals = tycon.TrueFieldsAsList |> List.map (fun f -> (if f.IsStatic then wordL(tagText "static") else emptyL) ^^ wordL(tagText "val") ^^ layoutRecdField f) let alldecls = inherits @ vsprs @ vals let emptyMeasure = match tycon.TypeOrMeasureKind with TyparKind.Measure -> isNil alldecls | _ -> false if emptyMeasure then emptyL else (wordL (tagText start) @@-- aboveListL alldecls) @@ wordL(tagText "end") - | TUnionRepr _ -> tycon.UnionCasesAsList |> layoutUnionCases |> aboveListL - | TAsmRepr _ -> wordL(tagText "(# ... #)") - | TMeasureableRepr ty -> typeL ty + | TUnionRepr _ -> tycon.UnionCasesAsList |> layoutUnionCases |> aboveListL + | TAsmRepr _ -> wordL(tagText "(# ... #)") + | TMeasureableRepr ty -> typeL ty | TILObjectRepr (TILObjectReprData(_, _, td)) -> wordL (tagText td.Name) | _ -> failwith "unreachable" + let reprL = match tycon.TypeReprInfo with #if !NO_EXTENSIONTYPING @@ -3576,23 +3609,19 @@ module DebugPrint = begin #endif | TNoRepr -> match tycon.TypeAbbrev with - | None -> lhsL @@-- memberLs + | None -> lhsL @@-- memberLs | Some a -> (lhsL ^^ wordL(tagText "=")) --- (typeL a @@ memberLs) | a -> let rhsL = tyconReprL (a, tycon) @@ memberLs (lhsL ^^ wordL(tagText "=")) @@-- rhsL reprL - - //-------------------------------------------------------------------------- - // layout - bind, expr, dtree etc. - //-------------------------------------------------------------------------- - and bindingL (TBind(v, repr, _)) = valAtBindL v --- (wordL(tagText "=") ^^ exprL repr) and exprL expr = exprWrapL false expr - and atomL expr = exprWrapL true expr // true means bracket if needed to be atomic expr + + and atomL expr = exprWrapL true expr // true means bracket if needed to be atomic expr and letRecL binds bodyL = let eqnsL = @@ -3604,62 +3633,62 @@ module DebugPrint = begin and letL bind bodyL = let eqnL = wordL(tagText "let") ^^ bindingL bind ^^ wordL(tagText "in") (eqnL @@ bodyL) - + and exprWrapL isAtomic expr = let wrap = bracketIfL isAtomic // wrap iff require atomic expr let lay = match expr with - | Expr.Const (c, _, _) -> constL c + | Expr.Const (c, _, _) -> constL c | Expr.Val (v, flags, _) -> let xL = valL v.Deref let xL = match flags with - | PossibleConstrainedCall _ -> xL ^^ rightL(tagText "") - | CtorValUsedAsSelfInit -> xL ^^ rightL(tagText "") + | PossibleConstrainedCall _ -> xL ^^ rightL(tagText "") + | CtorValUsedAsSelfInit -> xL ^^ rightL(tagText "") | CtorValUsedAsSuperInit -> xL ^^ rightL(tagText "") | VSlotDirectCall -> xL ^^ rightL(tagText "") | NormalValUse -> xL xL - | Expr.Sequential (x0, x1, flag, _, _) -> + | Expr.Sequential (expr1, expr2, flag, _, _) -> let flag = match flag with - | NormalSeq -> "; (*Seq*)" - | ThenDoSeq -> "; (*ThenDo*)" - ((exprL x0 ^^ rightL (tagText flag)) @@ exprL x1) |> wrap - | Expr.Lambda(_, _, baseValOpt, argvs, body, _, _) -> + | NormalSeq -> "; (*Seq*)" + | ThenDoSeq -> "; (*ThenDo*)" + ((exprL expr1 ^^ rightL (tagText flag)) @@ exprL expr2) |> wrap + | Expr.Lambda(_, _, baseValOpt, argvs, body, _, _) -> let formalsL = spaceListL (List.map valAtBindL argvs) in let bindingL = match baseValOpt with - | None -> wordL(tagText "lam") ^^ formalsL ^^ rightL(tagText ".") + | None -> wordL(tagText "lam") ^^ formalsL ^^ rightL(tagText ".") | Some basev -> wordL(tagText "lam") ^^ (leftL(tagText "base=") ^^ valAtBindL basev) --- formalsL ^^ rightL(tagText ".") in (bindingL ++ exprL body) |> wrap | Expr.TyLambda(_, argtyvs, body, _, _) -> - ((wordL(tagText "LAM") ^^ spaceListL (List.map typarL argtyvs) ^^ rightL(tagText ".")) ++ exprL body) |> wrap + ((wordL(tagText "LAM") ^^ spaceListL (List.map typarL argtyvs) ^^ rightL(tagText ".")) ++ exprL body) |> wrap | Expr.TyChoose(argtyvs, body, _) -> - ((wordL(tagText "CHOOSE") ^^ spaceListL (List.map typarL argtyvs) ^^ rightL(tagText ".")) ++ exprL body) |> wrap + ((wordL(tagText "CHOOSE") ^^ spaceListL (List.map typarL argtyvs) ^^ rightL(tagText ".")) ++ exprL body) |> wrap | Expr.App (f, _, tys, argtys, _) -> let flayout = atomL f appL flayout tys argtys |> wrap | Expr.LetRec (binds, body, _, _) -> letRecL binds (exprL body) |> wrap - | Expr.Let (bind, body, _, _) -> + | Expr.Let (bind, body, _, _) -> letL bind (exprL body) |> wrap | Expr.Link rX -> (wordL(tagText "RecLink") --- atomL (!rX)) |> wrap | Expr.Match (_, _, dtree, targets, _, _) -> leftL(tagText "[") ^^ (decisionTreeL dtree @@ aboveListL (List.mapi targetL (targets |> Array.toList)) ^^ rightL(tagText "]")) - | Expr.Op (TOp.UnionCase (c), _, args, _) -> + | Expr.Op (TOp.UnionCase (c), _, args, _) -> (unionCaseRefL c ++ spaceListL (List.map atomL args)) |> wrap | Expr.Op (TOp.ExnConstr (ecref), _, args, _) -> wordL (tagText ecref.LogicalName) ^^ bracketL (commaListL (List.map atomL args)) | Expr.Op (TOp.Tuple _, _, xs, _) -> tupleL (List.map exprL xs) - | Expr.Op (TOp.Recd (ctor, tc), _, xs, _) -> + | Expr.Op (TOp.Recd (ctor, tc), _, xs, _) -> let fields = tc.TrueInstanceFieldsAsList let lay fs x = (wordL (tagText fs.rfield_id.idText) ^^ sepL(tagText "=")) --- (exprL x) let ctorL = match ctor with - | RecdExpr -> emptyL + | RecdExpr -> emptyL | RecdExprIsObjInit-> wordL(tagText "(new)") leftL(tagText "{") ^^ semiListL (List.map2 lay fields xs) ^^ rightL(tagText "}") ^^ ctorL | Expr.Op (TOp.ValFieldSet rf, _, [rx;x], _) -> @@ -3688,7 +3717,7 @@ module DebugPrint = begin atomL x --- (wordL(tagText ":>") ^^ typeL ty) | Expr.Op (TOp.Reraise, [_], [], _) -> wordL(tagText "Rethrow!") - | Expr.Op (TOp.ILAsm (a, tys), tyargs, args, _) -> + | Expr.Op (TOp.ILAsm (a, tys), tyargs, args, _) -> let instrs = a |> List.map (sprintf "%+A" >> tagText >> wordL) |> spaceListL // %+A has + since instrs are from an "internal" type let instrs = leftL(tagText "(#") ^^ instrs ^^ rightL(tagText "#)") (appL instrs tyargs args --- @@ -3697,11 +3726,14 @@ module DebugPrint = begin (lvalopL lvop ^^ valRefL vr --- bracketL (commaListL (List.map atomL args))) |> wrap | Expr.Op (TOp.ILCall (_isVirtCall, _isProtectedCall, _valu, _isNewObjCall, _valUseFlags, _isProperty, _noTailCall, ilMethRef, tinst, minst, _tys), tyargs, args, _) -> let meth = ilMethRef.Name - wordL(tagText "ILCall") ^^ aboveListL [wordL(tagText "meth ") --- wordL (tagText ilMethRef.DeclaringTypeRef.FullName) ^^ sepL(tagText ".") ^^ wordL (tagText meth); - wordL(tagText "tinst ") --- listL typeL tinst; - wordL(tagText "minst ") --- listL typeL minst; - wordL(tagText "tyargs") --- listL typeL tyargs; - wordL(tagText "args ") --- listL exprL args] |> wrap + wordL(tagText "ILCall") ^^ + aboveListL + [ wordL(tagText "meth ") --- wordL (tagText ilMethRef.DeclaringTypeRef.FullName) ^^ sepL(tagText ".") ^^ wordL (tagText meth) + wordL(tagText "tinst ") --- listL typeL tinst + wordL(tagText "minst ") --- listL typeL minst + wordL(tagText "tyargs") --- listL typeL tyargs + wordL(tagText "args ") --- listL exprL args ] + |> wrap | Expr.Op (TOp.Array, [_], xs, _) -> leftL(tagText "[|") ^^ commaListL (List.map exprL xs) ^^ rightL(tagText "|]") | Expr.Op (TOp.While _, [], [x1;x2], _) -> @@ -3712,25 +3744,26 @@ module DebugPrint = begin wordL(tagText "try") ^^ exprL x1 ^^ wordL(tagText "with") ^^ exprL x2 ^^ rightL(tagText "}") | Expr.Op (TOp.TryFinally _, [_], [x1;x2], _) -> wordL(tagText "try") ^^ exprL x1 ^^ wordL(tagText "finally") ^^ exprL x2 ^^ rightL(tagText "}") - | Expr.Op (TOp.Bytes _, _ , _ , _) -> - wordL(tagText "bytes++") - | Expr.Op (TOp.UInt16s _, _ , _ , _) -> wordL(tagText "uint16++") - | Expr.Op (TOp.RefAddrGet _, _tyargs, _args, _) -> wordL(tagText "GetRefLVal...") - | Expr.Op (TOp.TraitCall _, _tyargs, _args, _) -> wordL(tagText "traitcall...") + | Expr.Op (TOp.Bytes _, _, _, _) -> + wordL(tagText "bytes++") + | Expr.Op (TOp.UInt16s _, _, _, _) -> wordL(tagText "uint16++") + | Expr.Op (TOp.RefAddrGet _, _tyargs, _args, _) -> wordL(tagText "GetRefLVal...") + | Expr.Op (TOp.TraitCall _, _tyargs, _args, _) -> wordL(tagText "traitcall...") | Expr.Op (TOp.ExnFieldGet _, _tyargs, _args, _) -> wordL(tagText "TOp.ExnFieldGet...") | Expr.Op (TOp.ExnFieldSet _, _tyargs, _args, _) -> wordL(tagText "TOp.ExnFieldSet...") | Expr.Op (TOp.TryFinally _, _tyargs, _args, _) -> wordL(tagText "TOp.TryFinally...") - | Expr.Op (TOp.TryCatch _, _tyargs, _args, _) -> wordL(tagText "TOp.TryCatch...") - | Expr.Op (_, _tys, args, _) -> wordL(tagText "Expr.Op ...") ^^ bracketL (commaListL (List.map atomL args)) - | Expr.Quote (a, _, _, _, _) -> leftL(tagText "<@") ^^ atomL a ^^ rightL(tagText "@>") - | Expr.Obj (_lambdaId, ty, basev, ccall, overrides, iimpls, _) -> - wordL(tagText "OBJ:") ^^ aboveListL [typeL ty; - exprL ccall; - optionL valAtBindL basev; - aboveListL (List.map overrideL overrides); - aboveListL (List.map iimplL iimpls)] - - | Expr.StaticOptimization (_tcs, csx, x, _) -> + | Expr.Op (TOp.TryCatch _, _tyargs, _args, _) -> wordL(tagText "TOp.TryCatch...") + | Expr.Op (_, _tys, args, _) -> wordL(tagText "Expr.Op ...") ^^ bracketL (commaListL (List.map atomL args)) + | Expr.Quote (a, _, _, _, _) -> leftL(tagText "<@") ^^ atomL a ^^ rightL(tagText "@>") + | Expr.Obj (_lambdaId, ty, basev, ccall, overrides, iimpls, _) -> + wordL(tagText "OBJ:") ^^ + aboveListL [typeL ty + exprL ccall + optionL valAtBindL basev + aboveListL (List.map overrideL overrides) + aboveListL (List.map iimplL iimpls)] + + | Expr.StaticOptimization (_tcs, csx, x, _) -> (wordL(tagText "opt") @@- (exprL x)) @@-- (wordL(tagText "|") ^^ exprL csx --- (wordL(tagText "when...") )) @@ -3753,32 +3786,35 @@ module DebugPrint = begin and mexprL x = match x with - | ModuleOrNamespaceExprWithSig(mtyp, defs, _) -> mdefL defs @@- (wordL(tagText ":") @@- entityTypeL mtyp) + | ModuleOrNamespaceExprWithSig(mtyp, defs, _) -> mdefL defs @@- (wordL(tagText ":") @@- entityTypeL mtyp) + and mdefsL defs = wordL(tagText "Module Defs") @@-- aboveListL(List.map mdefL defs) + and mdefL x = match x with - | TMDefRec(_, tycons , mbinds, _) -> aboveListL ((tycons |> List.map tyconL) @ List.map mbindL mbinds) + | TMDefRec(_, tycons, mbinds, _) -> aboveListL ((tycons |> List.map tyconL) @ List.map mbindL mbinds) | TMDefLet(bind, _) -> letL bind emptyL | TMDefDo(e, _) -> exprL e - | TMDefs defs -> mdefsL defs; + | TMDefs defs -> mdefsL defs | TMAbstract mexpr -> mexprL mexpr + and mbindL x = match x with | ModuleOrNamespaceBinding.Binding bind -> letL bind emptyL | ModuleOrNamespaceBinding.Module(mspec, rhs) -> (wordL (tagText (if mspec.IsNamespace then "namespace" else "module")) ^^ (wordL (tagText mspec.DemangledModuleOrNamespaceName) |> stampL mspec.Stamp)) @@-- mdefL rhs - and entityTypeL (mtyp:ModuleOrNamespaceType) = - aboveListL [jlistL typeOfValL mtyp.AllValsAndMembers; - jlistL tyconL mtyp.AllEntities;] + and entityTypeL (mtyp: ModuleOrNamespaceType) = + aboveListL [jlistL typeOfValL mtyp.AllValsAndMembers + jlistL tyconL mtyp.AllEntities;] - and entityL (ms:ModuleOrNamespace) = - let header = wordL(tagText "module") ^^ (wordL (tagText ms.DemangledModuleOrNamespaceName) |> stampL ms.Stamp) ^^ wordL(tagText ":") + and entityL (ms: ModuleOrNamespace) = + let header = wordL(tagText "module") ^^ (wordL (tagText ms.DemangledModuleOrNamespaceName) |> stampL ms.Stamp) ^^ wordL(tagText ":") let footer = wordL(tagText "end") let body = entityTypeL ms.ModuleOrNamespaceType (header @@-- body) @@ footer - and ccuL (ccu:CcuThunk) = entityL ccu.Contents + and ccuL (ccu: CcuThunk) = entityL ccu.Contents and decisionTreeL x = match x with @@ -3791,90 +3827,92 @@ module DebugPrint = begin (wordL(tagText "Switch") --- exprL test) @@-- (aboveListL (List.map dcaseL dcases) @@ match dflt with - | None -> emptyL + | None -> emptyL | Some dtree -> wordL(tagText "dflt:") --- decisionTreeL dtree) and dcaseL (TCase (test, dtree)) = (dtestL test ^^ wordL(tagText "//")) --- decisionTreeL dtree and dtestL x = match x with - | (DecisionTreeTest.UnionCase (c, tinst)) -> wordL(tagText "is") ^^ unionCaseRefL c ^^ instL typeL tinst - | (DecisionTreeTest.ArrayLength (n, ty)) -> wordL(tagText "length") ^^ intL n ^^ typeL ty - | (DecisionTreeTest.Const c ) -> wordL(tagText "is") ^^ constL c - | (DecisionTreeTest.IsNull ) -> wordL(tagText "isnull") - | (DecisionTreeTest.IsInst (_, ty) ) -> wordL(tagText "isinst") ^^ typeL ty - | (DecisionTreeTest.ActivePatternCase (exp, _, _, _, _)) -> wordL(tagText "query") ^^ exprL exp - + | (DecisionTreeTest.UnionCase (c, tinst)) -> wordL(tagText "is") ^^ unionCaseRefL c ^^ instL typeL tinst + | (DecisionTreeTest.ArrayLength (n, ty)) -> wordL(tagText "length") ^^ intL n ^^ typeL ty + | (DecisionTreeTest.Const c) -> wordL(tagText "is") ^^ constL c + | (DecisionTreeTest.IsNull ) -> wordL(tagText "isnull") + | (DecisionTreeTest.IsInst (_, ty)) -> wordL(tagText "isinst") ^^ typeL ty + | (DecisionTreeTest.ActivePatternCase (exp, _, _, _, _)) -> wordL(tagText "query") ^^ exprL exp + and targetL i (TTarget (argvs, body, _)) = leftL(tagText "T") ^^ intL i ^^ tupleL (flatValsL argvs) ^^ rightL(tagText ":") --- exprL body + and flatValsL vs = vs |> List.map valL and tmethodL (TObjExprMethod(TSlotSig(nm, _, _, _, _, _), _, tps, vs, e, _)) = (wordL(tagText "TObjExprMethod") --- (wordL (tagText nm)) ^^ wordL(tagText "=")) -- - (wordL(tagText "METH-LAM") --- angleBracketListL (List.map typarL tps) ^^ rightL(tagText ".")) --- - (wordL(tagText "meth-lam") --- tupleL (List.map (List.map valAtBindL >> tupleL) vs) ^^ rightL(tagText ".")) --- + (wordL(tagText "METH-LAM") --- angleBracketListL (List.map typarL tps) ^^ rightL(tagText ".")) --- + (wordL(tagText "meth-lam") --- tupleL (List.map (List.map valAtBindL >> tupleL) vs) ^^ rightL(tagText ".")) --- (atomL e) - and overrideL tmeth = wordL(tagText "with") ^^ tmethodL tmeth + + and overrideL tmeth = wordL(tagText "with") ^^ tmethodL tmeth + and iimplL (ty, tmeths) = wordL(tagText "impl") ^^ aboveListL (typeL ty :: List.map tmethodL tmeths) let showType x = Layout.showL (typeL x) + let showExpr x = Layout.showL (exprL x) - let traitL x = auxTraitL SimplifyTypes.typeSimplificationInfo0 x - let typarsL x = layoutTyparDecls x -end + let traitL x = auxTraitL SimplifyTypes.typeSimplificationInfo0 x + let typarsL x = layoutTyparDecls x //-------------------------------------------------------------------------- // Helpers related to type checking modules & namespaces //-------------------------------------------------------------------------- let wrapModuleOrNamespaceType id cpath mtyp = - NewModuleOrNamespace (Some cpath) taccessPublic id XmlDoc.Empty [] (MaybeLazy.Strict mtyp) + NewModuleOrNamespace (Some cpath) taccessPublic id XmlDoc.Empty [] (MaybeLazy.Strict mtyp) let wrapModuleOrNamespaceTypeInNamespace id cpath mtyp = let mspec = wrapModuleOrNamespaceType id cpath mtyp NewModuleOrNamespaceType Namespace [ mspec ] [], mspec -let wrapModuleOrNamespaceExprInNamespace (id :Ident) cpath mexpr = +let wrapModuleOrNamespaceExprInNamespace (id: Ident) cpath mexpr = let mspec = wrapModuleOrNamespaceType id cpath (NewEmptyModuleOrNamespaceType Namespace) TMDefRec (false, [], [ModuleOrNamespaceBinding.Module(mspec, mexpr)], id.idRange) // cleanup: make this a property let SigTypeOfImplFile (TImplFile(_, _, mexpr, _, _, _)) = mexpr.Type - //-------------------------------------------------------------------------- // Data structures representing what gets hidden and what gets remapped (i.e. renamed or alpha-converted) // when a module signature is applied to a module. //-------------------------------------------------------------------------- type SignatureRepackageInfo = - { RepackagedVals : (ValRef * ValRef) list; - RepackagedEntities: (TyconRef * TyconRef) list } + { RepackagedVals: (ValRef * ValRef) list + RepackagedEntities: (TyconRef * TyconRef) list } member remapInfo.ImplToSigMapping = { TypeEquivEnv.Empty with EquivTycons = TyconRefMap.OfList remapInfo.RepackagedEntities } static member Empty = { RepackagedVals = []; RepackagedEntities= [] } type SignatureHidingInfo = - { HiddenTycons : Zset; - HiddenTyconReprs : Zset; - HiddenVals : Zset; - HiddenRecdFields : Zset; - HiddenUnionCases : Zset } + { HiddenTycons: Zset + HiddenTyconReprs: Zset + HiddenVals: Zset + HiddenRecdFields: Zset + HiddenUnionCases: Zset } static member Empty = - { HiddenTycons = Zset.empty tyconOrder; - HiddenTyconReprs = Zset.empty tyconOrder; - HiddenVals = Zset.empty valOrder; - HiddenRecdFields = Zset.empty recdFieldRefOrder; - HiddenUnionCases = Zset.empty unionCaseRefOrder } + { HiddenTycons = Zset.empty tyconOrder + HiddenTyconReprs = Zset.empty tyconOrder + HiddenVals = Zset.empty valOrder + HiddenRecdFields = Zset.empty recdFieldRefOrder + HiddenUnionCases = Zset.empty unionCaseRefOrder } -let addValRemap v v' tmenv = - { tmenv with valRemap= tmenv.valRemap.Add v (mkLocalValRef v') } +let addValRemap v vNew tmenv = + { tmenv with valRemap= tmenv.valRemap.Add v (mkLocalValRef vNew) } let mkRepackageRemapping mrpi = - { valRemap = ValMap.OfList (mrpi.RepackagedVals |> List.map (fun (vref, x) -> vref.Deref, x)); - tpinst = emptyTyparInst; + { valRemap = ValMap.OfList (mrpi.RepackagedVals |> List.map (fun (vref, x) -> vref.Deref, x)) + tpinst = emptyTyparInst tyconRefRemap = TyconRefMap.OfList mrpi.RepackagedEntities removeTraitSolutions = false } @@ -3882,14 +3920,14 @@ let mkRepackageRemapping mrpi = // Compute instances of the above for mty -> mty //-------------------------------------------------------------------------- -let accEntityRemap (msigty:ModuleOrNamespaceType) (entity:Entity) (mrpi, mhi) = +let accEntityRemap (msigty: ModuleOrNamespaceType) (entity: Entity) (mrpi, mhi) = let sigtyconOpt = (NameMap.tryFind entity.LogicalName msigty.AllEntitiesByCompiledAndLogicalMangledNames) match sigtyconOpt with | None -> // The type constructor is not present in the signature. Hence it is hidden. let mhi = { mhi with HiddenTycons = Zset.add entity mhi.HiddenTycons } (mrpi, mhi) - | Some sigtycon -> + | Some sigtycon -> // The type constructor is in the signature. Hence record the repackage entry let sigtcref = mkLocalTyconRef sigtycon let tcref = mkLocalTyconRef entity @@ -3902,48 +3940,49 @@ let accEntityRemap (msigty:ModuleOrNamespaceType) (entity:Entity) (mrpi, mhi) = else // The type representation is present in the signature. // Find the fields that have been hidden or which were non-public anyway. - mhi - |> Array.foldBack (fun (rfield:RecdField) mhi -> - match sigtycon.GetFieldByName(rfield.Name) with - | Some _ -> - // The field is in the signature. Hence it is not hidden. - mhi - | _ -> - // The field is not in the signature. Hence it is regarded as hidden. - let rfref = tcref.MakeNestedRecdFieldRef rfield - { mhi with HiddenRecdFields = Zset.add rfref mhi.HiddenRecdFields }) - entity.AllFieldsArray - |> List.foldBack (fun (ucase:UnionCase) mhi -> - match sigtycon.GetUnionCaseByName ucase.DisplayName with - | Some _ -> - // The constructor is in the signature. Hence it is not hidden. - mhi - | _ -> - // The constructor is not in the signature. Hence it is regarded as hidden. - let ucref = tcref.MakeNestedUnionCaseRef ucase - { mhi with HiddenUnionCases = Zset.add ucref mhi.HiddenUnionCases }) - (entity.UnionCasesAsList) + let mhi = + (entity.AllFieldsArray, mhi) ||> Array.foldBack (fun rfield mhi -> + match sigtycon.GetFieldByName(rfield.Name) with + | Some _ -> + // The field is in the signature. Hence it is not hidden. + mhi + | _ -> + // The field is not in the signature. Hence it is regarded as hidden. + let rfref = tcref.MakeNestedRecdFieldRef rfield + { mhi with HiddenRecdFields = Zset.add rfref mhi.HiddenRecdFields }) + + let mhi = + (entity.UnionCasesAsList, mhi) ||> List.foldBack (fun ucase mhi -> + match sigtycon.GetUnionCaseByName ucase.DisplayName with + | Some _ -> + // The constructor is in the signature. Hence it is not hidden. + mhi + | _ -> + // The constructor is not in the signature. Hence it is regarded as hidden. + let ucref = tcref.MakeNestedUnionCaseRef ucase + { mhi with HiddenUnionCases = Zset.add ucref mhi.HiddenUnionCases }) + mhi (mrpi, mhi) -let accSubEntityRemap (msigty:ModuleOrNamespaceType) (entity:Entity) (mrpi, mhi) = +let accSubEntityRemap (msigty: ModuleOrNamespaceType) (entity: Entity) (mrpi, mhi) = let sigtyconOpt = (NameMap.tryFind entity.LogicalName msigty.AllEntitiesByCompiledAndLogicalMangledNames) match sigtyconOpt with | None -> // The type constructor is not present in the signature. Hence it is hidden. let mhi = { mhi with HiddenTycons = Zset.add entity mhi.HiddenTycons } (mrpi, mhi) - | Some sigtycon -> + | Some sigtycon -> // The type constructor is in the signature. Hence record the repackage entry let sigtcref = mkLocalTyconRef sigtycon let tcref = mkLocalTyconRef entity let mrpi = { mrpi with RepackagedEntities = ((tcref, sigtcref) :: mrpi.RepackagedEntities) } (mrpi, mhi) -let valLinkageAEquiv g aenv (v1:Val) (v2:Val) = +let valLinkageAEquiv g aenv (v1: Val) (v2: Val) = (v1.GetLinkagePartialKey() = v2.GetLinkagePartialKey()) && (if v1.IsMember && v2.IsMember then typeAEquivAux EraseAll g aenv v1.Type v2.Type else true) -let accValRemap g aenv (msigty:ModuleOrNamespaceType) (implVal:Val) (mrpi, mhi) = +let accValRemap g aenv (msigty: ModuleOrNamespaceType) (implVal: Val) (mrpi, mhi) = let implValKey = implVal.GetLinkagePartialKey() let sigValOpt = msigty.AllValsAndMembersByPartialLinkageKey @@ -3956,28 +3995,28 @@ let accValRemap g aenv (msigty:ModuleOrNamespaceType) (implVal:Val) (mrpi, mhi) if verbose then dprintf "accValRemap, hide = %s#%d\n" implVal.LogicalName implVal.Stamp let mhi = { mhi with HiddenVals = Zset.add implVal mhi.HiddenVals } (mrpi, mhi) - | Some (sigVal:Val) -> + | Some (sigVal: Val) -> // The value is in the signature. Add the repackage entry. let mrpi = { mrpi with RepackagedVals = (vref, mkLocalValRef sigVal) :: mrpi.RepackagedVals } (mrpi, mhi) -let getCorrespondingSigTy nm (msigty:ModuleOrNamespaceType) = +let getCorrespondingSigTy nm (msigty: ModuleOrNamespaceType) = match NameMap.tryFind nm msigty.AllEntitiesByCompiledAndLogicalMangledNames with | None -> NewEmptyModuleOrNamespaceType ModuleOrType | Some sigsubmodul -> sigsubmodul.ModuleOrNamespaceType -let rec accEntityRemapFromModuleOrNamespaceType (mty:ModuleOrNamespaceType) (msigty:ModuleOrNamespaceType) acc = +let rec accEntityRemapFromModuleOrNamespaceType (mty: ModuleOrNamespaceType) (msigty: ModuleOrNamespaceType) acc = let acc = (mty.AllEntities, acc) ||> QueueList.foldBack (fun e acc -> accEntityRemapFromModuleOrNamespaceType e.ModuleOrNamespaceType (getCorrespondingSigTy e.LogicalName msigty) acc) let acc = (mty.AllEntities, acc) ||> QueueList.foldBack (accEntityRemap msigty) acc -let rec accValRemapFromModuleOrNamespaceType g aenv (mty:ModuleOrNamespaceType) msigty acc = - let acc = (mty.AllEntities, acc) ||> QueueList.foldBack (fun e acc -> accValRemapFromModuleOrNamespaceType g aenv e.ModuleOrNamespaceType (getCorrespondingSigTy e.LogicalName msigty) acc) +let rec accValRemapFromModuleOrNamespaceType g aenv (mty: ModuleOrNamespaceType) msigty acc = + let acc = (mty.AllEntities, acc) ||> QueueList.foldBack (fun e acc -> accValRemapFromModuleOrNamespaceType g aenv e.ModuleOrNamespaceType (getCorrespondingSigTy e.LogicalName msigty) acc) let acc = (mty.AllValsAndMembers, acc) ||> QueueList.foldBack (accValRemap g aenv msigty) acc let ComputeRemappingFromInferredSignatureToExplicitSignature g mty msigty = - // dprintf "ComputeRemappingFromInferredSignatureToExplicitSignature, \nmty = %s\nmmsigty=%s\n" (showL(entityTypeL mty)) (showL(entityTypeL msigty)); + // dprintf "ComputeRemappingFromInferredSignatureToExplicitSignature, \nmty = %s\nmmsigty=%s\n" (showL(entityTypeL mty)) (showL(entityTypeL msigty)) let ((mrpi, _) as entityRemap) = accEntityRemapFromModuleOrNamespaceType mty msigty (SignatureRepackageInfo.Empty, SignatureHidingInfo.Empty) let aenv = mrpi.ImplToSigMapping let valAndEntityRemap = accValRemapFromModuleOrNamespaceType g aenv mty msigty entityRemap @@ -3990,7 +4029,7 @@ let ComputeRemappingFromInferredSignatureToExplicitSignature g mty msigty = /// At TMDefRec nodes abstract (virtual) vslots are effectively binders, even /// though they are tucked away inside the tycon. This helper function extracts the /// virtual slots to aid with finding this babies. -let abstractSlotValsOfTycons (tycons:Tycon list) = +let abstractSlotValsOfTycons (tycons: Tycon list) = tycons |> List.collect (fun tycon -> if tycon.IsFSharpObjectModelTycon then tycon.FSharpObjectModelTypeInfo.fsobjmodel_vslots else []) |> List.map (fun v -> v.Deref) @@ -4002,8 +4041,8 @@ let rec accEntityRemapFromModuleOrNamespace msigty x acc = let acc = (tycons, acc) ||> List.foldBack (accEntityRemap msigty) let acc = (tycons, acc) ||> List.foldBack (fun e acc -> accEntityRemapFromModuleOrNamespaceType e.ModuleOrNamespaceType (getCorrespondingSigTy e.LogicalName msigty) acc) acc - | TMDefLet _ -> acc - | TMDefDo _ -> acc + | TMDefLet _ -> acc + | TMDefDo _ -> acc | TMDefs defs -> accEntityRemapFromModuleOrNamespaceDefs msigty defs acc | TMAbstract mexpr -> accEntityRemapFromModuleOrNamespaceType mexpr.Type msigty acc @@ -4016,7 +4055,6 @@ and accEntityRemapFromModuleOrNamespaceBind msigty x acc = | ModuleOrNamespaceBinding.Module(mspec, def) -> accSubEntityRemap msigty mspec (accEntityRemapFromModuleOrNamespace (getCorrespondingSigTy mspec.LogicalName msigty) def acc) - let rec accValRemapFromModuleOrNamespace g aenv msigty x acc = match x with | TMDefRec(_, tycons, mbinds, _) -> @@ -4025,10 +4063,11 @@ let rec accValRemapFromModuleOrNamespace g aenv msigty x acc = let vslotvs = abstractSlotValsOfTycons tycons let acc = (vslotvs, acc) ||> List.foldBack (accValRemap g aenv msigty) acc - | TMDefLet(bind, _) -> accValRemap g aenv msigty bind.Var acc - | TMDefDo _ -> acc + | TMDefLet(bind, _) -> accValRemap g aenv msigty bind.Var acc + | TMDefDo _ -> acc | TMDefs defs -> accValRemapFromModuleOrNamespaceDefs g aenv msigty defs acc | TMAbstract mexpr -> accValRemapFromModuleOrNamespaceType g aenv mexpr.Type msigty acc + and accValRemapFromModuleOrNamespaceBind g aenv msigty x acc = match x with | ModuleOrNamespaceBinding.Binding bind -> accValRemap g aenv msigty bind.Var acc @@ -4038,7 +4077,7 @@ and accValRemapFromModuleOrNamespaceBind g aenv msigty x acc = and accValRemapFromModuleOrNamespaceDefs g aenv msigty mdefs acc = List.foldBack (accValRemapFromModuleOrNamespace g aenv msigty) mdefs acc let ComputeRemappingFromImplementationToSignature g mdef msigty = - //if verbose then dprintf "ComputeRemappingFromImplementationToSignature, \nmdefs = %s\nmsigty=%s\n" (showL(DebugPrint.mdefL mdef)) (showL(DebugPrint.entityTypeL msigty)); + //if verbose then dprintf "ComputeRemappingFromImplementationToSignature, \nmdefs = %s\nmsigty=%s\n" (showL(DebugPrint.mdefL mdef)) (showL(DebugPrint.entityTypeL msigty)) let ((mrpi, _) as entityRemap) = accEntityRemapFromModuleOrNamespace msigty mdef (SignatureRepackageInfo.Empty, SignatureHidingInfo.Empty) let aenv = mrpi.ImplToSigMapping @@ -4049,35 +4088,33 @@ let ComputeRemappingFromImplementationToSignature g mdef msigty = // Compute instances of the above for the assembly boundary //-------------------------------------------------------------------------- -let accTyconHidingInfoAtAssemblyBoundary (tycon:Tycon) mhi = +let accTyconHidingInfoAtAssemblyBoundary (tycon: Tycon) mhi = if not (canAccessFromEverywhere tycon.Accessibility) then // The type constructor is not public, hence hidden at the assembly boundary. { mhi with HiddenTycons = Zset.add tycon mhi.HiddenTycons } elif not (canAccessFromEverywhere tycon.TypeReprAccessibility) then { mhi with HiddenTyconReprs = Zset.add tycon mhi.HiddenTyconReprs } else - mhi - |> Array.foldBack - (fun (rfield:RecdField) mhi -> - if not (canAccessFromEverywhere rfield.Accessibility) then - let tcref = mkLocalTyconRef tycon - let rfref = tcref.MakeNestedRecdFieldRef rfield - { mhi with HiddenRecdFields = Zset.add rfref mhi.HiddenRecdFields } - else mhi) - tycon.AllFieldsArray - |> List.foldBack - (fun (ucase:UnionCase) mhi -> - if not (canAccessFromEverywhere ucase.Accessibility) then - let tcref = mkLocalTyconRef tycon - let ucref = tcref.MakeNestedUnionCaseRef ucase - { mhi with HiddenUnionCases = Zset.add ucref mhi.HiddenUnionCases } - else mhi) - (tycon.UnionCasesAsList) + let mhi = + (tycon.AllFieldsArray, mhi) ||> Array.foldBack (fun rfield mhi -> + if not (canAccessFromEverywhere rfield.Accessibility) then + let tcref = mkLocalTyconRef tycon + let rfref = tcref.MakeNestedRecdFieldRef rfield + { mhi with HiddenRecdFields = Zset.add rfref mhi.HiddenRecdFields } + else mhi) + let mhi = + (tycon.UnionCasesAsList, mhi) ||> List.foldBack (fun ucase mhi -> + if not (canAccessFromEverywhere ucase.Accessibility) then + let tcref = mkLocalTyconRef tycon + let ucref = tcref.MakeNestedUnionCaseRef ucase + { mhi with HiddenUnionCases = Zset.add ucref mhi.HiddenUnionCases } + else mhi) + mhi // Collect up the values hidden at the assembly boundary. This is used by IsHiddenVal to // determine if something is considered hidden. This is used in turn to eliminate optimization // information at the assembly boundary and to decide to label things as "internal". -let accValHidingInfoAtAssemblyBoundary (vspec:Val) mhi = +let accValHidingInfoAtAssemblyBoundary (vspec: Val) mhi = if // anything labelled "internal" or more restrictive is considered to be hidden at the assembly boundary not (canAccessFromEverywhere vspec.Accessibility) || // compiler generated members for class function 'let' bindings are considered to be hidden at the assembly boundary @@ -4090,13 +4127,13 @@ let accValHidingInfoAtAssemblyBoundary (vspec:Val) mhi = mhi let rec accModuleOrNamespaceHidingInfoAtAssemblyBoundary mty acc = - let acc = QueueList.foldBack (fun (e:Entity) acc -> accModuleOrNamespaceHidingInfoAtAssemblyBoundary e.ModuleOrNamespaceType acc) mty.AllEntities acc + let acc = QueueList.foldBack (fun (e: Entity) acc -> accModuleOrNamespaceHidingInfoAtAssemblyBoundary e.ModuleOrNamespaceType acc) mty.AllEntities acc let acc = QueueList.foldBack accTyconHidingInfoAtAssemblyBoundary mty.AllEntities acc let acc = QueueList.foldBack accValHidingInfoAtAssemblyBoundary mty.AllValsAndMembers acc acc let ComputeHidingInfoAtAssemblyBoundary mty acc = -// dprintf "ComputeRemappingFromInferredSignatureToExplicitSignature, \nmty = %s\nmmsigty=%s\n" (showL(entityTypeL mty)) (showL(entityTypeL msigty)); +// dprintf "ComputeRemappingFromInferredSignatureToExplicitSignature, \nmty = %s\nmmsigty=%s\n" (showL(entityTypeL mty)) (showL(entityTypeL msigty)) accModuleOrNamespaceHidingInfoAtAssemblyBoundary mty acc //-------------------------------------------------------------------------- @@ -4105,7 +4142,7 @@ let ComputeHidingInfoAtAssemblyBoundary mty acc = let IsHidden setF accessF remapF debugF = let rec check mrmi x = - if verbose then dprintf "IsHidden %s ??\n" (showL (debugF x)); + if verbose then dprintf "IsHidden %s ??\n" (showL (debugF x)) // Internal/private? not (canAccessFromEverywhere (accessF x)) || (match mrmi with @@ -4117,14 +4154,13 @@ let IsHidden setF accessF remapF debugF = check rest (remapF rpi x)) fun mrmi x -> let res = check mrmi x - if verbose then dprintf "IsHidden, #mrmi = %d, %s = %b\n" mrmi.Length (showL (debugF x)) res; + if verbose then dprintf "IsHidden, #mrmi = %d, %s = %b\n" mrmi.Length (showL (debugF x)) res res -let IsHiddenTycon mrmi x = IsHidden (fun mhi -> mhi.HiddenTycons) (fun tc -> tc.Accessibility) (fun rpi x -> (remapTyconRef rpi.tyconRefRemap (mkLocalTyconRef x)).Deref) DebugPrint.tyconL mrmi x -let IsHiddenTyconRepr mrmi x = IsHidden (fun mhi -> mhi.HiddenTyconReprs) (fun v -> v.TypeReprAccessibility) (fun rpi x -> (remapTyconRef rpi.tyconRefRemap (mkLocalTyconRef x)).Deref) DebugPrint.tyconL mrmi x -let IsHiddenVal mrmi x = IsHidden (fun mhi -> mhi.HiddenVals) (fun v -> v.Accessibility) (fun rpi x -> (remapValRef rpi (mkLocalValRef x)).Deref) DebugPrint.valL mrmi x -let IsHiddenRecdField mrmi x = IsHidden (fun mhi -> mhi.HiddenRecdFields) (fun rfref -> rfref.RecdField.Accessibility) (fun rpi x -> remapRecdFieldRef rpi.tyconRefRemap x) DebugPrint.recdFieldRefL mrmi x - +let IsHiddenTycon mrmi x = IsHidden (fun mhi -> mhi.HiddenTycons) (fun tc -> tc.Accessibility) (fun rpi x -> (remapTyconRef rpi.tyconRefRemap (mkLocalTyconRef x)).Deref) DebugPrint.tyconL mrmi x +let IsHiddenTyconRepr mrmi x = IsHidden (fun mhi -> mhi.HiddenTyconReprs) (fun v -> v.TypeReprAccessibility) (fun rpi x -> (remapTyconRef rpi.tyconRefRemap (mkLocalTyconRef x)).Deref) DebugPrint.tyconL mrmi x +let IsHiddenVal mrmi x = IsHidden (fun mhi -> mhi.HiddenVals) (fun v -> v.Accessibility) (fun rpi x -> (remapValRef rpi (mkLocalValRef x)).Deref) DebugPrint.valL mrmi x +let IsHiddenRecdField mrmi x = IsHidden (fun mhi -> mhi.HiddenRecdFields) (fun rfref -> rfref.RecdField.Accessibility) (fun rpi x -> remapRecdFieldRef rpi.tyconRefRemap x) DebugPrint.recdFieldRefL mrmi x //-------------------------------------------------------------------------- // Generic operations on module types @@ -4132,7 +4168,7 @@ let IsHiddenRecdField mrmi x = IsHidden (fun mhi -> mhi.HiddenRecdFields) (fun r let foldModuleOrNamespaceTy ft fv mty acc = let rec go mty acc = - let acc = QueueList.foldBack (fun (e:Entity) acc -> go e.ModuleOrNamespaceType acc) mty.AllEntities acc + let acc = QueueList.foldBack (fun (e: Entity) acc -> go e.ModuleOrNamespaceType acc) mty.AllEntities acc let acc = QueueList.foldBack ft mty.AllEntities acc let acc = QueueList.foldBack fv mty.AllValsAndMembers acc acc @@ -4142,38 +4178,38 @@ let allValsOfModuleOrNamespaceTy m = foldModuleOrNamespaceTy (fun _ acc -> acc) let allEntitiesOfModuleOrNamespaceTy m = foldModuleOrNamespaceTy (fun ft acc -> ft :: acc) (fun _ acc -> acc) m [] //--------------------------------------------------------------------------- -// Free variables in terms. Are all constructs public accessible? +// Free variables in terms. Are all constructs public accessible? //--------------------------------------------------------------------------- -let isPublicVal (lv:Val) = (lv.Accessibility = taccessPublic) -let isPublicUnionCase (ucr:UnionCaseRef) = (ucr.UnionCase.Accessibility = taccessPublic) -let isPublicRecdField (rfr:RecdFieldRef) = (rfr.RecdField.Accessibility = taccessPublic) -let isPublicTycon (tcr:Tycon) = (tcr.Accessibility = taccessPublic) +let isPublicVal (lv: Val) = (lv.Accessibility = taccessPublic) +let isPublicUnionCase (ucr: UnionCaseRef) = (ucr.UnionCase.Accessibility = taccessPublic) +let isPublicRecdField (rfr: RecdFieldRef) = (rfr.RecdField.Accessibility = taccessPublic) +let isPublicTycon (tcref: Tycon) = (tcref.Accessibility = taccessPublic) let freeVarsAllPublic fvs = // Are any non-public items used in the expr (which corresponded to the fvs)? // Recall, taccess occurs in: - // EntityData has ReprAccessibility and Accessiblity - // UnionCase has Accessibility - // RecdField has Accessibility - // ValData has Accessibility + // EntityData has ReprAccessibility and Accessiblity + // UnionCase has Accessibility + // RecdField has Accessibility + // ValData has Accessibility // The freevars and FreeTyvars collect local constructs. // Here, we test that all those constructs are public. // // CODEREVIEW: // What about non-local vals. This fix assumes non-local vals must be public. OK? - Zset.forall isPublicVal fvs.FreeLocals && + Zset.forall isPublicVal fvs.FreeLocals && Zset.forall isPublicUnionCase fvs.FreeUnionCases && - Zset.forall isPublicRecdField fvs.FreeRecdFields && + Zset.forall isPublicRecdField fvs.FreeRecdFields && Zset.forall isPublicTycon fvs.FreeTyvars.FreeTycons let freeTyvarsAllPublic tyvars = Zset.forall isPublicTycon tyvars.FreeTycons - -// Detect the subset of match expressions we treat in a linear way -// -- if then else -// -- match e with pat[vs] -> e1[vs] | _ -> e2 +/// Detect the subset of match expressions we process in a linear way (i.e. using tailcalls, rather than +/// unbounded stack) +/// -- if then else +/// -- match e with pat[vs] -> e1[vs] | _ -> e2 let (|LinearMatchExpr|_|) expr = match expr with @@ -4183,42 +4219,53 @@ let (|LinearMatchExpr|_|) expr = let rebuildLinearMatchExpr (sp, m, dtree, tg1, e2, sp2, m2, ty) = primMkMatch (sp, m, dtree, [|tg1;(TTarget([], e2, sp2))|], m2, ty) +/// Detect a subset of 'Expr.Op' expressions we process in a linear way (i.e. using tailcalls, rather than +/// unbounded stack). Only covers Cons(args,Cons(args,Cons(args,Cons(args,...._)))). +let (|LinearOpExpr|_|) expr = + match expr with + | Expr.Op ((TOp.UnionCase _ as op), tinst, args, m) when not args.IsEmpty -> + let argsFront, argLast = List.frontAndBack args + Some (op, tinst, argsFront, argLast, m) + | _ -> None + +let rebuildLinearOpExpr (op, tinst, argsFront, argLast, m) = + Expr.Op (op, tinst, argsFront@[argLast], m) //--------------------------------------------------------------------------- -// Free variables in terms. All binders are distinct. +// Free variables in terms. All binders are distinct. //--------------------------------------------------------------------------- let emptyFreeVars = - { UsesMethodLocalConstructs=false; - UsesUnboundRethrow=false; - FreeLocalTyconReprs=emptyFreeTycons; - FreeLocals=emptyFreeLocals; - FreeTyvars=emptyFreeTyvars; - FreeRecdFields = emptyFreeRecdFields; + { UsesMethodLocalConstructs=false + UsesUnboundRethrow=false + FreeLocalTyconReprs=emptyFreeTycons + FreeLocals=emptyFreeLocals + FreeTyvars=emptyFreeTyvars + FreeRecdFields = emptyFreeRecdFields FreeUnionCases = emptyFreeUnionCases} let unionFreeVars fvs1 fvs2 = if fvs1 === emptyFreeVars then fvs2 else if fvs2 === emptyFreeVars then fvs1 else - { FreeLocals = unionFreeLocals fvs1.FreeLocals fvs2.FreeLocals; - FreeTyvars = unionFreeTyvars fvs1.FreeTyvars fvs2.FreeTyvars; - UsesMethodLocalConstructs = fvs1.UsesMethodLocalConstructs || fvs2.UsesMethodLocalConstructs; - UsesUnboundRethrow = fvs1.UsesUnboundRethrow || fvs2.UsesUnboundRethrow; - FreeLocalTyconReprs = unionFreeTycons fvs1.FreeLocalTyconReprs fvs2.FreeLocalTyconReprs; - FreeRecdFields = unionFreeRecdFields fvs1.FreeRecdFields fvs2.FreeRecdFields; - FreeUnionCases = unionFreeUnionCases fvs1.FreeUnionCases fvs2.FreeUnionCases; } - -let inline accFreeTyvars (opts:FreeVarOptions) f v acc = + { FreeLocals = unionFreeLocals fvs1.FreeLocals fvs2.FreeLocals + FreeTyvars = unionFreeTyvars fvs1.FreeTyvars fvs2.FreeTyvars + UsesMethodLocalConstructs = fvs1.UsesMethodLocalConstructs || fvs2.UsesMethodLocalConstructs + UsesUnboundRethrow = fvs1.UsesUnboundRethrow || fvs2.UsesUnboundRethrow + FreeLocalTyconReprs = unionFreeTycons fvs1.FreeLocalTyconReprs fvs2.FreeLocalTyconReprs + FreeRecdFields = unionFreeRecdFields fvs1.FreeRecdFields fvs2.FreeRecdFields + FreeUnionCases = unionFreeUnionCases fvs1.FreeUnionCases fvs2.FreeUnionCases } + +let inline accFreeTyvars (opts: FreeVarOptions) f v acc = if not opts.collectInTypes then acc else let ftyvs = acc.FreeTyvars let ftyvs' = f opts v ftyvs if ftyvs === ftyvs' then acc else { acc with FreeTyvars = ftyvs' } -let accFreeVarsInTy opts ty acc = accFreeTyvars opts accFreeInType ty acc -let accFreeVarsInTys opts tys acc = if isNil tys then acc else accFreeTyvars opts accFreeInTypes tys acc +let accFreeVarsInTy opts ty acc = accFreeTyvars opts accFreeInType ty acc +let accFreeVarsInTys opts tys acc = if isNil tys then acc else accFreeTyvars opts accFreeInTypes tys acc let accFreevarsInTycon opts tcref acc = accFreeTyvars opts accFreeTycon tcref acc -let accFreevarsInVal opts v acc = accFreeTyvars opts accFreeInVal v acc +let accFreevarsInVal opts v acc = accFreeTyvars opts accFreeInVal v acc let accFreeVarsInTraitSln opts tys acc = accFreeTyvars opts accFreeInTraitSln tys acc @@ -4244,19 +4291,19 @@ let accUsesRethrow flg fvs = let boundLocalVals opts vs fvs = List.foldBack (boundLocalVal opts) vs fvs -let bindLhs opts (bind:Binding) fvs = boundLocalVal opts bind.Var fvs +let bindLhs opts (bind: Binding) fvs = boundLocalVal opts bind.Var fvs let freeVarsCacheCompute opts cache f = if opts.canCache then cached cache f else f() let rec accBindRhs opts (TBind(_, repr, _)) acc = accFreeInExpr opts repr acc -and accFreeInSwitchCases opts csl dflt (acc:FreeVars) = +and accFreeInSwitchCases opts csl dflt (acc: FreeVars) = Option.foldBack (accFreeInDecisionTree opts) dflt (List.foldBack (accFreeInSwitchCase opts) csl acc) and accFreeInSwitchCase opts (TCase(discrim, dtree)) acc = accFreeInDecisionTree opts dtree (accFreeInTest opts discrim acc) -and accFreeInTest (opts:FreeVarOptions) discrim acc = +and accFreeInTest (opts: FreeVarOptions) discrim acc = match discrim with | DecisionTreeTest.UnionCase(ucref, tinst) -> accFreeUnionCaseRef opts ucref (accFreeVarsInTys opts tinst acc) | DecisionTreeTest.ArrayLength(_, ty) -> accFreeVarsInTy opts ty acc @@ -4268,7 +4315,7 @@ and accFreeInTest (opts:FreeVarOptions) discrim acc = (accFreeVarsInTys opts tys (Option.foldBack (fun (vref, tinst) acc -> accFreeValRef opts vref (accFreeVarsInTys opts tinst acc)) activePatIdentity acc)) -and accFreeInDecisionTree opts x (acc : FreeVars) = +and accFreeInDecisionTree opts x (acc: FreeVars) = match x with | TDSwitch(e1, csl, dflt, _) -> accFreeInExpr opts e1 (accFreeInSwitchCases opts csl dflt acc) | TDSuccess (es, _) -> accFreeInFlatExprs opts es acc @@ -4280,7 +4327,7 @@ and accFreeInValFlags opts flag acc = | VSlotDirectCall | CtorValUsedAsSelfInit | CtorValUsedAsSuperInit -> true - | PossibleConstrainedCall _ + | PossibleConstrainedCall _ | NormalValUse -> false let acc = accUsesFunctionLocalConstructs isMethLocal acc match flag with @@ -4296,21 +4343,21 @@ and accFreeLocalVal opts v fvs = and accLocalTyconRepr opts b fvs = if not opts.includeLocalTyconReprs then fvs else - if Zset.contains b fvs.FreeLocalTyconReprs then fvs + if Zset.contains b fvs.FreeLocalTyconReprs then fvs else { fvs with FreeLocalTyconReprs = Zset.add b fvs.FreeLocalTyconReprs } -and accUsedRecdOrUnionTyconRepr opts (tc:Tycon) fvs = - if match tc.TypeReprInfo with TFSharpObjectRepr _ | TRecdRepr _ | TUnionRepr _ -> true | _ -> false +and accUsedRecdOrUnionTyconRepr opts (tc: Tycon) fvs = + if match tc.TypeReprInfo with TFSharpObjectRepr _ | TRecdRepr _ | TUnionRepr _ -> true | _ -> false then accLocalTyconRepr opts tc fvs else fvs -and accFreeUnionCaseRef opts cr fvs = +and accFreeUnionCaseRef opts ucref fvs = if not opts.includeUnionCases then fvs else - if Zset.contains cr fvs.FreeUnionCases then fvs + if Zset.contains ucref fvs.FreeUnionCases then fvs else - let fvs = fvs |> accUsedRecdOrUnionTyconRepr opts cr.Tycon - let fvs = fvs |> accFreevarsInTycon opts cr.TyconRef - { fvs with FreeUnionCases = Zset.add cr fvs.FreeUnionCases } + let fvs = fvs |> accUsedRecdOrUnionTyconRepr opts ucref.Tycon + let fvs = fvs |> accFreevarsInTycon opts ucref.TyconRef + { fvs with FreeUnionCases = Zset.add ucref fvs.FreeUnionCases } and accFreeRecdFieldRef opts rfref fvs = if not opts.includeRecdFields then fvs else @@ -4321,7 +4368,7 @@ and accFreeRecdFieldRef opts rfref fvs = { fvs with FreeRecdFields = Zset.add rfref fvs.FreeRecdFields } and accFreeExnRef _exnc fvs = fvs // Note: this exnc (TyconRef) should be collected the surround types, e.g. tinst of Expr.Op -and accFreeValRef opts (vref:ValRef) fvs = +and accFreeValRef opts (vref: ValRef) fvs = match vref.IsLocalRef with | true -> accFreeLocalVal opts vref.PrivateTarget fvs // non-local values do not contain free variables @@ -4329,7 +4376,7 @@ and accFreeValRef opts (vref:ValRef) fvs = and accFreeInMethod opts (TObjExprMethod(slotsig, _attribs, tps, tmvs, e, _)) acc = accFreeInSlotSig opts slotsig - (unionFreeVars (accFreeTyvars opts boundTypars tps (List.foldBack (boundLocalVals opts) tmvs (freeInExpr opts e))) acc) + (unionFreeVars (accFreeTyvars opts boundTypars tps (List.foldBack (boundLocalVals opts) tmvs (freeInExpr opts e))) acc) and accFreeInMethods opts methods acc = List.foldBack (accFreeInMethod opts) methods acc @@ -4337,12 +4384,12 @@ and accFreeInMethods opts methods acc = and accFreeInInterfaceImpl opts (ty, overrides) acc = accFreeVarsInTy opts ty (accFreeInMethods opts overrides acc) -and accFreeInExpr (opts:FreeVarOptions) x acc = +and accFreeInExpr (opts: FreeVarOptions) x acc = match x with | Expr.Let _ -> accFreeInExprLinear opts x acc (fun e -> e) | _ -> accFreeInExprNonLinear opts x acc -and accFreeInExprLinear (opts:FreeVarOptions) x acc contf = +and accFreeInExprLinear (opts: FreeVarOptions) x acc contf = // for nested let-bindings, we need to continue after the whole let-binding is processed match x with | Expr.Let (bind, e, _, cache) -> @@ -4355,24 +4402,30 @@ and accFreeInExprLinear (opts:FreeVarOptions) x acc contf = and accFreeInExprNonLinear opts x acc = match x with + // BINDING CONSTRUCTS - | Expr.Lambda (_, ctorThisValOpt, baseValOpt, vs, b, _, rty) -> + | Expr.Lambda (_, ctorThisValOpt, baseValOpt, vs, bodyExpr, _, rty) -> unionFreeVars (Option.foldBack (boundLocalVal opts) ctorThisValOpt (Option.foldBack (boundLocalVal opts) baseValOpt (boundLocalVals opts vs (accFreeVarsInTy opts rty - (freeInExpr opts b))))) + (freeInExpr opts bodyExpr))))) acc - | Expr.TyLambda (_, vs, b, _, rty) -> - unionFreeVars (accFreeTyvars opts boundTypars vs (accFreeVarsInTy opts rty (freeInExpr opts b))) acc - | Expr.TyChoose (vs, b, _) -> - unionFreeVars (accFreeTyvars opts boundTypars vs (freeInExpr opts b)) acc - | Expr.LetRec (binds, e, _, cache) -> - unionFreeVars (freeVarsCacheCompute opts cache (fun () -> List.foldBack (bindLhs opts) binds (List.foldBack (accBindRhs opts) binds (freeInExpr opts e)))) acc + + | Expr.TyLambda (_, vs, bodyExpr, _, rty) -> + unionFreeVars (accFreeTyvars opts boundTypars vs (accFreeVarsInTy opts rty (freeInExpr opts bodyExpr))) acc + + | Expr.TyChoose (vs, bodyExpr, _) -> + unionFreeVars (accFreeTyvars opts boundTypars vs (freeInExpr opts bodyExpr)) acc + + | Expr.LetRec (binds, bodyExpr, _, cache) -> + unionFreeVars (freeVarsCacheCompute opts cache (fun () -> List.foldBack (bindLhs opts) binds (List.foldBack (accBindRhs opts) binds (freeInExpr opts bodyExpr)))) acc + | Expr.Let _ -> failwith "unreachable - linear expr" - | Expr.Obj (_, ty, basev, basecall, overrides, iimpls, _) -> + + | Expr.Obj (_, ty, basev, basecall, overrides, iimpls, _) -> unionFreeVars (boundProtect (Option.foldBack (boundLocalVal opts) basev @@ -4381,47 +4434,55 @@ and accFreeInExprNonLinear opts x acc = (accFreeInMethods opts overrides (List.foldBack (accFreeInInterfaceImpl opts) iimpls emptyFreeVars)))))) acc + // NON-BINDING CONSTRUCTS | Expr.Const _ -> acc + | Expr.Val (lvr, flags, _) -> accFreeInValFlags opts flags (accFreeValRef opts lvr acc) + | Expr.Quote (ast, {contents=Some(_, argTypes, argExprs, _data)}, _, _, ty) -> accFreeInExpr opts ast (accFreeInExprs opts argExprs (accFreeVarsInTys opts argTypes (accFreeVarsInTy opts ty acc))) + | Expr.Quote (ast, {contents=None}, _, _, ty) -> accFreeInExpr opts ast (accFreeVarsInTy opts ty acc) + | Expr.App(f0, f0ty, tyargs, args, _) -> accFreeVarsInTy opts f0ty (accFreeInExpr opts f0 (accFreeVarsInTys opts tyargs (accFreeInExprs opts args acc))) + | Expr.Link(eref) -> accFreeInExpr opts !eref acc - | Expr.Sequential (e1, e2, _, _, _) -> - let acc = accFreeInExpr opts e1 acc - // tail-call - this is required because we should be able to handle (((e1; e2); e3); e4; .... )) - accFreeInExpr opts e2 acc - | Expr.StaticOptimization (_, e2, e3, _) -> accFreeInExpr opts e2 (accFreeInExpr opts e3 acc) + | Expr.Sequential (expr1, expr2, _, _, _) -> + let acc = accFreeInExpr opts expr1 acc + // tail-call - linear expression + accFreeInExpr opts expr2 acc + + | Expr.StaticOptimization (_, expr2, expr3, _) -> + accFreeInExpr opts expr2 (accFreeInExpr opts expr3 acc) + | Expr.Match (_, _, dtree, targets, _, _) -> match x with // Handle if-then-else - | LinearMatchExpr(_, _, dtree, tg1, e2, _, _, _) -> + | LinearMatchExpr(_, _, dtree, target, bodyExpr, _, _, _) -> let acc = accFreeInDecisionTree opts dtree acc - let acc = accFreeInTarget opts tg1 acc - accFreeInExpr opts e2 acc // tailcall + let acc = accFreeInTarget opts target acc + accFreeInExpr opts bodyExpr acc // tailcall | _ -> let acc = accFreeInDecisionTree opts dtree acc accFreeInTargets opts targets acc - //| Expr.Op (TOp.TryCatch, tinst, [Expr.Lambda(_, _, [_], e1, _, _, _); Expr.Lambda(_, _, [_], e2, _, _, _); Expr.Lambda(_, _, [_], e3, _, _, _)], _) -> - | Expr.Op (TOp.TryCatch _, tinst, [e1;e2;e3], _) -> + | Expr.Op (TOp.TryCatch _, tinst, [expr1; expr2; expr3], _) -> unionFreeVars (accFreeVarsInTys opts tinst - (accFreeInExprs opts [e1;e2] acc)) - (bound_rethrow (accFreeInExpr opts e3 emptyFreeVars)) + (accFreeInExprs opts [expr1; expr2] acc)) + (bound_rethrow (accFreeInExpr opts expr3 emptyFreeVars)) | Expr.Op (op, tinst, args, _) -> let acc = accFreeInOp opts op acc @@ -4444,34 +4505,44 @@ and accFreeInOp opts op acc = | TOp.Goto _ | TOp.Label _ | TOp.Return | TOp.TupleFieldGet _ -> acc - | TOp.Tuple tupInfo -> accFreeTyvars opts accFreeInTupInfo tupInfo acc + | TOp.Tuple tupInfo -> + accFreeTyvars opts accFreeInTupInfo tupInfo acc + | TOp.AnonRecd anonInfo - | TOp.AnonRecdGet (anonInfo, _) -> accFreeTyvars opts accFreeInTupInfo anonInfo.TupInfo acc + | TOp.AnonRecdGet (anonInfo, _) -> + accFreeTyvars opts accFreeInTupInfo anonInfo.TupInfo acc - | TOp.UnionCaseTagGet tr -> accUsedRecdOrUnionTyconRepr opts tr.Deref acc + | TOp.UnionCaseTagGet tcref -> + accUsedRecdOrUnionTyconRepr opts tcref.Deref acc // Things containing just a union case reference - | TOp.UnionCaseProof cr - | TOp.UnionCase cr - | TOp.UnionCaseFieldGetAddr (cr, _, _) - | TOp.UnionCaseFieldGet (cr, _) - | TOp.UnionCaseFieldSet (cr, _) -> accFreeUnionCaseRef opts cr acc + | TOp.UnionCaseProof ucref + | TOp.UnionCase ucref + | TOp.UnionCaseFieldGetAddr (ucref, _, _) + | TOp.UnionCaseFieldGet (ucref, _) + | TOp.UnionCaseFieldSet (ucref, _) -> + accFreeUnionCaseRef opts ucref acc // Things containing just an exception reference - | TOp.ExnConstr ecr - | TOp.ExnFieldGet (ecr, _) - | TOp.ExnFieldSet (ecr, _) -> accFreeExnRef ecr acc + | TOp.ExnConstr ecref + | TOp.ExnFieldGet (ecref, _) + | TOp.ExnFieldSet (ecref, _) -> + accFreeExnRef ecref acc - | TOp.ValFieldGet fr - | TOp.ValFieldGetAddr (fr, _) - | TOp.ValFieldSet fr -> accFreeRecdFieldRef opts fr acc + | TOp.ValFieldGet fref + | TOp.ValFieldGetAddr (fref, _) + | TOp.ValFieldSet fref -> + accFreeRecdFieldRef opts fref acc - | TOp.Recd (kind, tcr) -> + | TOp.Recd (kind, tcref) -> let acc = accUsesFunctionLocalConstructs (kind = RecdExprIsObjInit) acc - (accUsedRecdOrUnionTyconRepr opts tcr.Deref (accFreeTyvars opts accFreeTycon tcr acc)) + (accUsedRecdOrUnionTyconRepr opts tcref.Deref (accFreeTyvars opts accFreeTycon tcref acc)) - | TOp.ILAsm (_, tys) -> accFreeVarsInTys opts tys acc - | TOp.Reraise -> accUsesRethrow true acc + | TOp.ILAsm (_, tys) -> + accFreeVarsInTys opts tys acc + + | TOp.Reraise -> + accUsesRethrow true acc | TOp.TraitCall(TTrait(tys, _, _, argtys, rty, sln)) -> Option.foldBack (accFreeVarsInTraitSln opts) sln.Value @@ -4479,8 +4550,8 @@ and accFreeInOp opts op acc = (accFreeVarsInTys opts argtys (Option.foldBack (accFreeVarsInTy opts) rty acc))) - | TOp.LValueOp (_, lvr) -> - accFreeValRef opts lvr acc + | TOp.LValueOp (_, vref) -> + accFreeValRef opts vref acc | TOp.ILCall (_, isProtectedCall, _, _, valUseFlags, _, _, _, enclTypeArgs, methTypeArgs, tys) -> accFreeVarsInTys opts enclTypeArgs @@ -4492,77 +4563,86 @@ and accFreeInOp opts op acc = and accFreeInTargets opts targets acc = Array.foldBack (accFreeInTarget opts) targets acc -and accFreeInTarget opts (TTarget(vs, e, _)) acc = - List.foldBack (boundLocalVal opts) vs (accFreeInExpr opts e acc) +and accFreeInTarget opts (TTarget(vs, expr, _)) acc = + List.foldBack (boundLocalVal opts) vs (accFreeInExpr opts expr acc) -and accFreeInFlatExprs opts (es:Exprs) acc = List.foldBack (accFreeInExpr opts) es acc +and accFreeInFlatExprs opts (exprs: Exprs) acc = List.foldBack (accFreeInExpr opts) exprs acc -and accFreeInExprs opts (es: Exprs) acc = - match es with +and accFreeInExprs opts (exprs: Exprs) acc = + match exprs with | [] -> acc - | h::t -> - let acc = accFreeInExpr opts h acc + | [h]-> // tailcall - e.g. Cons(x, Cons(x2, .......Cons(x1000000, Nil))) and [| x1; .... ; x1000000 |] + accFreeInExpr opts h acc + | h:: t -> + let acc = accFreeInExpr opts h acc accFreeInExprs opts t acc -and accFreeInSlotSig opts (TSlotSig(_, ty, _, _, _, _)) acc = accFreeVarsInTy opts ty acc +and accFreeInSlotSig opts (TSlotSig(_, ty, _, _, _, _)) acc = + accFreeVarsInTy opts ty acc -and freeInDecisionTree opts e = accFreeInDecisionTree opts e emptyFreeVars -and freeInExpr opts e = accFreeInExpr opts e emptyFreeVars +and freeInDecisionTree opts dtree = + accFreeInDecisionTree opts dtree emptyFreeVars + +and freeInExpr opts expr = + accFreeInExpr opts expr emptyFreeVars // Note: these are only an approximation - they are currently used only by the optimizer -let rec accFreeInModuleOrNamespace opts x acc = - match x with +let rec accFreeInModuleOrNamespace opts mexpr acc = + match mexpr with | TMDefRec(_, _, mbinds, _) -> List.foldBack (accFreeInModuleOrNamespaceBind opts) mbinds acc - | TMDefLet(bind, _) -> accBindRhs opts bind acc - | TMDefDo(e, _) -> accFreeInExpr opts e acc + | TMDefLet(bind, _) -> accBindRhs opts bind acc + | TMDefDo(e, _) -> accFreeInExpr opts e acc | TMDefs defs -> accFreeInModuleOrNamespaces opts defs acc | TMAbstract(ModuleOrNamespaceExprWithSig(_, mdef, _)) -> accFreeInModuleOrNamespace opts mdef acc // not really right, but sufficient for how this is used in optimization -and accFreeInModuleOrNamespaceBind opts x acc = - match x with - | ModuleOrNamespaceBinding.Binding bind -> accBindRhs opts bind acc + +and accFreeInModuleOrNamespaceBind opts mbind acc = + match mbind with + | ModuleOrNamespaceBinding.Binding bind -> accBindRhs opts bind acc | ModuleOrNamespaceBinding.Module (_, def) -> accFreeInModuleOrNamespace opts def acc -and accFreeInModuleOrNamespaces opts x acc = - List.foldBack (accFreeInModuleOrNamespace opts) x acc -// NOTE: we don't yet need to ask for free variables in module expressions +and accFreeInModuleOrNamespaces opts mexprs acc = + List.foldBack (accFreeInModuleOrNamespace opts) mexprs acc + +let freeInBindingRhs opts bind = + accBindRhs opts bind emptyFreeVars -let freeInBindingRhs opts bind = accBindRhs opts bind emptyFreeVars -let freeInModuleOrNamespace opts mdef = accFreeInModuleOrNamespace opts mdef emptyFreeVars +let freeInModuleOrNamespace opts mdef = + accFreeInModuleOrNamespace opts mdef emptyFreeVars //--------------------------------------------------------------------------- // Destruct - rarely needed //--------------------------------------------------------------------------- -let rec stripLambda (e, ty) = - match e with - | Expr.Lambda (_, ctorThisValOpt, baseValOpt, v, b, _, rty) -> - if Option.isSome ctorThisValOpt then errorR(InternalError("skipping ctorThisValOpt", e.Range)); - if Option.isSome baseValOpt then errorR(InternalError("skipping baseValOpt", e.Range)); - let (vs', b', rty') = stripLambda (b, rty) - (v :: vs', b', rty') - | _ -> ([], e, ty) - -let rec stripLambdaN n e = +let rec stripLambda (expr, ty) = + match expr with + | Expr.Lambda (_, ctorThisValOpt, baseValOpt, v, bodyExpr, _, rty) -> + if Option.isSome ctorThisValOpt then errorR(InternalError("skipping ctorThisValOpt", expr.Range)) + if Option.isSome baseValOpt then errorR(InternalError("skipping baseValOpt", expr.Range)) + let (vs', bodyExpr', rty') = stripLambda (bodyExpr, rty) + (v :: vs', bodyExpr', rty') + | _ -> ([], expr, ty) + +let rec stripLambdaN n expr = assert (n >= 0) - match e with - | Expr.Lambda (_, ctorThisValOpt, baseValOpt, v, body, _, _) when n > 0 -> - if Option.isSome ctorThisValOpt then errorR(InternalError("skipping ctorThisValOpt", e.Range)); - if Option.isSome baseValOpt then errorR(InternalError("skipping baseValOpt", e.Range)); - let (vs, body', remaining) = stripLambdaN (n-1) body - (v :: vs, body', remaining) - | _ -> ([], e, n) - -let tryStripLambdaN n e = - match e with + match expr with + | Expr.Lambda (_, ctorThisValOpt, baseValOpt, v, bodyExpr, _, _) when n > 0 -> + if Option.isSome ctorThisValOpt then errorR(InternalError("skipping ctorThisValOpt", expr.Range)) + if Option.isSome baseValOpt then errorR(InternalError("skipping baseValOpt", expr.Range)) + let (vs, bodyExpr', remaining) = stripLambdaN (n-1) bodyExpr + (v :: vs, bodyExpr', remaining) + | _ -> ([], expr, n) + +let tryStripLambdaN n expr = + match expr with | Expr.Lambda(_, None, None, _, _, _, _) -> - let argvsl, body, remaining = stripLambdaN n e - if remaining = 0 then Some (argvsl, body) + let argvsl, bodyExpr, remaining = stripLambdaN n expr + if remaining = 0 then Some (argvsl, bodyExpr) else None | _ -> None -let stripTopLambda (e, ty) = - let tps, taue, tauty = match e with Expr.TyLambda (_, tps, b, _, rty) -> tps, b, rty | _ -> [], e, ty +let stripTopLambda (expr, ty) = + let tps, taue, tauty = match expr with Expr.TyLambda (_, tps, b, _, rty) -> tps, b, rty | _ -> [], expr, ty let vs, body, rty = stripLambda (taue, tauty) tps, vs, body, rty @@ -4571,7 +4651,7 @@ type AllowTypeDirectedDetupling = Yes | No // This is used to infer arities of expressions // i.e. base the chosen arity on the syntactic expression shape and type of arguments -let InferArityOfExpr g allowTypeDirectedDetupling ty partialArgAttribsL retAttribs e = +let InferArityOfExpr g allowTypeDirectedDetupling ty partialArgAttribsL retAttribs expr = let rec stripLambda_notypes e = match e with | Expr.Lambda (_, _, _, vs, b, _, _) -> @@ -4585,9 +4665,9 @@ let InferArityOfExpr g allowTypeDirectedDetupling ty partialArgAttribsL retAttri let vs, body = stripLambda_notypes taue tps, vs, body - let tps, vsl, _ = stripTopLambdaNoTypes e + let tps, vsl, _ = stripTopLambdaNoTypes expr let fun_arity = vsl.Length - let dtys, _ = stripFunTyN g fun_arity (snd (tryDestForallTy g ty)) + let dtys, _ = stripFunTyN g fun_arity (snd (tryDestForallTy g ty)) let partialArgAttribsL = Array.ofList partialArgAttribsL assert (List.length vsl = List.length dtys) @@ -4601,19 +4681,19 @@ let InferArityOfExpr g allowTypeDirectedDetupling ty partialArgAttribsL retAttri if (i = 0 && isUnitTy g ty) then [] else tryDestRefTupleTy g ty let ids = - if vs.Length = tys.Length then vs |> List.map (fun v -> Some v.Id) + if vs.Length = tys.Length then vs |> List.map (fun v -> Some v.Id) else tys |> List.map (fun _ -> None) let attribs = - if partialAttribs.Length = tys.Length then partialAttribs + if partialAttribs.Length = tys.Length then partialAttribs else tys |> List.map (fun _ -> []) - (ids, attribs) ||> List.map2 (fun id attribs -> { Name = id; Attribs = attribs } : ArgReprInfo )) - let retInfo : ArgReprInfo = { Attribs = retAttribs; Name = None } + (ids, attribs) ||> List.map2 (fun id attribs -> { Name = id; Attribs = attribs }: ArgReprInfo )) + let retInfo: ArgReprInfo = { Attribs = retAttribs; Name = None } ValReprInfo (ValReprInfo.InferTyparInfo tps, curriedArgInfos, retInfo) -let InferArityOfExprBinding g allowTypeDirectedDetupling (v:Val) e = +let InferArityOfExprBinding g allowTypeDirectedDetupling (v: Val) expr = match v.ValReprInfo with | Some info -> info - | None -> InferArityOfExpr g allowTypeDirectedDetupling v.Type [] [] e + | None -> InferArityOfExpr g allowTypeDirectedDetupling v.Type [] [] expr //------------------------------------------------------------------------- // Check if constraints are satisfied that allow us to use more optimized @@ -4648,14 +4728,12 @@ let underlyingTypeOfEnumTy (g: TcGlobals) ty = let tycon = (tcrefOfAppTy g ty).Deref match tycon.GetFieldByName "value__" with | Some rf -> rf.FormalType - | None -> error(InternalError("no 'value__' field found for enumeration type "+tycon.LogicalName, tycon.Range)) - + | None -> error(InternalError("no 'value__' field found for enumeration type " + tycon.LogicalName, tycon.Range)) // CLEANUP NOTE: Get rid of this mutation. -let setValHasNoArity (f:Val) = +let setValHasNoArity (f: Val) = f.SetValReprInfo None; f - //-------------------------------------------------------------------------- // Resolve static optimization constraints //-------------------------------------------------------------------------- @@ -4679,13 +4757,13 @@ let decideStaticOptimizationConstraint g c = match b with | AppTy g (tcref2, _) -> if tyconRefEq g tcref1 tcref2 then StaticOptimizationAnswer.Yes else StaticOptimizationAnswer.No - | RefTupleTy g _ | FunTy g _ -> StaticOptimizationAnswer.No + | RefTupleTy g _ | FunTy g _ -> StaticOptimizationAnswer.No | _ -> StaticOptimizationAnswer.Unknown | FunTy g _ -> let b = normalizeEnumTy g (stripTyEqnsAndMeasureEqns g b) match b with - | FunTy g _ -> StaticOptimizationAnswer.Yes + | FunTy g _ -> StaticOptimizationAnswer.Yes | AppTy g _ | RefTupleTy g _ -> StaticOptimizationAnswer.No | _ -> StaticOptimizationAnswer.Unknown | RefTupleTy g ts1 -> @@ -4707,7 +4785,7 @@ let decideStaticOptimizationConstraint g c = let rec DecideStaticOptimizations g cs = match cs with | [] -> StaticOptimizationAnswer.Yes - | h::t -> + | h:: t -> let d = decideStaticOptimizationConstraint g h if d = StaticOptimizationAnswer.No then StaticOptimizationAnswer.No elif d = StaticOptimizationAnswer.Yes then DecideStaticOptimizations g t @@ -4724,7 +4802,6 @@ let mkStaticOptimizationExpr g (cs, e1, e2, m) = // Used to inline expressions. //-------------------------------------------------------------------------- - type ValCopyFlag = | CloneAll | CloneAllAndMarkExprValsAsCompilerGenerated @@ -4740,19 +4817,19 @@ let markAsCompGen compgen d = | _ -> false { d with val_flags= d.val_flags.SetIsCompilerGenerated(d.val_flags.IsCompilerGenerated || compgen) } -let bindLocalVal (v:Val) (v':Val) tmenv = +let bindLocalVal (v: Val) (v': Val) tmenv = { tmenv with valRemap=tmenv.valRemap.Add v (mkLocalValRef v') } let bindLocalVals vs vs' tmenv = { tmenv with valRemap= (vs, vs', tmenv.valRemap) |||> List.foldBack2 (fun v v' acc -> acc.Add v (mkLocalValRef v') ) } -let bindTycon (tc:Tycon) (tc':Tycon) tyenv = - { tyenv with tyconRefRemap=tyenv.tyconRefRemap.Add (mkLocalTyconRef tc) (mkLocalTyconRef tc') } +let bindTycon (tc: Tycon) (tc': Tycon) tyenv = + { tyenv with tyconRefRemap=tyenv.tyconRefRemap.Add (mkLocalTyconRef tc) (mkLocalTyconRef tc') } let bindTycons tcs tcs' tyenv = { tyenv with tyconRefRemap= (tcs, tcs', tyenv.tyconRefRemap) |||> List.foldBack2 (fun tc tc' acc -> acc.Add (mkLocalTyconRef tc) (mkLocalTyconRef tc')) } -let remapAttribKind tmenv k = +let remapAttribKind tmenv k = match k with | ILAttrib _ as x -> x | FSAttrib vref -> FSAttrib(remapValRef tmenv vref) @@ -4774,11 +4851,11 @@ let rec remapAttrib g tmenv (Attrib (tcref, kind, args, props, isGetOrSetAttr, t and remapAttribExpr g tmenv (AttribExpr(e1, e2)) = AttribExpr(remapExpr g CloneAll tmenv e1, remapExpr g CloneAll tmenv e2) -and remapAttribs g tmenv xs = List.map (remapAttrib g tmenv) xs +and remapAttribs g tmenv xs = List.map (remapAttrib g tmenv) xs and remapPossibleForallTy g tmenv ty = remapTypeFull (remapAttribs g tmenv) tmenv ty -and remapArgData g tmenv (argInfo : ArgReprInfo) : ArgReprInfo = +and remapArgData g tmenv (argInfo: ArgReprInfo) : ArgReprInfo = { Attribs = remapAttribs g tmenv argInfo.Attribs; Name = argInfo.Name } and remapValReprInfo g tmenv (ValReprInfo(tpNames, arginfosl, retInfo)) = @@ -4793,15 +4870,15 @@ and remapValData g tmenv (d: ValData) = let memberInfoR = d.MemberInfo |> Option.map (remapMemberInfo g d.val_range topValInfo ty tyR tmenv) let attribsR = d.Attribs |> remapAttribs g tmenv { d with - val_type = tyR + val_type = tyR val_opt_data = match d.val_opt_data with | Some dd -> Some { dd with val_declaring_entity = declaringEntityR - val_repr_info = reprInfoR - val_member_info = memberInfoR - val_attribs = attribsR } + val_repr_info = reprInfoR + val_member_info = memberInfoR + val_attribs = attribsR } | None -> None } and remapParentRef tyenv p = @@ -4809,17 +4886,17 @@ and remapParentRef tyenv p = | ParentNone -> ParentNone | Parent x -> Parent (x |> remapTyconRef tyenv.tyconRefRemap) -and mapImmediateValsAndTycons ft fv (x:ModuleOrNamespaceType) = +and mapImmediateValsAndTycons ft fv (x: ModuleOrNamespaceType) = let vals = x.AllValsAndMembers |> QueueList.map fv let tycons = x.AllEntities |> QueueList.map ft new ModuleOrNamespaceType(x.ModuleOrNamespaceKind, vals, tycons) -and copyVal compgen (v:Val) = +and copyVal compgen (v: Val) = match compgen with | OnlyCloneExprVals when v.IsMemberOrModuleBinding -> v - | _ -> v |> NewModifiedVal id + | _ -> v |> NewModifiedVal id -and fixupValData g compgen tmenv (v2:Val) = +and fixupValData g compgen tmenv (v2: Val) = // only fixup if we copy the value match compgen with | OnlyCloneExprVals when v2.IsMemberOrModuleBinding -> () @@ -4840,49 +4917,62 @@ and copyAndRemapAndBindVal g compgen tmenv v = fixupValData g compgen tmenvinner v2 v2, tmenvinner -and remapExpr (g: TcGlobals) (compgen:ValCopyFlag) (tmenv:Remap) x = - match x with +and remapExpr (g: TcGlobals) (compgen: ValCopyFlag) (tmenv: Remap) expr = + match expr with + + // Handle the linear cases for arbitrary-sized inputs + | LinearOpExpr _ + | LinearMatchExpr _ + | Expr.Sequential _ + | Expr.Let _ -> + remapLinearExpr g compgen tmenv expr (fun x -> x) + // Binding constructs - see also dtrees below - | Expr.Lambda (_, ctorThisValOpt, baseValOpt, vs, b, m, rty) -> - let ctorThisValOpt, tmenv = Option.mapFold (copyAndRemapAndBindVal g compgen) tmenv ctorThisValOpt - let baseValOpt, tmenv = Option.mapFold (copyAndRemapAndBindVal g compgen) tmenv baseValOpt + | Expr.Lambda (_, ctorThisValOpt, baseValOpt, vs, b, m, rty) -> + let ctorThisValOpt, tmenv = Option.mapFold (copyAndRemapAndBindVal g compgen) tmenv ctorThisValOpt + let baseValOpt, tmenv = Option.mapFold (copyAndRemapAndBindVal g compgen) tmenv baseValOpt let vs, tmenv = copyAndRemapAndBindVals g compgen tmenv vs let b = remapExpr g compgen tmenv b let rty = remapType tmenv rty Expr.Lambda (newUnique(), ctorThisValOpt, baseValOpt, vs, b, m, rty) + | Expr.TyLambda (_, tps, b, m, rty) -> let tps', tmenvinner = tmenvCopyRemapAndBindTypars (remapAttribs g tmenv) tmenv tps mkTypeLambda m tps' (remapExpr g compgen tmenvinner b, remapType tmenvinner rty) + | Expr.TyChoose (tps, b, m) -> let tps', tmenvinner = tmenvCopyRemapAndBindTypars (remapAttribs g tmenv) tmenv tps Expr.TyChoose(tps', remapExpr g compgen tmenvinner b, m) + | Expr.LetRec (binds, e, m, _) -> let binds', tmenvinner = copyAndRemapAndBindBindings g compgen tmenv binds Expr.LetRec (binds', remapExpr g compgen tmenvinner e, m, NewFreeVarsCache()) - | Expr.Sequential _ - | Expr.Let _ -> remapLinearExpr g compgen tmenv x (fun x -> x) + | Expr.Match (spBind, exprm, pt, targets, m, ty) -> primMkMatch (spBind, exprm, remapDecisionTree g compgen tmenv pt, targets |> Array.map (remapTarget g compgen tmenv), m, remapType tmenv ty) - // Other constructs + | Expr.Val (vr, vf, m) -> let vr' = remapValRef tmenv vr let vf' = remapValFlags tmenv vf - if vr === vr' && vf === vf' then x + if vr === vr' && vf === vf' then expr else Expr.Val (vr', vf', m) + | Expr.Quote (a, {contents=Some(typeDefs, argTypes, argExprs, data)}, isFromQueryExpression, m, ty) -> // fix value of compgen for both original expression and pickled AST let compgen = fixValCopyFlagForQuotations compgen - Expr.Quote (remapExpr g compgen tmenv a, {contents=Some(typeDefs, remapTypesAux tmenv argTypes, remapExprs g compgen tmenv argExprs, data)}, isFromQueryExpression, m, remapType tmenv ty) + Expr.Quote (remapExpr g compgen tmenv a, {contents=Some(typeDefs, remapTypesAux tmenv argTypes, remapExprs g compgen tmenv argExprs, data)}, isFromQueryExpression, m, remapType tmenv ty) + | Expr.Quote (a, {contents=None}, isFromQueryExpression, m, ty) -> Expr.Quote (remapExpr g (fixValCopyFlagForQuotations compgen) tmenv a, {contents=None}, isFromQueryExpression, m, remapType tmenv ty) + | Expr.Obj (_, ty, basev, basecall, overrides, iimpls, m) -> let basev', tmenvinner = Option.mapFold (copyAndRemapAndBindVal g compgen) tmenv basev - mkObjExpr(remapType tmenv ty, basev', - remapExpr g compgen tmenv basecall, - List.map (remapMethod g compgen tmenvinner) overrides, - List.map (remapInterfaceImpl g compgen tmenvinner) iimpls, m) + mkObjExpr (remapType tmenv ty, basev', + remapExpr g compgen tmenv basecall, + List.map (remapMethod g compgen tmenvinner) overrides, + List.map (remapInterfaceImpl g compgen tmenvinner) iimpls, m) // Addresses of immutable field may "leak" across assembly boundaries - see CanTakeAddressOfRecdFieldRef below. // This is "ok", in the sense that it is always valid to fix these up to be uses @@ -4911,7 +5001,7 @@ and remapExpr (g: TcGlobals) (compgen:ValCopyFlag) (tmenv:Remap) x = let op' = remapOp tmenv op let tinst' = remapTypes tmenv tinst let args' = remapExprs g compgen tmenv args - if op === op' && tinst === tinst' && args === args' then x + if op === op' && tinst === tinst' && args === args' then expr else Expr.Op (op', tinst', args', m) | Expr.App(e1, e1ty, tyargs, args, m) -> @@ -4919,45 +5009,59 @@ and remapExpr (g: TcGlobals) (compgen:ValCopyFlag) (tmenv:Remap) x = let e1ty' = remapPossibleForallTy g tmenv e1ty let tyargs' = remapTypes tmenv tyargs let args' = remapExprs g compgen tmenv args - if e1 === e1' && e1ty === e1ty' && tyargs === tyargs' && args === args' then x + if e1 === e1' && e1ty === e1ty' && tyargs === tyargs' && args === args' then expr else Expr.App(e1', e1ty', tyargs', args', m) + | Expr.Link(eref) -> remapExpr g compgen tmenv !eref + | Expr.StaticOptimization (cs, e2, e3, m) -> // note that type instantiation typically resolve the static constraints here mkStaticOptimizationExpr g (List.map (remapConstraint tmenv) cs, remapExpr g compgen tmenv e2, remapExpr g compgen tmenv e3, m) | Expr.Const (c, m, ty) -> let ty' = remapType tmenv ty - if ty === ty' then x else Expr.Const (c, m, ty') + if ty === ty' then expr else Expr.Const (c, m, ty') and remapTarget g compgen tmenv (TTarget(vs, e, spTarget)) = let vs', tmenvinner = copyAndRemapAndBindVals g compgen tmenv vs TTarget(vs', remapExpr g compgen tmenvinner e, spTarget) -and remapLinearExpr g compgen tmenv e contf = - match e with - | Expr.Let (bind, e, m, _) -> - let bind', tmenvinner = copyAndRemapAndBindBinding g compgen tmenv bind - // tailcall - remapLinearExpr g compgen tmenvinner e (contf << mkLetBind m bind') +and remapLinearExpr g compgen tmenv expr contf = - | Expr.Sequential (e1, e2, dir, spSeq, m) -> - let e1' = remapExpr g compgen tmenv e1 - // tailcall - remapLinearExpr g compgen tmenv e2 (contf << (fun e2' -> - if e1 === e1' && e2 === e2' then e - else Expr.Sequential (e1', e2', dir, spSeq, m))) + match expr with - | LinearMatchExpr (spBind, exprm, dtree, tg1, e2, sp2, m2, ty) -> - let dtree = remapDecisionTree g compgen tmenv dtree - let tg1 = remapTarget g compgen tmenv tg1 - let ty = remapType tmenv ty - // tailcall - remapLinearExpr g compgen tmenv e2 (contf << (fun e2 -> - rebuildLinearMatchExpr (spBind, exprm, dtree, tg1, e2, sp2, m2, ty))) + | Expr.Let (bind, bodyExpr, m, _) -> + let bind', tmenvinner = copyAndRemapAndBindBinding g compgen tmenv bind + // tailcall for the linear position + remapLinearExpr g compgen tmenvinner bodyExpr (contf << mkLetBind m bind') + + | Expr.Sequential (expr1, expr2, dir, spSeq, m) -> + let expr1' = remapExpr g compgen tmenv expr1 + // tailcall for the linear position + remapLinearExpr g compgen tmenv expr2 (contf << (fun expr2' -> + if expr1 === expr1' && expr2 === expr2' then expr + else Expr.Sequential (expr1', expr2', dir, spSeq, m))) + + | LinearMatchExpr (spBind, exprm, dtree, tg1, expr2, sp2, m2, ty) -> + let dtree' = remapDecisionTree g compgen tmenv dtree + let tg1' = remapTarget g compgen tmenv tg1 + let ty' = remapType tmenv ty + // tailcall for the linear position + remapLinearExpr g compgen tmenv expr2 (contf << (fun expr2' -> + rebuildLinearMatchExpr (spBind, exprm, dtree', tg1', expr2', sp2, m2, ty'))) + + | LinearOpExpr (op, tyargs, argsFront, argLast, m) -> + let op' = remapOp tmenv op + let tinst' = remapTypes tmenv tyargs + let argsFront' = remapExprs g compgen tmenv argsFront + // tailcall for the linear position + remapLinearExpr g compgen tmenv argLast (contf << (fun argLast' -> + if op === op' && tyargs === tinst' && argsFront === argsFront' && argLast === argLast' then expr + else rebuildLinearOpExpr (op', tinst', argsFront', argLast', m))) - | _ -> contf (remapExpr g compgen tmenv e) + | _ -> + contf (remapExpr g compgen tmenv expr) and remapConstraint tyenv c = match c with @@ -4966,38 +5070,38 @@ and remapConstraint tyenv c = and remapOp tmenv op = match op with - | TOp.Recd (ctor, tcr) -> TOp.Recd(ctor, remapTyconRef tmenv.tyconRefRemap tcr) - | TOp.UnionCaseTagGet tcr -> TOp.UnionCaseTagGet(remapTyconRef tmenv.tyconRefRemap tcr) - | TOp.UnionCase(ucref) -> TOp.UnionCase(remapUnionCaseRef tmenv.tyconRefRemap ucref) - | TOp.UnionCaseProof(ucref) -> TOp.UnionCaseProof(remapUnionCaseRef tmenv.tyconRefRemap ucref) - | TOp.ExnConstr ec -> TOp.ExnConstr(remapTyconRef tmenv.tyconRefRemap ec) - | TOp.ExnFieldGet(ec, n) -> TOp.ExnFieldGet(remapTyconRef tmenv.tyconRefRemap ec, n) - | TOp.ExnFieldSet(ec, n) -> TOp.ExnFieldSet(remapTyconRef tmenv.tyconRefRemap ec, n) - | TOp.ValFieldSet rfref -> TOp.ValFieldSet(remapRecdFieldRef tmenv.tyconRefRemap rfref) - | TOp.ValFieldGet rfref -> TOp.ValFieldGet(remapRecdFieldRef tmenv.tyconRefRemap rfref) - | TOp.ValFieldGetAddr (rfref, readonly) -> TOp.ValFieldGetAddr(remapRecdFieldRef tmenv.tyconRefRemap rfref, readonly) - | TOp.UnionCaseFieldGet(ucref, n) -> TOp.UnionCaseFieldGet(remapUnionCaseRef tmenv.tyconRefRemap ucref, n) - | TOp.UnionCaseFieldGetAddr(ucref, n, readonly) -> TOp.UnionCaseFieldGetAddr(remapUnionCaseRef tmenv.tyconRefRemap ucref, n, readonly) - | TOp.UnionCaseFieldSet(ucref, n) -> TOp.UnionCaseFieldSet(remapUnionCaseRef tmenv.tyconRefRemap ucref, n) - | TOp.ILAsm (instrs, tys) -> + | TOp.Recd (ctor, tcref) -> TOp.Recd(ctor, remapTyconRef tmenv.tyconRefRemap tcref) + | TOp.UnionCaseTagGet tcref -> TOp.UnionCaseTagGet(remapTyconRef tmenv.tyconRefRemap tcref) + | TOp.UnionCase ucref -> TOp.UnionCase(remapUnionCaseRef tmenv.tyconRefRemap ucref) + | TOp.UnionCaseProof ucref -> TOp.UnionCaseProof(remapUnionCaseRef tmenv.tyconRefRemap ucref) + | TOp.ExnConstr ec -> TOp.ExnConstr(remapTyconRef tmenv.tyconRefRemap ec) + | TOp.ExnFieldGet (ec, n) -> TOp.ExnFieldGet(remapTyconRef tmenv.tyconRefRemap ec, n) + | TOp.ExnFieldSet (ec, n) -> TOp.ExnFieldSet(remapTyconRef tmenv.tyconRefRemap ec, n) + | TOp.ValFieldSet rfref -> TOp.ValFieldSet(remapRecdFieldRef tmenv.tyconRefRemap rfref) + | TOp.ValFieldGet rfref -> TOp.ValFieldGet(remapRecdFieldRef tmenv.tyconRefRemap rfref) + | TOp.ValFieldGetAddr (rfref, readonly) -> TOp.ValFieldGetAddr(remapRecdFieldRef tmenv.tyconRefRemap rfref, readonly) + | TOp.UnionCaseFieldGet (ucref, n) -> TOp.UnionCaseFieldGet(remapUnionCaseRef tmenv.tyconRefRemap ucref, n) + | TOp.UnionCaseFieldGetAddr (ucref, n, readonly) -> TOp.UnionCaseFieldGetAddr(remapUnionCaseRef tmenv.tyconRefRemap ucref, n, readonly) + | TOp.UnionCaseFieldSet (ucref, n) -> TOp.UnionCaseFieldSet(remapUnionCaseRef tmenv.tyconRefRemap ucref, n) + | TOp.ILAsm (instrs, tys) -> let tys2 = remapTypes tmenv tys if tys === tys2 then op else TOp.ILAsm (instrs, tys2) - | TOp.TraitCall(traitInfo) -> TOp.TraitCall(remapTraitAux tmenv traitInfo) - | TOp.LValueOp (kind, lvr) -> TOp.LValueOp (kind, remapValRef tmenv lvr) + | TOp.TraitCall traitInfo -> TOp.TraitCall(remapTraitAux tmenv traitInfo) + | TOp.LValueOp (kind, lvr) -> TOp.LValueOp (kind, remapValRef tmenv lvr) | TOp.ILCall (isVirtCall, isProtectedCall, valu, isNewObjCall, valUseFlags, isProperty, noTailCall, ilMethRef, enclTypeArgs, methTypeArgs, tys) -> TOp.ILCall (isVirtCall, isProtectedCall, valu, isNewObjCall, remapValFlags tmenv valUseFlags, isProperty, noTailCall, ilMethRef, remapTypes tmenv enclTypeArgs, remapTypes tmenv methTypeArgs, remapTypes tmenv tys) - | _ -> op + | _ -> op - and remapValFlags tmenv x = match x with | PossibleConstrainedCall ty -> PossibleConstrainedCall (remapType tmenv ty) | _ -> x and remapExprs g compgen tmenv es = List.mapq (remapExpr g compgen tmenv) es + and remapFlatExprs g compgen tmenv es = List.mapq (remapExpr g compgen tmenv) es and remapDecisionTree g compgen tmenv x = @@ -5007,11 +5111,11 @@ and remapDecisionTree g compgen tmenv x = List.map (fun (TCase(test, y)) -> let test' = match test with - | DecisionTreeTest.UnionCase (uc, tinst) -> DecisionTreeTest.UnionCase(remapUnionCaseRef tmenv.tyconRefRemap uc, remapTypes tmenv tinst) - | DecisionTreeTest.ArrayLength (n, ty) -> DecisionTreeTest.ArrayLength(n, remapType tmenv ty) - | DecisionTreeTest.Const _ -> test - | DecisionTreeTest.IsInst (srcty, tgty) -> DecisionTreeTest.IsInst (remapType tmenv srcty, remapType tmenv tgty) - | DecisionTreeTest.IsNull -> DecisionTreeTest.IsNull + | DecisionTreeTest.UnionCase (uc, tinst) -> DecisionTreeTest.UnionCase(remapUnionCaseRef tmenv.tyconRefRemap uc, remapTypes tmenv tinst) + | DecisionTreeTest.ArrayLength (n, ty) -> DecisionTreeTest.ArrayLength(n, remapType tmenv ty) + | DecisionTreeTest.Const _ -> test + | DecisionTreeTest.IsInst (srcty, tgty) -> DecisionTreeTest.IsInst (remapType tmenv srcty, remapType tmenv tgty) + | DecisionTreeTest.IsNull -> DecisionTreeTest.IsNull | DecisionTreeTest.ActivePatternCase _ -> failwith "DecisionTreeTest.ActivePatternCase should only be used during pattern match compilation" TCase(test', remapDecisionTree g compgen tmenv y)) csl, Option.map (remapDecisionTree g compgen tmenv) dflt, @@ -5022,10 +5126,10 @@ and remapDecisionTree g compgen tmenv x = let bind', tmenvinner = copyAndRemapAndBindBinding g compgen tmenv bind TDBind (bind', remapDecisionTree g compgen tmenvinner rest) -and copyAndRemapAndBindBinding g compgen tmenv (bind:Binding) = +and copyAndRemapAndBindBinding g compgen tmenv (bind: Binding) = let v = bind.Var let v', tmenv = copyAndRemapAndBindVal g compgen tmenv v - remapAndRenameBind g compgen tmenv bind v' , tmenv + remapAndRenameBind g compgen tmenv bind v', tmenv and copyAndRemapAndBindBindings g compgen tmenv binds = let vs', tmenvinner = copyAndRemapAndBindVals g compgen tmenv (valsOfBinds binds) @@ -5034,7 +5138,7 @@ and copyAndRemapAndBindBindings g compgen tmenv binds = and remapAndRenameBinds g compgen tmenvinner binds vs' = List.map2 (remapAndRenameBind g compgen tmenvinner) binds vs' and remapAndRenameBind g compgen tmenvinner (TBind(_, repr, letSeqPtOpt)) v' = TBind(v', remapExpr g compgen tmenvinner repr, letSeqPtOpt) -and remapMethod g compgen tmenv (TObjExprMethod(slotsig, attribs, tps, vs, e, m)) = +and remapMethod g compgen tmenv (TObjExprMethod(slotsig, attribs, tps, vs, e, m)) = let attribs2 = attribs |> remapAttribs g tmenv let slotsig2 = remapSlotSig (remapAttribs g tmenv) tmenv slotsig let tps2, tmenvinner = tmenvCopyRemapAndBindTypars (remapAttribs g tmenv) tmenv tps @@ -5042,45 +5146,49 @@ and remapMethod g compgen tmenv (TObjExprMethod(slotsig, attribs, tps, vs, e, m) let e2 = remapExpr g compgen tmenvinner2 e TObjExprMethod(slotsig2, attribs2, tps2, vs2, e2, m) -and remapInterfaceImpl g compgen tmenv (ty, overrides) = +and remapInterfaceImpl g compgen tmenv (ty, overrides) = (remapType tmenv ty, List.map (remapMethod g compgen tmenv) overrides) and remapRecdField g tmenv x = { x with - rfield_type = x.rfield_type |> remapPossibleForallTy g tmenv; - rfield_pattribs = x.rfield_pattribs |> remapAttribs g tmenv; - rfield_fattribs = x.rfield_fattribs |> remapAttribs g tmenv; } -and remapRecdFields g tmenv (x:TyconRecdFields) = x.AllFieldsAsList |> List.map (remapRecdField g tmenv) |> MakeRecdFieldsTable + rfield_type = x.rfield_type |> remapPossibleForallTy g tmenv + rfield_pattribs = x.rfield_pattribs |> remapAttribs g tmenv + rfield_fattribs = x.rfield_fattribs |> remapAttribs g tmenv } -and remapUnionCase g tmenv (x:UnionCase) = +and remapRecdFields g tmenv (x: TyconRecdFields) = + x.AllFieldsAsList |> List.map (remapRecdField g tmenv) |> MakeRecdFieldsTable + +and remapUnionCase g tmenv (x: UnionCase) = { x with - FieldTable = x.FieldTable |> remapRecdFields g tmenv; - ReturnType = x.ReturnType |> remapType tmenv; - Attribs = x.Attribs |> remapAttribs g tmenv; } -and remapUnionCases g tmenv (x:TyconUnionData) = x.UnionCasesAsList |> List.map (remapUnionCase g tmenv)|> MakeUnionCases + FieldTable = x.FieldTable |> remapRecdFields g tmenv + ReturnType = x.ReturnType |> remapType tmenv + Attribs = x.Attribs |> remapAttribs g tmenv } + +and remapUnionCases g tmenv (x: TyconUnionData) = + x.UnionCasesAsList |> List.map (remapUnionCase g tmenv) |> MakeUnionCases and remapFsObjData g tmenv x = { x with fsobjmodel_kind = (match x.fsobjmodel_kind with | TTyconDelegate slotsig -> TTyconDelegate (remapSlotSig (remapAttribs g tmenv) tmenv slotsig) - | TTyconClass | TTyconInterface | TTyconStruct | TTyconEnum -> x.fsobjmodel_kind); - fsobjmodel_vslots = x.fsobjmodel_vslots |> List.map (remapValRef tmenv); + | TTyconClass | TTyconInterface | TTyconStruct | TTyconEnum -> x.fsobjmodel_kind) + fsobjmodel_vslots = x.fsobjmodel_vslots |> List.map (remapValRef tmenv) fsobjmodel_rfields = x.fsobjmodel_rfields |> remapRecdFields g tmenv } and remapTyconRepr g tmenv repr = match repr with - | TFSharpObjectRepr x -> TFSharpObjectRepr (remapFsObjData g tmenv x) - | TRecdRepr x -> TRecdRepr (remapRecdFields g tmenv x) - | TUnionRepr x -> TUnionRepr (remapUnionCases g tmenv x) - | TILObjectRepr _ -> failwith "cannot remap IL type definitions" + | TFSharpObjectRepr x -> TFSharpObjectRepr (remapFsObjData g tmenv x) + | TRecdRepr x -> TRecdRepr (remapRecdFields g tmenv x) + | TUnionRepr x -> TUnionRepr (remapUnionCases g tmenv x) + | TILObjectRepr _ -> failwith "cannot remap IL type definitions" #if !NO_EXTENSIONTYPING | TProvidedNamespaceExtensionPoint _ -> repr | TProvidedTypeExtensionPoint info -> TProvidedTypeExtensionPoint { info with - LazyBaseType = info.LazyBaseType.Force (range0, g.obj_ty) |> remapType tmenv |> LazyWithContext.NotLazy + LazyBaseType = info.LazyBaseType.Force (range0, g.obj_ty) |> remapType tmenv |> LazyWithContext.NotLazy // The load context for the provided type contains TyconRef objects. We must remap these. // This is actually done on-demand (see the implementation of ProvidedTypeContext) ProvidedType = @@ -5088,26 +5196,26 @@ and remapTyconRepr g tmenv repr = let ctxt = st.Context.RemapTyconRefs(unbox >> remapTyconRef tmenv.tyconRefRemap >> box) ProvidedType.ApplyContext (st, ctxt)) } #endif - | TNoRepr _ -> repr - | TAsmRepr _ -> repr - | TMeasureableRepr x -> TMeasureableRepr (remapType tmenv x) + | TNoRepr _ -> repr + | TAsmRepr _ -> repr + | TMeasureableRepr x -> TMeasureableRepr (remapType tmenv x) -and remapTyconAug tmenv (x:TyconAugmentation) = +and remapTyconAug tmenv (x: TyconAugmentation) = { x with - tcaug_equals = x.tcaug_equals |> Option.map (mapPair (remapValRef tmenv, remapValRef tmenv)); - tcaug_compare = x.tcaug_compare |> Option.map (mapPair (remapValRef tmenv, remapValRef tmenv)); - tcaug_compare_withc = x.tcaug_compare_withc |> Option.map(remapValRef tmenv); - tcaug_hash_and_equals_withc = x.tcaug_hash_and_equals_withc |> Option.map (mapTriple (remapValRef tmenv, remapValRef tmenv, remapValRef tmenv)); - tcaug_adhoc = x.tcaug_adhoc |> NameMap.map (List.map (remapValRef tmenv)); - tcaug_adhoc_list = x.tcaug_adhoc_list |> ResizeArray.map (fun (flag, vref) -> (flag, remapValRef tmenv vref)); - tcaug_super = x.tcaug_super |> Option.map (remapType tmenv); - tcaug_interfaces = x.tcaug_interfaces |> List.map (map1Of3 (remapType tmenv)) } + tcaug_equals = x.tcaug_equals |> Option.map (mapPair (remapValRef tmenv, remapValRef tmenv)) + tcaug_compare = x.tcaug_compare |> Option.map (mapPair (remapValRef tmenv, remapValRef tmenv)) + tcaug_compare_withc = x.tcaug_compare_withc |> Option.map(remapValRef tmenv) + tcaug_hash_and_equals_withc = x.tcaug_hash_and_equals_withc |> Option.map (mapTriple (remapValRef tmenv, remapValRef tmenv, remapValRef tmenv)) + tcaug_adhoc = x.tcaug_adhoc |> NameMap.map (List.map (remapValRef tmenv)) + tcaug_adhoc_list = x.tcaug_adhoc_list |> ResizeArray.map (fun (flag, vref) -> (flag, remapValRef tmenv vref)) + tcaug_super = x.tcaug_super |> Option.map (remapType tmenv) + tcaug_interfaces = x.tcaug_interfaces |> List.map (map1Of3 (remapType tmenv)) } and remapTyconExnInfo g tmenv inp = match inp with | TExnAbbrevRepr x -> TExnAbbrevRepr (remapTyconRef tmenv.tyconRefRemap x) - | TExnFresh x -> TExnFresh (remapRecdFields g tmenv x) - | TExnAsmRepr _ | TExnNone -> inp + | TExnFresh x -> TExnFresh (remapRecdFields g tmenv x) + | TExnAsmRepr _ | TExnNone -> inp and remapMemberInfo g m topValInfo ty ty' tmenv x = // The slotsig in the ImplementedSlotSigs is w.r.t. the type variables in the value's type. @@ -5118,8 +5226,8 @@ and remapMemberInfo g m topValInfo ty ty' tmenv x = let renaming, _ = mkTyparToTyparRenaming tpsOrig tps let tmenv = { tmenv with tpinst = tmenv.tpinst @ renaming } { x with - ApparentEnclosingEntity = x.ApparentEnclosingEntity |> remapTyconRef tmenv.tyconRefRemap ; - ImplementedSlotSigs = x.ImplementedSlotSigs |> List.map (remapSlotSig (remapAttribs g tmenv) tmenv); + ApparentEnclosingEntity = x.ApparentEnclosingEntity |> remapTyconRef tmenv.tyconRefRemap + ImplementedSlotSigs = x.ImplementedSlotSigs |> List.map (remapSlotSig (remapAttribs g tmenv) tmenv) } and copyAndRemapAndBindModTy g compgen tmenv mty = @@ -5137,7 +5245,7 @@ and renameTycon tyenv x = let res = tyenv.tyconRefRemap.[mkLocalTyconRef x] res with :? KeyNotFoundException -> - errorR(InternalError("couldn't remap internal tycon "+showL(DebugPrint.tyconL x), x.Range)); + errorR(InternalError("couldn't remap internal tycon " + showL(DebugPrint.tyconL x), x.Range)) mkLocalTyconRef x tcref.Deref @@ -5146,10 +5254,10 @@ and renameVal tmenv x = | Some v -> v.Deref | None -> x -and copyTycon compgen (tycon:Tycon) = +and copyTycon compgen (tycon: Tycon) = match compgen with | OnlyCloneExprVals -> tycon - | _ -> NewClonedTycon tycon + | _ -> NewClonedTycon tycon /// This operates over a whole nested collection of tycons and vals simultaneously *) and copyAndRemapAndBindTyconsAndVals g compgen tmenv tycons vs = @@ -5163,13 +5271,13 @@ and copyAndRemapAndBindTyconsAndVals g compgen tmenv tycons vs = // "if a type constructor is hidden then all its inner values and inner type constructors must also be hidden" // Hence we can just lookup the inner tycon/value mappings in the tables. - let lookupVal (v:Val) = + let lookupVal (v: Val) = let vref = try let res = tmenvinner.valRemap.[v] res with :? KeyNotFoundException -> - errorR(InternalError(sprintf "couldn't remap internal value '%s'" v.LogicalName, v.Range)); + errorR(InternalError(sprintf "couldn't remap internal value '%s'" v.LogicalName, v.Range)) mkLocalValRef v vref.Deref @@ -5179,20 +5287,20 @@ and copyAndRemapAndBindTyconsAndVals g compgen tmenv tycons vs = let res = tmenvinner.tyconRefRemap.[mkLocalTyconRef tycon] res with :? KeyNotFoundException -> - errorR(InternalError("couldn't remap internal tycon "+showL(DebugPrint.tyconL tycon), tycon.Range)); + errorR(InternalError("couldn't remap internal tycon " + showL(DebugPrint.tyconL tycon), tycon.Range)) mkLocalTyconRef tycon tcref.Deref (tycons, tycons') ||> List.iter2 (fun tcd tcd' -> let tps', tmenvinner2 = tmenvCopyRemapAndBindTypars (remapAttribs g tmenvinner) tmenvinner (tcd.entity_typars.Force(tcd.entity_range)) - tcd'.entity_typars <- LazyWithContext.NotLazy tps' - tcd'.entity_attribs <- tcd.entity_attribs |> remapAttribs g tmenvinner2 - tcd'.entity_tycon_repr <- tcd.entity_tycon_repr |> remapTyconRepr g tmenvinner2 - let typeAbbrevR = tcd.TypeAbbrev |> Option.map (remapType tmenvinner2) - tcd'.entity_tycon_tcaug <- tcd.entity_tycon_tcaug |> remapTyconAug tmenvinner2 + tcd'.entity_typars <- LazyWithContext.NotLazy tps' + tcd'.entity_attribs <- tcd.entity_attribs |> remapAttribs g tmenvinner2 + tcd'.entity_tycon_repr <- tcd.entity_tycon_repr |> remapTyconRepr g tmenvinner2 + let typeAbbrevR = tcd.TypeAbbrev |> Option.map (remapType tmenvinner2) + tcd'.entity_tycon_tcaug <- tcd.entity_tycon_tcaug |> remapTyconAug tmenvinner2 tcd'.entity_modul_contents <- MaybeLazy.Strict (tcd.entity_modul_contents.Value |> mapImmediateValsAndTycons lookupTycon lookupVal) - let exnInfoR = tcd.ExceptionInfo |> remapTyconExnInfo g tmenvinner2 + let exnInfoR = tcd.ExceptionInfo |> remapTyconExnInfo g tmenvinner2 match tcd'.entity_opt_data with | Some optData -> tcd'.entity_opt_data <- Some { optData with entity_tycon_abbrev = typeAbbrevR; entity_exn_info = exnInfoR } | _ -> @@ -5201,7 +5309,7 @@ and copyAndRemapAndBindTyconsAndVals g compgen tmenv tycons vs = tycons', vs', tmenvinner -and allTyconsOfTycon (tycon:Tycon) = +and allTyconsOfTycon (tycon: Tycon) = seq { yield tycon for nestedTycon in tycon.ModuleOrNamespaceType.AllEntities do yield! allTyconsOfTycon nestedTycon } @@ -5217,9 +5325,9 @@ and allEntitiesOfModDef mdef = | ModuleOrNamespaceBinding.Module(mspec, def) -> yield mspec yield! allEntitiesOfModDef def - | TMDefLet _ -> () - | TMDefDo _ -> () - | TMDefs defs -> + | TMDefLet _ -> () + | TMDefDo _ -> () + | TMDefs defs -> for def in defs do yield! allEntitiesOfModDef def | TMAbstract(ModuleOrNamespaceExprWithSig(mty, _, _)) -> @@ -5233,10 +5341,10 @@ and allValsOfModDef mdef = match mbind with | ModuleOrNamespaceBinding.Binding bind -> yield bind.Var | ModuleOrNamespaceBinding.Module(_, def) -> yield! allValsOfModDef def - | TMDefLet(bind, _) -> + | TMDefLet(bind, _) -> yield bind.Var - | TMDefDo _ -> () - | TMDefs defs -> + | TMDefDo _ -> () + | TMDefs defs -> for def in defs do yield! allValsOfModDef def | TMAbstract(ModuleOrNamespaceExprWithSig(mty, _, _)) -> @@ -5268,14 +5376,14 @@ and remapAndRenameModDef g compgen tmenv mdef = let tycons = tycons |> List.map (renameTycon tmenv) let mbinds = mbinds |> List.map (remapAndRenameModBind g compgen tmenv) TMDefRec(isRec, tycons, mbinds, m) - | TMDefLet(bind, m) -> + | TMDefLet(bind, m) -> let v = bind.Var let bind = remapAndRenameBind g compgen tmenv bind (renameVal tmenv v) TMDefLet(bind, m) - | TMDefDo(e, m) -> + | TMDefDo(e, m) -> let e = remapExpr g compgen tmenv e TMDefDo(e, m) - | TMDefs defs -> + | TMDefs defs -> let defs = remapAndRenameModDefs g compgen tmenv defs TMDefs defs | TMAbstract mexpr -> @@ -5287,7 +5395,7 @@ and remapAndRenameModBind g compgen tmenv x = | ModuleOrNamespaceBinding.Binding bind -> let v2 = bind |> valOfBind |> renameVal tmenv let bind2 = remapAndRenameBind g compgen tmenv bind v2 - ModuleOrNamespaceBinding.Binding bind2 + ModuleOrNamespaceBinding.Binding bind2 | ModuleOrNamespaceBinding.Module(mspec, def) -> let mspec = renameTycon tmenv mspec let def = remapAndRenameModDef g compgen tmenv def @@ -5296,9 +5404,11 @@ and remapAndRenameModBind g compgen tmenv x = and remapImplFile g compgen tmenv mv = mapAccImplFile (remapAndBindModuleOrNamespaceExprWithSig g compgen) tmenv mv -let copyModuleOrNamespaceType g compgen mtyp = copyAndRemapAndBindModTy g compgen Remap.Empty mtyp |> fst -let copyExpr g compgen e = remapExpr g compgen Remap.Empty e -let copyImplFile g compgen e = remapImplFile g compgen Remap.Empty e |> fst +let copyModuleOrNamespaceType g compgen mtyp = copyAndRemapAndBindModTy g compgen Remap.Empty mtyp |> fst + +let copyExpr g compgen e = remapExpr g compgen Remap.Empty e + +let copyImplFile g compgen e = remapImplFile g compgen Remap.Empty e |> fst let instExpr g tpinst e = remapExpr g CloneAll (mkInstRemap tpinst) e @@ -5309,33 +5419,58 @@ let instExpr g tpinst e = remapExpr g CloneAll (mkInstRemap tpinst) e let rec remarkExpr m x = match x with - | Expr.Lambda (uniq, ctorThisValOpt, baseValOpt, vs, b, _, rty) -> Expr.Lambda (uniq, ctorThisValOpt, baseValOpt, vs, remarkExpr m b, m, rty) - | Expr.TyLambda (uniq, tps, b, _, rty) -> Expr.TyLambda (uniq, tps, remarkExpr m b, m, rty) - | Expr.TyChoose (tps, b, _) -> Expr.TyChoose (tps, remarkExpr m b, m) - | Expr.LetRec (binds, e, _, fvs) -> Expr.LetRec (remarkBinds m binds, remarkExpr m e, m, fvs) - | Expr.Let (bind, e, _, fvs) -> Expr.Let (remarkBind m bind, remarkExpr m e, m, fvs) - | Expr.Match (_, _, pt, targets, _, ty) -> primMkMatch (NoSequencePointAtInvisibleBinding, m, remarkDecisionTree m pt, Array.map (fun (TTarget(vs, e, _)) ->TTarget(vs, remarkExpr m e, SuppressSequencePointAtTarget)) targets, m, ty) - | Expr.Val (x, valUseFlags, _) -> Expr.Val (x, valUseFlags, m) - | Expr.Quote (a, conv, isFromQueryExpression, _, ty) -> Expr.Quote (remarkExpr m a, conv, isFromQueryExpression, m, ty) + | Expr.Lambda (uniq, ctorThisValOpt, baseValOpt, vs, b, _, rty) -> + Expr.Lambda (uniq, ctorThisValOpt, baseValOpt, vs, remarkExpr m b, m, rty) + + | Expr.TyLambda (uniq, tps, b, _, rty) -> + Expr.TyLambda (uniq, tps, remarkExpr m b, m, rty) + + | Expr.TyChoose (tps, b, _) -> + Expr.TyChoose (tps, remarkExpr m b, m) + + | Expr.LetRec (binds, e, _, fvs) -> + Expr.LetRec (remarkBinds m binds, remarkExpr m e, m, fvs) + + | Expr.Let (bind, e, _, fvs) -> + Expr.Let (remarkBind m bind, remarkExpr m e, m, fvs) + + | Expr.Match (_, _, pt, targets, _, ty) -> + let targetsR = targets |> Array.map (fun (TTarget(vs, e, _)) -> TTarget(vs, remarkExpr m e, SuppressSequencePointAtTarget)) + primMkMatch (NoSequencePointAtInvisibleBinding, m, remarkDecisionTree m pt, targetsR, m, ty) + + | Expr.Val (x, valUseFlags, _) -> + Expr.Val (x, valUseFlags, m) + + | Expr.Quote (a, conv, isFromQueryExpression, _, ty) -> + Expr.Quote (remarkExpr m a, conv, isFromQueryExpression, m, ty) + | Expr.Obj (n, ty, basev, basecall, overrides, iimpls, _) -> Expr.Obj (n, ty, basev, remarkExpr m basecall, - List.map (remarkObjExprMethod m) overrides, - List.map (remarkInterfaceImpl m) iimpls, m) + List.map (remarkObjExprMethod m) overrides, + List.map (remarkInterfaceImpl m) iimpls, m) + | Expr.Op (op, tinst, args, _) -> let op = match op with | TOp.TryFinally(_, _) -> TOp.TryFinally(NoSequencePointAtTry, NoSequencePointAtFinally) | TOp.TryCatch(_, _) -> TOp.TryCatch(NoSequencePointAtTry, NoSequencePointAtWith) | _ -> op - Expr.Op (op, tinst, remarkExprs m args, m) + | Expr.Link (eref) -> // Preserve identity of fixup nodes during remarkExpr - eref := remarkExpr m !eref; + eref := remarkExpr m !eref x - | Expr.App(e1, e1ty, tyargs, args, _) -> Expr.App(remarkExpr m e1, e1ty, tyargs, remarkExprs m args, m) - | Expr.Sequential (e1, e2, dir, _, _) -> Expr.Sequential (remarkExpr m e1, remarkExpr m e2, dir, SuppressSequencePointOnExprOfSequential, m) - | Expr.StaticOptimization (eqns, e2, e3, _) -> Expr.StaticOptimization (eqns, remarkExpr m e2, remarkExpr m e3, m) + + | Expr.App(e1, e1ty, tyargs, args, _) -> + Expr.App(remarkExpr m e1, e1ty, tyargs, remarkExprs m args, m) + + | Expr.Sequential (e1, e2, dir, _, _) -> + Expr.Sequential (remarkExpr m e1, remarkExpr m e2, dir, SuppressSequencePointOnExprOfSequential, m) + + | Expr.StaticOptimization (eqns, e2, e3, _) -> + Expr.StaticOptimization (eqns, remarkExpr m e2, remarkExpr m e3, m) + | Expr.Const (c, _, ty) -> Expr.Const (c, m, ty) and remarkObjExprMethod m (TObjExprMethod(slotsig, attribs, tps, vs, e, _)) = @@ -5350,9 +5485,13 @@ and remarkFlatExprs m es = es |> List.map (remarkExpr m) and remarkDecisionTree m x = match x with - | TDSwitch(e1, csl, dflt, _) -> TDSwitch(remarkExpr m e1, List.map (fun (TCase(test, y)) -> TCase(test, remarkDecisionTree m y)) csl, Option.map (remarkDecisionTree m) dflt, m) - | TDSuccess (es, n) -> TDSuccess (remarkFlatExprs m es, n) - | TDBind (bind, rest) -> TDBind(remarkBind m bind, remarkDecisionTree m rest) + | TDSwitch(e1, csl, dflt, _) -> + let cslR = csl |> List.map (fun (TCase(test, y)) -> TCase(test, remarkDecisionTree m y)) + TDSwitch(remarkExpr m e1, cslR, Option.map (remarkDecisionTree m) dflt, m) + | TDSuccess (es, n) -> + TDSuccess (remarkFlatExprs m es, n) + | TDBind (bind, rest) -> + TDBind(remarkBind m bind, remarkDecisionTree m rest) and remarkBinds m binds = List.map (remarkBind m) binds @@ -5360,14 +5499,15 @@ and remarkBinds m binds = List.map (remarkBind m) binds and remarkBind m (TBind(v, repr, _)) = TBind(v, remarkExpr m repr, NoSequencePointAtStickyBinding) - //-------------------------------------------------------------------------- // Mutability analysis //-------------------------------------------------------------------------- -let isRecdOrStructFieldDefinitelyMutable (f:RecdField) = not f.IsStatic && f.IsMutable -let isUnionCaseDefinitelyMutable (uc:UnionCase) = uc.FieldTable.FieldsByIndex |> Array.exists isRecdOrStructFieldDefinitelyMutable -let isUnionCaseRefDefinitelyMutable (uc:UnionCaseRef) = uc.UnionCase |> isUnionCaseDefinitelyMutable +let isRecdOrStructFieldDefinitelyMutable (f: RecdField) = not f.IsStatic && f.IsMutable + +let isUnionCaseDefinitelyMutable (uc: UnionCase) = uc.FieldTable.FieldsByIndex |> Array.exists isRecdOrStructFieldDefinitelyMutable + +let isUnionCaseRefDefinitelyMutable (uc: UnionCaseRef) = uc.UnionCase |> isUnionCaseDefinitelyMutable /// This is an incomplete check for .NET struct types. Returning 'false' doesn't mean the thing is immutable. let isRecdOrUnionOrStructTyconRefDefinitelyMutable (tcref: TyconRef) = @@ -5383,24 +5523,24 @@ let isRecdOrUnionOrStructTyconRefDefinitelyMutable (tcref: TyconRef) = // Although from the pure F# perspective exception values cannot be changed, the .NET // implementation of exception objects attaches a whole bunch of stack information to -// each raised object. Hence we treat exception objects as if they have identity -let isExnDefinitelyMutable (_ecref:TyconRef) = true +// each raised object. Hence we treat exception objects as if they have identity +let isExnDefinitelyMutable (_ecref: TyconRef) = true // Some of the implementations of library functions on lists use mutation on the tail // of the cons cell. These cells are always private, i.e. not accessible by any other // code until the construction of the entire return list has been completed. // However, within the implementation code reads of the tail cell must in theory be treated -// with caution. Hence we are conservative and within FSharp.Core we don't treat list +// with caution. Hence we are conservative and within FSharp.Core we don't treat list // reads as if they were pure. -let isUnionCaseFieldMutable (g: TcGlobals) (ucref:UnionCaseRef) n = +let isUnionCaseFieldMutable (g: TcGlobals) (ucref: UnionCaseRef) n = (g.compilingFslib && tyconRefEq g ucref.TyconRef g.list_tcr_canon && n = 1) || (ucref.FieldByIndex n).IsMutable let isExnFieldMutable ecref n = - if n < 0 || n >= List.length (recdFieldsOfExnDefRef ecref) then errorR(InternalError(sprintf "isExnFieldMutable, exnc = %s, n = %d" ecref.LogicalName n, ecref.Range)); + if n < 0 || n >= List.length (recdFieldsOfExnDefRef ecref) then errorR(InternalError(sprintf "isExnFieldMutable, exnc = %s, n = %d" ecref.LogicalName n, ecref.Range)) (recdFieldOfExnDefRefByIdx ecref n).IsMutable -let useGenuineField (tycon:Tycon) (f:RecdField) = +let useGenuineField (tycon: Tycon) (f: RecdField) = Option.isSome f.LiteralValue || tycon.IsEnumTycon || f.rfield_secret || (not f.IsStatic && f.rfield_mutable && not tycon.IsRecordTycon) let ComputeFieldName tycon f = @@ -5412,27 +5552,31 @@ let ComputeFieldName tycon f = //------------------------------------------------------------------------- let isQuotedExprTy g ty = match tryAppTy g ty with ValueSome (tcref, _) -> tyconRefEq g tcref g.expr_tcr | _ -> false -let destQuotedExprTy g ty = match tryAppTy g ty with ValueSome (_, [ty]) -> ty | _ -> failwith "destQuotedExprTy" -let mkQuotedExprTy (g:TcGlobals) ty = TType_app(g.expr_tcr, [ty]) -let mkRawQuotedExprTy (g:TcGlobals) = TType_app(g.raw_expr_tcr, []) +let destQuotedExprTy g ty = match tryAppTy g ty with ValueSome (_, [ty]) -> ty | _ -> failwith "destQuotedExprTy" + +let mkQuotedExprTy (g: TcGlobals) ty = TType_app(g.expr_tcr, [ty]) + +let mkRawQuotedExprTy (g: TcGlobals) = TType_app(g.raw_expr_tcr, []) -let mkAnyTupledTy (g:TcGlobals) tupInfo tys = +let mkAnyTupledTy (g: TcGlobals) tupInfo tys = match tys with | [] -> g.unit_ty | [h] -> h | _ -> TType_tuple(tupInfo, tys) -let mkAnyAnonRecdTy (_g:TcGlobals) anonInfo tys = +let mkAnyAnonRecdTy (_g: TcGlobals) anonInfo tys = TType_anon(anonInfo, tys) let mkRefTupledTy g tys = mkAnyTupledTy g tupInfoRef tys + let mkRefTupledVarsTy g vs = mkRefTupledTy g (typesOfVals vs) let mkMethodTy g argtys rty = mkIteratedFunTy (List.map (mkRefTupledTy g) argtys) rty -let mkArrayType (g:TcGlobals) ty = TType_app (g.array_tcr_nice, [ty]) -let mkByteArrayTy (g:TcGlobals) = mkArrayType g g.byte_ty +let mkArrayType (g: TcGlobals) ty = TType_app (g.array_tcr_nice, [ty]) + +let mkByteArrayTy (g: TcGlobals) = mkArrayType g g.byte_ty //-------------------------------------------------------------------------- // tyOfExpr @@ -5444,9 +5588,9 @@ let rec tyOfExpr g e = | Expr.Obj (_, ty, _, _, _, _, _) | Expr.Match (_, _, _, _, _, ty) | Expr.Quote(_, _, _, _, ty) - | Expr.Const(_, _, ty) -> (ty) - | Expr.Val(vref, _, _) -> vref.Type - | Expr.Sequential(a, b, k, _, _) -> tyOfExpr g (match k with NormalSeq -> b | ThenDoSeq -> a) + | Expr.Const(_, _, ty) -> (ty) + | Expr.Val(vref, _, _) -> vref.Type + | Expr.Sequential(a, b, k, _, _) -> tyOfExpr g (match k with NormalSeq -> b | ThenDoSeq -> a) | Expr.Lambda(_, _, _, vs, _, _, rty) -> (mkRefTupledVarsTy g vs --> rty) | Expr.TyLambda(_, tyvs, _, _, rty) -> (tyvs +-> rty) | Expr.Let(_, e, _, _) @@ -5470,7 +5614,7 @@ let rec tyOfExpr g e = | TOp.AnonRecd anonInfo -> mkAnyAnonRecdTy g anonInfo tinst | (TOp.For _ | TOp.While _) -> g.unit_ty | TOp.Array -> (match tinst with [ty] -> mkArrayType g ty | _ -> failwith "bad TOp.Array node") - | (TOp.TryCatch _ | TOp.TryFinally _) -> (match tinst with [ty] -> ty | _ -> failwith "bad TOp_try node") + | (TOp.TryCatch _ | TOp.TryFinally _) -> (match tinst with [ty] -> ty | _ -> failwith "bad TOp_try node") | TOp.ValFieldGetAddr(fref, readonly) -> mkByrefTyWithFlag g readonly (actualTyOfRecdFieldRef fref tinst) | TOp.ValFieldGet(fref) -> actualTyOfRecdFieldRef fref tinst | (TOp.ValFieldSet _ | TOp.UnionCaseFieldSet _ | TOp.ExnFieldSet _ | TOp.LValueOp ((LSet | LByrefSet), _)) ->g.unit_ty @@ -5484,8 +5628,8 @@ let rec tyOfExpr g e = | TOp.TraitCall (TTrait(_, _, _, _, ty, _)) -> GetFSharpViewOfReturnType g ty | TOp.Reraise -> (match tinst with [rtn_ty] -> rtn_ty | _ -> failwith "bad TOp.Reraise node") | TOp.Goto _ | TOp.Label _ | TOp.Return -> - //assert false; - //errorR(InternalError("unexpected goto/label/return in tyOfExpr", m)); + //assert false + //errorR(InternalError("unexpected goto/label/return in tyOfExpr", m)) // It doesn't matter what type we return here. This is only used in free variable analysis in the code generator g.unit_ty @@ -5533,7 +5677,7 @@ let rec mkExprApplAux g f fty argsl m = | _ -> // Don't combine. 'f' is not an application - if not (isFunTy g fty) then error(InternalError("expected a function type", m)); + if not (isFunTy g fty) then error(InternalError("expected a function type", m)) primMkApp (f, fty) [] argsl m @@ -5549,48 +5693,47 @@ let rec mkAppsAux g f fty tyargsl argsl m = mkExprApplAux g f fty argsl m let mkApps g ((f, fty), tyargsl, argl, m) = mkAppsAux g f fty tyargsl argl m -let mkTyAppExpr m (f, fty) tyargs = match tyargs with [] -> f | _ -> primMkApp (f, fty) tyargs [] m +let mkTyAppExpr m (f, fty) tyargs = match tyargs with [] -> f | _ -> primMkApp (f, fty) tyargs [] m //-------------------------------------------------------------------------- // Decision tree reduction //-------------------------------------------------------------------------- let rec accTargetsOfDecisionTree tree acc = - match tree with - | TDSwitch (_, edges, dflt, _) -> List.foldBack (fun (c:DecisionTreeCase) -> accTargetsOfDecisionTree c.CaseTree) edges (Option.foldBack accTargetsOfDecisionTree dflt acc) - | TDSuccess (_, i) -> i::acc - | TDBind (_, rest) -> accTargetsOfDecisionTree rest acc + match tree with + | TDSwitch (_, cases, dflt, _) -> + List.foldBack (fun (c: DecisionTreeCase) -> accTargetsOfDecisionTree c.CaseTree) cases + (Option.foldBack accTargetsOfDecisionTree dflt acc) + | TDSuccess (_, i) -> i:: acc + | TDBind (_, rest) -> accTargetsOfDecisionTree rest acc -let rec mapAccTipsOfDecisionTree f tree = +let rec mapTargetsOfDecisionTree f tree = match tree with - | TDSwitch (e, edges, dflt, m) -> TDSwitch (e, List.map (mapAccTipsOfEdge f) edges, Option.map (mapAccTipsOfDecisionTree f) dflt, m) - | TDSuccess (es, i) -> f es i - | TDBind (bind, rest) -> TDBind(bind, mapAccTipsOfDecisionTree f rest) -and mapAccTipsOfEdge f (TCase(x, t)) = - TCase(x, mapAccTipsOfDecisionTree f t) + | TDSwitch (e, cases, dflt, m) -> TDSwitch (e, List.map (mapTargetsOfDecisionTreeCase f) cases, Option.map (mapTargetsOfDecisionTree f) dflt, m) + | TDSuccess (es, i) -> TDSuccess(es, f i) + | TDBind (bind, rest) -> TDBind(bind, mapTargetsOfDecisionTree f rest) -let mapTargetsOfDecisionTree f tree = mapAccTipsOfDecisionTree (fun es i -> TDSuccess(es, f i)) tree +and mapTargetsOfDecisionTreeCase f (TCase(x, t)) = + TCase(x, mapTargetsOfDecisionTree f t) // Dead target elimination let eliminateDeadTargetsFromMatch tree (targets:_[]) = let used = accTargetsOfDecisionTree tree [] |> ListSet.setify (=) |> Array.ofList if used.Length < targets.Length then - Array.sortInPlace used; + Array.sortInPlace used let ntargets = targets.Length let tree' = let remap = Array.create ntargets (-1) - Array.iteri (fun i tgn -> remap.[tgn] <- i) used; + Array.iteri (fun i tgn -> remap.[tgn] <- i) used tree |> mapTargetsOfDecisionTree (fun tgn -> - if remap.[tgn] = -1 then failwith "eliminateDeadTargetsFromMatch: failure while eliminating unused targets"; + if remap.[tgn] = -1 then failwith "eliminateDeadTargetsFromMatch: failure while eliminating unused targets" remap.[tgn]) let targets' = Array.map (Array.get targets) used tree', targets' else tree, targets - - let rec targetOfSuccessDecisionTree tree = match tree with | TDSwitch _ -> None @@ -5600,8 +5743,8 @@ let rec targetOfSuccessDecisionTree tree = /// Check a decision tree only has bindings that immediately cover a 'Success' let rec decisionTreeHasNonTrivialBindings tree = match tree with - | TDSwitch (_, edges, dflt, _) -> - edges |> List.exists (fun c -> decisionTreeHasNonTrivialBindings c.CaseTree) || + | TDSwitch (_, cases, dflt, _) -> + cases |> List.exists (fun c -> decisionTreeHasNonTrivialBindings c.CaseTree) || dflt |> Option.exists decisionTreeHasNonTrivialBindings | TDSuccess _ -> false | TDBind (_, t) -> Option.isNone (targetOfSuccessDecisionTree t) @@ -5618,18 +5761,18 @@ let foldLinearBindingTargetsOfMatch tree (targets: _[]) = else let branchesToTargets = Array.create targets.Length [] // Build a map showing how each target might be reached - let rec accumulateTipsOfDecisionTree accBinds tree = + let rec accumulateTipsOfDecisionTree accBinds tree = match tree with - | TDSwitch (_, edges, dflt, _) -> + | TDSwitch (_, cases, dflt, _) -> assert (isNil accBinds) // No switches under bindings - for edge in edges do accumulateTipsOfDecisionTree accBinds edge.CaseTree + for edge in cases do accumulateTipsOfDecisionTree accBinds edge.CaseTree match dflt with | None -> () | Some tree -> accumulateTipsOfDecisionTree accBinds tree | TDSuccess (es, i) -> branchesToTargets.[i] <- (List.rev accBinds, es) :: branchesToTargets.[i] | TDBind (bind, rest) -> - accumulateTipsOfDecisionTree (bind::accBinds) rest + accumulateTipsOfDecisionTree (bind:: accBinds) rest // Compute the targets that can only be reached one way accumulateTipsOfDecisionTree [] tree @@ -5652,16 +5795,16 @@ let foldLinearBindingTargetsOfMatch tree (targets: _[]) = | Some i when isLinearTgtIdx i -> TDSuccess([], i) | _ -> match tree with - | TDSwitch (e, edges, dflt, m) -> TDSwitch (e, List.map rebuildDecisionTreeEdge edges, Option.map rebuildDecisionTree dflt, m) + | TDSwitch (e, cases, dflt, m) -> TDSwitch (e, List.map rebuildDecisionTreeEdge cases, Option.map rebuildDecisionTree dflt, m) | TDSuccess _ -> tree | TDBind _ -> tree and rebuildDecisionTreeEdge (TCase(x, t)) = TCase(x, rebuildDecisionTree t) - let tree' = rebuildDecisionTree tree + let tree' = rebuildDecisionTree tree - /// rebuild the targets , replacing linear targets by ones that include all the 'let' bindings from the source + /// rebuild the targets, replacing linear targets by ones that include all the 'let' bindings from the source let targets' = targets |> Array.mapi (fun i (TTarget(vs, exprTarget, spTarget) as tg) -> if isLinearTgtIdx i then @@ -5680,17 +5823,17 @@ let foldLinearBindingTargetsOfMatch tree (targets: _[]) = let rec simplifyTrivialMatch spBind exprm matchm ty tree (targets : _[]) = match tree with | TDSuccess(es, n) -> - if n >= targets.Length then failwith "simplifyTrivialMatch: target out of range"; + if n >= targets.Length then failwith "simplifyTrivialMatch: target out of range" // REVIEW: should we use _spTarget here? let (TTarget(vs, rhs, _spTarget)) = targets.[n] - if vs.Length <> es.Length then failwith ("simplifyTrivialMatch: invalid argument, n = "+string n+", List.length targets = "+string targets.Length); + if vs.Length <> es.Length then failwith ("simplifyTrivialMatch: invalid argument, n = " + string n + ", List.length targets = " + string targets.Length) // These are non-sticky - any sequence point for 'rhs' goes on 'rhs' _after_ the bindings have been made mkInvisibleLetsFromBindings rhs.Range vs es rhs | _ -> primMkMatch (spBind, exprm, tree, targets, matchm, ty) // Simplify a little as we go, including dead target elimination -let mkAndSimplifyMatch spBind exprm matchm ty tree targets = +let mkAndSimplifyMatch spBind exprm matchm ty tree targets = let targets = Array.ofList targets match tree with | TDSuccess _ -> @@ -5700,7 +5843,6 @@ let mkAndSimplifyMatch spBind exprm matchm ty tree targets = let tree, targets = foldLinearBindingTargetsOfMatch tree targets simplifyTrivialMatch spBind exprm matchm ty tree targets - //------------------------------------------------------------------------- // mkExprAddrOfExprAux //------------------------------------------------------------------------- @@ -5730,7 +5872,6 @@ let isRecdOrStructTyReadOnly (g: TcGlobals) m ty = | ValueNone -> false | ValueSome tcref -> isRecdOrStructTyconRefReadOnly g m tcref - let CanTakeAddressOf g m ty mut = match mut with | NeverMutates -> true @@ -5740,7 +5881,7 @@ let CanTakeAddressOf g m ty mut = // We can take the address of values of struct type even if the value is immutable // under certain conditions -// - all instances of the type are known to be immutable; OR +// - all instances of the type are known to be immutable; OR // - the operation is known not to mutate // // Note this may be taking the address of a closure field, i.e. a copy @@ -5753,7 +5894,7 @@ let CanTakeAddressOf g m ty mut = // // We only do this for true local or closure fields because we can't take addresses of immutable static // fields across assemblies. -let CanTakeAddressOfImmutableVal (g: TcGlobals) m (vref:ValRef) mut = +let CanTakeAddressOfImmutableVal (g: TcGlobals) m (vref: ValRef) mut = // We can take the address of values of struct type if the operation doesn't mutate // and the value is a true local or closure field. not vref.IsMutable && @@ -5764,15 +5905,15 @@ let CanTakeAddressOfImmutableVal (g: TcGlobals) m (vref:ValRef) mut = // We always generate a static property but there is no field to take an address of CanTakeAddressOf g m vref.Type mut -let MustTakeAddressOfVal (g:TcGlobals) (vref:ValRef) = +let MustTakeAddressOfVal (g: TcGlobals) (vref: ValRef) = vref.IsMutable && // We can only take the address of mutable values in the same assembly valRefInThisAssembly g.compilingFslib vref -let MustTakeAddressOfByrefGet (g:TcGlobals) (vref:ValRef) = +let MustTakeAddressOfByrefGet (g: TcGlobals) (vref: ValRef) = isByrefTy g vref.Type && not (isInByrefTy g vref.Type) -let CanTakeAddressOfByrefGet (g:TcGlobals) (vref:ValRef) mut = +let CanTakeAddressOfByrefGet (g: TcGlobals) (vref: ValRef) mut = isInByrefTy g vref.Type && CanTakeAddressOf g vref.Range (destByrefTy g vref.Type) mut @@ -5781,15 +5922,15 @@ let MustTakeAddressOfRecdField (rfref: RecdField) = not rfref.IsStatic && rfref.IsMutable -let MustTakeAddressOfRecdFieldRef (rfref: RecdFieldRef) = MustTakeAddressOfRecdField rfref.RecdField +let MustTakeAddressOfRecdFieldRef (rfref: RecdFieldRef) = MustTakeAddressOfRecdField rfref.RecdField -let CanTakeAddressOfRecdFieldRef (g:TcGlobals) m (rfref: RecdFieldRef) tinst mut = +let CanTakeAddressOfRecdFieldRef (g: TcGlobals) m (rfref: RecdFieldRef) tinst mut = // We only do this if the field is defined in this assembly because we can't take addresses across assemblies for immutable fields entityRefInThisAssembly g.compilingFslib rfref.TyconRef && not rfref.RecdField.IsMutable && CanTakeAddressOf g m (actualTyOfRecdFieldRef rfref tinst) mut -let CanTakeAddressOfUnionFieldRef (g:TcGlobals) m (uref: UnionCaseRef) cidx tinst mut = +let CanTakeAddressOfUnionFieldRef (g: TcGlobals) m (uref: UnionCaseRef) cidx tinst mut = // We only do this if the field is defined in this assembly because we can't take addresses across assemblies for immutable fields entityRefInThisAssembly g.compilingFslib uref.TyconRef && let rfref = uref.FieldByIndex cidx @@ -5861,7 +6002,7 @@ let rec mkExprAddrOfExprAux g mustTakeAddress useReadonlyForGenericArrayAddress let readonly = false // array address is never forced to be readonly let writeonly = false let shape = ILArrayShape.SingleDimensional - let ilInstrReadOnlyAnnotation = if isTyparTy g elemTy && useReadonlyForGenericArrayAddress then ReadonlyAddress else NormalAddress + let ilInstrReadOnlyAnnotation = if isTyparTy g elemTy && useReadonlyForGenericArrayAddress then ReadonlyAddress else NormalAddress let isNativePtr = match addrExprVal with | Some(vf) -> valRefEq g vf g.addrof2_vref @@ -5869,22 +6010,24 @@ let rec mkExprAddrOfExprAux g mustTakeAddress useReadonlyForGenericArrayAddress None, mkArrayElemAddress g (readonly, ilInstrReadOnlyAnnotation, isNativePtr, shape, elemTy, [aexpr; nexpr], m), readonly, writeonly // LVALUE of "e.[n1, n2]", "e.[n1, n2, n3]", "e.[n1, n2, n3, n4]" where e is an array of structs - | Expr.App(Expr.Val(vref, _, _), _, [elemTy], (aexpr::args), _) + | Expr.App(Expr.Val(vref, _, _), _, [elemTy], (aexpr:: args), _) when (valRefEq g vref g.array2D_get_vref || valRefEq g vref g.array3D_get_vref || valRefEq g vref g.array4D_get_vref) -> let readonly = false // array address is never forced to be readonly let writeonly = false let shape = ILArrayShape.FromRank args.Length - let ilInstrReadOnlyAnnotation = if isTyparTy g elemTy && useReadonlyForGenericArrayAddress then ReadonlyAddress else NormalAddress + let ilInstrReadOnlyAnnotation = if isTyparTy g elemTy && useReadonlyForGenericArrayAddress then ReadonlyAddress else NormalAddress let isNativePtr = match addrExprVal with | Some(vf) -> valRefEq g vf g.addrof2_vref | _ -> false - None, mkArrayElemAddress g (readonly, ilInstrReadOnlyAnnotation, isNativePtr, shape, elemTy, (aexpr::args), m), readonly, writeonly + None, mkArrayElemAddress g (readonly, ilInstrReadOnlyAnnotation, isNativePtr, shape, elemTy, (aexpr:: args), m), readonly, writeonly - // LVALUE: "&meth(args)" where meth has a byref or inref return. Includes "&span.[idx]". - | Expr.Let(TBind(vref, e, _), Expr.Op(TOp.LValueOp (LByrefGet, vref2), _, _, _), _, _) when (valRefEq g (mkLocalValRef vref) vref2) && (MustTakeAddressOfByrefGet g vref2 || CanTakeAddressOfByrefGet g vref2 mut) -> + // LVALUE: "&meth(args)" where meth has a byref or inref return. Includes "&span.[idx]". + | Expr.Let(TBind(vref, e, _), Expr.Op(TOp.LValueOp (LByrefGet, vref2), _, _, _), _, _) + when (valRefEq g (mkLocalValRef vref) vref2) && + (MustTakeAddressOfByrefGet g vref2 || CanTakeAddressOfByrefGet g vref2 mut) -> let ty = tyOfExpr g e let readonly = isInByrefTy g ty let writeonly = isOutByrefTy g ty @@ -5948,16 +6091,16 @@ let mkTupleFieldGet g (tupInfo, e, tinst, i, m) = let wrap, e', _readonly, _writeonly = mkExprAddrOfExpr g (evalTupInfoIsStruct tupInfo) false NeverMutates e None m wrap (mkTupleFieldGetViaExprAddr(tupInfo, e', tinst, i, m)) -let mkAnonRecdFieldGet g (anonInfo:AnonRecdTypeInfo, e, tinst, i, m) = +let mkAnonRecdFieldGet g (anonInfo: AnonRecdTypeInfo, e, tinst, i, m) = let wrap, e', _readonly, _writeonly = mkExprAddrOfExpr g (evalAnonInfoIsStruct anonInfo) false NeverMutates e None m wrap (mkAnonRecdFieldGetViaExprAddr(anonInfo, e', tinst, i, m)) -let mkRecdFieldGet g (e, fref:RecdFieldRef, tinst, m) = +let mkRecdFieldGet g (e, fref: RecdFieldRef, tinst, m) = assert (not (isByrefTy g (tyOfExpr g e))) let wrap, e', _readonly, _writeonly = mkExprAddrOfExpr g fref.Tycon.IsStructOrEnumTycon false NeverMutates e None m wrap (mkRecdFieldGetViaExprAddr(e', fref, tinst, m)) -let mkUnionCaseFieldGetUnproven g (e, cref:UnionCaseRef, tinst, j, m) = +let mkUnionCaseFieldGetUnproven g (e, cref: UnionCaseRef, tinst, j, m) = assert (not (isByrefTy g (tyOfExpr g e))) let wrap, e', _readonly, _writeonly = mkExprAddrOfExpr g cref.Tycon.IsStructOrEnumTycon false NeverMutates e None m wrap (mkUnionCaseFieldGetUnprovenViaExprAddr (e', cref, tinst, j, m)) @@ -5968,7 +6111,7 @@ let mkArray (argty, args, m) = Expr.Op(TOp.Array, [argty], args, m) // Compute fixups for letrec's. // // Generate an assignment expression that will fixup the recursion -// amongst the vals on the r.h.s. of a letrec. The returned expressions +// amongst the vals on the r.h.s. of a letrec. The returned expressions // include disorderly constructs such as expressions/statements // to set closure environments and non-mutable fields. These are only ever // generated by the backend code-generator when processing a "letrec" @@ -5984,8 +6127,8 @@ let mkArray (argty, args, m) = Expr.Op(TOp.Array, [argty], args, m) // somehow appears twice on the right. //--------------------------------------------------------------------------- -let rec IterateRecursiveFixups g (selfv : Val option) rvs ((access : Expr), set) exprToFix = - let exprToFix = stripExpr exprToFix +let rec IterateRecursiveFixups g (selfv: Val option) rvs ((access: Expr), set) exprToFix = + let exprToFix = stripExpr exprToFix match exprToFix with | Expr.Const _ -> () | Expr.Op (TOp.Tuple tupInfo, argtys, args, m) when not (evalTupInfoIsStruct tupInfo) -> @@ -5994,7 +6137,7 @@ let rec IterateRecursiveFixups g (selfv : Val option) rvs ((access : Expr), set) (mkTupleFieldGet g (tupInfo, access, argtys, n, m), (fun e -> // NICE: it would be better to do this check in the type checker - errorR(Error(FSComp.SR.tastRecursiveValuesMayNotBeInConstructionOfTuple(), m)); + errorR(Error(FSComp.SR.tastRecursiveValuesMayNotBeInConstructionOfTuple(), m)) e))) | Expr.Op (TOp.UnionCase (c), tinst, args, m) -> @@ -6005,7 +6148,7 @@ let rec IterateRecursiveFixups g (selfv : Val option) rvs ((access : Expr), set) // NICE: it would be better to do this check in the type checker let tcref = c.TyconRef if not (c.FieldByIndex(n)).IsMutable && not (entityRefInThisAssembly g.compilingFslib tcref) then - errorR(Error(FSComp.SR.tastRecursiveValuesMayNotAppearInConstructionOfType(tcref.LogicalName), m)); + errorR(Error(FSComp.SR.tastRecursiveValuesMayNotAppearInConstructionOfType(tcref.LogicalName), m)) mkUnionCaseFieldSet (access, c, tinst, n, e, m)))) | Expr.Op (TOp.Recd (_, tcref), tinst, args, m) -> @@ -6016,7 +6159,7 @@ let rec IterateRecursiveFixups g (selfv : Val option) rvs ((access : Expr), set) (fun e -> // NICE: it would be better to do this check in the type checker if not fspec.IsMutable && not (entityRefInThisAssembly g.compilingFslib tcref) then - errorR(Error(FSComp.SR.tastRecursiveValuesMayNotBeAssignedToNonMutableField(fspec.rfield_id.idText, tcref.LogicalName), m)); + errorR(Error(FSComp.SR.tastRecursiveValuesMayNotBeAssignedToNonMutableField(fspec.rfield_id.idText, tcref.LogicalName), m)) mkRecdFieldSetViaExprAddr (access, fref, tinst, e, m))) arg ) | Expr.Val _ | Expr.Lambda _ @@ -6026,9 +6169,6 @@ let rec IterateRecursiveFixups g (selfv : Val option) rvs ((access : Expr), set) rvs selfv access set exprToFix | _ -> () - - - //-------------------------------------------------------------------------- // computations on constraints //-------------------------------------------------------------------------- @@ -6038,33 +6178,30 @@ let JoinTyparStaticReq r1 r2 = | NoStaticReq, r | r, NoStaticReq -> r | HeadTypeStaticReq, r | r, HeadTypeStaticReq -> r - - //------------------------------------------------------------------------- // ExprFolder - fold steps //------------------------------------------------------------------------- -type ExprFolder<'T> = - { exprIntercept : ('T -> Expr -> 'T) -> 'T -> Expr -> 'T option; +type ExprFolder<'State> = + { exprIntercept : (* recurseF *) ('State -> Expr -> 'State) -> (* noInterceptF *) ('State -> Expr -> 'State) -> 'State -> Expr -> 'State // the bool is 'bound in dtree' - valBindingSiteIntercept : 'T -> bool * Val -> 'T; + valBindingSiteIntercept : 'State -> bool * Val -> 'State // these values are always bound to these expressions. bool indicates 'recursively' - nonRecBindingsIntercept : 'T -> Binding -> 'T; - recBindingsIntercept : 'T -> Bindings -> 'T; - dtreeIntercept : 'T -> DecisionTree -> 'T; - targetIntercept : ('T -> Expr -> 'T) -> 'T -> DecisionTreeTarget -> 'T option; - tmethodIntercept : ('T -> Expr -> 'T) -> 'T -> ObjExprMethod -> 'T option; + nonRecBindingsIntercept : 'State -> Binding -> 'State + recBindingsIntercept : 'State -> Bindings -> 'State + dtreeIntercept : 'State -> DecisionTree -> 'State + targetIntercept : (* recurseF *) ('State -> Expr -> 'State) -> 'State -> DecisionTreeTarget -> 'State option + tmethodIntercept : (* recurseF *) ('State -> Expr -> 'State) -> 'State -> ObjExprMethod -> 'State option } let ExprFolder0 = - { exprIntercept = (fun _exprF _z _x -> None); - valBindingSiteIntercept = (fun z _b -> z); - nonRecBindingsIntercept = (fun z _bs -> z); - recBindingsIntercept = (fun z _bs -> z); - dtreeIntercept = (fun z _dt -> z); - targetIntercept = (fun _exprF _z _x -> None); - tmethodIntercept = (fun _exprF _z _x -> None); } - + { exprIntercept = (fun _recurseF noInterceptF z x -> noInterceptF z x) + valBindingSiteIntercept = (fun z _b -> z) + nonRecBindingsIntercept = (fun z _bs -> z) + recBindingsIntercept = (fun z _bs -> z) + dtreeIntercept = (fun z _dt -> z) + targetIntercept = (fun _exprF _z _x -> None) + tmethodIntercept = (fun _exprF _z _x -> None) } //------------------------------------------------------------------------- // FoldExpr @@ -6073,54 +6210,78 @@ let ExprFolder0 = /// Adapted from usage info folding. /// Collecting from exprs at moment. /// To collect ids etc some additional folding needed, over formals etc. -type ExprFolders<'State> (folders : _ ExprFolder) = - let mutable exprFClosure = Unchecked.defaultof<_> // prevent reallocation of closure - let rec exprsF z xs = List.fold exprFClosure z xs - and exprF (z: 'State) x = - match folders.exprIntercept exprFClosure z x with // fold this node, then recurse - | Some z -> z // intercepted - | None -> // structurally recurse - match x with - | Expr.Const _ -> z - | Expr.Val _ -> z - | Expr.Op (_c, _tyargs, args, _) -> exprsF z args - | Expr.Sequential (x0, x1, _dir, _, _) -> exprsF z [x0;x1] - | Expr.Lambda(_lambdaId , _ctorThisValOpt, _baseValOpt, _argvs, body, _m, _rty) -> exprF z body - | Expr.TyLambda(_lambdaId, _argtyvs, body, _m, _rty) -> exprF z body - | Expr.TyChoose(_, body, _) -> exprF z body - - | Expr.App (f, _fty, _tys, argtys, _) -> - let z = exprF z f - let z = exprsF z argtys - z - | Expr.LetRec (binds, body, _, _) -> - let z = valBindsF false z binds - let z = exprF z body - z - | Expr.Let (bind, body, _, _) -> - let z = valBindF false z bind - let z = exprF z body - z - | Expr.Link rX -> exprF z (!rX) - - | Expr.Match (_spBind, _exprm, dtree, targets, _m, _ty) -> - let z = dtreeF z dtree - let z = Array.fold targetF z targets - z - | Expr.Quote(e, {contents=Some(_typeDefs, _argTypes, argExprs, _)}, _, _, _) -> - let z = exprF z e - exprsF z argExprs - - | Expr.Quote(e, {contents=None}, _, _m, _) -> - exprF z e - - | Expr.Obj (_n, _typ, _basev, basecall, overrides, iimpls, _m) -> - let z = exprF z basecall - let z = List.fold tmethodF z overrides - let z = List.fold (foldOn snd (List.fold tmethodF)) z iimpls - z - - | Expr.StaticOptimization (_tcs, csx, x, _) -> exprsF z [csx;x] +type ExprFolders<'State> (folders: ExprFolder<'State>) = + let mutable exprFClosure = Unchecked.defaultof<'State -> Expr -> 'State> // prevent reallocation of closure + let mutable exprNoInterceptFClosure = Unchecked.defaultof<'State -> Expr -> 'State> // prevent reallocation of closure + + let rec exprsF z xs = + List.fold exprFClosure z xs + + and exprF (z: 'State) (x: Expr) = + folders.exprIntercept exprFClosure exprNoInterceptFClosure z x + + and exprNoInterceptF (z: 'State) (x: Expr) = + match x with + + | Expr.Const _ -> z + + | Expr.Val _ -> z + + | LinearOpExpr (_op, _tyargs, argsHead, argLast, _m) -> + let z = exprsF z argsHead + // tailcall + exprF z argLast + + | Expr.Op (_c, _tyargs, args, _) -> + exprsF z args + + | Expr.Sequential (x0, x1, _dir, _, _) -> + let z = exprF z x0 + exprF z x1 + + | Expr.Lambda(_lambdaId, _ctorThisValOpt, _baseValOpt, _argvs, body, _m, _rty) -> + exprF z body + + | Expr.TyLambda(_lambdaId, _argtyvs, body, _m, _rty) -> + exprF z body + + | Expr.TyChoose(_, body, _) -> + exprF z body + + | Expr.App (f, _fty, _tys, argtys, _) -> + let z = exprF z f + exprsF z argtys + + | Expr.LetRec (binds, body, _, _) -> + let z = valBindsF false z binds + exprF z body + + | Expr.Let (bind, body, _, _) -> + let z = valBindF false z bind + exprF z body + + | Expr.Link rX -> exprF z (!rX) + + | Expr.Match (_spBind, _exprm, dtree, targets, _m, _ty) -> + let z = dtreeF z dtree + let z = Array.fold targetF z targets.[0..targets.Length - 2] + // tailcall + targetF z targets.[targets.Length - 1] + + | Expr.Quote(e, {contents=Some(_typeDefs, _argTypes, argExprs, _)}, _, _, _) -> + let z = exprF z e + exprsF z argExprs + + | Expr.Quote(e, {contents=None}, _, _m, _) -> + exprF z e + + | Expr.Obj (_n, _typ, _basev, basecall, overrides, iimpls, _m) -> + let z = exprF z basecall + let z = List.fold tmethodF z overrides + List.fold (foldOn snd (List.fold tmethodF)) z iimpls + + | Expr.StaticOptimization (_tcs, csx, x, _) -> + exprsF z [csx;x] and valBindF dtree z bind = let z = folders.nonRecBindingsIntercept z bind @@ -6130,17 +6291,17 @@ type ExprFolders<'State> (folders : _ ExprFolder) = let z = folders.recBindingsIntercept z binds List.fold (bindF dtree) z binds - and bindF dtree z (bind:Binding) = + and bindF dtree z (bind: Binding) = let z = folders.valBindingSiteIntercept z (dtree, bind.Var) exprF z bind.Expr and dtreeF z dtree = let z = folders.dtreeIntercept z dtree match dtree with - | TDBind (bind, rest) -> + | TDBind (bind, rest) -> let z = valBindF true z bind dtreeF z rest - | TDSuccess (args, _) -> exprsF z args + | TDSuccess (args, _) -> exprsF z args | TDSwitch (test, dcases, dflt, _) -> let z = exprF z test let z = List.fold dcaseF z dcases @@ -6148,7 +6309,7 @@ type ExprFolders<'State> (folders : _ ExprFolder) = z and dcaseF z = function - TCase (_, dtree) -> dtreeF z dtree (* not collecting from test *) + TCase (_, dtree) -> dtreeF z dtree (* not collecting from test *) and targetF z x = match folders.targetIntercept exprFClosure z x with @@ -6171,7 +6332,7 @@ type ExprFolders<'State> (folders : _ ExprFolder) = and mdefF z x = match x with | TMDefRec(_, _, mbinds, _) -> - (* REVIEW: also iterate the abstract slot vspecs hidden in the _vslots field in the tycons *) + // REVIEW: also iterate the abstract slot vspecs hidden in the _vslots field in the tycons let z = List.fold mbindF z mbinds z | TMDefLet(bind, _) -> valBindF false z bind @@ -6187,10 +6348,14 @@ type ExprFolders<'State> (folders : _ ExprFolder) = and implF z x = foldTImplFile mexprF z x do exprFClosure <- exprF // allocate one instance of this closure + do exprNoInterceptFClosure <- exprNoInterceptF // allocate one instance of this closure + member x.FoldExpr = exprF + member x.FoldImplFile = implF -let FoldExpr folders state expr = ExprFolders(folders).FoldExpr state expr +let FoldExpr folders state expr = ExprFolders(folders).FoldExpr state expr + let FoldImplFile folders state implFile = ExprFolders(folders).FoldImplFile state implFile #if DEBUG @@ -6200,50 +6365,71 @@ let FoldImplFile folders state implFile = ExprFolders(folders).FoldImplFile stat let ExprStats x = let count = ref 0 - let folders = {ExprFolder0 with exprIntercept = (fun _ _ _ -> (count := !count + 1; None))} + let folders = {ExprFolder0 with exprIntercept = (fun _ noInterceptF z x -> (count := !count + 1; noInterceptF z x))} let () = FoldExpr folders () x string !count + " TExpr nodes" #endif //------------------------------------------------------------------------- -// +// Make expressions //------------------------------------------------------------------------- -let mkString (g:TcGlobals) m n = Expr.Const(Const.String n, m, g.string_ty) -let mkBool (g:TcGlobals) m b = Expr.Const(Const.Bool b, m, g.bool_ty) -let mkByte (g:TcGlobals) m b = Expr.Const(Const.Byte b, m, g.byte_ty) -let mkUInt16 (g:TcGlobals) m b = Expr.Const(Const.UInt16 b, m, g.uint16_ty) +let mkString (g: TcGlobals) m n = Expr.Const(Const.String n, m, g.string_ty) + +let mkBool (g: TcGlobals) m b = Expr.Const(Const.Bool b, m, g.bool_ty) + +let mkByte (g: TcGlobals) m b = Expr.Const(Const.Byte b, m, g.byte_ty) + +let mkUInt16 (g: TcGlobals) m b = Expr.Const(Const.UInt16 b, m, g.uint16_ty) + let mkTrue g m = mkBool g m true + let mkFalse g m = mkBool g m false -let mkUnit (g:TcGlobals) m = Expr.Const(Const.Unit, m, g.unit_ty) -let mkInt32 (g:TcGlobals) m n = Expr.Const(Const.Int32 n, m, g.int32_ty) -let mkInt g m n = mkInt32 g m (n) -let mkZero g m = mkInt g m 0 -let mkOne g m = mkInt g m 1 -let mkTwo g m = mkInt g m 2 -let mkMinusOne g m = mkInt g m (-1) + +let mkUnit (g: TcGlobals) m = Expr.Const(Const.Unit, m, g.unit_ty) + +let mkInt32 (g: TcGlobals) m n = Expr.Const(Const.Int32 n, m, g.int32_ty) + +let mkInt g m n = mkInt32 g m (n) + +let mkZero g m = mkInt g m 0 + +let mkOne g m = mkInt g m 1 + +let mkTwo g m = mkInt g m 2 + +let mkMinusOne g m = mkInt g m (-1) let destInt32 = function Expr.Const(Const.Int32 n, _, _) -> Some n | _ -> None -let isIDelegateEventType g ty = match tryDestAppTy g ty with ValueSome tcref -> tyconRefEq g g.fslib_IDelegateEvent_tcr tcref | _ -> false -let destIDelegateEventType g ty = +let isIDelegateEventType g ty = + match tryDestAppTy g ty with + | ValueSome tcref -> tyconRefEq g g.fslib_IDelegateEvent_tcr tcref + | _ -> false + +let destIDelegateEventType g ty = if isIDelegateEventType g ty then match argsOfAppTy g ty with | [ty1] -> ty1 | _ -> failwith "destIDelegateEventType: internal error" else failwith "destIDelegateEventType: not an IDelegateEvent type" -let mkIEventType (g:TcGlobals) ty1 ty2 = TType_app (g.fslib_IEvent2_tcr, [ty1;ty2]) -let mkIObservableType (g:TcGlobals) ty1 = TType_app (g.tcref_IObservable, [ty1]) -let mkIObserverType (g:TcGlobals) ty1 = TType_app (g.tcref_IObserver, [ty1]) -let mkRefCellContentsRef (g:TcGlobals) = mkRecdFieldRef g.refcell_tcr_canon "contents" +let mkIEventType (g: TcGlobals) ty1 ty2 = TType_app (g.fslib_IEvent2_tcr, [ty1;ty2]) + +let mkIObservableType (g: TcGlobals) ty1 = TType_app (g.tcref_IObservable, [ty1]) + +let mkIObserverType (g: TcGlobals) ty1 = TType_app (g.tcref_IObserver, [ty1]) + +let mkRefCellContentsRef (g: TcGlobals) = mkRecdFieldRef g.refcell_tcr_canon "contents" let mkSequential spSeq m e1 e2 = Expr.Sequential(e1, e2, NormalSeq, spSeq, m) + let mkCompGenSequential m e1 e2 = mkSequential SuppressSequencePointOnExprOfSequential m e1 e2 + let rec mkSequentials spSeq g m es = match es with | [e] -> e - | e::es -> mkSequential spSeq m e (mkSequentials spSeq g m es) + | e:: es -> mkSequential spSeq m e (mkSequentials spSeq g m es) | [] -> mkUnit g m let mkGetArg0 m ty = mkAsmExpr( [ mkLdarg0 ], [], [], [ty], m) @@ -6258,28 +6444,28 @@ let mkAnyTupled g m tupInfo es tys = | [e] -> e | _ -> Expr.Op (TOp.Tuple tupInfo, tys, es, m) - let mkRefTupled g m es tys = mkAnyTupled g m tupInfoRef es tys + let mkRefTupledNoTypes g m args = mkRefTupled g m args (List.map (tyOfExpr g) args) -let mkRefTupledVars g m vs = mkRefTupled g m (List.map (exprForVal m) vs) (typesOfVals vs) -let mkAnonRecd (_g:TcGlobals) m anonInfo es tys = Expr.Op (TOp.AnonRecd (anonInfo),tys,es,m) +let mkRefTupledVars g m vs = mkRefTupled g m (List.map (exprForVal m) vs) (typesOfVals vs) +let mkAnonRecd (_g: TcGlobals) m anonInfo es tys = Expr.Op (TOp.AnonRecd (anonInfo),tys,es,m) //-------------------------------------------------------------------------- // Permute expressions //-------------------------------------------------------------------------- -let inversePerm (sigma:int array) = +let inversePerm (sigma: int array) = let n = sigma.Length let invSigma = Array.create n -1 for i = 0 to n-1 do let sigma_i = sigma.[i] - // assert( invSigma.[sigma_i] = -1 ); + // assert( invSigma.[sigma_i] = -1 ) invSigma.[sigma_i] <- i invSigma -let permute (sigma:int[]) (data:'T[]) = +let permute (sigma: int[]) (data:'T[]) = let n = sigma.Length let invSigma = inversePerm sigma Array.init n (fun i -> data.[invSigma.[i]]) @@ -6288,14 +6474,14 @@ let rec existsR a b pred = if a<=b then pred a || existsR (a+1) b pred else fals // Given a permutation for record fields, work out the highest entry that we must lift out // of a record initialization. Lift out xi if xi goes to position that will be preceded by an expr with an effect -// that originally followed xi. If one entry gets lifted then everything before it also gets lifted. +// that originally followed xi. If one entry gets lifted then everything before it also gets lifted. let liftAllBefore sigma = let invSigma = inversePerm sigma let lifted = [ for i in 0 .. sigma.Length - 1 do let i' = sigma.[i] - if existsR 0 (i' - 1) (fun j' -> invSigma.[j'] > i) then + if existsR 0 (i' - 1) (fun j' -> invSigma.[j'] > i) then yield i ] if lifted.IsEmpty then 0 else List.max lifted + 1 @@ -6303,12 +6489,12 @@ let liftAllBefore sigma = /// Put record field assignments in order. // -let permuteExprList (sigma:int[]) (exprs: Expr list) (ty: TType list) (names:string list) = +let permuteExprList (sigma: int[]) (exprs: Expr list) (ty: TType list) (names: string list) = let ty, names = (Array.ofList ty, Array.ofList names) let liftLim = liftAllBefore sigma - let rewrite rbinds (i, expri:Expr) = + let rewrite rbinds (i, expri: Expr) = if i < liftLim then let tmpvi, tmpei = mkCompGenLocal expri.Range names.[i] ty.[i] let bindi = mkCompGenBind tmpvi expri @@ -6318,15 +6504,15 @@ let permuteExprList (sigma:int[]) (exprs: Expr list) (ty: TType list) (names:str let newExprs, reversedBinds = List.mapFold rewrite [] (exprs |> List.indexed) let binds = List.rev reversedBinds - let reorderedExprs = permute sigma (Array.ofList newExprs) + let reorderedExprs = permute sigma (Array.ofList newExprs) binds, Array.toList reorderedExprs /// Evaluate the expressions in the original order, but build a record with the results in field order /// Note some fields may be static. If this were not the case we could just use -/// let sigma = Array.map #Index () +/// let sigma = Array.map #Index () /// However the presence of static fields means .Index may index into a non-compact set of instance field indexes. /// We still need to sort by index. -let mkRecordExpr g (lnk, tcref, tinst, rfrefs:RecdFieldRef list, args, m) = +let mkRecordExpr g (lnk, tcref, tinst, rfrefs: RecdFieldRef list, args, m) = // Remove any abbreviations let tcref, tinst = destAppTy g (mkAppTy tcref tinst) @@ -6335,24 +6521,26 @@ let mkRecordExpr g (lnk, tcref, tinst, rfrefs:RecdFieldRef list, args, m) = let sigma = Array.create rfrefsArray.Length -1 Array.iteri (fun j (i, _) -> if sigma.[i] <> -1 then error(InternalError("bad permutation", m)) - sigma.[i] <- j) rfrefsArray + sigma.[i] <- j) rfrefsArray - let argTys = List.map (fun rfref -> actualTyOfRecdFieldRef rfref tinst) rfrefs + let argTys = List.map (fun rfref -> actualTyOfRecdFieldRef rfref tinst) rfrefs let names = rfrefs |> List.map (fun rfref -> rfref.FieldName) - let binds, args = permuteExprList sigma args argTys names + let binds, args = permuteExprList sigma args argTys names mkLetsBind m binds (Expr.Op (TOp.Recd(lnk, tcref), tinst, args, m)) - //------------------------------------------------------------------------- // List builders //------------------------------------------------------------------------- -let mkRefCell g m ty e = mkRecordExpr g (RecdExpr, g.refcell_tcr_canon, [ty], [mkRefCellContentsRef g], [e], m) +let mkRefCell g m ty e = mkRecordExpr g (RecdExpr, g.refcell_tcr_canon, [ty], [mkRefCellContentsRef g], [e], m) + let mkRefCellGet g m ty e = mkRecdFieldGetViaExprAddr (e, mkRefCellContentsRef g, [ty], m) + let mkRefCellSet g m ty e1 e2 = mkRecdFieldSetViaExprAddr (e1, mkRefCellContentsRef g, [ty], e2, m) -let mkNil (g:TcGlobals) m ty = mkUnionCaseExpr (g.nil_ucref, [ty], [], m) -let mkCons (g:TcGlobals) ty h t = mkUnionCaseExpr (g.cons_ucref, [ty], [h;t], unionRanges h.Range t.Range) +let mkNil (g: TcGlobals) m ty = mkUnionCaseExpr (g.nil_ucref, [ty], [], m) + +let mkCons (g: TcGlobals) ty h t = mkUnionCaseExpr (g.cons_ucref, [ty], [h;t], unionRanges h.Range t.Range) let mkCompGenLocalAndInvisbleBind g nm m e = let locv, loce = mkCompGenLocal m nm (tyOfExpr g e) @@ -6363,13 +6551,19 @@ let mkCompGenLocalAndInvisbleBind g nm m e = //---------------------------------------------------------------------------- let box = IL.I_box (mkILTyvarTy 0us) + let isinst = IL.I_isinst (mkILTyvarTy 0us) + let unbox = IL.I_unbox_any (mkILTyvarTy 0us) + let mkUnbox ty e m = mkAsmExpr ([ unbox ], [ty], [e], [ ty ], m) + let mkBox ty e m = mkAsmExpr ([box], [], [e], [ty], m) + let mkIsInst ty e m = mkAsmExpr ([ isinst ], [ty], [e], [ ty ], m) let mspec_Type_GetTypeFromHandle (g: TcGlobals) = IL.mkILNonGenericStaticMethSpecInTy(g.ilg.typ_Type, "GetTypeFromHandle", [g.iltyp_RuntimeTypeHandle], g.ilg.typ_Type) + let mspec_String_Length (g: TcGlobals) = mkILNonGenericInstanceMethSpecInTy (g.ilg.typ_String, "get_Length", [], g.ilg.typ_Int32) let mspec_String_Concat2 (g: TcGlobals) = @@ -6387,9 +6581,10 @@ let mspec_String_Concat_Array (g: TcGlobals) = let fspec_Missing_Value (g: TcGlobals) = IL.mkILFieldSpecInTy(g.iltyp_Missing, "Value", g.iltyp_Missing) let mkInitializeArrayMethSpec (g: TcGlobals) = - mkILNonGenericStaticMethSpecInTy(mkILNonGenericBoxedTy(g.FindSysILTypeRef "System.Runtime.CompilerServices.RuntimeHelpers"), "InitializeArray", [g.ilg.typ_Array;g.iltyp_RuntimeFieldHandle], ILType.Void) + let tref = g.FindSysILTypeRef "System.Runtime.CompilerServices.RuntimeHelpers" + mkILNonGenericStaticMethSpecInTy(mkILNonGenericBoxedTy tref, "InitializeArray", [g.ilg.typ_Array;g.iltyp_RuntimeFieldHandle], ILType.Void) -let mkInvalidCastExnNewobj (g: TcGlobals) = +let mkInvalidCastExnNewobj (g: TcGlobals) = mkNormalNewobj (mkILCtorMethSpecForTy (mkILNonGenericBoxedTy (g.FindSysILTypeRef "System.InvalidCastException"), [])) @@ -6397,103 +6592,169 @@ let typedExprForIntrinsic _g m (IntrinsicValRef(_, _, _, ty, _) as i) = let vref = ValRefForIntrinsic i exprForValRef m vref, ty -let mkCallGetGenericComparer (g:TcGlobals) m = typedExprForIntrinsic g m g.get_generic_comparer_info |> fst -let mkCallGetGenericEREqualityComparer (g:TcGlobals) m = typedExprForIntrinsic g m g.get_generic_er_equality_comparer_info |> fst -let mkCallGetGenericPEREqualityComparer (g:TcGlobals) m = typedExprForIntrinsic g m g.get_generic_per_equality_comparer_info |> fst -let mkCallUnbox (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.unbox_info, [[ty]], [ e1 ], m) -let mkCallUnboxFast (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.unbox_fast_info, [[ty]], [ e1 ], m) -let mkCallTypeTest (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.istype_info, [[ty]], [ e1 ], m) -let mkCallTypeOf (g:TcGlobals) m ty = mkApps g (typedExprForIntrinsic g m g.typeof_info, [[ty]], [ ], m) -let mkCallTypeDefOf (g:TcGlobals) m ty = mkApps g (typedExprForIntrinsic g m g.typedefof_info, [[ty]], [ ], m) +let mkCallGetGenericComparer (g: TcGlobals) m = typedExprForIntrinsic g m g.get_generic_comparer_info |> fst - -let mkCallDispose (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.dispose_info, [[ty]], [ e1 ], m) -let mkCallSeq (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.seq_info, [[ty]], [ e1 ], m) -let mkCallCreateInstance (g:TcGlobals) m ty = mkApps g (typedExprForIntrinsic g m g.create_instance_info, [[ty]], [ mkUnit g m ], m) - -let mkCallGetQuerySourceAsEnumerable (g:TcGlobals) m ty1 ty2 e1 = mkApps g (typedExprForIntrinsic g m g.query_source_as_enum_info, [[ty1;ty2]], [ e1; mkUnit g m ], m) -let mkCallNewQuerySource (g:TcGlobals) m ty1 ty2 e1 = mkApps g (typedExprForIntrinsic g m g.new_query_source_info, [[ty1;ty2]], [ e1 ], m) - -let mkCallCreateEvent (g:TcGlobals) m ty1 ty2 e1 e2 e3 = mkApps g (typedExprForIntrinsic g m g.create_event_info, [[ty1;ty2]], [ e1;e2;e3 ], m) -let mkCallGenericComparisonWithComparerOuter (g:TcGlobals) m ty comp e1 e2 = mkApps g (typedExprForIntrinsic g m g.generic_comparison_withc_outer_info, [[ty]], [ comp;e1;e2 ], m) -let mkCallGenericEqualityEROuter (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.generic_equality_er_outer_info, [[ty]], [ e1;e2 ], m) -let mkCallGenericEqualityWithComparerOuter (g:TcGlobals) m ty comp e1 e2 = mkApps g (typedExprForIntrinsic g m g.generic_equality_withc_outer_info, [[ty]], [comp;e1;e2], m) -let mkCallGenericHashWithComparerOuter (g:TcGlobals) m ty comp e1 = mkApps g (typedExprForIntrinsic g m g.generic_hash_withc_outer_info, [[ty]], [comp;e1], m) - -let mkCallEqualsOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.equals_operator_info, [[ty]], [ e1;e2 ], m) -let mkCallNotEqualsOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.not_equals_operator, [[ty]], [ e1;e2 ], m) -let mkCallLessThanOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.less_than_operator, [[ty]], [ e1;e2 ], m) -let mkCallLessThanOrEqualsOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.less_than_or_equals_operator, [[ty]], [ e1;e2 ], m) -let mkCallGreaterThanOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.greater_than_operator, [[ty]], [ e1;e2 ], m) -let mkCallGreaterThanOrEqualsOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.greater_than_or_equals_operator, [[ty]], [ e1;e2 ], m) - -let mkCallAdditionOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.unchecked_addition_info, [[ty; ty; ty]], [e1;e2], m) -let mkCallSubtractionOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.unchecked_subtraction_info, [[ty; ty; ty]], [e1;e2], m) -let mkCallMultiplyOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.unchecked_multiply_info, [[ty; ty; ty]], [e1;e2], m) -let mkCallDivisionOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.unchecked_division_info, [[ty; ty; ty]], [e1;e2], m) -let mkCallModulusOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.unchecked_modulus_info, [[ty; ty; ty]], [e1;e2], m) -let mkCallBitwiseAndOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.bitwise_and_info, [[ty]], [e1;e2], m) -let mkCallBitwiseOrOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.bitwise_or_info, [[ty]], [e1;e2], m) -let mkCallBitwiseXorOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.bitwise_xor_info, [[ty]], [e1;e2], m) -let mkCallShiftLeftOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.bitwise_shift_left_info, [[ty]], [e1;e2], m) -let mkCallShiftRightOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.bitwise_shift_right_info, [[ty]], [e1;e2], m) - -let mkCallUnaryNegOperator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.unchecked_unary_minus_info, [[ty]], [e1], m) -let mkCallUnaryNotOperator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.bitwise_unary_not_info, [[ty]], [e1], m) - -let mkCallAdditionChecked (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.checked_addition_info, [[ty; ty; ty]], [e1;e2], m) -let mkCallSubtractionChecked (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.checked_subtraction_info, [[ty; ty; ty]], [e1;e2], m) -let mkCallMultiplyChecked (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.checked_multiply_info, [[ty; ty; ty]], [e1;e2], m) -let mkCallUnaryNegChecked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.checked_unary_minus_info, [[ty]], [e1], m) - -let mkCallToByteChecked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.byte_checked_info, [[ty]], [e1], m) -let mkCallToSByteChecked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.sbyte_checked_info, [[ty]], [e1], m) -let mkCallToInt16Checked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int16_checked_info, [[ty]], [e1], m) -let mkCallToUInt16Checked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.uint16_checked_info, [[ty]], [e1], m) -let mkCallToIntChecked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int_checked_info, [[ty]], [e1], m) -let mkCallToInt32Checked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int32_checked_info, [[ty]], [e1], m) -let mkCallToUInt32Checked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.uint32_checked_info, [[ty]], [e1], m) -let mkCallToInt64Checked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int64_checked_info, [[ty]], [e1], m) -let mkCallToUInt64Checked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.uint64_checked_info, [[ty]], [e1], m) -let mkCallToIntPtrChecked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.nativeint_checked_info, [[ty]], [e1], m) -let mkCallToUIntPtrChecked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.unativeint_checked_info, [[ty]], [e1], m) - -let mkCallToByteOperator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.byte_operator_info, [[ty]], [e1], m) -let mkCallToSByteOperator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.sbyte_operator_info, [[ty]], [e1], m) -let mkCallToInt16Operator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int16_operator_info, [[ty]], [e1], m) -let mkCallToUInt16Operator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.uint16_operator_info, [[ty]], [e1], m) -let mkCallToIntOperator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int_operator_info, [[ty]], [e1], m) -let mkCallToInt32Operator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int32_operator_info, [[ty]], [e1], m) -let mkCallToUInt32Operator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.uint32_operator_info, [[ty]], [e1], m) -let mkCallToInt64Operator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int64_operator_info, [[ty]], [e1], m) -let mkCallToUInt64Operator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.uint64_operator_info, [[ty]], [e1], m) -let mkCallToSingleOperator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.float32_operator_info, [[ty]], [e1], m) -let mkCallToDoubleOperator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.float_operator_info, [[ty]], [e1], m) -let mkCallToIntPtrOperator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.nativeint_operator_info, [[ty]], [e1], m) -let mkCallToUIntPtrOperator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.unativeint_operator_info, [[ty]], [e1], m) - -let mkCallToCharOperator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.char_operator_info, [[ty]], [e1], m) -let mkCallToEnumOperator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.enum_operator_info, [[ty]], [e1], m) - -let mkCallArrayLength (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.array_length_info, [[ty]], [e1], m) -let mkCallArrayGet (g:TcGlobals) m ty e1 idx1 = mkApps g (typedExprForIntrinsic g m g.array_get_info, [[ty]], [ e1 ; idx1 ], m) -let mkCallArray2DGet (g:TcGlobals) m ty e1 idx1 idx2 = mkApps g (typedExprForIntrinsic g m g.array2D_get_info, [[ty]], [ e1 ; idx1; idx2 ], m) -let mkCallArray3DGet (g:TcGlobals) m ty e1 idx1 idx2 idx3 = mkApps g (typedExprForIntrinsic g m g.array3D_get_info, [[ty]], [ e1 ; idx1; idx2; idx3 ], m) -let mkCallArray4DGet (g:TcGlobals) m ty e1 idx1 idx2 idx3 idx4 = mkApps g (typedExprForIntrinsic g m g.array4D_get_info, [[ty]], [ e1 ; idx1; idx2; idx3; idx4 ], m) -let mkCallArraySet (g:TcGlobals) m ty e1 idx1 v = mkApps g (typedExprForIntrinsic g m g.array_set_info, [[ty]], [ e1 ; idx1; v ], m) -let mkCallArray2DSet (g:TcGlobals) m ty e1 idx1 idx2 v = mkApps g (typedExprForIntrinsic g m g.array2D_set_info, [[ty]], [ e1 ; idx1; idx2; v ], m) -let mkCallArray3DSet (g:TcGlobals) m ty e1 idx1 idx2 idx3 v = mkApps g (typedExprForIntrinsic g m g.array3D_set_info, [[ty]], [ e1 ; idx1; idx2; idx3; v ], m) -let mkCallArray4DSet (g:TcGlobals) m ty e1 idx1 idx2 idx3 idx4 v = mkApps g (typedExprForIntrinsic g m g.array4D_set_info, [[ty]], [ e1 ; idx1; idx2; idx3; idx4; v ], m) - -let mkCallHash (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.hash_info, [[ty]], [ e1 ], m) -let mkCallBox (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.box_info, [[ty]], [ e1 ], m) -let mkCallIsNull (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.isnull_info, [[ty]], [ e1 ], m) -let mkCallIsNotNull (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.isnotnull_info, [[ty]], [ e1 ], m) -let mkCallRaise (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.raise_info, [[ty]], [ e1 ], m) - -let mkCallNewDecimal (g:TcGlobals) m (e1, e2, e3, e4, e5) = mkApps g (typedExprForIntrinsic g m g.new_decimal_info, [], [ e1;e2;e3;e4;e5 ], m) - -let mkCallNewFormat (g:TcGlobals) m aty bty cty dty ety e1 = mkApps g (typedExprForIntrinsic g m g.new_format_info, [[aty;bty;cty;dty;ety]], [ e1 ], m) +let mkCallGetGenericEREqualityComparer (g: TcGlobals) m = typedExprForIntrinsic g m g.get_generic_er_equality_comparer_info |> fst + +let mkCallGetGenericPEREqualityComparer (g: TcGlobals) m = typedExprForIntrinsic g m g.get_generic_per_equality_comparer_info |> fst + +let mkCallUnbox (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.unbox_info, [[ty]], [ e1 ], m) + +let mkCallUnboxFast (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.unbox_fast_info, [[ty]], [ e1 ], m) + +let mkCallTypeTest (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.istype_info, [[ty]], [ e1 ], m) + +let mkCallTypeOf (g: TcGlobals) m ty = mkApps g (typedExprForIntrinsic g m g.typeof_info, [[ty]], [ ], m) + +let mkCallTypeDefOf (g: TcGlobals) m ty = mkApps g (typedExprForIntrinsic g m g.typedefof_info, [[ty]], [ ], m) + +let mkCallDispose (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.dispose_info, [[ty]], [ e1 ], m) + +let mkCallSeq (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.seq_info, [[ty]], [ e1 ], m) + +let mkCallCreateInstance (g: TcGlobals) m ty = mkApps g (typedExprForIntrinsic g m g.create_instance_info, [[ty]], [ mkUnit g m ], m) + +let mkCallGetQuerySourceAsEnumerable (g: TcGlobals) m ty1 ty2 e1 = mkApps g (typedExprForIntrinsic g m g.query_source_as_enum_info, [[ty1;ty2]], [ e1; mkUnit g m ], m) + +let mkCallNewQuerySource (g: TcGlobals) m ty1 ty2 e1 = mkApps g (typedExprForIntrinsic g m g.new_query_source_info, [[ty1;ty2]], [ e1 ], m) + +let mkCallCreateEvent (g: TcGlobals) m ty1 ty2 e1 e2 e3 = mkApps g (typedExprForIntrinsic g m g.create_event_info, [[ty1;ty2]], [ e1;e2;e3 ], m) + +let mkCallGenericComparisonWithComparerOuter (g: TcGlobals) m ty comp e1 e2 = mkApps g (typedExprForIntrinsic g m g.generic_comparison_withc_outer_info, [[ty]], [ comp;e1;e2 ], m) + +let mkCallGenericEqualityEROuter (g: TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.generic_equality_er_outer_info, [[ty]], [ e1;e2 ], m) + +let mkCallGenericEqualityWithComparerOuter (g: TcGlobals) m ty comp e1 e2 = mkApps g (typedExprForIntrinsic g m g.generic_equality_withc_outer_info, [[ty]], [comp;e1;e2], m) + +let mkCallGenericHashWithComparerOuter (g: TcGlobals) m ty comp e1 = mkApps g (typedExprForIntrinsic g m g.generic_hash_withc_outer_info, [[ty]], [comp;e1], m) + +let mkCallEqualsOperator (g: TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.equals_operator_info, [[ty]], [ e1;e2 ], m) + +let mkCallNotEqualsOperator (g: TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.not_equals_operator, [[ty]], [ e1;e2 ], m) + +let mkCallLessThanOperator (g: TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.less_than_operator, [[ty]], [ e1;e2 ], m) + +let mkCallLessThanOrEqualsOperator (g: TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.less_than_or_equals_operator, [[ty]], [ e1;e2 ], m) + +let mkCallGreaterThanOperator (g: TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.greater_than_operator, [[ty]], [ e1;e2 ], m) + +let mkCallGreaterThanOrEqualsOperator (g: TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.greater_than_or_equals_operator, [[ty]], [ e1;e2 ], m) + +let mkCallAdditionOperator (g: TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.unchecked_addition_info, [[ty; ty; ty]], [e1;e2], m) + +let mkCallSubtractionOperator (g: TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.unchecked_subtraction_info, [[ty; ty; ty]], [e1;e2], m) + +let mkCallMultiplyOperator (g: TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.unchecked_multiply_info, [[ty; ty; ty]], [e1;e2], m) + +let mkCallDivisionOperator (g: TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.unchecked_division_info, [[ty; ty; ty]], [e1;e2], m) + +let mkCallModulusOperator (g: TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.unchecked_modulus_info, [[ty; ty; ty]], [e1;e2], m) + +let mkCallBitwiseAndOperator (g: TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.bitwise_and_info, [[ty]], [e1;e2], m) + +let mkCallBitwiseOrOperator (g: TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.bitwise_or_info, [[ty]], [e1;e2], m) + +let mkCallBitwiseXorOperator (g: TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.bitwise_xor_info, [[ty]], [e1;e2], m) + +let mkCallShiftLeftOperator (g: TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.bitwise_shift_left_info, [[ty]], [e1;e2], m) + +let mkCallShiftRightOperator (g: TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.bitwise_shift_right_info, [[ty]], [e1;e2], m) + +let mkCallUnaryNegOperator (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.unchecked_unary_minus_info, [[ty]], [e1], m) + +let mkCallUnaryNotOperator (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.bitwise_unary_not_info, [[ty]], [e1], m) + +let mkCallAdditionChecked (g: TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.checked_addition_info, [[ty; ty; ty]], [e1;e2], m) + +let mkCallSubtractionChecked (g: TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.checked_subtraction_info, [[ty; ty; ty]], [e1;e2], m) + +let mkCallMultiplyChecked (g: TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.checked_multiply_info, [[ty; ty; ty]], [e1;e2], m) + +let mkCallUnaryNegChecked (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.checked_unary_minus_info, [[ty]], [e1], m) + +let mkCallToByteChecked (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.byte_checked_info, [[ty]], [e1], m) + +let mkCallToSByteChecked (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.sbyte_checked_info, [[ty]], [e1], m) + +let mkCallToInt16Checked (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int16_checked_info, [[ty]], [e1], m) + +let mkCallToUInt16Checked (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.uint16_checked_info, [[ty]], [e1], m) + +let mkCallToIntChecked (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int_checked_info, [[ty]], [e1], m) + +let mkCallToInt32Checked (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int32_checked_info, [[ty]], [e1], m) + +let mkCallToUInt32Checked (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.uint32_checked_info, [[ty]], [e1], m) + +let mkCallToInt64Checked (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int64_checked_info, [[ty]], [e1], m) + +let mkCallToUInt64Checked (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.uint64_checked_info, [[ty]], [e1], m) + +let mkCallToIntPtrChecked (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.nativeint_checked_info, [[ty]], [e1], m) + +let mkCallToUIntPtrChecked (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.unativeint_checked_info, [[ty]], [e1], m) + +let mkCallToByteOperator (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.byte_operator_info, [[ty]], [e1], m) + +let mkCallToSByteOperator (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.sbyte_operator_info, [[ty]], [e1], m) + +let mkCallToInt16Operator (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int16_operator_info, [[ty]], [e1], m) + +let mkCallToUInt16Operator (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.uint16_operator_info, [[ty]], [e1], m) + +let mkCallToIntOperator (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int_operator_info, [[ty]], [e1], m) + +let mkCallToInt32Operator (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int32_operator_info, [[ty]], [e1], m) + +let mkCallToUInt32Operator (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.uint32_operator_info, [[ty]], [e1], m) + +let mkCallToInt64Operator (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int64_operator_info, [[ty]], [e1], m) + +let mkCallToUInt64Operator (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.uint64_operator_info, [[ty]], [e1], m) + +let mkCallToSingleOperator (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.float32_operator_info, [[ty]], [e1], m) + +let mkCallToDoubleOperator (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.float_operator_info, [[ty]], [e1], m) + +let mkCallToIntPtrOperator (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.nativeint_operator_info, [[ty]], [e1], m) + +let mkCallToUIntPtrOperator (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.unativeint_operator_info, [[ty]], [e1], m) + +let mkCallToCharOperator (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.char_operator_info, [[ty]], [e1], m) + +let mkCallToEnumOperator (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.enum_operator_info, [[ty]], [e1], m) + +let mkCallArrayLength (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.array_length_info, [[ty]], [e1], m) + +let mkCallArrayGet (g: TcGlobals) m ty e1 idx1 = mkApps g (typedExprForIntrinsic g m g.array_get_info, [[ty]], [ e1 ; idx1 ], m) + +let mkCallArray2DGet (g: TcGlobals) m ty e1 idx1 idx2 = mkApps g (typedExprForIntrinsic g m g.array2D_get_info, [[ty]], [ e1 ; idx1; idx2 ], m) + +let mkCallArray3DGet (g: TcGlobals) m ty e1 idx1 idx2 idx3 = mkApps g (typedExprForIntrinsic g m g.array3D_get_info, [[ty]], [ e1 ; idx1; idx2; idx3 ], m) + +let mkCallArray4DGet (g: TcGlobals) m ty e1 idx1 idx2 idx3 idx4 = mkApps g (typedExprForIntrinsic g m g.array4D_get_info, [[ty]], [ e1 ; idx1; idx2; idx3; idx4 ], m) + +let mkCallArraySet (g: TcGlobals) m ty e1 idx1 v = mkApps g (typedExprForIntrinsic g m g.array_set_info, [[ty]], [ e1 ; idx1; v ], m) + +let mkCallArray2DSet (g: TcGlobals) m ty e1 idx1 idx2 v = mkApps g (typedExprForIntrinsic g m g.array2D_set_info, [[ty]], [ e1 ; idx1; idx2; v ], m) + +let mkCallArray3DSet (g: TcGlobals) m ty e1 idx1 idx2 idx3 v = mkApps g (typedExprForIntrinsic g m g.array3D_set_info, [[ty]], [ e1 ; idx1; idx2; idx3; v ], m) + +let mkCallArray4DSet (g: TcGlobals) m ty e1 idx1 idx2 idx3 idx4 v = mkApps g (typedExprForIntrinsic g m g.array4D_set_info, [[ty]], [ e1 ; idx1; idx2; idx3; idx4; v ], m) + +let mkCallHash (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.hash_info, [[ty]], [ e1 ], m) + +let mkCallBox (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.box_info, [[ty]], [ e1 ], m) + +let mkCallIsNull (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.isnull_info, [[ty]], [ e1 ], m) + +let mkCallIsNotNull (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.isnotnull_info, [[ty]], [ e1 ], m) + +let mkCallRaise (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.raise_info, [[ty]], [ e1 ], m) + +let mkCallNewDecimal (g: TcGlobals) m (e1, e2, e3, e4, e5) = mkApps g (typedExprForIntrinsic g m g.new_decimal_info, [], [ e1;e2;e3;e4;e5 ], m) + +let mkCallNewFormat (g: TcGlobals) m aty bty cty dty ety e1 = mkApps g (typedExprForIntrinsic g m g.new_format_info, [[aty;bty;cty;dty;ety]], [ e1 ], m) let TryEliminateDesugaredConstants g m c = match c with @@ -6507,8 +6768,9 @@ let TryEliminateDesugaredConstants g m c = | _ -> None -let mkSeqTy (g:TcGlobals) ty = mkAppTy g.seq_tcr [ty] -let mkIEnumeratorTy (g:TcGlobals) ty = mkAppTy g.tcref_System_Collections_Generic_IEnumerator [ty] +let mkSeqTy (g: TcGlobals) ty = mkAppTy g.seq_tcr [ty] + +let mkIEnumeratorTy (g: TcGlobals) ty = mkAppTy g.tcref_System_Collections_Generic_IEnumerator [ty] let mkCallSeqCollect g m alphaTy betaTy arg1 arg2 = let enumty2 = try rangeOfFunTy g (tyOfExpr g arg1) with _ -> (* defensive programming *) (mkSeqTy g betaTy) @@ -6533,7 +6795,7 @@ let mkCallSeqFinally g m elemTy arg1 arg2 = mkApps g (typedExprForIntrinsic g m g.seq_finally_info, [[elemTy]], [ arg1; arg2 ], m) let mkCallSeqOfFunctions g m ty1 ty2 arg1 arg2 arg3 = - mkApps g (typedExprForIntrinsic g m g.seq_of_functions_info, [[ty1;ty2]], [ arg1; arg2; arg3 ], m) + mkApps g (typedExprForIntrinsic g m g.seq_of_functions_info, [[ty1;ty2]], [ arg1; arg2; arg3 ], m) let mkCallSeqToArray g m elemTy arg1 = mkApps g (typedExprForIntrinsic g m g.seq_to_array_info, [[elemTy]], [ arg1 ], m) @@ -6561,14 +6823,14 @@ let mkCallDeserializeQuotationFSharp40Plus g m e1 e2 e3 e4 e5 = let mkCallCastQuotation g m ty e1 = mkApps g (typedExprForIntrinsic g m g.cast_quotation_info, [[ty]], [ e1 ], m) -let mkCallLiftValueWithName (g:TcGlobals) m ty nm e1 = +let mkCallLiftValueWithName (g: TcGlobals) m ty nm e1 = let vref = ValRefForIntrinsic g.lift_value_with_name_info // Use "Expr.ValueWithName" if it exists in FSharp.Core match vref.TryDeref with | ValueSome _ -> - mkApps g (typedExprForIntrinsic g m g.lift_value_with_name_info , [[ty]], [mkRefTupledNoTypes g m [e1; mkString g m nm]], m) + mkApps g (typedExprForIntrinsic g m g.lift_value_with_name_info, [[ty]], [mkRefTupledNoTypes g m [e1; mkString g m nm]], m) | ValueNone -> - mkApps g (typedExprForIntrinsic g m g.lift_value_info , [[ty]], [e1], m) + mkApps g (typedExprForIntrinsic g m g.lift_value_info, [[ty]], [e1], m) let mkCallLiftValueWithDefn g m qty e1 = assert isQuotedExprTy g qty @@ -6579,7 +6841,7 @@ let mkCallLiftValueWithDefn g m qty e1 = | ValueSome _ -> let copyOfExpr = copyExpr g ValCopyFlag.CloneAll e1 let quoteOfCopyOfExpr = Expr.Quote(copyOfExpr, ref None, false, m, qty) - mkApps g (typedExprForIntrinsic g m g.lift_value_with_defn_info , [[ty]], [mkRefTupledNoTypes g m [e1; quoteOfCopyOfExpr]], m) + mkApps g (typedExprForIntrinsic g m g.lift_value_with_defn_info, [[ty]], [mkRefTupledNoTypes g m [e1; quoteOfCopyOfExpr]], m) | ValueNone -> Expr.Quote(e1, ref None, false, m, qty) @@ -6587,19 +6849,22 @@ let mkCallCheckThis g m ty e1 = mkApps g (typedExprForIntrinsic g m g.check_this_info, [[ty]], [e1], m) let mkCallFailInit g m = - mkApps g (typedExprForIntrinsic g m g.fail_init_info , [], [mkUnit g m], m) + mkApps g (typedExprForIntrinsic g m g.fail_init_info, [], [mkUnit g m], m) let mkCallFailStaticInit g m = - mkApps g (typedExprForIntrinsic g m g.fail_static_init_info , [], [mkUnit g m], m) + mkApps g (typedExprForIntrinsic g m g.fail_static_init_info, [], [mkUnit g m], m) let mkCallQuoteToLinqLambdaExpression g m ty e1 = - mkApps g (typedExprForIntrinsic g m g.quote_to_linq_lambda_info , [[ty]], [e1], m) + mkApps g (typedExprForIntrinsic g m g.quote_to_linq_lambda_info, [[ty]], [e1], m) let mkLazyDelayed g m ty f = mkApps g (typedExprForIntrinsic g m g.lazy_create_info, [[ty]], [ f ], m) + let mkLazyForce g m ty e = mkApps g (typedExprForIntrinsic g m g.lazy_force_info, [[ty]], [ e; mkUnit g m ], m) let mkGetString g m e1 e2 = mkApps g (typedExprForIntrinsic g m g.getstring_info, [], [e1;e2], m) + let mkGetStringChar = mkGetString + let mkGetStringLength g m e = let mspec = mspec_String_Length g /// ILCall(useCallvirt, isProtected, valu, newobj, valUseFlags, isProp, noTailCall, mref, actualTypeInst, actualMethInst, retTy) @@ -6627,91 +6892,96 @@ let mkStaticCall_String_Concat_Array g m arg = // Hence each of the following are marked with places where they are generated. // Generated by the optimizer and the encoding of 'for' loops -let mkDecr (g:TcGlobals) m e = mkAsmExpr([ IL.AI_sub ], [], [e; mkOne g m], [g.int_ty], m) -let mkIncr (g:TcGlobals) m e = mkAsmExpr([ IL.AI_add ], [], [mkOne g m; e], [g.int_ty], m) +let mkDecr (g: TcGlobals) m e = mkAsmExpr([ IL.AI_sub ], [], [e; mkOne g m], [g.int_ty], m) + +let mkIncr (g: TcGlobals) m e = mkAsmExpr([ IL.AI_add ], [], [mkOne g m; e], [g.int_ty], m) // Generated by the pattern match compiler and the optimizer for // 1. array patterns // 2. optimizations associated with getting 'for' loops into the shape expected by the JIT. // // NOTE: The conv.i4 assumes that int_ty is int32. Note: ldlen returns native UNSIGNED int -let mkLdlen (g:TcGlobals) m arre = mkAsmExpr ([ IL.I_ldlen; (IL.AI_conv IL.DT_I4) ], [], [ arre ], [ g.int_ty ], m) -let mkLdelem (_g:TcGlobals) m ty arre idxe = mkAsmExpr ([ IL.I_ldelem_any (ILArrayShape.SingleDimensional, mkILTyvarTy 0us) ], [ty], [ arre;idxe ], [ ty ], m) +let mkLdlen (g: TcGlobals) m arre = mkAsmExpr ([ IL.I_ldlen; (IL.AI_conv IL.DT_I4) ], [], [ arre ], [ g.int_ty ], m) + +let mkLdelem (_g: TcGlobals) m ty arre idxe = mkAsmExpr ([ IL.I_ldelem_any (ILArrayShape.SingleDimensional, mkILTyvarTy 0us) ], [ty], [ arre;idxe ], [ ty ], m) // This is generated in equality/compare/hash augmentations and in the pattern match compiler. // It is understood by the quotation processor and turned into "Equality" nodes. // // Note: this is IL assembly code, don't go inserting this in expressions which will be exposed via quotations -let mkILAsmCeq (g:TcGlobals) m e1 e2 = mkAsmExpr ([ IL.AI_ceq ], [], [e1; e2], [g.bool_ty], m) -let mkILAsmClt (g:TcGlobals) m e1 e2 = mkAsmExpr ([ IL.AI_clt ], [], [e1; e2], [g.bool_ty], m) +let mkILAsmCeq (g: TcGlobals) m e1 e2 = mkAsmExpr ([ IL.AI_ceq ], [], [e1; e2], [g.bool_ty], m) + +let mkILAsmClt (g: TcGlobals) m e1 e2 = mkAsmExpr ([ IL.AI_clt ], [], [e1; e2], [g.bool_ty], m) // This is generated in the initialization of the "ctorv" field in the typechecker's compilation of // an implicit class construction. let mkNull m ty = Expr.Const(Const.Zero, m, ty) -//---------------------------------------------------------------------------- -// rethrow -//---------------------------------------------------------------------------- - -(* throw, rethrow *) let mkThrow m ty e = mkAsmExpr ([ IL.I_throw ], [], [e], [ty], m) + let destThrow = function | Expr.Op (TOp.ILAsm([IL.I_throw], [ty2]), [], [e], m) -> Some (m, ty2, e) | _ -> None + let isThrow x = Option.isSome (destThrow x) -// rethrow - parsed as library call - internally represented as op form. -let mkReraiseLibCall (g:TcGlobals) ty m = let ve, vt = typedExprForIntrinsic g m g.reraise_info in Expr.App(ve, vt, [ty], [mkUnit g m], m) +// reraise - parsed as library call - internally represented as op form. +let mkReraiseLibCall (g: TcGlobals) ty m = let ve, vt = typedExprForIntrinsic g m g.reraise_info in Expr.App(ve, vt, [ty], [mkUnit g m], m) + let mkReraise m returnTy = Expr.Op (TOp.Reraise, [returnTy], [], m) (* could suppress unitArg *) //---------------------------------------------------------------------------- // CompilationMappingAttribute, SourceConstructFlags //---------------------------------------------------------------------------- -let tnameCompilationSourceNameAttr = FSharpLib.Core + ".CompilationSourceNameAttribute" +let tnameCompilationSourceNameAttr = FSharpLib.Core + ".CompilationSourceNameAttribute" let tnameCompilationArgumentCountsAttr = FSharpLib.Core + ".CompilationArgumentCountsAttribute" -let tnameCompilationMappingAttr = FSharpLib.Core + ".CompilationMappingAttribute" -let tnameSourceConstructFlags = FSharpLib.Core + ".SourceConstructFlags" +let tnameCompilationMappingAttr = FSharpLib.Core + ".CompilationMappingAttribute" +let tnameSourceConstructFlags = FSharpLib.Core + ".SourceConstructFlags" -let tref_CompilationArgumentCountsAttr (g:TcGlobals) = mkILTyRef (g.fslibCcu.ILScopeRef, tnameCompilationArgumentCountsAttr) -let tref_CompilationMappingAttr (g:TcGlobals) = mkILTyRef (g.fslibCcu.ILScopeRef, tnameCompilationMappingAttr) -let tref_CompilationSourceNameAttr (g:TcGlobals) = mkILTyRef (g.fslibCcu.ILScopeRef, tnameCompilationSourceNameAttr) -let tref_SourceConstructFlags (g:TcGlobals) = mkILTyRef (g.fslibCcu.ILScopeRef, tnameSourceConstructFlags) +let tref_CompilationArgumentCountsAttr (g: TcGlobals) = mkILTyRef (g.fslibCcu.ILScopeRef, tnameCompilationArgumentCountsAttr) +let tref_CompilationMappingAttr (g: TcGlobals) = mkILTyRef (g.fslibCcu.ILScopeRef, tnameCompilationMappingAttr) +let tref_CompilationSourceNameAttr (g: TcGlobals) = mkILTyRef (g.fslibCcu.ILScopeRef, tnameCompilationSourceNameAttr) +let tref_SourceConstructFlags (g: TcGlobals) = mkILTyRef (g.fslibCcu.ILScopeRef, tnameSourceConstructFlags) -let mkCompilationMappingAttrPrim (g:TcGlobals) k nums = +let mkCompilationMappingAttrPrim (g: TcGlobals) k nums = mkILCustomAttribute g.ilg (tref_CompilationMappingAttr g, ((mkILNonGenericValueTy (tref_SourceConstructFlags g)) :: (nums |> List.map (fun _ -> g.ilg.typ_Int32))), ((k :: nums) |> List.map (fun n -> ILAttribElem.Int32(n))), []) + let mkCompilationMappingAttr g kind = mkCompilationMappingAttrPrim g kind [] + let mkCompilationMappingAttrWithSeqNum g kind seqNum = mkCompilationMappingAttrPrim g kind [seqNum] + let mkCompilationMappingAttrWithVariantNumAndSeqNum g kind varNum seqNum = mkCompilationMappingAttrPrim g kind [varNum;seqNum] -let mkCompilationArgumentCountsAttr (g:TcGlobals) nums = +let mkCompilationArgumentCountsAttr (g: TcGlobals) nums = mkILCustomAttribute g.ilg (tref_CompilationArgumentCountsAttr g, [ mkILArr1DTy g.ilg.typ_Int32 ], [ILAttribElem.Array (g.ilg.typ_Int32, List.map (fun n -> ILAttribElem.Int32(n)) nums)], []) -let mkCompilationSourceNameAttr (g:TcGlobals) n = - mkILCustomAttribute g.ilg (tref_CompilationSourceNameAttr g, [ g.ilg.typ_String ], +let mkCompilationSourceNameAttr (g: TcGlobals) n = + mkILCustomAttribute g.ilg (tref_CompilationSourceNameAttr g, [ g.ilg.typ_String ], [ILAttribElem.String(Some n)], []) -let mkCompilationMappingAttrForQuotationResource (g:TcGlobals) (nm, tys: ILTypeRef list) = +let mkCompilationMappingAttrForQuotationResource (g: TcGlobals) (nm, tys: ILTypeRef list) = mkILCustomAttribute g.ilg (tref_CompilationMappingAttr g, [ g.ilg.typ_String; mkILArr1DTy g.ilg.typ_Type ], [ ILAttribElem.String (Some nm); ILAttribElem.Array (g.ilg.typ_Type, [ for ty in tys -> ILAttribElem.TypeRef (Some ty) ]) ], []) -#if !NO_EXTENSIONTYPING //---------------------------------------------------------------------------- // Decode extensible typing attributes //---------------------------------------------------------------------------- -let isTypeProviderAssemblyAttr (cattr:ILAttribute) = +#if !NO_EXTENSIONTYPING + +let isTypeProviderAssemblyAttr (cattr: ILAttribute) = cattr.Method.DeclaringType.BasicQualifiedName = typeof.FullName -let TryDecodeTypeProviderAssemblyAttr ilg (cattr:ILAttribute) = +let TryDecodeTypeProviderAssemblyAttr ilg (cattr: ILAttribute) = if isTypeProviderAssemblyAttr cattr then let parms, _args = decodeILAttribData ilg cattr match parms with // The first parameter to the attribute is the name of the assembly with the compiler extensions. @@ -6729,27 +6999,30 @@ let TryDecodeTypeProviderAssemblyAttr ilg (cattr:ILAttribute) = //---------------------------------------------------------------------------- let tname_SignatureDataVersionAttr = FSharpLib.Core + ".FSharpInterfaceDataVersionAttribute" + let tnames_SignatureDataVersionAttr = splitILTypeName tname_SignatureDataVersionAttr + let tref_SignatureDataVersionAttr () = mkILTyRef(IlxSettings.ilxFsharpCoreLibScopeRef (), tname_SignatureDataVersionAttr) -let mkSignatureDataVersionAttr (g:TcGlobals) ((v1, v2, v3, _) : ILVersionInfo) = +let mkSignatureDataVersionAttr (g: TcGlobals) ((v1, v2, v3, _) : ILVersionInfo) = mkILCustomAttribute g.ilg (tref_SignatureDataVersionAttr(), [g.ilg.typ_Int32;g.ilg.typ_Int32;g.ilg.typ_Int32], - [ILAttribElem.Int32 (int32 v1); - ILAttribElem.Int32 (int32 v2) ; + [ILAttribElem.Int32 (int32 v1) + ILAttribElem.Int32 (int32 v2) ILAttribElem.Int32 (int32 v3)], []) let tname_AutoOpenAttr = FSharpLib.Core + ".AutoOpenAttribute" let IsSignatureDataVersionAttr cattr = isILAttribByName ([], tname_SignatureDataVersionAttr) cattr -let TryFindAutoOpenAttr (ilg : IL.ILGlobals) cattr = + +let TryFindAutoOpenAttr (ilg: IL.ILGlobals) cattr = if isILAttribByName ([], tname_AutoOpenAttr) cattr then match decodeILAttribData ilg cattr with - | [ILAttribElem.String s], _ -> s - | [], _ -> None + | [ILAttribElem.String s], _ -> s + | [], _ -> None | _ -> - warning(Failure(FSComp.SR.tastUnexpectedDecodeOfAutoOpenAttribute())); + warning(Failure(FSComp.SR.tastUnexpectedDecodeOfAutoOpenAttribute())) None else None @@ -6759,49 +7032,48 @@ let tname_InternalsVisibleToAttr = "System.Runtime.CompilerServices.InternalsVis let TryFindInternalsVisibleToAttr ilg cattr = if isILAttribByName ([], tname_InternalsVisibleToAttr) cattr then match decodeILAttribData ilg cattr with - | [ILAttribElem.String s], _ -> s - | [], _ -> None + | [ILAttribElem.String s], _ -> s + | [], _ -> None | _ -> - warning(Failure(FSComp.SR.tastUnexpectedDecodeOfInternalsVisibleToAttribute())); + warning(Failure(FSComp.SR.tastUnexpectedDecodeOfInternalsVisibleToAttribute())) None else None -let IsMatchingSignatureDataVersionAttr ilg ((v1, v2, v3, _) : ILVersionInfo) cattr = +let IsMatchingSignatureDataVersionAttr ilg ((v1, v2, v3, _) : ILVersionInfo) cattr = IsSignatureDataVersionAttr cattr && match decodeILAttribData ilg cattr with - | [ILAttribElem.Int32 u1; ILAttribElem.Int32 u2;ILAttribElem.Int32 u3 ], _ -> + | [ILAttribElem.Int32 u1; ILAttribElem.Int32 u2;ILAttribElem.Int32 u3 ], _ -> (v1 = uint16 u1) && (v2 = uint16 u2) && (v3 = uint16 u3) | _ -> - warning(Failure(FSComp.SR.tastUnexpectedDecodeOfInterfaceDataVersionAttribute())); + warning(Failure(FSComp.SR.tastUnexpectedDecodeOfInterfaceDataVersionAttribute())) false -let mkCompilerGeneratedAttr (g:TcGlobals) n = +let mkCompilerGeneratedAttr (g: TcGlobals) n = mkILCustomAttribute g.ilg (tref_CompilationMappingAttr g, [mkILNonGenericValueTy (tref_SourceConstructFlags g)], [ILAttribElem.Int32(n)], []) //-------------------------------------------------------------------------- // tupled lambda --> method/function with a given topValInfo specification. // -// AdjustArityOfLambdaBody: "(vs, body)" represents a lambda "fun (vs) -> body". The +// AdjustArityOfLambdaBody: "(vs, body)" represents a lambda "fun (vs) -> body". The // aim is to produce a "static method" represented by a pair // "(mvs, body)" where mvs has the List.length "arity". //-------------------------------------------------------------------------- - let untupledToRefTupled g vs = let untupledTys = typesOfVals vs let m = (List.head vs).Range let tupledv, tuplede = mkCompGenLocal m "tupledArg" (mkRefTupledTy g untupledTys) - let untupling_es = List.mapi (fun i _ -> mkTupleFieldGet g (tupInfoRef, tuplede, untupledTys, i, m)) untupledTys + let untupling_es = List.mapi (fun i _ -> mkTupleFieldGet g (tupInfoRef, tuplede, untupledTys, i, m)) untupledTys // These are non-sticky - at the caller,any sequence point for 'body' goes on 'body' _after_ the binding has been made tupledv, mkInvisibleLets m vs untupling_es // The required tupled-arity (arity) can either be 1 // or N, and likewise for the tuple-arity of the input lambda, i.e. either 1 or N // where the N's will be identical. -let AdjustArityOfLambdaBody g arity (vs:Val list) body = +let AdjustArityOfLambdaBody g arity (vs: Val list) body = let nvs = vs.Length - if not (nvs = arity || nvs = 1 || arity = 1) then failwith ("lengths don't add up"); + if not (nvs = arity || nvs = 1 || arity = 1) then failwith ("lengths don't add up") if arity = 0 then vs, body elif nvs = arity then @@ -6809,7 +7081,7 @@ let AdjustArityOfLambdaBody g arity (vs:Val list) body = elif nvs = 1 then let v = vs.Head let untupledTys = destRefTupleTy g v.Type - if (untupledTys.Length <> arity) then failwith "length untupledTys <> arity"; + if (untupledTys.Length <> arity) then failwith "length untupledTys <> arity" let dummyvs, dummyes = untupledTys |> List.mapi (fun i ty -> mkCompGenLocal v.Range (v.LogicalName + "_" + string i) ty) @@ -6818,7 +7090,7 @@ let AdjustArityOfLambdaBody g arity (vs:Val list) body = let body = mkInvisibleLet v.Range v (mkRefTupled g v.Range dummyes untupledTys) body dummyvs, body else - let tupledv, untupler = untupledToRefTupled g vs + let tupledv, untupler = untupledToRefTupled g vs [tupledv], untupler body let MultiLambdaToTupledLambda g vs body = @@ -6826,9 +7098,8 @@ let MultiLambdaToTupledLambda g vs body = | [] -> failwith "MultiLambdaToTupledLambda: expected some argments" | [v] -> v, body | vs -> - let tupledv, untupler = untupledToRefTupled g vs + let tupledv, untupler = untupledToRefTupled g vs tupledv, untupler body - let (|RefTuple|_|) expr = match expr with @@ -6840,20 +7111,19 @@ let MultiLambdaToTupledLambdaIfNeeded g (vs, arg) body = | [], _ -> failwith "MultiLambdaToTupledLambda: expected some argments" | [v], _ -> [(v, arg)], body | vs, RefTuple args when args.Length = vs.Length -> List.zip vs args, body - | vs, _ -> - let tupledv, untupler = untupledToRefTupled g vs + | vs, _ -> + let tupledv, untupler = untupledToRefTupled g vs [(tupledv, arg)], untupler body //-------------------------------------------------------------------------- // Beta reduction via let-bindings. Reduce immediate apps. of lambdas to let bindings. // Includes binding the immediate application of generic -// functions. Input type is the type of the function. Makes use of the invariant +// functions. Input type is the type of the function. Makes use of the invariant // that any two expressions have distinct local variables (because we explicitly copy // expressions). //------------------------------------------------------------------------ -let rec MakeApplicationAndBetaReduceAux g (f, fty, tyargsl : TType list list, argsl: Expr list, m) = - (* let verbose = true in *) +let rec MakeApplicationAndBetaReduceAux g (f, fty, tyargsl: TType list list, argsl: Expr list, m) = match f with | Expr.Let(bind, body, mlet, _) -> // Lift bindings out, i.e. (let x = e in f) y --> let x = e in f y @@ -6890,7 +7160,7 @@ let rec MakeApplicationAndBetaReduceAux g (f, fty, tyargsl : TType list list, ar // VALID: // (fun a b -> E[a, b]) t1 t2 ---> let a = t1 in let b = t2 in E[t1, t2] // INVALID: - // (fun a -> E[a]) t1 t2 ---> let a = t1 in E[a] t2 UNLESS: E[a] has no effects OR t2 has no effects + // (fun a -> E[a]) t1 t2 ---> let a = t1 in E[a] t2 UNLESS: E[a] has no effects OR t2 has no effects match tryStripLambdaN argsl.Length f with | Some (argvsl, body) -> @@ -6914,7 +7184,7 @@ let MakeApplicationAndBetaReduce g (f, fty, tyargsl, argl, m) = let MakeArgsForTopArgs _g m argtysl tpenv = argtysl |> List.mapi (fun i argtys -> - argtys |> List.mapi (fun j (argty, argInfo : ArgReprInfo) -> + argtys |> List.mapi (fun j (argty, argInfo: ArgReprInfo) -> let ty = instType tpenv argty let nm = match argInfo.Name with @@ -6922,7 +7192,7 @@ let MakeArgsForTopArgs _g m argtysl tpenv = | Some id -> id.idText fst (mkCompGenLocal m nm ty))) -let AdjustValForExpectedArity g m (vref:ValRef) flags topValInfo = +let AdjustValForExpectedArity g m (vref: ValRef) flags topValInfo = let tps, argtysl, rty, _ = GetTopValTypeInFSharpForm g topValInfo vref.Type m let tps' = copyTypars tps @@ -6939,11 +7209,6 @@ let AdjustValForExpectedArity g m (vref:ValRef) flags topValInfo = // Build a type-lambda expression for the toplevel value if needed... mkTypeLambda m tps' (tauexpr, tauty), tps' +-> tauty - -//--------------------------------------------------------------------------- -// - - let IsSubsumptionExpr g expr = match expr with | Expr.Op (TOp.Coerce, [inputTy;actualTy], [_], _) -> @@ -6958,10 +7223,10 @@ let stripTupledFunTy g ty = let (|ExprValWithPossibleTypeInst|_|) expr = match expr with - | Expr.App(Expr.Val(vref, flags, m), _fty, tyargs, [], _) -> - Some(vref, flags, tyargs, m) - | Expr.Val(vref, flags, m) -> - Some(vref, flags, [], m) + | Expr.App (Expr.Val (vref, flags, m), _fty, tyargs, [], _) -> + Some (vref, flags, tyargs, m) + | Expr.Val (vref, flags, m) -> + Some (vref, flags, [], m) | _ -> None @@ -7001,7 +7266,7 @@ let AdjustPossibleSubsumptionExpr g (expr: Expr) (suppliedArgs: Expr list) : (Ex match expr with | Expr.Op (TOp.Coerce, [inputTy;actualTy], [exprWithActualTy], m) when - isFunTy g actualTy && isFunTy g inputTy -> + isFunTy g actualTy && isFunTy g inputTy -> if typeEquiv g actualTy inputTy then Some(exprWithActualTy, suppliedArgs) @@ -7018,7 +7283,7 @@ let AdjustPossibleSubsumptionExpr g (expr: Expr) (suppliedArgs: Expr list) : (Ex // Use the nice names for a function of known arity and name. Note that 'nice' here also // carries a semantic meaning. For a function with top-info, - // let f (x:A) (y:A) (z:A) = ... + // let f (x: A) (y: A) (z: A) = ... // we know there are no side effects on the application of 'f' to 1, 2 args. This greatly simplifies // the closure built for // f b1 b2 @@ -7074,13 +7339,13 @@ let AdjustPossibleSubsumptionExpr g (expr: Expr) (suppliedArgs: Expr list) : (Ex /// Given an argument variable of tuple type that has been evaluated and stored in the /// given variable, where the tuple type that satisfies the input argument types, /// coerce it to a tuple that satisfies the matching coerced argument type(s). - let CoerceBoundTuple tupleVar argTys (actualTys : TType list) = + let CoerceBoundTuple tupleVar argTys (actualTys: TType list) = assert (actualTys.Length > 1) mkRefTupled g appm ((actualTys, argTys) ||> List.mapi2 (fun i actualTy dummyTy -> let argExprElement = mkTupleFieldGet g (tupInfoRef, tupleVar, argTys, i, appm) - mkCoerceIfNeeded g actualTy dummyTy argExprElement)) + mkCoerceIfNeeded g actualTy dummyTy argExprElement)) actualTys /// Given an argument that has a tuple type that satisfies the input argument types, @@ -7088,7 +7353,7 @@ let AdjustPossibleSubsumptionExpr g (expr: Expr) (suppliedArgs: Expr list) : (Ex let CoerceTupled niceNames (argExpr: Expr) (actualTys: TType list) = let argExprTy = (tyOfExpr g argExpr) - let argTys = + let argTys = match actualTys with | [_] -> [tyOfExpr g argExpr] @@ -7100,7 +7365,7 @@ let AdjustPossibleSubsumptionExpr g (expr: Expr) (suppliedArgs: Expr list) : (Ex if buildingLambdas then // Evaluate the user-supplied tuple-valued argument expression, inject the coercions and build an explicit tuple // Assign the argument to make sure it is only run once - // f ~~> : B -> int + // f ~~>: B -> int // f ~~> : (B * B) -> int // // for @@ -7110,7 +7375,7 @@ let AdjustPossibleSubsumptionExpr g (expr: Expr) (suppliedArgs: Expr list) : (Ex let binderBuilder = (fun tm -> mkCompGenLet appm v argExpr tm) let expr = match actualTys, argTys with - | [actualTy], [argTy] -> mkCoerceIfNeeded g actualTy argTy ve + | [actualTy], [argTy] -> mkCoerceIfNeeded g actualTy argTy ve | _ -> CoerceBoundTuple ve argTys actualTys binderBuilder, expr @@ -7119,7 +7384,7 @@ let AdjustPossibleSubsumptionExpr g (expr: Expr) (suppliedArgs: Expr list) : (Ex (fun tm -> tm), argExpr else - let detupledArgs, argTys = + let detupledArgs, argTys = match actualTys with | [_actualType] -> [argExpr], [tyOfExpr g argExpr] @@ -7133,7 +7398,7 @@ let AdjustPossibleSubsumptionExpr g (expr: Expr) (suppliedArgs: Expr list) : (Ex // for // let f (x, y) = 1 // and we're not building lambdas, just coerce the arguments in place - if detupledArgs.Length = actualTys.Length then + if detupledArgs.Length = actualTys.Length then (fun tm -> tm), CoerceDetupled argTys detupledArgs actualTys else // In this case there is a tuple mismatch. @@ -7156,7 +7421,7 @@ let AdjustPossibleSubsumptionExpr g (expr: Expr) (suppliedArgs: Expr list) : (Ex let N = argTys.Length let (cloVar, exprForOtherArgs, _) = List.foldBack - (fun (i, inpArgTy, actualArgTys) (cloVar:Val, res, resTy) -> + (fun (i, inpArgTy, actualArgTys) (cloVar: Val, res, resTy) -> let inpArgTys = match actualArgTys with @@ -7165,11 +7430,11 @@ let AdjustPossibleSubsumptionExpr g (expr: Expr) (suppliedArgs: Expr list) : (Ex assert (inpArgTys.Length = actualArgTys.Length) - let inpsAsVars, inpsAsExprs = inpArgTys |> List.mapi (fun j ty -> mkCompGenLocal appm ("arg"+string i+string j) ty) |> List.unzip + let inpsAsVars, inpsAsExprs = inpArgTys |> List.mapi (fun j ty -> mkCompGenLocal appm ("arg" + string i + string j) ty) |> List.unzip let inpsAsActualArg = CoerceDetupled inpArgTys inpsAsExprs actualArgTys let inpCloVarType = (mkFunTy (mkRefTupledTy g actualArgTys) cloVar.Type) let newResTy = mkFunTy inpArgTy resTy - let inpCloVar, inpCloVarAsExpr = mkCompGenLocal appm ("clo"+string i) inpCloVarType + let inpCloVar, inpCloVarAsExpr = mkCompGenLocal appm ("clo" + string i) inpCloVarType let newRes = // For the final arg we can skip introducing the dummy variable if i = N - 1 then @@ -7217,7 +7482,7 @@ let AdjustPossibleSubsumptionExpr g (expr: Expr) (suppliedArgs: Expr list) : (Ex let lambdaBuilder = (fun tm -> tm) lambdaBuilder, binderBuilder, inpsAsActualArg | None -> - let inpsAsVars, inpsAsExprs = (niceNames, inpArgTys) ||> List.map2 (fun nm ty -> mkCompGenLocal appm nm ty) |> List.unzip + let inpsAsVars, inpsAsExprs = (niceNames, inpArgTys) ||> List.map2 (fun nm ty -> mkCompGenLocal appm nm ty) |> List.unzip let inpsAsActualArg = CoerceDetupled inpArgTys inpsAsExprs actualArgTys let lambdaBuilder = (fun tm -> mkMultiLambda appm inpsAsVars (tm, tyOfExpr g tm)) let binderBuilder = (fun tm -> tm) @@ -7226,7 +7491,7 @@ let AdjustPossibleSubsumptionExpr g (expr: Expr) (suppliedArgs: Expr list) : (Ex // If no trailing args then we can skip introducing the dummy variable // This corresponds to - // let f (x:A) = 1 + // let f (x: A) = 1 // // f ~~> type B -> int // @@ -7254,7 +7519,7 @@ let NormalizeAndAdjustPossibleSubsumptionExprs g inputExpr = let expr, args = // AdjustPossibleSubsumptionExpr can take into account an application match stripExpr inputExpr with - | Expr.App(f, _fty, [], args, _) -> + | Expr.App(f, _fty, [], args, _) -> f, args | _ -> @@ -7271,7 +7536,7 @@ let NormalizeAndAdjustPossibleSubsumptionExprs g inputExpr = //--------------------------------------------------------------------------- -// LinearizeTopMatch - when only one non-failing target, make linear. The full +// LinearizeTopMatch - when only one non-failing target, make linear. The full // complexity of this is only used for spectacularly rare bindings such as // type ('a, 'b) either = This of 'a | That of 'b // let this_f1 = This (fun x -> x) @@ -7287,7 +7552,7 @@ let NormalizeAndAdjustPossibleSubsumptionExprs g inputExpr = let etaExpandTypeLambda g m tps (tm, ty) = if isNil tps then tm else mkTypeLambda m tps (mkApps g ((tm, ty), [(List.map mkTyparTy tps)], [], m), ty) -let AdjustValToTopVal (tmp:Val) parent valData = +let AdjustValToTopVal (tmp: Val) parent valData = tmp.SetValReprInfo (Some valData) tmp.SetDeclaringEntity parent tmp.SetIsMemberOrModuleBinding() @@ -7296,18 +7561,18 @@ let AdjustValToTopVal (tmp:Val) parent valData = /// tree, T0(v0, .., vN) => rhs ; T1() => fail ; ... /// Convert it to bind T0's variables, then continue with T0's rhs: /// let tmp = switch tree, TO(fv0, ..., fvN) => Tup (fv0, ..., fvN) ; T1() => fail; ... -/// let v1 = #1 tmp in ... -/// and vN = #N tmp +/// let v1 = #1 tmp in ... +/// and vN = #N tmp /// rhs /// Motivation: /// - For top-level let bindings with possibly failing matches, /// this makes clear that subsequent bindings (if reached) are top-level ones. -let LinearizeTopMatchAux g parent (spBind, m, tree, targets, m2, ty) = +let LinearizeTopMatchAux g parent (spBind, m, tree, targets, m2, ty) = let targetsL = Array.toList targets (* items* package up 0, 1, more items *) let itemsProj tys i x = match tys with - | [] -> failwith "itemsProj: no items?" + | [] -> failwith "itemsProj: no items?" | [_] -> x (* no projection needed *) | tys -> Expr.Op (TOp.TupleFieldGet(tupInfoRef, i), tys, [x], m) let isThrowingTarget = function TTarget(_, x, _) -> isThrow x @@ -7315,30 +7580,30 @@ let LinearizeTopMatchAux g parent (spBind, m, tree, targets, m2, ty) = (* Have failing targets and ONE successful one, so linearize *) let (TTarget (vs, rhs, spTarget)) = Option.get (List.tryFind (isThrowingTarget >> not) targetsL) (* note - old code here used copy value to generate locals - this was not right *) - let fvs = vs |> List.map (fun v -> fst(mkLocal v.Range v.LogicalName v.Type)) (* fresh *) - let vtys = vs |> List.map (fun v -> v.Type) - let tmpTy = mkRefTupledVarsTy g vs + let fvs = vs |> List.map (fun v -> fst(mkLocal v.Range v.LogicalName v.Type)) (* fresh *) + let vtys = vs |> List.map (fun v -> v.Type) + let tmpTy = mkRefTupledVarsTy g vs let tmp, tmpe = mkCompGenLocal m "matchResultHolder" tmpTy - AdjustValToTopVal tmp parent ValReprInfo.emptyValData; + AdjustValToTopVal tmp parent ValReprInfo.emptyValData - let newTg = TTarget (fvs, mkRefTupledVars g m fvs, spTarget) + let newTg = TTarget (fvs, mkRefTupledVars g m fvs, spTarget) let fixup (TTarget (tvs, tx, spTarget)) = match destThrow tx with | Some (m, _, e) -> let tx = mkThrow m tmpTy e TTarget(tvs, tx, spTarget) (* Throwing targets, recast it's "return type" *) - | None -> newTg (* Non-throwing target, replaced [new/old] *) + | None -> newTg (* Non-throwing target, replaced [new/old] *) - let targets = Array.map fixup targets - let binds = + let targets = Array.map fixup targets + let binds = vs |> List.mapi (fun i v -> let ty = v.Type - let rhs = etaExpandTypeLambda g m v.Typars (itemsProj vtys i tmpe, ty) + let rhs = etaExpandTypeLambda g m v.Typars (itemsProj vtys i tmpe, ty) // update the arity of the value v.SetValReprInfo (Some (InferArityOfExpr g AllowTypeDirectedDetupling.Yes ty [] [] rhs)) // This binding is deliberately non-sticky - any sequence point for 'rhs' goes on 'rhs' _after_ the binding has been evaluated - mkInvisibleBind v rhs) in (* vi = proj tmp *) + mkInvisibleBind v rhs) in (* vi = proj tmp *) mkCompGenLet m tmp (primMkMatch (spBind, m, tree, targets, m2, tmpTy)) (* note, probably retyped match, but note, result still has same type *) (mkLetsFromBindings m binds rhs) @@ -7356,21 +7621,23 @@ let LinearizeTopMatch g parent = function //--------------------------------------------------------------------------- -let commaEncs strs = String.concat "," strs -let angleEnc str = "{" + str + "}" -let ticksAndArgCountTextOfTyconRef (tcref:TyconRef) = +let commaEncs strs = String.concat "," strs +let angleEnc str = "{" + str + "}" +let ticksAndArgCountTextOfTyconRef (tcref: TyconRef) = // Generic type names are (name + "`" + digits) where name does not contain "`". let path = Array.toList (fullMangledPathToTyconRef tcref) @ [tcref.CompiledName] textOfPath path let typarEnc _g (gtpsType, gtpsMethod) typar = match List.tryFindIndex (typarEq typar) gtpsType with - | Some idx -> "`" + string idx // single-tick-index for typar from type - | None -> + | Some idx -> "`" + string idx // single-tick-index for typar from type + | None -> match List.tryFindIndex (typarEq typar) gtpsMethod with - | Some idx -> "``" + string idx // double-tick-index for typar from method - | None -> warning(InternalError("Typar not found during XmlDoc generation", typar.Range)) - "``0" // REVIEW: this should be ERROR not WARNING? + | Some idx -> + "``" + string idx // double-tick-index for typar from method + | None -> + warning(InternalError("Typar not found during XmlDoc generation", typar.Range)) + "``0" let rec typeEnc g (gtpsType, gtpsMethod) ty = if verbose then dprintf "--> typeEnc" @@ -7379,16 +7646,11 @@ let rec typeEnc g (gtpsType, gtpsMethod) ty = | TType_forall _ -> "Microsoft.FSharp.Core.FSharpTypeFunc" - | _ when isArrayTy g ty -> + | _ when isArrayTy g ty -> let tcref, tinst = destAppTy g ty let arraySuffix = match rankOfArrayTyconRef g tcref with - // The easy case | 1 -> "[]" - // REVIEW - // In fact IL supports 3 kinds of multidimensional arrays, and each kind of array has its own xmldoc spec. - // We don't support all these, and instead always pull xmldocs for 0-based-arbitrary-length ("0:") multidimensional arrays. - // This is probably the 99% case anyway. | 2 -> "[0:, 0:]" | 3 -> "[0:, 0:, 0:]" | 4 -> "[0:, 0:, 0:, 0:]" @@ -7396,7 +7658,7 @@ let rec typeEnc g (gtpsType, gtpsMethod) ty = typeEnc g (gtpsType, gtpsMethod) (List.head tinst) + arraySuffix | TType_ucase (UCRef(tcref, _), tinst) - | TType_app (tcref, tinst) -> + | TType_app (tcref, tinst) -> if tyconRefEq g g.byref_tcr tcref then typeEnc g (gtpsType, gtpsMethod) (List.head tinst) + "@" elif tyconRefEq g tcref g.nativeptr_tcr then @@ -7405,12 +7667,14 @@ let rec typeEnc g (gtpsType, gtpsMethod) ty = let tyName = let ty = stripTyEqnsAndMeasureEqns g ty match ty with - | TType_app (tcref, _tinst) -> + | TType_app (tcref, _tinst) -> // Generic type names are (name + "`" + digits) where name does not contain "`". // In XML doc, when used in type instances, these do not use the ticks. let path = Array.toList (fullMangledPathToTyconRef tcref) @ [tcref.CompiledName] textOfPath (List.map DemangleGenericTypeName path) - | _ -> assert(false); failwith "impossible" + | _ -> + assert false + failwith "impossible" tyName + tyargsEnc g (gtpsType, gtpsMethod) tinst | TType_anon (anonInfo, tinst) -> @@ -7422,10 +7686,10 @@ let rec typeEnc g (gtpsType, gtpsMethod) ty = else sprintf "System.Tuple%s"(tyargsEnc g (gtpsType, gtpsMethod) tys) - | TType_fun (f, x) -> + | TType_fun (f, x) -> "Microsoft.FSharp.Core.FSharpFunc" + tyargsEnc g (gtpsType, gtpsMethod) [f;x] - | TType_var typar -> + | TType_var typar -> typarEnc g (gtpsType, gtpsMethod) typar | TType_measure _ -> "?" @@ -7440,7 +7704,7 @@ let XmlDocArgsEnc g (gtpsType, gtpsMethod) argTs = if isNil argTs then "" else "(" + String.concat "," (List.map (typeEnc g (gtpsType, gtpsMethod)) argTs) + ")" -let buildAccessPath (cp : CompilationPath option) = +let buildAccessPath (cp: CompilationPath option) = match cp with | Some(cp) -> let ap = cp.AccessPath |> List.map fst |> List.toArray @@ -7448,7 +7712,7 @@ let buildAccessPath (cp : CompilationPath option) = | None -> "Extension Type" let prependPath path name = if path = "" then name else path + "." + name -let XmlDocSigOfVal g path (v:Val) = +let XmlDocSigOfVal g path (v: Val) = let parentTypars, methTypars, argInfos, prefix, path, name = // CLEANUP: this is one of several code paths that treat module values and members @@ -7479,7 +7743,7 @@ let XmlDocSigOfVal g path (v:Val) = let tps, argInfos, _, _ = GetTopValTypeInCompiledForm g w v.Type v.Range let name = v.CompiledName let prefix = - if w.NumCurriedArgs = 0 && isNil tps then "P:" + if w.NumCurriedArgs = 0 && isNil tps then "P:" else "M:" [], tps, argInfos, prefix, path, name let argTs = argInfos |> List.concat |> List.map fst @@ -7488,19 +7752,19 @@ let XmlDocSigOfVal g path (v:Val) = let genArity = if arity=0 then "" else sprintf "``%d" arity prefix + prependPath path name + genArity + args -let BuildXmlDocSig prefix paths = prefix + List.fold prependPath "" paths +let BuildXmlDocSig prefix paths = prefix + List.fold prependPath "" paths let XmlDocSigOfUnionCase = BuildXmlDocSig "T:" // Would like to use "U:", but ParseMemberSignature only accepts C# signatures -let XmlDocSigOfField = BuildXmlDocSig "F:" +let XmlDocSigOfField = BuildXmlDocSig "F:" -let XmlDocSigOfProperty = BuildXmlDocSig "P:" +let XmlDocSigOfProperty = BuildXmlDocSig "P:" -let XmlDocSigOfTycon = BuildXmlDocSig "T:" +let XmlDocSigOfTycon = BuildXmlDocSig "T:" -let XmlDocSigOfSubModul = BuildXmlDocSig "T:" +let XmlDocSigOfSubModul = BuildXmlDocSig "T:" -let XmlDocSigOfEntity (eref:EntityRef) = +let XmlDocSigOfEntity (eref: EntityRef) = XmlDocSigOfTycon [(buildAccessPath eref.CompilationPathOpt); eref.Deref.CompiledName] //-------------------------------------------------------------------------- @@ -7508,21 +7772,21 @@ let XmlDocSigOfEntity (eref:EntityRef) = //-------------------------------------------------------------------------- -let enum_CompilationRepresentationAttribute_Static = 0b0000000000000001 -let enum_CompilationRepresentationAttribute_Instance = 0b0000000000000010 +let enum_CompilationRepresentationAttribute_Static = 0b0000000000000001 +let enum_CompilationRepresentationAttribute_Instance = 0b0000000000000010 let enum_CompilationRepresentationAttribute_StaticInstanceMask = 0b0000000000000011 -let enum_CompilationRepresentationAttribute_ModuleSuffix = 0b0000000000000100 -let enum_CompilationRepresentationAttribute_PermitNull = 0b0000000000001000 +let enum_CompilationRepresentationAttribute_ModuleSuffix = 0b0000000000000100 +let enum_CompilationRepresentationAttribute_PermitNull = 0b0000000000001000 let HasUseNullAsTrueValueAttribute g attribs = - match TryFindFSharpInt32Attribute g g.attrib_CompilationRepresentationAttribute attribs with + match TryFindFSharpInt32Attribute g g.attrib_CompilationRepresentationAttribute attribs with | Some(flags) -> ((flags &&& enum_CompilationRepresentationAttribute_PermitNull) <> 0) | _ -> false -let TyconHasUseNullAsTrueValueAttribute g (tycon:Tycon) = HasUseNullAsTrueValueAttribute g tycon.Attribs +let TyconHasUseNullAsTrueValueAttribute g (tycon: Tycon) = HasUseNullAsTrueValueAttribute g tycon.Attribs // WARNING: this must match optimizeAlternativeToNull in ilx/cu_erase.fs -let CanHaveUseNullAsTrueValueAttribute (_g:TcGlobals) (tycon:Tycon) = +let CanHaveUseNullAsTrueValueAttribute (_g: TcGlobals) (tycon: Tycon) = (tycon.IsUnionTycon && let ucs = tycon.UnionCasesArray (ucs.Length = 0 || @@ -7530,7 +7794,7 @@ let CanHaveUseNullAsTrueValueAttribute (_g:TcGlobals) (tycon:Tycon) = ucs |> Array.exists (fun uc -> not uc.IsNullary)))) // WARNING: this must match optimizeAlternativeToNull in ilx/cu_erase.fs -let IsUnionTypeWithNullAsTrueValue (g:TcGlobals) (tycon:Tycon) = +let IsUnionTypeWithNullAsTrueValue (g: TcGlobals) (tycon: Tycon) = (tycon.IsUnionTycon && let ucs = tycon.UnionCasesArray (ucs.Length = 0 || @@ -7653,7 +7917,7 @@ let mkIsInstConditional g m tgty vinpe v e2 e3 = let tg3 = mbuilder.AddResultTarget(e3, SuppressSequencePointAtTarget) let dtree = TDSwitch(exprForVal m v, [TCase(DecisionTreeTest.IsNull, tg3)], Some tg2, m) let expr = mbuilder.Close(dtree, m, tyOfExpr g e2) - mkCompGenLet m v (mkIsInst tgty vinpe m) expr + mkCompGenLet m v (mkIsInst tgty vinpe m) expr else let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding, m) @@ -7675,9 +7939,9 @@ let mkNullTest g m e1 e2 e3 = let dtree = TDSwitch(e1, [TCase(DecisionTreeTest.IsNull, tg3)], Some tg2, m) let expr = mbuilder.Close(dtree, m, tyOfExpr g e2) expr -let mkNonNullTest (g:TcGlobals) m e = mkAsmExpr ([ IL.AI_ldnull ; IL.AI_cgt_un ], [], [e], [g.bool_ty], m) +let mkNonNullTest (g: TcGlobals) m e = mkAsmExpr ([ IL.AI_ldnull ; IL.AI_cgt_un ], [], [e], [g.bool_ty], m) let mkNonNullCond g m ty e1 e2 e3 = mkCond NoSequencePointAtStickyBinding SuppressSequencePointAtTarget m ty (mkNonNullTest g m e1) e2 e3 -let mkIfThen (g:TcGlobals) m e1 e2 = mkCond NoSequencePointAtStickyBinding SuppressSequencePointAtTarget m g.unit_ty e1 e2 (mkUnit g m) +let mkIfThen (g: TcGlobals) m e1 e2 = mkCond NoSequencePointAtStickyBinding SuppressSequencePointAtTarget m g.unit_ty e1 e2 (mkUnit g m) let ModuleNameIsMangled g attrs = @@ -7688,7 +7952,7 @@ let ModuleNameIsMangled g attrs = let CompileAsEvent g attrs = HasFSharpAttribute g g.attrib_CLIEventAttribute attrs -let MemberIsCompiledAsInstance g parent isExtensionMember (membInfo:ValMemberInfo) attrs = +let MemberIsCompiledAsInstance g parent isExtensionMember (membInfo: ValMemberInfo) attrs = // All extension members are compiled as static members if isExtensionMember then false // Anything implementing a dispatch slot is compiled as an instance member @@ -7728,19 +7992,19 @@ let isSealedTy g ty = true let isComInteropTy g ty = - let tcr = tcrefOfAppTy g ty + let tcref = tcrefOfAppTy g ty match g.attrib_ComImportAttribute with | None -> false - | Some attr -> TryFindFSharpBoolAttribute g attr tcr.Attribs = Some(true) + | Some attr -> TryFindFSharpBoolAttribute g attr tcref.Attribs = Some(true) -let ValSpecIsCompiledAsInstance g (v:Val) = +let ValSpecIsCompiledAsInstance g (v: Val) = match v.MemberInfo with | Some(membInfo) -> // Note it doesn't matter if we pass 'v.TopValDeclaringEntity' or 'v.MemberApparentEntity' here. // These only differ if the value is an extension member, and in that case MemberIsCompiledAsInstance always returns // false anyway MemberIsCompiledAsInstance g v.MemberApparentEntity v.IsExtensionMember membInfo v.Attribs - | _ -> false + | _ -> false let ValRefIsCompiledAsInstanceMember g (vref: ValRef) = ValSpecIsCompiledAsInstance g vref.Deref @@ -7749,7 +8013,7 @@ let ValRefIsCompiledAsInstanceMember g (vref: ValRef) = ValSpecIsCompiledAsInsta // Crack information about an F# object model call //--------------------------------------------------------------------------- -let GetMemberCallInfo g (vref:ValRef, vFlags) = +let GetMemberCallInfo g (vref: ValRef, vFlags) = match vref.MemberInfo with | Some(membInfo) when not vref.IsExtensionMember -> let numEnclTypeArgs = vref.MemberApparentEntity.TyparsNoRange.Length @@ -7758,14 +8022,14 @@ let GetMemberCallInfo g (vref:ValRef, vFlags) = membInfo.MemberFlags.IsDispatchSlot) && not membInfo.MemberFlags.IsFinal && (match vFlags with VSlotDirectCall -> false | _ -> true) - let isNewObj = (membInfo.MemberFlags.MemberKind = MemberKind.Constructor) && (match vFlags with NormalValUse -> true | _ -> false) + let isNewObj = (membInfo.MemberFlags.MemberKind = MemberKind.Constructor) && (match vFlags with NormalValUse -> true | _ -> false) let isSuperInit = (membInfo.MemberFlags.MemberKind = MemberKind.Constructor) && (match vFlags with CtorValUsedAsSuperInit -> true | _ -> false) - let isSelfInit = (membInfo.MemberFlags.MemberKind = MemberKind.Constructor) && (match vFlags with CtorValUsedAsSelfInit -> true | _ -> false) + let isSelfInit = (membInfo.MemberFlags.MemberKind = MemberKind.Constructor) && (match vFlags with CtorValUsedAsSelfInit -> true | _ -> false) let isCompiledAsInstance = ValRefIsCompiledAsInstanceMember g vref let takesInstanceArg = isCompiledAsInstance && not isNewObj let isPropGet = (membInfo.MemberFlags.MemberKind = MemberKind.PropertyGet) && (membInfo.MemberFlags.IsInstance = isCompiledAsInstance) let isPropSet = (membInfo.MemberFlags.MemberKind = MemberKind.PropertySet) && (membInfo.MemberFlags.IsInstance = isCompiledAsInstance) - numEnclTypeArgs, virtualCall, isNewObj, isSuperInit, isSelfInit , takesInstanceArg, isPropGet, isPropSet + numEnclTypeArgs, virtualCall, isNewObj, isSuperInit, isSelfInit, takesInstanceArg, isPropGet, isPropSet | _ -> 0, false, false, false, false, false, false, false @@ -7774,7 +8038,7 @@ let GetMemberCallInfo g (vref:ValRef, vFlags) = //--------------------------------------------------------------------------- -let TryGetActivePatternInfo (vref:ValRef) = +let TryGetActivePatternInfo (vref: ValRef) = // First is an optimization to prevent calls to CoreDisplayName, which calls DemangleOperatorName let logicalName = vref.LogicalName if logicalName.Length = 0 || logicalName.[0] <> '|' then @@ -7789,10 +8053,10 @@ type ActivePatternElemRef with | None -> error(InternalError("not an active pattern name", vref.Range)) | Some apinfo -> let nms = apinfo.ActiveTags - if n < 0 || n >= List.length nms then error(InternalError("name_of_apref: index out of range for active pattern reference", vref.Range)); + if n < 0 || n >= List.length nms then error(InternalError("name_of_apref: index out of range for active pattern reference", vref.Range)) List.item n nms -let mkChoiceTyconRef (g:TcGlobals) m n = +let mkChoiceTyconRef (g: TcGlobals) m n = match n with | 0 | 1 -> error(InternalError("mkChoiceTyconRef", m)) | 2 -> g.choice2_tcr @@ -7803,7 +8067,7 @@ let mkChoiceTyconRef (g:TcGlobals) m n = | 7 -> g.choice7_tcr | _ -> error(Error(FSComp.SR.tastActivePatternsLimitedToSeven(), m)) -let mkChoiceTy (g:TcGlobals) m tinst = +let mkChoiceTy (g: TcGlobals) m tinst = match List.length tinst with | 0 -> g.unit_ty | 1 -> List.head tinst @@ -7828,12 +8092,12 @@ type PrettyNaming.ActivePatternInfo with // check if an active pattern takes type parameters only bound by the return types, // not by their argument types. -let doesActivePatternHaveFreeTypars g (v:ValRef) = - let vty = v.TauType +let doesActivePatternHaveFreeTypars g (v: ValRef) = + let vty = v.TauType let vtps = v.Typars |> Zset.ofList typarOrder if not (isFunTy g v.TauType) then errorR(Error(FSComp.SR.activePatternIdentIsNotFunctionTyped(v.LogicalName), v.Range)) - let argtys, resty = stripFunTy g vty + let argtys, resty = stripFunTy g vty let argtps, restps= (freeInTypes CollectTypars argtys).FreeTypars, (freeInType CollectTypars resty).FreeTypars // Error if an active pattern is generic in type variables that only occur in the result Choice<_, ...>. // Note: The test restricts to v.Typars since typars from the closure are considered fixed. @@ -7845,13 +8109,13 @@ let doesActivePatternHaveFreeTypars g (v:ValRef) = [] type ExprRewritingEnv = - { PreIntercept: ((Expr -> Expr) -> Expr -> Expr option) option; - PostTransform: Expr -> Expr option; - PreInterceptBinding: ((Expr -> Expr) -> Binding -> Binding option) option; + { PreIntercept: ((Expr -> Expr) -> Expr -> Expr option) option + PostTransform: Expr -> Expr option + PreInterceptBinding: ((Expr -> Expr) -> Binding -> Binding option) option IsUnderQuotations: bool } let rec rewriteBind env bind = - match env.PreInterceptBinding with + match env.PreInterceptBinding with | Some f -> match f (RewriteExpr env) bind with | Some res -> res @@ -7865,6 +8129,8 @@ and rewriteBinds env binds = List.map (rewriteBind env) binds and RewriteExpr env expr = match expr with + | LinearOpExpr _ + | LinearMatchExpr _ | Expr.Let _ | Expr.Sequential _ -> rewriteLinearExpr env expr (fun e -> e) @@ -7876,7 +8142,7 @@ and RewriteExpr env expr = postRewriteExpr env expr and preRewriteExpr env expr = - match env.PreIntercept with + match env.PreIntercept with | Some f -> f (RewriteExpr env) expr | None -> None @@ -7891,7 +8157,7 @@ and rewriteExprStructure env expr = | Expr.Val _ -> expr | Expr.App(f0, f0ty, tyargs, args, m) -> - let f0' = RewriteExpr env f0 + let f0' = RewriteExpr env f0 let args' = rewriteExprs env args if f0 === f0' && args === args' then expr else Expr.App(f0', f0ty, tyargs, args', m) @@ -7947,29 +8213,41 @@ and rewriteLinearExpr env expr contf = // schedule a rewrite on the way back up by adding to the continuation let contf = contf << postRewriteExpr env match preRewriteExpr env expr with - | Some expr -> contf expr (* done - intercepted! *) + | Some expr -> contf expr | None -> match expr with - | Expr.Let (bind, body, m, _) -> + | Expr.Let (bind, bodyExpr, m, _) -> let bind = rewriteBind env bind - rewriteLinearExpr env body (contf << (fun body' -> - mkLetBind m bind body')) - | Expr.Sequential (e1, e2, dir, spSeq, m) -> - let e1' = RewriteExpr env e1 - rewriteLinearExpr env e2 (contf << (fun e2' -> - if e1 === e1' && e2 === e2' then expr - else Expr.Sequential(e1', e2', dir, spSeq, m))) - | LinearMatchExpr (spBind, exprm, dtree, tg1, e2, sp2, m2, ty) -> + // tailcall + rewriteLinearExpr env bodyExpr (contf << (fun bodyExpr' -> + mkLetBind m bind bodyExpr')) + + | Expr.Sequential (expr1, expr2, dir, spSeq, m) -> + let expr1' = RewriteExpr env expr1 + // tailcall + rewriteLinearExpr env expr2 (contf << (fun expr2' -> + if expr1 === expr1' && expr2 === expr2' then expr + else Expr.Sequential(expr1', expr2', dir, spSeq, m))) + + | LinearOpExpr (op, tyargs, argsFront, argLast, m) -> + let argsFront' = rewriteExprs env argsFront + // tailcall + rewriteLinearExpr env argLast (contf << (fun argLast' -> + if argsFront === argsFront' && argLast === argLast' then expr + else rebuildLinearOpExpr (op, tyargs, argsFront', argLast', m))) + + | LinearMatchExpr (spBind, exprm, dtree, tg1, expr2, sp2, m2, ty) -> let dtree = rewriteDecisionTree env dtree - let tg1 = rewriteTarget env tg1 + let tg1' = rewriteTarget env tg1 // tailcall - rewriteLinearExpr env e2 (contf << (fun e2 -> - rebuildLinearMatchExpr (spBind, exprm, dtree, tg1, e2, sp2, m2, ty))) + rewriteLinearExpr env expr2 (contf << (fun expr2' -> + rebuildLinearMatchExpr (spBind, exprm, dtree, tg1', expr2', sp2, m2, ty))) | _ -> - (* no longer linear *) + // no longer linear, no tailcall contf (RewriteExpr env expr) and rewriteExprs env exprs = List.mapq (RewriteExpr env) exprs + and rewriteFlatExprs env exprs = List.mapq (RewriteExpr env) exprs and rewriteDecisionTree env x = @@ -8002,17 +8280,17 @@ and rewriteObjExprInterfaceImpl env (ty, overrides) = and rewriteModuleOrNamespaceExpr env x = match x with - | ModuleOrNamespaceExprWithSig(mty, def, m) -> ModuleOrNamespaceExprWithSig(mty, rewriteModuleOrNamespaceDef env def, m) + | ModuleOrNamespaceExprWithSig(mty, def, m) -> ModuleOrNamespaceExprWithSig(mty, rewriteModuleOrNamespaceDef env def, m) and rewriteModuleOrNamespaceDefs env x = List.map (rewriteModuleOrNamespaceDef env) x and rewriteModuleOrNamespaceDef env x = match x with | TMDefRec(isRec, tycons, mbinds, m) -> TMDefRec(isRec, tycons, rewriteModuleOrNamespaceBindings env mbinds, m) - | TMDefLet(bind, m) -> TMDefLet(rewriteBind env bind, m) - | TMDefDo(e, m) -> TMDefDo(RewriteExpr env e, m) - | TMDefs defs -> TMDefs(rewriteModuleOrNamespaceDefs env defs) - | TMAbstract mexpr -> TMAbstract(rewriteModuleOrNamespaceExpr env mexpr) + | TMDefLet(bind, m) -> TMDefLet(rewriteBind env bind, m) + | TMDefDo(e, m) -> TMDefDo(RewriteExpr env e, m) + | TMDefs defs -> TMDefs(rewriteModuleOrNamespaceDefs env defs) + | TMAbstract mexpr -> TMAbstract(rewriteModuleOrNamespaceExpr env mexpr) and rewriteModuleOrNamespaceBinding env x = match x with @@ -8030,9 +8308,9 @@ and RewriteImplFile env mv = mapTImplFile (rewriteModuleOrNamespaceExpr env) mv // accessed via non local references. //-------------------------------------------------------------------------- -let MakeExportRemapping viewedCcu (mspec:ModuleOrNamespace) = +let MakeExportRemapping viewedCcu (mspec: ModuleOrNamespace) = - let accEntityRemap (entity:Entity) acc = + let accEntityRemap (entity: Entity) acc = match tryRescopeEntity viewedCcu entity with | ValueSome eref -> addTyconRefRemap (mkLocalTyconRef entity) eref acc @@ -8042,7 +8320,7 @@ let MakeExportRemapping viewedCcu (mspec:ModuleOrNamespace) = else error(InternalError("Unexpected entity without a pubpath when remapping assembly data", entity.Range)) - let accValRemap (vspec:Val) acc = + let accValRemap (vspec: Val) acc = // The acc contains the entity remappings match tryRescopeVal viewedCcu acc vspec with | ValueSome vref -> @@ -8059,7 +8337,7 @@ let MakeExportRemapping viewedCcu (mspec:ModuleOrNamespace) = allRemap //-------------------------------------------------------------------------- -// Apply a "local to nonlocal" renaming to a module type. This can't use +// Apply a "local to nonlocal" renaming to a module type. This can't use // remap_mspec since the remapping we want isn't to newly created nodes // but rather to remap to the nonlocal references. This is deliberately // "breaking" the binding structure implicit in the module type, which is @@ -8070,31 +8348,31 @@ let MakeExportRemapping viewedCcu (mspec:ModuleOrNamespace) = let rec remapEntityDataToNonLocal g tmenv (d: Entity) = let tps', tmenvinner = tmenvCopyRemapAndBindTypars (remapAttribs g tmenv) tmenv (d.entity_typars.Force(d.entity_range)) - let typarsR = LazyWithContext.NotLazy tps' - let attribsR = d.entity_attribs |> remapAttribs g tmenvinner - let tyconReprR = d.entity_tycon_repr |> remapTyconRepr g tmenvinner - let tyconAbbrevR = d.TypeAbbrev |> Option.map (remapType tmenvinner) - let tyconTcaugR = d.entity_tycon_tcaug |> remapTyconAug tmenvinner - let modulContentsR = + let typarsR = LazyWithContext.NotLazy tps' + let attribsR = d.entity_attribs |> remapAttribs g tmenvinner + let tyconReprR = d.entity_tycon_repr |> remapTyconRepr g tmenvinner + let tyconAbbrevR = d.TypeAbbrev |> Option.map (remapType tmenvinner) + let tyconTcaugR = d.entity_tycon_tcaug |> remapTyconAug tmenvinner + let modulContentsR = MaybeLazy.Strict (d.entity_modul_contents.Value |> mapImmediateValsAndTycons (remapTyconToNonLocal g tmenv) (remapValToNonLocal g tmenv)) - let exnInfoR = d.ExceptionInfo |> remapTyconExnInfo g tmenvinner + let exnInfoR = d.ExceptionInfo |> remapTyconExnInfo g tmenvinner { d with - entity_typars = typarsR - entity_attribs = attribsR - entity_tycon_repr = tyconReprR - entity_tycon_tcaug = tyconTcaugR + entity_typars = typarsR + entity_attribs = attribsR + entity_tycon_repr = tyconReprR + entity_tycon_tcaug = tyconTcaugR entity_modul_contents = modulContentsR - entity_opt_data = + entity_opt_data = match d.entity_opt_data with | Some dd -> - Some { dd with entity_tycon_abbrev = tyconAbbrevR; entity_exn_info = exnInfoR } + Some { dd with entity_tycon_abbrev = tyconAbbrevR; entity_exn_info = exnInfoR } | _ -> None } and remapTyconToNonLocal g tmenv x = x |> NewModifiedTycon (remapEntityDataToNonLocal g tmenv) -and remapValToNonLocal g tmenv inp = +and remapValToNonLocal g tmenv inp = // creates a new stamp inp |> NewModifiedVal (remapValData g tmenv) @@ -8113,7 +8391,7 @@ let isCompiledConstraint cx = // Is a value a first-class polymorphic value with .NET constraints? // Used to turn off TLR and method splitting -let IsGenericValWithGenericContraints g (v:Val) = +let IsGenericValWithGenericContraints g (v: Val) = isForallTy g v.Type && v.Type |> destForallTy g |> fst |> List.exists (fun tp -> List.exists isCompiledConstraint tp.Constraints) @@ -8133,7 +8411,7 @@ type Entity with | Some membInfo -> let argInfos = ArgInfosOfMember g vref argInfos.Length = 1 && - List.lengthsEqAndForall2 (typeEquiv g) (List.map fst (List.head argInfos)) argtys && + List.lengthsEqAndForall2 (typeEquiv g) (List.map fst (List.head argInfos)) argtys && membInfo.MemberFlags.IsOverrideOrExplicitImpl) member tycon.HasMember g nm argtys = @@ -8152,7 +8430,7 @@ type EntityRef with member tcref.HasOverride g nm argtys = tcref.Deref.HasOverride g nm argtys member tcref.HasMember g nm argtys = tcref.Deref.HasMember g nm argtys -let mkFastForLoop g (spLet, m, idv:Val, start, dir, finish, body) = +let mkFastForLoop g (spLet, m, idv: Val, start, dir, finish, body) = let dir = if dir then FSharpForLoopUp else FSharpForLoopDown mkFor g (spLet, idv, start, dir, finish, body, m) @@ -8173,24 +8451,24 @@ let IsSimpleSyntacticConstantExpr g inputExpr = -> checkExpr vrefs arg // compare, =, <>, +, -, <, >, <=, >=, <<<, >>>, &&& | BinopExpr g (vref, arg1, arg2) - when (valRefEq g vref g.equals_operator_vref || - valRefEq g vref g.compare_operator_vref || - valRefEq g vref g.unchecked_addition_vref || - valRefEq g vref g.less_than_operator_vref || - valRefEq g vref g.less_than_or_equals_operator_vref || - valRefEq g vref g.greater_than_operator_vref || - valRefEq g vref g.greater_than_or_equals_operator_vref || - valRefEq g vref g.not_equals_operator_vref || - valRefEq g vref g.unchecked_addition_vref || - valRefEq g vref g.unchecked_multiply_vref || - valRefEq g vref g.unchecked_subtraction_vref || + when (valRefEq g vref g.equals_operator_vref || + valRefEq g vref g.compare_operator_vref || + valRefEq g vref g.unchecked_addition_vref || + valRefEq g vref g.less_than_operator_vref || + valRefEq g vref g.less_than_or_equals_operator_vref || + valRefEq g vref g.greater_than_operator_vref || + valRefEq g vref g.greater_than_or_equals_operator_vref || + valRefEq g vref g.not_equals_operator_vref || + valRefEq g vref g.unchecked_addition_vref || + valRefEq g vref g.unchecked_multiply_vref || + valRefEq g vref g.unchecked_subtraction_vref || // Note: division and modulus can raise exceptions, so are not included - valRefEq g vref g.bitwise_shift_left_vref || - valRefEq g vref g.bitwise_shift_right_vref || - valRefEq g vref g.bitwise_xor_vref || - valRefEq g vref g.bitwise_and_vref || + valRefEq g vref g.bitwise_shift_left_vref || + valRefEq g vref g.bitwise_shift_right_vref || + valRefEq g vref g.bitwise_xor_vref || + valRefEq g vref g.bitwise_and_vref || valRefEq g vref g.bitwise_or_vref) && - (not (typeEquiv g (tyOfExpr g arg1) g.string_ty) && not (typeEquiv g (tyOfExpr g arg1) g.decimal_ty) ) + (not (typeEquiv g (tyOfExpr g arg1) g.string_ty) && not (typeEquiv g (tyOfExpr g arg1) g.decimal_ty) ) -> checkExpr vrefs arg1 && checkExpr vrefs arg2 | Expr.Val(vref, _, _) -> vref.Deref.IsCompiledAsStaticPropertyWithoutField || vrefs.Contains vref.Stamp | Expr.Match(_, _, dtree, targets, _, _) -> checkDecisionTree vrefs dtree && targets |> Array.forall (checkDecisionTreeTarget vrefs) @@ -8218,21 +8496,21 @@ let IsSimpleSyntacticConstantExpr g inputExpr = checkExpr Set.empty inputExpr -let EvalArithBinOp (opInt8, opInt16, opInt32, opInt64, opUInt8, opUInt16, opUInt32, opUInt64) (arg1:Expr) (arg2:Expr) = +let EvalArithBinOp (opInt8, opInt16, opInt32, opInt64, opUInt8, opUInt16, opUInt32, opUInt64) (arg1: Expr) (arg2: Expr) = // At compile-time we check arithmetic let m = unionRanges arg1.Range arg2.Range try match arg1, arg2 with - | Expr.Const(Const.Int32 x1, _, ty), Expr.Const(Const.Int32 x2, _, _) -> Expr.Const(Const.Int32 (opInt32 x1 x2), m, ty) - | Expr.Const(Const.SByte x1, _, ty), Expr.Const(Const.SByte x2, _, _) -> Expr.Const(Const.SByte (opInt8 x1 x2), m, ty) - | Expr.Const(Const.Int16 x1, _, ty), Expr.Const(Const.Int16 x2, _, _) -> Expr.Const(Const.Int16 (opInt16 x1 x2), m, ty) - | Expr.Const(Const.Int64 x1, _, ty), Expr.Const(Const.Int64 x2, _, _) -> Expr.Const(Const.Int64 (opInt64 x1 x2), m, ty) - | Expr.Const(Const.Byte x1, _, ty), Expr.Const(Const.Byte x2, _, _) -> Expr.Const(Const.Byte (opUInt8 x1 x2), m, ty) + | Expr.Const(Const.Int32 x1, _, ty), Expr.Const(Const.Int32 x2, _, _) -> Expr.Const(Const.Int32 (opInt32 x1 x2), m, ty) + | Expr.Const(Const.SByte x1, _, ty), Expr.Const(Const.SByte x2, _, _) -> Expr.Const(Const.SByte (opInt8 x1 x2), m, ty) + | Expr.Const(Const.Int16 x1, _, ty), Expr.Const(Const.Int16 x2, _, _) -> Expr.Const(Const.Int16 (opInt16 x1 x2), m, ty) + | Expr.Const(Const.Int64 x1, _, ty), Expr.Const(Const.Int64 x2, _, _) -> Expr.Const(Const.Int64 (opInt64 x1 x2), m, ty) + | Expr.Const(Const.Byte x1, _, ty), Expr.Const(Const.Byte x2, _, _) -> Expr.Const(Const.Byte (opUInt8 x1 x2), m, ty) | Expr.Const(Const.UInt16 x1, _, ty), Expr.Const(Const.UInt16 x2, _, _) -> Expr.Const(Const.UInt16 (opUInt16 x1 x2), m, ty) | Expr.Const(Const.UInt32 x1, _, ty), Expr.Const(Const.UInt32 x2, _, _) -> Expr.Const(Const.UInt32 (opUInt32 x1 x2), m, ty) | Expr.Const(Const.UInt64 x1, _, ty), Expr.Const(Const.UInt64 x2, _, _) -> Expr.Const(Const.UInt64 (opUInt64 x1 x2), m, ty) | _ -> error (Error ( FSComp.SR.tastNotAConstantExpression(), m)) - with :? System.OverflowException -> error (Error ( FSComp.SR.tastConstantExpressionOverflow(), m)) + with :? System.OverflowException -> error (Error ( FSComp.SR.tastConstantExpressionOverflow(), m)) // See also PostTypeCheckSemanticChecks.CheckAttribArgExpr, which must match this precisely let rec EvalAttribArgExpr g x = @@ -8243,19 +8521,19 @@ let rec EvalAttribArgExpr g x = match c with | Const.Bool _ | Const.Int32 _ - | Const.SByte _ - | Const.Int16 _ + | Const.SByte _ + | Const.Int16 _ | Const.Int32 _ | Const.Int64 _ - | Const.Byte _ - | Const.UInt16 _ - | Const.UInt32 _ - | Const.UInt64 _ + | Const.Byte _ + | Const.UInt16 _ + | Const.UInt32 _ + | Const.UInt64 _ | Const.Double _ | Const.Single _ | Const.Char _ | Const.Zero _ - | Const.String _ -> + | Const.String _ -> x | Const.Decimal _ | Const.IntPtr _ | Const.UIntPtr _ | Const.Unit _ -> errorR (Error ( FSComp.SR.tastNotAConstantExpression(), m)) @@ -8279,7 +8557,7 @@ let rec EvalAttribArgExpr g x = #if ALLOW_ARITHMETIC_OPS_IN_LITERAL_EXPRESSIONS_AND_ATTRIBUTE_ARGS EvalArithBinOp (Checked.(+), Checked.(+), Checked.(+), Checked.(+), Checked.(+), Checked.(+), Checked.(+), Checked.(+)) g v1 v2 #else - errorR (Error ( FSComp.SR.tastNotAConstantExpression(), x.Range)); + errorR (Error ( FSComp.SR.tastNotAConstantExpression(), x.Range)) x #endif #if ALLOW_ARITHMETIC_OPS_IN_LITERAL_EXPRESSIONS_AND_ATTRIBUTE_ARGS @@ -8289,34 +8567,34 @@ let rec EvalAttribArgExpr g x = EvalArithBinOp (Checked.(*), Checked.(*), Checked.(*), Checked.(*), Checked.(*), Checked.(*), Checked.(*), Checked.(*)) g (EvalAttribArgExpr g arg1) (EvalAttribArgExpr g arg2) #endif | _ -> - errorR (Error ( FSComp.SR.tastNotAConstantExpression(), x.Range)); + errorR (Error ( FSComp.SR.tastNotAConstantExpression(), x.Range)) x and EvaledAttribExprEquality g e1 e2 = match e1, e2 with | Expr.Const(c1, _, _), Expr.Const(c2, _, _) -> c1 = c2 - | TypeOfExpr g ty1, TypeOfExpr g ty2 -> typeEquiv g ty1 ty2 + | TypeOfExpr g ty1, TypeOfExpr g ty2 -> typeEquiv g ty1 ty2 | TypeDefOfExpr g ty1, TypeDefOfExpr g ty2 -> typeEquiv g ty1 ty2 | _ -> false let (|ConstToILFieldInit|_|) c = match c with - | Const.SByte n -> Some (ILFieldInit.Int8 n) - | Const.Int16 n -> Some (ILFieldInit.Int16 n) - | Const.Int32 n -> Some (ILFieldInit.Int32 n) - | Const.Int64 n -> Some (ILFieldInit.Int64 n) - | Const.Byte n -> Some (ILFieldInit.UInt8 n) - | Const.UInt16 n -> Some (ILFieldInit.UInt16 n) - | Const.UInt32 n -> Some (ILFieldInit.UInt32 n) - | Const.UInt64 n -> Some (ILFieldInit.UInt64 n) - | Const.Bool n -> Some (ILFieldInit.Bool n) - | Const.Char n -> Some (ILFieldInit.Char (uint16 n)) - | Const.Single n -> Some (ILFieldInit.Single n) - | Const.Double n -> Some (ILFieldInit.Double n) - | Const.String s -> Some (ILFieldInit.String s) - | Const.Zero -> Some (ILFieldInit.Null) - | _ -> None + | Const.SByte n -> Some (ILFieldInit.Int8 n) + | Const.Int16 n -> Some (ILFieldInit.Int16 n) + | Const.Int32 n -> Some (ILFieldInit.Int32 n) + | Const.Int64 n -> Some (ILFieldInit.Int64 n) + | Const.Byte n -> Some (ILFieldInit.UInt8 n) + | Const.UInt16 n -> Some (ILFieldInit.UInt16 n) + | Const.UInt32 n -> Some (ILFieldInit.UInt32 n) + | Const.UInt64 n -> Some (ILFieldInit.UInt64 n) + | Const.Bool n -> Some (ILFieldInit.Bool n) + | Const.Char n -> Some (ILFieldInit.Char (uint16 n)) + | Const.Single n -> Some (ILFieldInit.Single n) + | Const.Double n -> Some (ILFieldInit.Double n) + | Const.String s -> Some (ILFieldInit.String s) + | Const.Zero -> Some (ILFieldInit.Null) + | _ -> None let EvalLiteralExprOrAttribArg g x = match x with @@ -8335,7 +8613,7 @@ let EvalLiteralExprOrAttribArg g x = // // This is the right abstraction for viewing member types, but the implementation // below is a little ugly. -let GetTypeOfIntrinsicMemberInCompiledForm g (vref:ValRef) = +let GetTypeOfIntrinsicMemberInCompiledForm g (vref: ValRef) = assert (not vref.IsExtensionMember) let membInfo, topValInfo = checkMemberValRef vref let tps, argInfos, rty, retInfo = GetTypeOfMemberInMemberForm g vref @@ -8346,9 +8624,9 @@ let GetTypeOfIntrinsicMemberInCompiledForm g (vref:ValRef) = let _, origArgInfos, _, _ = GetTopValTypeInFSharpForm g topValInfo vref.Type vref.Range match origArgInfos with | [] -> - errorR(InternalError("value does not have a valid member type", vref.Range)); + errorR(InternalError("value does not have a valid member type", vref.Range)) argInfos - | h::_ -> h ::argInfos + | h::_ -> h :: argInfos else argInfos tps, argInfos, rty, retInfo @@ -8370,7 +8648,7 @@ let rec mkCompiledTuple g isStruct (argtys, args, m) = | [ty8], [arg8] -> match ty8 with // if it's already been nested or ended, pass it through - | TType_app(tn, _) when (isCompiledTupleTyconRef g tn) -> + | TType_app(tn, _) when (isCompiledTupleTyconRef g tn) -> ty8, arg8 | _ -> let ty8enc = TType_app((if isStruct then g.struct_tuple1_tcr else g.ref_tuple1_tcr), [ty8]) @@ -8384,15 +8662,15 @@ let rec mkCompiledTuple g isStruct (argtys, args, m) = let argtysAB = argtysA @ [ty8] (mkCompiledTupleTyconRef g isStruct (List.length argtysAB), argtysAB, argsA @ [v8], m) -let mkILMethodSpecForTupleItem (_g : TcGlobals) (ty:ILType) n = +let mkILMethodSpecForTupleItem (_g: TcGlobals) (ty: ILType) n = mkILNonGenericInstanceMethSpecInTy(ty, (if n < goodTupleFields then "get_Item"+(n+1).ToString() else "get_Rest"), [], mkILTyvarTy (uint16 n)) -let mkILFieldSpecForTupleItem (ty:ILType) n = +let mkILFieldSpecForTupleItem (ty: ILType) n = mkILFieldSpecInTy (ty, (if n < goodTupleFields then "Item"+(n+1).ToString() else "Rest"), mkILTyvarTy (uint16 n)) -let mkGetTupleItemN g m n (ty:ILType) isStruct te retty = +let mkGetTupleItemN g m n (ty: ILType) isStruct te retty = if isStruct then - mkAsmExpr([mkNormalLdfld (mkILFieldSpecForTupleItem ty n) ], [], [te], [retty], m) + mkAsmExpr([mkNormalLdfld (mkILFieldSpecForTupleItem ty n) ], [], [te], [retty], m) else mkAsmExpr([IL.mkNormalCall(mkILMethodSpecForTupleItem g ty n)], [], [te], [retty], m) /// Match an Int32 constant expression @@ -8455,8 +8733,8 @@ let (|CompiledForEachExpr|_|) g expr = let mBody = bodyExpr.Range let mWholeExpr = expr.Range - let spForLoop, mForLoop = match enumeratorBind with SequencePointAtBinding(spStart) -> SequencePointAtForLoop(spStart), spStart | _ -> NoSequencePointAtForLoop, mEnumExpr - let spWhileLoop = match enumeratorBind with SequencePointAtBinding(spStart) -> SequencePointAtWhileLoop(spStart)| _ -> NoSequencePointAtWhileLoop + let spForLoop, mForLoop = match enumeratorBind with SequencePointAtBinding(spStart) -> SequencePointAtForLoop(spStart), spStart | _ -> NoSequencePointAtForLoop, mEnumExpr + let spWhileLoop = match enumeratorBind with SequencePointAtBinding(spStart) -> SequencePointAtWhileLoop(spStart)| _ -> NoSequencePointAtWhileLoop let enumerableTy = tyOfExpr g enumerableExpr Some (enumerableTy, enumerableExpr, elemVar, bodyExpr, (mEnumExpr, mBody, spForLoop, mForLoop, spWhileLoop, mWholeExpr)) @@ -8478,7 +8756,7 @@ let DetectAndOptimizeForExpression g option expr = | _, CompiledInt32RangeForEachExpr g (startExpr, (1 | -1 as step), finishExpr, elemVar, bodyExpr, ranges) -> let (_mEnumExpr, _mBody, spForLoop, _mForLoop, _spWhileLoop, mWholeExpr) = ranges - mkFastForLoop g (spForLoop, mWholeExpr, elemVar, startExpr, (step = 1), finishExpr, bodyExpr) + mkFastForLoop g (spForLoop, mWholeExpr, elemVar, startExpr, (step = 1), finishExpr, bodyExpr) | OptimizeAllForExpressions, CompiledForEachExpr g (enumerableTy, enumerableExpr, elemVar, bodyExpr, ranges) -> @@ -8491,53 +8769,52 @@ let DetectAndOptimizeForExpression g option expr = // let elem = str.[idx] // body elem - let strVar , strExpr = mkCompGenLocal mEnumExpr "str" enumerableTy - let idxVar , idxExpr = mkCompGenLocal elemVar.Range "idx" g.int32_ty + let strVar, strExpr = mkCompGenLocal mEnumExpr "str" enumerableTy + let idxVar, idxExpr = mkCompGenLocal elemVar.Range "idx" g.int32_ty - let lengthExpr = mkGetStringLength g mForLoop strExpr - let charExpr = mkGetStringChar g mForLoop strExpr idxExpr + let lengthExpr = mkGetStringLength g mForLoop strExpr + let charExpr = mkGetStringChar g mForLoop strExpr idxExpr - let startExpr = mkZero g mForLoop - let finishExpr = mkDecr g mForLoop lengthExpr - let loopItemExpr = mkCoerceIfNeeded g elemVar.Type g.char_ty charExpr // for compat reasons, loop item over string is sometimes object, not char - let bodyExpr = mkCompGenLet mForLoop elemVar loopItemExpr bodyExpr - let forExpr = mkFastForLoop g (spForLoop, mWholeExpr, idxVar, startExpr, true, finishExpr, bodyExpr) - let expr = mkCompGenLet mEnumExpr strVar enumerableExpr forExpr + let startExpr = mkZero g mForLoop + let finishExpr = mkDecr g mForLoop lengthExpr + // for compat reasons, loop item over string is sometimes object, not char + let loopItemExpr = mkCoerceIfNeeded g elemVar.Type g.char_ty charExpr + let bodyExpr = mkCompGenLet mForLoop elemVar loopItemExpr bodyExpr + let forExpr = mkFastForLoop g (spForLoop, mWholeExpr, idxVar, startExpr, true, finishExpr, bodyExpr) + let expr = mkCompGenLet mEnumExpr strVar enumerableExpr forExpr expr elif isListTy g enumerableTy then // type is list, optimize for expression as: // let mutable $currentVar = listExpr - // let mutable $nextVar = $tailOrNull + // let mutable $nextVar = $tailOrNull // while $guardExpr do // let i = $headExpr // bodyExpr () - // $current <- $next - // $next <- $tailOrNull + // $current <- $next + // $next <- $tailOrNull - let IndexHead = 0 - let IndexTail = 1 + let IndexHead = 0 + let IndexTail = 1 - let currentVar , currentExpr = mkMutableCompGenLocal mEnumExpr "current" enumerableTy - let nextVar , nextExpr = mkMutableCompGenLocal mEnumExpr "next" enumerableTy - let elemTy = destListTy g enumerableTy + let currentVar, currentExpr = mkMutableCompGenLocal mEnumExpr "current" enumerableTy + let nextVar, nextExpr = mkMutableCompGenLocal mEnumExpr "next" enumerableTy + let elemTy = destListTy g enumerableTy - let guardExpr = mkNonNullTest g mForLoop nextExpr - let headOrDefaultExpr = mkUnionCaseFieldGetUnprovenViaExprAddr (currentExpr, g.cons_ucref, [elemTy], IndexHead, mForLoop) - let tailOrNullExpr = mkUnionCaseFieldGetUnprovenViaExprAddr (currentExpr, g.cons_ucref, [elemTy], IndexTail, mForLoop) - let bodyExpr = + let guardExpr = mkNonNullTest g mForLoop nextExpr + let headOrDefaultExpr = mkUnionCaseFieldGetUnprovenViaExprAddr (currentExpr, g.cons_ucref, [elemTy], IndexHead, mForLoop) + let tailOrNullExpr = mkUnionCaseFieldGetUnprovenViaExprAddr (currentExpr, g.cons_ucref, [elemTy], IndexTail, mForLoop) + let bodyExpr = mkCompGenLet mForLoop elemVar headOrDefaultExpr (mkCompGenSequential mForLoop bodyExpr (mkCompGenSequential mForLoop (mkValSet mForLoop (mkLocalValRef currentVar) nextExpr) - (mkValSet mForLoop (mkLocalValRef nextVar) tailOrNullExpr) - ) - ) + (mkValSet mForLoop (mkLocalValRef nextVar) tailOrNullExpr))) let expr = - // let mutable current = enumerableExpr + // let mutable current = enumerableExpr let spBind = (match spForLoop with SequencePointAtForLoop(spStart) -> SequencePointAtBinding(spStart) | NoSequencePointAtForLoop -> NoSequencePointAtStickyBinding) mkLet spBind mEnumExpr currentVar enumerableExpr // let mutable next = current.TailOrNull @@ -8549,16 +8826,17 @@ let DetectAndOptimizeForExpression g option expr = else expr + | _ -> expr // Used to remove Expr.Link for inner expressions in pattern matches let (|InnerExprPat|) expr = stripExpr expr /// One of the transformations performed by the compiler -/// is to eliminate variables of static type "unit". These is a +/// is to eliminate variables of static type "unit". These is a /// utility function related to this. -let BindUnitVars g (mvs:Val list, paramInfos:ArgReprInfo list, body) = +let BindUnitVars g (mvs: Val list, paramInfos: ArgReprInfo list, body) = match mvs, paramInfos with | [v], [] -> assert isUnitTy g v.Type diff --git a/src/fcs-fable/src/fsharp/TastOps.fsi b/src/fcs-fable/src/fsharp/TastOps.fsi index c719406d5a..6098625122 100755 --- a/src/fcs-fable/src/fsharp/TastOps.fsi +++ b/src/fcs-fable/src/fsharp/TastOps.fsi @@ -1357,7 +1357,7 @@ module DebugPrint = /// A set of function parameters (visitor) for folding over expressions type ExprFolder<'State> = - { exprIntercept : ('State -> Expr -> 'State) -> 'State -> Expr -> 'State option + { exprIntercept : (* recurseF *) ('State -> Expr -> 'State) -> (* noInterceptF *) ('State -> Expr -> 'State) -> 'State -> Expr -> 'State valBindingSiteIntercept : 'State -> bool * Val -> 'State nonRecBindingsIntercept : 'State -> Binding -> 'State recBindingsIntercept : 'State -> Bindings -> 'State @@ -2261,6 +2261,10 @@ val (|LinearMatchExpr|_|) : Expr -> (SequencePointInfoForBinding * range * Decis val rebuildLinearMatchExpr : (SequencePointInfoForBinding * range * DecisionTree * DecisionTreeTarget * Expr * SequencePointInfoForTarget * range * TType) -> Expr +val (|LinearOpExpr|_|) : Expr -> (TOp * TypeInst * Expr list * Expr * range) option + +val rebuildLinearOpExpr : (TOp * TypeInst * Expr list * Expr * range) -> Expr + val mkCoerceIfNeeded : TcGlobals -> tgtTy: TType -> srcTy: TType -> Expr -> Expr val (|InnerExprPat|) : Expr -> Expr diff --git a/src/fcs-fable/src/fsharp/TastPickle.fs b/src/fcs-fable/src/fsharp/TastPickle.fs index 15b45b27aa..b375d22c82 100755 --- a/src/fcs-fable/src/fsharp/TastPickle.fs +++ b/src/fcs-fable/src/fsharp/TastPickle.fs @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -module internal FSharp.Compiler.TastPickle +module internal FSharp.Compiler.TastPickle open System.Collections.Generic open System.Text open Internal.Utilities -open FSharp.Compiler -open FSharp.Compiler.AbstractIL +open FSharp.Compiler +open FSharp.Compiler.AbstractIL open FSharp.Compiler.AbstractIL.IL -open FSharp.Compiler.AbstractIL.Internal +open FSharp.Compiler.AbstractIL.Internal open FSharp.Compiler.AbstractIL.Internal.Library open FSharp.Compiler.AbstractIL.Diagnostics open FSharp.Compiler.Tastops @@ -24,19 +24,19 @@ open FSharp.Compiler.ErrorLogger let verbose = false -let ffailwith fileName str = +let ffailwith fileName str = let msg = FSComp.SR.pickleErrorReadingWritingMetadata(fileName, str) System.Diagnostics.Debug.Assert(false, msg) failwith msg - + // Fixup pickled data w.r.t. a set of CCU thunks indexed by name [] -type PickledDataWithReferences<'rawData> = +type PickledDataWithReferences<'rawData> = { /// The data that uses a collection of CcuThunks internally RawData: 'rawData /// The assumptions that need to be fixed up - FixupThunks: CcuThunk [] } + FixupThunks: CcuThunk [] } member x.Fixup loader = x.FixupThunks |> Array.iter (fun reqd -> reqd.Fixup(loader reqd.AssemblyName)) @@ -44,20 +44,20 @@ type PickledDataWithReferences<'rawData> = /// Like Fixup but loader may return None, in which case there is no fixup. member x.OptionalFixup loader = - x.FixupThunks + x.FixupThunks |> Array.iter(fun reqd-> - match loader reqd.AssemblyName with + match loader reqd.AssemblyName with | Some(loaded) -> reqd.Fixup(loaded) | None -> reqd.FixupOrphaned() ) x.RawData - + //--------------------------------------------------------------------------- // Basic pickle/unpickle state //--------------------------------------------------------------------------- [] -type Table<'T> = +type Table<'T> = { name: string; tbl: Dictionary<'T, int> mutable rows: ResizeArray<'T> @@ -70,7 +70,7 @@ type Table<'T> = tbl.tbl.[x] <- n tbl.rows.Add(x) n - member tbl.FindOrAdd x = + member tbl.FindOrAdd x = #if FABLE_COMPILER let ok, res = tbl.tbl.TryGetValue(x) #else @@ -80,21 +80,21 @@ type Table<'T> = if ok then res else tbl.Add x - static member Create n = + static member Create n = { name = n - tbl = new System.Collections.Generic.Dictionary<_,_>(1000, HashIdentity.Structural) + tbl = new System.Collections.Generic.Dictionary<_, _>(1000, HashIdentity.Structural) rows= new ResizeArray<_>(1000) count=0 } [] -type InputTable<'T> = +type InputTable<'T> = { itbl_name: string itbl_rows: 'T array } let new_itbl n r = { itbl_name=n; itbl_rows=r } [] -type NodeOutTable<'Data,'Node> = +type NodeOutTable<'Data, 'Node> = { NodeStamp : ('Node -> Stamp) NodeName : ('Node -> string) GetRange : ('Node -> range) @@ -104,7 +104,7 @@ type NodeOutTable<'Data,'Node> = member x.Size = x.Table.Size // inline this to get known-type-information through to the HashMultiMap constructor - static member inline Create (stampF,nameF,rangeF,derefF,nm) = + static member inline Create (stampF, nameF, rangeF, derefF, nm) = { NodeStamp = stampF NodeName = nameF GetRange = rangeF @@ -113,17 +113,17 @@ type NodeOutTable<'Data,'Node> = Table = Table<_>.Create nm } [] -type WriterState = - { os: ByteBuffer +type WriterState = + { os: ByteBuffer oscope: CcuThunk - occus: Table - oentities: NodeOutTable - otypars: NodeOutTable - ovals: NodeOutTable - oanoninfos: NodeOutTable - ostrings: Table - opubpaths: Table - onlerefs: Table + occus: Table + oentities: NodeOutTable + otypars: NodeOutTable + ovals: NodeOutTable + oanoninfos: NodeOutTable + ostrings: Table + opubpaths: Table + onlerefs: Table osimpletys: Table oglobals : TcGlobals ofile : string @@ -131,31 +131,31 @@ type WriterState = oInMem : bool } let pfailwith st str = ffailwith st.ofile str - + [] -type NodeInTable<'Data,'Node> = +type NodeInTable<'Data, 'Node> = { LinkNode : ('Node -> 'Data -> unit) IsLinked : ('Node -> bool) - Name : string + Name : string Nodes : 'Node[] } member x.Get n = x.Nodes.[n] member x.Count = x.Nodes.Length - static member Create (mkEmpty, lnk, isLinked, nm, n) = + static member Create (mkEmpty, lnk, isLinked, nm, n) = { LinkNode = lnk; IsLinked = isLinked; Name = nm; Nodes = Array.init n (fun _i -> mkEmpty() ) } [] -type ReaderState = - { is: ByteStream +type ReaderState = + { is: ByteStream iilscope: ILScopeRef - iccus: InputTable - ientities: NodeInTable - itypars: NodeInTable - ivals: NodeInTable - ianoninfos: NodeInTable + iccus: InputTable + ientities: NodeInTable + itypars: NodeInTable + ivals: NodeInTable + ianoninfos: NodeInTable istrings: InputTable - ipubpaths: InputTable - inlerefs: InputTable + ipubpaths: InputTable + inlerefs: InputTable isimpletys: InputTable ifile: string iILModule : ILModuleDef option // the Abstract IL metadata for the DLL being read @@ -166,47 +166,47 @@ let ufailwith st str = ffailwith st.ifile str //--------------------------------------------------------------------------- // Basic pickle/unpickle operations //--------------------------------------------------------------------------- - + type 'T pickler = 'T -> WriterState -> unit let p_byte b st = st.os.EmitIntAsByte b let p_bool b st = p_byte (if b then 1 else 0) st -let prim_p_int32 i st = +let prim_p_int32 i st = p_byte (b0 i) st p_byte (b1 i) st p_byte (b2 i) st p_byte (b3 i) st -/// Compress integers according to the same scheme used by CLR metadata -/// This halves the size of pickled data -let p_int32 n st = - if n >= 0 && n <= 0x7F then +/// Compress integers according to the same scheme used by CLR metadata +/// This halves the size of pickled data +let p_int32 n st = + if n >= 0 && n <= 0x7F then p_byte (b0 n) st - else if n >= 0x80 && n <= 0x3FFF then - p_byte ( (0x80 ||| (n >>> 8))) st - p_byte ( (n &&& 0xFF)) st - else + else if n >= 0x80 && n <= 0x3FFF then + p_byte ( (0x80 ||| (n >>> 8))) st + p_byte ( (n &&& 0xFF)) st + else p_byte 0xFF st prim_p_int32 n st let space = () -let p_space n () st = - for i = 0 to n - 1 do +let p_space n () st = + for i = 0 to n - 1 do p_byte 0 st /// Represents space that was reserved but is now possibly used -let p_used_space1 f st = +let p_used_space1 f st = p_byte 1 st f st // leave more space p_space 1 space st -let p_bytes (s:byte[]) st = +let p_bytes (s:byte[]) st = let len = s.Length p_int32 (len) st st.os.EmitBytes s -let p_prim_string (s:string) st = +let p_prim_string (s:string) st = let bytes = Encoding.UTF8.GetBytes s let len = bytes.Length p_int32 (len) st @@ -218,13 +218,13 @@ let p_uint8 (i:byte) st = p_byte (int i) st let p_int16 (i:int16) st = p_int32 (int32 i) st let p_uint16 (x:uint16) st = p_int32 (int32 x) st let p_uint32 (x:uint32) st = p_int32 (int32 x) st -let p_int64 (i:int64) st = +let p_int64 (i:int64) st = p_int32 (int32 (i &&& 0xFFFFFFFFL)) st p_int32 (int32 (i >>> 32)) st let p_uint64 (x:uint64) st = p_int64 (int64 x) st -let bits_of_float32 (x:float32) = System.BitConverter.ToInt32(System.BitConverter.GetBytes(x),0) +let bits_of_float32 (x:float32) = System.BitConverter.ToInt32(System.BitConverter.GetBytes(x), 0) let bits_of_float (x:float) = System.BitConverter.DoubleToInt64Bits(x) let p_single i st = p_int32 (bits_of_float32 i) st @@ -232,67 +232,67 @@ let p_double i st = p_int64 (bits_of_float i) st let p_ieee64 i st = p_int64 (bits_of_float i) st let p_char i st = p_uint16 (uint16 (int32 i)) st -let inline p_tup2 p1 p2 (a,b) (st:WriterState) = +let inline p_tup2 p1 p2 (a, b) (st:WriterState) = (p1 a st : unit); (p2 b st : unit) -let inline p_tup3 p1 p2 p3 (a,b,c) (st:WriterState) = +let inline p_tup3 p1 p2 p3 (a, b, c) (st:WriterState) = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit) -let inline p_tup4 p1 p2 p3 p4 (a,b,c,d) (st:WriterState) = +let inline p_tup4 p1 p2 p3 p4 (a, b, c, d) (st:WriterState) = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit) -let inline p_tup5 p1 p2 p3 p4 p5 (a,b,c,d,e) (st:WriterState) = +let inline p_tup5 p1 p2 p3 p4 p5 (a, b, c, d, e) (st:WriterState) = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit); (p5 e st : unit) -let inline p_tup6 p1 p2 p3 p4 p5 p6 (a,b,c,d,e,f) (st:WriterState) = +let inline p_tup6 p1 p2 p3 p4 p5 p6 (a, b, c, d, e, f) (st:WriterState) = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit); (p5 e st : unit); (p6 f st : unit) -let inline p_tup7 p1 p2 p3 p4 p5 p6 p7 (a,b,c,d,e,f,x7) (st:WriterState) = +let inline p_tup7 p1 p2 p3 p4 p5 p6 p7 (a, b, c, d, e, f, x7) (st:WriterState) = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit); (p5 e st : unit); (p6 f st : unit); (p7 x7 st : unit) -let inline p_tup8 p1 p2 p3 p4 p5 p6 p7 p8 (a,b,c,d,e,f,x7,x8) (st:WriterState) = +let inline p_tup8 p1 p2 p3 p4 p5 p6 p7 p8 (a, b, c, d, e, f, x7, x8) (st:WriterState) = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit); (p5 e st : unit); (p6 f st : unit); (p7 x7 st : unit); (p8 x8 st : unit) -let inline p_tup9 p1 p2 p3 p4 p5 p6 p7 p8 p9 (a,b,c,d,e,f,x7,x8,x9) (st:WriterState) = +let inline p_tup9 p1 p2 p3 p4 p5 p6 p7 p8 p9 (a, b, c, d, e, f, x7, x8, x9) (st:WriterState) = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit); (p5 e st : unit); (p6 f st : unit); (p7 x7 st : unit); (p8 x8 st : unit); (p9 x9 st : unit) -let inline p_tup10 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 (a,b,c,d,e,f,x7,x8,x9,x10) (st:WriterState) = +let inline p_tup10 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 (a, b, c, d, e, f, x7, x8, x9, x10) (st:WriterState) = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit); (p5 e st : unit); (p6 f st : unit); (p7 x7 st : unit); (p8 x8 st : unit); (p9 x9 st : unit); (p10 x10 st : unit) -let inline p_tup11 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 (a,b,c,d,e,f,x7,x8,x9,x10,x11) (st:WriterState) = +let inline p_tup11 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 (a, b, c, d, e, f, x7, x8, x9, x10, x11) (st:WriterState) = (p1 a st : unit); (p2 b st : unit); (p3 c st : unit); (p4 d st : unit); (p5 e st : unit); (p6 f st : unit); (p7 x7 st : unit); (p8 x8 st : unit); (p9 x9 st : unit); (p10 x10 st : unit); (p11 x11 st : unit) let u_byte st = int (st.is.ReadByte()) type unpickler<'T> = ReaderState -> 'T -let u_bool st = let b = u_byte st in (b = 1) +let u_bool st = let b = u_byte st in (b = 1) -let prim_u_int32 st = +let prim_u_int32 st = let b0 = (u_byte st) let b1 = (u_byte st) let b2 = (u_byte st) let b3 = (u_byte st) b0 ||| (b1 <<< 8) ||| (b2 <<< 16) ||| (b3 <<< 24) -let u_int32 st = +let u_int32 st = let b0 = u_byte st - if b0 <= 0x7F then b0 - else if b0 <= 0xbf then + if b0 <= 0x7F then b0 + else if b0 <= 0xbf then let b0 = b0 &&& 0x7F let b1 = (u_byte st) (b0 <<< 8) ||| b1 - else + else assert(b0 = 0xFF) prim_u_int32 st -let u_bytes st = +let u_bytes st = let n = (u_int32 st) st.is.ReadBytes n -let u_prim_string st = +let u_prim_string st = let len = (u_int32 st) st.is.ReadUtf8String len @@ -302,13 +302,13 @@ let u_uint8 st = byte (u_byte st) let u_int16 st = int16 (u_int32 st) let u_uint16 st = uint16 (u_int32 st) let u_uint32 st = uint32 (u_int32 st) -let u_int64 st = +let u_int64 st = let b1 = (int64 (u_int32 st)) &&& 0xFFFFFFFFL let b2 = int64 (u_int32 st) b1 ||| (b2 <<< 32) let u_uint64 st = uint64 (u_int64 st) -let float32_of_bits (x:int32) = System.BitConverter.ToSingle(System.BitConverter.GetBytes(x),0) +let float32_of_bits (x:int32) = System.BitConverter.ToSingle(System.BitConverter.GetBytes(x), 0) let float_of_bits (x:int64) = System.BitConverter.Int64BitsToDouble(x) let u_single st = float32_of_bits (u_int32 st) @@ -317,101 +317,101 @@ let u_double st = float_of_bits (u_int64 st) let u_ieee64 st = float_of_bits (u_int64 st) let u_char st = char (int32 (u_uint16 st)) -let u_space n st = - for i = 0 to n - 1 do +let u_space n st = + for i = 0 to n - 1 do let b = u_byte st - if b <> 0 then + if b <> 0 then warning(Error(FSComp.SR.pickleUnexpectedNonZero st.ifile, range0)) - + /// Represents space that was reserved but is now possibly used -let u_used_space1 f st = +let u_used_space1 f st = let b = u_byte st - match b with + match b with | 0 -> None - | 1 -> - let x = f st + | 1 -> + let x = f st u_space 1 st Some x - | _ -> + | _ -> warning(Error(FSComp.SR.pickleUnexpectedNonZero st.ifile, range0)); None -let inline u_tup2 p1 p2 (st:ReaderState) = let a = p1 st in let b = p2 st in (a,b) +let inline u_tup2 p1 p2 (st:ReaderState) = let a = p1 st in let b = p2 st in (a, b) let inline u_tup3 p1 p2 p3 (st:ReaderState) = - let a = p1 st in let b = p2 st in let c = p3 st in (a,b,c) + let a = p1 st in let b = p2 st in let c = p3 st in (a, b, c) let inline u_tup4 p1 p2 p3 p4 (st:ReaderState) = - let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in (a,b,c,d) + let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in (a, b, c, d) let inline u_tup5 p1 p2 p3 p4 p5 (st:ReaderState) = - let a = p1 st - let b = p2 st - let c = p3 st - let d = p4 st - let e = p5 st - (a,b,c,d,e) + let a = p1 st + let b = p2 st + let c = p3 st + let d = p4 st + let e = p5 st + (a, b, c, d, e) let inline u_tup6 p1 p2 p3 p4 p5 p6 (st:ReaderState) = - let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in (a,b,c,d,e,f) + let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in (a, b, c, d, e, f) let inline u_tup7 p1 p2 p3 p4 p5 p6 p7 (st:ReaderState) = - let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in (a,b,c,d,e,f,x7) + let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in (a, b, c, d, e, f, x7) let inline u_tup8 p1 p2 p3 p4 p5 p6 p7 p8 (st:ReaderState) = - let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in (a,b,c,d,e,f,x7,x8) + let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in (a, b, c, d, e, f, x7, x8) let inline u_tup9 p1 p2 p3 p4 p5 p6 p7 p8 p9 (st:ReaderState) = - let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in let x9 = p9 st in (a,b,c,d,e,f,x7,x8,x9) + let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in let x9 = p9 st in (a, b, c, d, e, f, x7, x8, x9) let inline u_tup10 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 (st:ReaderState) = let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in - let x9 = p9 st in let x10 = p10 st in (a,b,c,d,e,f,x7,x8,x9,x10) + let x9 = p9 st in let x10 = p10 st in (a, b, c, d, e, f, x7, x8, x9, x10) let inline u_tup11 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 (st:ReaderState) = let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in - let x9 = p9 st in let x10 = p10 st in let x11 = p11 st in (a,b,c,d,e,f,x7,x8,x9,x10,x11) + let x9 = p9 st in let x10 = p10 st in let x11 = p11 st in (a, b, c, d, e, f, x7, x8, x9, x10, x11) let inline u_tup12 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 (st:ReaderState) = let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in let x9 = p9 st in let x10 = p10 st in let x11 = p11 st in let x12 = p12 st in - (a,b,c,d,e,f,x7,x8,x9,x10,x11,x12) + (a, b, c, d, e, f, x7, x8, x9, x10, x11, x12) let inline u_tup13 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 (st:ReaderState) = let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in let x9 = p9 st in let x10 = p10 st in let x11 = p11 st in let x12 = p12 st in let x13 = p13 st in - (a,b,c,d,e,f,x7,x8,x9,x10,x11,x12,x13) + (a, b, c, d, e, f, x7, x8, x9, x10, x11, x12, x13) let inline u_tup14 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 (st:ReaderState) = let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in let x9 = p9 st in let x10 = p10 st in let x11 = p11 st in let x12 = p12 st in let x13 = p13 st in let x14 = p14 st in - (a,b,c,d,e,f,x7,x8,x9,x10,x11,x12,x13,x14) + (a, b, c, d, e, f, x7, x8, x9, x10, x11, x12, x13, x14) let inline u_tup15 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 (st:ReaderState) = let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in let x9 = p9 st in let x10 = p10 st in let x11 = p11 st in let x12 = p12 st in let x13 = p13 st in let x14 = p14 st in let x15 = p15 st in - (a,b,c,d,e,f,x7,x8,x9,x10,x11,x12,x13,x14,x15) + (a, b, c, d, e, f, x7, x8, x9, x10, x11, x12, x13, x14, x15) let inline u_tup16 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 (st:ReaderState) = let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in let x9 = p9 st in let x10 = p10 st in let x11 = p11 st in let x12 = p12 st in let x13 = p13 st in let x14 = p14 st in let x15 = p15 st in let x16 = p16 st in - (a,b,c,d,e,f,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16) + (a, b, c, d, e, f, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16) let inline u_tup17 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 (st:ReaderState) = let a = p1 st in let b = p2 st in let c = p3 st in let d = p4 st in let e = p5 st in let f = p6 st in let x7 = p7 st in let x8 = p8 st in let x9 = p9 st in let x10 = p10 st in let x11 = p11 st in let x12 = p12 st in let x13 = p13 st in let x14 = p14 st in let x15 = p15 st in let x16 = p16 st in let x17 = p17 st in - (a,b,c,d,e,f,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17) + (a, b, c, d, e, f, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17) //--------------------------------------------------------------------------- @@ -421,51 +421,51 @@ let inline u_tup17 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 (s // exception Nope // ctxt is for debugging -let p_osgn_ref (_ctxt:string) (outMap : NodeOutTable<_,_>) x st = +let p_osgn_ref (_ctxt:string) (outMap : NodeOutTable<_, _>) x st = let idx = outMap.Table.FindOrAdd (outMap.NodeStamp x) - //if ((idx = 0) && outMap.Name = "oentities") then - // let msg = - // sprintf "idx %d#%d in table %s has name '%s', was defined at '%s' and is referenced from context %s\n" - // idx (outMap.NodeStamp x) - // outMap.Name (outMap.NodeName x) - // (stringOfRange (outMap.GetRange x)) + //if ((idx = 0) && outMap.Name = "oentities") then + // let msg = + // sprintf "idx %d#%d in table %s has name '%s', was defined at '%s' and is referenced from context %s\n" + // idx (outMap.NodeStamp x) + // outMap.Name (outMap.NodeName x) + // (stringOfRange (outMap.GetRange x)) // _ctxt // System.Diagnostics.Debug.Assert(false, msg ) p_int idx st -let p_osgn_decl (outMap : NodeOutTable<_,_>) p x st = +let p_osgn_decl (outMap : NodeOutTable<_, _>) p x st = let stamp = outMap.NodeStamp x let idx = outMap.Table.FindOrAdd stamp //dprintf "decl %d#%d in table %s has name %s\n" idx (outMap.NodeStamp x) outMap.Name (outMap.NodeName x) - p_tup2 p_int p (idx,outMap.Deref x) st + p_tup2 p_int p (idx, outMap.Deref x) st -let u_osgn_ref (inMap: NodeInTable<_,_>) st = +let u_osgn_ref (inMap: NodeInTable<_, _>) st = let n = u_int st - if n < 0 || n >= inMap.Count then ufailwith st ("u_osgn_ref: out of range, table = "+inMap.Name+", n = "+string n) + if n < 0 || n >= inMap.Count then ufailwith st ("u_osgn_ref: out of range, table = "+inMap.Name+", n = "+string n) inMap.Get n -let u_osgn_decl (inMap: NodeInTable<_,_>) u st = - let idx,data = u_tup2 u_int u st - // dprintf "unpickling osgn %d in table %s\n" idx nm +let u_osgn_decl (inMap: NodeInTable<_, _>) u st = + let idx, data = u_tup2 u_int u st + // dprintf "unpickling osgn %d in table %s\n" idx nm let res = inMap.Get idx inMap.LinkNode res data res //--------------------------------------------------------------------------- -// Pickle/unpickle operations for interned nodes +// Pickle/unpickle operations for interned nodes //--------------------------------------------------------------------------- let encode_uniq (tbl: Table<_>) key = tbl.FindOrAdd key -let lookup_uniq st tbl n = +let lookup_uniq st tbl n = let arr = tbl.itbl_rows - if n < 0 || n >= arr.Length then ufailwith st ("lookup_uniq in table "+tbl.itbl_name+" out of range, n = "+string n+ ", sizeof(tab) = " + string (Array.length arr)) + if n < 0 || n >= arr.Length then ufailwith st ("lookup_uniq in table "+tbl.itbl_name+" out of range, n = "+string n+ ", sizeof(tab) = " + string (Array.length arr)) arr.[n] //--------------------------------------------------------------------------- // Pickle/unpickle arrays and lists. For lists use the same binary format as arrays so we can switch // between internal representations relatively easily -//------------------------------------------------------------------------- - +//------------------------------------------------------------------------- + let p_array_core f (x: 'T[]) st = for i = 0 to x.Length-1 do f x.[i] st @@ -480,7 +480,7 @@ let p_array_ext extraf f (x: 'T[]) st = let n = x.Length let n = if Option.isSome extraf then n ||| 0x80000000 else n p_int n st - match extraf with + match extraf with | None -> () | Some f -> f st p_array_core f x st @@ -489,30 +489,30 @@ let p_list_core f (xs: 'T list) st = for x in xs do f x st -let p_list f x st = +let p_list f x st = p_int (List.length x) st p_list_core f x st -let p_list_ext extraf f x st = +let p_list_ext extraf f x st = let n = List.length x let n = if Option.isSome extraf then n ||| 0x80000000 else n p_int n st - match extraf with + match extraf with | None -> () | Some f -> f st p_list_core f x st -let p_List f (x: 'T list) st = p_list f x st +let p_List f (x: 'T list) st = p_list f x st let p_wrap (f: 'T -> 'U) (p : 'U pickler) : 'T pickler = (fun x st -> p (f x) st) let p_option f x st = - match x with + match x with | None -> p_byte 0 st | Some h -> p_byte 1 st; f h st // Pickle lazy values in such a way that they can, in some future F# compiler version, be read back // lazily. However, a lazy reader is not used in this version because the value may contain the definitions of some -// OSGN nodes. -let private p_lazy_impl p v st = +// OSGN nodes. +let private p_lazy_impl p v st = let fixupPos1 = st.os.Position // We fix these up after prim_p_int32 0 st @@ -548,19 +548,19 @@ let private p_lazy_impl p v st = st.os.FixupInt32 fixupPos6 ovalsIdx1 st.os.FixupInt32 fixupPos7 ovalsIdx2 -let p_lazy p x st = +let p_lazy p x st = p_lazy_impl p (Lazy.force x) st -let p_maybe_lazy p (x: MaybeLazy<_>) st = +let p_maybe_lazy p (x: MaybeLazy<_>) st = p_lazy_impl p x.Value st -let p_hole () = +let p_hole () = let h = ref (None : ('T -> WriterState -> unit) option) - (fun f -> h := Some f),(fun x st -> match !h with Some f -> f x st | None -> pfailwith st "p_hole: unfilled hole") + (fun f -> h := Some f), (fun x st -> match !h with Some f -> f x st | None -> pfailwith st "p_hole: unfilled hole") -let p_hole2 () = +let p_hole2 () = let h = ref (None : ('Arg -> 'T -> WriterState -> unit) option) - (fun f -> h := Some f),(fun arg x st -> match !h with Some f -> f arg x st | None -> pfailwith st "p_hole2: unfilled hole") + (fun f -> h := Some f), (fun arg x st -> match !h with Some f -> f arg x st | None -> pfailwith st "p_hole2: unfilled hole") let u_array_core f n st = let res = Array.zeroCreate n @@ -576,8 +576,8 @@ let u_array f st = // When the marker bit is not set this is identical to u_array, and extraf is not called let u_array_ext extraf f st = let n = u_int st - let extraItem = - if n &&& 0x80000000 = 0x80000000 then + let extraItem = + if n &&& 0x80000000 = 0x80000000 then Some (extraf st) else None @@ -588,13 +588,13 @@ let u_list_core f n st = [ for _ in 1..n do yield f st ] -let u_list f st = +let u_list f st = let n = u_int st u_list_core f n st -let u_list_ext extra f st = +let u_list_ext extra f st = let n = u_int st - let extraItem = - if n &&& 0x80000000 = 0x80000000 then + let extraItem = + if n &&& 0x80000000 = 0x80000000 then Some (extra st) else None @@ -618,19 +618,19 @@ let u_array_revi f st = let n = u_int st let res = Array.zeroCreate n for i = 0 to n-1 do - res.[i] <- f st (n-1-i) + res.[i] <- f st (n-1-i) res -// Mark up default constraints with a priority in reverse order: last gets 0 etc. See comment on TyparConstraint.DefaultsTo +// Mark up default constraints with a priority in reverse order: last gets 0 etc. See comment on TyparConstraint.DefaultsTo let u_list_revi f st = let n = u_int st [ for i = 0 to n-1 do yield f st (n-1-i) ] - - + + let u_wrap (f: 'U -> 'T) (u : 'U unpickler) : 'T unpickler = (fun st -> f (u st)) -let u_option f st = +let u_option f st = let tag = u_byte st match tag with | 0 -> None @@ -639,11 +639,11 @@ let u_option f st = // Boobytrap an OSGN node with a force of a lazy load of a bunch of pickled data #if LAZY_UNPICKLE -let wire (x:osgn<_>) (res:Lazy<_>) = +let wire (x:osgn<_>) (res:Lazy<_>) = x.osgnTripWire <- Some(fun () -> res.Force() |> ignore) #endif -let u_lazy u st = +let u_lazy u st = // Read the number of bytes in the record let len = prim_u_int32 st // fixupPos1 @@ -662,10 +662,10 @@ let u_lazy u st = st.is.Skip len // This is the lazy computation that wil force the unpickling of the term. // This term must contain OSGN definitions of the given nodes. - let res = + let res = lazy (let st = { st with is = st.is.CloneAndSeek idx1 } u st) - /// Force the reading of the data as a "tripwire" for each of the OSGN thunks + /// Force the reading of the data as a "tripwire" for each of the OSGN thunks for i = otyconsIdx1 to otyconsIdx2-1 do wire (st.ientities.Get(i)) res done for i = ovalsIdx1 to ovalsIdx2-1 do wire (st.ivals.Get(i)) res done for i = otyparsIdx1 to otyparsIdx2-1 do wire (st.itypars.Get(i)) res done @@ -673,19 +673,19 @@ let u_lazy u st = #else ignore (len, otyconsIdx1, otyconsIdx2, otyparsIdx1, otyparsIdx2, ovalsIdx1, ovalsIdx2) Lazy.CreateFromValue(u st) -#endif +#endif -let u_hole () = +let u_hole () = let h = ref (None : 'T unpickler option) - (fun f -> h := Some f),(fun st -> match !h with Some f -> f st | None -> ufailwith st "u_hole: unfilled hole") + (fun f -> h := Some f), (fun st -> match !h with Some f -> f st | None -> ufailwith st "u_hole: unfilled hole") //--------------------------------------------------------------------------- -// Pickle/unpickle F# interface data +// Pickle/unpickle F# interface data //--------------------------------------------------------------------------- -// Strings -// A huge number of these occur in pickled F# data, so make them unique +// Strings +// A huge number of these occur in pickled F# data, so make them unique let encode_string stringTab x = encode_uniq stringTab x let decode_string x = x let lookup_string st stringTab x = lookup_uniq st stringTab x @@ -700,25 +700,25 @@ let p_string s st = p_int (encode_string st.ostrings s) st let p_strings = p_list p_string let p_ints = p_list p_int -// CCU References -// A huge number of these occur in pickled F# data, so make them unique -let encode_ccuref ccuTab (x:CcuThunk) = encode_uniq ccuTab x.AssemblyName +// CCU References +// A huge number of these occur in pickled F# data, so make them unique +let encode_ccuref ccuTab (x:CcuThunk) = encode_uniq ccuTab x.AssemblyName let decode_ccuref x = x let lookup_ccuref st ccuTab x = lookup_uniq st ccuTab x -let u_encoded_ccuref st = - match u_byte st with +let u_encoded_ccuref st = + match u_byte st with | 0 -> u_prim_string st | n -> ufailwith st ("u_encoded_ccuref: found number " + string n) let u_ccuref st = lookup_uniq st st.iccus (u_int st) -let p_encoded_ccuref x st = +let p_encoded_ccuref x st = p_byte 0 st // leave a dummy tag to make room for future encodings of ccurefs p_prim_string x st let p_ccuref s st = p_int (encode_ccuref st.occus s) st -// References to public items in this module -// A huge number of these occur in pickled F# data, so make them unique +// References to public items in this module +// A huge number of these occur in pickled F# data, so make them unique let decode_pubpath st stringTab a = PubPath(Array.map (lookup_string st stringTab) a) let lookup_pubpath st pubpathTab x = lookup_uniq st pubpathTab x let u_encoded_pubpath = u_array u_int @@ -728,20 +728,20 @@ let encode_pubpath stringTab pubpathTab (PubPath(a)) = encode_uniq pubpathTab (A let p_encoded_pubpath = p_array p_int let p_pubpath x st = p_int (encode_pubpath st.ostrings st.opubpaths x) st -// References to other modules -// A huge number of these occur in pickled F# data, so make them unique -let decode_nleref st ccuTab stringTab (a,b) = mkNonLocalEntityRef (lookup_ccuref st ccuTab a) (Array.map (lookup_string st stringTab) b) +// References to other modules +// A huge number of these occur in pickled F# data, so make them unique +let decode_nleref st ccuTab stringTab (a, b) = mkNonLocalEntityRef (lookup_ccuref st ccuTab a) (Array.map (lookup_string st stringTab) b) let lookup_nleref st nlerefTab x = lookup_uniq st nlerefTab x let u_encoded_nleref = u_tup2 u_int (u_array u_int) let u_nleref st = lookup_uniq st st.inlerefs (u_int st) -let encode_nleref ccuTab stringTab nlerefTab thisCcu (nleref: NonLocalEntityRef) = +let encode_nleref ccuTab stringTab nlerefTab thisCcu (nleref: NonLocalEntityRef) = #if !NO_EXTENSIONTYPING // Remap references to statically-linked Entity nodes in provider-generated entities to point to the current assembly. // References to these nodes _do_ appear in F# assembly metadata, because they may be public. - let nleref = - match nleref.Deref.PublicPath with - | Some pubpath when nleref.Deref.IsProvidedGeneratedTycon -> + let nleref = + match nleref.Deref.PublicPath with + | Some pubpath when nleref.Deref.IsProvidedGeneratedTycon -> if verbose then dprintfn "remapping pickled reference to provider-generated type %s" nleref.Deref.DisplayNameWithStaticParameters rescopePubPath thisCcu pubpath | _ -> nleref @@ -749,14 +749,14 @@ let encode_nleref ccuTab stringTab nlerefTab thisCcu (nleref: NonLocalEntityRef) ignore thisCcu #endif - let (NonLocalEntityRef(a,b)) = nleref + let (NonLocalEntityRef(a, b)) = nleref encode_uniq nlerefTab (encode_ccuref ccuTab a, Array.map (encode_string stringTab) b) let p_encoded_nleref = p_tup2 p_int (p_array p_int) let p_nleref x st = p_int (encode_nleref st.occus st.ostrings st.onlerefs st.oscope x) st -// Simple types are types like "int", represented as TType(Ref_nonlocal(...,"int"),[]). -// A huge number of these occur in pickled F# data, so make them unique. -let decode_simpletyp st _ccuTab _stringTab nlerefTab a = TType_app(ERefNonLocal (lookup_nleref st nlerefTab a),[]) +// Simple types are types like "int", represented as TType(Ref_nonlocal(..., "int"), []). +// A huge number of these occur in pickled F# data, so make them unique. +let decode_simpletyp st _ccuTab _stringTab nlerefTab a = TType_app(ERefNonLocal (lookup_nleref st nlerefTab a), []) let lookup_simpletyp st simpleTyTab x = lookup_uniq st simpleTyTab x let u_encoded_simpletyp st = u_int st let u_encoded_anoninfo st = u_int st @@ -767,39 +767,39 @@ let p_encoded_anoninfo x st = p_int x st let p_simpletyp x st = p_int (encode_simpletyp st.occus st.ostrings st.onlerefs st.osimpletys st.oscope x) st let pickleObjWithDanglingCcus inMem file g scope p x = - let ccuNameTab,(ntycons, ntypars, nvals, nanoninfos),stringTab,pubpathTab,nlerefTab,simpleTyTab,phase1bytes = - let st1 = - { os = ByteBuffer.Create 100000 + let ccuNameTab, (ntycons, ntypars, nvals, nanoninfos), stringTab, pubpathTab, nlerefTab, simpleTyTab, phase1bytes = + let st1 = + { os = ByteBuffer.Create 100000 oscope=scope - occus= Table<_>.Create "occus" - oentities=NodeOutTable<_,_>.Create((fun (tc:Tycon) -> tc.Stamp),(fun tc -> tc.LogicalName),(fun tc -> tc.Range),(fun osgn -> osgn),"otycons") - otypars=NodeOutTable<_,_>.Create((fun (tp:Typar) -> tp.Stamp),(fun tp -> tp.DisplayName),(fun tp -> tp.Range),(fun osgn -> osgn),"otypars") - ovals=NodeOutTable<_,_>.Create((fun (v:Val) -> v.Stamp),(fun v -> v.LogicalName),(fun v -> v.Range),(fun osgn -> osgn),"ovals") - oanoninfos=NodeOutTable<_,_>.Create((fun (v:AnonRecdTypeInfo) -> v.Stamp),(fun v -> string v.Stamp),(fun _ -> range0),id,"oanoninfos") + occus= Table<_>.Create "occus" + oentities=NodeOutTable<_, _>.Create((fun (tc:Tycon) -> tc.Stamp), (fun tc -> tc.LogicalName), (fun tc -> tc.Range), (fun osgn -> osgn), "otycons") + otypars=NodeOutTable<_, _>.Create((fun (tp:Typar) -> tp.Stamp), (fun tp -> tp.DisplayName), (fun tp -> tp.Range), (fun osgn -> osgn), "otypars") + ovals=NodeOutTable<_, _>.Create((fun (v:Val) -> v.Stamp), (fun v -> v.LogicalName), (fun v -> v.Range), (fun osgn -> osgn), "ovals") + oanoninfos=NodeOutTable<_, _>.Create((fun (v:AnonRecdTypeInfo) -> v.Stamp), (fun v -> string v.Stamp), (fun _ -> range0), id, "oanoninfos") ostrings=Table<_>.Create "ostrings" - onlerefs=Table<_>.Create "onlerefs" - opubpaths=Table<_>.Create "opubpaths" - osimpletys=Table<_>.Create "osimpletys" + onlerefs=Table<_>.Create "onlerefs" + opubpaths=Table<_>.Create "opubpaths" + osimpletys=Table<_>.Create "osimpletys" oglobals=g ofile=file oInMem=inMem } p x st1 - let sizes = + let sizes = st1.oentities.Size, st1.otypars.Size, st1.ovals.Size, - st1.oanoninfos.Size - st1.occus, sizes, st1.ostrings, st1.opubpaths,st1.onlerefs, st1.osimpletys, st1.os.Close() + st1.oanoninfos.Size + st1.occus, sizes, st1.ostrings, st1.opubpaths, st1.onlerefs, st1.osimpletys, st1.os.Close() - let phase2bytes = - let st2 = - { os = ByteBuffer.Create 100000 + let phase2bytes = + let st2 = + { os = ByteBuffer.Create 100000 oscope=scope - occus= Table<_>.Create "occus (fake)" - oentities=NodeOutTable<_,_>.Create((fun (tc:Tycon) -> tc.Stamp),(fun tc -> tc.LogicalName),(fun tc -> tc.Range),(fun osgn -> osgn),"otycons") - otypars=NodeOutTable<_,_>.Create((fun (tp:Typar) -> tp.Stamp),(fun tp -> tp.DisplayName),(fun tp -> tp.Range),(fun osgn -> osgn),"otypars") - ovals=NodeOutTable<_,_>.Create((fun (v:Val) -> v.Stamp),(fun v -> v.LogicalName),(fun v -> v.Range),(fun osgn -> osgn),"ovals") - oanoninfos=NodeOutTable<_,_>.Create((fun (v:AnonRecdTypeInfo) -> v.Stamp),(fun v -> string v.Stamp),(fun _ -> range0),id,"oanoninfos") + occus= Table<_>.Create "occus (fake)" + oentities=NodeOutTable<_, _>.Create((fun (tc:Tycon) -> tc.Stamp), (fun tc -> tc.LogicalName), (fun tc -> tc.Range), (fun osgn -> osgn), "otycons") + otypars=NodeOutTable<_, _>.Create((fun (tp:Typar) -> tp.Stamp), (fun tp -> tp.DisplayName), (fun tp -> tp.Range), (fun osgn -> osgn), "otypars") + ovals=NodeOutTable<_, _>.Create((fun (v:Val) -> v.Stamp), (fun v -> v.LogicalName), (fun v -> v.Range), (fun osgn -> osgn), "ovals") + oanoninfos=NodeOutTable<_, _>.Create((fun (v:AnonRecdTypeInfo) -> v.Stamp), (fun v -> string v.Stamp), (fun _ -> range0), id, "oanoninfos") ostrings=Table<_>.Create "ostrings (fake)" opubpaths=Table<_>.Create "opubpaths (fake)" onlerefs=Table<_>.Create "onlerefs (fake)" @@ -812,42 +812,42 @@ let pickleObjWithDanglingCcus inMem file g scope p x = let z1 = if nanoninfos > 0 then -ntycons-1 else ntycons p_int z1 st2 p_tup2 p_int p_int (ntypars, nvals) st2 - if nanoninfos > 0 then + if nanoninfos > 0 then p_int nanoninfos st2 p_tup5 - (p_array p_encoded_string) - (p_array p_encoded_pubpath) - (p_array p_encoded_nleref) - (p_array p_encoded_simpletyp) - p_bytes - (stringTab.AsArray,pubpathTab.AsArray,nlerefTab.AsArray,simpleTyTab.AsArray,phase1bytes) + (p_array p_encoded_string) + (p_array p_encoded_pubpath) + (p_array p_encoded_nleref) + (p_array p_encoded_simpletyp) + p_bytes + (stringTab.AsArray, pubpathTab.AsArray, nlerefTab.AsArray, simpleTyTab.AsArray, phase1bytes) st2 st2.os.Close() phase2bytes - -let check (ilscope:ILScopeRef) (inMap : NodeInTable<_,_>) = + +let check (ilscope:ILScopeRef) (inMap : NodeInTable<_, _>) = for i = 0 to inMap.Count - 1 do let n = inMap.Get i - if not (inMap.IsLinked n) then + if not (inMap.IsLinked n) then warning(Error(FSComp.SR.pickleMissingDefinition (i, inMap.Name, ilscope.QualifiedName), range0)) - // Note for compiler developers: to get information about which item this index relates to, - // enable the conditional in Pickle.p_osgn_ref to refer to the given index number and recompile - // an identical copy of the source for the DLL containing the data being unpickled. A message will + // Note for compiler developers: to get information about which item this index relates to, + // enable the conditional in Pickle.p_osgn_ref to refer to the given index number and recompile + // an identical copy of the source for the DLL containing the data being unpickled. A message will // then be printed indicating the name of the item. let unpickleObjWithDanglingCcus file ilscope (iILModule:ILModuleDef option) u (phase2bytes:byte[]) = - let st2 = - { is = ByteStream.FromBytes (phase2bytes,0,phase2bytes.Length) + let st2 = + { is = ByteStream.FromBytes (phase2bytes, 0, phase2bytes.Length) iilscope= ilscope - iccus= new_itbl "iccus (fake)" [| |] - ientities= NodeInTable<_,_>.Create (Tycon.NewUnlinked, (fun osgn tg -> osgn.Link tg),(fun osgn -> osgn.IsLinked),"itycons",0) - itypars= NodeInTable<_,_>.Create (Typar.NewUnlinked, (fun osgn tg -> osgn.Link tg),(fun osgn -> osgn.IsLinked),"itypars",0) - ivals = NodeInTable<_,_>.Create (Val.NewUnlinked , (fun osgn tg -> osgn.Link tg),(fun osgn -> osgn.IsLinked),"ivals",0) - ianoninfos=NodeInTable<_,_>.Create(AnonRecdTypeInfo.NewUnlinked, (fun osgn tg -> osgn.Link tg),(fun osgn -> osgn.IsLinked),"ianoninfos",0); - istrings = new_itbl "istrings (fake)" [| |] - inlerefs = new_itbl "inlerefs (fake)" [| |] - ipubpaths = new_itbl "ipubpaths (fake)" [| |] - isimpletys = new_itbl "isimpletys (fake)" [| |] + iccus= new_itbl "iccus (fake)" [| |] + ientities= NodeInTable<_, _>.Create (Tycon.NewUnlinked, (fun osgn tg -> osgn.Link tg), (fun osgn -> osgn.IsLinked), "itycons", 0) + itypars= NodeInTable<_, _>.Create (Typar.NewUnlinked, (fun osgn tg -> osgn.Link tg), (fun osgn -> osgn.IsLinked), "itypars", 0) + ivals = NodeInTable<_, _>.Create (Val.NewUnlinked, (fun osgn tg -> osgn.Link tg), (fun osgn -> osgn.IsLinked), "ivals", 0) + ianoninfos=NodeInTable<_, _>.Create(AnonRecdTypeInfo.NewUnlinked, (fun osgn tg -> osgn.Link tg), (fun osgn -> osgn.IsLinked), "ianoninfos", 0) + istrings = new_itbl "istrings (fake)" [| |] + inlerefs = new_itbl "inlerefs (fake)" [| |] + ipubpaths = new_itbl "ipubpaths (fake)" [| |] + isimpletys = new_itbl "isimpletys (fake)" [| |] ifile=file iILModule = iILModule } let ccuNameTab = u_array u_encoded_ccuref st2 @@ -855,33 +855,33 @@ let unpickleObjWithDanglingCcus file ilscope (iILModule:ILModuleDef option) u (p let ntycons = if z1 < 0 then -z1-1 else z1 let ntypars, nvals = u_tup2 u_int u_int st2 let nanoninfos = if z1 < 0 then u_int st2 else 0 - let stringTab,pubpathTab,nlerefTab,simpleTyTab,phase1bytes = + let stringTab, pubpathTab, nlerefTab, simpleTyTab, phase1bytes = u_tup5 - (u_array u_encoded_string) - (u_array u_encoded_pubpath) - (u_array u_encoded_nleref) - (u_array u_encoded_simpletyp) - u_bytes + (u_array u_encoded_string) + (u_array u_encoded_pubpath) + (u_array u_encoded_nleref) + (u_array u_encoded_simpletyp) + u_bytes st2 let ccuTab = new_itbl "iccus" (Array.map (CcuThunk.CreateDelayed) ccuNameTab) let stringTab = new_itbl "istrings" (Array.map decode_string stringTab) let pubpathTab = new_itbl "ipubpaths" (Array.map (decode_pubpath st2 stringTab) pubpathTab) let nlerefTab = new_itbl "inlerefs" (Array.map (decode_nleref st2 ccuTab stringTab) nlerefTab) let simpletypTab = new_itbl "simpleTyTab" (Array.map (decode_simpletyp st2 ccuTab stringTab nlerefTab) simpleTyTab) - let data = - let st1 = - { is = ByteStream.FromBytes (phase1bytes,0,phase1bytes.Length) - iccus= ccuTab + let data = + let st1 = + { is = ByteStream.FromBytes (phase1bytes, 0, phase1bytes.Length) + iccus= ccuTab iilscope= ilscope - ientities= NodeInTable<_,_>.Create(Tycon.NewUnlinked,(fun osgn tg -> osgn.Link tg),(fun osgn -> osgn.IsLinked),"itycons",ntycons) - itypars= NodeInTable<_,_>.Create(Typar.NewUnlinked,(fun osgn tg -> osgn.Link tg),(fun osgn -> osgn.IsLinked),"itypars",ntypars) - ivals= NodeInTable<_,_>.Create(Val.NewUnlinked ,(fun osgn tg -> osgn.Link tg),(fun osgn -> osgn.IsLinked),"ivals",nvals) - ianoninfos=NodeInTable<_,_>.Create(AnonRecdTypeInfo.NewUnlinked, (fun osgn tg -> osgn.Link tg),(fun osgn -> osgn.IsLinked),"ianoninfos",nanoninfos); + ientities= NodeInTable<_, _>.Create(Tycon.NewUnlinked, (fun osgn tg -> osgn.Link tg), (fun osgn -> osgn.IsLinked), "itycons", ntycons) + itypars= NodeInTable<_, _>.Create(Typar.NewUnlinked, (fun osgn tg -> osgn.Link tg), (fun osgn -> osgn.IsLinked), "itypars", ntypars) + ivals= NodeInTable<_, _>.Create(Val.NewUnlinked, (fun osgn tg -> osgn.Link tg), (fun osgn -> osgn.IsLinked), "ivals", nvals) + ianoninfos=NodeInTable<_, _>.Create(AnonRecdTypeInfo.NewUnlinked, (fun osgn tg -> osgn.Link tg), (fun osgn -> osgn.IsLinked), "ianoninfos", nanoninfos) istrings = stringTab ipubpaths = pubpathTab inlerefs = nlerefTab isimpletys = simpletypTab - ifile=file + ifile=file iILModule = iILModule } let res = u st1 #if !LAZY_UNPICKLE @@ -892,96 +892,96 @@ let unpickleObjWithDanglingCcus file ilscope (iILModule:ILModuleDef option) u (p res {RawData=data; FixupThunks=ccuTab.itbl_rows } - + //========================================================================= // PART II //========================================================================= //--------------------------------------------------------------------------- -// Pickle/unpickle for Abstract IL data, up to IL instructions +// Pickle/unpickle for Abstract IL data, up to IL instructions //--------------------------------------------------------------------------- -let p_ILPublicKey x st = - match x with +let p_ILPublicKey x st = + match x with | PublicKey b -> p_byte 0 st; p_bytes b st | PublicKeyToken b -> p_byte 1 st; p_bytes b st let p_ILVersion x st = p_tup4 p_uint16 p_uint16 p_uint16 p_uint16 x st -let p_ILModuleRef (x:ILModuleRef) st = - p_tup3 p_string p_bool (p_option p_bytes) (x.Name,x.HasMetadata,x.Hash) st +let p_ILModuleRef (x:ILModuleRef) st = + p_tup3 p_string p_bool (p_option p_bytes) (x.Name, x.HasMetadata, x.Hash) st let p_ILAssemblyRef (x:ILAssemblyRef) st = p_byte 0 st // leave a dummy tag to make room for future encodings of assembly refs p_tup6 p_string (p_option p_bytes) (p_option p_ILPublicKey) p_bool (p_option p_ILVersion) (p_option p_string) - ( x.Name,x.Hash,x.PublicKey,x.Retargetable,x.Version,x.Locale) st + ( x.Name, x.Hash, x.PublicKey, x.Retargetable, x.Version, x.Locale) st -let p_ILScopeRef x st = - match x with +let p_ILScopeRef x st = + match x with | ILScopeRef.Local -> p_byte 0 st | ILScopeRef.Module mref -> p_byte 1 st; p_ILModuleRef mref st | ILScopeRef.Assembly aref -> p_byte 2 st; p_ILAssemblyRef aref st -let u_ILPublicKey st = +let u_ILPublicKey st = let tag = u_byte st match tag with - | 0 -> u_bytes st |> PublicKey - | 1 -> u_bytes st |> PublicKeyToken + | 0 -> u_bytes st |> PublicKey + | 1 -> u_bytes st |> PublicKeyToken | _ -> ufailwith st "u_ILPublicKey" let u_ILVersion st = u_tup4 u_uint16 u_uint16 u_uint16 u_uint16 st -let u_ILModuleRef st = - let (a,b,c) = u_tup3 u_string u_bool (u_option u_bytes) st +let u_ILModuleRef st = + let (a, b, c) = u_tup3 u_string u_bool (u_option u_bytes) st ILModuleRef.Create(a, b, c) let u_ILAssemblyRef st = let tag = u_byte st match tag with - | 0 -> - let a,b,c,d,e,f = u_tup6 u_string (u_option u_bytes) (u_option u_ILPublicKey) u_bool (u_option u_ILVersion) (u_option u_string) st + | 0 -> + let a, b, c, d, e, f = u_tup6 u_string (u_option u_bytes) (u_option u_ILPublicKey) u_bool (u_option u_ILVersion) (u_option u_string) st ILAssemblyRef.Create(a, b, c, d, e, f) | _ -> ufailwith st "u_ILAssemblyRef" -// IL scope references are rescoped as they are unpickled. This means -// the pickler accepts IL fragments containing ILScopeRef.Local and adjusts them +// IL scope references are rescoped as they are unpickled. This means +// the pickler accepts IL fragments containing ILScopeRef.Local and adjusts them // to be absolute scope references. -let u_ILScopeRef st = - let res = +let u_ILScopeRef st = + let res = let tag = u_byte st match tag with | 0 -> ILScopeRef.Local - | 1 -> u_ILModuleRef st |> ILScopeRef.Module - | 2 -> u_ILAssemblyRef st |> ILScopeRef.Assembly - | _ -> ufailwith st "u_ILScopeRef" - let res = rescopeILScopeRef st.iilscope res + | 1 -> u_ILModuleRef st |> ILScopeRef.Module + | 2 -> u_ILAssemblyRef st |> ILScopeRef.Assembly + | _ -> ufailwith st "u_ILScopeRef" + let res = rescopeILScopeRef st.iilscope res res -let p_ILHasThis x st = - p_byte (match x with +let p_ILHasThis x st = + p_byte (match x with | ILThisConvention.Instance -> 0 | ILThisConvention.InstanceExplicit -> 1 | ILThisConvention.Static -> 2) st let p_ILArrayShape = p_wrap (fun (ILArrayShape x) -> x) (p_list (p_tup2 (p_option p_int32) (p_option p_int32))) -let rec p_ILType ty st = - match ty with +let rec p_ILType ty st = + match ty with | ILType.Void -> p_byte 0 st - | ILType.Array (shape,ty) -> p_byte 1 st; p_tup2 p_ILArrayShape p_ILType (shape,ty) st + | ILType.Array (shape, ty) -> p_byte 1 st; p_tup2 p_ILArrayShape p_ILType (shape, ty) st | ILType.Value tspec -> p_byte 2 st; p_ILTypeSpec tspec st | ILType.Boxed tspec -> p_byte 3 st; p_ILTypeSpec tspec st | ILType.Ptr ty -> p_byte 4 st; p_ILType ty st | ILType.Byref ty -> p_byte 5 st; p_ILType ty st | ILType.FunctionPointer csig -> p_byte 6 st; p_ILCallSig csig st | ILType.TypeVar n -> p_byte 7 st; p_uint16 n st - | ILType.Modified (req,tref,ty) -> p_byte 8 st; p_tup3 p_bool p_ILTypeRef p_ILType (req,tref,ty) st + | ILType.Modified (req, tref, ty) -> p_byte 8 st; p_tup3 p_bool p_ILTypeRef p_ILType (req, tref, ty) st and p_ILTypes tys = p_list p_ILType tys -and p_ILBasicCallConv x st = - p_byte (match x with +and p_ILBasicCallConv x st = + p_byte (match x with | ILArgConvention.Default -> 0 | ILArgConvention.CDecl -> 1 | ILArgConvention.StdCall -> 2 @@ -989,58 +989,58 @@ and p_ILBasicCallConv x st = | ILArgConvention.FastCall -> 4 | ILArgConvention.VarArg -> 5) st -and p_ILCallConv (Callconv(x,y)) st = p_tup2 p_ILHasThis p_ILBasicCallConv (x,y) st +and p_ILCallConv (Callconv(x, y)) st = p_tup2 p_ILHasThis p_ILBasicCallConv (x, y) st -and p_ILCallSig x st = p_tup3 p_ILCallConv p_ILTypes p_ILType (x.CallingConv,x.ArgTypes,x.ReturnType) st +and p_ILCallSig x st = p_tup3 p_ILCallConv p_ILTypes p_ILType (x.CallingConv, x.ArgTypes, x.ReturnType) st -and p_ILTypeRef (x:ILTypeRef) st = p_tup3 p_ILScopeRef p_strings p_string (x.Scope,x.Enclosing,x.Name) st +and p_ILTypeRef (x:ILTypeRef) st = p_tup3 p_ILScopeRef p_strings p_string (x.Scope, x.Enclosing, x.Name) st -and p_ILTypeSpec (a:ILTypeSpec) st = p_tup2 p_ILTypeRef p_ILTypes (a.TypeRef,a.GenericArgs) st +and p_ILTypeSpec (a:ILTypeSpec) st = p_tup2 p_ILTypeRef p_ILTypes (a.TypeRef, a.GenericArgs) st -let u_ILBasicCallConv st = - match u_byte st with - | 0 -> ILArgConvention.Default - | 1 -> ILArgConvention.CDecl - | 2 -> ILArgConvention.StdCall - | 3 -> ILArgConvention.ThisCall - | 4 -> ILArgConvention.FastCall +let u_ILBasicCallConv st = + match u_byte st with + | 0 -> ILArgConvention.Default + | 1 -> ILArgConvention.CDecl + | 2 -> ILArgConvention.StdCall + | 3 -> ILArgConvention.ThisCall + | 4 -> ILArgConvention.FastCall | 5 -> ILArgConvention.VarArg | _ -> ufailwith st "u_ILBasicCallConv" -let u_ILHasThis st = - match u_byte st with - | 0 -> ILThisConvention.Instance - | 1 -> ILThisConvention.InstanceExplicit - | 2 -> ILThisConvention.Static +let u_ILHasThis st = + match u_byte st with + | 0 -> ILThisConvention.Instance + | 1 -> ILThisConvention.InstanceExplicit + | 2 -> ILThisConvention.Static | _ -> ufailwith st "u_ILHasThis" -let u_ILCallConv st = let a,b = u_tup2 u_ILHasThis u_ILBasicCallConv st in Callconv(a,b) -let u_ILTypeRef st = let a,b,c = u_tup3 u_ILScopeRef u_strings u_string st in ILTypeRef.Create(a, b, c) +let u_ILCallConv st = let a, b = u_tup2 u_ILHasThis u_ILBasicCallConv st in Callconv(a, b) +let u_ILTypeRef st = let a, b, c = u_tup3 u_ILScopeRef u_strings u_string st in ILTypeRef.Create(a, b, c) let u_ILArrayShape = u_wrap (fun x -> ILArrayShape x) (u_list (u_tup2 (u_option u_int32) (u_option u_int32))) -let rec u_ILType st = +let rec u_ILType st = let tag = u_byte st match tag with | 0 -> ILType.Void - | 1 -> u_tup2 u_ILArrayShape u_ILType st |> ILType.Array - | 2 -> u_ILTypeSpec st |> ILType.Value + | 1 -> u_tup2 u_ILArrayShape u_ILType st |> ILType.Array + | 2 -> u_ILTypeSpec st |> ILType.Value | 3 -> u_ILTypeSpec st |> mkILBoxedType - | 4 -> u_ILType st |> ILType.Ptr + | 4 -> u_ILType st |> ILType.Ptr | 5 -> u_ILType st |> ILType.Byref - | 6 -> u_ILCallSig st |> ILType.FunctionPointer + | 6 -> u_ILCallSig st |> ILType.FunctionPointer | 7 -> u_uint16 st |> mkILTyvarTy - | 8 -> u_tup3 u_bool u_ILTypeRef u_ILType st |> ILType.Modified + | 8 -> u_tup3 u_bool u_ILTypeRef u_ILType st |> ILType.Modified | _ -> ufailwith st "u_ILType" and u_ILTypes st = u_list u_ILType st -and u_ILCallSig = u_wrap (fun (a,b,c) -> {CallingConv=a; ArgTypes=b; ReturnType=c}) (u_tup3 u_ILCallConv u_ILTypes u_ILType) +and u_ILCallSig = u_wrap (fun (a, b, c) -> {CallingConv=a; ArgTypes=b; ReturnType=c}) (u_tup3 u_ILCallConv u_ILTypes u_ILType) -and u_ILTypeSpec st = let a,b = u_tup2 u_ILTypeRef u_ILTypes st in ILTypeSpec.Create(a,b) +and u_ILTypeSpec st = let a, b = u_tup2 u_ILTypeRef u_ILTypes st in ILTypeSpec.Create(a, b) -let p_ILMethodRef (x: ILMethodRef) st = p_tup6 p_ILTypeRef p_ILCallConv p_int p_string p_ILTypes p_ILType (x.DeclaringTypeRef,x.CallingConv,x.GenericArity,x.Name,x.ArgTypes,x.ReturnType) st +let p_ILMethodRef (x: ILMethodRef) st = p_tup6 p_ILTypeRef p_ILCallConv p_int p_string p_ILTypes p_ILType (x.DeclaringTypeRef, x.CallingConv, x.GenericArity, x.Name, x.ArgTypes, x.ReturnType) st let p_ILFieldRef (x: ILFieldRef) st = p_tup3 p_ILTypeRef p_string p_ILType (x.DeclaringTypeRef, x.Name, x.Type) st @@ -1048,231 +1048,231 @@ let p_ILMethodSpec (x: ILMethodSpec) st = p_tup3 p_ILMethodRef p_ILType p_ILType let p_ILFieldSpec (x : ILFieldSpec) st = p_tup2 p_ILFieldRef p_ILType (x.FieldRef, x.DeclaringType) st -let p_ILBasicType x st = - p_int (match x with - | DT_R -> 0 - | DT_I1 -> 1 - | DT_U1 -> 2 - | DT_I2 -> 3 - | DT_U2 -> 4 - | DT_I4 -> 5 - | DT_U4 -> 6 - | DT_I8 -> 7 - | DT_U8 -> 8 - | DT_R4 -> 9 - | DT_R8 -> 10 - | DT_I -> 11 - | DT_U -> 12 +let p_ILBasicType x st = + p_int (match x with + | DT_R -> 0 + | DT_I1 -> 1 + | DT_U1 -> 2 + | DT_I2 -> 3 + | DT_U2 -> 4 + | DT_I4 -> 5 + | DT_U4 -> 6 + | DT_I8 -> 7 + | DT_U8 -> 8 + | DT_R4 -> 9 + | DT_R8 -> 10 + | DT_I -> 11 + | DT_U -> 12 | DT_REF -> 13) st let p_ILVolatility x st = p_int (match x with Volatile -> 0 | Nonvolatile -> 1) st let p_ILReadonly x st = p_int (match x with ReadonlyAddress -> 0 | NormalAddress -> 1) st -let u_ILMethodRef st = - let x1,x2,x3,x4,x5,x6 = u_tup6 u_ILTypeRef u_ILCallConv u_int u_string u_ILTypes u_ILType st - ILMethodRef.Create(x1,x2,x4,x3,x5,x6) +let u_ILMethodRef st = + let x1, x2, x3, x4, x5, x6 = u_tup6 u_ILTypeRef u_ILCallConv u_int u_string u_ILTypes u_ILType st + ILMethodRef.Create(x1, x2, x4, x3, x5, x6) -let u_ILFieldRef st = - let x1,x2,x3 = u_tup3 u_ILTypeRef u_string u_ILType st +let u_ILFieldRef st = + let x1, x2, x3 = u_tup3 u_ILTypeRef u_string u_ILType st {DeclaringTypeRef=x1;Name=x2;Type=x3} -let u_ILMethodSpec st = - let x1,x2,x3 = u_tup3 u_ILMethodRef u_ILType u_ILTypes st - ILMethodSpec.Create(x2,x1,x3) +let u_ILMethodSpec st = + let x1, x2, x3 = u_tup3 u_ILMethodRef u_ILType u_ILTypes st + ILMethodSpec.Create(x2, x1, x3) -let u_ILFieldSpec st = - let x1,x2 = u_tup2 u_ILFieldRef u_ILType st +let u_ILFieldSpec st = + let x1, x2 = u_tup2 u_ILFieldRef u_ILType st {FieldRef=x1;DeclaringType=x2} -let u_ILBasicType st = - match u_int st with - | 0 -> DT_R - | 1 -> DT_I1 - | 2 -> DT_U1 - | 3 -> DT_I2 - | 4 -> DT_U2 - | 5 -> DT_I4 - | 6 -> DT_U4 - | 7 -> DT_I8 - | 8 -> DT_U8 - | 9 -> DT_R4 - | 10 -> DT_R8 - | 11 -> DT_I - | 12 -> DT_U - | 13 -> DT_REF +let u_ILBasicType st = + match u_int st with + | 0 -> DT_R + | 1 -> DT_I1 + | 2 -> DT_U1 + | 3 -> DT_I2 + | 4 -> DT_U2 + | 5 -> DT_I4 + | 6 -> DT_U4 + | 7 -> DT_I8 + | 8 -> DT_U8 + | 9 -> DT_R4 + | 10 -> DT_R8 + | 11 -> DT_I + | 12 -> DT_U + | 13 -> DT_REF | _ -> ufailwith st "u_ILBasicType" - + let u_ILVolatility st = (match u_int st with 0 -> Volatile | 1 -> Nonvolatile | _ -> ufailwith st "u_ILVolatility" ) let u_ILReadonly st = (match u_int st with 0 -> ReadonlyAddress | 1 -> NormalAddress | _ -> ufailwith st "u_ILReadonly" ) - -let [] itag_nop = 0 + +let [] itag_nop = 0 let [] itag_ldarg = 1 -let [] itag_ldnull = 2 +let [] itag_ldnull = 2 let [] itag_ilzero = 3 -let [] itag_call = 4 +let [] itag_call = 4 let [] itag_add = 5 -let [] itag_sub = 6 +let [] itag_sub = 6 let [] itag_mul = 7 -let [] itag_div = 8 -let [] itag_div_un = 9 -let [] itag_rem = 10 -let [] itag_rem_un = 11 -let [] itag_and = 12 -let [] itag_or = 13 -let [] itag_xor = 14 -let [] itag_shl = 15 -let [] itag_shr = 16 -let [] itag_shr_un = 17 -let [] itag_neg = 18 -let [] itag_not = 19 +let [] itag_div = 8 +let [] itag_div_un = 9 +let [] itag_rem = 10 +let [] itag_rem_un = 11 +let [] itag_and = 12 +let [] itag_or = 13 +let [] itag_xor = 14 +let [] itag_shl = 15 +let [] itag_shr = 16 +let [] itag_shr_un = 17 +let [] itag_neg = 18 +let [] itag_not = 19 let [] itag_conv = 20 -let [] itag_conv_un = 21 +let [] itag_conv_un = 21 let [] itag_conv_ovf = 22 let [] itag_conv_ovf_un = 23 -let [] itag_callvirt = 24 -let [] itag_ldobj = 25 -let [] itag_ldstr = 26 -let [] itag_castclass = 27 -let [] itag_isinst = 28 -let [] itag_unbox = 29 -let [] itag_throw = 30 -let [] itag_ldfld = 31 -let [] itag_ldflda = 32 -let [] itag_stfld = 33 -let [] itag_ldsfld = 34 -let [] itag_ldsflda = 35 -let [] itag_stsfld = 36 -let [] itag_stobj = 37 -let [] itag_box = 38 -let [] itag_newarr = 39 -let [] itag_ldlen = 40 -let [] itag_ldelema = 41 -let [] itag_ckfinite = 42 -let [] itag_ldtoken = 43 -let [] itag_add_ovf = 44 -let [] itag_add_ovf_un = 45 -let [] itag_mul_ovf = 46 -let [] itag_mul_ovf_un = 47 -let [] itag_sub_ovf = 48 -let [] itag_sub_ovf_un = 49 +let [] itag_callvirt = 24 +let [] itag_ldobj = 25 +let [] itag_ldstr = 26 +let [] itag_castclass = 27 +let [] itag_isinst = 28 +let [] itag_unbox = 29 +let [] itag_throw = 30 +let [] itag_ldfld = 31 +let [] itag_ldflda = 32 +let [] itag_stfld = 33 +let [] itag_ldsfld = 34 +let [] itag_ldsflda = 35 +let [] itag_stsfld = 36 +let [] itag_stobj = 37 +let [] itag_box = 38 +let [] itag_newarr = 39 +let [] itag_ldlen = 40 +let [] itag_ldelema = 41 +let [] itag_ckfinite = 42 +let [] itag_ldtoken = 43 +let [] itag_add_ovf = 44 +let [] itag_add_ovf_un = 45 +let [] itag_mul_ovf = 46 +let [] itag_mul_ovf_un = 47 +let [] itag_sub_ovf = 48 +let [] itag_sub_ovf_un = 49 let [] itag_ceq = 50 let [] itag_cgt = 51 let [] itag_cgt_un = 52 let [] itag_clt = 53 let [] itag_clt_un = 54 -let [] itag_ldvirtftn = 55 -let [] itag_localloc = 56 -let [] itag_rethrow = 57 +let [] itag_ldvirtftn = 55 +let [] itag_localloc = 56 +let [] itag_rethrow = 57 let [] itag_sizeof = 58 let [] itag_ldelem_any = 59 let [] itag_stelem_any = 60 let [] itag_unbox_any = 61 let [] itag_ldlen_multi = 62 let [] itag_initobj = 63 // currently unused, added for forward compat, see https://visualfsharp.codeplex.com/SourceControl/network/forks/jackpappas/fsharpcontrib/contribution/7134 -let [] itag_initblk = 64 // currently unused, added for forward compat -let [] itag_cpobj = 65 // currently unused, added for forward compat -let [] itag_cpblk = 66 // currently unused, added for forward compat +let [] itag_initblk = 64 // currently unused, added for forward compat +let [] itag_cpobj = 65 // currently unused, added for forward compat +let [] itag_cpblk = 66 // currently unused, added for forward compat -let simple_instrs = - [ itag_add, AI_add - itag_add_ovf, AI_add_ovf +let simple_instrs = + [ itag_add, AI_add + itag_add_ovf, AI_add_ovf itag_add_ovf_un, AI_add_ovf_un - itag_and, AI_and - itag_div, AI_div - itag_div_un, AI_div_un - itag_ceq, AI_ceq - itag_cgt, AI_cgt - itag_cgt_un, AI_cgt_un - itag_clt, AI_clt - itag_clt_un, AI_clt_un - itag_mul, AI_mul - itag_mul_ovf, AI_mul_ovf + itag_and, AI_and + itag_div, AI_div + itag_div_un, AI_div_un + itag_ceq, AI_ceq + itag_cgt, AI_cgt + itag_cgt_un, AI_cgt_un + itag_clt, AI_clt + itag_clt_un, AI_clt_un + itag_mul, AI_mul + itag_mul_ovf, AI_mul_ovf itag_mul_ovf_un, AI_mul_ovf_un - itag_rem, AI_rem - itag_rem_un, AI_rem_un - itag_shl, AI_shl - itag_shr, AI_shr - itag_shr_un, AI_shr_un - itag_sub, AI_sub - itag_sub_ovf, AI_sub_ovf - itag_sub_ovf_un, AI_sub_ovf_un - itag_xor, AI_xor - itag_or, AI_or - itag_neg, AI_neg - itag_not, AI_not - itag_ldnull, AI_ldnull - itag_ckfinite, AI_ckfinite - itag_nop, AI_nop - itag_localloc, I_localloc - itag_throw, I_throw - itag_ldlen, I_ldlen - itag_rethrow, I_rethrow - itag_rethrow, I_rethrow - itag_initblk, I_initblk (Aligned,Nonvolatile) - itag_cpblk, I_cpblk (Aligned,Nonvolatile) + itag_rem, AI_rem + itag_rem_un, AI_rem_un + itag_shl, AI_shl + itag_shr, AI_shr + itag_shr_un, AI_shr_un + itag_sub, AI_sub + itag_sub_ovf, AI_sub_ovf + itag_sub_ovf_un, AI_sub_ovf_un + itag_xor, AI_xor + itag_or, AI_or + itag_neg, AI_neg + itag_not, AI_not + itag_ldnull, AI_ldnull + itag_ckfinite, AI_ckfinite + itag_nop, AI_nop + itag_localloc, I_localloc + itag_throw, I_throw + itag_ldlen, I_ldlen + itag_rethrow, I_rethrow + itag_rethrow, I_rethrow + itag_initblk, I_initblk (Aligned, Nonvolatile) + itag_cpblk, I_cpblk (Aligned, Nonvolatile) ] -let encode_table = Dictionary<_,_>(300, HashIdentity.Structural) -let _ = List.iter (fun (icode,i) -> encode_table.[i] <- icode) simple_instrs +let encode_table = Dictionary<_, _>(300, HashIdentity.Structural) +let _ = List.iter (fun (icode, i) -> encode_table.[i] <- icode) simple_instrs let encode_instr si = encode_table.[si] let isNoArgInstr s = encode_table.ContainsKey s -let decoders = - [ itag_ldarg, u_uint16 >> mkLdarg - itag_call, u_ILMethodSpec >> (fun a -> I_call (Normalcall,a,None)) - itag_callvirt, u_ILMethodSpec >> (fun a -> I_callvirt (Normalcall,a,None)) - itag_ldvirtftn, u_ILMethodSpec >> I_ldvirtftn - itag_conv, u_ILBasicType >> (fun a -> (AI_conv a)) - itag_conv_ovf, u_ILBasicType >> (fun a -> (AI_conv_ovf a)) +let decoders = + [ itag_ldarg, u_uint16 >> mkLdarg + itag_call, u_ILMethodSpec >> (fun a -> I_call (Normalcall, a, None)) + itag_callvirt, u_ILMethodSpec >> (fun a -> I_callvirt (Normalcall, a, None)) + itag_ldvirtftn, u_ILMethodSpec >> I_ldvirtftn + itag_conv, u_ILBasicType >> (fun a -> (AI_conv a)) + itag_conv_ovf, u_ILBasicType >> (fun a -> (AI_conv_ovf a)) itag_conv_ovf_un, u_ILBasicType >> (fun a -> (AI_conv_ovf_un a)) - itag_ldfld, u_tup2 u_ILVolatility u_ILFieldSpec >> (fun (b,c) -> I_ldfld (Aligned,b,c)) - itag_ldflda, u_ILFieldSpec >> I_ldflda - itag_ldsfld, u_tup2 u_ILVolatility u_ILFieldSpec >> (fun (a,b) -> I_ldsfld (a,b)) - itag_ldsflda, u_ILFieldSpec >> I_ldsflda - itag_stfld, u_tup2 u_ILVolatility u_ILFieldSpec >> (fun (b,c) -> I_stfld (Aligned,b,c)) - itag_stsfld, u_tup2 u_ILVolatility u_ILFieldSpec >> (fun (a,b) -> I_stsfld (a,b)) - itag_ldtoken, u_ILType >> (fun a -> I_ldtoken (ILToken.ILType a)) - itag_ldstr, u_string >> I_ldstr - itag_box, u_ILType >> I_box - itag_unbox, u_ILType >> I_unbox - itag_unbox_any, u_ILType >> I_unbox_any - itag_newarr, u_tup2 u_ILArrayShape u_ILType >> (fun (a,b) -> I_newarr(a,b)) - itag_stelem_any, u_tup2 u_ILArrayShape u_ILType >> (fun (a,b) -> I_stelem_any(a,b)) - itag_ldelem_any, u_tup2 u_ILArrayShape u_ILType >> (fun (a,b) -> I_ldelem_any(a,b)) - itag_ldelema, u_tup3 u_ILReadonly u_ILArrayShape u_ILType >> (fun (a,b,c) -> I_ldelema(a,false,b,c)) - itag_castclass, u_ILType >> I_castclass - itag_isinst, u_ILType >> I_isinst - itag_ldobj, u_ILType >> (fun c -> I_ldobj (Aligned,Nonvolatile,c)) - itag_stobj, u_ILType >> (fun c -> I_stobj (Aligned,Nonvolatile,c)) - itag_sizeof, u_ILType >> I_sizeof - itag_ldlen_multi, u_tup2 u_int32 u_int32 >> (fun (a,b) -> EI_ldlen_multi (a,b)) - itag_ilzero, u_ILType >> EI_ilzero - itag_ilzero, u_ILType >> EI_ilzero - itag_initobj, u_ILType >> I_initobj - itag_cpobj, u_ILType >> I_cpobj - ] - -let decode_tab = + itag_ldfld, u_tup2 u_ILVolatility u_ILFieldSpec >> (fun (b, c) -> I_ldfld (Aligned, b, c)) + itag_ldflda, u_ILFieldSpec >> I_ldflda + itag_ldsfld, u_tup2 u_ILVolatility u_ILFieldSpec >> (fun (a, b) -> I_ldsfld (a, b)) + itag_ldsflda, u_ILFieldSpec >> I_ldsflda + itag_stfld, u_tup2 u_ILVolatility u_ILFieldSpec >> (fun (b, c) -> I_stfld (Aligned, b, c)) + itag_stsfld, u_tup2 u_ILVolatility u_ILFieldSpec >> (fun (a, b) -> I_stsfld (a, b)) + itag_ldtoken, u_ILType >> (fun a -> I_ldtoken (ILToken.ILType a)) + itag_ldstr, u_string >> I_ldstr + itag_box, u_ILType >> I_box + itag_unbox, u_ILType >> I_unbox + itag_unbox_any, u_ILType >> I_unbox_any + itag_newarr, u_tup2 u_ILArrayShape u_ILType >> (fun (a, b) -> I_newarr(a, b)) + itag_stelem_any, u_tup2 u_ILArrayShape u_ILType >> (fun (a, b) -> I_stelem_any(a, b)) + itag_ldelem_any, u_tup2 u_ILArrayShape u_ILType >> (fun (a, b) -> I_ldelem_any(a, b)) + itag_ldelema, u_tup3 u_ILReadonly u_ILArrayShape u_ILType >> (fun (a, b, c) -> I_ldelema(a, false, b, c)) + itag_castclass, u_ILType >> I_castclass + itag_isinst, u_ILType >> I_isinst + itag_ldobj, u_ILType >> (fun c -> I_ldobj (Aligned, Nonvolatile, c)) + itag_stobj, u_ILType >> (fun c -> I_stobj (Aligned, Nonvolatile, c)) + itag_sizeof, u_ILType >> I_sizeof + itag_ldlen_multi, u_tup2 u_int32 u_int32 >> (fun (a, b) -> EI_ldlen_multi (a, b)) + itag_ilzero, u_ILType >> EI_ilzero + itag_ilzero, u_ILType >> EI_ilzero + itag_initobj, u_ILType >> I_initobj + itag_cpobj, u_ILType >> I_cpobj + ] + +let decode_tab = let tab = Array.init 256 (fun n -> (fun st -> ufailwith st ("no decoder for instruction "+string n))) - let add_instr (icode,f) = tab.[icode] <- f + let add_instr (icode, f) = tab.[icode] <- f List.iter add_instr decoders - List.iter (fun (icode,mk) -> add_instr (icode,(fun _ -> mk))) simple_instrs + List.iter (fun (icode, mk) -> add_instr (icode, (fun _ -> mk))) simple_instrs tab let p_ILInstr x st = match x with | si when isNoArgInstr si -> p_byte (encode_instr si) st - | I_call(Normalcall,mspec,None) -> p_byte itag_call st; p_ILMethodSpec mspec st - | I_callvirt(Normalcall,mspec,None) -> p_byte itag_callvirt st; p_ILMethodSpec mspec st + | I_call(Normalcall, mspec, None) -> p_byte itag_call st; p_ILMethodSpec mspec st + | I_callvirt(Normalcall, mspec, None) -> p_byte itag_callvirt st; p_ILMethodSpec mspec st | I_ldvirtftn mspec -> p_byte itag_ldvirtftn st; p_ILMethodSpec mspec st | I_ldarg x -> p_byte itag_ldarg st; p_uint16 x st | AI_conv a -> p_byte itag_conv st; p_ILBasicType a st | AI_conv_ovf a -> p_byte itag_conv_ovf st; p_ILBasicType a st | AI_conv_ovf_un a -> p_byte itag_conv_ovf_un st; p_ILBasicType a st - | I_ldfld (Aligned,b,c) -> p_byte itag_ldfld st; p_tup2 p_ILVolatility p_ILFieldSpec (b,c) st - | I_ldsfld (a,b) -> p_byte itag_ldsfld st; p_tup2 p_ILVolatility p_ILFieldSpec (a,b) st - | I_stfld (Aligned,b,c) -> p_byte itag_stfld st; p_tup2 p_ILVolatility p_ILFieldSpec (b,c) st - | I_stsfld (a,b) -> p_byte itag_stsfld st; p_tup2 p_ILVolatility p_ILFieldSpec (a,b) st + | I_ldfld (Aligned, b, c) -> p_byte itag_ldfld st; p_tup2 p_ILVolatility p_ILFieldSpec (b, c) st + | I_ldsfld (a, b) -> p_byte itag_ldsfld st; p_tup2 p_ILVolatility p_ILFieldSpec (a, b) st + | I_stfld (Aligned, b, c) -> p_byte itag_stfld st; p_tup2 p_ILVolatility p_ILFieldSpec (b, c) st + | I_stsfld (a, b) -> p_byte itag_stsfld st; p_tup2 p_ILVolatility p_ILFieldSpec (a, b) st | I_ldflda c -> p_byte itag_ldflda st; p_ILFieldSpec c st | I_ldsflda a -> p_byte itag_ldsflda st; p_ILFieldSpec a st | I_ldtoken (ILToken.ILType ty) -> p_byte itag_ldtoken st; p_ILType ty st @@ -1280,26 +1280,26 @@ let p_ILInstr x st = | I_box ty -> p_byte itag_box st; p_ILType ty st | I_unbox ty -> p_byte itag_unbox st; p_ILType ty st | I_unbox_any ty -> p_byte itag_unbox_any st; p_ILType ty st - | I_newarr (a,b) -> p_byte itag_newarr st; p_tup2 p_ILArrayShape p_ILType (a,b) st - | I_stelem_any (a,b) -> p_byte itag_stelem_any st; p_tup2 p_ILArrayShape p_ILType (a,b) st - | I_ldelem_any (a,b) -> p_byte itag_ldelem_any st; p_tup2 p_ILArrayShape p_ILType (a,b) st - | I_ldelema (a,_,b,c) -> p_byte itag_ldelema st; p_tup3 p_ILReadonly p_ILArrayShape p_ILType (a,b,c) st + | I_newarr (a, b) -> p_byte itag_newarr st; p_tup2 p_ILArrayShape p_ILType (a, b) st + | I_stelem_any (a, b) -> p_byte itag_stelem_any st; p_tup2 p_ILArrayShape p_ILType (a, b) st + | I_ldelem_any (a, b) -> p_byte itag_ldelem_any st; p_tup2 p_ILArrayShape p_ILType (a, b) st + | I_ldelema (a, _, b, c) -> p_byte itag_ldelema st; p_tup3 p_ILReadonly p_ILArrayShape p_ILType (a, b, c) st | I_castclass ty -> p_byte itag_castclass st; p_ILType ty st | I_isinst ty -> p_byte itag_isinst st; p_ILType ty st - | I_ldobj (Aligned,Nonvolatile,c) -> p_byte itag_ldobj st; p_ILType c st - | I_stobj (Aligned,Nonvolatile,c) -> p_byte itag_stobj st; p_ILType c st + | I_ldobj (Aligned, Nonvolatile, c) -> p_byte itag_ldobj st; p_ILType c st + | I_stobj (Aligned, Nonvolatile, c) -> p_byte itag_stobj st; p_ILType c st | I_sizeof ty -> p_byte itag_sizeof st; p_ILType ty st - | EI_ldlen_multi (n,m) -> p_byte itag_ldlen_multi st; p_tup2 p_int32 p_int32 (n,m) st + | EI_ldlen_multi (n, m) -> p_byte itag_ldlen_multi st; p_tup2 p_int32 p_int32 (n, m) st | EI_ilzero a -> p_byte itag_ilzero st; p_ILType a st - | I_initobj c -> p_byte itag_initobj st; p_ILType c st - | I_cpobj c -> p_byte itag_cpobj st; p_ILType c st - | i -> pfailwith st (sprintf "the IL instruction '%+A' cannot be emitted" i) + | I_initobj c -> p_byte itag_initobj st; p_ILType c st + | I_cpobj c -> p_byte itag_cpobj st; p_ILType c st + | i -> pfailwith st (sprintf "the IL instruction '%+A' cannot be emitted" i) -let u_ILInstr st = +let u_ILInstr st = let n = u_byte st decode_tab.[n] st - + //--------------------------------------------------------------------------- // Pickle/unpickle for F# types and module signatures @@ -1313,58 +1313,58 @@ let u_Map uk uv = u_wrap Map.ofList (u_list (u_tup2 uk uv)) let u_qlist uv = u_wrap QueueList.ofList (u_list uv) let u_namemap u = u_Map u_string u -let p_pos (x: pos) st = p_tup2 p_int p_int (x.Line,x.Column) st +let p_pos (x: pos) st = p_tup2 p_int p_int (x.Line, x.Column) st let p_range (x: range) st = p_tup3 p_string p_pos p_pos (x.FileName, x.Start, x.End) st let p_dummy_range : range pickler = fun _x _st -> () -let p_ident (x: Ident) st = p_tup2 p_string p_range (x.idText,x.idRange) st +let p_ident (x: Ident) st = p_tup2 p_string p_range (x.idText, x.idRange) st let p_xmldoc (XmlDoc x) st = p_array p_string x st let u_pos st = let a = u_int st in let b = u_int st in mkPos a b let u_range st = let a = u_string st in let b = u_pos st in let c = u_pos st in mkRange a b c -// Most ranges (e.g. on optimization expressions) can be elided from stored data +// Most ranges (e.g. on optimization expressions) can be elided from stored data let u_dummy_range : range unpickler = fun _st -> range0 -let u_ident st = let a = u_string st in let b = u_range st in ident(a,b) +let u_ident st = let a = u_string st in let b = u_range st in ident(a, b) let u_xmldoc st = XmlDoc (u_array u_string st) let p_local_item_ref ctxt tab st = p_osgn_ref ctxt tab st -let p_tcref ctxt (x:EntityRef) st = - match x with +let p_tcref ctxt (x:EntityRef) st = + match x with | ERefLocal x -> p_byte 0 st; p_local_item_ref ctxt st.oentities x st | ERefNonLocal x -> p_byte 1 st; p_nleref x st -let p_ucref (UCRef(a,b)) st = p_tup2 (p_tcref "ucref") p_string (a,b) st -let p_rfref (RFRef(a,b)) st = p_tup2 (p_tcref "rfref") p_string (a,b) st +let p_ucref (UCRef(a, b)) st = p_tup2 (p_tcref "ucref") p_string (a, b) st +let p_rfref (RFRef(a, b)) st = p_tup2 (p_tcref "rfref") p_string (a, b) st let p_tpref x st = p_local_item_ref "typar" st.otypars x st let u_local_item_ref tab st = u_osgn_ref tab st -let u_tcref st = +let u_tcref st = let tag = u_byte st match tag with - | 0 -> u_local_item_ref st.ientities st |> ERefLocal - | 1 -> u_nleref st |> ERefNonLocal + | 0 -> u_local_item_ref st.ientities st |> ERefLocal + | 1 -> u_nleref st |> ERefNonLocal | _ -> ufailwith st "u_item_ref" - -let u_ucref st = let a,b = u_tup2 u_tcref u_string st in UCRef(a,b) -let u_rfref st = let a,b = u_tup2 u_tcref u_string st in RFRef(a,b) +let u_ucref st = let a, b = u_tup2 u_tcref u_string st in UCRef(a, b) + +let u_rfref st = let a, b = u_tup2 u_tcref u_string st in RFRef(a, b) let u_tpref st = u_local_item_ref st.itypars st // forward reference -let fill_p_ty2,p_ty2 = p_hole2() +let fill_p_ty2, p_ty2 = p_hole2() let p_ty = p_ty2 false let p_tys = (p_list p_ty) -let fill_p_attribs,p_attribs = p_hole() +let fill_p_attribs, p_attribs = p_hole() // In F# 4.5, the type of the "this" pointer for structs is considered to be inref for the purposes of checking the implementation // of the struct. However for backwards compat reaons we can't serialize this as the type. -let checkForInRefStructThisArg st ty = +let checkForInRefStructThisArg st ty = let g = st.oglobals let _, tauTy = tryDestForallTy g ty isFunTy g tauTy && isFunTy g (rangeOfFunTy g tauTy) && isInByrefTy g (domainOfFunTy g tauTy) @@ -1375,28 +1375,28 @@ let p_nonlocal_val_ref (nlv:NonLocalValOrMemberRef) st = let pkey = key.PartialKey p_tcref "nlvref" a st p_option p_string pkey.MemberParentMangledName st - p_bool pkey.MemberIsOverride st - p_string pkey.LogicalName st - p_int pkey.TotalArgCount st - let isStructThisArgPos = - match key.TypeForLinkage with + p_bool pkey.MemberIsOverride st + p_string pkey.LogicalName st + p_int pkey.TotalArgCount st + let isStructThisArgPos = + match key.TypeForLinkage with | None -> false | Some ty -> checkForInRefStructThisArg st ty p_option (p_ty2 isStructThisArgPos) key.TypeForLinkage st -let rec p_vref ctxt x st = - match x with +let rec p_vref ctxt x st = + match x with | VRefLocal x -> p_byte 0 st; p_local_item_ref ctxt st.ovals x st | VRefNonLocal x -> p_byte 1 st; p_nonlocal_val_ref x st -let p_vrefs ctxt = p_list (p_vref ctxt) +let p_vrefs ctxt = p_list (p_vref ctxt) -let fill_u_ty,u_ty = u_hole() +let fill_u_ty, u_ty = u_hole() let u_tys = (u_list u_ty) -let fill_u_attribs,u_attribs = u_hole() +let fill_u_attribs, u_attribs = u_hole() -let u_nonlocal_val_ref st : NonLocalValOrMemberRef = - let a = u_tcref st +let u_nonlocal_val_ref st : NonLocalValOrMemberRef = + let a = u_tcref st let b1 = u_option u_string st let b2 = u_bool st let b3 = u_string st @@ -1404,23 +1404,23 @@ let u_nonlocal_val_ref st : NonLocalValOrMemberRef = let d = u_option u_ty st { EnclosingEntity = a ItemKey=ValLinkageFullKey({ MemberParentMangledName=b1; MemberIsOverride=b2;LogicalName=b3; TotalArgCount=c }, d) } - -let u_vref st = + +let u_vref st = let tag = u_byte st match tag with | 0 -> u_local_item_ref st.ivals st |> (fun x -> VRefLocal x) | 1 -> u_nonlocal_val_ref st |> (fun x -> VRefNonLocal x) | _ -> ufailwith st "u_item_ref" - -let u_vrefs = u_list u_vref + +let u_vrefs = u_list u_vref let p_kind x st = p_byte (match x with | TyparKind.Type -> 0 | TyparKind.Measure -> 1) st -let p_member_kind x st = - p_byte (match x with +let p_member_kind x st = + p_byte (match x with | MemberKind.Member -> 0 | MemberKind.PropertyGet -> 1 | MemberKind.PropertySet -> 2 @@ -1434,91 +1434,91 @@ let u_kind st = | 1 -> TyparKind.Measure | _ -> ufailwith st "u_kind" -let u_member_kind st = - match u_byte st with - | 0 -> MemberKind.Member - | 1 -> MemberKind.PropertyGet - | 2 -> MemberKind.PropertySet +let u_member_kind st = + match u_byte st with + | 0 -> MemberKind.Member + | 1 -> MemberKind.PropertyGet + | 2 -> MemberKind.PropertySet | 3 -> MemberKind.Constructor | 4 -> MemberKind.ClassConstructor | _ -> ufailwith st "u_member_kind" -let p_MemberFlags x st = - p_tup6 p_bool p_bool p_bool p_bool p_bool p_member_kind - (x.IsInstance, - false (* _x3UnusedBoolInFormat *), - x.IsDispatchSlot, - x.IsOverrideOrExplicitImpl, - x.IsFinal, +let p_MemberFlags x st = + p_tup6 p_bool p_bool p_bool p_bool p_bool p_member_kind + (x.IsInstance, + false (* _x3UnusedBoolInFormat *), + x.IsDispatchSlot, + x.IsOverrideOrExplicitImpl, + x.IsFinal, x.MemberKind) st -let u_MemberFlags st = - let x2,_x3UnusedBoolInFormat,x4,x5,x6,x7 = u_tup6 u_bool u_bool u_bool u_bool u_bool u_member_kind st +let u_MemberFlags st = + let x2, _x3UnusedBoolInFormat, x4, x5, x6, x7 = u_tup6 u_bool u_bool u_bool u_bool u_bool u_member_kind st { IsInstance=x2 IsDispatchSlot=x4 IsOverrideOrExplicitImpl=x5 IsFinal=x6 MemberKind=x7} -let fill_u_Expr_hole,u_expr_fwd = u_hole() -let fill_p_Expr_hole,p_expr_fwd = p_hole() +let fill_u_Expr_hole, u_expr_fwd = u_hole() +let fill_p_Expr_hole, p_expr_fwd = p_hole() -let p_anonInfo_data (anonInfo: AnonRecdTypeInfo) st = +let p_anonInfo_data (anonInfo: AnonRecdTypeInfo) st = p_tup3 p_ccuref p_bool (p_array p_ident) (anonInfo.Assembly, evalTupInfoIsStruct anonInfo.TupInfo, anonInfo.SortedIds) st -let p_anonInfo x st = +let p_anonInfo x st = p_osgn_decl st.oanoninfos p_anonInfo_data x st -let p_trait_sln sln st = - match sln with - | ILMethSln(a,b,c,d) -> - p_byte 0 st; p_tup4 p_ty (p_option p_ILTypeRef) p_ILMethodRef p_tys (a,b,c,d) st - | FSMethSln(a,b,c) -> - p_byte 1 st; p_tup3 p_ty (p_vref "trait") p_tys (a,b,c) st - | BuiltInSln -> +let p_trait_sln sln st = + match sln with + | ILMethSln(a, b, c, d) -> + p_byte 0 st; p_tup4 p_ty (p_option p_ILTypeRef) p_ILMethodRef p_tys (a, b, c, d) st + | FSMethSln(a, b, c) -> + p_byte 1 st; p_tup3 p_ty (p_vref "trait") p_tys (a, b, c) st + | BuiltInSln -> p_byte 2 st - | ClosedExprSln expr -> + | ClosedExprSln expr -> p_byte 3 st; p_expr_fwd expr st - | FSRecdFieldSln(a,b,c) -> - p_byte 4 st; p_tup3 p_tys p_rfref p_bool (a,b,c) st + | FSRecdFieldSln(a, b, c) -> + p_byte 4 st; p_tup3 p_tys p_rfref p_bool (a, b, c) st | FSAnonRecdFieldSln(a, b, c) -> - p_byte 5 st; p_tup3 p_anonInfo p_tys p_int (a,b,c) st + p_byte 5 st; p_tup3 p_anonInfo p_tys p_int (a, b, c) st -let p_trait (TTrait(a,b,c,d,e,f)) st = - p_tup6 p_tys p_string p_MemberFlags p_tys (p_option p_ty) (p_option p_trait_sln) (a,b,c,d,e,!f) st +let p_trait (TTrait(a, b, c, d, e, f)) st = + p_tup6 p_tys p_string p_MemberFlags p_tys (p_option p_ty) (p_option p_trait_sln) (a, b, c, d, e, !f) st -let u_anonInfo_data st = - let (ccu, info, nms) = u_tup3 u_ccuref u_bool (u_array u_ident) st +let u_anonInfo_data st = + let (ccu, info, nms) = u_tup3 u_ccuref u_bool (u_array u_ident) st AnonRecdTypeInfo.Create (ccu, mkTupInfo info, nms) -let u_anonInfo st = - u_osgn_decl st.ianoninfos u_anonInfo_data st +let u_anonInfo st = + u_osgn_decl st.ianoninfos u_anonInfo_data st // We have to store trait solutions since they can occur in optimization data -let u_trait_sln st = +let u_trait_sln st = let tag = u_byte st - match tag with - | 0 -> - let (a,b,c,d) = u_tup4 u_ty (u_option u_ILTypeRef) u_ILMethodRef u_tys st - ILMethSln(a,b,c,d) - | 1 -> - let (a,b,c) = u_tup3 u_ty u_vref u_tys st - FSMethSln(a,b,c) - | 2 -> + match tag with + | 0 -> + let (a, b, c, d) = u_tup4 u_ty (u_option u_ILTypeRef) u_ILMethodRef u_tys st + ILMethSln(a, b, c, d) + | 1 -> + let (a, b, c) = u_tup3 u_ty u_vref u_tys st + FSMethSln(a, b, c) + | 2 -> BuiltInSln - | 3 -> + | 3 -> ClosedExprSln (u_expr_fwd st) - | 4 -> - let (a,b,c) = u_tup3 u_tys u_rfref u_bool st - FSRecdFieldSln(a,b,c) - | 5 -> - let (a,b,c) = u_tup3 u_anonInfo u_tys u_int st + | 4 -> + let (a, b, c) = u_tup3 u_tys u_rfref u_bool st + FSRecdFieldSln(a, b, c) + | 5 -> + let (a, b, c) = u_tup3 u_anonInfo u_tys u_int st FSAnonRecdFieldSln(a, b, c) - | _ -> ufailwith st "u_trait_sln" + | _ -> ufailwith st "u_trait_sln" -let u_trait st = - let a,b,c,d,e,f = u_tup6 u_tys u_string u_MemberFlags u_tys (u_option u_ty) (u_option u_trait_sln) st - TTrait (a,b,c,d,e,ref f) +let u_trait st = + let a, b, c, d, e, f = u_tup6 u_tys u_string u_MemberFlags u_tys (u_option u_ty) (u_option u_trait_sln) st + TTrait (a, b, c, d, e, ref f) let p_rational q st = p_int32 (GetNumerator q) st; p_int32 (GetDenominator q) st @@ -1531,14 +1531,14 @@ let p_measure_one = p_byte 4 // Pickle a unit-of-measure variable or constructor let p_measure_varcon unt st = - match unt with + match unt with | Measure.Con tcref -> p_measure_con tcref st | Measure.Var v -> p_measure_var v st | _ -> pfailwith st ("p_measure_varcon: expected measure variable or constructor") // Pickle a positive integer power of a unit-of-measure variable or constructor let rec p_measure_pospower unt n st = - if n = 1 + if n = 1 then p_measure_varcon unt st else p_byte 2 st; p_measure_varcon unt st; p_measure_pospower unt (n-1) st @@ -1551,103 +1551,103 @@ let p_measure_intpower unt n st = // Pickle a rational power of a unit-of-measure variable or constructor let rec p_measure_power unt q st = if q = ZeroRational then p_measure_one st - elif GetDenominator q = 1 - then p_measure_intpower unt (GetNumerator q) st + elif GetDenominator q = 1 + then p_measure_intpower unt (GetNumerator q) st else p_byte 5 st; p_measure_varcon unt st; p_rational q st // Pickle a normalized unit-of-measure expression -// Normalized means of the form cv1 ^ q1 * ... * cvn ^ qn +// Normalized means of the form cv1 ^ q1 * ... * cvn ^ qn // where q1, ..., qn are non-zero, and cv1, ..., cvn are distinct unit-of-measure variables or constructors let rec p_normalized_measure unt st = - let unt = stripUnitEqnsAux false unt - match unt with + let unt = stripUnitEqnsAux false unt + match unt with | Measure.Con tcref -> p_measure_con tcref st | Measure.Inv x -> p_byte 1 st; p_normalized_measure x st - | Measure.Prod(x1,x2) -> p_byte 2 st; p_normalized_measure x1 st; p_normalized_measure x2 st + | Measure.Prod(x1, x2) -> p_byte 2 st; p_normalized_measure x1 st; p_normalized_measure x2 st | Measure.Var v -> p_measure_var v st | Measure.One -> p_measure_one st - | Measure.RationalPower(x,q) -> p_measure_power x q st + | Measure.RationalPower(x, q) -> p_measure_power x q st -// By normalizing the unit-of-measure and treating integer powers as a special case, -// we ensure that the pickle format for rational powers of units (byte 5 followed by -// numerator and denominator) is used only when absolutely necessary, maintaining +// By normalizing the unit-of-measure and treating integer powers as a special case, +// we ensure that the pickle format for rational powers of units (byte 5 followed by +// numerator and denominator) is used only when absolutely necessary, maintaining // compatibility of formats with versions prior to F# 4.0. // // See https://github.com/Microsoft/visualfsharp/issues/69 let p_measure_expr unt st = p_normalized_measure (normalizeMeasure st.oglobals unt) st let u_rational st = - let a,b = u_tup2 u_int32 u_int32 st in DivRational (intToRational a) (intToRational b) + let a, b = u_tup2 u_int32 u_int32 st in DivRational (intToRational a) (intToRational b) let rec u_measure_expr st = let tag = u_byte st match tag with | 0 -> let a = u_tcref st in Measure.Con a | 1 -> let a = u_measure_expr st in Measure.Inv a - | 2 -> let a,b = u_tup2 u_measure_expr u_measure_expr st in Measure.Prod (a,b) + | 2 -> let a, b = u_tup2 u_measure_expr u_measure_expr st in Measure.Prod (a, b) | 3 -> let a = u_tpref st in Measure.Var a | 4 -> Measure.One - | 5 -> let a = u_measure_expr st in let b = u_rational st in Measure.RationalPower (a,b) + | 5 -> let a = u_measure_expr st in let b = u_rational st in Measure.RationalPower (a, b) | _ -> ufailwith st "u_measure_expr" -let p_tyar_constraint x st = - match x with - | TyparConstraint.CoercesTo (a,_) -> p_byte 0 st; p_ty a st - | TyparConstraint.MayResolveMember(traitInfo,_) -> p_byte 1 st; p_trait traitInfo st - | TyparConstraint.DefaultsTo(_,rty,_) -> p_byte 2 st; p_ty rty st +let p_tyar_constraint x st = + match x with + | TyparConstraint.CoercesTo (a, _) -> p_byte 0 st; p_ty a st + | TyparConstraint.MayResolveMember(traitInfo, _) -> p_byte 1 st; p_trait traitInfo st + | TyparConstraint.DefaultsTo(_, rty, _) -> p_byte 2 st; p_ty rty st | TyparConstraint.SupportsNull _ -> p_byte 3 st | TyparConstraint.IsNonNullableStruct _ -> p_byte 4 st | TyparConstraint.IsReferenceType _ -> p_byte 5 st | TyparConstraint.RequiresDefaultConstructor _ -> p_byte 6 st - | TyparConstraint.SimpleChoice(tys,_) -> p_byte 7 st; p_tys tys st - | TyparConstraint.IsEnum(ty,_) -> p_byte 8 st; p_ty ty st - | TyparConstraint.IsDelegate(aty,bty,_) -> p_byte 9 st; p_ty aty st; p_ty bty st + | TyparConstraint.SimpleChoice(tys, _) -> p_byte 7 st; p_tys tys st + | TyparConstraint.IsEnum(ty, _) -> p_byte 8 st; p_ty ty st + | TyparConstraint.IsDelegate(aty, bty, _) -> p_byte 9 st; p_ty aty st; p_ty bty st | TyparConstraint.SupportsComparison _ -> p_byte 10 st | TyparConstraint.SupportsEquality _ -> p_byte 11 st | TyparConstraint.IsUnmanaged _ -> p_byte 12 st let p_tyar_constraints = (p_list p_tyar_constraint) -let u_tyar_constraint st = +let u_tyar_constraint st = let tag = u_byte st match tag with - | 0 -> u_ty st |> (fun a _ -> TyparConstraint.CoercesTo (a,range0) ) - | 1 -> u_trait st |> (fun a _ -> TyparConstraint.MayResolveMember(a,range0)) - | 2 -> u_ty st |> (fun a ridx -> TyparConstraint.DefaultsTo(ridx,a,range0)) + | 0 -> u_ty st |> (fun a _ -> TyparConstraint.CoercesTo (a, range0) ) + | 1 -> u_trait st |> (fun a _ -> TyparConstraint.MayResolveMember(a, range0)) + | 2 -> u_ty st |> (fun a ridx -> TyparConstraint.DefaultsTo(ridx, a, range0)) | 3 -> (fun _ -> TyparConstraint.SupportsNull range0) | 4 -> (fun _ -> TyparConstraint.IsNonNullableStruct range0) | 5 -> (fun _ -> TyparConstraint.IsReferenceType range0) | 6 -> (fun _ -> TyparConstraint.RequiresDefaultConstructor range0) - | 7 -> u_tys st |> (fun a _ -> TyparConstraint.SimpleChoice(a,range0)) - | 8 -> u_ty st |> (fun a _ -> TyparConstraint.IsEnum(a,range0)) - | 9 -> u_tup2 u_ty u_ty st |> (fun (a,b) _ -> TyparConstraint.IsDelegate(a,b,range0)) + | 7 -> u_tys st |> (fun a _ -> TyparConstraint.SimpleChoice(a, range0)) + | 8 -> u_ty st |> (fun a _ -> TyparConstraint.IsEnum(a, range0)) + | 9 -> u_tup2 u_ty u_ty st |> (fun (a, b) _ -> TyparConstraint.IsDelegate(a, b, range0)) | 10 -> (fun _ -> TyparConstraint.SupportsComparison range0) | 11 -> (fun _ -> TyparConstraint.SupportsEquality range0) | 12 -> (fun _ -> TyparConstraint.IsUnmanaged range0) - | _ -> ufailwith st "u_tyar_constraint" + | _ -> ufailwith st "u_tyar_constraint" let u_tyar_constraints = (u_list_revi u_tyar_constraint) -let p_tyar_spec_data (x:Typar) st = +let p_tyar_spec_data (x:Typar) st = p_tup5 - p_ident + p_ident p_attribs p_int64 p_tyar_constraints p_xmldoc - (x.typar_id,x.Attribs,int64 x.typar_flags.PickledBits,x.Constraints,x.XmlDoc) st + (x.typar_id, x.Attribs, int64 x.typar_flags.PickledBits, x.Constraints, x.XmlDoc) st -let p_tyar_spec (x:Typar) st = +let p_tyar_spec (x:Typar) st = //Disabled, workaround for bug 2721: if x.Rigidity <> TyparRigidity.Rigid then warning(Error(sprintf "p_tyar_spec: typar#%d is not rigid" x.Stamp, x.Range)) - if x.IsFromError then warning(Error((0,"p_tyar_spec: from error"), x.Range)) + if x.IsFromError then warning(Error((0, "p_tyar_spec: from error"), x.Range)) p_osgn_decl st.otypars p_tyar_spec_data x st let p_tyar_specs = (p_list p_tyar_spec) -let u_tyar_spec_data st = - let a,c,d,e,g = u_tup5 u_ident u_attribs u_int64 u_tyar_constraints u_xmldoc st - { typar_id=a +let u_tyar_spec_data st = + let a, c, d, e, g = u_tup5 u_ident u_attribs u_int64 u_tyar_constraints u_xmldoc st + { typar_id=a typar_stamp=newStamp() typar_flags=TyparFlags(int32 d) typar_solution=None @@ -1657,8 +1657,8 @@ let u_tyar_spec_data st = | XmlDoc [||], [], [] -> None | _ -> Some { typar_il_name = None; typar_xmldoc = g; typar_constraints = e; typar_attribs = c } } -let u_tyar_spec st = - u_osgn_decl st.itypars u_tyar_spec_data st +let u_tyar_spec st = + u_osgn_decl st.itypars u_tyar_spec_data st let u_tyar_specs = (u_list u_tyar_spec) @@ -1666,36 +1666,36 @@ let _ = fill_p_ty2 (fun isStructThisArgPos ty st -> let ty = stripTyparEqns ty // See comment on 'checkForInRefStructThisArg' - let ty = - if isInByrefTy st.oglobals ty && isStructThisArgPos then - // Convert the inref to a byref - mkByrefTy st.oglobals (destByrefTy st.oglobals ty) + let ty = + if isInByrefTy st.oglobals ty && isStructThisArgPos then + // Convert the inref to a byref + mkByrefTy st.oglobals (destByrefTy st.oglobals ty) else ty - match ty with - | TType_tuple (tupInfo,l) -> - if evalTupInfoIsStruct tupInfo then + match ty with + | TType_tuple (tupInfo, l) -> + if evalTupInfoIsStruct tupInfo then p_byte 8 st; p_tys l st else p_byte 0 st; p_tys l st - | TType_app(ERefNonLocal nleref,[]) -> p_byte 1 st; p_simpletyp nleref st - | TType_app (tc,tinst) -> p_byte 2 st; p_tup2 (p_tcref "typ") p_tys (tc,tinst) st - | TType_fun (d,r) -> + | TType_app(ERefNonLocal nleref, []) -> p_byte 1 st; p_simpletyp nleref st + | TType_app (tc, tinst) -> p_byte 2 st; p_tup2 (p_tcref "typ") p_tys (tc, tinst) st + | TType_fun (d, r) -> p_byte 3 st // Note, the "this" argument may be found in the domain position of a function type, so propagate the isStructThisArgPos value p_ty2 isStructThisArgPos d st p_ty r st | TType_var r -> p_byte 4 st; p_tpref r st - | TType_forall (tps,r) -> + | TType_forall (tps, r) -> p_byte 5 st p_tyar_specs tps st // Note, the "this" argument may be found in the body of a generic forall type, so propagate the isStructThisArgPos value p_ty2 isStructThisArgPos r st | TType_measure unt -> p_byte 6 st; p_measure_expr unt st - | TType_ucase (uc,tinst) -> p_byte 7 st; p_tup2 p_ucref p_tys (uc,tinst) st + | TType_ucase (uc, tinst) -> p_byte 7 st; p_tup2 p_ucref p_tys (uc, tinst) st // p_byte 8 taken by TType_tuple above - | TType_anon (anonInfo, l) -> + | TType_anon (anonInfo, l) -> p_byte 9 st p_anonInfo anonInfo st p_tys l st) @@ -1704,90 +1704,90 @@ let _ = fill_u_ty (fun st -> let tag = u_byte st match tag with | 0 -> let l = u_tys st in TType_tuple (tupInfoRef, l) - | 1 -> u_simpletyp st - | 2 -> let tc = u_tcref st in let tinst = u_tys st in TType_app (tc,tinst) - | 3 -> let d = u_ty st in let r = u_ty st in TType_fun (d,r) + | 1 -> u_simpletyp st + | 2 -> let tc = u_tcref st in let tinst = u_tys st in TType_app (tc, tinst) + | 3 -> let d = u_ty st in let r = u_ty st in TType_fun (d, r) | 4 -> let r = u_tpref st in r.AsType - | 5 -> let tps = u_tyar_specs st in let r = u_ty st in TType_forall (tps,r) + | 5 -> let tps = u_tyar_specs st in let r = u_ty st in TType_forall (tps, r) | 6 -> let unt = u_measure_expr st in TType_measure unt - | 7 -> let uc = u_ucref st in let tinst = u_tys st in TType_ucase (uc,tinst) + | 7 -> let uc = u_ucref st in let tinst = u_tys st in TType_ucase (uc, tinst) | 8 -> let l = u_tys st in TType_tuple (tupInfoStruct, l) | 9 -> let anonInfo = u_anonInfo st in let l = u_tys st in TType_anon (anonInfo, l) | _ -> ufailwith st "u_typ") - - -let fill_p_binds,p_binds = p_hole() -let fill_p_targets,p_targets = p_hole() -let fill_p_Exprs,p_Exprs = p_hole() -let fill_p_constraints,p_constraints = p_hole() -let fill_p_Vals,p_Vals = p_hole() - -let fill_u_binds,u_binds = u_hole() -let fill_u_targets,u_targets = u_hole() -let fill_u_Exprs,u_Exprs = u_hole() -let fill_u_constraints,u_constraints = u_hole() -let fill_u_Vals,u_Vals = u_hole() - -let p_ArgReprInfo (x:ArgReprInfo) st = - p_attribs x.Attribs st + + +let fill_p_binds, p_binds = p_hole() +let fill_p_targets, p_targets = p_hole() +let fill_p_Exprs, p_Exprs = p_hole() +let fill_p_constraints, p_constraints = p_hole() +let fill_p_Vals, p_Vals = p_hole() + +let fill_u_binds, u_binds = u_hole() +let fill_u_targets, u_targets = u_hole() +let fill_u_Exprs, u_Exprs = u_hole() +let fill_u_constraints, u_constraints = u_hole() +let fill_u_Vals, u_Vals = u_hole() + +let p_ArgReprInfo (x:ArgReprInfo) st = + p_attribs x.Attribs st p_option p_ident x.Name st -let p_TyparReprInfo (TyparReprInfo(a,b)) st = - p_ident a st +let p_TyparReprInfo (TyparReprInfo(a, b)) st = + p_ident a st p_kind b st -let p_ValReprInfo (ValReprInfo (a,args,ret)) st = - p_list p_TyparReprInfo a st - p_list (p_list p_ArgReprInfo) args st +let p_ValReprInfo (ValReprInfo (a, args, ret)) st = + p_list p_TyparReprInfo a st + p_list (p_list p_ArgReprInfo) args st p_ArgReprInfo ret st -let u_ArgReprInfo st = - let a = u_attribs st - let b = u_option u_ident st - match a,b with - | [],None -> ValReprInfo.unnamedTopArg1 - | _ -> { Attribs = a; Name = b } +let u_ArgReprInfo st = + let a = u_attribs st + let b = u_option u_ident st + match a, b with + | [], None -> ValReprInfo.unnamedTopArg1 + | _ -> { Attribs = a; Name = b } -let u_TyparReprInfo st = +let u_TyparReprInfo st = let a = u_ident st - let b = u_kind st - TyparReprInfo(a,b) + let b = u_kind st + TyparReprInfo(a, b) -let u_ValReprInfo st = +let u_ValReprInfo st = let a = u_list u_TyparReprInfo st let b = u_list (u_list u_ArgReprInfo) st let c = u_ArgReprInfo st - ValReprInfo (a,b,c) + ValReprInfo (a, b, c) -let p_ranges x st = +let p_ranges x st = p_option (p_tup2 p_range p_range) x st -let p_istype x st = - match x with +let p_istype x st = + match x with | FSharpModuleWithSuffix -> p_byte 0 st | ModuleOrType -> p_byte 1 st | Namespace -> p_byte 2 st -let p_cpath (CompPath(a,b)) st = - p_tup2 p_ILScopeRef (p_list (p_tup2 p_string p_istype)) (a,b) st +let p_cpath (CompPath(a, b)) st = + p_tup2 p_ILScopeRef (p_list (p_tup2 p_string p_istype)) (a, b) st let u_ranges st = u_option (u_tup2 u_range u_range) st -let u_istype st = +let u_istype st = let tag = u_byte st match tag with - | 0 -> FSharpModuleWithSuffix - | 1 -> ModuleOrType - | 2 -> Namespace + | 0 -> FSharpModuleWithSuffix + | 1 -> ModuleOrType + | 2 -> Namespace | _ -> ufailwith st "u_istype" -let u_cpath st = let a,b = u_tup2 u_ILScopeRef (u_list (u_tup2 u_string u_istype)) st in (CompPath(a,b)) +let u_cpath st = let a, b = u_tup2 u_ILScopeRef (u_list (u_tup2 u_string u_istype)) st in (CompPath(a, b)) let rec dummy x = x -and p_tycon_repr x st = +and p_tycon_repr x st = // The leading "p_byte 1" and "p_byte 0" come from the F# 2.0 format, which used an option value at this point. - match x with + match x with | TRecdRepr fs -> p_byte 1 st; p_byte 0 st; p_rfield_table fs st; false | TUnionRepr x -> p_byte 1 st; p_byte 1 st; p_array p_unioncase_spec (x.CasesTable.CasesByIndex) st; false | TAsmRepr ilty -> p_byte 1 st; p_byte 2 st; p_ILType ilty st; false @@ -1795,24 +1795,24 @@ and p_tycon_repr x st = | TMeasureableRepr ty -> p_byte 1 st; p_byte 4 st; p_ty ty st; false | TNoRepr -> p_byte 0 st; false #if !NO_EXTENSIONTYPING - | TProvidedTypeExtensionPoint info -> - if info.IsErased then + | TProvidedTypeExtensionPoint info -> + if info.IsErased then // Pickle erased type definitions as a NoRepr p_byte 0 st; false else // Pickle generated type definitions as a TAsmRepr - p_byte 1 st; p_byte 2 st; p_ILType (mkILBoxedType(ILTypeSpec.Create(ExtensionTyping.GetILTypeRefOfProvidedType(info.ProvidedType ,range0),[]))) st; true + p_byte 1 st; p_byte 2 st; p_ILType (mkILBoxedType(ILTypeSpec.Create(ExtensionTyping.GetILTypeRefOfProvidedType(info.ProvidedType, range0), []))) st; true | TProvidedNamespaceExtensionPoint _ -> p_byte 0 st; false #endif - | TILObjectRepr (TILObjectReprData (_,_,td)) -> error (Failure("Unexpected IL type definition"+td.Name)) + | TILObjectRepr (TILObjectReprData (_, _, td)) -> error (Failure("Unexpected IL type definition"+td.Name)) -and p_tycon_objmodel_data x st = - p_tup3 p_tycon_objmodel_kind (p_vrefs "vslots") p_rfield_table +and p_tycon_objmodel_data x st = + p_tup3 p_tycon_objmodel_kind (p_vrefs "vslots") p_rfield_table (x.fsobjmodel_kind, x.fsobjmodel_vslots, x.fsobjmodel_rfields) st and p_attribs_ext f x st = p_list_ext f p_attrib x st -and p_unioncase_spec x st = +and p_unioncase_spec x st = p_rfield_table x.FieldTable st p_ty x.ReturnType st p_string x.CompiledName st @@ -1825,7 +1825,7 @@ and p_unioncase_spec x st = and p_exnc_spec_data x st = p_entity_spec_data x st and p_exnc_repr x st = - match x with + match x with | TExnAbbrevRepr x -> p_byte 0 st; (p_tcref "exn abbrev") x st | TExnAsmRepr x -> p_byte 1 st; p_ILTypeRef x st | TExnFresh x -> p_byte 2 st; p_rfield_table x st @@ -1835,24 +1835,24 @@ and p_exnc_spec x st = p_entity_spec x st and p_access (TAccess n) st = p_list p_cpath n st -and p_recdfield_spec x st = +and p_recdfield_spec x st = p_bool x.rfield_mutable st p_bool x.rfield_volatile st p_ty x.rfield_type st p_bool x.rfield_static st p_bool x.rfield_secret st p_option p_const x.rfield_const st - p_ident x.rfield_id st + p_ident x.rfield_id st p_attribs_ext (if st.oInMem then Some (p_xmldoc x.XmlDoc) else None) x.rfield_pattribs st p_attribs x.rfield_fattribs st p_string x.rfield_xmldocsig st p_access x.rfield_access st -and p_rfield_table x st = +and p_rfield_table x st = p_array p_recdfield_spec (x.FieldsByIndex) st -and p_entity_spec_data (x:Entity) st = - p_tyar_specs (x.entity_typars.Force(x.entity_range)) st +and p_entity_spec_data (x:Entity) st = + p_tyar_specs (x.entity_typars.Force(x.entity_range)) st p_string x.entity_logical_name st p_option p_string x.EntityCompiledName st p_range x.entity_range st @@ -1875,29 +1875,29 @@ and p_entity_spec_data (x:Entity) st = p_space 1 () st -and p_tcaug p st = +and p_tcaug p st = p_tup9 (p_option (p_tup2 (p_vref "compare_obj") (p_vref "compare"))) (p_option (p_vref "compare_withc")) (p_option (p_tup3 (p_vref "hash_obj") (p_vref "hash_withc") (p_vref "equals_withc"))) (p_option (p_tup2 (p_vref "hash") (p_vref "equals"))) - (p_list (p_tup2 p_string (p_vref "adhoc"))) + (p_list (p_tup2 p_string (p_vref "adhoc"))) (p_list (p_tup3 p_ty p_bool p_dummy_range)) (p_option p_ty) p_bool (p_space 1) - (p.tcaug_compare, - p.tcaug_compare_withc, - p.tcaug_hash_and_equals_withc, - p.tcaug_equals, - (p.tcaug_adhoc_list - |> ResizeArray.toList + (p.tcaug_compare, + p.tcaug_compare_withc, + p.tcaug_hash_and_equals_withc, + p.tcaug_equals, + (p.tcaug_adhoc_list + |> ResizeArray.toList // Explicit impls of interfaces only get kept in the adhoc list // in order to get check the well-formedness of an interface. - // Keeping them across assembly boundaries is not valid, because relinking their ValRefs - // does not work correctly (they may get incorrectly relinked to a default member) - |> List.filter (fun (isExplicitImpl,_) -> not isExplicitImpl) - |> List.map (fun (_,vref) -> vref.LogicalName, vref)), + // Keeping them across assembly boundaries is not valid, because relinking their ValRefs + // does not work correctly (they may get incorrectly relinked to a default member) + |> List.filter (fun (isExplicitImpl, _) -> not isExplicitImpl) + |> List.map (fun (_, vref) -> vref.LogicalName, vref)), p.tcaug_interfaces, p.tcaug_super, p.tcaug_abstract, @@ -1905,53 +1905,53 @@ and p_tcaug p st = and p_entity_spec x st = p_osgn_decl st.oentities p_entity_spec_data x st -and p_parentref x st = - match x with +and p_parentref x st = + match x with | ParentNone -> p_byte 0 st | Parent x -> p_byte 1 st; p_tcref "parent tycon" x st -and p_attribkind x st = - match x with +and p_attribkind x st = + match x with | ILAttrib x -> p_byte 0 st; p_ILMethodRef x st | FSAttrib x -> p_byte 1 st; p_vref "attrib" x st -and p_attrib (Attrib (a,b,c,d,e,_targets,f)) st = // AttributeTargets are not preserved - p_tup6 (p_tcref "attrib") p_attribkind (p_list p_attrib_expr) (p_list p_attrib_arg) p_bool p_dummy_range (a,b,c,d,e,f) st +and p_attrib (Attrib (a, b, c, d, e, _targets, f)) st = // AttributeTargets are not preserved + p_tup6 (p_tcref "attrib") p_attribkind (p_list p_attrib_expr) (p_list p_attrib_arg) p_bool p_dummy_range (a, b, c, d, e, f) st -and p_attrib_expr (AttribExpr(e1,e2)) st = - p_tup2 p_expr p_expr (e1,e2) st +and p_attrib_expr (AttribExpr(e1, e2)) st = + p_tup2 p_expr p_expr (e1, e2) st -and p_attrib_arg (AttribNamedArg(a,b,c,d)) st = - p_tup4 p_string p_ty p_bool p_attrib_expr (a,b,c,d) st +and p_attrib_arg (AttribNamedArg(a, b, c, d)) st = + p_tup4 p_string p_ty p_bool p_attrib_expr (a, b, c, d) st -and p_member_info (x:ValMemberInfo) st = - p_tup4 (p_tcref "member_info") p_MemberFlags (p_list p_slotsig) p_bool - (x.ApparentEnclosingEntity,x.MemberFlags,x.ImplementedSlotSigs,x.IsImplemented) st +and p_member_info (x:ValMemberInfo) st = + p_tup4 (p_tcref "member_info") p_MemberFlags (p_list p_slotsig) p_bool + (x.ApparentEnclosingEntity, x.MemberFlags, x.ImplementedSlotSigs, x.IsImplemented) st -and p_tycon_objmodel_kind x st = - match x with +and p_tycon_objmodel_kind x st = + match x with | TTyconClass -> p_byte 0 st | TTyconInterface -> p_byte 1 st | TTyconStruct -> p_byte 2 st | TTyconDelegate ss -> p_byte 3 st; p_slotsig ss st | TTyconEnum -> p_byte 4 st -and p_mustinline x st = - p_byte (match x with +and p_mustinline x st = + p_byte (match x with | ValInline.PseudoVal -> 0 | ValInline.Always -> 1 | ValInline.Optional -> 2 | ValInline.Never -> 3) st -and p_basethis x st = - p_byte (match x with +and p_basethis x st = + p_byte (match x with | BaseVal -> 0 | CtorThisVal -> 1 | NormalVal -> 2 | MemberThisVal -> 3) st -and p_vrefFlags x st = - match x with +and p_vrefFlags x st = + match x with | NormalValUse -> p_byte 0 st | CtorValUsedAsSuperInit -> p_byte 1 st | CtorValUsedAsSelfInit -> p_byte 2 st @@ -1963,7 +1963,7 @@ and p_ValData x st = p_option p_string x.ValCompiledName st // only keep range information on published values, not on optimization data p_ranges (x.ValReprInfo |> Option.map (fun _ -> x.val_range, x.DefinitionRange)) st - + let isStructThisArgPos = x.IsMember && checkForInRefStructThisArg st x.Type p_ty2 isStructThisArgPos x.val_type st @@ -1979,89 +1979,89 @@ and p_ValData x st = p_used_space1 (p_xmldoc x.XmlDoc) st else p_space 1 () st - -and p_Val x st = + +and p_Val x st = p_osgn_decl st.ovals p_ValData x st -and p_modul_typ (x: ModuleOrNamespaceType) st = +and p_modul_typ (x: ModuleOrNamespaceType) st = p_tup3 p_istype (p_qlist p_Val) (p_qlist p_entity_spec) - (x.ModuleOrNamespaceKind,x.AllValsAndMembers,x.AllEntities) + (x.ModuleOrNamespaceKind, x.AllValsAndMembers, x.AllEntities) st -and u_tycon_repr st = +and u_tycon_repr st = let tag1 = u_byte st match tag1 with | 0 -> (fun _flagBit -> TNoRepr) - | 1 -> + | 1 -> let tag2 = u_byte st match tag2 with - | 0 -> - let v = u_rfield_table st + | 0 -> + let v = u_rfield_table st (fun _flagBit -> TRecdRepr v) - | 1 -> - let v = u_list u_unioncase_spec st + | 1 -> + let v = u_list u_unioncase_spec st (fun _flagBit -> MakeUnionRepr v) - | 2 -> - let v = u_ILType st + | 2 -> + let v = u_ILType st // This is the F# 3.0 extension to the format used for F# provider-generated types, which record an ILTypeRef in the format - // You can think of an F# 2.0 reader as always taking the path where 'flagBit' is false. Thus the F# 2.0 reader will + // You can think of an F# 2.0 reader as always taking the path where 'flagBit' is false. Thus the F# 2.0 reader will // interpret provider-generated types as TAsmRepr. - (fun flagBit -> - if flagBit then + (fun flagBit -> + if flagBit then let iltref = v.TypeRef - match st.iILModule with + match st.iILModule with | None -> TNoRepr - | Some iILModule -> - try - let rec find acc enclosingTypeNames (tdefs:ILTypeDefs) = - match enclosingTypeNames with + | Some iILModule -> + try + let rec find acc enclosingTypeNames (tdefs:ILTypeDefs) = + match enclosingTypeNames with | [] -> List.rev acc, tdefs.FindByName iltref.Name | h::t -> let nestedTypeDef = tdefs.FindByName h find (tdefs.FindByName h :: acc) t nestedTypeDef.NestedTypes - let nestedILTypeDefs,ilTypeDef = find [] iltref.Enclosing iILModule.TypeDefs - TILObjectRepr(TILObjectReprData(st.iilscope,nestedILTypeDefs,ilTypeDef)) - with _ -> + let nestedILTypeDefs, ilTypeDef = find [] iltref.Enclosing iILModule.TypeDefs + TILObjectRepr(TILObjectReprData(st.iilscope, nestedILTypeDefs, ilTypeDef)) + with _ -> System.Diagnostics.Debug.Assert(false, sprintf "failed to find IL backing metadata for cross-assembly generated type %s" iltref.FullName) TNoRepr - else + else TAsmRepr v) - | 3 -> - let v = u_tycon_objmodel_data st + | 3 -> + let v = u_tycon_objmodel_data st (fun _flagBit -> TFSharpObjectRepr v) - | 4 -> - let v = u_ty st + | 4 -> + let v = u_ty st (fun _flagBit -> TMeasureableRepr v) | _ -> ufailwith st "u_tycon_repr" | _ -> ufailwith st "u_tycon_repr" - -and u_tycon_objmodel_data st = - let x1,x2,x3 = u_tup3 u_tycon_objmodel_kind u_vrefs u_rfield_table st + +and u_tycon_objmodel_data st = + let x1, x2, x3 = u_tup3 u_tycon_objmodel_kind u_vrefs u_rfield_table st {fsobjmodel_kind=x1; fsobjmodel_vslots=x2; fsobjmodel_rfields=x3 } - + and u_attribs_ext extraf st = u_list_ext extraf u_attrib st -and u_unioncase_spec st = +and u_unioncase_spec st = let a = u_rfield_table st let b = u_ty st - let c = u_string st + // The union case compiled name is now computed from Id field when needed and is not stored in UnionCase record. + let _c = u_string st let d = u_ident st // The XmlDoc is only present in the extended in-memory format. We detect its presence using a marker bit here let xmldoc, e = u_attribs_ext u_xmldoc st let f = u_string st let i = u_access st - { FieldTable=a - ReturnType=b - CompiledName=c - Id=d + { FieldTable=a + ReturnType=b + Id=d Attribs=e XmlDoc= defaultArg xmldoc XmlDoc.Empty XmlDocSig=f - Accessibility=i + Accessibility=i OtherRangeOpt=None } - -and u_exnc_spec_data st = u_entity_spec_data st + +and u_exnc_spec_data st = u_entity_spec_data st and u_exnc_repr st = let tag = u_byte st @@ -2071,15 +2071,15 @@ and u_exnc_repr st = | 2 -> u_rfield_table st |> TExnFresh | 3 -> TExnNone | _ -> ufailwith st "u_exnc_repr" - + and u_exnc_spec st = u_entity_spec st -and u_access st = - match u_list u_cpath st with - | [] -> taccessPublic // save unnecessary allocations +and u_access st = + match u_list u_cpath st with + | [] -> taccessPublic // save unnecessary allocations | res -> TAccess res -and u_recdfield_spec st = +and u_recdfield_spec st = let a = u_bool st let b = u_bool st let c1 = u_ty st @@ -2092,25 +2092,25 @@ and u_recdfield_spec st = let e2 = u_attribs st let f = u_string st let g = u_access st - { rfield_mutable=a - rfield_volatile=b - rfield_type=c1 - rfield_static=c2 - rfield_secret=c2b - rfield_const=c3 - rfield_id=d + { rfield_mutable=a + rfield_volatile=b + rfield_type=c1 + rfield_static=c2 + rfield_secret=c2b + rfield_const=c3 + rfield_id=d rfield_pattribs=e1 rfield_fattribs=e2 rfield_xmldoc= defaultArg xmldoc XmlDoc.Empty - rfield_xmldocsig=f + rfield_xmldocsig=f rfield_access=g rfield_name_generated = false rfield_other_range = None } and u_rfield_table st = MakeRecdFieldsTable (u_list u_recdfield_spec st) -and u_entity_spec_data st : Entity = - let x1,x2a,x2b,x2c,x3,(x4a,x4b),x6,x7f,x8,x9,_x10,x10b,x11,x12,x13,x14,x15 = +and u_entity_spec_data st : Entity = + let x1, x2a, x2b, x2c, x3, (x4a, x4b), x6, x7f, x8, x9, _x10, x10b, x11, x12, x13, x14, x15 = u_tup17 u_tyar_specs u_string @@ -2120,14 +2120,14 @@ and u_entity_spec_data st : Entity = (u_tup2 u_access u_access) u_attribs u_tycon_repr - (u_option u_ty) - u_tcaug - u_string + (u_option u_ty) + u_tcaug + u_string u_kind u_int64 (u_option u_cpath ) - (u_lazy u_modul_typ) - u_exnc_repr + (u_lazy u_modul_typ) + u_exnc_repr (u_used_space1 u_xmldoc) st // We use a bit that was unused in the F# 2.0 format to indicate two possible representations in the F# 3.0 tycon_repr format @@ -2145,12 +2145,12 @@ and u_entity_spec_data st : Entity = entity_flags=EntityFlags(x11) entity_cpath=x12 entity_modul_contents=MaybeLazy.Lazy x13 - entity_il_repr_cache=newCache() + entity_il_repr_cache=newCache() entity_opt_data= match x2b, x10b, x15, x8, x4a, x4b, x14 with | None, TyparKind.Type, None, None, TAccess [], TAccess [], TExnNone -> None - | _ -> - Some { Entity.NewEmptyEntityOptData() with + | _ -> + Some { Entity.NewEmptyEntityOptData() with entity_compiled_name = x2b entity_kind = x10b entity_xmldoc= defaultArg x15 XmlDoc.Empty @@ -2159,100 +2159,100 @@ and u_entity_spec_data st : Entity = entity_accessiblity = x4a entity_tycon_repr_accessibility = x4b entity_exn_info = x14 } - } + } -and u_tcaug st = - let a1,a2,a3,b2,c,d,e,g,_space = +and u_tcaug st = + let a1, a2, a3, b2, c, d, e, g, _space = u_tup9 (u_option (u_tup2 u_vref u_vref)) (u_option u_vref) (u_option (u_tup3 u_vref u_vref u_vref)) (u_option (u_tup2 u_vref u_vref)) (u_list (u_tup2 u_string u_vref)) - (u_list (u_tup3 u_ty u_bool u_dummy_range)) + (u_list (u_tup3 u_ty u_bool u_dummy_range)) (u_option u_ty) - u_bool + u_bool (u_space 1) - st - {tcaug_compare=a1 - tcaug_compare_withc=a2 - tcaug_hash_and_equals_withc=a3 - tcaug_equals=b2 + st + {tcaug_compare=a1 + tcaug_compare_withc=a2 + tcaug_hash_and_equals_withc=a3 + tcaug_equals=b2 // only used for code generation and checking - hence don't care about the values when reading back in - tcaug_hasObjectGetHashCode=false - tcaug_adhoc_list= new ResizeArray<_> (c |> List.map (fun (_,vref) -> (false, vref))) - tcaug_adhoc=NameMultiMap.ofList c + tcaug_hasObjectGetHashCode=false + tcaug_adhoc_list= new ResizeArray<_> (c |> List.map (fun (_, vref) -> (false, vref))) + tcaug_adhoc=NameMultiMap.ofList c tcaug_interfaces=d tcaug_super=e // pickled type definitions are always closed (i.e. no more intrinsic members allowed) - tcaug_closed=true + tcaug_closed=true tcaug_abstract=g} - -and u_entity_spec st = - u_osgn_decl st.ientities u_entity_spec_data st -and u_parentref st = +and u_entity_spec st = + u_osgn_decl st.ientities u_entity_spec_data st + +and u_parentref st = let tag = u_byte st match tag with | 0 -> ParentNone - | 1 -> u_tcref st |> Parent - | _ -> ufailwith st "u_attribkind" + | 1 -> u_tcref st |> Parent + | _ -> ufailwith st "u_attribkind" -and u_attribkind st = +and u_attribkind st = let tag = u_byte st match tag with - | 0 -> u_ILMethodRef st |> ILAttrib - | 1 -> u_vref st |> FSAttrib - | _ -> ufailwith st "u_attribkind" + | 0 -> u_ILMethodRef st |> ILAttrib + | 1 -> u_vref st |> FSAttrib + | _ -> ufailwith st "u_attribkind" -and u_attrib st : Attrib = - let a,b,c,d,e,f = u_tup6 u_tcref u_attribkind (u_list u_attrib_expr) (u_list u_attrib_arg) u_bool u_dummy_range st - Attrib(a,b,c,d,e,None,f) // AttributeTargets are not preserved +and u_attrib st : Attrib = + let a, b, c, d, e, f = u_tup6 u_tcref u_attribkind (u_list u_attrib_expr) (u_list u_attrib_arg) u_bool u_dummy_range st + Attrib(a, b, c, d, e, None, f) // AttributeTargets are not preserved -and u_attrib_expr st = - let a,b = u_tup2 u_expr u_expr st - AttribExpr(a,b) +and u_attrib_expr st = + let a, b = u_tup2 u_expr u_expr st + AttribExpr(a, b) -and u_attrib_arg st = - let a,b,c,d = u_tup4 u_string u_ty u_bool u_attrib_expr st - AttribNamedArg(a,b,c,d) +and u_attrib_arg st = + let a, b, c, d = u_tup4 u_string u_ty u_bool u_attrib_expr st + AttribNamedArg(a, b, c, d) -and u_member_info st : ValMemberInfo = - let x2,x3,x4,x5 = u_tup4 u_tcref u_MemberFlags (u_list u_slotsig) u_bool st +and u_member_info st : ValMemberInfo = + let x2, x3, x4, x5 = u_tup4 u_tcref u_MemberFlags (u_list u_slotsig) u_bool st { ApparentEnclosingEntity=x2 MemberFlags=x3 ImplementedSlotSigs=x4 IsImplemented=x5 } -and u_tycon_objmodel_kind st = +and u_tycon_objmodel_kind st = let tag = u_byte st match tag with - | 0 -> TTyconClass - | 1 -> TTyconInterface - | 2 -> TTyconStruct + | 0 -> TTyconClass + | 1 -> TTyconInterface + | 2 -> TTyconStruct | 3 -> u_slotsig st |> TTyconDelegate - | 4 -> TTyconEnum + | 4 -> TTyconEnum | _ -> ufailwith st "u_tycon_objmodel_kind" -and u_mustinline st = - match u_byte st with - | 0 -> ValInline.PseudoVal - | 1 -> ValInline.Always - | 2 -> ValInline.Optional - | 3 -> ValInline.Never +and u_mustinline st = + match u_byte st with + | 0 -> ValInline.PseudoVal + | 1 -> ValInline.Always + | 2 -> ValInline.Optional + | 3 -> ValInline.Never | _ -> ufailwith st "u_mustinline" -and u_basethis st = - match u_byte st with - | 0 -> BaseVal - | 1 -> CtorThisVal - | 2 -> NormalVal +and u_basethis st = + match u_byte st with + | 0 -> BaseVal + | 1 -> CtorThisVal + | 2 -> NormalVal | 3 -> MemberThisVal | _ -> ufailwith st "u_basethis" -and u_vrefFlags st = - match u_byte st with - | 0 -> NormalValUse +and u_vrefFlags st = + match u_byte st with + | 0 -> NormalValUse | 1 -> CtorValUsedAsSuperInit | 2 -> CtorValUsedAsSelfInit | 3 -> PossibleConstrainedCall (u_ty st) @@ -2260,34 +2260,34 @@ and u_vrefFlags st = | _ -> ufailwith st "u_vrefFlags" and u_ValData st = - let x1,x1z,x1a,x2,x4,x8,x9,x10,x12,x13,x13b,x14,x15 = + let x1, x1z, x1a, x2, x4, x8, x9, x10, x12, x13, x13b, x14, x15 = u_tup13 u_string (u_option u_string) u_ranges - u_ty + u_ty u_int64 - (u_option u_member_info) - u_attribs + (u_option u_member_info) + u_attribs (u_option u_ValReprInfo) u_string u_access u_parentref - (u_option u_const) + (u_option u_const) (u_used_space1 u_xmldoc) st { val_logical_name = x1 - val_range = (match x1a with None -> range0 | Some(a,_) -> a) + val_range = (match x1a with None -> range0 | Some(a, _) -> a) val_type = x2 val_stamp = newStamp() val_flags = ValFlags(x4) val_opt_data = match x1z, x1a, x10, x14, x13, x15, x8, x13b, x12, x9 with | None, None, None, None, TAccess [], None, None, ParentNone, "", [] -> None - | _ -> + | _ -> Some { val_compiled_name = x1z - val_other_range = (match x1a with None -> None | Some(_,b) -> Some(b,true)) + val_other_range = (match x1a with None -> None | Some(_, b) -> Some(b, true)) val_defn = None val_repr_info = x10 val_const = x14 @@ -2299,24 +2299,24 @@ and u_ValData st = val_attribs = x9 } } -and u_Val st = u_osgn_decl st.ivals u_ValData st +and u_Val st = u_osgn_decl st.ivals u_ValData st -and u_modul_typ st = - let x1,x3,x5 = +and u_modul_typ st = + let x1, x3, x5 = u_tup3 u_istype (u_qlist u_Val) (u_qlist u_entity_spec) st - ModuleOrNamespaceType(x1,x3,x5) + ModuleOrNamespaceType(x1, x3, x5) //--------------------------------------------------------------------------- // Pickle/unpickle for F# expressions (for optimization data) //--------------------------------------------------------------------------- -and p_const x st = - match x with +and p_const x st = + match x with | Const.Bool x -> p_byte 0 st; p_bool x st | Const.SByte x -> p_byte 1 st; p_int8 x st | Const.Byte x -> p_byte 2 st; p_uint8 x st @@ -2336,131 +2336,131 @@ and p_const x st = | Const.Zero -> p_byte 16 st | Const.Decimal s -> p_byte 17 st; p_array p_int32 (System.Decimal.GetBits(s)) st -and u_const st = +and u_const st = let tag = u_byte st match tag with - | 0 -> u_bool st |> Const.Bool - | 1 -> u_int8 st |> Const.SByte - | 2 -> u_uint8 st |> Const.Byte - | 3 -> u_int16 st |> Const.Int16 - | 4 -> u_uint16 st |> Const.UInt16 - | 5 -> u_int32 st |> Const.Int32 - | 6 -> u_uint32 st |> Const.UInt32 + | 0 -> u_bool st |> Const.Bool + | 1 -> u_int8 st |> Const.SByte + | 2 -> u_uint8 st |> Const.Byte + | 3 -> u_int16 st |> Const.Int16 + | 4 -> u_uint16 st |> Const.UInt16 + | 5 -> u_int32 st |> Const.Int32 + | 6 -> u_uint32 st |> Const.UInt32 | 7 -> u_int64 st |> Const.Int64 | 8 -> u_uint64 st |> Const.UInt64 | 9 -> u_int64 st |> Const.IntPtr | 10 -> u_uint64 st |> Const.UIntPtr | 11 -> u_single st |> Const.Single | 12 -> u_int64 st |> float_of_bits |> Const.Double - | 13 -> u_char st |> Const.Char + | 13 -> u_char st |> Const.Char | 14 -> u_string st |> Const.String | 15 -> Const.Unit | 16 -> Const.Zero | 17 -> u_array u_int32 st |> (fun bits -> Const.Decimal (new System.Decimal(bits))) - | _ -> ufailwith st "u_const" + | _ -> ufailwith st "u_const" -and p_dtree x st = - match x with - | TDSwitch (a,b,c,d) -> p_byte 0 st; p_tup4 p_expr (p_list p_dtree_case) (p_option p_dtree) p_dummy_range (a,b,c,d) st - | TDSuccess (a,b) -> p_byte 1 st; p_tup2 p_Exprs p_int (a,b) st - | TDBind (a,b) -> p_byte 2 st; p_tup2 p_bind p_dtree (a,b) st +and p_dtree x st = + match x with + | TDSwitch (a, b, c, d) -> p_byte 0 st; p_tup4 p_expr (p_list p_dtree_case) (p_option p_dtree) p_dummy_range (a, b, c, d) st + | TDSuccess (a, b) -> p_byte 1 st; p_tup2 p_Exprs p_int (a, b) st + | TDBind (a, b) -> p_byte 2 st; p_tup2 p_bind p_dtree (a, b) st -and p_dtree_case (TCase(a,b)) st = p_tup2 p_dtree_discrim p_dtree (a,b) st +and p_dtree_case (TCase(a, b)) st = p_tup2 p_dtree_discrim p_dtree (a, b) st -and p_dtree_discrim x st = - match x with - | DecisionTreeTest.UnionCase (ucref,tinst) -> p_byte 0 st; p_tup2 p_ucref p_tys (ucref,tinst) st +and p_dtree_discrim x st = + match x with + | DecisionTreeTest.UnionCase (ucref, tinst) -> p_byte 0 st; p_tup2 p_ucref p_tys (ucref, tinst) st | DecisionTreeTest.Const c -> p_byte 1 st; p_const c st | DecisionTreeTest.IsNull -> p_byte 2 st - | DecisionTreeTest.IsInst (srcty,tgty) -> p_byte 3 st; p_ty srcty st; p_ty tgty st - | DecisionTreeTest.ArrayLength (n,ty) -> p_byte 4 st; p_tup2 p_int p_ty (n,ty) st + | DecisionTreeTest.IsInst (srcty, tgty) -> p_byte 3 st; p_ty srcty st; p_ty tgty st + | DecisionTreeTest.ArrayLength (n, ty) -> p_byte 4 st; p_tup2 p_int p_ty (n, ty) st | DecisionTreeTest.ActivePatternCase _ -> pfailwith st "DecisionTreeTest.ActivePatternCase: only used during pattern match compilation" -and p_target (TTarget(a,b,_)) st = p_tup2 p_Vals p_expr (a,b) st -and p_bind (TBind(a,b,_)) st = p_tup2 p_Val p_expr (a,b) st +and p_target (TTarget(a, b, _)) st = p_tup2 p_Vals p_expr (a, b) st +and p_bind (TBind(a, b, _)) st = p_tup2 p_Val p_expr (a, b) st and p_lval_op_kind x st = p_byte (match x with LAddrOf _ -> 0 | LByrefGet -> 1 | LSet -> 2 | LByrefSet -> 3) st -and p_recdInfo x st = - match x with +and p_recdInfo x st = + match x with | RecdExpr -> () | RecdExprIsObjInit -> pfailwith st "explicit object constructors can't be inlined and should not have optimization information" -and u_dtree st = +and u_dtree st = let tag = u_byte st match tag with - | 0 -> u_tup4 u_expr (u_list u_dtree_case) (u_option u_dtree) u_dummy_range st |> TDSwitch + | 0 -> u_tup4 u_expr (u_list u_dtree_case) (u_option u_dtree) u_dummy_range st |> TDSwitch | 1 -> u_tup2 u_Exprs u_int st |> TDSuccess | 2 -> u_tup2 u_bind u_dtree st |> TDBind - | _ -> ufailwith st "u_dtree" + | _ -> ufailwith st "u_dtree" -and u_dtree_case st = let a,b = u_tup2 u_dtree_discrim u_dtree st in (TCase(a,b)) +and u_dtree_case st = let a, b = u_tup2 u_dtree_discrim u_dtree st in (TCase(a, b)) -and u_dtree_discrim st = +and u_dtree_discrim st = let tag = u_byte st match tag with - | 0 -> u_tup2 u_ucref u_tys st |> DecisionTreeTest.UnionCase - | 1 -> u_const st |> DecisionTreeTest.Const - | 2 -> DecisionTreeTest.IsNull + | 0 -> u_tup2 u_ucref u_tys st |> DecisionTreeTest.UnionCase + | 1 -> u_const st |> DecisionTreeTest.Const + | 2 -> DecisionTreeTest.IsNull | 3 -> u_tup2 u_ty u_ty st |> DecisionTreeTest.IsInst | 4 -> u_tup2 u_int u_ty st |> DecisionTreeTest.ArrayLength - | _ -> ufailwith st "u_dtree_discrim" + | _ -> ufailwith st "u_dtree_discrim" -and u_target st = let a,b = u_tup2 u_Vals u_expr st in (TTarget(a,b,SuppressSequencePointAtTarget)) +and u_target st = let a, b = u_tup2 u_Vals u_expr st in (TTarget(a, b, SuppressSequencePointAtTarget)) -and u_bind st = let a = u_Val st in let b = u_expr st in TBind(a,b,NoSequencePointAtStickyBinding) +and u_bind st = let a = u_Val st in let b = u_expr st in TBind(a, b, NoSequencePointAtStickyBinding) and u_lval_op_kind st = - match u_byte st with + match u_byte st with | 0 -> LAddrOf false - | 1 -> LByrefGet - | 2 -> LSet - | 3 -> LByrefSet + | 1 -> LByrefGet + | 2 -> LSet + | 3 -> LByrefSet | _ -> ufailwith st "uval_op_kind" - -and p_op x st = - match x with + +and p_op x st = + match x with | TOp.UnionCase c -> p_byte 0 st; p_ucref c st | TOp.ExnConstr c -> p_byte 1 st; p_tcref "op" c st - | TOp.Tuple tupInfo -> - if evalTupInfoIsStruct tupInfo then + | TOp.Tuple tupInfo -> + if evalTupInfoIsStruct tupInfo then p_byte 29 st - else + else p_byte 2 st - | TOp.Recd (a,b) -> p_byte 3 st; p_tup2 p_recdInfo (p_tcref "recd op") (a,b) st + | TOp.Recd (a, b) -> p_byte 3 st; p_tup2 p_recdInfo (p_tcref "recd op") (a, b) st | TOp.ValFieldSet (a) -> p_byte 4 st; p_rfref a st | TOp.ValFieldGet (a) -> p_byte 5 st; p_rfref a st | TOp.UnionCaseTagGet (a) -> p_byte 6 st; p_tcref "cnstr op" a st - | TOp.UnionCaseFieldGet (a,b) -> p_byte 7 st; p_tup2 p_ucref p_int (a,b) st - | TOp.UnionCaseFieldSet (a,b) -> p_byte 8 st; p_tup2 p_ucref p_int (a,b) st - | TOp.ExnFieldGet (a,b) -> p_byte 9 st; p_tup2 (p_tcref "exn op") p_int (a,b) st - | TOp.ExnFieldSet (a,b) -> p_byte 10 st; p_tup2 (p_tcref "exn op") p_int (a,b) st - | TOp.TupleFieldGet (tupInfo,a) -> - if evalTupInfoIsStruct tupInfo then + | TOp.UnionCaseFieldGet (a, b) -> p_byte 7 st; p_tup2 p_ucref p_int (a, b) st + | TOp.UnionCaseFieldSet (a, b) -> p_byte 8 st; p_tup2 p_ucref p_int (a, b) st + | TOp.ExnFieldGet (a, b) -> p_byte 9 st; p_tup2 (p_tcref "exn op") p_int (a, b) st + | TOp.ExnFieldSet (a, b) -> p_byte 10 st; p_tup2 (p_tcref "exn op") p_int (a, b) st + | TOp.TupleFieldGet (tupInfo, a) -> + if evalTupInfoIsStruct tupInfo then p_byte 30 st; p_int a st - else + else p_byte 11 st; p_int a st - | TOp.ILAsm (a,b) -> p_byte 12 st; p_tup2 (p_list p_ILInstr) p_tys (a,b) st + | TOp.ILAsm (a, b) -> p_byte 12 st; p_tup2 (p_list p_ILInstr) p_tys (a, b) st | TOp.RefAddrGet _ -> p_byte 13 st | TOp.UnionCaseProof (a) -> p_byte 14 st; p_ucref a st | TOp.Coerce -> p_byte 15 st | TOp.TraitCall (b) -> p_byte 16 st; p_trait b st - | TOp.LValueOp (a,b) -> p_byte 17 st; p_tup2 p_lval_op_kind (p_vref "lval") (a,b) st - | TOp.ILCall (a1,a2,a3,a4,a5,a7,a8,a9,b,c,d) - -> p_byte 18 st; p_tup11 p_bool p_bool p_bool p_bool p_vrefFlags p_bool p_bool p_ILMethodRef p_tys p_tys p_tys (a1,a2,a3,a4,a5,a7,a8,a9,b,c,d) st + | TOp.LValueOp (a, b) -> p_byte 17 st; p_tup2 p_lval_op_kind (p_vref "lval") (a, b) st + | TOp.ILCall (a1, a2, a3, a4, a5, a7, a8, a9, b, c, d) + -> p_byte 18 st; p_tup11 p_bool p_bool p_bool p_bool p_vrefFlags p_bool p_bool p_ILMethodRef p_tys p_tys p_tys (a1, a2, a3, a4, a5, a7, a8, a9, b, c, d) st | TOp.Array -> p_byte 19 st | TOp.While _ -> p_byte 20 st - | TOp.For(_,dir) -> p_byte 21 st; p_int (match dir with FSharpForLoopUp -> 0 | CSharpForLoopUp -> 1 | FSharpForLoopDown -> 2) st + | TOp.For(_, dir) -> p_byte 21 st; p_int (match dir with FSharpForLoopUp -> 0 | CSharpForLoopUp -> 1 | FSharpForLoopDown -> 2) st | TOp.Bytes bytes -> p_byte 22 st; p_bytes bytes st | TOp.TryCatch _ -> p_byte 23 st | TOp.TryFinally _ -> p_byte 24 st | TOp.ValFieldGetAddr (a, _) -> p_byte 25 st; p_rfref a st | TOp.UInt16s arr -> p_byte 26 st; p_array p_uint16 arr st | TOp.Reraise -> p_byte 27 st - | TOp.UnionCaseFieldGetAddr (a,b, _) -> p_byte 28 st; p_tup2 p_ucref p_int (a,b) st + | TOp.UnionCaseFieldGetAddr (a, b, _) -> p_byte 28 st; p_tup2 p_ucref p_int (a, b) st // Note tag byte 29 is taken for struct tuples, see above // Note tag byte 30 is taken for struct tuples, see above (* 29: TOp.Tuple when evalTupInfoIsStruct tupInfo = true *) @@ -2469,7 +2469,7 @@ and p_op x st = | TOp.AnonRecdGet (info, n) -> p_byte 32 st; p_anonInfo info st; p_int n st | TOp.Goto _ | TOp.Label _ | TOp.Return -> failwith "unexpected backend construct in pickled TAST" -and u_op st = +and u_op st = let tag = u_byte st match tag with | 0 -> let a = u_ucref st @@ -2478,191 +2478,191 @@ and u_op st = TOp.ExnConstr a | 2 -> TOp.Tuple tupInfoRef | 3 -> let b = u_tcref st - TOp.Recd (RecdExpr,b) + TOp.Recd (RecdExpr, b) | 4 -> let a = u_rfref st - TOp.ValFieldSet a + TOp.ValFieldSet a | 5 -> let a = u_rfref st - TOp.ValFieldGet a + TOp.ValFieldGet a | 6 -> let a = u_tcref st - TOp.UnionCaseTagGet a + TOp.UnionCaseTagGet a | 7 -> let a = u_ucref st let b = u_int st - TOp.UnionCaseFieldGet (a,b) + TOp.UnionCaseFieldGet (a, b) | 8 -> let a = u_ucref st let b = u_int st - TOp.UnionCaseFieldSet (a,b) + TOp.UnionCaseFieldSet (a, b) | 9 -> let a = u_tcref st let b = u_int st - TOp.ExnFieldGet (a,b) + TOp.ExnFieldGet (a, b) | 10 -> let a = u_tcref st let b = u_int st - TOp.ExnFieldSet (a,b) + TOp.ExnFieldSet (a, b) | 11 -> let a = u_int st - TOp.TupleFieldGet (tupInfoRef, a) + TOp.TupleFieldGet (tupInfoRef, a) | 12 -> let a = (u_list u_ILInstr) st let b = u_tys st - TOp.ILAsm (a,b) + TOp.ILAsm (a, b) | 13 -> TOp.RefAddrGet false // ok to set the 'readonly' flag on these operands to false on re-read since the flag is only used for typechecking purposes | 14 -> let a = u_ucref st - TOp.UnionCaseProof a + TOp.UnionCaseProof a | 15 -> TOp.Coerce | 16 -> let a = u_trait st TOp.TraitCall a | 17 -> let a = u_lval_op_kind st let b = u_vref st - TOp.LValueOp (a,b) - | 18 -> let (a1,a2,a3,a4,a5,a7,a8,a9) = (u_tup8 u_bool u_bool u_bool u_bool u_vrefFlags u_bool u_bool u_ILMethodRef) st + TOp.LValueOp (a, b) + | 18 -> let (a1, a2, a3, a4, a5, a7, a8, a9) = (u_tup8 u_bool u_bool u_bool u_bool u_vrefFlags u_bool u_bool u_ILMethodRef) st let b = u_tys st let c = u_tys st let d = u_tys st - TOp.ILCall (a1,a2,a3,a4,a5,a7,a8,a9,b,c,d) + TOp.ILCall (a1, a2, a3, a4, a5, a7, a8, a9, b, c, d) | 19 -> TOp.Array | 20 -> TOp.While (NoSequencePointAtWhileLoop, NoSpecialWhileLoopMarker) | 21 -> let dir = match u_int st with 0 -> FSharpForLoopUp | 1 -> CSharpForLoopUp | 2 -> FSharpForLoopDown | _ -> failwith "unknown for loop" TOp.For (NoSequencePointAtForLoop, dir) | 22 -> TOp.Bytes (u_bytes st) - | 23 -> TOp.TryCatch(NoSequencePointAtTry,NoSequencePointAtWith) - | 24 -> TOp.TryFinally(NoSequencePointAtTry,NoSequencePointAtFinally) + | 23 -> TOp.TryCatch(NoSequencePointAtTry, NoSequencePointAtWith) + | 24 -> TOp.TryFinally(NoSequencePointAtTry, NoSequencePointAtFinally) | 25 -> let a = u_rfref st TOp.ValFieldGetAddr (a, false) | 26 -> TOp.UInt16s (u_array u_uint16 st) | 27 -> TOp.Reraise | 28 -> let a = u_ucref st let b = u_int st - TOp.UnionCaseFieldGetAddr (a,b, false) + TOp.UnionCaseFieldGetAddr (a, b, false) | 29 -> TOp.Tuple tupInfoStruct | 30 -> let a = u_int st - TOp.TupleFieldGet (tupInfoStruct, a) - | 31 -> let info = u_anonInfo st - TOp.AnonRecd (info) - | 32 -> let info = u_anonInfo st - let n = u_int st - TOp.AnonRecdGet (info, n) - | _ -> ufailwith st "u_op" - -and p_expr expr st = - match expr with + TOp.TupleFieldGet (tupInfoStruct, a) + | 31 -> let info = u_anonInfo st + TOp.AnonRecd (info) + | 32 -> let info = u_anonInfo st + let n = u_int st + TOp.AnonRecdGet (info, n) + | _ -> ufailwith st "u_op" + +and p_expr expr st = + match expr with | Expr.Link e -> p_expr !e st - | Expr.Const (x,m,ty) -> p_byte 0 st; p_tup3 p_const p_dummy_range p_ty (x,m,ty) st - | Expr.Val (a,b,m) -> p_byte 1 st; p_tup3 (p_vref "val") p_vrefFlags p_dummy_range (a,b,m) st - | Expr.Op(a,b,c,d) -> p_byte 2 st; p_tup4 p_op p_tys p_Exprs p_dummy_range (a,b,c,d) st - | Expr.Sequential (a,b,c,_,d) -> p_byte 3 st; p_tup4 p_expr p_expr p_int p_dummy_range (a,b,(match c with NormalSeq -> 0 | ThenDoSeq -> 1),d) st - | Expr.Lambda (_,a1,b0,b1,c,d,e) -> p_byte 4 st; p_tup6 (p_option p_Val) (p_option p_Val) p_Vals p_expr p_dummy_range p_ty (a1,b0,b1,c,d,e) st - | Expr.TyLambda (_,b,c,d,e) -> p_byte 5 st; p_tup4 p_tyar_specs p_expr p_dummy_range p_ty (b,c,d,e) st - | Expr.App (a1,a2,b,c,d) -> p_byte 6 st; p_tup5 p_expr p_ty p_tys p_Exprs p_dummy_range (a1,a2,b,c,d) st - | Expr.LetRec (a,b,c,_) -> p_byte 7 st; p_tup3 p_binds p_expr p_dummy_range (a,b,c) st - | Expr.Let (a,b,c,_) -> p_byte 8 st; p_tup3 p_bind p_expr p_dummy_range (a,b,c) st - | Expr.Match (_,a,b,c,d,e) -> p_byte 9 st; p_tup5 p_dummy_range p_dtree p_targets p_dummy_range p_ty (a,b,c,d,e) st - | Expr.Obj(_,b,c,d,e,f,g) -> p_byte 10 st; p_tup6 p_ty (p_option p_Val) p_expr p_methods p_intfs p_dummy_range (b,c,d,e,f,g) st - | Expr.StaticOptimization(a,b,c,d) -> p_byte 11 st; p_tup4 p_constraints p_expr p_expr p_dummy_range (a,b,c,d) st - | Expr.TyChoose (a,b,c) -> p_byte 12 st; p_tup3 p_tyar_specs p_expr p_dummy_range (a,b,c) st - | Expr.Quote(ast,_,_,m,ty) -> p_byte 13 st; p_tup3 p_expr p_dummy_range p_ty (ast,m,ty) st - -and u_expr st = + | Expr.Const (x, m, ty) -> p_byte 0 st; p_tup3 p_const p_dummy_range p_ty (x, m, ty) st + | Expr.Val (a, b, m) -> p_byte 1 st; p_tup3 (p_vref "val") p_vrefFlags p_dummy_range (a, b, m) st + | Expr.Op(a, b, c, d) -> p_byte 2 st; p_tup4 p_op p_tys p_Exprs p_dummy_range (a, b, c, d) st + | Expr.Sequential (a, b, c, _, d) -> p_byte 3 st; p_tup4 p_expr p_expr p_int p_dummy_range (a, b, (match c with NormalSeq -> 0 | ThenDoSeq -> 1), d) st + | Expr.Lambda (_, a1, b0, b1, c, d, e) -> p_byte 4 st; p_tup6 (p_option p_Val) (p_option p_Val) p_Vals p_expr p_dummy_range p_ty (a1, b0, b1, c, d, e) st + | Expr.TyLambda (_, b, c, d, e) -> p_byte 5 st; p_tup4 p_tyar_specs p_expr p_dummy_range p_ty (b, c, d, e) st + | Expr.App (a1, a2, b, c, d) -> p_byte 6 st; p_tup5 p_expr p_ty p_tys p_Exprs p_dummy_range (a1, a2, b, c, d) st + | Expr.LetRec (a, b, c, _) -> p_byte 7 st; p_tup3 p_binds p_expr p_dummy_range (a, b, c) st + | Expr.Let (a, b, c, _) -> p_byte 8 st; p_tup3 p_bind p_expr p_dummy_range (a, b, c) st + | Expr.Match (_, a, b, c, d, e) -> p_byte 9 st; p_tup5 p_dummy_range p_dtree p_targets p_dummy_range p_ty (a, b, c, d, e) st + | Expr.Obj(_, b, c, d, e, f, g) -> p_byte 10 st; p_tup6 p_ty (p_option p_Val) p_expr p_methods p_intfs p_dummy_range (b, c, d, e, f, g) st + | Expr.StaticOptimization(a, b, c, d) -> p_byte 11 st; p_tup4 p_constraints p_expr p_expr p_dummy_range (a, b, c, d) st + | Expr.TyChoose (a, b, c) -> p_byte 12 st; p_tup3 p_tyar_specs p_expr p_dummy_range (a, b, c) st + | Expr.Quote(ast, _, _, m, ty) -> p_byte 13 st; p_tup3 p_expr p_dummy_range p_ty (ast, m, ty) st + +and u_expr st = let tag = u_byte st match tag with | 0 -> let a = u_const st let b = u_dummy_range st let c = u_ty st - Expr.Const (a,b,c) + Expr.Const (a, b, c) | 1 -> let a = u_vref st let b = u_vrefFlags st let c = u_dummy_range st - Expr.Val (a,b,c) + Expr.Val (a, b, c) | 2 -> let a = u_op st let b = u_tys st let c = u_Exprs st let d = u_dummy_range st - Expr.Op (a,b,c,d) + Expr.Op (a, b, c, d) | 3 -> let a = u_expr st let b = u_expr st let c = u_int st let d = u_dummy_range st - Expr.Sequential (a,b,(match c with 0 -> NormalSeq | 1 -> ThenDoSeq | _ -> ufailwith st "specialSeqFlag"),SuppressSequencePointOnExprOfSequential,d) + Expr.Sequential (a, b, (match c with 0 -> NormalSeq | 1 -> ThenDoSeq | _ -> ufailwith st "specialSeqFlag"), SuppressSequencePointOnExprOfSequential, d) | 4 -> let a0 = u_option u_Val st let b0 = u_option u_Val st let b1 = u_Vals st let c = u_expr st let d = u_dummy_range st let e = u_ty st - Expr.Lambda (newUnique(),a0,b0,b1,c,d,e) + Expr.Lambda (newUnique(), a0, b0, b1, c, d, e) | 5 -> let b = u_tyar_specs st let c = u_expr st let d = u_dummy_range st let e = u_ty st - Expr.TyLambda (newUnique(),b,c,d,e) + Expr.TyLambda (newUnique(), b, c, d, e) | 6 -> let a1 = u_expr st let a2 = u_ty st let b = u_tys st let c = u_Exprs st let d = u_dummy_range st - Expr.App (a1,a2,b,c,d) + Expr.App (a1, a2, b, c, d) | 7 -> let a = u_binds st let b = u_expr st let c = u_dummy_range st - Expr.LetRec (a,b,c,NewFreeVarsCache()) + Expr.LetRec (a, b, c, NewFreeVarsCache()) | 8 -> let a = u_bind st let b = u_expr st let c = u_dummy_range st - Expr.Let (a,b,c,NewFreeVarsCache()) + Expr.Let (a, b, c, NewFreeVarsCache()) | 9 -> let a = u_dummy_range st let b = u_dtree st let c = u_targets st let d = u_dummy_range st let e = u_ty st - Expr.Match (NoSequencePointAtStickyBinding,a,b,c,d,e) + Expr.Match (NoSequencePointAtStickyBinding, a, b, c, d, e) | 10 -> let b = u_ty st let c = (u_option u_Val) st let d = u_expr st let e = u_methods st let f = u_intfs st let g = u_dummy_range st - Expr.Obj (newUnique(),b,c,d,e,f,g) + Expr.Obj (newUnique(), b, c, d, e, f, g) | 11 -> let a = u_constraints st let b = u_expr st let c = u_expr st let d = u_dummy_range st - Expr.StaticOptimization (a,b,c,d) + Expr.StaticOptimization (a, b, c, d) | 12 -> let a = u_tyar_specs st let b = u_expr st let c = u_dummy_range st - Expr.TyChoose (a,b,c) + Expr.TyChoose (a, b, c) | 13 -> let b = u_expr st let c = u_dummy_range st let d = u_ty st - Expr.Quote (b,ref None,false,c,d) // isFromQueryExpression=false - | _ -> ufailwith st "u_expr" + Expr.Quote (b, ref None, false, c, d) // isFromQueryExpression=false + | _ -> ufailwith st "u_expr" -and p_static_optimization_constraint x st = +and p_static_optimization_constraint x st = match x with - | TTyconEqualsTycon (a,b) -> p_byte 0 st; p_tup2 p_ty p_ty (a,b) st + | TTyconEqualsTycon (a, b) -> p_byte 0 st; p_tup2 p_ty p_ty (a, b) st | TTyconIsStruct(a) -> p_byte 1 st; p_ty a st -and p_slotparam (TSlotParam (a,b,c,d,e,f)) st = p_tup6 (p_option p_string) p_ty p_bool p_bool p_bool p_attribs (a,b,c,d,e,f) st -and p_slotsig (TSlotSig (a,b,c,d,e,f)) st = p_tup6 p_string p_ty p_tyar_specs p_tyar_specs (p_list (p_list p_slotparam)) (p_option p_ty) (a,b,c,d,e,f) st -and p_method (TObjExprMethod (a,b,c,d,e,f)) st = p_tup6 p_slotsig p_attribs p_tyar_specs (p_list p_Vals) p_expr p_dummy_range (a,b,c,d,e,f) st +and p_slotparam (TSlotParam (a, b, c, d, e, f)) st = p_tup6 (p_option p_string) p_ty p_bool p_bool p_bool p_attribs (a, b, c, d, e, f) st +and p_slotsig (TSlotSig (a, b, c, d, e, f)) st = p_tup6 p_string p_ty p_tyar_specs p_tyar_specs (p_list (p_list p_slotparam)) (p_option p_ty) (a, b, c, d, e, f) st +and p_method (TObjExprMethod (a, b, c, d, e, f)) st = p_tup6 p_slotsig p_attribs p_tyar_specs (p_list p_Vals) p_expr p_dummy_range (a, b, c, d, e, f) st and p_methods x st = p_list p_method x st and p_intf x st = p_tup2 p_ty p_methods x st and p_intfs x st = p_list p_intf x st -and u_static_optimization_constraint st = +and u_static_optimization_constraint st = let tag = u_byte st match tag with | 0 -> u_tup2 u_ty u_ty st |> TTyconEqualsTycon | 1 -> u_ty st |> TTyconIsStruct - | _ -> ufailwith st "u_static_optimization_constraint" + | _ -> ufailwith st "u_static_optimization_constraint" -and u_slotparam st = - let a,b,c,d,e,f = u_tup6 (u_option u_string) u_ty u_bool u_bool u_bool u_attribs st - TSlotParam(a,b,c,d,e,f) +and u_slotparam st = + let a, b, c, d, e, f = u_tup6 (u_option u_string) u_ty u_bool u_bool u_bool u_attribs st + TSlotParam(a, b, c, d, e, f) -and u_slotsig st = - let a,b,c,d,e,f = u_tup6 u_string u_ty u_tyar_specs u_tyar_specs (u_list (u_list u_slotparam)) (u_option u_ty) st - TSlotSig(a,b,c,d,e,f) +and u_slotsig st = + let a, b, c, d, e, f = u_tup6 u_string u_ty u_tyar_specs u_tyar_specs (u_list (u_list u_slotparam)) (u_option u_ty) st + TSlotSig(a, b, c, d, e, f) -and u_method st = - let a,b,c,d,e,f = u_tup6 u_slotsig u_attribs u_tyar_specs (u_list u_Vals) u_expr u_dummy_range st - TObjExprMethod(a,b,c,d,e,f) +and u_method st = + let a, b, c, d, e, f = u_tup6 u_slotsig u_attribs u_tyar_specs (u_list u_Vals) u_expr u_dummy_range st + TObjExprMethod(a, b, c, d, e, f) and u_methods st = u_list u_method st @@ -2688,16 +2688,16 @@ let _ = fill_u_attribs (u_list u_attrib) let _ = fill_u_Vals (u_list u_Val) //--------------------------------------------------------------------------- -// Pickle/unpickle F# interface data +// Pickle/unpickle F# interface data //--------------------------------------------------------------------------- let pickleModuleOrNamespace mspec st = p_entity_spec mspec st -let pickleCcuInfo (minfo: PickledCcuInfo) st = - p_tup4 pickleModuleOrNamespace p_string p_bool (p_space 3) (minfo.mspec, minfo.compileTimeWorkingDir, minfo.usesQuotations,()) st +let pickleCcuInfo (minfo: PickledCcuInfo) st = + p_tup4 pickleModuleOrNamespace p_string p_bool (p_space 3) (minfo.mspec, minfo.compileTimeWorkingDir, minfo.usesQuotations, ()) st + +let unpickleModuleOrNamespace st = u_entity_spec st -let unpickleModuleOrNamespace st = u_entity_spec st - -let unpickleCcuInfo st = - let a,b,c,_space = u_tup4 unpickleModuleOrNamespace u_string u_bool (u_space 3) st +let unpickleCcuInfo st = + let a, b, c, _space = u_tup4 unpickleModuleOrNamespace u_string u_bool (u_space 3) st { mspec=a; compileTimeWorkingDir=b; usesQuotations=c } diff --git a/src/fcs-fable/src/fsharp/TypeChecker.fs b/src/fcs-fable/src/fsharp/TypeChecker.fs index 4865bf8b3a..72c3a216a8 100755 --- a/src/fcs-fable/src/fsharp/TypeChecker.fs +++ b/src/fcs-fable/src/fsharp/TypeChecker.fs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -/// The typechecker. Left-to-right constrained type checking +/// The typechecker. Left-to-right constrained type checking /// with generalization at appropriate points. module internal FSharp.Compiler.TypeChecker @@ -56,7 +56,7 @@ exception BakedInMemberConstraintName of string * range exception FunctionExpected of DisplayEnv * TType * range exception NotAFunction of DisplayEnv * TType * range * range exception NotAFunctionButIndexer of DisplayEnv * TType * string option * range * range -exception Recursion of DisplayEnv * Ident * TType * TType * range +exception Recursion of DisplayEnv * Ident * TType * TType * range exception RecursiveUseCheckedAtRuntime of DisplayEnv * ValRef * range exception LetRecEvaluatedOutOfOrder of DisplayEnv * ValRef * ValRef * range exception LetRecCheckedAtRuntime of range @@ -127,15 +127,15 @@ type CtorInfo = } /// 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 +/// declarations because it refers to type inference variables. As type inference progresses /// these type inference variables may get solved. [] -type UngeneralizableItem(computeFreeTyvars : (unit -> FreeTyvars)) = +type UngeneralizableItem(computeFreeTyvars: (unit -> FreeTyvars)) = // Flag is for: have we determined that this item definitely has // no free type inference variables? This implies that - // (a) it will _never_ have any free type inference variables as further constraints are added to the system. - // (b) its set of FreeTycons will not change as further constraints are added to the system + // (a) it will _never_ have any free type inference variables as further constraints are added to the system. + // (b) its set of FreeTycons will not change as further constraints are added to the system let mutable willNeverHaveFreeTypars = false // If WillNeverHaveFreeTypars then we can cache the computation of FreeTycons, since they are invariant. @@ -164,7 +164,7 @@ type UngeneralizableItem(computeFreeTyvars : (unit -> FreeTyvars)) = [] type TcEnv = { /// Name resolution information - eNameResEnv : NameResolutionEnv + eNameResEnv: NameResolutionEnv /// The list of items in the environment that may contain free inference /// variables (which may not be generalized). The relevant types may @@ -200,16 +200,16 @@ type TcEnv = eModuleOrNamespaceTypeAccumulator: ModuleOrNamespaceType ref /// Context information for type checker - eContextInfo : ContextInfo + eContextInfo: ContextInfo /// Here Some tcref indicates we can access protected members in all super types eFamilyType: TyconRef option // Information to enforce special restrictions on valid expressions // for .NET constructors. - eCtorInfo : CtorInfo option + eCtorInfo: CtorInfo option - eCallerMemberName : string option + eCallerMemberName: string option } member tenv.DisplayEnv = tenv.eNameResEnv.DisplayEnv @@ -224,7 +224,7 @@ type TcEnv = let computeAccessRights eAccessPath eInternalsVisibleCompPaths eFamilyType = AccessibleFrom (eAccessPath :: eInternalsVisibleCompPaths, eFamilyType) // env.eAccessRights -let emptyTcEnv g = +let emptyTcEnv g = let cpath = compPathInternal // allow internal access initially { eNameResEnv = NameResolutionEnv.Empty g eUngeneralizableItems = [] @@ -265,19 +265,19 @@ let EnterFamilyRegion tcref env = let ExitFamilyRegion env = let eFamilyType = None match env.eFamilyType with - | None -> env // optimization to avoid reallocation + | None -> env // optimization to avoid reallocation | _ -> { env with - eAccessRights = computeAccessRights env.eAccessPath env.eInternalsVisibleCompPaths eFamilyType // update this computed field + eAccessRights = computeAccessRights env.eAccessPath env.eInternalsVisibleCompPaths eFamilyType // update this computed field eFamilyType = eFamilyType } -let AreWithinCtorShape env = match env.eCtorInfo with None -> false | Some ctorInfo -> ctorInfo.ctorShapeCounter > 0 -let AreWithinImplicitCtor env = match env.eCtorInfo with None -> false | Some ctorInfo -> ctorInfo.ctorIsImplicit -let GetCtorShapeCounter env = match env.eCtorInfo with None -> 0 | Some ctorInfo -> ctorInfo.ctorShapeCounter -let GetRecdInfo env = match env.eCtorInfo with None -> RecdExpr | Some ctorInfo -> if ctorInfo.ctorShapeCounter = 1 then RecdExprIsObjInit else RecdExpr +let AreWithinCtorShape env = match env.eCtorInfo with None -> false | Some ctorInfo -> ctorInfo.ctorShapeCounter > 0 +let AreWithinImplicitCtor env = match env.eCtorInfo with None -> false | Some ctorInfo -> ctorInfo.ctorIsImplicit +let GetCtorShapeCounter env = match env.eCtorInfo with None -> 0 | Some ctorInfo -> ctorInfo.ctorShapeCounter +let GetRecdInfo env = match env.eCtorInfo with None -> RecdExpr | Some ctorInfo -> if ctorInfo.ctorShapeCounter = 1 then RecdExprIsObjInit else RecdExpr -let AdjustCtorShapeCounter f env = {env with eCtorInfo = Option.map (fun ctorInfo -> { ctorInfo with ctorShapeCounter = f ctorInfo.ctorShapeCounter }) env.eCtorInfo } -let ExitCtorShapeRegion env = AdjustCtorShapeCounter (fun _ -> 0) env +let AdjustCtorShapeCounter f env = {env with eCtorInfo = Option.map (fun ctorInfo -> { ctorInfo with ctorShapeCounter = f ctorInfo.ctorShapeCounter }) env.eCtorInfo } +let ExitCtorShapeRegion env = AdjustCtorShapeCounter (fun _ -> 0) env /// Add a type to the TcEnv, i.e. register it as ungeneralizable. let addFreeItemOfTy ty eUngeneralizableItems = @@ -301,7 +301,7 @@ let AddValListToNameEnv vs nenv = List.foldBack (fun v nenv -> AddValRefToNameEnv nenv (mkLocalValRef v)) vs nenv /// Adjust the TcEnv to make more things 'InternalsVisibleTo' -let addInternalsAccessibility env (ccu:CcuThunk) = +let addInternalsAccessibility env (ccu: CcuThunk) = let compPath = CompPath (ccu.ILScopeRef, []) let eInternalsVisibleCompPaths = compPath :: env.eInternalsVisibleCompPaths { env with @@ -309,13 +309,13 @@ let addInternalsAccessibility env (ccu:CcuThunk) = eInternalsVisibleCompPaths = compPath :: env.eInternalsVisibleCompPaths } /// Add a local value to TcEnv -let AddLocalValPrimitive (v:Val) env = +let AddLocalValPrimitive (v: Val) env = { env with eNameResEnv = AddValRefToNameEnv env.eNameResEnv (mkLocalValRef v) eUngeneralizableItems = addFreeItemOfTy v.Type env.eUngeneralizableItems } /// Add a table of local values to TcEnv -let AddLocalValMap tcSink scopem (vals:Val NameMap) env = +let AddLocalValMap tcSink scopem (vals: Val NameMap) env = let env = if vals.IsEmpty then env @@ -327,7 +327,7 @@ let AddLocalValMap tcSink scopem (vals:Val NameMap) env = env /// Add a list of local values to TcEnv and report them to the sink -let AddLocalVals tcSink scopem (vals:Val list) env = +let AddLocalVals tcSink scopem (vals: Val list) env = let env = if isNil vals then env @@ -347,7 +347,7 @@ let AddLocalVal tcSink scopem v env = env /// Add an exception definition to TcEnv and report it to the sink -let AddLocalExnDefnAndReport tcSink scopem env (exnc:Tycon) = +let AddLocalExnDefnAndReport tcSink scopem env (exnc: Tycon) = let env = { env with eNameResEnv = AddExceptionDeclsToNameEnv BulkAdd.No env.eNameResEnv (mkLocalEntityRef exnc) } // Also make VisualStudio think there is an identifier in scope at the range of the identifier text of its binding location CallEnvSink tcSink (exnc.Range, env.NameEnv, env.eAccessRights) @@ -385,7 +385,7 @@ let AddRootModuleOrNamespaceRefs g amap m env modrefs = { env with eNameResEnv = AddModuleOrNamespaceRefsToNameEnv g amap m true env.eAccessRights env.eNameResEnv modrefs } /// Adjust the TcEnv to account for a new referenced assembly -let AddNonLocalCcu g amap scopem env assemblyName (ccu:CcuThunk, internalsVisibleToAttributes) = +let AddNonLocalCcu g amap scopem env assemblyName (ccu: CcuThunk, internalsVisibleToAttributes) = let internalsVisible = internalsVisibleToAttributes @@ -410,7 +410,7 @@ let AddNonLocalCcu g amap scopem env assemblyName (ccu:CcuThunk, internalsVisib env /// Adjust the TcEnv to account for a fully processed "namespace" declaration in thie file -let AddLocalRootModuleOrNamespace tcSink g amap scopem env (mtyp:ModuleOrNamespaceType) = +let AddLocalRootModuleOrNamespace tcSink g amap scopem env (mtyp: ModuleOrNamespaceType) = // Compute the top-rooted module or namespace references let modrefs = mtyp.ModuleAndNamespaceDefinitions |> List.map mkLocalModRef // Compute the top-rooted type definitions @@ -434,14 +434,14 @@ let AddModuleAbbreviationAndReport tcSink scopem id modrefs env = env /// Add a "module X = ..." definition to the TcEnv -let AddLocalSubModule g amap m env (modul:ModuleOrNamespace) = +let AddLocalSubModule g amap m env (modul: ModuleOrNamespace) = let env = { env with eNameResEnv = AddModuleOrNamespaceRefToNameEnv g amap m false env.eAccessRights env.eNameResEnv (mkLocalModRef modul) eUngeneralizableItems = addFreeItemOfModuleTy modul.ModuleOrNamespaceType env.eUngeneralizableItems } env /// Add a "module X = ..." definition to the TcEnv and report it to the sink -let AddLocalSubModuleAndReport tcSink scopem g amap m env (modul:ModuleOrNamespace) = +let AddLocalSubModuleAndReport tcSink scopem g amap m env (modul: ModuleOrNamespace) = let env = AddLocalSubModule g amap m env modul CallEnvSink tcSink (scopem, env.NameEnv, env.eAccessRights) env @@ -581,7 +581,7 @@ let MakeInnerEnvForTyconRef env tcref isExtrinsicExtension = eAccessPath = eAccessPath } /// Make an environment suitable for processing inside a member definition -let MakeInnerEnvForMember env (v:Val) = +let MakeInnerEnvForMember env (v: Val) = match v.MemberInfo with | None -> env | Some _ -> MakeInnerEnvForTyconRef env v.MemberApparentEntity v.IsExtensionMember @@ -590,7 +590,7 @@ let MakeInnerEnvForMember env (v:Val) = let GetCurrAccumulatedModuleOrNamespaceType env = !(env.eModuleOrNamespaceTypeAccumulator) /// Set the current accumulator for the namespace/module we're in, updating the inferred contents -let SetCurrAccumulatedModuleOrNamespaceType env x = env.eModuleOrNamespaceTypeAccumulator := x +let SetCurrAccumulatedModuleOrNamespaceType env x = env.eModuleOrNamespaceTypeAccumulator := x /// Set up the initial environment accounting for the enclosing "namespace X.Y.Z" definition let LocateEnv ccu env enclosingNamespacePath = @@ -606,21 +606,21 @@ let LocateEnv ccu env enclosingNamespacePath = env /// Given an inferred module type, place that inside a namespace path implied by a "namespace X.Y.Z" definition -let BuildRootModuleType enclosingNamespacePath (cpath:CompilationPath) mtyp = +let BuildRootModuleType enclosingNamespacePath (cpath: CompilationPath) mtyp = (enclosingNamespacePath, (cpath, (mtyp, []))) ||> List.foldBack (fun id (cpath, (mtyp, mspecs)) -> - let a, b = wrapModuleOrNamespaceTypeInNamespace id cpath.ParentCompPath mtyp + let a, b = wrapModuleOrNamespaceTypeInNamespace id cpath.ParentCompPath mtyp cpath.ParentCompPath, (a, b :: mspecs)) |> fun (_, (mtyp, mspecs)) -> mtyp, List.rev mspecs /// Given a resulting module expression, place that inside a namespace path implied by a "namespace X.Y.Z" definition -let BuildRootModuleExpr enclosingNamespacePath (cpath:CompilationPath) mexpr = +let BuildRootModuleExpr enclosingNamespacePath (cpath: CompilationPath) mexpr = (enclosingNamespacePath, (cpath, mexpr)) ||> List.foldBack (fun id (cpath, mexpr) -> (cpath.ParentCompPath, wrapModuleOrNamespaceExprInNamespace id cpath.ParentCompPath mexpr)) |> snd /// Try to take the "FSINNN" prefix off a namespace path -let TryStripPrefixPath (g:TcGlobals) (enclosingNamespacePath: Ident list) = +let TryStripPrefixPath (g: TcGlobals) (enclosingNamespacePath: Ident list) = match enclosingNamespacePath with | p::rest when g.isInteractive && @@ -708,7 +708,7 @@ let UnifyRefTupleType contextInfo cenv denv m ty ps = ptys /// Allow the inference of structness from the known type, e.g. -/// let (x : struct (int * int)) = (3,4) +/// let (x: struct (int * int)) = (3,4) let UnifyTupleTypeAndInferCharacteristics contextInfo cenv denv m knownTy isExplicitStruct ps = let tupInfo, ptys = if isAnyTupleTy cenv.g knownTy then @@ -775,7 +775,7 @@ let UnifyFunctionType extraInfo cenv denv mFunExpr ty = | ValueNone -> match extraInfo with | Some argm -> error (NotAFunction(denv, ty, mFunExpr, argm)) - | None -> error (FunctionExpected(denv, ty, mFunExpr)) + | None -> error (FunctionExpected(denv, ty, mFunExpr)) let ReportImplicitlyIgnoredBoolExpression denv m ty expr = let checkExpr m expr = @@ -815,7 +815,7 @@ let ReportImplicitlyIgnoredBoolExpression denv m ty expr = extractNext inner | expr -> checkExpr m expr -let UnifyUnitType cenv (env:TcEnv) m ty expr = +let UnifyUnitType cenv (env: TcEnv) m ty expr = let denv = env.DisplayEnv if AddCxTypeEqualsTypeUndoIfFailed denv cenv.css m ty cenv.g.unit_ty then true @@ -848,15 +848,15 @@ let UnifyUnitType cenv (env:TcEnv) m ty expr = // Logically extends System.AttributeTargets module AttributeTargets = - let FieldDecl = AttributeTargets.Field ||| AttributeTargets.Property + let FieldDecl = AttributeTargets.Field ||| AttributeTargets.Property let FieldDeclRestricted = AttributeTargets.Field - let UnionCaseDecl = AttributeTargets.Method ||| AttributeTargets.Property + let UnionCaseDecl = AttributeTargets.Method ||| AttributeTargets.Property let TyconDecl = AttributeTargets.Class ||| AttributeTargets.Interface ||| AttributeTargets.Delegate ||| AttributeTargets.Struct ||| AttributeTargets.Enum let ExnDecl = AttributeTargets.Class let ModuleDecl = AttributeTargets.Class let Top = AttributeTargets.Assembly ||| AttributeTargets.Module ||| AttributeTargets.Method -let ForNewConstructors tcSink (env:TcEnv) mObjTy methodName meths = +let ForNewConstructors tcSink (env: TcEnv) mObjTy methodName meths = let origItem = Item.CtorGroup(methodName, meths) let callSink (item, minst) = CallNameResolutionSink tcSink (mObjTy, env.NameEnv, item, origItem, minst, ItemOccurence.Use, env.DisplayEnv, env.eAccessRights) let sendToSink minst refinedMeths = callSink (Item.CtorGroup(methodName, refinedMeths), minst) @@ -908,7 +908,7 @@ let TcConst cenv ty m env c = | SynConst.Measure(_, SynMeasure.Anon _) -> (mkAppTy tcr [TType_measure (Measure.Var (NewAnonTypar (TyparKind.Measure, m, TyparRigidity.Anon, (if iszero then NoStaticReq else HeadTypeStaticReq), TyparDynamicReq.No)))]) - | SynConst.Measure(_, ms) -> mkAppTy tcr [TType_measure (tcMeasure ms)] + | SynConst.Measure(_, ms) -> mkAppTy tcr [TType_measure (tcMeasure ms)] | _ -> mkAppTy tcr [TType_measure Measure.One] unif measureTy @@ -919,19 +919,19 @@ let TcConst cenv ty m env c = | SynConst.Int16 i -> unif cenv.g.int16_ty; Const.Int16 i | SynConst.Int32 i -> unif cenv.g.int_ty; Const.Int32 i | SynConst.Int64 i -> unif cenv.g.int64_ty; Const.Int64 i - | SynConst.IntPtr i -> unif cenv.g.nativeint_ty; Const.IntPtr i + | SynConst.IntPtr i -> unif cenv.g.nativeint_ty; Const.IntPtr i | SynConst.Byte i -> unif cenv.g.byte_ty; Const.Byte i | SynConst.UInt16 i -> unif cenv.g.uint16_ty; Const.UInt16 i | SynConst.UInt32 i -> unif cenv.g.uint32_ty; Const.UInt32 i | SynConst.UInt64 i -> unif cenv.g.uint64_ty; Const.UInt64 i | SynConst.UIntPtr i -> unif cenv.g.unativeint_ty; Const.UIntPtr i | SynConst.Measure(SynConst.Single f, _) | SynConst.Single f -> unifyMeasureArg (f=0.0f) cenv.g.pfloat32_tcr c; Const.Single f - | SynConst.Measure(SynConst.Double f, _) | SynConst.Double f -> unifyMeasureArg (f=0.0) cenv.g.pfloat_tcr c; Const.Double f - | SynConst.Measure(SynConst.Decimal s, _) | SynConst.Decimal s -> unifyMeasureArg false cenv.g.pdecimal_tcr c; Const.Decimal s - | SynConst.Measure(SynConst.SByte i, _) | SynConst.SByte i -> unifyMeasureArg (i=0y) cenv.g.pint8_tcr c; Const.SByte i - | SynConst.Measure(SynConst.Int16 i, _) | SynConst.Int16 i -> unifyMeasureArg (i=0s) cenv.g.pint16_tcr c; Const.Int16 i - | SynConst.Measure(SynConst.Int32 i, _) | SynConst.Int32 i -> unifyMeasureArg (i=0) cenv.g.pint_tcr c; Const.Int32 i - | SynConst.Measure(SynConst.Int64 i, _) | SynConst.Int64 i -> unifyMeasureArg (i=0L) cenv.g.pint64_tcr c; Const.Int64 i + | SynConst.Measure(SynConst.Double f, _) | SynConst.Double f -> unifyMeasureArg (f=0.0) cenv.g.pfloat_tcr c; Const.Double f + | SynConst.Measure(SynConst.Decimal s, _) | SynConst.Decimal s -> unifyMeasureArg false cenv.g.pdecimal_tcr c; Const.Decimal s + | SynConst.Measure(SynConst.SByte i, _) | SynConst.SByte i -> unifyMeasureArg (i=0y) cenv.g.pint8_tcr c; Const.SByte i + | SynConst.Measure(SynConst.Int16 i, _) | SynConst.Int16 i -> unifyMeasureArg (i=0s) cenv.g.pint16_tcr c; Const.Int16 i + | SynConst.Measure(SynConst.Int32 i, _) | SynConst.Int32 i -> unifyMeasureArg (i=0) cenv.g.pint_tcr c; Const.Int32 i + | SynConst.Measure(SynConst.Int64 i, _) | SynConst.Int64 i -> unifyMeasureArg (i=0L) cenv.g.pint64_tcr c; Const.Int64 i | SynConst.Char c -> unif cenv.g.char_ty; Const.Char c | SynConst.String (s, _) -> unif cenv.g.string_ty; Const.String s | SynConst.UserNum _ -> error (InternalError(FSComp.SR.tcUnexpectedBigRationalConstant(), m)) @@ -941,13 +941,13 @@ let TcConst cenv ty m env c = | SynConst.Bytes _ -> error (InternalError(FSComp.SR.tcUnexpectedConstByteArray(), m)) /// Convert an Abstract IL ILFieldInit value read from .NET metadata to a TAST constant -let TcFieldInit (_m:range) lit = PatternMatchCompilation.ilFieldToTastConst lit +let TcFieldInit (_m: range) lit = PatternMatchCompilation.ilFieldToTastConst lit //------------------------------------------------------------------------- // Arities. These serve two roles in the system: -// 1. syntactic arities come from the syntactic forms found +// 1. syntactic arities come from the syntactic forms found // signature files and the syntactic forms of function and member definitions. -// 2. compiled arities representing representation choices w.r.t. internal representations of +// 2. compiled arities representing representation choices w.r.t. internal representations of // functions and members. //------------------------------------------------------------------------- @@ -1002,17 +1002,17 @@ let TranslatePartialArity tps (PartialValReprInfo (argsData, retData)) = // Members //------------------------------------------------------------------------- -let ComputeLogicalName (id:Ident) memberFlags = +let ComputeLogicalName (id: Ident) memberFlags = match memberFlags.MemberKind with | MemberKind.ClassConstructor -> ".cctor" | MemberKind.Constructor -> ".ctor" | MemberKind.Member -> match id.idText with - | (".ctor" | ".cctor") as r -> errorR(Error(FSComp.SR.tcInvalidMemberNameCtor(), id.idRange)); r + | (".ctor" | ".cctor") as r -> errorR(Error(FSComp.SR.tcInvalidMemberNameCtor(), id.idRange)); r | r -> r - | MemberKind.PropertyGetSet -> error(InternalError(FSComp.SR.tcMemberKindPropertyGetSetNotExpected(), id.idRange)) - | MemberKind.PropertyGet -> "get_" + id.idText - | MemberKind.PropertySet -> "set_" + id.idText + | MemberKind.PropertyGetSet -> error(InternalError(FSComp.SR.tcMemberKindPropertyGetSetNotExpected(), id.idRange)) + | MemberKind.PropertyGet -> "get_" + id.idText + | MemberKind.PropertySet -> "set_" + id.idText /// ValMemberInfoTransient(memberInfo, logicalName, compiledName) type ValMemberInfoTransient = ValMemberInfoTransient of ValMemberInfo * string * string @@ -1020,10 +1020,10 @@ type ValMemberInfoTransient = ValMemberInfoTransient of ValMemberInfo * string * /// Make the unique "name" for a member. // // optImplSlotTy = None (for classes) or Some ty (when implementing interface type ty) -let MakeMemberDataAndMangledNameForMemberVal(g, tcref, isExtrinsic, attrs, optImplSlotTys, memberFlags, valSynData, id, isCompGen) = +let MakeMemberDataAndMangledNameForMemberVal(g, tcref, isExtrinsic, attrs, optImplSlotTys, memberFlags, valSynData, id, isCompGen) = let logicalName = ComputeLogicalName id memberFlags let optIntfSlotTys = if optImplSlotTys |> List.forall (isInterfaceTy g) then optImplSlotTys else [] - let memberInfo : ValMemberInfo = + let memberInfo: ValMemberInfo = { ApparentEnclosingEntity=tcref MemberFlags=memberFlags IsImplemented=false @@ -1109,26 +1109,26 @@ type DeclKind = static member IsModuleOrMemberOrExtensionBinding x = match x with | ModuleOrMemberBinding -> true - | IntrinsicExtensionBinding -> true + | IntrinsicExtensionBinding -> true | ExtrinsicExtensionBinding -> true | ClassLetBinding _ -> false | ObjectExpressionOverrideBinding -> false | ExpressionBinding -> false - static member MustHaveArity x = DeclKind.IsModuleOrMemberOrExtensionBinding x + static member MustHaveArity x = DeclKind.IsModuleOrMemberOrExtensionBinding x member x.CanBeDllImport = match x with | ModuleOrMemberBinding -> true - | IntrinsicExtensionBinding -> true + | IntrinsicExtensionBinding -> true | ExtrinsicExtensionBinding -> true | ClassLetBinding _ -> true | ObjectExpressionOverrideBinding -> false | ExpressionBinding -> false - static member IsAccessModifierPermitted x = DeclKind.IsModuleOrMemberOrExtensionBinding x + static member IsAccessModifierPermitted x = DeclKind.IsModuleOrMemberOrExtensionBinding x - static member ImplicitlyStatic x = DeclKind.IsModuleOrMemberOrExtensionBinding x + static member ImplicitlyStatic x = DeclKind.IsModuleOrMemberOrExtensionBinding x static member AllowedAttribTargets memberFlagsOpt x = match x with @@ -1140,25 +1140,25 @@ type DeclKind = | Some flags when flags.MemberKind = MemberKind.PropertySet -> AttributeTargets.Property | Some _ -> AttributeTargets.Method | None -> AttributeTargets.Field ||| AttributeTargets.Method ||| AttributeTargets.Property - | IntrinsicExtensionBinding -> AttributeTargets.Method ||| AttributeTargets.Property + | IntrinsicExtensionBinding -> AttributeTargets.Method ||| AttributeTargets.Property | ExtrinsicExtensionBinding -> AttributeTargets.Method ||| AttributeTargets.Property | ClassLetBinding _ -> AttributeTargets.Field ||| AttributeTargets.Method | ExpressionBinding -> enum 0 // indicates attributes not allowed on expression 'let' bindings // Note: now always true - static member CanGeneralizeConstrainedTypars x = + static member CanGeneralizeConstrainedTypars x = match x with | ModuleOrMemberBinding -> true - | IntrinsicExtensionBinding -> true + | IntrinsicExtensionBinding -> true | ExtrinsicExtensionBinding -> true | ClassLetBinding _ -> true | ObjectExpressionOverrideBinding -> true | ExpressionBinding -> true - static member ConvertToLinearBindings x = + static member ConvertToLinearBindings x = match x with | ModuleOrMemberBinding -> true - | IntrinsicExtensionBinding -> true + | IntrinsicExtensionBinding -> true | ExtrinsicExtensionBinding -> true | ClassLetBinding _ -> true | ObjectExpressionOverrideBinding -> true @@ -1205,7 +1205,7 @@ type PrelimValScheme2 = Ident * TypeScheme * PartialValReprInfo option * - ValMemberInfoTransient option * + ValMemberInfoTransient option * bool * ValInline * ValBaseOrThisInfo * @@ -1222,8 +1222,8 @@ type ValScheme = Ident * TypeScheme * ValReprInfo option * - ValMemberInfoTransient option * - bool * // isMutable + ValMemberInfoTransient option * + bool * // isMutable ValInline * ValBaseOrThisInfo * SynAccess option * @@ -1302,11 +1302,11 @@ let PublishTypeDefn cenv env tycon = UpdateAccModuleOrNamespaceType cenv env (fun _ mty -> mty.AddEntity tycon) -let PublishValueDefnPrim cenv env (vspec:Val) = +let PublishValueDefnPrim cenv env (vspec: Val) = UpdateAccModuleOrNamespaceType cenv env (fun _ mty -> mty.AddVal vspec) -let PublishValueDefn cenv env declKind (vspec:Val) = +let PublishValueDefn cenv env declKind (vspec: Val) = if (declKind = ModuleOrMemberBinding) && ((GetCurrAccumulatedModuleOrNamespaceType env).ModuleOrNamespaceKind = Namespace) && (Option.isNone vspec.MemberInfo) then @@ -1335,7 +1335,7 @@ let PublishValueDefn cenv env declKind (vspec:Val) = let vref = mkLocalValRef vspec tcaug.tcaug_adhoc <- NameMultiMap.add vspec.LogicalName vref tcaug.tcaug_adhoc tcaug.tcaug_adhoc_list.Add (ValRefIsExplicitImpl cenv.g vref, vref) - | _ -> () + | _ -> () let CombineVisibilityAttribs vis1 vis2 m = match vis1 with @@ -1371,7 +1371,7 @@ let ComputeAccessAndCompPath env declKindOpt m vis overrideVis actualParent = let cpath = if accessModPermitted then Some env.eCompPath else None vis, cpath -let CheckForAbnormalOperatorNames cenv (idRange:range) coreDisplayName (memberInfoOpt: ValMemberInfo option) = +let CheckForAbnormalOperatorNames cenv (idRange: range) coreDisplayName (memberInfoOpt: ValMemberInfo option) = if (idRange.EndColumn - idRange.StartColumn <= 5) && not cenv.g.compilingFslib then @@ -1449,7 +1449,7 @@ let MakeAndPublishVal cenv env (altActualParent, inSig, declKind, vrec, vscheme, else let implflags = match TryFindFSharpAttribute cenv.g cenv.g.attrib_MethodImplAttribute attrs with - | Some (Attrib(_, _, [ AttribInt32Arg flags ], _, _, _, _)) -> flags + | Some (Attrib(_, _, [ AttribInt32Arg flags ], _, _, _, _)) -> flags | _ -> 0x0 // MethodImplOptions.NoInlining = 0x8 let NO_INLINING = 0x8 @@ -1538,14 +1538,14 @@ let MakeAndPublishVal cenv env (altActualParent, inSig, declKind, vrec, vscheme, let MakeAndPublishVals cenv env (altActualParent, inSig, declKind, vrec, valSchemes, attrs, doc, konst) = Map.foldBack - (fun name (valscheme:ValScheme) values -> + (fun name (valscheme: ValScheme) values -> Map.add name (MakeAndPublishVal cenv env (altActualParent, inSig, declKind, vrec, valscheme, attrs, doc, konst, false), valscheme.TypeScheme) values) valSchemes Map.empty let MakeAndPublishBaseVal cenv env baseIdOpt ty = baseIdOpt - |> Option.map (fun (id:Ident) -> + |> Option.map (fun (id: Ident) -> let valscheme = ValScheme(id, NonGenericTypeScheme(ty), None, None, false, ValInline.Never, BaseVal, None, false, false, false, false) MakeAndPublishVal cenv env (ParentNone, false, ExpressionBinding, ValNotInRecScope, valscheme, [], XmlDoc.Empty, None, false)) @@ -1594,7 +1594,7 @@ let MakeAndPublishSafeThisVal cenv env (thisIdOpt: Ident option) thisTy = /// Fixup the type instantiation at recursive references. Used after the bindings have been /// checked. The fixups are applied by using mutation. -let AdjustAndForgetUsesOfRecValue cenv (vrefTgt: ValRef) (valScheme : ValScheme) = +let AdjustAndForgetUsesOfRecValue cenv (vrefTgt: ValRef) (valScheme: ValScheme) = let (TypeScheme(generalizedTypars, _)) = valScheme.TypeScheme let fty = GeneralizedTypeForTypeScheme valScheme.TypeScheme let lvrefTgt = vrefTgt.Deref @@ -1624,7 +1624,7 @@ let AdjustAndForgetUsesOfRecValue cenv (vrefTgt: ValRef) (valScheme : ValScheme) /// Set the properties of recursive values that are only fully known after inference is complete -let AdjustRecType _cenv (vspec:Val) (ValScheme(_, typeScheme, topValData, _, _, _, _, _, _, _, _, _)) = +let AdjustRecType _cenv (vspec: Val) (ValScheme(_, typeScheme, topValData, _, _, _, _, _, _, _, _, _)) = let fty = GeneralizedTypeForTypeScheme typeScheme vspec.SetType fty vspec.SetValReprInfo topValData @@ -1674,10 +1674,10 @@ let ChooseCanonicalValSchemeAfterInference g denv valscheme m = let valscheme = ValScheme(id, typeScheme, arityInfo, memberInfoOpt, isMutable, inlineFlag, baseOrThis, vis, compgen, isIncrClass, isTyFunc, hasDeclaredTypars) valscheme -let PlaceTyparsInDeclarationOrder declaredTypars generalizedTypars = +let PlaceTyparsInDeclarationOrder declaredTypars generalizedTypars = declaredTypars @ (generalizedTypars |> List.filter (fun tp -> not (ListSet.contains typarEq tp declaredTypars))) -let SetTyparRigid _g denv m (tp:Typar) = +let SetTyparRigid _g denv m (tp: Typar) = match tp.Solution with | None -> () | Some ty -> @@ -1700,7 +1700,7 @@ let GeneralizeVal cenv denv enclosingDeclaredTypars generalizedTyparsForThisBind // Trim out anything not in type of the value (as opposed to the type of the r.h.s) // This is important when a single declaration binds // multiple generic items, where each item does not use all the polymorphism - // of the r.h.s. , e.g. let x, y = None, [] + // of the r.h.s., e.g. let x, y = None, [] let computeRelevantTypars thruFlag = let ftps = freeInTypeLeftToRight cenv.g thruFlag ty let generalizedTypars = generalizedTyparsForThisBinding |> List.filter (fun tp -> ListSet.contains typarEq tp ftps) @@ -1733,7 +1733,7 @@ let DontGeneralizeVals types = let InferGenericArityFromTyScheme (TypeScheme(generalizedTypars, _)) partialValReprInfo = TranslatePartialArity generalizedTypars partialValReprInfo -let ComputeIsTyFunc(id:Ident, hasDeclaredTypars, arityInfo:ValReprInfo option) = +let ComputeIsTyFunc(id: Ident, hasDeclaredTypars, arityInfo: ValReprInfo option) = hasDeclaredTypars && (match arityInfo with | None -> error(Error(FSComp.SR.tcExplicitTypeParameterInvalid(), id.idRange)) @@ -1751,42 +1751,42 @@ let UseSyntacticArity declKind typeScheme partialValReprInfo = // // For example // let f (a, b) c = 1 // gets arity [2;1] -// let f (a:int*int) = 1 // gets arity [2], based on type +// let f (a: int*int) = 1 // gets arity [2], based on type // let f () = 1 // gets arity [0] -// let f = (fun (x:int) (y:int) -> 1) // gets arity [1;1] -// let f = (fun (x:int*int) y -> 1) // gets arity [2;1] +// let f = (fun (x: int) (y: int) -> 1) // gets arity [1;1] +// let f = (fun (x: int*int) y -> 1) // gets arity [2;1] // // Some of this arity inference is purely syntax directed and done in InferSynValData in ast.fs // Some is done by InferArityOfExpr. // // However, there are some corner cases in this specification. In particular, consider -// let f () () = 1 // [0;1] or [0;0]? Answer: [0;1] -// let f (a:unit) = 1 // [0] or [1]? Answer: [1] -// let f = (fun () -> 1) // [0] or [1]? Answer: [0] -// let f = (fun (a:unit) -> 1) // [0] or [1]? Answer: [1] +// let f () () = 1 // [0;1] or [0;0]? Answer: [0;1] +// let f (a: unit) = 1 // [0] or [1]? Answer: [1] +// let f = (fun () -> 1) // [0] or [1]? Answer: [0] +// let f = (fun (a: unit) -> 1) // [0] or [1]? Answer: [1] // // The particular choice of [1] for -// let f (a:unit) = 1 +// let f (a: unit) = 1 // is intended to give a disambiguating form for members that override methods taking a single argument // instantiated to type "unit", e.g. // type Base<'a> = -// abstract M : 'a -> unit +// abstract M: 'a -> unit // // { new Base with -// member x.M(v:int) = () } +// member x.M(v: int) = () } // // { new Base with -// member x.M(v:unit) = () } +// member x.M(v: unit) = () } // let CombineSyntacticAndInferredArities g declKind rhsExpr prelimScheme = let (PrelimValScheme2(_, typeScheme, partialValReprInfoOpt, memberInfoOpt, isMutable, _, _, ArgAndRetAttribs(argAttribs, retAttribs), _, _, _)) = prelimScheme match partialValReprInfoOpt, DeclKind.MustHaveArity declKind with - | _ , false -> None - | None , true -> Some(PartialValReprInfo([], ValReprInfo.unnamedRetVal)) + | _, false -> None + | None, true -> Some(PartialValReprInfo([], ValReprInfo.unnamedRetVal)) // Don't use any expression information for members, where syntax dictates the arity completely | _ when memberInfoOpt.IsSome -> partialValReprInfoOpt - | Some(partialValReprInfoFromSyntax), true -> + | Some(partialValReprInfoFromSyntax), true -> let (PartialValReprInfo(curriedArgInfosFromSyntax, retInfoFromSyntax)) = partialValReprInfoFromSyntax let partialArityInfo = if isMutable then @@ -1835,10 +1835,10 @@ let UseNoArity prelimScheme = BuildValScheme ExpressionBinding None prelimScheme let MakeSimpleVals cenv env names = - let tyschemes = DontGeneralizeVals names + let tyschemes = DontGeneralizeVals names let valSchemes = NameMap.map UseNoArity tyschemes - let values = MakeAndPublishVals cenv env (ParentNone, false, ExpressionBinding, ValNotInRecScope, valSchemes, [], XmlDoc.Empty, None) - let vspecMap = NameMap.map fst values + let values = MakeAndPublishVals cenv env (ParentNone, false, ExpressionBinding, ValNotInRecScope, valSchemes, [], XmlDoc.Empty, None) + let vspecMap = NameMap.map fst values values, vspecMap let MakeAndPublishSimpleVals cenv env m names mergeNamesInOneNameresEnv = @@ -1894,7 +1894,7 @@ let MakeAndPublishSimpleVals cenv env m names mergeNamesInOneNameresEnv = values, vspecMap - let envinner = AddLocalValMap cenv.tcSink m vspecMap env + let envinner = AddLocalValMap cenv.tcSink m vspecMap env envinner, values, vspecMap @@ -1904,7 +1904,7 @@ let MakeAndPublishSimpleVals cenv env m names mergeNamesInOneNameresEnv = // to C<_> occurs then generate C for a fresh type inference variable ?ty. //------------------------------------------------------------------------- -let FreshenTyconRef m rigid (tcref:TyconRef) declaredTyconTypars = +let FreshenTyconRef m rigid (tcref: TyconRef) declaredTyconTypars = let tpsorig = declaredTyconTypars let tps = copyTypars tpsorig if rigid <> TyparRigidity.Rigid then @@ -1923,7 +1923,7 @@ let FreshenPossibleForallTy g m rigid ty = let tps, renaming, tinst = CopyAndFixupTypars m rigid tpsorig tpsorig, tps, tinst, instType renaming tau -let infoOfTyconRef m (tcref:TyconRef) = +let infoOfTyconRef m (tcref: TyconRef) = let tps, renaming, tinst = FreshenTypeInst m (tcref.Typars m) tps, renaming, tinst, TType_app (tcref, tinst) @@ -2028,7 +2028,7 @@ let rec ApplyUnionCaseOrExn (makerForUnionCase, makerForExnTag) m cenv env overa let ad = env.eAccessRights match item with | Item.ExnCase ecref -> - CheckEntityAttributes cenv.g ecref m |> CommitOperationResult + CheckEntityAttributes cenv.g ecref m |> CommitOperationResult UnifyTypes cenv env m overallTy cenv.g.exn_ty CheckTyconAccessible cenv.amap m ad ecref |> ignore let mkf = makerForExnTag ecref @@ -2073,19 +2073,19 @@ let TcUnionCaseOrExnField cenv (env: TcEnv) ty1 m c n funcs = mkf, ty2 //------------------------------------------------------------------------- -// Environment of explicit type parameters, e.g. 'a in "(x : 'a)" +// Environment of explicit type parameters, e.g. 'a in "(x: 'a)" //------------------------------------------------------------------------- type SyntacticUnscopedTyparEnv = UnscopedTyparEnv of NameMap -let emptyUnscopedTyparEnv : SyntacticUnscopedTyparEnv = UnscopedTyparEnv Map.empty +let emptyUnscopedTyparEnv: SyntacticUnscopedTyparEnv = UnscopedTyparEnv Map.empty let AddUnscopedTypar n p (UnscopedTyparEnv tab) = UnscopedTyparEnv (Map.add n p tab) let TryFindUnscopedTypar n (UnscopedTyparEnv tab) = Map.tryFind n tab let HideUnscopedTypars typars (UnscopedTyparEnv tab) = - UnscopedTyparEnv (List.fold (fun acc (tp:Typar) -> Map.remove tp.Name acc) tab typars) + UnscopedTyparEnv (List.fold (fun acc (tp: Typar) -> Map.remove tp.Name acc) tab typars) //------------------------------------------------------------------------- // Helpers for generalizing type variables @@ -2158,7 +2158,7 @@ module GeneralizationHelpers = canGeneralizeOp && List.forall (IsGeneralizableValue g) args - | Expr.LetRec(binds, body, _, _) -> + | Expr.LetRec(binds, body, _, _) -> binds |> List.forall (fun b -> not b.Var.IsMutable) && binds |> List.forall (fun b -> IsGeneralizableValue g b.Expr) && IsGeneralizableValue g body @@ -2188,7 +2188,7 @@ module GeneralizationHelpers = /// For non-generalized type variables be careful to iteratively knock out /// both the typars and any typars free in the constraints of the typars /// into the set that are considered free in the environment. - let rec TrimUngeneralizableTypars genConstrainedTyparFlag inlineFlag (generalizedTypars:Typar list) freeInEnv = + let rec TrimUngeneralizableTypars genConstrainedTyparFlag inlineFlag (generalizedTypars: Typar list) freeInEnv = // Do not generalize type variables with a static requirement unless function is marked 'inline' let generalizedTypars, ungeneralizableTypars1 = if inlineFlag = ValInline.PseudoVal then generalizedTypars, [] @@ -2221,7 +2221,7 @@ module GeneralizationHelpers = TrimUngeneralizableTypars genConstrainedTyparFlag inlineFlag generalizedTypars freeInEnv /// Condense type variables in positive position - let CondenseTypars (cenv, denv:DisplayEnv, generalizedTypars: Typars, tauTy, m) = + let CondenseTypars (cenv, denv: DisplayEnv, generalizedTypars: Typars, tauTy, m) = // The type of the value is ty11 * ... * ty1N -> ... -> tyM1 * ... * tyMM -> retTy // This is computed REGARDLESS of the arity of the expression. @@ -2232,7 +2232,7 @@ module GeneralizationHelpers = let returnTypeFreeTypars = freeInTypeLeftToRight cenv.g false retTy let allUntupledArgTysWithFreeVars = allUntupledArgTys |> List.map (fun ty -> (ty, freeInTypeLeftToRight cenv.g false ty)) - let relevantUniqueSubtypeConstraint (tp:Typar) = + let relevantUniqueSubtypeConstraint (tp: Typar) = // Find a single subtype constraint match tp.Constraints |> List.partition (function (TyparConstraint.CoercesTo _) -> true | _ -> false) with | [TyparConstraint.CoercesTo(cxty, _)], others -> @@ -2255,7 +2255,7 @@ module GeneralizationHelpers = | None -> [] | _ -> []) - let IsCondensationTypar (tp:Typar) = + let IsCondensationTypar (tp: Typar) = // A condensation typar may not a user-generated type variable nor has it been unified with any user type variable (tp.DynamicReq = TyparDynamicReq.No) && // A condensation typar must have a single constraint "'a :> A" @@ -2284,9 +2284,9 @@ module GeneralizationHelpers = |> RaiseOperationResult let ComputeAndGeneralizeGenericTypars (cenv, - denv:DisplayEnv, + denv: DisplayEnv, m, - freeInEnv:FreeTypars, + freeInEnv: FreeTypars, canInferTypars, genConstrainedTyparFlag, inlineFlag, @@ -2317,7 +2317,7 @@ module GeneralizationHelpers = if canInferTypars then generalizedTypars else generalizedTypars |> List.filter (fun tp -> ListSet.contains typarEq tp allDeclaredTypars) - let allConstraints = List.collect (fun (tp:Typar) -> tp.Constraints) generalizedTypars + let allConstraints = List.collect (fun (tp: Typar) -> tp.Constraints) generalizedTypars let generalizedTypars = ConstraintSolver.SimplifyMeasuresInTypeScheme cenv.g resultFirst generalizedTypars tauTy allConstraints // Generalization turns inference type variables into rigid, quantified type variables, @@ -2363,7 +2363,7 @@ module GeneralizationHelpers = // can't infer extra polymorphism for properties | MemberKind.PropertyGet | MemberKind.PropertySet -> false // can't infer extra polymorphism for class constructors - | MemberKind.ClassConstructor -> false + | MemberKind.ClassConstructor -> false // can't infer extra polymorphism for constructors | MemberKind.Constructor -> false // feasible to infer extra polymorphism @@ -2410,17 +2410,17 @@ let ComputeInlineFlag memFlagsOption isInline isMutable m = // // This is because the first lambda in a function definition "let F x = e" // now looks like a constructor application, i.e. let (F x) = e ... -// also let A.F x = e ... -// also let f x = e ... +// also let A.F x = e ... +// also let f x = e ... // // The other parts turn property definitions into method definitions. //------------------------------------------------------------------------- // NormalizedBindingRhs records the r.h.s. of a binding after some munging just before type checking. -// NOTE: This is a bit of a mess. In the early implementation of F# we decided +// NOTE: This is a bit of a mess. In the early implementation of F# we decided // to have the parser convert "let f x = e" into -// "let f = fun x -> e". This is called "pushing" a pattern across to the right hand side. Complex +// "let f = fun x -> e". This is called "pushing" a pattern across to the right hand side. Complex // patterns (e.g. non-tuple patterns) result in a computation on the right. // However, this approach really isn't that great - especially since // the language is now considerably more complex, e.g. we use @@ -2434,7 +2434,7 @@ let ComputeInlineFlag memFlagsOption isInline isMutable m = type NormalizedBindingRhs = | NormalizedBindingRhs of SynSimplePats list * SynBindingReturnInfo option * SynExpr -let PushOnePatternToRhs (cenv:cenv) isMember p (NormalizedBindingRhs(spatsL, rtyOpt, rhsExpr)) = +let PushOnePatternToRhs (cenv: cenv) isMember p (NormalizedBindingRhs(spatsL, rtyOpt, rhsExpr)) = let spats, rhsExpr = PushPatternToExpr cenv.synArgNameGenerator isMember p rhsExpr NormalizedBindingRhs(spats::spatsL, rtyOpt, rhsExpr) @@ -2448,8 +2448,8 @@ type NormalizedBinding = | NormalizedBinding of SynAccess option * SynBindingKind * - bool * (* pesudo/mustinline value? *) - bool * (* mutable *) + bool * (* pesudo/mustinline value? *) + bool * (* mutable *) SynAttributes * XmlDoc * SynValTyparDecls * @@ -2469,7 +2469,7 @@ type IsObjExprBinding = module BindingNormalization = /// Push a bunch of pats at once. They may contain patterns, e.g. let f (A x) (B y) = ... /// In this case the semantics is let f a b = let A x = a in let B y = b - let private PushMultiplePatternsToRhs (cenv:cenv) isMember ps (NormalizedBindingRhs(spatsL, rtyOpt, rhsExpr)) = + let private PushMultiplePatternsToRhs (cenv: cenv) isMember ps (NormalizedBindingRhs(spatsL, rtyOpt, rhsExpr)) = let spatsL2, rhsExpr = PushCurriedPatternsToExpr cenv.synArgNameGenerator rhsExpr.Range isMember ps rhsExpr NormalizedBindingRhs(spatsL2@spatsL, rtyOpt, rhsExpr) @@ -2486,12 +2486,12 @@ module BindingNormalization = if memberFlags.IsInstance then // instance method without adhoc "this" argument error(Error(FSComp.SR.tcInstanceMemberRequiresTarget(), m)) - match args, memberFlags.MemberKind with - | _, MemberKind.PropertyGetSet -> error(Error(FSComp.SR.tcUnexpectedPropertyInSyntaxTree(), m)) + match args, memberFlags.MemberKind with + | _, MemberKind.PropertyGetSet -> error(Error(FSComp.SR.tcUnexpectedPropertyInSyntaxTree(), m)) | [], MemberKind.ClassConstructor -> error(Error(FSComp.SR.tcStaticInitializerRequiresArgument(), m)) - | [], MemberKind.Constructor -> error(Error(FSComp.SR.tcObjectConstructorRequiresArgument(), m)) + | [], MemberKind.Constructor -> error(Error(FSComp.SR.tcObjectConstructorRequiresArgument(), m)) | [_], MemberKind.ClassConstructor - | [_], MemberKind.Constructor -> MakeNormalizedStaticOrValBinding cenv ValOrMemberBinding id vis typars args rhsExpr valSynData + | [_], MemberKind.Constructor -> MakeNormalizedStaticOrValBinding cenv ValOrMemberBinding id vis typars args rhsExpr valSynData // Static property declared using 'static member P = expr': transformed to a method taking a "unit" argument // static property: these transformed into methods taking one "unit" argument | [], MemberKind.Member -> @@ -2503,15 +2503,15 @@ module BindingNormalization = typars) | _ -> MakeNormalizedStaticOrValBinding cenv ValOrMemberBinding id vis typars args rhsExpr valSynData - let private NormalizeInstanceMemberBinding cenv memberFlags valSynData thisId memberId (toolId:Ident option) vis typars args m rhsExpr = + let private NormalizeInstanceMemberBinding cenv memberFlags valSynData thisId memberId (toolId: Ident option) vis typars args m rhsExpr = let (SynValData(_, valSynInfo, thisIdOpt)) = valSynData if not memberFlags.IsInstance then // static method with adhoc "this" argument error(Error(FSComp.SR.tcStaticMemberShouldNotHaveThis(), m)) - match args, memberFlags.MemberKind with - | _, MemberKind.ClassConstructor -> error(Error(FSComp.SR.tcExplicitStaticInitializerSyntax(), m)) - | _, MemberKind.Constructor -> error(Error(FSComp.SR.tcExplicitObjectConstructorSyntax(), m)) - | _, MemberKind.PropertyGetSet -> error(Error(FSComp.SR.tcUnexpectedPropertySpec(), m)) + match args, memberFlags.MemberKind with + | _, MemberKind.ClassConstructor -> error(Error(FSComp.SR.tcExplicitStaticInitializerSyntax(), m)) + | _, MemberKind.Constructor -> error(Error(FSComp.SR.tcExplicitObjectConstructorSyntax(), m)) + | _, MemberKind.PropertyGetSet -> error(Error(FSComp.SR.tcUnexpectedPropertySpec(), m)) // Instance property declared using 'x.Member': transformed to methods taking a "this" and a "unit" argument // We push across the 'this' arg in mk_rec_binds | [], MemberKind.Member -> @@ -2539,7 +2539,7 @@ module BindingNormalization = | None -> match ResolvePatternLongIdent cenv.tcSink nameResolver AllIdsOK true m ad env.eNameResEnv TypeNameResolutionInfo.Default longId with | Item.NewDef id -> - if id.idText = opNameCons then + if id.idText = opNameCons then NormalizedBindingPat(pat, rhsExpr, valSynData, typars) else if isObjExprBinding = ObjExprBinding then @@ -2552,8 +2552,8 @@ module BindingNormalization = match longId with // x.Member in member binding patterns. | [thisId;memberId] -> NormalizeInstanceMemberBinding cenv memberFlags valSynData thisId memberId toolId vis typars args m rhsExpr - | [memberId] -> NormalizeStaticMemberBinding cenv memberFlags valSynData memberId vis typars args m rhsExpr - | _ -> NormalizedBindingPat(pat, rhsExpr, valSynData, typars) + | [memberId] -> NormalizeStaticMemberBinding cenv memberFlags valSynData memberId vis typars args m rhsExpr + | _ -> NormalizedBindingPat(pat, rhsExpr, valSynData, typars) // Object constructors are normalized in TcLetrec // Here we are normalizing member definitions with simple (not long) ids, @@ -2598,7 +2598,7 @@ module EventDeclarationNormalization = // reconstitute valSynInfo by adding the argument let argInfos = match argInfos with - | [[thisArgInfo];[]] -> [[thisArgInfo];SynInfo.unnamedTopArg] // instance property getter + | [[thisArgInfo];[]] -> [[thisArgInfo];SynInfo.unnamedTopArg] // instance property getter | [[]] -> [SynInfo.unnamedTopArg] // static property getter | _ -> error(BadEventTransformation(m)) @@ -2623,7 +2623,7 @@ module EventDeclarationNormalization = match declPattern with | SynPat.FromParseError(p, _) -> RenameBindingPattern f p | SynPat.Typed(pat', _, _) -> RenameBindingPattern f pat' - | SynPat.Named (SynPat.Wild m1, id, x2, vis2, m) -> SynPat.Named (SynPat.Wild m1, ident(f id.idText, id.idRange) , x2, vis2, m) + | SynPat.Named (SynPat.Wild m1, id, x2, vis2, m) -> SynPat.Named (SynPat.Wild m1, ident(f id.idText, id.idRange), x2, vis2, m) | SynPat.InstanceMember(thisId, id, toolId, vis2, m) -> SynPat.InstanceMember(thisId, ident(f id.idText, id.idRange), toolId, vis2, m) | _ -> error(Error(FSComp.SR.tcOnlySimplePatternsInLetRec(), declPattern.Range)) @@ -2701,7 +2701,7 @@ let FreshenObjectArgType cenv m rigid tcref isExtrinsic declaredTyconTypars = // static member B2() = C.A() // // At this point during type inference, the return type of C.A() is '?X' // // After type inference, the return type of C.A() is 'int' -// member this.C() = (x : 'T) +// member this.C() = (x: 'T) // // At this point during type inference the type of 'x' is inferred to be 'T' // // Here "A" is generalized too early. @@ -2711,7 +2711,7 @@ let FreshenObjectArgType cenv m rigid tcref isExtrinsic declaredTyconTypars = // be accepted). As a result, we deal with this unsoundness by an adhoc post-type-checking // consistency check for recursive uses of "A" with explicit instantiations within the recursive // scope of "A". -let TcValEarlyGeneralizationConsistencyCheck cenv (env:TcEnv) (v:Val, vrec, tinst, vty, tau, m) = +let TcValEarlyGeneralizationConsistencyCheck cenv (env: TcEnv) (v: Val, vrec, tinst, vty, tau, m) = match vrec with | ValInRecScope isComplete when isComplete && not (isNil tinst) -> //printfn "pushing post-inference check for '%s', vty = '%s'" v.DisplayName (DebugPrint.showType vty) @@ -2719,7 +2719,7 @@ let TcValEarlyGeneralizationConsistencyCheck cenv (env:TcEnv) (v:Val, vrec, tins //printfn "running post-inference check for '%s'" v.DisplayName //printfn "tau = '%s'" (DebugPrint.showType tau) //printfn "vty = '%s'" (DebugPrint.showType vty) - let tpsorig, tau2 = tryDestForallTy cenv.g vty + let tpsorig, tau2 = tryDestForallTy cenv.g vty //printfn "tau2 = '%s'" (DebugPrint.showType tau2) if not (isNil tpsorig) then let tpsorig = NormalizeDeclaredTyparsForEquiRecursiveInference cenv.g tpsorig @@ -2740,17 +2740,17 @@ let TcValEarlyGeneralizationConsistencyCheck cenv (env:TcEnv) (v:Val, vrec, tins /// F# object model member, in which case the optInst is the type instantiation /// inferred by member overload resolution, and vrefFlags indicate if the /// member is being used in a special way, i.e. may be one of: -/// | CtorValUsedAsSuperInit "inherit Panel()" -/// | CtorValUsedAsSelfInit "new() = new OwnType(3)" -/// | VSlotDirectCall "base.OnClick(eventArgs)" -let TcVal checkAttributes cenv env tpenv (vref:ValRef) optInst optAfterResolution m = +/// | CtorValUsedAsSuperInit "inherit Panel()" +/// | CtorValUsedAsSelfInit "new() = new OwnType(3)" +/// | VSlotDirectCall "base.OnClick(eventArgs)" +let TcVal checkAttributes cenv env tpenv (vref: ValRef) optInst optAfterResolution m = let (tpsorig, _, _, _, tinst, _) as res = let v = vref.Deref let vrec = v.RecursiveValInfo v.SetHasBeenReferenced() CheckValAccessible m env.eAccessRights vref if checkAttributes then - CheckValAttributes cenv.g vref m |> CommitOperationResult + CheckValAttributes cenv.g vref m |> CommitOperationResult let vty = vref.Type // byref-typed values get dereferenced if isByrefTy cenv.g vty then @@ -2769,7 +2769,7 @@ let TcVal checkAttributes cenv env tpenv (vref:ValRef) optInst optAfterResolutio | None -> // References to 'this' in classes get dereferenced from their implicit reference cell and poked - if v.BaseOrThisInfo = CtorThisVal && isRefCellTy cenv.g vty then + if v.BaseOrThisInfo = CtorThisVal && isRefCellTy cenv.g vty then let exprForVal = exprForValRef m vref //if AreWithinCtorPreConstruct env then // warning(SelfRefObjCtor(AreWithinImplicitCtor env, m)) @@ -2789,7 +2789,7 @@ let TcVal checkAttributes cenv env tpenv (vref:ValRef) optInst optAfterResolutio match vrec with | ValInRecScope false -> - let tpsorig, tau = vref.TypeScheme + let tpsorig, tau = vref.TypeScheme let tinst = tpsorig |> List.map mkTyparTy tpsorig, NormalValUse, tinst, tau, tpenv | ValInRecScope true @@ -2799,13 +2799,13 @@ let TcVal checkAttributes cenv env tpenv (vref:ValRef) optInst optAfterResolutio // If we have got an explicit instantiation then use that | Some(vrefFlags, checkTys) -> - let checkInst (tinst:TypeInst) = + let checkInst (tinst: TypeInst) = if not v.IsMember && not v.PermitsExplicitTypeInstantiation && not (List.isEmpty tinst) && not (List.isEmpty v.Typars) then warning(Error(FSComp.SR.tcDoesNotAllowExplicitTypeArguments(v.DisplayName), m)) match vrec with | ValInRecScope false -> - let tpsorig, tau = vref.TypeScheme - let (tinst:TypeInst), tpenv = checkTys tpenv (tpsorig |> List.map (fun tp -> tp.Kind)) + let tpsorig, tau = vref.TypeScheme + let (tinst: TypeInst), tpenv = checkTys tpenv (tpsorig |> List.map (fun tp -> tp.Kind)) checkInst tinst if tpsorig.Length <> tinst.Length then error(Error(FSComp.SR.tcTypeParameterArityMismatch(tpsorig.Length, tinst.Length), m)) let tau2 = instType (mkTyparInst tpsorig tinst) tau @@ -2817,7 +2817,7 @@ let TcVal checkAttributes cenv env tpenv (vref:ValRef) optInst optAfterResolutio | ValNotInRecScope -> let tpsorig, tps, tptys, tau = FreshenPossibleForallTy cenv.g m TyparRigidity.Flexible vty //dprintfn "After Freshen: tau = %s" (Layout.showL (typeL tau)) - let (tinst:TypeInst), tpenv = checkTys tpenv (tps |> List.map (fun tp -> tp.Kind)) + let (tinst: TypeInst), tpenv = checkTys tpenv (tps |> List.map (fun tp -> tp.Kind)) checkInst tinst //dprintfn "After Check: tau = %s" (Layout.showL (typeL tau)) if tptys.Length <> tinst.Length then error(Error(FSComp.SR.tcTypeParameterArityMismatch(tps.Length, tinst.Length), m)) @@ -2834,7 +2834,7 @@ let TcVal checkAttributes cenv env tpenv (vref:ValRef) optInst optAfterResolutio valRefEq cenv.g vref cenv.g.splice_expr_vref || valRefEq cenv.g vref cenv.g.splice_raw_expr_vref - let exprForVal = RecordUseOfRecValue cenv vrec vref exprForVal m + let exprForVal = RecordUseOfRecValue cenv vrec vref exprForVal m tpsorig, exprForVal, isSpecial, tau, tinst, tpenv @@ -2845,7 +2845,7 @@ let TcVal checkAttributes cenv env tpenv (vref:ValRef) optInst optAfterResolutio /// simplified version of TcVal used in calls to BuildMethodCall (typrelns.fs) /// this function is used on typechecking step for making calls to provided methods and on optimization step (for the same purpose). -let LightweightTcValForUsingInBuildMethodCall g (vref:ValRef) vrefFlags (vrefTypeInst : TTypes) m = +let LightweightTcValForUsingInBuildMethodCall g (vref: ValRef) vrefFlags (vrefTypeInst: TTypes) m = let v = vref.Deref let vty = vref.Type // byref-typed values get dereferenced @@ -2861,7 +2861,7 @@ let LightweightTcValForUsingInBuildMethodCall g (vref:ValRef) vrefFlags (vrefTyp let tau = // If we have got an explicit instantiation then use that let _, tps, tptys, tau = FreshenPossibleForallTy g m TyparRigidity.Flexible vty - if tptys.Length <> vrefTypeInst.Length then error(Error(FSComp.SR.tcTypeParameterArityMismatch(tps.Length, vrefTypeInst.Length), m)); + if tptys.Length <> vrefTypeInst.Length then error(Error(FSComp.SR.tcTypeParameterArityMismatch(tps.Length, vrefTypeInst.Length), m)) instType (mkTyparInst tps vrefTypeInst) tau let exprForVal = Expr.Val (vref, vrefFlags, m) @@ -2903,7 +2903,7 @@ type ApplicableExpr = member x.Expr = match x with - | ApplicableExpr(_, e, _) -> e + | ApplicableExpr(_, e, _) -> e let MakeApplicableExprNoFlex cenv expr = ApplicableExpr (cenv, expr, true) @@ -2914,7 +2914,7 @@ let MakeApplicableExprNoFlex cenv expr = /// De-condensation is determined BEFORE any arguments are checked. Thus /// let f (x:'a) (y:'a) = () /// -/// f (new obj()) "string" +/// f (new obj()) "string" /// /// does not type check (the argument instantiates 'a to "obj" but there is no flexibility on the /// second argument position. @@ -2931,9 +2931,9 @@ let MakeApplicableExprNoFlex cenv expr = /// /// For 'obj' this is because introducing this flexibility would NOT be the reverse of condensation, /// since we don't condense -/// f : 'a -> unit +/// f: 'a -> unit /// to -/// f : obj -> unit +/// f: obj -> unit /// /// We represent the flexibility in the TAST by leaving a function-to-function coercion node in the tree /// This "special" node is immediately eliminated by the use of IteratedFlexibleAdjustArityOfLambdaBody as soon as we @@ -2959,7 +2959,7 @@ let MakeApplicableExprWithFlex cenv (env: TcEnv) expr = then actualType else let flexibleType = NewInferenceType () - AddCxTypeMustSubsumeType ContextInfo.NoContext env.DisplayEnv cenv.css m NoTrace actualType flexibleType; + AddCxTypeMustSubsumeType ContextInfo.NoContext env.DisplayEnv cenv.css m NoTrace actualType flexibleType flexibleType) // Create a coercion to represent the expansion of the application @@ -3040,16 +3040,16 @@ let BuildPossiblyConditionalMethodCall cenv env isMutable m isProp minfo valUseF BuildMethodCall tcVal cenv.g cenv.amap isMutable m isProp minfo valUseFlags minst objArgs args -let TryFindIntrinsicOrExtensionMethInfo (cenv:cenv) (env: TcEnv) m ad nm ty = +let TryFindIntrinsicOrExtensionMethInfo (cenv: cenv) (env: TcEnv) m ad nm ty = AllMethInfosOfTypeInScope cenv.infoReader env.NameEnv (Some(nm), ad) IgnoreOverrides m ty /// Build the 'test and dispose' part of a 'use' statement -let BuildDisposableCleanup cenv env m (v:Val) = +let BuildDisposableCleanup cenv env m (v: Val) = v.SetHasBeenReferenced() let ad = env.eAccessRights let disposeMethod = match TryFindIntrinsicOrExtensionMethInfo cenv env m ad "Dispose" cenv.g.system_IDisposable_ty with - | [x] -> x + | [x] -> x | _ -> error(InternalError(FSComp.SR.tcCouldNotFindIDisposable(), m)) @@ -3074,13 +3074,13 @@ let BuildOffsetToStringData cenv env m = let ad = env.eAccessRights let offsetToStringDataMethod = match TryFindIntrinsicOrExtensionMethInfo cenv env m ad "get_OffsetToStringData" cenv.g.system_RuntimeHelpers_ty with - | [x] -> x + | [x] -> x | _ -> error(Error(FSComp.SR.tcCouldNotFindOffsetToStringData(), m)) let offsetExpr, _ = BuildPossiblyConditionalMethodCall cenv env NeverMutates m false offsetToStringDataMethod NormalValUse [] [] [] offsetExpr -let BuildILFieldGet g amap m objExpr (finfo:ILFieldInfo) = +let BuildILFieldGet g amap m objExpr (finfo: ILFieldInfo) = let fref = finfo.ILFieldRef let isValueType = finfo.IsValueType let valu = if isValueType then AsValue else AsObject @@ -3106,7 +3106,7 @@ let BuildILFieldGet g amap m objExpr (finfo:ILFieldInfo) = // Add an I_nop if this is an initonly field to make sure we never recognize it as an lvalue. See mkExprAddrOfExpr. wrap (mkAsmExpr (([ mkNormalLdfld fspec ] @ (if finfo.IsInitOnly then [ AI_nop ] else [])), tinst, [objExpr], [fieldType], m)) -let BuildILFieldSet g m objExpr (finfo:ILFieldInfo) argExpr = +let BuildILFieldSet g m objExpr (finfo: ILFieldInfo) argExpr = let fref = finfo.ILFieldRef let isValueType = finfo.IsValueType let valu = if isValueType then AsValue else AsObject @@ -3119,7 +3119,7 @@ let BuildILFieldSet g m objExpr (finfo:ILFieldInfo) argExpr = let wrap, objExpr, _readonly, _writeonly = mkExprAddrOfExpr g isValueType false DefinitelyMutates objExpr None m wrap (mkAsmExpr ([ mkNormalStfld fspec ], tinst, [objExpr; argExpr], [], m)) -let BuildILStaticFieldSet m (finfo:ILFieldInfo) argExpr = +let BuildILStaticFieldSet m (finfo: ILFieldInfo) argExpr = let fref = finfo.ILFieldRef let isValueType = finfo.IsValueType let valu = if isValueType then AsValue else AsObject @@ -3131,7 +3131,7 @@ let BuildILStaticFieldSet m (finfo:ILFieldInfo) argExpr = if finfo.IsInitOnly then error (Error (FSComp.SR.tcFieldIsReadonly(), m)) mkAsmExpr ([ mkNormalStsfld fspec ], tinst, [argExpr], [], m) -let BuildRecdFieldSet g m objExpr (rfinfo:RecdFieldInfo) argExpr = +let BuildRecdFieldSet g m objExpr (rfinfo: RecdFieldInfo) argExpr = let tgtTy = rfinfo.DeclaringType let valu = isStructTy g tgtTy let objExpr = if valu then objExpr else mkCoerceExpr(objExpr, tgtTy, m, tyOfExpr g objExpr) @@ -3149,12 +3149,12 @@ let (|BinOpExpr|_|) e = let (|SimpleEqualsExpr|_|) e = match e with - | BinOpExpr(opId, a, b) when opId.idText = opNameEquals -> Some (a, b) + | BinOpExpr(opId, a, b) when opId.idText = opNameEquals -> Some (a, b) | _ -> None // For join clauses that join on nullable, we syntactically insert the creation of nullable values on the appropriate side of the condition, // then pull the syntax apart again -let (|JoinRelation|_|) cenv env (e:SynExpr) = +let (|JoinRelation|_|) cenv env (e: SynExpr) = let m = e.Range let ad = env.eAccessRights @@ -3264,7 +3264,7 @@ let AnalyzeArbitraryExprAsEnumerable cenv (env: TcEnv) localAlloc m exprty expr // Ensure there are no curried arguments, and indeed no arguments at all - let hasArgs (minfo:MethInfo) minst = + let hasArgs (minfo: MethInfo) minst = match minfo.GetParamTypes(cenv.amap, m, minst) with | [[]] -> false | _ -> true @@ -3272,7 +3272,7 @@ let AnalyzeArbitraryExprAsEnumerable cenv (env: TcEnv) localAlloc m exprty expr let tryType (exprToSearchForGetEnumeratorAndItem, tyToSearchForGetEnumeratorAndItem) = match findMethInfo true m "GetEnumerator" tyToSearchForGetEnumeratorAndItem with | Exception e -> Exception e - | Result getEnumerator_minfo -> + | Result getEnumerator_minfo -> let getEnumerator_minst = FreshenMethInfo m getEnumerator_minfo let retTypeOfGetEnumerator = getEnumerator_minfo.GetFSharpReturnTy(cenv.amap, m, getEnumerator_minst) @@ -3280,11 +3280,11 @@ let AnalyzeArbitraryExprAsEnumerable cenv (env: TcEnv) localAlloc m exprty expr match findMethInfo false m "MoveNext" retTypeOfGetEnumerator with | Exception e -> Exception e - | Result moveNext_minfo -> + | Result moveNext_minfo -> let moveNext_minst = FreshenMethInfo m moveNext_minfo let retTypeOfMoveNext = moveNext_minfo.GetFSharpReturnTy(cenv.amap, m, moveNext_minst) - if not (typeEquiv cenv.g cenv.g.bool_ty retTypeOfMoveNext) then err false retTypeOfGetEnumerator else + if not (typeEquiv cenv.g cenv.g.bool_ty retTypeOfMoveNext) then err false retTypeOfGetEnumerator else if hasArgs moveNext_minfo moveNext_minst then err false retTypeOfGetEnumerator else match findMethInfo false m "get_Current" retTypeOfGetEnumerator with @@ -3293,7 +3293,7 @@ let AnalyzeArbitraryExprAsEnumerable cenv (env: TcEnv) localAlloc m exprty expr let get_Current_minst = FreshenMethInfo m get_Current_minfo if hasArgs get_Current_minfo get_Current_minst then err false retTypeOfGetEnumerator else - let enumElemTy = get_Current_minfo.GetFSharpReturnTy(cenv.amap, m, get_Current_minst) + let enumElemTy = get_Current_minfo.GetFSharpReturnTy(cenv.amap, m, get_Current_minst) // Compute the element type of the strongly typed enumerator // @@ -3307,11 +3307,11 @@ let AnalyzeArbitraryExprAsEnumerable cenv (env: TcEnv) localAlloc m exprty expr if isObjTy cenv.g enumElemTy then // Look for an 'Item' property, or a set of these with consistent return types - let allEquivReturnTypes (minfo:MethInfo) (others:MethInfo list) = + let allEquivReturnTypes (minfo: MethInfo) (others: MethInfo list) = let returnTy = minfo.GetFSharpReturnTy(cenv.amap, m, []) others |> List.forall (fun other -> typeEquiv cenv.g (other.GetFSharpReturnTy(cenv.amap, m, [])) returnTy) - let isInt32OrObjectIndexer (minfo:MethInfo) = + let isInt32OrObjectIndexer (minfo: MethInfo) = match minfo.GetParamTypes(cenv.amap, m, []) with | [[ty]] -> // e.g. MatchCollection @@ -3352,8 +3352,8 @@ let AnalyzeArbitraryExprAsEnumerable cenv (env: TcEnv) localAlloc m exprty expr else Tastops.mkCompGenLocal m "enumerator" retTypeOfGetEnumerator, retTypeOfGetEnumerator - let getEnumExpr, getEnumTy = - let (getEnumExpr, getEnumTy) as res = BuildPossiblyConditionalMethodCall cenv env PossiblyMutates m false getEnumerator_minfo NormalValUse getEnumerator_minst [exprToSearchForGetEnumeratorAndItem] [] + let getEnumExpr, getEnumTy = + let (getEnumExpr, getEnumTy) as res = BuildPossiblyConditionalMethodCall cenv env PossiblyMutates m false getEnumerator_minfo NormalValUse getEnumerator_minst [exprToSearchForGetEnumeratorAndItem] [] if not isEnumeratorTypeStruct || localAlloc then res else // wrap enumerators that are represented as mutable structs into ref cells @@ -3361,9 +3361,9 @@ let AnalyzeArbitraryExprAsEnumerable cenv (env: TcEnv) localAlloc m exprty expr let getEnumTy = mkRefCellTy cenv.g getEnumTy getEnumExpr, getEnumTy - let guardExpr , guardTy = BuildPossiblyConditionalMethodCall cenv env DefinitelyMutates m false moveNext_minfo NormalValUse moveNext_minst [enumeratorExpr] [] - let currentExpr, currentTy = BuildPossiblyConditionalMethodCall cenv env DefinitelyMutates m true get_Current_minfo NormalValUse get_Current_minst [enumeratorExpr] [] - let currentExpr = mkCoerceExpr(currentExpr, enumElemTy, currentExpr.Range, currentTy) + let guardExpr, guardTy = BuildPossiblyConditionalMethodCall cenv env DefinitelyMutates m false moveNext_minfo NormalValUse moveNext_minst [enumeratorExpr] [] + let currentExpr, currentTy = BuildPossiblyConditionalMethodCall cenv env DefinitelyMutates m true get_Current_minfo NormalValUse get_Current_minst [enumeratorExpr] [] + let currentExpr = mkCoerceExpr(currentExpr, enumElemTy, currentExpr.Range, currentTy) let currentExpr, enumElemTy = // Implicitly dereference byref for expr 'for x in ...' if isByrefTy cenv.g enumElemTy then @@ -3377,13 +3377,13 @@ let AnalyzeArbitraryExprAsEnumerable cenv (env: TcEnv) localAlloc m exprty expr // First try the original known static type match (if isArray1DTy cenv.g exprty then Exception (Failure "") else tryType (expr, exprty)) with - | Result res -> res + | Result res -> res | Exception e -> let probe ty = if (AddCxTypeMustSubsumeTypeUndoIfFailed env.DisplayEnv cenv.css m ty exprty) then match tryType (mkCoerceExpr(expr, ty, expr.Range, exprty), ty) with - | Result res -> Some res + | Result res -> Some res | Exception e -> PreserveStackTrace(e) raise e @@ -3405,7 +3405,7 @@ let AnalyzeArbitraryExprAsEnumerable cenv (env: TcEnv) localAlloc m exprty expr // Used inside sequence expressions -let ConvertArbitraryExprToEnumerable cenv ty (env: TcEnv) (expr:Expr) = +let ConvertArbitraryExprToEnumerable cenv ty (env: TcEnv) (expr: Expr) = let m = expr.Range let enumElemTy = NewInferenceType () if AddCxTypeMustSubsumeTypeUndoIfFailed env.DisplayEnv cenv.css m ( mkSeqTy cenv.g enumElemTy) ty then @@ -3469,7 +3469,7 @@ let mkSeqFinally cenv env m genTy e1 e2 = let mkSeqExprMatchClauses (pat', vspecs) innerExpr = [TClause(pat', None, TTarget(vspecs, innerExpr, SequencePointAtTarget), pat'.Range) ] -let compileSeqExprMatchClauses cenv env inputExprMark (pat:Pattern, vspecs) innerExpr inputExprOpt bindPatTy genInnerTy = +let compileSeqExprMatchClauses cenv env inputExprMark (pat: Pattern, vspecs) innerExpr inputExprOpt bindPatTy genInnerTy = let patMark = pat.Range let tclauses = mkSeqExprMatchClauses (pat, vspecs) innerExpr CompilePatternForMatchClauses cenv env inputExprMark patMark false ThrowIncompleteMatchException inputExprOpt bindPatTy genInnerTy tclauses @@ -3480,7 +3480,7 @@ let elimFastIntegerForLoop (spBind, id, start, dir, finish, innerExpr, m) = else mkSynTrifix m ".. .." start (SynExpr.Const(SynConst.Int32 -1, start.Range)) finish SynExpr.ForEach (spBind, SeqExprOnly false, true, mkSynPatVar None id, pseudoEnumExpr, innerExpr, m) -let (|ExprAsPat|_|) (f:SynExpr) = +let (|ExprAsPat|_|) (f: SynExpr) = match f with | SingleIdent v1 | SynExprParen(SingleIdent v1, _, _, _) -> Some (mkSynPatVar None v1) | SynExprParen(SynExpr.Tuple (false, elems, _, _), _, _, _) -> @@ -3692,18 +3692,18 @@ type InitializationGraphAnalysisState = | DefinitelyLazy type PreInitializationGraphEliminationBinding = - { FixupPoints : RecursiveUseFixupPoints + { FixupPoints: RecursiveUseFixupPoints Binding: Tast.Binding } /// Check for safety and determine if we need to insert lazy thunks let EliminateInitializationGraphs (getTyconBinds: 'TyconDataIn -> PreInitializationGraphEliminationBinding list) - (morphTyconBinds: (PreInitializationGraphEliminationBinding list -> Binding list) -> 'TyconDataIn -> 'TyconDataOut) + (morphTyconBinds: (PreInitializationGraphEliminationBinding list -> Binding list) -> 'TyconDataIn -> 'TyconDataOut) (getLetBinds: 'LetDataIn list -> PreInitializationGraphEliminationBinding list) - (morphLetBinds: (PreInitializationGraphEliminationBinding list -> Binding list) -> 'LetDataIn list -> Binding list) + (morphLetBinds: (PreInitializationGraphEliminationBinding list -> Binding list) -> 'LetDataIn list -> Binding list) g mustHaveArity denv - (fixupsAndBindingsWithoutLaziness : MutRecShape<_, _, _, _, _> list) bindsm = + (fixupsAndBindingsWithoutLaziness: MutRecShape<_, _, _, _, _> list) bindsm = let recursiveVals = let hash = ValHash.Create() @@ -3747,7 +3747,7 @@ let EliminateInitializationGraphs // // This is a design decision (See bug 6496), so that generalized recursive bindings such as // let rec x = x - // are analyzed. Although we give type "x : 'T" to these, from the users point of view + // are analyzed. Although we give type "x: 'T" to these, from the users point of view // any use of "x" will result in an infinite recursion. Type instantiation is implicit in F# // because of type inference, which makes it reasonable to check generic bindings strictly. | Expr.TyLambda (_, _, b, _, _) -> CheckExpr st b @@ -3756,12 +3756,12 @@ let EliminateInitializationGraphs // NOTE: we can't fixup recursive references inside delegates since the closure delegee of a delegate is not accessible // from outside. Object expressions implementing interfaces can, on the other hand, be fixed up. See FSharp 1.0 bug 1469 if isInterfaceTy g ty then - List.iter (fun (TObjExprMethod(_, _, _, _, e, _)) -> checkDelayed st e) overrides - List.iter (snd >> List.iter (fun (TObjExprMethod(_, _, _, _, e, _)) -> checkDelayed st e)) extraImpls + List.iter (fun (TObjExprMethod(_, _, _, _, e, _)) -> checkDelayed st e) overrides + List.iter (snd >> List.iter (fun (TObjExprMethod(_, _, _, _, e, _)) -> checkDelayed st e)) extraImpls else CheckExpr (strict st) e - List.iter (fun (TObjExprMethod(_, _, _, _, e, _)) -> CheckExpr (lzy (strict st)) e) overrides - List.iter (snd >> List.iter (fun (TObjExprMethod(_, _, _, _, e, _)) -> CheckExpr (lzy (strict st)) e)) extraImpls + List.iter (fun (TObjExprMethod(_, _, _, _, e, _)) -> CheckExpr (lzy (strict st)) e) overrides + List.iter (snd >> List.iter (fun (TObjExprMethod(_, _, _, _, e, _)) -> CheckExpr (lzy (strict st)) e)) extraImpls // Expressions where fixups may be needed | Expr.Val (v, _, m) -> CheckValRef st v m @@ -3772,7 +3772,7 @@ let EliminateInitializationGraphs // Composite expressions | Expr.Const _ -> () - | Expr.LetRec (binds, e, _, _) -> + | Expr.LetRec (binds, e, _, _) -> binds |> List.iter (CheckBinding (strict st)) CheckExpr (strict st) e | Expr.Let (bind, e, _, _) -> @@ -3787,13 +3787,13 @@ let EliminateInitializationGraphs // Binary expressions | Expr.Sequential (e1, e2, _, _, _) | Expr.StaticOptimization (_, e1, e2, _) -> - CheckExpr (strict st) e1; CheckExpr (strict st) e2 + CheckExpr (strict st) e1; CheckExpr (strict st) e2 // n-ary expressions - | Expr.Op(op, _, args, m) -> CheckExprOp st op m; List.iter (CheckExpr (strict st)) args + | Expr.Op(op, _, args, m) -> CheckExprOp st op m; List.iter (CheckExpr (strict st)) args // misc | Expr.Link(eref) -> CheckExpr st !eref - | Expr.TyChoose (_, b, _) -> CheckExpr st b - | Expr.Quote _ -> () + | Expr.TyChoose (_, b, _) -> CheckExpr st b + | Expr.Quote _ -> () and CheckBinding st (TBind(_, e, _)) = CheckExpr st e and CheckDecisionTree st = function @@ -3868,11 +3868,11 @@ let EliminateInitializationGraphs let vty = (mkLazyTy g ty) let fty = (g.unit_ty --> ty) - let flazy, felazy = Tastops.mkCompGenLocal m v.LogicalName fty + let flazy, felazy = Tastops.mkCompGenLocal m v.LogicalName fty let frhs = mkUnitDelayLambda g m e if mustHaveArity then flazy.SetValReprInfo (Some(InferArityOfExpr g AllowTypeDirectedDetupling.Yes fty [] [] frhs)) - let vlazy, velazy = Tastops.mkCompGenLocal m v.LogicalName vty + let vlazy, velazy = Tastops.mkCompGenLocal m v.LogicalName vty let vrhs = (mkLazyDelayed g m ty felazy) if mustHaveArity then vlazy.SetValReprInfo (Some(InferArityOfExpr g AllowTypeDirectedDetupling.Yes vty [] [] vrhs)) @@ -3888,20 +3888,20 @@ let EliminateInitializationGraphs if newTopBinds.Count = 0 then res else MutRecShape.Lets (List.concat newTopBinds) :: res else - let noMorph (pgrbinds : PreInitializationGraphEliminationBinding list) = pgrbinds |> List.map (fun pgrbind -> pgrbind.Binding) + let noMorph (pgrbinds: PreInitializationGraphEliminationBinding list) = pgrbinds |> List.map (fun pgrbind -> pgrbind.Binding) fixupsAndBindingsWithoutLaziness |> MutRecShapes.map (morphTyconBinds noMorph) (morphLetBinds noMorph) id //------------------------------------------------------------------------- // Check the shape of an object constructor and rewrite calls //------------------------------------------------------------------------- -let CheckAndRewriteObjectCtor g env (ctorLambaExpr:Expr) = +let CheckAndRewriteObjectCtor g env (ctorLambaExpr: Expr) = let m = ctorLambaExpr.Range let tps, vsl, body, returnTy = stripTopLambda (ctorLambaExpr, tyOfExpr g ctorLambaExpr) // Rewrite legitimate self-construction calls to CtorValUsedAsSelfInit - let error (expr:Expr) = + let error (expr: Expr) = errorR(Error(FSComp.SR.tcInvalidObjectConstructionExpression(), expr.Range)) expr @@ -3917,7 +3917,7 @@ let CheckAndRewriteObjectCtor g env (ctorLambaExpr:Expr) = | Some safeInitVal -> let ty = tyOfExpr g recdExpr let thisExpr = mkGetArg0 m ty - let setExpr = mkRefCellSet g m ty (exprForValRef m (mkLocalValRef safeInitVal)) thisExpr + let setExpr = mkRefCellSet g m ty (exprForValRef m (mkLocalValRef safeInitVal)) thisExpr Expr.Sequential(recdExpr, setExpr, ThenDoSeq, SuppressSequencePointOnExprOfSequential, m) let recdExpr = match ctorInfo.safeInitInfo with @@ -3931,26 +3931,26 @@ let CheckAndRewriteObjectCtor g env (ctorLambaExpr:Expr) = recdExpr - let rec checkAndRewrite (expr:Expr) = + let rec checkAndRewrite (expr: Expr) = match expr with // = { fields } // The constructor ends in an object initialization expression - good | Expr.Op(TOp.Recd(RecdExprIsObjInit, _), _, _, _) -> rewriteConstruction expr // = "a; " - | Expr.Sequential(a, body, NormalSeq, spSeq, b) -> Expr.Sequential(a, checkAndRewrite body, NormalSeq, spSeq, b) + | Expr.Sequential(a, body, NormalSeq, spSeq, b) -> Expr.Sequential(a, checkAndRewrite body, NormalSeq, spSeq, b) // = " then " | Expr.Sequential(body, a, ThenDoSeq, spSeq, b) -> Expr.Sequential(checkAndRewrite body, a, ThenDoSeq, spSeq, b) // = "let pat = expr in " - | Expr.Let(bind, body, m, _) -> mkLetBind m bind (checkAndRewrite body) + | Expr.Let(bind, body, m, _) -> mkLetBind m bind (checkAndRewrite body) // The constructor is a sequence "let pat = expr in " - | Expr.Match(spBind, a, b, targets, c, d) -> Expr.Match(spBind, a, b, (targets |> Array.map (fun (TTarget(vs, body, spTarget)) -> TTarget(vs, checkAndRewrite body, spTarget))), c, d) + | Expr.Match(spBind, a, b, targets, c, d) -> Expr.Match(spBind, a, b, (targets |> Array.map (fun (TTarget(vs, body, spTarget)) -> TTarget(vs, checkAndRewrite body, spTarget))), c, d) // = "let rec binds in " - | Expr.LetRec(a, body, _, _) -> Expr.LetRec (a, checkAndRewrite body , m, NewFreeVarsCache()) + | Expr.LetRec(a, body, _, _) -> Expr.LetRec (a, checkAndRewrite body, m, NewFreeVarsCache()) // = "new C(...)" | Expr.App(f, b, c, d, m) -> @@ -3970,7 +3970,7 @@ let CheckAndRewriteObjectCtor g env (ctorLambaExpr:Expr) = expr // Type applications are ok, e.g. - // type C<'a>(x:int) = + // type C<'a>(x: int) = // new() = C<'a>(3) | Expr.App(f, fty, tyargs, [], m) -> let f = checkAndRewriteCtorUsage f @@ -4002,9 +4002,9 @@ let buildApp cenv expr resultTy arg m = match expr, arg with // Special rule for building applications of the 'x && y' operator - | ApplicableExpr(_, Expr.App(Expr.Val(vf, _, _), _, _, [x0], _), _) , _ + | ApplicableExpr(_, Expr.App(Expr.Val(vf, _, _), _, _, [x0], _), _), _ when valRefEq g vf g.and_vref - || valRefEq g vf g.and2_vref -> + || valRefEq g vf g.and2_vref -> MakeApplicableExprNoFlex cenv (mkLazyAnd g m x0 arg), resultTy // Special rule for building applications of the 'x || y' operator @@ -4065,7 +4065,7 @@ let buildApp cenv expr resultTy arg m = let wrap, e1a', _readonly, _writeonly = mkExprAddrOfExpr g true false AddressOfOp arg (Some(vf)) m MakeApplicableExprNoFlex cenv (wrap(e1a')), resultTy - | _ when isByrefTy g resultTy -> + | _ when isByrefTy g resultTy -> // Handle byref returns, byref-typed returns get implicitly dereferenced let v, _ = mkCompGenLocal m "byrefReturn" resultTy let expr = expr.SupplyArgument(arg, m) @@ -4189,7 +4189,7 @@ type RecursiveBindingInfo = Val * ExplicitTyparInfo * PartialValReprInfo * - ValMemberInfoTransient option * + ValMemberInfoTransient option * Val option * Val option * SafeInitData * @@ -4198,27 +4198,27 @@ type RecursiveBindingInfo = DeclKind member x.EnclosingDeclaredTypars = let (RBInfo(_, _, enclosingDeclaredTypars, _, _, _, _, _, _, _, _, _, _, _)) = x in enclosingDeclaredTypars - member x.Val = let (RBInfo(_, _, _, _, vspec, _, _, _, _, _, _, _, _, _)) = x in vspec - member x.ExplicitTyparInfo = let (RBInfo(_, _, _, _, _, flex, _, _, _, _, _, _, _, _)) = x in flex - member x.DeclaredTypars = let (ExplicitTyparInfo(_, declaredTypars, _)) = x.ExplicitTyparInfo in declaredTypars - member x.Index = let (RBInfo(i, _, _, _, _, _, _, _, _, _, _, _, _, _)) = x in i - member x.ContainerInfo = let (RBInfo(_, c, _, _, _, _, _, _, _, _, _, _, _, _)) = x in c - member x.DeclKind = let (RBInfo(_, _, _, _, _, _, _, _, _, _, _, _, _, declKind)) = x in declKind + member x.Val = let (RBInfo(_, _, _, _, vspec, _, _, _, _, _, _, _, _, _)) = x in vspec + member x.ExplicitTyparInfo = let (RBInfo(_, _, _, _, _, flex, _, _, _, _, _, _, _, _)) = x in flex + member x.DeclaredTypars = let (ExplicitTyparInfo(_, declaredTypars, _)) = x.ExplicitTyparInfo in declaredTypars + member x.Index = let (RBInfo(i, _, _, _, _, _, _, _, _, _, _, _, _, _)) = x in i + member x.ContainerInfo = let (RBInfo(_, c, _, _, _, _, _, _, _, _, _, _, _, _)) = x in c + member x.DeclKind = let (RBInfo(_, _, _, _, _, _, _, _, _, _, _, _, _, declKind)) = x in declKind type PreCheckingRecursiveBinding = - { SyntacticBinding : NormalizedBinding - RecBindingInfo : RecursiveBindingInfo } + { SyntacticBinding: NormalizedBinding + RecBindingInfo: RecursiveBindingInfo } type PreGeneralizationRecursiveBinding = - { ExtraGeneralizableTypars : Typars + { ExtraGeneralizableTypars: Typars CheckedBinding: CheckedBindingInfo - RecBindingInfo : RecursiveBindingInfo } + RecBindingInfo: RecursiveBindingInfo } type PostGeneralizationRecursiveBinding = - { ValScheme : ValScheme + { ValScheme: ValScheme CheckedBinding: CheckedBindingInfo - RecBindingInfo : RecursiveBindingInfo } + RecBindingInfo: RecursiveBindingInfo } member x.GeneralizedTypars = x.ValScheme.GeneralizedTypars type PostBindCtorThisVarRefCellRecursiveBinding = @@ -4235,14 +4235,14 @@ let CanInferExtraGeneralizedTyparsForRecBinding (pgrbind: PreGeneralizationRecur /// Get the "this" variable from an instance member binding -let GetInstanceMemberThisVariable (v:Val, x) = +let GetInstanceMemberThisVariable (v: Val, x) = // Skip over LAM tps. Choose 'a. if v.IsInstanceMember then let rec firstArg e = match e with | Expr.TyLambda (_, _, b, _, _) -> firstArg b | Expr.TyChoose (_, b, _) -> firstArg b - | Expr.Lambda (_, _, _, [v], _, _, _) -> Some v + | Expr.Lambda (_, _, _, [v], _, _, _) -> Some v | _ -> failwith "GetInstanceMemberThisVariable: instance member did not have expected internal form" firstArg x @@ -4315,7 +4315,7 @@ let rec TcTyparConstraint ridx cenv newOk checkCxs occ (env: TcEnv) tpenv c = | WhereTyparSupportsMember(tps, memSpfn, m) -> let traitInfo, tpenv = TcPseudoMemberSpec cenv newOk env tps tpenv memSpfn m match traitInfo with - | TTrait(objtys, ".ctor", memberFlags, argTys, returnTy, _) when memberFlags.MemberKind = MemberKind.Constructor -> + | TTrait(objtys, ".ctor", memberFlags, argTys, returnTy, _) when memberFlags.MemberKind = MemberKind.Constructor -> match objtys, argTys with | [ty], [] when typeEquiv cenv.g ty (GetFSharpViewOfReturnType cenv.g returnTy) -> AddCxTypeMustSupportDefaultCtor env.DisplayEnv cenv.css m NoTrace ty @@ -4343,7 +4343,7 @@ and TcPseudoMemberSpec cenv newOk env synTypes tpenv memSpfn m = let memberConstraintTypars, _ = tryDestForallTy cenv.g memberConstraintTy let topValInfo = TranslatePartialArity memberConstraintTypars partialValReprInfo let _, curriedArgInfos, returnTy, _ = GetTopValTypeInCompiledForm cenv.g topValInfo memberConstraintTy m - //if curriedArgInfos.Length > 1 then error(Error(FSComp.SR.tcInvalidConstraint(), m)) + //if curriedArgInfos.Length > 1 then error(Error(FSComp.SR.tcInvalidConstraint(), m)) let argTys = List.concat curriedArgInfos let argTys = List.map fst argTys let logicalCompiledName = ComputeLogicalName id memberFlags @@ -4380,7 +4380,7 @@ and TcValSpec cenv env declKind newOk containerInfo memFlagsOpt thisTyOpt tpenv // Treat constraints at the "end" of the type as if they are declared. // This is by far the most convenient place to locate the constraints. // e.g. - // val FastGenericComparer<'T> : IComparer<'T> when 'T : comparison + // val FastGenericComparer<'T>: IComparer<'T> when 'T: comparison let tpenv = match ty with | SynType.WithGlobalConstraints(_, wcs, _) -> @@ -4431,7 +4431,7 @@ and TcValSpec cenv env declKind newOk containerInfo memFlagsOpt thisTyOpt tpenv else ty', valSynInfo - let reallyGenerateOneMember(id:Ident, valSynInfo, ty', memberFlags) = + let reallyGenerateOneMember(id: Ident, valSynInfo, ty', memberFlags) = let (PartialValReprInfo(argsData, _)) as partialValReprInfo = TranslateTopValSynInfo id.idRange (TcAttributes cenv env) valSynInfo @@ -4503,8 +4503,8 @@ and TcValSpec cenv env declKind newOk containerInfo memFlagsOpt thisTyOpt tpenv /// If optKind=Some kind, then this is the kind we're expecting (we're in *analysis* mode) /// If optKind=None, we need to determine the kind (we're in *synthesis* mode) /// -and TcTyparOrMeasurePar optKind cenv (env:TcEnv) newOk tpenv (Typar(id, _, _) as tp) = - let checkRes (res:Typar) = +and TcTyparOrMeasurePar optKind cenv (env: TcEnv) newOk tpenv (Typar(id, _, _) as tp) = + let checkRes (res: Typar) = match optKind, res.Kind with | Some TyparKind.Measure, TyparKind.Type -> error (Error(FSComp.SR.tcExpectedUnitOfMeasureMarkWithAttribute(), id.idRange)); res, tpenv | Some TyparKind.Type, TyparKind.Measure -> error (Error(FSComp.SR.tcExpectedTypeParameter(), id.idRange)); res, tpenv @@ -4573,7 +4573,7 @@ and TcTyparDecls cenv env synTypars = List.map (TcTyparDecl cenv env) synTypars /// If optKind=Some kind, then this is the kind we're expecting (we're in *analysis* mode) /// If optKind=None, we need to determine the kind (we're in *synthesis* mode) /// -and TcTypeOrMeasure optKind cenv newOk checkCxs occ env (tpenv:SyntacticUnscopedTyparEnv) ty = +and TcTypeOrMeasure optKind cenv newOk checkCxs occ env (tpenv: SyntacticUnscopedTyparEnv) ty = match ty with | SynType.LongIdent(LongIdentWithDots([], _)) -> @@ -4583,7 +4583,7 @@ and TcTypeOrMeasure optKind cenv newOk checkCxs occ env (tpenv:SyntacticUnscoped | SynType.LongIdent(LongIdentWithDots(tc, _) as lidwd) -> let m = lidwd.Range let ad = env.eAccessRights - let tcref = ForceRaise(ResolveTypeLongIdent cenv.tcSink cenv.nameResolver occ OpenQualified env.eNameResEnv ad tc TypeNameResolutionStaticArgsInfo.DefiniteEmpty PermitDirectReferenceToGeneratedType.No) + let tcref = ForceRaise(ResolveTypeLongIdent cenv.tcSink cenv.nameResolver occ OpenQualified env.eNameResEnv ad tc TypeNameResolutionStaticArgsInfo.DefiniteEmpty PermitDirectReferenceToGeneratedType.No) match optKind, tcref.TypeOrMeasureKind with | Some TyparKind.Type, TyparKind.Measure -> error(Error(FSComp.SR.tcExpectedTypeNotUnitOfMeasure(), m)) @@ -4660,7 +4660,7 @@ and TcTypeOrMeasure optKind cenv newOk checkCxs occ env (tpenv:SyntacticUnscoped sortedArgTys |> List.iteri (fun i (x,_) -> let item = Item.AnonRecdField(anonInfo, sortedCheckedArgTys, i, x.idRange) CallNameResolutionSink cenv.tcSink (x.idRange,env.NameEnv,item,item,emptyTyparInst,ItemOccurence.UseInType,env.DisplayEnv,env.eAccessRights)) - TType_anon(anonInfo, sortedCheckedArgTys),tpenv + TType_anon(anonInfo, sortedCheckedArgTys),tpenv | SynType.Fun(domainTy, resultTy, _) -> let domainTy', tpenv = TcTypeAndRecover cenv newOk checkCxs occ env tpenv domainTy @@ -4679,7 +4679,7 @@ and TcTypeOrMeasure optKind cenv newOk checkCxs occ env (tpenv:SyntacticUnscoped // _ types | SynType.Anon m -> - let tp:Typar = TcAnonTypeOrMeasure optKind cenv TyparRigidity.Anon TyparDynamicReq.No newOk m + let tp: Typar = TcAnonTypeOrMeasure optKind cenv TyparRigidity.Anon TyparDynamicReq.No newOk m match tp.Kind with | TyparKind.Measure -> TType_measure (Measure.Var tp), tpenv | TyparKind.Type -> mkTyparTy tp, tpenv @@ -4693,7 +4693,7 @@ and TcTypeOrMeasure optKind cenv newOk checkCxs occ env (tpenv:SyntacticUnscoped | SynType.HashConstraint(ty, m) -> let tp = TcAnonTypeOrMeasure (Some TyparKind.Type) cenv TyparRigidity.WarnIfNotRigid TyparDynamicReq.Yes newOk m let ty', tpenv = TcTypeAndRecover cenv newOk checkCxs occ env tpenv ty - AddCxTypeMustSubsumeType ContextInfo.NoContext env.DisplayEnv cenv.css m NoTrace ty' (mkTyparTy tp) + AddCxTypeMustSubsumeType ContextInfo.NoContext env.DisplayEnv cenv.css m NoTrace ty' (mkTyparTy tp) tp.AsType, tpenv | SynType.StaticConstant (c, m) -> @@ -4747,10 +4747,10 @@ and TcTypeOrMeasure optKind cenv newOk checkCxs occ env (tpenv:SyntacticUnscoped errorR(Error(FSComp.SR.tcIllegalSyntaxInTypeExpression(), m)) NewErrorType (), tpenv -and TcType cenv newOk checkCxs occ env (tpenv:SyntacticUnscopedTyparEnv) ty = +and TcType cenv newOk checkCxs occ env (tpenv: SyntacticUnscopedTyparEnv) ty = TcTypeOrMeasure (Some TyparKind.Type) cenv newOk checkCxs occ env tpenv ty -and TcMeasure cenv newOk checkCxs occ env (tpenv:SyntacticUnscopedTyparEnv) ty m = +and TcMeasure cenv newOk checkCxs occ env (tpenv: SyntacticUnscopedTyparEnv) ty m = match ty with | SynType.Anon m -> error(Error(FSComp.SR.tcAnonymousUnitsOfMeasureCannotBeNested(), m)) @@ -4782,7 +4782,7 @@ and TcTypesAsTuple cenv newOk checkCxs occ env tpenv args m = ty::tys, tpenv // Type-check a list of measures separated by juxtaposition, * or / -and TcMeasuresAsTuple cenv newOk checkCxs occ env (tpenv:SyntacticUnscopedTyparEnv) args m = +and TcMeasuresAsTuple cenv newOk checkCxs occ env (tpenv: SyntacticUnscopedTyparEnv) args m = let rec gather args tpenv isquot acc = match args with | [] -> acc, tpenv @@ -4808,7 +4808,7 @@ and TcTyparConstraints cenv newOk checkCxs occ env tpenv wcs = tpenv #if !NO_EXTENSIONTYPING -and TcStaticConstantParameter cenv (env:TcEnv) tpenv kind (v:SynType) idOpt container = +and TcStaticConstantParameter cenv (env: TcEnv) tpenv kind (v: SynType) idOpt container = let fail() = error(Error(FSComp.SR.etInvalidStaticArgument(NicePrint.minimalStringOfType env.DisplayEnv kind), v.Range)) let record ttype = match idOpt with @@ -4821,20 +4821,20 @@ and TcStaticConstantParameter cenv (env:TcEnv) tpenv kind (v:SynType) idOpt cont | SynType.StaticConstant(sc, _) -> let v = match sc with - | SynConst.Byte n when typeEquiv cenv.g cenv.g.byte_ty kind -> record(cenv.g.byte_ty); box (n:byte) - | SynConst.Int16 n when typeEquiv cenv.g cenv.g.int16_ty kind -> record(cenv.g.int16_ty); box (n:int16) - | SynConst.Int32 n when typeEquiv cenv.g cenv.g.int32_ty kind -> record(cenv.g.int32_ty); box (n:int) - | SynConst.Int64 n when typeEquiv cenv.g cenv.g.int64_ty kind -> record(cenv.g.int64_ty); box (n:int64) - | SynConst.SByte n when typeEquiv cenv.g cenv.g.sbyte_ty kind -> record(cenv.g.sbyte_ty); box (n:sbyte) - | SynConst.UInt16 n when typeEquiv cenv.g cenv.g.uint16_ty kind -> record(cenv.g.uint16_ty); box (n:uint16) - | SynConst.UInt32 n when typeEquiv cenv.g cenv.g.uint32_ty kind -> record(cenv.g.uint32_ty); box (n:uint32) - | SynConst.UInt64 n when typeEquiv cenv.g cenv.g.uint64_ty kind -> record(cenv.g.uint64_ty); box (n:uint64) - | SynConst.Decimal n when typeEquiv cenv.g cenv.g.decimal_ty kind -> record(cenv.g.decimal_ty); box (n:decimal) - | SynConst.Single n when typeEquiv cenv.g cenv.g.float32_ty kind -> record(cenv.g.float32_ty); box (n:single) - | SynConst.Double n when typeEquiv cenv.g cenv.g.float_ty kind -> record(cenv.g.float_ty); box (n:double) - | SynConst.Char n when typeEquiv cenv.g cenv.g.char_ty kind -> record(cenv.g.char_ty); box (n:char) - | SynConst.String (s, _) when s <> null && typeEquiv cenv.g cenv.g.string_ty kind -> record(cenv.g.string_ty); box (s:string) - | SynConst.Bool b when typeEquiv cenv.g cenv.g.bool_ty kind -> record(cenv.g.bool_ty); box (b:bool) + | SynConst.Byte n when typeEquiv cenv.g cenv.g.byte_ty kind -> record(cenv.g.byte_ty); box (n: byte) + | SynConst.Int16 n when typeEquiv cenv.g cenv.g.int16_ty kind -> record(cenv.g.int16_ty); box (n: int16) + | SynConst.Int32 n when typeEquiv cenv.g cenv.g.int32_ty kind -> record(cenv.g.int32_ty); box (n: int) + | SynConst.Int64 n when typeEquiv cenv.g cenv.g.int64_ty kind -> record(cenv.g.int64_ty); box (n: int64) + | SynConst.SByte n when typeEquiv cenv.g cenv.g.sbyte_ty kind -> record(cenv.g.sbyte_ty); box (n: sbyte) + | SynConst.UInt16 n when typeEquiv cenv.g cenv.g.uint16_ty kind -> record(cenv.g.uint16_ty); box (n: uint16) + | SynConst.UInt32 n when typeEquiv cenv.g cenv.g.uint32_ty kind -> record(cenv.g.uint32_ty); box (n: uint32) + | SynConst.UInt64 n when typeEquiv cenv.g cenv.g.uint64_ty kind -> record(cenv.g.uint64_ty); box (n: uint64) + | SynConst.Decimal n when typeEquiv cenv.g cenv.g.decimal_ty kind -> record(cenv.g.decimal_ty); box (n: decimal) + | SynConst.Single n when typeEquiv cenv.g cenv.g.float32_ty kind -> record(cenv.g.float32_ty); box (n: single) + | SynConst.Double n when typeEquiv cenv.g cenv.g.float_ty kind -> record(cenv.g.float_ty); box (n: double) + | SynConst.Char n when typeEquiv cenv.g cenv.g.char_ty kind -> record(cenv.g.char_ty); box (n: char) + | SynConst.String (s, _) when s <> null && typeEquiv cenv.g cenv.g.string_ty kind -> record(cenv.g.string_ty); box (s: string) + | SynConst.Bool b when typeEquiv cenv.g cenv.g.bool_ty kind -> record(cenv.g.bool_ty); box (b: bool) | _ -> fail() v, tpenv | SynType.StaticConstantExpr(e, _ ) -> @@ -4849,22 +4849,22 @@ and TcStaticConstantParameter cenv (env:TcEnv) tpenv kind (v:SynType) idOpt cont // Check we have a residue constant. We know the type was correct because we checked the expression with this type. | Expr.Const(c, _, _) -> match c with - | Const.Byte n -> record(cenv.g.byte_ty); box (n:byte) - | Const.Int16 n -> record(cenv.g.int16_ty); box (n:int16) - | Const.Int32 n -> record(cenv.g.int32_ty); box (n:int) - | Const.Int64 n -> record(cenv.g.int64_ty); box (n:int64) - | Const.SByte n -> record(cenv.g.sbyte_ty); box (n:sbyte) - | Const.UInt16 n -> record(cenv.g.uint16_ty); box (n:uint16) - | Const.UInt32 n -> record(cenv.g.uint32_ty); box (n:uint32) - | Const.UInt64 n -> record(cenv.g.uint64_ty); box (n:uint64) - | Const.Decimal n -> record(cenv.g.decimal_ty); box (n:decimal) - | Const.Single n -> record(cenv.g.float32_ty); box (n:single) - | Const.Double n -> record(cenv.g.float_ty); box (n:double) - | Const.Char n -> record(cenv.g.char_ty); box (n:char) - | Const.String null -> fail() - | Const.String s -> record(cenv.g.string_ty); box (s:string) - | Const.Bool b -> record(cenv.g.bool_ty); box (b:bool) - | _ -> fail() + | Const.Byte n -> record(cenv.g.byte_ty); box (n: byte) + | Const.Int16 n -> record(cenv.g.int16_ty); box (n: int16) + | Const.Int32 n -> record(cenv.g.int32_ty); box (n: int) + | Const.Int64 n -> record(cenv.g.int64_ty); box (n: int64) + | Const.SByte n -> record(cenv.g.sbyte_ty); box (n: sbyte) + | Const.UInt16 n -> record(cenv.g.uint16_ty); box (n: uint16) + | Const.UInt32 n -> record(cenv.g.uint32_ty); box (n: uint32) + | Const.UInt64 n -> record(cenv.g.uint64_ty); box (n: uint64) + | Const.Decimal n -> record(cenv.g.decimal_ty); box (n: decimal) + | Const.Single n -> record(cenv.g.float32_ty); box (n: single) + | Const.Double n -> record(cenv.g.float_ty); box (n: double) + | Const.Char n -> record(cenv.g.char_ty); box (n: char) + | Const.String null -> fail() + | Const.String s -> record(cenv.g.string_ty); box (s: string) + | Const.Bool b -> record(cenv.g.bool_ty); box (b: bool) + | _ -> fail() | _ -> error(Error(FSComp.SR.tcInvalidConstantExpression(), v.Range)) v, tpenv' | SynType.LongIdent(lidwd) -> @@ -4916,7 +4916,7 @@ and CrackStaticConstantArgs cenv env tpenv (staticParameters: Tainted if sp.PUntaint((fun sp -> sp.IsOptional), m) then match sp.PUntaint((fun sp -> sp.RawDefaultValue), m) with - | null -> error (Error(FSComp.SR.etStaticParameterRequiresAValue (spName, containerName, containerName, spName) , m)) + | null -> error (Error(FSComp.SR.etStaticParameterRequiresAValue (spName, containerName, containerName, spName), m)) | v -> v else error (Error(FSComp.SR.etStaticParameterRequiresAValue (spName, containerName, containerName, spName), m)) @@ -4925,7 +4925,7 @@ and CrackStaticConstantArgs cenv env tpenv (staticParameters: Tainted info.ProvidedType @@ -5027,7 +5027,7 @@ and TcTypeApp cenv newOk checkCxs occ env tpenv m tcref pathTypeArgs (synArgTys: ty, tpenv -and TcTypeOrMeasureAndRecover optKind cenv newOk checkCxs occ env tpenv ty = +and TcTypeOrMeasureAndRecover optKind cenv newOk checkCxs occ env tpenv ty = try TcTypeOrMeasure optKind cenv newOk checkCxs occ env tpenv ty with e -> errorRecovery e ty.Range @@ -5040,7 +5040,7 @@ and TcTypeOrMeasureAndRecover optKind cenv newOk checkCxs occ env tpenv ty = rty, tpenv -and TcTypeAndRecover cenv newOk checkCxs occ env tpenv ty = +and TcTypeAndRecover cenv newOk checkCxs occ env tpenv ty = TcTypeOrMeasureAndRecover (Some TyparKind.Type) cenv newOk checkCxs occ env tpenv ty and TcNestedTypeApplication cenv newOk checkCxs occ env tpenv mWholeTypeApp ty tyargs = @@ -5053,12 +5053,12 @@ and TcNestedTypeApplication cenv newOk checkCxs occ env tpenv mWholeTypeApp ty t | _ -> error(InternalError("TcNestedTypeApplication: expected type application", mWholeTypeApp)) -and TryAdjustHiddenVarNameToCompGenName cenv env (id:Ident) altNameRefCellOpt = +and TryAdjustHiddenVarNameToCompGenName cenv env (id: Ident) altNameRefCellOpt = match altNameRefCellOpt with | Some ({contents = Undecided altId } as altNameRefCell) -> match ResolvePatternLongIdent cenv.tcSink cenv.nameResolver AllIdsOK false id.idRange env.eAccessRights env.eNameResEnv TypeNameResolutionInfo.Default [id] with | Item.NewDef _ -> None // the name is not in scope as a pattern identifier (e.g. union case), so do not use the alternate ID - | _ -> altNameRefCell := Decided altId; Some altId // the name is in scope as a pattern identifier, so use the alternate ID + | _ -> altNameRefCell := Decided altId; Some altId // the name is in scope as a pattern identifier, so use the alternate ID | Some ({contents = Decided altId }) -> Some altId | None -> None @@ -5094,7 +5094,7 @@ and TcSimplePat optArgsOK checkCxs cenv ty env (tpenv, names, takenNames) p = TcSimplePat optArgsOK checkCxs cenv ty env (tpenv, names, takenNames) p // raise an error if any optional args precede any non-optional args -and ValidateOptArgOrder (spats : SynSimplePats) = +and ValidateOptArgOrder (spats: SynSimplePats) = let rec getPats spats = match spats with @@ -5115,7 +5115,7 @@ and ValidateOptArgOrder (spats : SynSimplePats) = /// Bind the patterns used in argument position for a function, method or lambda. -and TcSimplePats cenv optArgsOK checkCxs ty env (tpenv, names, takenNames:Set<_>) p = +and TcSimplePats cenv optArgsOK checkCxs ty env (tpenv, names, takenNames: Set<_>) p = // validate optional argument declaration ValidateOptArgOrder p @@ -5152,13 +5152,13 @@ and TcSimplePats cenv optArgsOK checkCxs ty env (tpenv, names, takenNames:Set<_ | SynSimplePats.SimplePats([SynSimplePat.Id(_, _, _, _, true, _)], _) -> UnifyTypes cenv env m ty (mkOptionTy cenv.g cty') | _ -> UnifyTypes cenv env m ty cty' - TcSimplePats cenv optArgsOK checkCxs ty env (tpenv, names, takenNames) p + TcSimplePats cenv optArgsOK checkCxs ty env (tpenv, names, takenNames) p and TcSimplePatsOfUnknownType cenv optArgsOK checkCxs env tpenv spats = let argty = NewInferenceType () TcSimplePats cenv optArgsOK checkCxs argty env (tpenv, NameMap.empty, Set.empty) spats -and TcPatBindingName cenv env id ty isMemberThis vis1 topValData (inlineFlag, declaredTypars, argAttribs, isMutable, vis2, compgen) (names, takenNames:Set) = +and TcPatBindingName cenv env id ty isMemberThis vis1 topValData (inlineFlag, declaredTypars, argAttribs, isMutable, vis2, compgen) (names, takenNames: Set) = let vis = if Option.isSome vis1 then vis1 else vis2 if takenNames.Contains id.idText then errorR (VarBoundTwice id) let compgen = compgen || IsCompilerGeneratedName id.idText @@ -5188,7 +5188,7 @@ and TcPatBindingName cenv env id ty isMemberThis vis1 topValData (inlineFlag, de PBind(vspec, typeScheme)), names, takenNames -and TcPatAndRecover warnOnUpper cenv (env:TcEnv) topValInfo vFlags (tpenv, names, takenNames) ty (pat:SynPat) = +and TcPatAndRecover warnOnUpper cenv (env: TcEnv) topValInfo vFlags (tpenv, names, takenNames) ty (pat: SynPat) = try TcPat warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) ty pat with e -> @@ -5219,7 +5219,7 @@ and TcPat warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) ty p error(Error(FSComp.SR.tcInvalidNonPrimitiveLiteralInPatternMatch(), m)) | _ -> let c' = TcConst cenv ty m env c - (fun (_:TcPatPhase2Input) -> TPat_const(c', m)), (tpenv, names, takenNames) + (fun (_: TcPatPhase2Input) -> TPat_const(c', m)), (tpenv, names, takenNames) | SynPat.Wild m -> (fun _ -> TPat_wild m), (tpenv, names, takenNames) @@ -5327,7 +5327,7 @@ and TcPat warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) ty p | SynPat.Named (SynPat.Wild _, id, _, None, _) -> SynExpr.Ident(id) | SynPat.Typed (p, cty, m) -> SynExpr.Typed (convSynPatToSynExpr p, cty, m) | SynPat.LongIdent (LongIdentWithDots(longId, dotms) as lidwd, _, _tyargs, args, None, m) -> - let args = match args with SynConstructorArgs.Pats args -> args | _ -> failwith "impossible: active patterns can be used only with SynConstructorArgs.Pats" + let args = match args with SynConstructorArgs.Pats args -> args | _ -> failwith "impossible: active patterns can be used only with SynConstructorArgs.Pats" let e = if dotms.Length = longId.Length then let e = SynExpr.LongIdent(false, LongIdentWithDots(longId, List.truncate (dotms.Length - 1) dotms), None, m) @@ -5372,13 +5372,13 @@ and TcPat warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) ty p | SynConstructorArgs.Pats args -> args | SynConstructorArgs.NamePatPairs (pairs, m) -> // rewrite patterns from the form (name-N = pat-N...) to (..._, pat-N, _...) - // so type T = Case of name : int * value : int + // so type T = Case of name: int * value: int // | Case(value = v) // will become // | Case(_, v) let result = Array.zeroCreate numArgTys for (id, pat) in pairs do - match argNames |> List.tryFindIndex (fun id2 -> id.idText = id2.idText) with + match argNames |> List.tryFindIndex (fun id2 -> id.idText = id2.idText) with | None -> match item with | Item.UnionCase(uci, _) -> @@ -5447,7 +5447,7 @@ and TcPat warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) ty p // LITERAL F# FIELDS CheckRecdFieldInfoAccessible cenv.amap m env.eAccessRights rfinfo if not rfinfo.IsStatic then errorR (Error (FSComp.SR.tcFieldIsNotStatic(rfinfo.Name), m)) - CheckRecdFieldInfoAttributes cenv.g rfinfo m |> CommitOperationResult + CheckRecdFieldInfoAttributes cenv.g rfinfo m |> CommitOperationResult match rfinfo.LiteralValue with | None -> error (Error(FSComp.SR.tcFieldNotLiteralCannotBeUsedInPattern(), m)) | Some lit -> @@ -5472,7 +5472,7 @@ and TcPat warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) ty p CallNameResolutionSink cenv.tcSink (m, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.Pattern, env.DisplayEnv, env.AccessRights) (fun _ -> TPat_const (lit, m)), (tpenv, names, takenNames) - | _ -> error (Error(FSComp.SR.tcRequireVarConstRecogOrLiteral(), m)) + | _ -> error (Error(FSComp.SR.tcRequireVarConstRecogOrLiteral(), m)) | SynPat.QuoteExpr(_, m) -> error (Error(FSComp.SR.tcInvalidPattern(), m)) @@ -5494,7 +5494,7 @@ and TcPat warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) ty p else List.foldBack (mkConsListPat cenv.g argty) args' (mkNilListPat cenv.g m argty)), acc | SynPat.Record (flds, m) -> - let tcref, fldsmap, _fldsList = BuildFieldMap cenv env true ty flds m + let tcref, fldsmap, _fldsList = BuildFieldMap cenv env true ty flds m // REVIEW: use _fldsList to type check pattern in code order not field defn order let _, inst, tinst, gtyp = infoOfTyconRef m tcref UnifyTypes cenv env m ty gtyp @@ -5524,7 +5524,7 @@ and TcPat warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) ty p suppressErrorReporting (fun () -> TcPatAndRecover warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) (NewErrorType()) pat) and TcPatterns warnOnUpper cenv env vFlags s argTys args = - assert (List.length args = List.length argTys) + assert (List.length args = List.length argTys) List.mapFold (fun s (ty, pat) -> TcPat warnOnUpper cenv env None vFlags s ty pat) s (List.zip argTys args) @@ -5545,7 +5545,7 @@ and RecordNameAndTypeResolutions_IdeallyWithoutHavingOtherEffects cenv env tpenv // The tricky bit is to not also have any other effects from typechecking, namely producing error diagnostics (which may be spurious) or having // side-effects on the typecheck environment. // - // REVIEW: We are yet to deal with the tricky bit. As it stands, we turn off error logging, but still have typechecking environment effects. As a result, + // REVIEW: We are yet to deal with the tricky bit. As it stands, we turn off error logging, but still have typechecking environment effects. As a result, // at the very least, you cannot call this function unless you're already reported a typechecking error (the 'worst' possible outcome would be // to incorrectly solve typecheck constraints as a result of effects in this function, and then have the code compile successfully and behave // in some weird way; so ensure the code can't possibly compile before calling this function as an expedient way to get better IntelliSense). @@ -5582,7 +5582,7 @@ and TcExprFlex cenv flex compat ty (env: TcEnv) tpenv (e: SynExpr) = if compat then (destTyparTy cenv.g argty).SetIsCompatFlex(true) AddCxTypeMustSubsumeType ContextInfo.NoContext env.DisplayEnv cenv.css e.Range NoTrace ty argty - let e', tpenv = TcExpr cenv argty env tpenv e + let e', tpenv = TcExpr cenv argty env tpenv e let e' = mkCoerceIfNeeded cenv.g ty argty e' e', tpenv else @@ -5615,7 +5615,7 @@ and TcExprNoRecover cenv ty (env: TcEnv) tpenv (expr: SynExpr) = // This recursive entry is only used from one callsite (DiscardAfterMissingQualificationAfterDot) -// and has been added relatively late in F# 4.0 to preserve the structure of previous code. It pushes a 'delayed' parameter +// and has been added relatively late in F# 4.0 to preserve the structure of previous code. It pushes a 'delayed' parameter // through TcExprOfUnknownType, TcExpr and TcExprNoRecover and TcExprOfUnknownTypeThen cenv env tpenv expr delayed = let exprty = NewInferenceType () @@ -5700,7 +5700,7 @@ and TcExprThen cenv overallTy env tpenv synExpr delayed = | SynExpr.DotIndexedSet (e1, e2, _, _, mDot, mWholeExpr) -> TcIndexerThen cenv env overallTy mWholeExpr mDot tpenv synExpr e1 e2 delayed - | _ -> + | _ -> match delayed with | [] -> TcExprUndelayed cenv overallTy env tpenv synExpr | _ -> @@ -5723,7 +5723,7 @@ and CheckSuperInit cenv objTy m = // TcExprUndelayed //------------------------------------------------------------------------- -and TcExprUndelayedNoType cenv env tpenv synExpr : Expr * TType * _ = +and TcExprUndelayedNoType cenv env tpenv synExpr: Expr * TType * _ = let overallTy = NewInferenceType () let expr, tpenv = TcExprUndelayed cenv overallTy env tpenv synExpr expr, overallTy, tpenv @@ -5765,7 +5765,7 @@ and TcExprUndelayed cenv overallTy env tpenv (synExpr: SynExpr) = // (fun anonArg -> let[spMatch] anonVal = anonArg in pat1 -> expr1 ... | patN -> exprN) // // Note the presence of the "let" is visible in quotations regardless of the presence of sequence points, so - // <@ function x -> (x:int) @> + // <@ function x -> (x: int) @> // is // Lambda (_arg2, Let (x, _arg2, x)) @@ -5775,7 +5775,7 @@ and TcExprUndelayed cenv overallTy env tpenv (synExpr: SynExpr) = let idv1, idve1 = mkCompGenLocal mArg (cenv.synArgNameGenerator.New()) domainTy let envinner = ExitFamilyRegion env let idv2, matchExpr, tpenv = TcAndPatternCompileMatchClauses m mArg (if isExnMatch then Throw else ThrowIncompleteMatchException) cenv None domainTy resultTy envinner tpenv clauses - let overallExpr = mkMultiLambda m [idv1] ((mkLet spMatch m idv2 idve1 matchExpr), resultTy) + let overallExpr = mkMultiLambda m [idv1] ((mkLet spMatch m idv2 idve1 matchExpr), resultTy) overallExpr, tpenv | SynExpr.Assert (x, m) -> @@ -5784,9 +5784,9 @@ and TcExprUndelayed cenv overallTy env tpenv (synExpr: SynExpr) = | SynExpr.Fixed (_, m) -> error(Error(FSComp.SR.tcFixedNotAllowed(), m)) - // e : ty + // e: ty | SynExpr.Typed (synBodyExpr, synType, m) -> - let tgtTy, tpenv = TcTypeAndRecover cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv synType + let tgtTy, tpenv = TcTypeAndRecover cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv synType UnifyTypes cenv env m overallTy tgtTy let expr, tpenv = TcExpr cenv overallTy env tpenv synBodyExpr expr, tpenv @@ -5795,7 +5795,7 @@ and TcExprUndelayed cenv overallTy env tpenv (synExpr: SynExpr) = | SynExpr.TypeTest (synInnerExpr, tgtTy, m) -> let innerExpr, srcTy, tpenv = TcExprOfUnknownType cenv env tpenv synInnerExpr UnifyTypes cenv env m overallTy cenv.g.bool_ty - let tgtTy, tpenv = TcType cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv tgtTy + let tgtTy, tpenv = TcType cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv tgtTy TcRuntimeTypeTest (*isCast*)false (*isOperator*)true cenv env.DisplayEnv m tgtTy srcTy let expr = mkCallTypeTest cenv.g m tgtTy innerExpr expr, tpenv @@ -5835,7 +5835,7 @@ and TcExprUndelayed cenv overallTy env tpenv (synExpr: SynExpr) = // TcRuntimeTypeTest ensures tgtTy is a nominal type. Hence we can insert a check here // based on the nullness semantics of the nominal type. - let expr = mkCallUnbox cenv.g m tgtTy innerExpr + let expr = mkCallUnbox cenv.g m tgtTy innerExpr expr, tpenv | SynExpr.Null m -> @@ -5876,7 +5876,7 @@ and TcExprUndelayed cenv overallTy env tpenv (synExpr: SynExpr) = else { env with eContextInfo = ContextInfo.CollectionElement (isArray, m) } - let args', tpenv = List.mapFold (fun tpenv (x:SynExpr) -> TcExprFlex cenv flex false argty (getInitEnv x.Range) tpenv x) tpenv args + let args', tpenv = List.mapFold (fun tpenv (x: SynExpr) -> TcExprFlex cenv flex false argty (getInitEnv x.Range) tpenv x) tpenv args let expr = if isArray then Expr.Op(TOp.Array, [argty], args', m) @@ -5904,9 +5904,9 @@ and TcExprUndelayed cenv overallTy env tpenv (synExpr: SynExpr) = | SynExpr.For (spBind, id, start, dir, finish, body, m) -> UnifyTypes cenv env m overallTy cenv.g.unit_ty - let startExpr , tpenv = TcExpr cenv cenv.g.int_ty env tpenv start + let startExpr, tpenv = TcExpr cenv cenv.g.int_ty env tpenv start let finishExpr, tpenv = TcExpr cenv cenv.g.int_ty env tpenv finish - let idv, _ = mkLocal id.idRange id.idText cenv.g.int_ty + let idv, _ = mkLocal id.idRange id.idText cenv.g.int_ty let envinner = AddLocalVal cenv.tcSink m idv env // notify name resolution sink about loop variable @@ -5914,7 +5914,7 @@ and TcExprUndelayed cenv overallTy env tpenv (synExpr: SynExpr) = CallNameResolutionSink cenv.tcSink (idv.Range, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.Binding, env.DisplayEnv, env.eAccessRights) let bodyExpr, tpenv = TcStmt cenv envinner tpenv body - mkFastForLoop cenv.g (spBind, m, idv, startExpr, dir, finishExpr, bodyExpr), tpenv + mkFastForLoop cenv.g (spBind, m, idv, startExpr, dir, finishExpr, bodyExpr), tpenv | SynExpr.ForEach (spForLoop, SeqExprOnly seqExprOnly, isFromSource, pat, enumSynExpr, bodySynExpr, m) -> assert isFromSource @@ -5936,7 +5936,7 @@ and TcExprUndelayed cenv overallTy env tpenv (synExpr: SynExpr) = TcComputationOrSequenceExpression cenv env overallTy m None tpenv comp - | SynExpr.ArrayOrListOfSeqExpr (isArray, comp, m) -> + | SynExpr.ArrayOrListOfSeqExpr (isArray, comp, m) -> CallExprHasTypeSink cenv.tcSink (m, env.NameEnv, overallTy, env.DisplayEnv, env.eAccessRights) match comp with @@ -5966,11 +5966,11 @@ and TcExprUndelayed cenv overallTy env tpenv (synExpr: SynExpr) = let genCollElemTy = NewInferenceType () - let genCollTy = (if isArray then mkArrayType else mkListTy) cenv.g genCollElemTy + let genCollTy = (if isArray then mkArrayType else mkListTy) cenv.g genCollElemTy UnifyTypes cenv env m overallTy genCollTy - let exprty = mkSeqTy cenv.g genCollElemTy + let exprty = mkSeqTy cenv.g genCollElemTy // Check the comprehension let expr, tpenv = TcExpr cenv exprty env tpenv comp @@ -6048,32 +6048,8 @@ and TcExprUndelayed cenv overallTy env tpenv (synExpr: SynExpr) = UnifyTypes cenv env m overallTy cenv.g.unit_ty TcStmtThatCantBeCtorBody cenv env tpenv synInnerExpr - | SynExpr.IfThenElse (synBoolExpr, synThenExpr, synElseExprOpt, spIfToThen, isRecovery, mIfToThen, m) -> - let boolExpr, tpenv = TcExprThatCantBeCtorBody cenv cenv.g.bool_ty env tpenv synBoolExpr - let thenExpr, tpenv = - let env = - match env.eContextInfo with - | ContextInfo.ElseBranchResult _ -> { env with eContextInfo = ContextInfo.ElseBranchResult synThenExpr.Range } - | _ -> - match synElseExprOpt with - | None -> { env with eContextInfo = ContextInfo.OmittedElseBranch synThenExpr.Range } - | _ -> { env with eContextInfo = ContextInfo.IfExpression synThenExpr.Range } - - if not isRecovery && Option.isNone synElseExprOpt then - UnifyTypes cenv env m cenv.g.unit_ty overallTy - - TcExprThatCanBeCtorBody cenv overallTy env tpenv synThenExpr - - let elseExpr, spElse, tpenv = - match synElseExprOpt with - | None -> - mkUnit cenv.g mIfToThen, SuppressSequencePointAtTarget, tpenv // the fake 'unit' value gets exactly the same range as spIfToThen - | Some synElseExpr -> - let env = { env with eContextInfo = ContextInfo.ElseBranchResult synElseExpr.Range } - let elseExpr, tpenv = TcExprThatCanBeCtorBody cenv overallTy env tpenv synElseExpr - elseExpr, SequencePointAtTarget, tpenv - - primMkCond spIfToThen SequencePointAtTarget spElse m overallTy boolExpr thenExpr elseExpr, tpenv + | SynExpr.IfThenElse _ -> + TcLinearExprs (TcExprThatCanBeCtorBody cenv) cenv env overallTy tpenv false synExpr (fun x -> x) // This is for internal use in the libraries only | SynExpr.LibraryOnlyStaticOptimization (constraints, e2, e3, m) -> @@ -6124,7 +6100,7 @@ and TcExprUndelayed cenv overallTy env tpenv (synExpr: SynExpr) = TcLongIdentThen cenv overallTy env tpenv lidwd [ DelayedApp(ExprAtomicFlag.Atomic, e1, mStmt); MakeDelayedSet(e2, mStmt) ] | SynExpr.TraitCall(tps, memSpfn, arg, m) -> - let synTypes = tps |> List.map (fun tp -> SynType.Var(tp, m)) + let synTypes = tps |> List.map (fun tp -> SynType.Var(tp, m)) let (TTrait(_, logicalCompiledName, _, argTys, returnTy, _) as traitInfo), tpenv = TcPseudoMemberSpec cenv NewTyparsOK env synTypes tpenv memSpfn m if BakedInTraitConstraintNames.Contains logicalCompiledName then warning(BakedInMemberConstraintName(logicalCompiledName, m)) @@ -6150,7 +6126,7 @@ and TcExprUndelayed cenv overallTy env tpenv (synExpr: SynExpr) = | SynExpr.LibraryOnlyUnionCaseFieldSet (e1, c, n, e2, m) -> UnifyTypes cenv env m overallTy cenv.g.unit_ty let e1', ty1, tpenv = TcExprOfUnknownType cenv env tpenv e1 - let mkf, ty2 = TcUnionCaseOrExnField cenv env ty1 m c n + let mkf, ty2 = TcUnionCaseOrExnField cenv env ty1 m c n ((fun (a, b) n e2' -> if not (isUnionCaseFieldMutable cenv.g a n) then errorR(Error(FSComp.SR.tcFieldIsNotMutable(), m)) mkUnionCaseFieldSet(e1', a, b, n, e2', m)), @@ -6192,8 +6168,8 @@ and TcExprUndelayed cenv overallTy env tpenv (synExpr: SynExpr) = | SynExpr.ImplicitZero m -> error(Error(FSComp.SR.tcConstructRequiresSequenceOrComputations(), m)) - | SynExpr.DoBang (_, m) - | SynExpr.LetOrUseBang (_, _, _, _, _, _, m) -> + | SynExpr.DoBang (_, m) + | SynExpr.LetOrUseBang (_, _, _, _, _, _, m) -> error(Error(FSComp.SR.tcConstructRequiresComputationExpression(), m)) | SynExpr.MatchBang (_, _, _, m) -> @@ -6210,7 +6186,7 @@ and TcIteratedLambdas cenv isFirst (env: TcEnv) overallTy takenNames tpenv e = let envinner = if isMember then envinner else ExitFamilyRegion envinner let bodyExpr, tpenv = TcIteratedLambdas cenv false envinner resultTy takenNames tpenv bodyExpr // See bug 5758: Non-monotonicity in inference: need to ensure that parameters are never inferred to have byref type, instead it is always declared - byrefs |> Map.iter (fun _ (orig, v) -> + byrefs |> Map.iter (fun _ (orig, v) -> if not orig && isByrefTy cenv.g v.Type then errorR(Error(FSComp.SR.tcParameterInferredByref v.DisplayName, v.Range))) mkMultiLambda m (List.map (fun nm -> NameMap.find nm vspecMap) vs) (bodyExpr, resultTy), tpenv | e -> @@ -6223,7 +6199,7 @@ and TcIteratedLambdas cenv isFirst (env: TcEnv) overallTy takenNames tpenv e = // Check expr.[idx] // This is a little over complicated for my liking. Basically we want to interpret e1.[idx] as e1.Item(idx). // However it's not so simple as all that. First "Item" can have a different name according to an attribute in -// .NET metadata. This means we manually typecheck 'e1' and look to see if it has a nominal type. We then +// .NET metadata. This means we manually typecheck 'e1' and look to see if it has a nominal type. We then // do the right thing in each case. and TcIndexerThen cenv env overallTy mWholeExpr mDot tpenv wholeExpr e1 indexArgs delayed = let ad = env.eAccessRights @@ -6262,7 +6238,7 @@ and TcIndexerThen cenv env overallTy mWholeExpr mDot tpenv wholeExpr e1 indexArg let GetIndexArgs (es: SynIndexerArg list) = [ for e in es do yield! e.Exprs ] let MakeIndexParam vopt = match indexArgs with - | [] -> failwith "unexpected empty index list" + | [] -> failwith "unexpected empty index list" | [SynIndexerArg.One h] -> SynExpr.Paren(h, range0, None, idxRange) | _ -> SynExpr.Paren(SynExpr.Tuple(false, GetIndexArgs indexArgs @ Option.toList vopt, [], idxRange), range0, None, idxRange) @@ -6277,9 +6253,9 @@ and TcIndexerThen cenv env overallTy mWholeExpr mDot tpenv wholeExpr e1 indexArg | false, true, SynExpr.DotIndexedGet(_, [SynIndexerArg.One(SynExpr.Tuple (false, ([_;_;_] as idxs), _, _))], _, _) -> Some (indexOpPath, "GetArray3D", idxs) | false, true, SynExpr.DotIndexedGet(_, [SynIndexerArg.One(SynExpr.Tuple (false, ([_;_;_;_] as idxs), _, _))], _, _) -> Some (indexOpPath, "GetArray4D", idxs) | false, true, SynExpr.DotIndexedGet(_, [SynIndexerArg.One idx], _, _) -> Some (indexOpPath, "GetArray", [idx]) - | false, true, SynExpr.DotIndexedSet(_, [SynIndexerArg.One(SynExpr.Tuple (false, ([_;_] as idxs), _, _))] , e3, _, _, _) -> Some (indexOpPath, "SetArray2D", (idxs @ [e3])) - | false, true, SynExpr.DotIndexedSet(_, [SynIndexerArg.One(SynExpr.Tuple (false, ([_;_;_] as idxs), _, _))] , e3, _, _, _) -> Some (indexOpPath, "SetArray3D", (idxs @ [e3])) - | false, true, SynExpr.DotIndexedSet(_, [SynIndexerArg.One(SynExpr.Tuple (false, ([_;_;_;_] as idxs), _, _))] , e3, _, _, _) -> Some (indexOpPath, "SetArray4D", (idxs @ [e3])) + | false, true, SynExpr.DotIndexedSet(_, [SynIndexerArg.One(SynExpr.Tuple (false, ([_;_] as idxs), _, _))], e3, _, _, _) -> Some (indexOpPath, "SetArray2D", (idxs @ [e3])) + | false, true, SynExpr.DotIndexedSet(_, [SynIndexerArg.One(SynExpr.Tuple (false, ([_;_;_] as idxs), _, _))], e3, _, _, _) -> Some (indexOpPath, "SetArray3D", (idxs @ [e3])) + | false, true, SynExpr.DotIndexedSet(_, [SynIndexerArg.One(SynExpr.Tuple (false, ([_;_;_;_] as idxs), _, _))], e3, _, _, _) -> Some (indexOpPath, "SetArray4D", (idxs @ [e3])) | false, true, SynExpr.DotIndexedSet(_, [SynIndexerArg.One _], e3, _, _, _) -> Some (indexOpPath, "SetArray", (GetIndexArgs indexArgs @ [e3])) | true, false, SynExpr.DotIndexedGet(_, [SynIndexerArg.Two _], _, _) -> Some (sliceOpPath, "GetStringSlice", GetIndexArgs indexArgs) | true, false, SynExpr.DotIndexedGet(_, [SynIndexerArg.One _], _, _) -> Some (indexOpPath, "GetString", GetIndexArgs indexArgs) @@ -6350,7 +6326,7 @@ and TcNewExpr cenv env tpenv objTy mObjTyOpt superInit arg mWholeExprOrObjTy = | SynExpr.Const (SynConst.Unit, _) -> () | _ -> errorR(Error(FSComp.SR.tcObjectConstructorsOnTypeParametersCannotTakeArguments(), mWholeExprOrObjTy)) - mkCallCreateInstance cenv.g mWholeExprOrObjTy objTy , tpenv + mkCallCreateInstance cenv.g mWholeExprOrObjTy objTy, tpenv else if not (isAppTy cenv.g objTy) && not (isAnyTupleTy cenv.g objTy) then error(Error(FSComp.SR.tcNamedTypeRequired(if superInit then "inherit" else "new"), mWholeExprOrObjTy)) let item = ForceRaise (ResolveObjectConstructor cenv.nameResolver env.DisplayEnv mWholeExprOrObjTy ad objTy) @@ -6457,19 +6433,19 @@ and TcRecordConstruction cenv overallTy env tpenv optOrigExprInfo objTy fldsList if optOrigExprInfo.IsNone && not (Zset.subset ns2 ns1) then error (MissingFields(Zset.elements (Zset.diff ns2 ns1), m)) - if not (Zset.subset ns1 ns2) then + if not (Zset.subset ns1 ns2) then error (Error(FSComp.SR.tcExtraneousFieldsGivenValues(), m)) // Build record let rfrefs = List.map (fst >> mkRecdFieldRef tcref) fldsList // Check accessibility: this is also done in BuildFieldMap, but also need to check - // for fields in { new R with a=1 and b=2 } constructions and { r with a=1 } copy-and-update expressions + // for fields in { new R with a=1 and b=2 } constructions and { r with a=1 } copy-and-update expressions rfrefs |> List.iter (fun rfref -> CheckRecdFieldAccessible cenv.amap m env.eAccessRights rfref |> ignore CheckFSharpAttributes cenv.g rfref.PropertyAttribs m |> CommitOperationResult) - let args = List.map snd fldsList + let args = List.map snd fldsList let expr = mkRecordExpr cenv.g (GetRecdInfo env, tcref, tinst, rfrefs, args, m) @@ -6521,13 +6497,13 @@ and GetNameAndArityOfObjExprBinding _cenv _env b = lookPat pat -and FreshenObjExprAbstractSlot cenv (env: TcEnv) (implty:TType) virtNameAndArityPairs (bind, bindAttribs, bindName, absSlots:(_ * MethInfo) list) = +and FreshenObjExprAbstractSlot cenv (env: TcEnv) (implty: TType) virtNameAndArityPairs (bind, bindAttribs, bindName, absSlots:(_ * MethInfo) list) = let (NormalizedBinding (_, _, _, _, _, _, synTyparDecls, _, _, _, mBinding, _)) = bind match absSlots with | [] when not (CompileAsEvent cenv.g bindAttribs) -> let absSlotsByName = List.filter (fst >> fst >> (=) bindName) virtNameAndArityPairs let getSignature absSlot = (NicePrint.stringOfMethInfo cenv.amap mBinding env.DisplayEnv absSlot).Replace("abstract ", "") - let getDetails (absSlot:MethInfo) = + let getDetails (absSlot: MethInfo) = if absSlot.GetParamTypes(cenv.amap, mBinding, []) |> List.existsSquared (isAnyTupleTy cenv.g) then FSComp.SR.tupleRequiredInAbstractMethod() else "" @@ -6555,9 +6531,9 @@ and FreshenObjExprAbstractSlot cenv (env: TcEnv) (implty:TType) virtNameAndArity errorR(ErrorWithSuggestions(FSComp.SR.tcMemberFoundIsNotAbstractOrVirtual(tcref.DisplayName, bindName), mBinding, bindName, suggestVirtualMembers)) else errorR(ErrorWithSuggestions(FSComp.SR.tcNoAbstractOrVirtualMemberFound(bindName), mBinding, bindName, suggestVirtualMembers)) - | [(_, absSlot:MethInfo)] -> + | [(_, absSlot: MethInfo)] -> errorR(Error(FSComp.SR.tcArgumentArityMismatch(bindName, List.sum absSlot.NumArgs, arity, getSignature absSlot, getDetails absSlot), mBinding)) - | (_, absSlot:MethInfo) :: _ -> + | (_, absSlot: MethInfo) :: _ -> errorR(Error(FSComp.SR.tcArgumentArityMismatchOneOverload(bindName, List.sum absSlot.NumArgs, arity, getSignature absSlot, getDetails absSlot), mBinding)) None @@ -6592,7 +6568,7 @@ and TcObjectExprBinding cenv (env: TcEnv) implty tpenv (absSlotInfo, bind) = bindingRhs, logicalMethId, memberFlags | SynPat.InstanceMember(thisId, memberId, _, _, _), Some memberFlags -> - CheckMemberFlags None NewSlotsOK OverridesOK memberFlags mBinding + CheckMemberFlags None NewSlotsOK OverridesOK memberFlags mBinding let bindingRhs = PushOnePatternToRhs cenv true (mkSynThisPatVar thisId) bindingRhs let logicalMethId = ident (ComputeLogicalName memberId memberFlags, memberId.idRange) bindingRhs, logicalMethId, memberFlags @@ -6631,7 +6607,7 @@ and TcObjectExprBinding cenv (env: TcEnv) implty tpenv (absSlotInfo, bind) = let freeInEnv = GeneralizationHelpers.ComputeUngeneralizableTypars env let generalizedTypars = GeneralizationHelpers.ComputeAndGeneralizeGenericTypars(cenv, denv, m, freeInEnv, false, CanGeneralizeConstrainedTypars, inlineFlag, Some(rhsExpr), declaredTypars, [], bindingTy, false) - let declaredTypars = ChooseCanonicalDeclaredTyparsAfterInference cenv.g env.DisplayEnv declaredTypars m + let declaredTypars = ChooseCanonicalDeclaredTyparsAfterInference cenv.g env.DisplayEnv declaredTypars m let generalizedTypars = PlaceTyparsInDeclarationOrder declaredTypars generalizedTypars @@ -6645,12 +6621,12 @@ and ComputeObjectExprOverrides cenv (env: TcEnv) tpenv impls = let slotImplSets = DispatchSlotChecking.GetSlotImplSets cenv.infoReader env.DisplayEnv true (impls |> List.map (fun (m, ty, _) -> ty, m)) let allImpls = - (impls, slotImplSets) ||> List.map2 (fun (m, ty, binds) implTySet -> + (impls, slotImplSets) ||> List.map2 (fun (m, ty, binds) implTySet -> let binds = binds |> List.map (BindingNormalization.NormalizeBinding ObjExprBinding cenv env) m, ty, binds, implTySet) let overridesAndVirts, tpenv = - (tpenv, allImpls) ||> List.mapFold (fun tpenv (m, implty, binds, SlotImplSet(reqdSlots, dispatchSlotsKeyed, availPriorOverrides, _) ) -> + (tpenv, allImpls) ||> List.mapFold (fun tpenv (m, implty, binds, SlotImplSet(reqdSlots, dispatchSlotsKeyed, availPriorOverrides, _) ) -> // Generate extra bindings fo object expressions with bindings using the CLIEvent attribute let binds, bindsAttributes = @@ -6681,7 +6657,7 @@ and ComputeObjectExprOverrides cenv (env: TcEnv) tpenv impls = // 3. infer must-have types by name/arity let preAssignedVirtsPerBinding = - bindKeys |> List.map (fun bkey -> List.filter (fst >> (=) bkey) virtNameAndArityPairs) + bindKeys |> List.map (fun bkey -> List.filter (fst >> (=) bkey) virtNameAndArityPairs) let absSlotInfo = (List.zip4 binds bindsAttributes bindNames preAssignedVirtsPerBinding) @@ -6692,7 +6668,7 @@ and ComputeObjectExprOverrides cenv (env: TcEnv) tpenv impls = // Convert the syntactic info to actual info let overrides = - (overrides, bindNameAndSynInfoPairs) ||> List.map2 (fun (id:Ident, memberFlags, ty, bindingAttribs, bindingBody) (_, valSynData) -> + (overrides, bindNameAndSynInfoPairs) ||> List.map2 (fun (id: Ident, memberFlags, ty, bindingAttribs, bindingBody) (_, valSynData) -> let partialValInfo = TranslateTopValSynInfo id.idRange (TcAttributes cenv env) valSynData let tps, _ = tryDestForallTy cenv.g ty let valInfo = TranslatePartialArity tps partialValInfo @@ -6716,7 +6692,7 @@ and CheckSuperType cenv ty m = and TcObjectExpr cenv overallTy env tpenv (synObjTy, argopt, binds, extraImpls, mNewExpr, mWholeExpr) = let mObjTy = synObjTy.Range - let objTy, tpenv = TcType cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv synObjTy + let objTy, tpenv = TcType cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv synObjTy match tryDestAppTy cenv.g objTy with | ValueNone -> error(Error(FSComp.SR.tcNewMustBeUsedWithNamedType(), mNewExpr)) | ValueSome tcref -> @@ -6726,7 +6702,7 @@ and TcObjectExpr cenv overallTy env tpenv (synObjTy, argopt, binds, extraImpls, CheckSuperType cenv objTy synObjTy.Range // Add the object type to the ungeneralizable items - let env = {env with eUngeneralizableItems = addFreeItemOfTy objTy env.eUngeneralizableItems } + let env = {env with eUngeneralizableItems = addFreeItemOfTy objTy env.eUngeneralizableItems } // Object expression members can access protected members of the implemented type let env = EnterFamilyRegion tcref env @@ -6756,7 +6732,7 @@ and TcObjectExpr cenv overallTy env tpenv (synObjTy, argopt, binds, extraImpls, // Work out the type of any interfaces to implement let extraImpls, tpenv = - (tpenv , extraImpls) ||> List.mapFold (fun tpenv (InterfaceImpl(synIntfTy, overrides, m)) -> + (tpenv, extraImpls) ||> List.mapFold (fun tpenv (InterfaceImpl(synIntfTy, overrides, m)) -> let intfTy, tpenv = TcType cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv synIntfTy if not (isInterfaceTy cenv.g intfTy) then error(Error(FSComp.SR.tcExpectedInterfaceType(), m)) @@ -6846,7 +6822,7 @@ and TcObjectExpr cenv overallTy env tpenv (synObjTy, argopt, binds, extraImpls, //------------------------------------------------------------------------- /// Check a constant string expression. It might be a 'printf' format string -and TcConstStringExpr cenv overallTy env m tpenv s = +and TcConstStringExpr cenv overallTy env m tpenv s = if (AddCxTypeEqualsTypeUndoIfFailed env.DisplayEnv cenv.css m overallTy cenv.g.string_ty) then mkString cenv.g m s, tpenv @@ -6866,7 +6842,7 @@ and TcConstStringExpr cenv overallTy env m tpenv s = match cenv.tcSink.CurrentSink with | None -> () - | Some sink -> + | Some sink -> for specifierLocation, numArgs in specifierLocations do sink.NotifyFormatSpecifierLocation(specifierLocation, numArgs) @@ -6882,7 +6858,7 @@ and TcConstStringExpr cenv overallTy env m tpenv s = //------------------------------------------------------------------------- /// Check a constant expression. -and TcConstExpr cenv overallTy env m tpenv c = +and TcConstExpr cenv overallTy env m tpenv c = match c with // NOTE: these aren't "really" constants @@ -6935,7 +6911,7 @@ and TcConstExpr cenv overallTy env m tpenv c = //------------------------------------------------------------------------- // Check an 'assert(x)' expression. -and TcAssertExpr cenv overallTy env (m:range) tpenv x = +and TcAssertExpr cenv overallTy env (m: range) tpenv x = let synm = m.MakeSynthetic() // Mark as synthetic so the language service won't pick it up. let callDiagnosticsExpr = SynExpr.App(ExprAtomicFlag.Atomic, false, mkSynLidGet synm ["System";"Diagnostics";"Debug"] "Assert", // wrap an extra parentheses so 'assert(x=1) isn't considered a named argument to a method call @@ -7079,7 +7055,7 @@ and TcAnonRecdExpr cenv overallTy env tpenv (isStruct, optOrigExpr, unsortedArgs let wrap, oldveaddr, _readonly, _writeonly = mkExprAddrOfExpr cenv.g origExprIsStruct false NeverMutates oldve None mOrigExpr - // Put all the expressions in unsorted order. The new bindings come first. The origin of each is tracked using + // Put all the expressions in unsorted order. The new bindings come first. The origin of each is tracked using /// - Choice1Of2 for a new binding /// - Choice2Of2 for a binding coming from the original expression let unsortedIdAndExprsAll = @@ -7094,7 +7070,7 @@ and TcAnonRecdExpr cenv overallTy env tpenv (isStruct, optOrigExpr, unsortedArgs let tcref, tinst = destAppTy cenv.g origExprTy let fspecs = tcref.Deref.TrueInstanceFieldsAsList for fspec in fspecs do - yield fspec.Id, Choice2Of2 (mkRecdFieldGetViaExprAddr (oldveaddr , tcref.MakeNestedRecdFieldRef fspec, tinst, mOrigExpr)) + yield fspec.Id, Choice2Of2 (mkRecdFieldGetViaExprAddr (oldveaddr, tcref.MakeNestedRecdFieldRef fspec, tinst, mOrigExpr)) else error (Error (FSComp.SR.tcCopyAndUpdateNeedsRecordType(), mOrigExpr)) |] |> Array.distinctBy (fst >> textOfId) @@ -7129,7 +7105,7 @@ and TcAnonRecdExpr cenv overallTy env tpenv (isStruct, optOrigExpr, unsortedArgs expr, tpenv -and TcForEachExpr cenv overallTy env tpenv (pat, enumSynExpr, bodySynExpr, mWholeExpr, spForLoop) = +and TcForEachExpr cenv overallTy env tpenv (pat, enumSynExpr, bodySynExpr, mWholeExpr, spForLoop) = UnifyTypes cenv env mWholeExpr overallTy cenv.g.unit_ty let mPat = pat.Range @@ -7150,7 +7126,7 @@ and TcForEachExpr cenv overallTy env tpenv (pat, enumSynExpr, bodySynExpr, mWhol (cenv.g.int32_ty, (fun _ x -> x), id, Choice1Of3 (startExpr, finishExpr)) // optimize 'for i in arr do' - | _ when isArray1DTy cenv.g enumExprTy -> + | _ when isArray1DTy cenv.g enumExprTy -> let arrVar, arrExpr = mkCompGenLocal mEnumExpr "arr" enumExprTy let idxVar, idxExpr = mkCompGenLocal mPat "idx" cenv.g.int32_ty let elemTy = destArrayTy cenv.g enumExprTy @@ -7225,7 +7201,7 @@ and TcForEachExpr cenv overallTy env tpenv (pat, enumSynExpr, bodySynExpr, mWhol mForLoopStart), cleanupE, mForLoopStart, cenv.g.unit_ty, NoSequencePointAtTry, NoSequencePointAtFinally)))) - let overallExpr = overallExprFixup overallExpr + let overallExpr = overallExprFixup overallExpr overallExpr, tpenv //------------------------------------------------------------------------- @@ -7256,7 +7232,7 @@ and TcQuotationExpr cenv overallTy env tpenv (_oper, raw, ast, isFromQueryExpres and TcComputationOrSequenceExpression cenv (env: TcEnv) overallTy m interpValOpt tpenv comp = match interpValOpt with - | Some (interpExpr:Expr, builderTy) -> + | Some (interpExpr: Expr, builderTy) -> TcComputationExpression cenv env overallTy m interpExpr builderTy tpenv comp | None -> TcSequenceExpression cenv env tpenv comp overallTy m @@ -7285,7 +7261,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv | _ -> false /// Make a builder.Method(...) call - let mkSynCall nm (m:range) args = + let mkSynCall nm (m: range) args = let m = m.MakeSynthetic() // Mark as synthetic so the language service won't pick it up. let args = match args with @@ -7329,7 +7305,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv (function (Attrib(_, _, _, ExtractAttribNamedArg "JoinConditionWord" (AttribStringArg s), _, _, _)) -> Some s | _ -> None) IgnoreAttribute // We do not respect this attribute for provided methods - let flagSearch (propName:string) = + let flagSearch (propName: string) = TryBindMethInfoAttribute cenv.g mBuilderVal cenv.g.attrib_CustomOperationAttribute methInfo IgnoreAttribute // We do not respect this attribute for IL methods (function (Attrib(_, _, _, ExtractAttribNamedArg propName (AttribBoolArg b), _, _, _)) -> Some b | _ -> None) @@ -7359,11 +7335,11 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv /// Decide if the identifier represents a use of a custom query operator - let tryGetDataForCustomOperation (nm:Ident) = + let tryGetDataForCustomOperation (nm: Ident) = match customOperationMethodsIndexedByKeyword.TryGetValue nm.idText with | true, [opData] -> let (opName, maintainsVarSpaceUsingBind, maintainsVarSpace, _allowInto, isLikeZip, isLikeJoin, isLikeGroupJoin, _joinConditionWord, methInfo) = opData - if (maintainsVarSpaceUsingBind && maintainsVarSpace) || (isLikeZip && isLikeJoin) || (isLikeZip && isLikeGroupJoin) || (isLikeJoin && isLikeGroupJoin) then + if (maintainsVarSpaceUsingBind && maintainsVarSpace) || (isLikeZip && isLikeJoin) || (isLikeZip && isLikeGroupJoin) || (isLikeJoin && isLikeGroupJoin) then errorR(Error(FSComp.SR.tcCustomOperationInvalid opName, nm.idRange)) match customOperationMethodsIndexedByMethodName.TryGetValue methInfo.LogicalName with | true, [_] -> () @@ -7375,43 +7351,43 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv /// Decide if the identifier represents a use of a custom query operator let hasCustomOperations () = not (isNil customOperationMethods) - let isCustomOperation nm = tryGetDataForCustomOperation nm |> Option.isSome + let isCustomOperation nm = tryGetDataForCustomOperation nm |> Option.isSome // Check for the MaintainsVariableSpace on custom operation - let customOperationMaintainsVarSpace (nm:Ident) = + let customOperationMaintainsVarSpace (nm: Ident) = match tryGetDataForCustomOperation nm with | None -> false - | Some (_nm, _maintainsVarSpaceUsingBind, maintainsVarSpace, _allowInto, _isLikeZip, _isLikeJoin, _isLikeGroupJoin, _joinConditionWord, _methInfo) -> maintainsVarSpace + | Some (_nm, _maintainsVarSpaceUsingBind, maintainsVarSpace, _allowInto, _isLikeZip, _isLikeJoin, _isLikeGroupJoin, _joinConditionWord, _methInfo) -> maintainsVarSpace - let customOperationMaintainsVarSpaceUsingBind (nm:Ident) = + let customOperationMaintainsVarSpaceUsingBind (nm: Ident) = match tryGetDataForCustomOperation nm with | None -> false - | Some (_nm, maintainsVarSpaceUsingBind, _maintainsVarSpace, _allowInto, _isLikeZip, _isLikeJoin, _isLikeGroupJoin, _joinConditionWord, _methInfo) -> maintainsVarSpaceUsingBind + | Some (_nm, maintainsVarSpaceUsingBind, _maintainsVarSpace, _allowInto, _isLikeZip, _isLikeJoin, _isLikeGroupJoin, _joinConditionWord, _methInfo) -> maintainsVarSpaceUsingBind - let customOperationIsLikeZip (nm:Ident) = + let customOperationIsLikeZip (nm: Ident) = match tryGetDataForCustomOperation nm with | None -> false - | Some (_nm, _maintainsVarSpaceUsingBind, _maintainsVarSpace, _allowInto, isLikeZip, _isLikeJoin, _isLikeGroupJoin, _joinConditionWord, _methInfo) -> isLikeZip + | Some (_nm, _maintainsVarSpaceUsingBind, _maintainsVarSpace, _allowInto, isLikeZip, _isLikeJoin, _isLikeGroupJoin, _joinConditionWord, _methInfo) -> isLikeZip - let customOperationIsLikeJoin (nm:Ident) = + let customOperationIsLikeJoin (nm: Ident) = match tryGetDataForCustomOperation nm with | None -> false - | Some (_nm, _maintainsVarSpaceUsingBind, _maintainsVarSpace, _allowInto, _isLikeZip, isLikeJoin, _isLikeGroupJoin, _joinConditionWord, _methInfo) -> isLikeJoin + | Some (_nm, _maintainsVarSpaceUsingBind, _maintainsVarSpace, _allowInto, _isLikeZip, isLikeJoin, _isLikeGroupJoin, _joinConditionWord, _methInfo) -> isLikeJoin - let customOperationIsLikeGroupJoin (nm:Ident) = + let customOperationIsLikeGroupJoin (nm: Ident) = match tryGetDataForCustomOperation nm with | None -> false - | Some (_nm, _maintainsVarSpaceUsingBind, _maintainsVarSpace, _allowInto, _isLikeZip, _isLikeJoin, isLikeGroupJoin, _joinConditionWord, _methInfo) -> isLikeGroupJoin + | Some (_nm, _maintainsVarSpaceUsingBind, _maintainsVarSpace, _allowInto, _isLikeZip, _isLikeJoin, isLikeGroupJoin, _joinConditionWord, _methInfo) -> isLikeGroupJoin - let customOperationJoinConditionWord (nm:Ident) = + let customOperationJoinConditionWord (nm: Ident) = match tryGetDataForCustomOperation nm with - | Some (_nm, _maintainsVarSpaceUsingBind, _maintainsVarSpace, _allowInto, _isLikeZip, _isLikeJoin, _isLikeGroupJoin, Some joinConditionWord, _methInfo) -> joinConditionWord + | Some (_nm, _maintainsVarSpaceUsingBind, _maintainsVarSpace, _allowInto, _isLikeZip, _isLikeJoin, _isLikeGroupJoin, Some joinConditionWord, _methInfo) -> joinConditionWord | _ -> "on" - let customOperationAllowsInto (nm:Ident) = + let customOperationAllowsInto (nm: Ident) = match tryGetDataForCustomOperation nm with | None -> false - | Some (_nm, _maintainsVarSpaceUsingBind, _maintainsVarSpace, allowInto, _isLikeZip, _isLikeJoin, _isLikeGroupJoin, _joinConditionWord, _methInfo) -> allowInto + | Some (_nm, _maintainsVarSpaceUsingBind, _maintainsVarSpace, allowInto, _isLikeZip, _isLikeJoin, _isLikeGroupJoin, _joinConditionWord, _methInfo) -> allowInto let customOpUsageText nm = match tryGetDataForCustomOperation nm with @@ -7441,7 +7417,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv CallEnvSink cenv.tcSink (comp.Range, env.NameEnv, ad) // Check for the [] attribute on an argument position - let tryGetArgInfosForCustomOperator (nm:Ident) = + let tryGetArgInfosForCustomOperator (nm: Ident) = match tryGetDataForCustomOperation nm with | None -> None | Some (_nm, __maintainsVarSpaceUsingBind, _maintainsVarSpace, _allowInto, _isLikeZip, _isLikeJoin, _isLikeGroupJoin, _joinConditionWord, methInfo) -> @@ -7452,13 +7428,13 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv | _ -> None | _ -> None - let expectedArgCountForCustomOperator (nm:Ident) = + let expectedArgCountForCustomOperator (nm: Ident) = match tryGetArgInfosForCustomOperator nm with | None -> 0 - | Some argInfos -> max (argInfos.Length - 1) 0 // drop the computation context argument + | Some argInfos -> max (argInfos.Length - 1) 0 // drop the computation context argument // Check for the [] attribute on an argument position - let isCustomOperationProjectionParameter i (nm:Ident) = + let isCustomOperationProjectionParameter i (nm: Ident) = match tryGetArgInfosForCustomOperator nm with | None -> false | Some argInfos -> @@ -7477,14 +7453,14 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv | SingleIdent nm when isCustomOperation nm && predicate nm -> Some nm | _ -> None - // e1 in e2 ('in' is parsed as 'JOIN_IN') - let (|InExpr|_|) (e:SynExpr) = + // e1 in e2 ('in' is parsed as 'JOIN_IN') + let (|InExpr|_|) (e: SynExpr) = match e with | SynExpr.JoinIn(e1, _, e2, mApp) -> Some (e1, e2, mApp) | _ -> None // e1 on e2 (note: 'on' is the 'JoinConditionWord') - let (|OnExpr|_|) nm (e:SynExpr) = + let (|OnExpr|_|) nm (e: SynExpr) = match tryGetDataForCustomOperation nm with | None -> None | Some _ -> @@ -7496,7 +7472,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv | _ -> None // e1 into e2 - let (|IntoSuffix|_|) (e:SynExpr) = + let (|IntoSuffix|_|) (e: SynExpr) = match e with | SynExpr.App(_, _, SynExpr.App(_, _, x, SingleIdent nm2, _), ExprAsPat intoPat, _) when nm2.idText = CustomOperations.Into -> Some (x, nm2.idRange, intoPat) @@ -7505,7 +7481,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv let arbPat (m: range) = mkSynPatVar None (mkSynId (m.MakeSynthetic()) "_missingVar") - let MatchIntoSuffixOrRecover alreadyGivenError (nm:Ident) (e:SynExpr) = + let MatchIntoSuffixOrRecover alreadyGivenError (nm: Ident) (e: SynExpr) = match e with | IntoSuffix (x, intoWordRange, intoPat) -> // record the "into" as a custom operation for colorization @@ -7517,7 +7493,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv errorR(Error(FSComp.SR.tcOperatorIncorrectSyntax(nm.idText, Option.get (customOpUsageText nm)), nm.idRange)) (e, arbPat e.Range, true) - let MatchOnExprOrRecover alreadyGivenError nm (onExpr:SynExpr) = + let MatchOnExprOrRecover alreadyGivenError nm (onExpr: SynExpr) = match onExpr with | OnExpr nm (innerSource, SynExprParen(keySelectors, _, _, _)) -> (innerSource, keySelectors) @@ -7543,14 +7519,14 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv None // JoinOrGroupJoinOp customOperationIsLikeJoin - let (|JoinOp|_|) (e:SynExpr) = JoinOrGroupJoinOp customOperationIsLikeJoin e - let (|GroupJoinOp|_|) (e:SynExpr) = JoinOrGroupJoinOp customOperationIsLikeGroupJoin e + let (|JoinOp|_|) (e: SynExpr) = JoinOrGroupJoinOp customOperationIsLikeJoin e + let (|GroupJoinOp|_|) (e: SynExpr) = JoinOrGroupJoinOp customOperationIsLikeGroupJoin e let arbKeySelectors m = mkSynBifix m "=" (arbExpr("_keySelectors", m)) (arbExpr("_keySelector2", m)) - let (|JoinExpr|_|) (e:SynExpr) = + let (|JoinExpr|_|) (e: SynExpr) = match e with - | InExpr (JoinOp(nm, innerSourcePat, _, alreadyGivenError), onExpr, mJoinCore) -> + | InExpr (JoinOp(nm, innerSourcePat, _, alreadyGivenError), onExpr, mJoinCore) -> let (innerSource, keySelectors) = MatchOnExprOrRecover alreadyGivenError nm onExpr Some(nm, innerSourcePat, innerSource, keySelectors, mJoinCore) | JoinOp (nm, innerSourcePat, mJoinCore, alreadyGivenError) -> @@ -7559,7 +7535,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv Some (nm, innerSourcePat, arbExpr("_innerSource", e.Range), arbKeySelectors e.Range, mJoinCore) | _ -> None - let (|GroupJoinExpr|_|) (e:SynExpr) = + let (|GroupJoinExpr|_|) (e: SynExpr) = match e with | InExpr (GroupJoinOp (nm, innerSourcePat, _, alreadyGivenError), intoExpr, mGroupJoinCore) -> let onExpr, intoPat, alreadyGivenError = MatchIntoSuffixOrRecover alreadyGivenError nm intoExpr @@ -7573,7 +7549,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv None - let (|JoinOrGroupJoinOrZipClause|_|) (e:SynExpr) = + let (|JoinOrGroupJoinOrZipClause|_|) (e: SynExpr) = match e with // join innerSourcePat in innerSource on (keySelector1 = keySelector2) @@ -7589,7 +7565,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv Some(nm, secondSourcePat, secondSource, None, None, mZipCore) // zip (without secondSource or in - gives error) - | CustomOpId customOperationIsLikeZip nm -> + | CustomOpId customOperationIsLikeZip nm -> errorR(Error(FSComp.SR.tcOperatorIncorrectSyntax(nm.idText, Option.get (customOpUsageText nm)), nm.idRange)) Some(nm, arbPat e.Range, arbExpr("_secondSource", e.Range), None, None, e.Range) @@ -7624,7 +7600,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv let rec strip e = match e with | SynExpr.FromParseError(SynExpr.App(_, _, f, arg, _), _) - | SynExpr.App(_, _, f, arg, _) -> + | SynExpr.App(_, _, f, arg, _) -> let g, acc = strip f g, (arg::acc) | _ -> e, [] @@ -7638,7 +7614,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv let (|CustomOperationClause|_|) e = match e with - | OptionalIntoSuffix(StripApps(SingleIdent nm, _) as core, optInto) when isCustomOperation nm -> + | OptionalIntoSuffix(StripApps(SingleIdent nm, _) as core, optInto) when isCustomOperation nm -> // Now we know we have a custom operation, commit the name resolution let optIntoInfo = match optInto with @@ -7734,7 +7710,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv // ... // --> // zip expr1 expr2 (fun pat1 pat3 -> ...) - | ForEachThenJoinOrGroupJoinOrZipClause (isFromSource, firstSourcePat, firstSource, nm, secondSourcePat, secondSource, keySelectorsOpt, secondResultPatOpt, mOpCore, innerComp) -> + | ForEachThenJoinOrGroupJoinOrZipClause (isFromSource, firstSourcePat, firstSource, nm, secondSourcePat, secondSource, keySelectorsOpt, secondResultPatOpt, mOpCore, innerComp) -> if not q then error(Error(FSComp.SR.tcCustomOperationMayNotBeUsedHere(), nm.idRange)) @@ -7788,14 +7764,14 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv secondSource (mkSynLambda firstSourceSimplePats keySelector1 mSynthetic) (mkSynLambda secondSourceSimplePats keySelector2 mSynthetic) - (mkSynLambda firstSourceSimplePats (mkSynLambda innerPat e mSynthetic) mSynthetic) ] + (mkSynLambda firstSourceSimplePats (mkSynLambda innerPat e mSynthetic) mSynthetic) ] let mkZipExpr e = let mSynthetic = mOpCore.MakeSynthetic() mkSynCall methInfo.DisplayName mOpCore [ firstSource secondSource - (mkSynLambda firstSourceSimplePats (mkSynLambda secondSourceSimplePats e mSynthetic) mSynthetic) ] + (mkSynLambda firstSourceSimplePats (mkSynLambda secondSourceSimplePats e mSynthetic) mSynthetic) ] // wraps given expression into sequence with result produced by arbExpr so result will look like: // l; SynExpr.ArbitraryAfterError(...) @@ -7875,7 +7851,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv // Case from C# spec: A query expression with a join clause with an into followed by something other than a select clause // Case from C# spec: A query expression with a join clause without an into followed by something other than a select clause let valsInner, _env = varSpaceInner.Force mOpCore - let varSpaceExpr = mkExprForVarSpace mOpCore valsInner + let varSpaceExpr = mkExprForVarSpace mOpCore valsInner let varSpacePat = mkPatForVarSpace mOpCore valsInner let joinExpr = mkOverallExprGivenVarSpaceExpr varSpaceExpr Some (trans true q varSpaceInner (SynExpr.ForEach (NoSequencePointAtForLoop, SeqExprOnly false, false, varSpacePat, joinExpr, innerComp, mOpCore)) translatedCtxt) @@ -7932,7 +7908,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv // 'join' clauses preceded by 'let' and other constructs get processed by repackaging with a 'for' loop. let patvs, _env = varSpace.Force comp.Range - let varSpaceExpr = mkExprForVarSpace mClause patvs + let varSpaceExpr = mkExprForVarSpace mClause patvs let varSpacePat = mkPatForVarSpace mClause patvs let dataCompPrior = @@ -7951,13 +7927,13 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv if not q then error(Error(FSComp.SR.tcCustomOperationMayNotBeUsedHere(), opExpr.Range)) let patvs, _env = varSpace.Force comp.Range - let varSpaceExpr = mkExprForVarSpace mClause patvs + let varSpaceExpr = mkExprForVarSpace mClause patvs let dataCompPriorToOp = let isYield = not (customOperationMaintainsVarSpaceUsingBind nm) translatedCtxt (transNoQueryOps (SynExpr.YieldOrReturn((isYield, false), varSpaceExpr, mClause))) - let rec consumeClauses (varSpace:LazyWithContext<_, _>) dataCompPrior compClausesExpr lastUsesBind = + let rec consumeClauses (varSpace: LazyWithContext<_, _>) dataCompPrior compClausesExpr lastUsesBind = // Substitute 'yield ' into the context @@ -7981,7 +7957,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv errorR(Error(FSComp.SR.tcBinaryOperatorRequiresBody(nm.idText, Option.get (customOpUsageText nm)), nm.idRange)) match optionalCont with | None -> - // we are about to drop the 'opExpr' AST on the floor. we've already reported an error. attempt to get name resolutions before dropping it + // we are about to drop the 'opExpr' AST on the floor. we've already reported an error. attempt to get name resolutions before dropping it RecordNameAndTypeResolutions_IdeallyWithoutHavingOtherEffects cenv env tpenv opExpr dataCompPrior | Some contExpr -> consumeClauses varSpace dataCompPrior contExpr lastUsesBind @@ -8006,7 +7982,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv match optionalCont with | None -> - match optionalIntoPat with + match optionalIntoPat with | Some intoPat -> errorR(Error(FSComp.SR.tcIntoNeedsRestOfQuery(), intoPat.Range)) | None -> () dataCompAfterOp @@ -8066,7 +8042,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv if isQuery && not(innerComp1.IsArbExprAndThusAlreadyReportedError) then match innerComp1 with - | SynExpr.JoinIn _ -> () // an error will be reported later when we process innerComp1 as a sequential + | SynExpr.JoinIn _ -> () // an error will be reported later when we process innerComp1 as a sequential | _ -> errorR(Error(FSComp.SR.tcUnrecognizedQueryOperator(), innerComp1.RangeOfFirstPortion)) match tryTrans true false varSpace innerComp1 id with @@ -8079,7 +8055,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv | SynExpr.IfThenElse (_, _, _, _, _, mIfToThen, _m) -> mIfToThen | SynExpr.Match (SequencePointAtBinding mMatch, _, _, _) -> mMatch | SynExpr.TryWith (_, _, _, _, _, SequencePointAtTry mTry, _) -> mTry - | SynExpr.TryFinally (_, _, _, SequencePointAtTry mTry, _) -> mTry + | SynExpr.TryFinally (_, _, _, SequencePointAtTry mTry, _) -> mTry | SynExpr.For (SequencePointAtForLoop mBind, _, _, _, _, _, _) -> mBind | SynExpr.ForEach (SequencePointAtForLoop mBind, _, _, _, _, _, _) -> mBind | SynExpr.While (SequencePointAtWhileLoop mWhile, _, _, _) -> mWhile @@ -8152,7 +8128,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv if isNil (TryFindIntrinsicOrExtensionMethInfo cenv env bindRange ad "Using" builderTy) then error(Error(FSComp.SR.tcRequireBuilderMethod("Using"), bindRange)) Some (translatedCtxt (mkSynCall "Using" bindRange [rhsExpr; consumeExpr ])) - // 'let! pat = expr in expr' --> build.Bind(e1, (function _argN -> match _argN with pat -> expr)) + // 'let! pat = expr in expr' --> build.Bind(e1, (function _argN -> match _argN with pat -> expr)) | SynExpr.LetOrUseBang(spBind, false, isFromSource, pat, rhsExpr, innerComp, _) -> let bindRange = match spBind with SequencePointAtBinding(m) -> m | _ -> rhsExpr.Range @@ -8170,10 +8146,10 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv let rhsExpr = if isFromSource then mkSourceExpr rhsExpr else rhsExpr Some (trans true q varSpace innerComp (fun holeFill -> let consumeExpr = SynExpr.MatchLambda(false, pat.Range, [Clause(pat, None, holeFill, innerRange, SequencePointAtTarget)], spBind, innerRange) - translatedCtxt (mkSynCall "Bind" bindRange [rhsExpr; consumeExpr]))) + translatedCtxt (mkSynCall "Bind" bindRange [rhsExpr; consumeExpr]))) - // 'use! pat = e1 in e2' --> build.Bind(e1, (function _argN -> match _argN with pat -> build.Using(x, (fun _argN -> match _argN with pat -> e2)))) - | SynExpr.LetOrUseBang(spBind, true, isFromSource, (SynPat.Named (SynPat.Wild _, id, false, _, _) as pat) , rhsExpr, innerComp, _) + // 'use! pat = e1 in e2' --> build.Bind(e1, (function _argN -> match _argN with pat -> build.Using(x, (fun _argN -> match _argN with pat -> e2)))) + | SynExpr.LetOrUseBang(spBind, true, isFromSource, (SynPat.Named (SynPat.Wild _, id, false, _, _) as pat), rhsExpr, innerComp, _) | SynExpr.LetOrUseBang(spBind, true, isFromSource, (SynPat.LongIdent (LongIdentWithDots([id], _), _, _, _, _, _) as pat), rhsExpr, innerComp, _) -> let bindRange = match spBind with SequencePointAtBinding(m) -> m | _ -> rhsExpr.Range @@ -8211,7 +8187,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv if isQuery then error(Error(FSComp.SR.tcTryWithMayNotBeUsedInQueries(), mTry)) let clauses = clauses |> List.map (fun (Clause(pat, cond, clauseComp, patm, sp)) -> Clause(pat, cond, transNoQueryOps clauseComp, patm, sp)) let consumeExpr = SynExpr.MatchLambda(true, mTryToLast, clauses, NoSequencePointAtStickyBinding, mTryToLast) - if isNil (TryFindIntrinsicOrExtensionMethInfo cenv env mTry ad "TryWith" builderTy) then error(Error(FSComp.SR.tcRequireBuilderMethod("TryWith"), mTry)) + if isNil (TryFindIntrinsicOrExtensionMethInfo cenv env mTry ad "TryWith" builderTy) then error(Error(FSComp.SR.tcRequireBuilderMethod("TryWith"), mTry)) if isNil (TryFindIntrinsicOrExtensionMethInfo cenv env mTry ad "Delay" builderTy) then error(Error(FSComp.SR.tcRequireBuilderMethod("Delay"), mTry)) Some(translatedCtxt (mkSynCall "TryWith" mTry [mkSynCall "Delay" mTry [mkSynDelay2 (transNoQueryOps innerComp)]; consumeExpr])) @@ -8265,7 +8241,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv else if isQuery && not comp.IsArbExprAndThusAlreadyReportedError then match comp with - | SynExpr.JoinIn _ -> () // an error will be reported later when we process innerComp1 as a sequential + | SynExpr.JoinIn _ -> () // an error will be reported later when we process innerComp1 as a sequential | _ -> errorR(Error(FSComp.SR.tcUnrecognizedQueryOperator(), comp.RangeOfFirstPortion)) trans true q varSpace (SynExpr.ImplicitZero comp.Range) (fun holeFill -> translatedCtxt (SynExpr.Sequential(SuppressSequencePointOnStmtOfSequential, true, comp, holeFill, comp.Range))) @@ -8296,9 +8272,9 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv match comp with | SynExpr.YieldOrReturn ((true, _), _, _) -> { env with eContextInfo = ContextInfo.YieldInComputationExpression } | SynExpr.YieldOrReturn ((_, true), _, _) -> { env with eContextInfo = ContextInfo.ReturnInComputationExpression } - | _ -> env + | _ -> env - let lambdaExpr , tpenv= TcExpr cenv (builderTy --> overallTy) env tpenv lambdaExpr + let lambdaExpr, tpenv= TcExpr cenv (builderTy --> overallTy) env tpenv lambdaExpr // beta-var-reduce to bind the builder using a 'let' binding let coreExpr = mkApps cenv.g ((lambdaExpr, tyOfExpr cenv.g lambdaExpr), [], [interpExpr], mBuilderVal) @@ -8319,7 +8295,7 @@ and TcSequenceExpression cenv env tpenv comp overallTy m = // Allow subsumption at 'yield' if the element type is nominal prior to the analysis of the body of the sequence expression let flex = not (isTyparTy cenv.g genEnumElemTy) - let mkDelayedExpr (coreExpr:Expr) = + let mkDelayedExpr (coreExpr: Expr) = let m = coreExpr.Range let overallTy = tyOfExpr cenv.g coreExpr mkSeqDelay cenv env m overallTy coreExpr @@ -8354,7 +8330,7 @@ and TcSequenceExpression cenv env tpenv comp overallTy m = let matchv, matchExpr = compileSeqExprMatchClauses cenv env enumExprMark (pat', vspecs) innerExpr None enumElemTy genOuterTy let lam = mkLambda enumExprMark matchv (matchExpr, tyOfExpr cenv.g matchExpr) - Some(mkSeqCollect cenv env m enumElemTy genOuterTy lam enumExpr , tpenv) + Some(mkSeqCollect cenv env m enumElemTy genOuterTy lam enumExpr, tpenv) | SynExpr.For (spBind, id, start, dir, finish, innerComp, m) -> Some(tcSequenceExprBody env genOuterTy tpenv (elimFastIntegerForLoop (spBind, id, start, dir, finish, innerComp, m))) @@ -8417,7 +8393,7 @@ and TcSequenceExpression cenv env tpenv comp overallTy m = tpenv true comp - (fun x -> x) |> Some + (fun x -> x) |> Some // 'use x = expr in expr' | SynExpr.LetOrUse (_isRec, true, [Binding (_vis, NormalBinding, _, _, _, _, _, pat, _, rhsExpr, _, _spBind)], innerComp, wholeExprMark) -> @@ -8460,7 +8436,7 @@ and TcSequenceExpression cenv env tpenv comp overallTy m = if not isYield then errorR(Error(FSComp.SR.tcUseYieldBangForMultipleResults(), m)) - AddCxTypeMustSubsumeType ContextInfo.NoContext env.DisplayEnv cenv.css m NoTrace genOuterTy genExprTy + AddCxTypeMustSubsumeType ContextInfo.NoContext env.DisplayEnv cenv.css m NoTrace genOuterTy genExprTy Some(mkCoerceExpr(resultExpr, genOuterTy, m, genExprTy), tpenv) | SynExpr.YieldOrReturn((isYield, _), yieldExpr, m) -> @@ -8525,7 +8501,7 @@ and Propagate cenv overallTy env tpenv (expr: ApplicableExpr) exprty delayed = | DelayedDotLookup _ :: _ -> () | DelayedTypeApp (_, _mTypeArgs, mExprAndTypeArgs) :: delayedList' -> // Note this case should not occur: would eventually give an "Unexpected type application" error in TcDelayed - propagate isAddrOf delayedList' mExprAndTypeArgs exprty + propagate isAddrOf delayedList' mExprAndTypeArgs exprty | DelayedApp (_, arg, mExprAndArg) :: delayedList' -> let denv = env.DisplayEnv @@ -8541,7 +8517,7 @@ and Propagate cenv overallTy env tpenv (expr: ApplicableExpr) exprty delayed = valRefEq cenv.g vf cenv.g.nativeptr_tobyref_vref) -> true | _ -> false - propagate isAddrOf delayedList' mExprAndArg resultTy + propagate isAddrOf delayedList' mExprAndArg resultTy | _ -> let mArg = arg.Range @@ -8565,14 +8541,14 @@ and Propagate cenv overallTy env tpenv (expr: ApplicableExpr) exprty delayed = propagate false delayed expr.Range exprty -and PropagateThenTcDelayed cenv overallTy env tpenv mExpr expr exprty (atomicFlag:ExprAtomicFlag) delayed = +and PropagateThenTcDelayed cenv overallTy env tpenv mExpr expr exprty (atomicFlag: ExprAtomicFlag) delayed = Propagate cenv overallTy env tpenv expr exprty delayed TcDelayed cenv overallTy env tpenv mExpr expr exprty atomicFlag delayed /// Typecheck "expr ... " constructs where "..." is a sequence of applications, /// type applications and dot-notation projections. -and TcDelayed cenv overallTy env tpenv mExpr expr exprty (atomicFlag:ExprAtomicFlag) delayed = +and TcDelayed cenv overallTy env tpenv mExpr expr exprty (atomicFlag: ExprAtomicFlag) delayed = // OK, we've typechecked the thing on the left of the delayed lookup chain. // We can now record for posterity the type of this expression and the location of the expression. @@ -8609,8 +8585,8 @@ and TcDelayed cenv overallTy env tpenv mExpr expr exprty (atomicFlag:ExprAtomicF /// Convert the delayed identifiers to a dot-lookup. /// -/// TcItemThen: For StaticItem [.Lookup] , mPrior is the range of StaticItem -/// TcLookupThen: For expr.InstanceItem [.Lookup] , mPrior is the range of expr.InstanceItem +/// TcItemThen: For StaticItem [.Lookup], mPrior is the range of StaticItem +/// TcLookupThen: For expr.InstanceItem [.Lookup], mPrior is the range of expr.InstanceItem and delayRest rest mPrior delayed = match rest with | [] -> delayed @@ -8658,7 +8634,7 @@ and TcFunctionApplicationThen cenv overallTy env tpenv mExprAndArg expr exprty ( error (NotAFunction(denv, overallTy, mFunExpr, mArg)) //------------------------------------------------------------------------- -// TcLongIdentThen : Typecheck "A.B.C.E.F ... " constructs +// TcLongIdentThen: Typecheck "A.B.C.E.F ... " constructs //------------------------------------------------------------------------- and TcLongIdentThen cenv overallTy env tpenv (LongIdentWithDots(longId, _)) delayed = @@ -8717,7 +8693,7 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del let (|FittedArgs|_|) arg = match arg with | SynExprParen(SynExpr.Tuple(false, args, _, _), _, _, _) - | SynExpr.Tuple(false, args, _, _) when numArgTys > 1 -> Some args + | SynExpr.Tuple(false, args, _, _) when numArgTys > 1 -> Some args | SynExprParen(arg, _, _, _) | arg when numArgTys = 1 -> Some [arg] | _ -> None @@ -8894,7 +8870,7 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del let tyargs, tpenv = TcTypesOrMeasures None cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv tys mTypeArgs // FUTURE: can we do better than emptyTyparInst here, in order to display instantiations - // of type variables in the quick info provided in the IDE? But note we haven't yet even checked if the + // of type variables in the quick info provided in the IDE? But note we haven't yet even checked if the // number of type arguments is correct... CallNameResolutionSink cenv.tcSink (mExprAndTypeArgs, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.Use, env.DisplayEnv, env.eAccessRights) @@ -9016,7 +8992,7 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del | SynExpr.Record(_, copyOpt, fields, _) -> copyOpt |> Option.forall (fst >> isSimpleArgument) && fields |> List.forall (p23 >> Option.forall isSimpleArgument) | SynExpr.App (_, _, synExpr, synExpr2, _) -> isSimpleArgument synExpr && isSimpleArgument synExpr2 | SynExpr.IfThenElse(synExpr, synExpr2, synExprOpt, _, _, _, _) -> isSimpleArgument synExpr && isSimpleArgument synExpr2 && Option.forall isSimpleArgument synExprOpt - | SynExpr.DotIndexedGet(synExpr, _, _, _) -> isSimpleArgument synExpr + | SynExpr.DotIndexedGet(synExpr, _, _, _) -> isSimpleArgument synExpr | SynExpr.ObjExpr _ | SynExpr.AnonRecd _ | SynExpr.While _ @@ -9049,7 +9025,7 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del | SynExpr.ArbitraryAfterError(_, _) | SynExpr.FromParseError(_, _) | SynExpr.DiscardAfterMissingQualificationAfterDot(_, _) - | SynExpr.ImplicitZero _ + | SynExpr.ImplicitZero _ | SynExpr.YieldOrReturn _ | SynExpr.YieldOrReturnFrom _ | SynExpr.MatchBang _ @@ -9101,7 +9077,7 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del UnifyTypes cenv env mStmt overallTy cenv.g.unit_ty vref.Deref.SetHasBeenReferenced() CheckValAccessible mItem env.eAccessRights vref - CheckValAttributes cenv.g vref mItem |> CommitOperationResult + CheckValAttributes cenv.g vref mItem |> CommitOperationResult let vty = vref.Type let vty2 = if isByrefTy cenv.g vty then @@ -9133,7 +9109,7 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del let vexpFlex = (if isSpecial then MakeApplicableExprNoFlex cenv vexp else MakeApplicableExprWithFlex cenv env vexp) // We need to eventually record the type resolution for an expression, but this is done // inside PropagateThenTcDelayed, so we don't have to explicitly call 'CallExprHasTypeSink' here - PropagateThenTcDelayed cenv overallTy env tpenv mExprAndTypeArgs vexpFlex vexpFlex.Type ExprAtomicFlag.Atomic otherDelayed + PropagateThenTcDelayed cenv overallTy env tpenv mExprAndTypeArgs vexpFlex vexpFlex.Type ExprAtomicFlag.Atomic otherDelayed // Value get | _ -> @@ -9161,7 +9137,7 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del let meths = pinfos |> GettersOfPropInfos let isByrefMethReturnSetter = meths |> List.exists (function (_,Some pinfo) -> isByrefTy cenv.g (pinfo.GetPropertyType(cenv.amap,mItem)) | _ -> false) if isByrefMethReturnSetter then - // x.P <- ... byref setter + // x.P <- ... byref setter if isNil meths then error (Error (FSComp.SR.tcPropertyIsNotReadable(nm), mItem)) TcMethodApplicationThen cenv env overallTy None tpenv tyargsOpt [] mItem mItem nm ad NeverMutates true meths afterResolution NormalValUse args ExprAtomicFlag.Atomic delayed else @@ -9230,7 +9206,7 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del let e2', tpenv = TcExprFlex cenv true false fieldTy env tpenv e2 let expr = mkStaticRecdFieldSet (rfinfo.RecdFieldRef, rfinfo.TypeInst, e2', mStmt) expr, tpenv - | _ -> + | _ -> let exprty = fieldTy let expr = match rfinfo.LiteralValue with @@ -9346,7 +9322,7 @@ and TcLookupThen cenv overallTy env tpenv mObjExpr objExpr objExprTy longId dela let meths = pinfos |> GettersOfPropInfos let isByrefMethReturnSetter = meths |> List.exists (function (_,Some pinfo) -> isByrefTy cenv.g (pinfo.GetPropertyType(cenv.amap,mItem)) | _ -> false) if isByrefMethReturnSetter then - // x.P <- ... byref setter + // x.P <- ... byref setter if isNil meths then error (Error (FSComp.SR.tcPropertyIsNotReadable(nm), mItem)) TcMethodApplicationThen cenv env overallTy None tpenv tyargsOpt objArgs mExprAndItem mItem nm ad PossiblyMutates true meths afterResolution NormalValUse args atomicFlag delayed else @@ -9399,7 +9375,7 @@ and TcLookupThen cenv overallTy env tpenv mObjExpr objExpr objExprTy longId dela | Item.ILField finfo -> // Get or set instance IL field - ILFieldInstanceChecks cenv.g cenv.amap ad mItem finfo + ILFieldInstanceChecks cenv.g cenv.amap ad mItem finfo let exprty = finfo.FieldType(cenv.amap, mItem) match delayed with @@ -9421,7 +9397,7 @@ and TcLookupThen cenv overallTy env tpenv mObjExpr objExpr objExprTy longId dela | (Item.FakeInterfaceCtor _ | Item.DelegateCtor _) -> error (Error (FSComp.SR.tcConstructorsCannotBeFirstClassValues(), mItem)) | _ -> error (Error (FSComp.SR.tcSyntaxFormUsedOnlyWithRecordLabelsPropertiesAndFields(), mItem)) -and TcEventValueThen cenv overallTy env tpenv mItem mExprAndItem objDetails (einfo:EventInfo) delayed = +and TcEventValueThen cenv overallTy env tpenv mItem mExprAndItem objDetails (einfo: EventInfo) delayed = // Instance IL event (fake up event-as-value) let nm = einfo.EventName let ad = env.eAccessRights @@ -9482,7 +9458,7 @@ and TcMethodApplicationThen objArgs // The 'obj' arguments in obj.M(...) and obj.M, if any m // The range of the object argument or whole application. We immediately union this with the range of the arguments mItem // The range of the item that resolved to the method name - methodName // string, name of the method + methodName // string, name of the method ad // accessibility rights of the caller mut // what do we know/assume about whether this method will mutate or not? isProp // is this a property call? Used for better error messages and passed to BuildMethodCall @@ -9490,7 +9466,7 @@ and TcMethodApplicationThen afterResolution // do we need to notify sink after overload resolution isSuperInit // is this a special invocation, e.g. a super-class constructor call. Passed through to BuildMethodCall args // the _syntactic_ method arguments, not yet type checked. - atomicFlag // is the expression atomic or not? + atomicFlag // is the expression atomic or not? delayed // further lookups and applications that follow this = @@ -9535,10 +9511,10 @@ and TcMethodApplication tpenv tyargsOpt objArgs - mMethExpr // range of the entire method expression + mMethExpr // range of the entire method expression mItem methodName - (objTyOpt : TType option) + (objTyOpt: TType option) ad mut isProp @@ -9625,7 +9601,7 @@ and TcMethodApplication // member x.M(arg1, arg2) // being used with // x.M p - // We typecheck this as if it has been written "(fun (v1, v2) -> x.M(v1, v2)) p" + // We typecheck this as if it has been written "(fun (v1, v2) -> x.M(v1, v2)) p" // Without this rule this requires // x.M (fst p, snd p) | [calledMeth] @@ -9646,7 +9622,7 @@ and TcMethodApplication let unnamedCurriedCallerArgs = unnamedCurriedCallerArgs |> List.mapSquared MakeUnnamedCallerArgInfo let namedCurriedCallerArgs = namedCurriedCallerArgs |> List.mapSquared (fun (isOpt, nm, x) -> let ty = GetNewInferenceTypeForMethodArg cenv env tpenv x - // #435263 : compiler crash with .net optional parameters and F# optional syntax + // #435263: compiler crash with .net optional parameters and F# optional syntax // named optional arguments should always have option type let ty = if isOpt then mkOptionTy denv.g ty else ty nm, isOpt, x, ty, x.Range @@ -9655,22 +9631,22 @@ and TcMethodApplication (Some (unnamedCurriedCallerArgs, namedCurriedCallerArgs), None, exprTy) - let CalledMethHasSingleArgumentGroupOfThisLength n (calledMeth:MethInfo) = + let CalledMethHasSingleArgumentGroupOfThisLength n (calledMeth: MethInfo) = let curriedMethodArgAttribs = calledMeth.GetParamAttribs(cenv.amap, mItem) curriedMethodArgAttribs.Length = 1 && curriedMethodArgAttribs.Head.Length = n - let GenerateMatchingSimpleArgumentTypes (calledMeth:MethInfo) = + let GenerateMatchingSimpleArgumentTypes (calledMeth: MethInfo) = let curriedMethodArgAttribs = calledMeth.GetParamAttribs(cenv.amap, mItem) curriedMethodArgAttribs |> List.map (List.filter isSimpleFormalArg >> NewInferenceTypes) - let UnifyMatchingSimpleArgumentTypes exprTy (calledMeth:MethInfo) = + let UnifyMatchingSimpleArgumentTypes exprTy (calledMeth: MethInfo) = let curriedArgTys = GenerateMatchingSimpleArgumentTypes calledMeth let returnTy = - (exprTy, curriedArgTys) ||> List.fold (fun exprTy argTys -> + (exprTy, curriedArgTys) ||> List.fold (fun exprTy argTys -> let domainTy, resultTy = UnifyFunctionType None cenv denv mMethExpr exprTy - UnifyTypes cenv env mMethExpr domainTy (mkRefTupledTy cenv.g argTys) + UnifyTypes cenv env mMethExpr domainTy (mkRefTupledTy cenv.g argTys) resultTy) curriedArgTys, returnTy @@ -9709,7 +9685,7 @@ and TcMethodApplication | None, _ -> let domainTy, returnTy = UnifyFunctionType None cenv denv mMethExpr exprTy - let argTys = if isUnitTy cenv.g domainTy then [] else tryDestRefTupleTy cenv.g domainTy + let argTys = if isUnitTy cenv.g domainTy then [] else tryDestRefTupleTy cenv.g domainTy // Only apply this rule if a candidate method exists with this number of arguments let argTys = if candidates |> List.exists (CalledMethHasSingleArgumentGroupOfThisLength argTys.Length) then @@ -9771,7 +9747,7 @@ and TcMethodApplication UnifyMatchingSimpleArgumentTypes exprTy calledMeth | _ -> let domainTy, returnTy = UnifyFunctionType None cenv denv mMethExpr exprTy - let argTys = if isUnitTy cenv.g domainTy then [] else tryDestRefTupleTy cenv.g domainTy + let argTys = if isUnitTy cenv.g domainTy then [] else tryDestRefTupleTy cenv.g domainTy // Only apply this rule if a candidate method exists with this number of arguments let argTys = if candidates |> List.exists (CalledMethHasSingleArgumentGroupOfThisLength argTys.Length) then @@ -9799,15 +9775,15 @@ and TcMethodApplication match ExamineMethodForLambdaPropagation meth with | Some (unnamedInfo, namedInfo) -> let calledObjArgTys = meth.CalledObjArgTys(mMethExpr) - if (calledObjArgTys, callerObjArgTys) ||> Seq.forall2 (fun calledTy callerTy -> AddCxTypeMustSubsumeTypeMatchingOnlyUndoIfFailed denv cenv.css mMethExpr calledTy callerTy) then + if (calledObjArgTys, callerObjArgTys) ||> Seq.forall2 (fun calledTy callerTy -> AddCxTypeMustSubsumeTypeMatchingOnlyUndoIfFailed denv cenv.css mMethExpr calledTy callerTy) then yield (List.toArraySquared unnamedInfo, List.toArraySquared namedInfo) | None -> () |] else [| |] // Now typecheck the argument expressions - let unnamedCurriedCallerArgs, (lambdaPropagationInfo, tpenv) = TcUnnamedMethodArgs cenv env lambdaPropagationInfo tpenv unnamedCurriedCallerArgs - let namedCurriedCallerArgs, (_, tpenv) = TcMethodNamedArgs cenv env lambdaPropagationInfo tpenv namedCurriedCallerArgs + let unnamedCurriedCallerArgs, (lambdaPropagationInfo, tpenv) = TcUnnamedMethodArgs cenv env lambdaPropagationInfo tpenv unnamedCurriedCallerArgs + let namedCurriedCallerArgs, (_, tpenv) = TcMethodNamedArgs cenv env lambdaPropagationInfo tpenv namedCurriedCallerArgs unnamedCurriedCallerArgs, namedCurriedCallerArgs, None, exprTy, tpenv let preArgumentTypeCheckingCalledMethGroup = @@ -9830,7 +9806,7 @@ and TcMethodApplication let callerArgs = List.zip unnamedCurriedCallerArgs namedCurriedCallerArgs let postArgumentTypeCheckingCalledMethGroup = - preArgumentTypeCheckingCalledMethGroup |> List.map (fun (minfo:MethInfo, minst, pinfoOpt, usesParamArrayConversion) -> + preArgumentTypeCheckingCalledMethGroup |> List.map (fun (minfo: MethInfo, minst, pinfoOpt, usesParamArrayConversion) -> let callerTyArgs = match tyargsOpt with | Some tyargs -> minfo.AdjustUserTypeInstForFSharpStyleIndexedExtensionMembers(tyargs) @@ -9845,7 +9821,7 @@ and TcMethodApplication if not uniquelyResolved then GeneralizationHelpers.CanonicalizePartialInferenceProblem (cenv, denv, mItem) (//freeInTypeLeftToRight cenv.g false returnTy @ - (unnamedCurriedCallerArgs |> List.collectSquared (fun callerArg -> freeInTypeLeftToRight cenv.g false callerArg.Type))) + (unnamedCurriedCallerArgs |> List.collectSquared (fun callerArg -> freeInTypeLeftToRight cenv.g false callerArg.Type))) let result, errors = ResolveOverloading csenv NoTrace methodName 0 None callerArgCounts ad postArgumentTypeCheckingCalledMethGroup true (Some returnTy) @@ -9892,7 +9868,7 @@ and TcMethodApplication RaiseOperationResult errors match result with | None -> error(InternalError("at least one error should be returned by failed method overloading", mItem)) - | Some res -> res + | Some res -> res let finalCalledMethInfo = finalCalledMeth.Method let finalCalledMethInst = finalCalledMeth.CalledTyArgs @@ -9922,13 +9898,13 @@ and TcMethodApplication if (isInstance && finalCalledMethInfo.IsInstance && typeEquiv cenv.g finalCalledMethInfo.ApparentEnclosingType cenv.g.obj_ty && - (finalCalledMethInfo.LogicalName = "GetHashCode" || finalCalledMethInfo.LogicalName = "Equals")) then + (finalCalledMethInfo.LogicalName = "GetHashCode" || finalCalledMethInfo.LogicalName = "Equals")) then objArgs |> List.iter (fun expr -> ConstraintSolver.AddCxTypeMustSupportEquality env.DisplayEnv cenv.css mMethExpr NoTrace (tyOfExpr cenv.g expr)) // Uses of a Dictionary() constructor without an IEqualityComparer argument imply an equality constraint // on the first type argument. - if HasHeadType cenv.g cenv.g.tcref_System_Collections_Generic_Dictionary finalCalledMethInfo.ApparentEnclosingType && + if HasHeadType cenv.g cenv.g.tcref_System_Collections_Generic_Dictionary finalCalledMethInfo.ApparentEnclosingType && finalCalledMethInfo.IsConstructor && not (finalCalledMethInfo.GetParamDatas(cenv.amap, mItem, finalCalledMeth.CalledTyArgs) |> List.existsSquared (fun (ParamData(_, _, _, _, _, _, _, ty)) -> @@ -9956,8 +9932,8 @@ and TcMethodApplication // For unapplied 'e.M' we first evaluate 'e' outside the lambda, i.e. 'let v = e in (fun arg -> v.M(arg))' let objArgPreBinder, objArgs = match objArgs, lambdaVars with - | [objArg], Some _ -> - if finalCalledMethInfo.IsExtensionMember && finalCalledMethInfo.ObjArgNeedsAddress(cenv.amap, mMethExpr) then + | [objArg], Some _ -> + if finalCalledMethInfo.IsExtensionMember && finalCalledMethInfo.ObjArgNeedsAddress(cenv.amap, mMethExpr) then error(Error(FSComp.SR.tcCannotPartiallyApplyExtensionMethodForByref(finalCalledMethInfo.DisplayName), mMethExpr)) let objArgTy = tyOfExpr cenv.g objArg let v, ve = mkCompGenLocal mMethExpr "objectArg" objArgTy @@ -9984,7 +9960,7 @@ and TcMethodApplication elif isLinqExpressionTy cenv.g calledArgTy && isDelegateTy cenv.g (destLinqExpressionTy cenv.g calledArgTy) && isFunTy cenv.g callerArgTy then let delegateTy = destLinqExpressionTy cenv.g calledArgTy let expr = CoerceFromFSharpFuncToDelegate cenv.g cenv.amap cenv.infoReader ad callerArgTy m callerArgExpr delegateTy - None, mkCallQuoteToLinqLambdaExpression cenv.g m delegateTy (Expr.Quote(expr, ref None, false, m, mkQuotedExprTy cenv.g delegateTy)) + None, mkCallQuoteToLinqLambdaExpression cenv.g m delegateTy (Expr.Quote(expr, ref None, false, m, mkQuotedExprTy cenv.g delegateTy)) // auto conversions to quotations (to match auto conversions to LINQ expressions) elif reflArgInfo.AutoQuote && isQuotedExprTy cenv.g calledArgTy && not (isQuotedExprTy cenv.g callerArgTy) then @@ -10026,7 +10002,7 @@ and TcMethodApplication let arg = [ { NamedArgIdOpt = None CalledArg=paramArrayCalledArg - CallerArg=CallerArg(paramArrayCalledArg.CalledArgumentType, mMethExpr, false, Expr.Op(TOp.Array, [paramArrayCalledArgElementType], es , mMethExpr)) } ] + CallerArg=CallerArg(paramArrayCalledArg.CalledArgumentType, mMethExpr, false, Expr.Op(TOp.Array, [paramArrayCalledArgElementType], es, mMethExpr)) } ] paramArrayPreBinders, arg // CLEANUP: Move all this code into some isolated file, e.g. "optional.fs" @@ -10036,14 +10012,14 @@ and TcMethodApplication // CallerSide optional arguments are largely for COM interop, e.g. to PIA assemblies for Word etc. // As a result we follow the VB and C# behavior here. // - // "1. If the parameter is statically typed as System.Object and does not have a value, then there are four cases: - // a. The parameter is marked with MarshalAs(IUnknown), MarshalAs(Interface), or MarshalAs(IDispatch). In this case we pass null. - // b. Else if the parameter is marked with IUnknownConstantAttribute. In this case we pass new System.Runtime.InteropServices.UnknownWrapper(null) - // c. Else if the parameter is marked with IDispatchConstantAttribute. In this case we pass new System.Runtime.InteropServices.DispatchWrapper(null) - // d. Else, we will pass Missing.Value. - // 2. Otherwise, if there is a value attribute, then emit the default value. - // 3. Otherwise, we emit default(T). - // 4. Finally, we apply conversions from the value to the parameter type. This is where the nullable conversions take place for VB. + // "1. If the parameter is statically typed as System.Object and does not have a value, then there are four cases: + // a. The parameter is marked with MarshalAs(IUnknown), MarshalAs(Interface), or MarshalAs(IDispatch). In this case we pass null. + // b. Else if the parameter is marked with IUnknownConstantAttribute. In this case we pass new System.Runtime.InteropServices.UnknownWrapper(null) + // c. Else if the parameter is marked with IDispatchConstantAttribute. In this case we pass new System.Runtime.InteropServices.DispatchWrapper(null) + // d. Else, we will pass Missing.Value. + // 2. Otherwise, if there is a value attribute, then emit the default value. + // 3. Otherwise, we emit default(T). + // 4. Finally, we apply conversions from the value to the parameter type. This is where the nullable conversions take place for VB. // - VB allows you to mark ref parameters as optional. The semantics of this is that we create a temporary // with type = type of parameter, load the optional value to it, and call the method. // - VB also allows you to mark arrays with Nothing as the optional value. @@ -10169,7 +10145,7 @@ and TcMethodApplication finalUnnamedCalledOutArgs |> List.map (fun calledArg -> let calledArgTy = calledArg.CalledArgumentType let outArgTy = destByrefTy cenv.g calledArgTy - let outv, outArgExpr = mkMutableCompGenLocal mMethExpr PrettyNaming.outArgCompilerGeneratedName outArgTy // mutable! + let outv, outArgExpr = mkMutableCompGenLocal mMethExpr PrettyNaming.outArgCompilerGeneratedName outArgTy // mutable! let expr = mkDefault(mMethExpr, outArgTy) let callerArg = CallerArg(calledArgTy, mMethExpr, false, mkValAddr mMethExpr false (mkLocalValRef outv)) let outArg = { NamedArgIdOpt=None;CalledArg=calledArg;CallerArg=callerArg } @@ -10206,7 +10182,7 @@ and TcMethodApplication let item = Item.ArgName (defaultArg assignedArg.CalledArg.NameOpt id, assignedArg.CalledArg.CalledArgumentType, Some(ArgumentContainer.Method(finalCalledMethInfo))) CallNameResolutionSink cenv.tcSink (id.idRange, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.Use, env.DisplayEnv, ad)) - let allArgsPreBinders, allArgsCoerced = List.map coerce allArgs |> List.unzip + let allArgsPreBinders, allArgsCoerced = List.map coerce allArgs |> List.unzip // Make the call expression let expr, exprty = @@ -10227,8 +10203,8 @@ and TcMethodApplication if isNil outArgTmpBinds then expr, exprty else let outArgTys = outArgExprs |> List.map (tyOfExpr cenv.g) - let expr = if isUnitTy cenv.g exprty then mkCompGenSequential mMethExpr expr (mkRefTupled cenv.g mMethExpr outArgExprs outArgTys) - else mkRefTupled cenv.g mMethExpr (expr :: outArgExprs) (exprty :: outArgTys) + let expr = if isUnitTy cenv.g exprty then mkCompGenSequential mMethExpr expr (mkRefTupled cenv.g mMethExpr outArgExprs outArgTys) + else mkRefTupled cenv.g mMethExpr (expr :: outArgExprs) (exprty :: outArgTys) let expr = mkLetsBind mMethExpr outArgTmpBinds expr expr, tyOfExpr cenv.g expr @@ -10241,7 +10217,7 @@ and TcMethodApplication else // This holds the result of the call let objv, objExpr = mkMutableCompGenLocal mMethExpr "returnVal" exprty // mutable in case it's a struct - // This expression mutates the properties on the result of the call + // This expression mutates the properties on the result of the call let setterExprPrebinders, propSetExpr = (mkUnit cenv.g mMethExpr, finalAssignedItemSetters) ||> List.mapFold (fun acc (AssignedItemSetter(id, setter, CallerArg(callerArgTy, m, isOptCallerArg, argExpr))) -> if isOptCallerArg then error(Error(FSComp.SR.tcInvalidOptionalAssignmentToPropertyOrField(), m)) @@ -10258,7 +10234,7 @@ and TcMethodApplication | AssignedILFieldSetter finfo -> // Get or set instance IL field - ILFieldInstanceChecks cenv.g cenv.amap ad m finfo + ILFieldInstanceChecks cenv.g cenv.amap ad m finfo let calledArgTy = finfo.FieldType (cenv.amap, m) let argExprPrebinder, argExpr = coerceExpr false calledArgTy ReflectedArgInfo.None callerArgTy m argExpr let action = BuildILFieldSet cenv.g m objExpr finfo argExpr @@ -10279,7 +10255,7 @@ and TcMethodApplication argExprPrebinder, mkCompGenSequential m acc action) // now put them together - let expr = mkCompGenLet mMethExpr objv expr (mkCompGenSequential mMethExpr propSetExpr objExpr) + let expr = mkCompGenLet mMethExpr objv expr (mkCompGenSequential mMethExpr propSetExpr objExpr) setterExprPrebinders, expr // Build the lambda expression if any @@ -10318,14 +10294,14 @@ and TcMethodApplication and TcUnnamedMethodArgs cenv env lambdaPropagationInfo tpenv args = List.mapiFoldSquared (TcUnnamedMethodArg cenv env) (lambdaPropagationInfo, tpenv) args -and TcUnnamedMethodArg cenv env (lambdaPropagationInfo, tpenv) (i, j, CallerArg(argTy, mArg, isOpt, argExpr)) = +and TcUnnamedMethodArg cenv env (lambdaPropagationInfo, tpenv) (i, j, CallerArg(argTy, mArg, isOpt, argExpr)) = // Try to find the lambda propagation info for the corresponding unnamed argument at this position let lambdaPropagationInfoForArg = [| for (unnamedInfo, _) in lambdaPropagationInfo -> if i < unnamedInfo.Length && j < unnamedInfo.[i].Length then unnamedInfo.[i].[j] else NoInfo |] TcMethodArg cenv env (lambdaPropagationInfo, tpenv) (lambdaPropagationInfoForArg, CallerArg(argTy, mArg, isOpt, argExpr)) -and TcMethodNamedArgs cenv env lambdaPropagationInfo tpenv args = +and TcMethodNamedArgs cenv env lambdaPropagationInfo tpenv args = List.mapFoldSquared (TcMethodNamedArg cenv env) (lambdaPropagationInfo, tpenv) args and TcMethodNamedArg cenv env (lambdaPropagationInfo, tpenv) (CallerNamedArg(id, arg)) = @@ -10340,7 +10316,7 @@ and TcMethodNamedArg cenv env (lambdaPropagationInfo, tpenv) (CallerNamedArg(id, let arg', (lambdaPropagationInfo, tpenv) = TcMethodArg cenv env (lambdaPropagationInfo, tpenv) (lambdaPropagationInfoForArg, arg) CallerNamedArg(id, arg'), (lambdaPropagationInfo, tpenv) -and TcMethodArg cenv env (lambdaPropagationInfo, tpenv) (lambdaPropagationInfoForArg, CallerArg(argTy, mArg, isOpt, argExpr)) = +and TcMethodArg cenv env (lambdaPropagationInfo, tpenv) (lambdaPropagationInfoForArg, CallerArg(argTy, mArg, isOpt, argExpr)) = // Apply the F# 3.1 rule for extracting information for lambdas // @@ -10386,8 +10362,8 @@ and TcMethodArg cenv env (lambdaPropagationInfo, tpenv) (lambdaPropagationInfo let lambdaPropagationInfo = [| for (info, argInfo) in Array.zip lambdaPropagationInfo lambdaPropagationInfoForArg do match argInfo with - | ArgDoesNotMatch _ -> () - | NoInfo | CallerLambdaHasArgTypes _ -> + | ArgDoesNotMatch _ -> () + | NoInfo | CallerLambdaHasArgTypes _ -> yield info | CalledArgMatchesType adjustedCalledTy -> if AddCxTypeMustSubsumeTypeMatchingOnlyUndoIfFailed env.DisplayEnv cenv.css mArg adjustedCalledTy argTy then @@ -10406,14 +10382,14 @@ and TcNewDelegateThen cenv overallTy env tpenv mDelTy mExprAndArg delegateTy arg match args with | [farg], [] -> let m = arg.Range - let callerArg, (_, tpenv) = TcMethodArg cenv env (Array.empty, tpenv) (Array.empty, CallerArg(fty, m, false, farg)) + let callerArg, (_, tpenv) = TcMethodArg cenv env (Array.empty, tpenv) (Array.empty, CallerArg(fty, m, false, farg)) let expr = BuildNewDelegateExpr (None, cenv.g, cenv.amap, delegateTy, invokeMethInfo, delArgTys, callerArg.Expr, fty, m) PropagateThenTcDelayed cenv overallTy env tpenv m (MakeApplicableExprNoFlex cenv expr) delegateTy atomicFlag delayed | _ -> error(Error(FSComp.SR.tcDelegateConstructorMustBePassed(), mExprAndArg)) -and bindLetRec (binds:Bindings) m e = +and bindLetRec (binds: Bindings) m e = if isNil binds then e else @@ -10440,6 +10416,7 @@ and TcLinearExprs bodyChecker cenv env overallTy tpenv isCompExpr expr cont = let e1', _ = TcStmtThatCantBeCtorBody cenv env tpenv e1 // tailcall let env = ShrinkContext env m e2.Range + // tailcall TcLinearExprs bodyChecker cenv env overallTy tpenv isCompExpr e2 (fun (e2', tpenv) -> cont (Expr.Sequential(e1', e2', NormalSeq, sp, m), tpenv)) @@ -10457,8 +10434,40 @@ and TcLinearExprs bodyChecker cenv env overallTy tpenv isCompExpr expr cont = // TcLinearExprs processes multiple 'let' bindings in a tail recursive way let mkf, envinner, tpenv = TcLetBinding cenv isUse env ExprContainerInfo ExpressionBinding tpenv (binds, m, body.Range) let envinner = ShrinkContext envinner m body.Range + // tailcall TcLinearExprs bodyChecker cenv envinner overallTy tpenv isCompExpr body (fun (x, tpenv) -> cont (fst (mkf (x, overallTy)), tpenv)) + + | SynExpr.IfThenElse (synBoolExpr, synThenExpr, synElseExprOpt, spIfToThen, isRecovery, mIfToThen, m) when not isCompExpr -> + let boolExpr, tpenv = TcExprThatCantBeCtorBody cenv cenv.g.bool_ty env tpenv synBoolExpr + let thenExpr, tpenv = + let env = + match env.eContextInfo with + | ContextInfo.ElseBranchResult _ -> { env with eContextInfo = ContextInfo.ElseBranchResult synThenExpr.Range } + | _ -> + match synElseExprOpt with + | None -> { env with eContextInfo = ContextInfo.OmittedElseBranch synThenExpr.Range } + | _ -> { env with eContextInfo = ContextInfo.IfExpression synThenExpr.Range } + + if not isRecovery && Option.isNone synElseExprOpt then + UnifyTypes cenv env m cenv.g.unit_ty overallTy + + TcExprThatCanBeCtorBody cenv overallTy env tpenv synThenExpr + + match synElseExprOpt with + | None -> + let elseExpr = mkUnit cenv.g mIfToThen + let spElse = SuppressSequencePointAtTarget // the fake 'unit' value gets exactly the same range as spIfToThen + let overallExpr = primMkCond spIfToThen SequencePointAtTarget spElse m overallTy boolExpr thenExpr elseExpr + cont (overallExpr, tpenv) + + | Some synElseExpr -> + let env = { env with eContextInfo = ContextInfo.ElseBranchResult synElseExpr.Range } + // tailcall + TcLinearExprs bodyChecker cenv env overallTy tpenv isCompExpr synElseExpr (fun (elseExpr, tpenv) -> + let resExpr = primMkCond spIfToThen SequencePointAtTarget SequencePointAtTarget m overallTy boolExpr thenExpr elseExpr + cont (resExpr, tpenv)) + | _ -> cont (bodyChecker overallTy env tpenv expr) @@ -10468,7 +10477,7 @@ and TcAndPatternCompileMatchClauses mExpr matchm actionOnFailure cenv inputExprO let matchVal, expr = CompilePatternForMatchClauses cenv env mExpr matchm true actionOnFailure inputExprOpt inputTy resultTy clauses matchVal, expr, tpenv -and TcMatchPattern cenv inputTy env tpenv (pat:SynPat, optWhenExpr) = +and TcMatchPattern cenv inputTy env tpenv (pat: SynPat, optWhenExpr) = let m = pat.Range let patf', (tpenv, names, _) = TcPat WarnOnUpperCase cenv env None (ValInline.Optional, permitInferTypars, noArgOrRetAttribs, false, None, false) (tpenv, Map.empty, Set.empty) inputTy pat let envinner, values, vspecMap = MakeAndPublishSimpleVals cenv env m names false @@ -10476,7 +10485,7 @@ and TcMatchPattern cenv inputTy env tpenv (pat:SynPat, optWhenExpr) = match optWhenExpr with | Some whenExpr -> let guardEnv = { envinner with eContextInfo = ContextInfo.PatternMatchGuard whenExpr.Range } - let whenExpr', tpenv = TcExpr cenv cenv.g.bool_ty guardEnv tpenv whenExpr + let whenExpr', tpenv = TcExpr cenv cenv.g.bool_ty guardEnv tpenv whenExpr Some whenExpr', tpenv | None -> None, tpenv patf' (TcPatPhase2Input (values, true)), optWhenExpr', NameMap.range vspecMap, envinner, tpenv @@ -10507,7 +10516,7 @@ and TcStaticOptimizationConstraint cenv env tpenv c = TTyconIsStruct(mkTyparTy tp'), tpenv /// Emit a conv.i instruction -and mkConvToNativeInt (g:TcGlobals) e m = Expr.Op (TOp.ILAsm ([ AI_conv ILBasicType.DT_I], [ g.nativeint_ty ]), [], [e], m) +and mkConvToNativeInt (g: TcGlobals) e m = Expr.Op (TOp.ILAsm ([ AI_conv ILBasicType.DT_I], [ g.nativeint_ty ]), [], [e], m) /// Fix up the r.h.s. of a 'use x = fixed expr' and TcAndBuildFixedExpr cenv env (overallPatTy, fixedExpr, overallExprTy, mBinding) = @@ -10515,11 +10524,11 @@ and TcAndBuildFixedExpr cenv env (overallPatTy, fixedExpr, overallExprTy, mBindi match overallExprTy with | ty when isByrefTy cenv.g ty -> let okByRef = - match stripExpr fixedExpr with + match stripExpr fixedExpr with | Expr.Op (op, tyargs, args, _) -> match op, tyargs, args with | TOp.ValFieldGetAddr (rfref, _), _, [_] -> not rfref.Tycon.IsStructOrEnumTycon - | TOp.ILAsm ([ I_ldflda (fspec)], _), _, _ -> fspec.DeclaringType.Boxity = ILBoxity.AsObject + | TOp.ILAsm ([ I_ldflda (fspec)], _), _, _ -> fspec.DeclaringType.Boxity = ILBoxity.AsObject | TOp.ILAsm ([ I_ldelema _], _), _, _ -> true | TOp.RefAddrGet _, _, _ -> true | _ -> false @@ -10529,7 +10538,7 @@ and TcAndBuildFixedExpr cenv env (overallPatTy, fixedExpr, overallExprTy, mBindi let elemTy = destByrefTy cenv.g overallExprTy UnifyTypes cenv env mBinding (mkNativePtrTy cenv.g elemTy) overallPatTy - mkCompGenLetIn mBinding "pinnedByref" ty fixedExpr (fun (v, ve) -> + mkCompGenLetIn mBinding "pinnedByref" ty fixedExpr (fun (v, ve) -> v.SetIsFixed() mkConvToNativeInt cenv.g ve mBinding) @@ -10537,7 +10546,7 @@ and TcAndBuildFixedExpr cenv env (overallPatTy, fixedExpr, overallExprTy, mBindi let charPtrTy = mkNativePtrTy cenv.g cenv.g.char_ty UnifyTypes cenv env mBinding charPtrTy overallPatTy // - // let ptr : nativeptr = + // let ptr: nativeptr = // let pinned s = str // (nativeptr)s + get_OffsettoStringData() @@ -10554,11 +10563,11 @@ and TcAndBuildFixedExpr cenv env (overallPatTy, fixedExpr, overallExprTy, mBindi let elemPtrTy = mkNativePtrTy cenv.g elemTy UnifyTypes cenv env mBinding elemPtrTy overallPatTy - // let ptr : nativeptr = - // let tmpArray : elem[] = arr + // let ptr: nativeptr = + // let tmpArray: elem[] = arr // if nonNull tmpArray then // if tmpArray.Length <> 0 then - // let pinned tmpArrayByref : byref = &arr.[0] + // let pinned tmpArrayByref: byref = &arr.[0] // (nativeint) tmpArrayByref // else // (nativeint) 0 @@ -10571,7 +10580,7 @@ and TcAndBuildFixedExpr cenv env (overallPatTy, fixedExpr, overallExprTy, mBindi // check for non-null and non-empty let zero = mkConvToNativeInt cenv.g (mkInt32 cenv.g mBinding 0) mBinding // This is arr.Length - let arrayLengthExpr = mkCallArrayLength cenv.g mBinding elemTy ve + let arrayLengthExpr = mkCallArrayLength cenv.g mBinding elemTy ve mkNullTest cenv.g mBinding ve (mkNullTest cenv.g mBinding arrayLengthExpr (mkCompGenLetIn mBinding "pinnedByref" (mkByrefTy cenv.g elemTy) elemZeroAddress (fun (v, ve) -> @@ -10584,7 +10593,7 @@ and TcAndBuildFixedExpr cenv env (overallPatTy, fixedExpr, overallExprTy, mBindi /// Binding checking code, for all bindings including let bindings, let-rec bindings, member bindings and object-expression bindings and -and TcNormalizedBinding declKind (cenv:cenv) env tpenv overallTy safeThisValOpt safeInitInfo (enclosingDeclaredTypars, (ExplicitTyparInfo(_, declaredTypars, _) as flex)) bind = +and TcNormalizedBinding declKind (cenv: cenv) env tpenv overallTy safeThisValOpt safeInitInfo (enclosingDeclaredTypars, (ExplicitTyparInfo(_, declaredTypars, _) as flex)) bind = let envinner = AddDeclaredTypars NoCheckForDuplicateTypars (enclosingDeclaredTypars@declaredTypars) env match bind with @@ -10699,8 +10708,8 @@ and TcNormalizedBinding declKind (cenv:cenv) env tpenv overallTy safeThisValOpt let apinfoOpt = match NameMap.range nameToPrelimValSchemeMap with | [PrelimValScheme1(id, _, ty, _, _, _, _, _, _, _, _) ] -> - match ActivePatternInfoOfValName id.idText id.idRange with - | Some apinfo -> Some (apinfo, ty, id.idRange) + match ActivePatternInfoOfValName id.idText id.idRange with + | Some apinfo -> Some (apinfo, ty, id.idRange) | None -> None | _ -> None @@ -10802,7 +10811,7 @@ and TcBindingTyparDecls alwaysRigid cenv env tpenv (SynValTyparDecls(synTypars, declaredTypars |> List.iter (fun tp -> tp.SetRigidity TyparRigidity.WillBeRigid) rigidCopyOfDeclaredTypars - ExplicitTyparInfo(rigidCopyOfDeclaredTypars, declaredTypars, infer) , tpenv + ExplicitTyparInfo(rigidCopyOfDeclaredTypars, declaredTypars, infer), tpenv and TcNonrecBindingTyparDecls cenv env tpenv bind = let (NormalizedBinding(_, _, _, _, _, _, synTyparDecls, _, _, _, _, _)) = bind @@ -10817,12 +10826,12 @@ and TcNonRecursiveBinding declKind cenv env tpenv ty b = // TcAttribute* //------------------------------------------------------------------------ -and TcAttribute canFail cenv (env: TcEnv) attrTgt (synAttr: SynAttribute) = +and TcAttribute canFail cenv (env: TcEnv) attrTgt (synAttr: SynAttribute) = let (LongIdentWithDots(tycon, _)) = synAttr.TypeName - let arg = synAttr.ArgExpr - let targetIndicator = synAttr.Target + let arg = synAttr.ArgExpr + let targetIndicator = synAttr.Target let isAppliedToGetterOrSetter = synAttr.AppliesToGetterAndSetter - let mAttr = synAttr.Range + let mAttr = synAttr.Range let (typath, tyid) = List.frontAndBack tycon let tpenv = emptyUnscopedTyparEnv @@ -10834,9 +10843,9 @@ and TcAttribute canFail cenv (env: TcEnv) attrTgt (synAttr: SynAttribute) = let tyid = mkSynId tyid.idRange n let tycon = (typath @ [tyid]) let ad = env.eAccessRights - match ResolveTypeLongIdent cenv.tcSink cenv.nameResolver ItemOccurence.UseInAttribute OpenQualified env.eNameResEnv ad tycon TypeNameResolutionStaticArgsInfo.DefiniteEmpty PermitDirectReferenceToGeneratedType.No with + match ResolveTypeLongIdent cenv.tcSink cenv.nameResolver ItemOccurence.UseInAttribute OpenQualified env.eNameResEnv ad tycon TypeNameResolutionStaticArgsInfo.DefiniteEmpty PermitDirectReferenceToGeneratedType.No with | Exception err -> raze(err) - | _ -> success(TcTypeAndRecover cenv NoNewTypars CheckCxs ItemOccurence.UseInAttribute env tpenv (SynType.App(SynType.LongIdent(LongIdentWithDots(tycon, [])), None, [], [], None, false, mAttr)) ) + | _ -> success(TcTypeAndRecover cenv NoNewTypars CheckCxs ItemOccurence.UseInAttribute env tpenv (SynType.App(SynType.LongIdent(LongIdentWithDots(tycon, [])), None, [], [], None, false, mAttr)) ) ForceRaise ((try1 (tyid.idText + "Attribute")) |> ResultOrException.otherwise (fun () -> (try1 tyid.idText))) let ad = env.eAccessRights @@ -10878,7 +10887,7 @@ and TcAttribute canFail cenv (env: TcEnv) attrTgt (synAttr: SynAttribute) = AttribBoolArg(_allowMultiple) AttribBoolArg(inherited)], _, _, _, _)) -> (validOn, inherited) - | Some _ -> + | Some _ -> warning(Error(FSComp.SR.tcUnexpectedConditionInImportedAssembly(), mAttr)) (validOnDefault, inheritedDefault) | _ -> @@ -10893,10 +10902,10 @@ and TcAttribute canFail cenv (env: TcEnv) attrTgt (synAttr: SynAttribute) = | Some id when id.idText = "property" -> AttributeTargets.Property | Some id when id.idText = "method" -> AttributeTargets.Method | Some id when id.idText = "param" -> AttributeTargets.Parameter - | Some id when id.idText = "type" -> AttributeTargets.TyconDecl - | Some id when id.idText = "constructor" -> AttributeTargets.Constructor - | Some id when id.idText = "event" -> AttributeTargets.Event - | Some id -> + | Some id when id.idText = "type" -> AttributeTargets.TyconDecl + | Some id when id.idText = "constructor" -> AttributeTargets.Constructor + | Some id when id.idText = "event" -> AttributeTargets.Event + | Some id -> errorR(Error(FSComp.SR.tcUnrecognizedAttributeTarget(), id.idRange)) possibleTgts | _ -> possibleTgts @@ -10918,7 +10927,7 @@ and TcAttribute canFail cenv (env: TcEnv) attrTgt (synAttr: SynAttribute) = let meths = minfos |> List.map (fun minfo -> minfo, None) let afterResolution = ForNewConstructors cenv.tcSink env tyid.idRange methodName minfos let (expr, attributeAssignedNamedItems, _), _ = - TcMethodApplication true cenv env tpenv None [] mAttr mAttr methodName None ad PossiblyMutates false meths afterResolution NormalValUse [arg] (NewInferenceType ()) [] + TcMethodApplication true cenv env tpenv None [] mAttr mAttr methodName None ad PossiblyMutates false meths afterResolution NormalValUse [arg] (NewInferenceType ()) [] UnifyTypes cenv env mAttr ty (tyOfExpr cenv.g expr) @@ -10941,12 +10950,12 @@ and TcAttribute canFail cenv (env: TcEnv) attrTgt (synAttr: SynAttribute) = CheckILFieldAttributes cenv.g finfo m id.idText, false, finfo.FieldType(cenv.amap, m) | Item.RecdField rfinfo when not rfinfo.IsStatic -> - CheckRecdFieldInfoAttributes cenv.g rfinfo m |> CommitOperationResult + CheckRecdFieldInfoAttributes cenv.g rfinfo m |> CommitOperationResult CheckRecdFieldInfoAccessible cenv.amap m ad rfinfo // This uses the F# backend name mangling of fields.... - let nm = ComputeFieldName rfinfo.Tycon rfinfo.RecdField + let nm = ComputeFieldName rfinfo.Tycon rfinfo.RecdField nm, false, rfinfo.FieldType - | _ -> + | _ -> errorR(Error(FSComp.SR.tcPropertyOrFieldNotFoundInAttribute(), m)) id.idText, false, cenv.g.unit_ty let propNameItem = Item.SetterArg(id, setterItem) @@ -10964,7 +10973,7 @@ and TcAttribute canFail cenv (env: TcEnv) attrTgt (synAttr: SynAttribute) = Attrib(tcref, ILAttrib(ilMethRef), args, namedAttribArgMap, isAppliedToGetterOrSetter, Some constrainedTgts, m) | Expr.App((InnerExprPat(ExprValWithPossibleTypeInst(vref, _, _, _))), _, _, args, _) -> - let args = args |> List.collect (function Expr.Const(Const.Unit, _, _) -> [] | expr -> tryDestRefTupleExpr expr) |> List.map mkAttribExpr + let args = args |> List.collect (function Expr.Const(Const.Unit, _, _) -> [] | expr -> tryDestRefTupleExpr expr) |> List.map mkAttribExpr Attrib(tcref, FSAttrib(vref), args, namedAttribArgMap, isAppliedToGetterOrSetter, Some constrainedTgts, mAttr) | _ -> @@ -11030,9 +11039,9 @@ and TcLetBinding cenv isUse env containerInfo declKind tpenv (synBinds, synBinds // Generalize the bindings... (((fun x -> x), env, tpenv), checkedBinds) ||> List.fold (fun (buildExpr, env, tpenv) tbinfo -> let (CheckedBindingInfo(inlineFlag, attrs, doc, tcPatPhase2, flex, nameToPrelimValSchemeMap, rhsExpr, _, tauTy, m, spBind, _, konst, isFixed)) = tbinfo - let enclosingDeclaredTypars = [] + let enclosingDeclaredTypars = [] let (ExplicitTyparInfo(_, declaredTypars, canInferTypars)) = flex - let allDeclaredTypars = enclosingDeclaredTypars @ declaredTypars + let allDeclaredTypars = enclosingDeclaredTypars @ declaredTypars let generalizedTypars, prelimValSchemes2 = let canInferTypars = GeneralizationHelpers. ComputeCanInferExtraGeneralizableTypars (containerInfo.ParentRef, canInferTypars, None) @@ -11047,7 +11056,7 @@ and TcLetBinding cenv isUse env containerInfo declKind tpenv (synBinds, synBinds GeneralizationHelpers.ComputeAndGeneralizeGenericTypars (cenv, denv, m, freeInEnv, canInferTypars, canConstrain, inlineFlag, Some rhsExpr, allDeclaredTypars, maxInferredTypars, tauTy, false) - let prelimValSchemes2 = GeneralizeVals cenv denv enclosingDeclaredTypars generalizedTypars nameToPrelimValSchemeMap + let prelimValSchemes2 = GeneralizeVals cenv denv enclosingDeclaredTypars generalizedTypars nameToPrelimValSchemeMap generalizedTypars, prelimValSchemes2 @@ -11067,7 +11076,7 @@ and TcLetBinding cenv isUse env containerInfo declKind tpenv (synBinds, synBinds | (TPat_wild _ | TPat_const (Const.Unit, _)) when not isUse && not isFixed && isNil generalizedTypars -> let mkSequentialBind (tm, tmty) = (mkSequential SequencePointsAtSeq m rhsExpr tm, tmty) - (buildExpr >> mkSequentialBind , env, tpenv) + (buildExpr >> mkSequentialBind, env, tpenv) | _ -> // nice: don't introduce awful temporary for r.h.s. in the 99% case where we know what we're binding it to @@ -11080,7 +11089,7 @@ and TcLetBinding cenv isUse env containerInfo declKind tpenv (synBinds, synBinds v, pat //Op (LValueOp (LByrefGet,x),[],[],C:\GitHub\dsyme\visualfsharp\a.fs (15,42--15,43) IsSynthetic=false) - | _ when inlineFlag.MustInline -> + | _ when inlineFlag.MustInline -> error(Error(FSComp.SR.tcInvalidInlineSpecification(), m)) | _ -> @@ -11097,7 +11106,7 @@ and TcLetBinding cenv isUse env containerInfo declKind tpenv (synBinds, synBinds tmp, checkedPat - // Add the bind "let patternInputTmp = rhsExpr" to the bodyExpr we get from mkPatBind + // Add the bind "let patternInputTmp = rhsExpr" to the bodyExpr we get from mkPatBind let mkRhsBind (bodyExpr, bodyExprTy) = let letExpr = mkLet spBind m patternInputTmp rhsExpr bodyExpr letExpr, bodyExprTy @@ -11124,7 +11133,7 @@ and TcLetBinding cenv isUse env containerInfo declKind tpenv (synBinds, synBinds let envInner = AddLocalValMap cenv.tcSink scopem prelimRecValues env - ((buildExpr >> mkCleanup >> mkPatBind >> mkRhsBind), envInner, tpenv)) + ((buildExpr >> mkCleanup >> mkPatBind >> mkRhsBind), envInner, tpenv)) /// Return binds corresponding to the linearised let-bindings. /// This reveals the bound items, e.g. when the lets occur in incremental object defns. @@ -11140,8 +11149,8 @@ and TcLetBindings cenv env containerInfo declKind tpenv (binds, bindsm, scopem) let unite = mkUnit cenv.g bindsm let expr, _ = mkf (unite, cenv.g.unit_ty) let rec stripLets acc = function - | Expr.Let (bind, body, m, _) -> stripLets (TMDefLet(bind, m) :: acc) body - | Expr.Sequential (e1, e2, NormalSeq, _, m) -> stripLets (TMDefDo(e1, m) :: acc) e2 + | Expr.Let (bind, body, m, _) -> stripLets (TMDefLet(bind, m) :: acc) body + | Expr.Sequential (e1, e2, NormalSeq, _, m) -> stripLets (TMDefDo(e1, m) :: acc) e2 | Expr.Const (Const.Unit, _, _) -> List.rev acc | _ -> failwith "TcLetBindings: let sequence is non linear. Maybe a LHS pattern was not linearised?" let binds = stripLets [] expr @@ -11161,7 +11170,7 @@ and CheckMemberFlags optIntfSlotTy newslotsOK overridesOK memberFlags m = /// the _body_ of the binding. For example, in a letrec we may assume this knowledge /// for each binding in the letrec prior to any type inference. This might, for example, /// tell us the type of the arguments to a recursive function. -and ApplyTypesFromArgumentPatterns (cenv, env, optArgsOK, ty, m, tpenv, NormalizedBindingRhs (pushedPats, retInfoOpt, e), memberFlagsOpt:MemberFlags option) = +and ApplyTypesFromArgumentPatterns (cenv, env, optArgsOK, ty, m, tpenv, NormalizedBindingRhs (pushedPats, retInfoOpt, e), memberFlagsOpt: MemberFlags option) = match pushedPats with | [] -> match retInfoOpt with @@ -11193,7 +11202,7 @@ and ComputeIsComplete enclosingDeclaredTypars declaredTypars ty = /// Determine if a uniquely-identified-abstract-slot exists for an override member (or interface member implementation) based on the information available /// at the syntactic definition of the member (i.e. prior to type inference). If so, we know the expected signature of the override, and the full slotsig /// it implements. Apply the inferred slotsig. -and ApplyAbstractSlotInference (cenv:cenv) (envinner:TcEnv) (bindingTy, m, synTyparDecls, declaredTypars, memberId, tcrefObjTy, renaming, _objTy, optIntfSlotTy, valSynData, memberFlags, attribs) = +and ApplyAbstractSlotInference (cenv: cenv) (envinner: TcEnv) (bindingTy, m, synTyparDecls, declaredTypars, memberId, tcrefObjTy, renaming, _objTy, optIntfSlotTy, valSynData, memberFlags, attribs) = let ad = envinner.eAccessRights let typToSearchForAbstractMembers = @@ -11366,7 +11375,7 @@ and AnalyzeRecursiveStaticMemberOrValDecl tpenv, declKind, newslotsOK, overridesOK, tcrefContainerInfo, vis1, - id:Ident, vis2, declaredTypars, + id: Ident, vis2, declaredTypars, memberFlagsOpt, thisIdOpt, bindingAttribs, valSynInfo, ty, bindingRhs, mBinding, flex) = @@ -11395,7 +11404,7 @@ and AnalyzeRecursiveStaticMemberOrValDecl match memberFlags.MemberKind with // Explicit struct or class constructor - | MemberKind.Constructor -> + | MemberKind.Constructor -> // A fairly adhoc place to put this check if tcref.IsStructOrEnumTycon && (match valSynInfo with SynValInfo([[]], _) -> true | _ -> false) then errorR(Error(FSComp.SR.tcStructsCannotHaveConstructorWithNoArguments(), mBinding)) @@ -11437,8 +11446,8 @@ and AnalyzeRecursiveStaticMemberOrValDecl and AnalyzeRecursiveInstanceMemberDecl (cenv, envinner: TcEnv, tpenv, declKind, synTyparDecls, valSynInfo, - flex:ExplicitTyparInfo, newslotsOK, overridesOK, vis1, thisId, - memberId:Ident, toolId:Ident option, bindingAttribs, vis2, + flex: ExplicitTyparInfo, newslotsOK, overridesOK, vis1, thisId, + memberId: Ident, toolId: Ident option, bindingAttribs, vis2, tcrefContainerInfo, memberFlagsOpt, ty, bindingRhs, mBinding) = let vis = CombineVisibilityAttribs vis1 vis2 mBinding @@ -11551,7 +11560,7 @@ and AnalyzeRecursiveDecl (cenv, envinner, tpenv, declKind, synTyparDecls, declar /// and overrides). At this point we perform override inference, to infer /// which method we are overriding, in order to add constraints to the /// implementation of the method. -and AnalyzeAndMakeAndPublishRecursiveValue overridesOK isGeneratedEventVal cenv (env:TcEnv) (tpenv, recBindIdx) (NormalizedRecBindingDefn(containerInfo, newslotsOK, declKind, binding)) = +and AnalyzeAndMakeAndPublishRecursiveValue overridesOK isGeneratedEventVal cenv (env: TcEnv) (tpenv, recBindIdx) (NormalizedRecBindingDefn(containerInfo, newslotsOK, declKind, binding)) = // Pull apart the inputs let (NormalizedBinding(vis1, bindingKind, isInline, isMutable, bindingSynAttribs, bindingXmlDoc, synTyparDecls, valSynData, declPattern, bindingRhs, mBinding, spBind)) = binding @@ -11591,7 +11600,7 @@ and AnalyzeAndMakeAndPublishRecursiveValue overridesOK isGeneratedEventVal cenv // Do the type annotations give the full and complete generic type? // If so, generic recursion can be used when using this type. - let isComplete = ComputeIsComplete enclosingDeclaredTypars declaredTypars ty + let isComplete = ComputeIsComplete enclosingDeclaredTypars declaredTypars ty // NOTE: The type scheme here is normally not 'complete'!!!! The type is more or less just a type variable at this point. // NOTE: toparity, type and typars get fixed-up after inference @@ -11617,7 +11626,7 @@ and AnalyzeAndMakeAndPublishRecursiveValue overridesOK isGeneratedEventVal cenv // Suppress hover tip for "get" and "set" at property definitions, where toolId <> bindingId match toolIdOpt with - | Some tid when not tid.idRange.IsSynthetic && tid.idRange <> bindingId.idRange -> + | Some tid when not tid.idRange.IsSynthetic && tid.idRange <> bindingId.idRange -> let item = Item.Value (mkLocalValRef vspec) CallNameResolutionSink cenv.tcSink (tid.idRange, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.RelatedText, env.DisplayEnv, env.eAccessRights) | _ -> () @@ -11639,7 +11648,7 @@ and AnalyzeAndMakeAndPublishRecursiveValue overridesOK isGeneratedEventVal cenv let recBindIdx = recBindIdx + 1 // Done - add the declared name to the List.map and return the bundle for use by TcLetrec - let primaryBinding : PreCheckingRecursiveBinding = + let primaryBinding: PreCheckingRecursiveBinding = { SyntacticBinding = revisedBinding RecBindingInfo = rbinfo } @@ -11662,20 +11671,20 @@ and TcLetrecBinding // The state of the left-to-right iteration through the bindings (envNonRec: TcEnv, - generalizedRecBinds : PostGeneralizationRecursiveBinding list, + generalizedRecBinds: PostGeneralizationRecursiveBinding list, preGeneralizationRecBinds: PreGeneralizationRecursiveBinding list, tpenv, - uncheckedRecBindsTable : Map) + uncheckedRecBindsTable: Map) // This is the actual binding to check - (rbind : PreCheckingRecursiveBinding) = + (rbind: PreCheckingRecursiveBinding) = let (RBInfo(_, _, enclosingDeclaredTypars, _, vspec, flex, _, _, baseValOpt, safeThisValOpt, safeInitInfo, _, tau, declKind)) = rbind.RecBindingInfo let allDeclaredTypars = enclosingDeclaredTypars @ rbind.RecBindingInfo.DeclaredTypars // Notes on FSharp 1.0, 3187: - // - Progressively collect the "eligible for early generalization" set of bindings -- DONE + // - Progressively collect the "eligible for early generalization" set of bindings -- DONE // - After checking each binding, check this set to find generalizable bindings // - The only reason we can't generalize is if a binding refers to type variables to which // additional constraints may be applied as part of checking a later binding @@ -11687,15 +11696,15 @@ and TcLetrecBinding // // Example 1: - // let f() = g() f : unit -> ?b - // and g() = 1 f : unit -> int, can generalize (though now monomorphic) + // let f() = g() f: unit -> ?b + // and g() = 1 f: unit -> int, can generalize (though now monomorphic) // Example 2: - // let f() = g() f : unit -> ?b - // and g() = [] f : unit -> ?c list, can generalize + // let f() = g() f: unit -> ?b + // and g() = [] f: unit -> ?c list, can generalize // Example 3: - // let f() = [] f : unit -> ?b, can generalize immediately + // let f() = [] f: unit -> ?b, can generalize immediately // and g() = [] let envRec = Option.foldBack (AddLocalVal cenv.tcSink scopem) baseValOpt envRec let envRec = Option.foldBack (AddLocalVal cenv.tcSink scopem) safeThisValOpt envRec @@ -11745,10 +11754,10 @@ and TcLetrecBinding and TcIncrementalLetRecGeneralization cenv scopem // The state of the left-to-right iteration through the bindings (envNonRec: TcEnv, - generalizedRecBinds : PostGeneralizationRecursiveBinding list, + generalizedRecBinds: PostGeneralizationRecursiveBinding list, preGeneralizationRecBinds: PreGeneralizationRecursiveBinding list, tpenv, - uncheckedRecBindsTable : Map) = + uncheckedRecBindsTable: Map) = let denv = envNonRec.DisplayEnv // recompute the free-in-environment in case any type variables have been instantiated @@ -11760,7 +11769,7 @@ and TcIncrementalLetRecGeneralization cenv scopem // to type variables free in later bindings. Look for ones whose type doesn't involve any of the other types let newGeneralizedRecBinds, preGeneralizationRecBinds, tpenv = - //printfn "\n---------------------\nConsidering early generalization after type checking binding %s" vspec.DisplayName + //printfn "\n---------------------\nConsidering early generalization after type checking binding %s" vspec.DisplayName // Get the type variables free in bindings that have not yet been checked. // @@ -11820,14 +11829,14 @@ and TcIncrementalLetRecGeneralization cenv scopem //printfn "(failed generalization test 1 for binding for %s)" pgrbind.RecBindingInfo.Val.DisplayName // Any declared type parameters in an type are always generalizable - let freeInBinding = Zset.diff freeInBinding (Zset.ofList typarOrder (NormalizeDeclaredTyparsForEquiRecursiveInference cenv.g pgrbind.ExtraGeneralizableTypars)) + let freeInBinding = Zset.diff freeInBinding (Zset.ofList typarOrder (NormalizeDeclaredTyparsForEquiRecursiveInference cenv.g pgrbind.ExtraGeneralizableTypars)) if freeInBinding.IsEmpty then true else //printfn "(failed generalization test 2 for binding for %s)" pgrbind.RecBindingInfo.Val.DisplayName // Any declared method parameters can always be generalized - let freeInBinding = Zset.diff freeInBinding (Zset.ofList typarOrder (NormalizeDeclaredTyparsForEquiRecursiveInference cenv.g pgrbind.RecBindingInfo.DeclaredTypars)) + let freeInBinding = Zset.diff freeInBinding (Zset.ofList typarOrder (NormalizeDeclaredTyparsForEquiRecursiveInference cenv.g pgrbind.RecBindingInfo.DeclaredTypars)) if freeInBinding.IsEmpty then true else @@ -11835,7 +11844,7 @@ and TcIncrementalLetRecGeneralization cenv scopem // Type variables free in the non-recursive environment do not stop us generalizing the binding, // since they can't be generalized anyway - let freeInBinding = Zset.diff freeInBinding freeInEnv + let freeInBinding = Zset.diff freeInBinding freeInEnv if freeInBinding.IsEmpty then true else @@ -11883,8 +11892,8 @@ and TcIncrementalLetRecGeneralization cenv scopem freeInEnv else let freeInBinding = (freeInType CollectAllNoCaching pgrbind.RecBindingInfo.Val.TauType).FreeTypars - let freeInBinding = Zset.diff freeInBinding (Zset.ofList typarOrder (NormalizeDeclaredTyparsForEquiRecursiveInference cenv.g pgrbind.ExtraGeneralizableTypars)) - let freeInBinding = Zset.diff freeInBinding (Zset.ofList typarOrder (NormalizeDeclaredTyparsForEquiRecursiveInference cenv.g pgrbind.RecBindingInfo.DeclaredTypars)) + let freeInBinding = Zset.diff freeInBinding (Zset.ofList typarOrder (NormalizeDeclaredTyparsForEquiRecursiveInference cenv.g pgrbind.ExtraGeneralizableTypars)) + let freeInBinding = Zset.diff freeInBinding (Zset.ofList typarOrder (NormalizeDeclaredTyparsForEquiRecursiveInference cenv.g pgrbind.RecBindingInfo.DeclaredTypars)) Zset.union freeInBinding freeInEnv) // Process the bindings marked for transition from PreGeneralization --> PostGeneralization @@ -11916,7 +11925,7 @@ and TcIncrementalLetRecGeneralization cenv scopem //------------------------------------------------------------------------- /// Compute the type variables which may be generalized and perform the generalization -and TcLetrecComputeAndGeneralizeGenericTyparsForBinding cenv denv freeInEnv (pgrbind : PreGeneralizationRecursiveBinding) = +and TcLetrecComputeAndGeneralizeGenericTyparsForBinding cenv denv freeInEnv (pgrbind: PreGeneralizationRecursiveBinding) = let freeInEnv = Zset.diff freeInEnv (Zset.ofList typarOrder (NormalizeDeclaredTyparsForEquiRecursiveInference cenv.g pgrbind.ExtraGeneralizableTypars)) @@ -11947,7 +11956,7 @@ and TcLetrecComputeAndGeneralizeGenericTyparsForBinding cenv denv freeInEnv (pgr generalizedTypars /// Compute the type variables which may have member constraints that need to be canonicalized prior to generalization -and TcLetrecComputeSupportForBinding cenv (pgrbind : PreGeneralizationRecursiveBinding) = +and TcLetrecComputeSupportForBinding cenv (pgrbind: PreGeneralizationRecursiveBinding) = let rbinfo = pgrbind.RecBindingInfo let allDeclaredTypars = rbinfo.EnclosingDeclaredTypars @ rbinfo.DeclaredTypars let maxInferredTypars = freeInTypeLeftToRight cenv.g false rbinfo.Val.TauType @@ -11958,7 +11967,7 @@ and TcLetrecComputeSupportForBinding cenv (pgrbind : PreGeneralizationRecursiveB //------------------------------------------------------------------------ // Generalise generalizedTypars from checkedBind. -and TcLetrecGeneralizeBinding cenv denv generalizedTypars (pgrbind : PreGeneralizationRecursiveBinding) : PostGeneralizationRecursiveBinding = +and TcLetrecGeneralizeBinding cenv denv generalizedTypars (pgrbind: PreGeneralizationRecursiveBinding) : PostGeneralizationRecursiveBinding = let (RBInfo(_, _, enclosingDeclaredTypars, _, vspec, flex, partialValReprInfo, memberInfoOpt, _, _, _, vis, _, declKind)) = pgrbind.RecBindingInfo let (CheckedBindingInfo(inlineFlag, _, _, _, _, _, expr, argAttribs, _, _, _, compgen, _, isFixed)) = pgrbind.CheckedBinding @@ -11982,12 +11991,12 @@ and TcLetrecGeneralizeBinding cenv denv generalizedTypars (pgrbind : PreGenerali and TcLetrecComputeCtorSafeThisValBind cenv safeThisValOpt = match safeThisValOpt with | None -> None - | Some (v:Val) -> + | Some (v: Val) -> let m = v.Range let ty = destRefCellTy cenv.g v.Type Some (mkCompGenBind v (mkRefCell cenv.g m ty (mkNull m ty))) -and MakeCheckSafeInitField g tinst thisValOpt rfref reqExpr (expr:Expr) = +and MakeCheckSafeInitField g tinst thisValOpt rfref reqExpr (expr: Expr) = let m = expr.Range let availExpr = match thisValOpt with @@ -12063,7 +12072,7 @@ and TcLetrecAdjustMemberForSpecialVals cenv (pgrbind: PostGeneralizationRecursiv { ValScheme = pgrbind.ValScheme Binding = TBind(vspec, expr, spBind) } -and FixupLetrecBind cenv denv generalizedTyparsForRecursiveBlock (bind : PostBindCtorThisVarRefCellRecursiveBinding) = +and FixupLetrecBind cenv denv generalizedTyparsForRecursiveBlock (bind: PostBindCtorThisVarRefCellRecursiveBinding) = let (TBind(vspec, expr, spBind)) = bind.Binding // Check coherence of generalization of variables for memberInfo members in generic classes @@ -12074,7 +12083,7 @@ and FixupLetrecBind cenv denv generalizedTyparsForRecursiveBlock (bind : PostBin | Some _ -> #endif match PartitionValTyparsForApparentEnclosingType cenv.g vspec with - | Some(parentTypars, memberParentTypars, _, _, _) -> + | Some(parentTypars, memberParentTypars, _, _, _) -> ignore(SignatureConformance.Checker(cenv.g, cenv.amap, denv, SignatureRepackageInfo.Empty, false).CheckTypars vspec.Range TypeEquivEnv.Empty memberParentTypars parentTypars) | None -> errorR(Error(FSComp.SR.tcMemberIsNotSufficientlyGeneric(), vspec.Range)) @@ -12097,7 +12106,7 @@ and FixupLetrecBind cenv denv generalizedTyparsForRecursiveBlock (bind : PostBin and unionGeneralizedTypars typarSets = List.foldBack (ListSet.unionFavourRight typarEq) typarSets [] -and TcLetrec overridesOK cenv env tpenv (binds, bindsm, scopem) = +and TcLetrec overridesOK cenv env tpenv (binds, bindsm, scopem) = // Create prelimRecValues for the recursive items (includes type info from LHS of bindings) *) let binds = binds |> List.map (fun (RecDefnBindingInfo(a, b, c, bind)) -> NormalizedRecBindingDefn(a, b, c, BindingNormalization.NormalizeBinding ValOrMemberBinding cenv env bind)) @@ -12106,7 +12115,7 @@ and TcLetrec overridesOK cenv env tpenv (binds, bindsm, scopem) = let envRec = AddLocalVals cenv.tcSink scopem prelimRecValues env // Typecheck bindings - let uncheckedRecBindsTable = uncheckedRecBinds |> List.map (fun rbind -> rbind.RecBindingInfo.Val.Stamp, rbind) |> Map.ofList + let uncheckedRecBindsTable = uncheckedRecBinds |> List.map (fun rbind -> rbind.RecBindingInfo.Val.Stamp, rbind) |> Map.ofList let (_, generalizedRecBinds, preGeneralizationRecBinds, tpenv, _) = ((env, [], [], tpenv, uncheckedRecBindsTable), uncheckedRecBinds) ||> List.fold (TcLetrecBinding (cenv, envRec, scopem, [], None)) @@ -12221,12 +12230,12 @@ let TcAndPublishValSpec (cenv, env, containerInfo: ContainerInfo, declKind, memF exception NotUpperCaseConstructor of range -let CheckNamespaceModuleOrTypeName (g:TcGlobals) (id:Ident) = +let CheckNamespaceModuleOrTypeName (g: TcGlobals) (id: Ident) = // type names '[]' etc. are used in fslib if not g.compilingFslib && id.idText.IndexOfAny(IllegalCharactersInTypeAndNamespaceNames) <> -1 then errorR(Error(FSComp.SR.tcInvalidNamespaceModuleTypeUnionName(), id.idRange)) -let CheckDuplicates (idf : _ -> Ident) k elems = +let CheckDuplicates (idf: _ -> Ident) k elems = elems |> List.iteri (fun i uc1 -> elems |> List.iteri (fun j uc2 -> let id1 = (idf uc1) @@ -12267,7 +12276,7 @@ module TcRecdUnionAndEnumDeclarations = begin if isIncrClass && (not zeroInit || not isMutable) then errorR(Error(FSComp.SR.tcUninitializedValFieldsMustBeMutable(), m)) if isStatic && (not zeroInit || not isMutable || vis <> Some SynAccess.Private ) then errorR(Error(FSComp.SR.tcStaticValFieldsMustBeMutableAndPrivate(), m)) let konst = if zeroInit then Some Const.Zero else None - let rfspec = MakeRecdFieldSpec cenv env parent (isStatic, konst, ty', attrsForProperty, attrsForField, id, nameGenerated, isMutable, isVolatile, xmldoc, vis, m) + let rfspec = MakeRecdFieldSpec cenv env parent (isStatic, konst, ty', attrsForProperty, attrsForField, id, nameGenerated, isMutable, isVolatile, xmldoc, vis, m) match parent with | Parent tcref when useGenuineField tcref.Deref rfspec -> // Recheck the attributes for errors if the definition only generates a field @@ -12300,12 +12309,16 @@ module TcRecdUnionAndEnumDeclarations = begin // Bind other elements of type definitions (constructors etc.) //------------------------------------------------------------------------- - let CheckUnionCaseName cenv realUnionCaseName m = - CheckNamespaceModuleOrTypeName cenv.g (mkSynId m realUnionCaseName) - if not (String.isUpper realUnionCaseName) && realUnionCaseName <> opNameCons && realUnionCaseName <> opNameNil then - errorR(NotUpperCaseConstructor(m)) - - let ValidateFieldNames (synFields : SynField list, tastFields : RecdField list) = + let CheckUnionCaseName cenv (id: Ident) = + let name = id.idText + if name = "Tags" then + errorR(Error(FSComp.SR.tcUnionCaseNameConflictsWithGeneratedType(name, "Tags"), id.idRange)) + + CheckNamespaceModuleOrTypeName cenv.g id + if not (String.isUpper name) && name <> opNameCons && name <> opNameNil then + errorR(NotUpperCaseConstructor(id.idRange)) + + let ValidateFieldNames (synFields: SynField list, tastFields: RecdField list) = let seen = Dictionary() for (sf, f) in List.zip synFields tastFields do #if FABLE_COMPILER @@ -12325,20 +12338,13 @@ module TcRecdUnionAndEnumDeclarations = begin else seen.Add(f.Name, sf) - let TcUnionCaseDecl cenv env parent thisTy tpenv (UnionCase (synAttrs, id, args, xmldoc, vis, m)) = + let TcUnionCaseDecl cenv env parent thisTy tpenv (UnionCase (synAttrs, id, args, xmldoc, vis, m)) = let attrs = TcAttributes cenv env AttributeTargets.UnionCaseDecl synAttrs // the attributes of a union case decl get attached to the generated "static factory" method let vis, _ = ComputeAccessAndCompPath env None m vis None parent let vis = CombineReprAccess parent vis - let realUnionCaseName = - if id.idText = opNameCons then "Cons" - elif id.idText = opNameNil then "Empty" - else id.idText - - if realUnionCaseName = "Tags" then - errorR(Error(FSComp.SR.tcUnionCaseNameConflictsWithGeneratedType(realUnionCaseName, "Tags"), m)) - - CheckUnionCaseName cenv realUnionCaseName id.idRange - + + CheckUnionCaseName cenv id + let mkName nFields i = if nFields <= 1 then "Item" else "Item"+string (i+1) let rfields, recordTy = match args with @@ -12346,7 +12352,7 @@ module TcRecdUnionAndEnumDeclarations = begin let nFields = flds.Length let rfields = flds |> List.mapi (fun i fld -> TcAnonFieldDecl cenv env parent tpenv (mkName nFields i) fld) ValidateFieldNames(flds, rfields) - + rfields, thisTy | UnionCaseFullType (ty, arity) -> let ty', _ = TcTypeAndRecover cenv NoNewTypars CheckCxs ItemOccurence.UseInType env tpenv ty @@ -12362,10 +12368,10 @@ module TcRecdUnionAndEnumDeclarations = begin if not (typeEquiv cenv.g recordTy thisTy) then error(Error(FSComp.SR.tcReturnTypesForUnionMustBeSameAsType(), m)) rfields, recordTy - NewUnionCase id realUnionCaseName rfields recordTy attrs (xmldoc.ToXmlDoc()) vis + NewUnionCase id rfields recordTy attrs (xmldoc.ToXmlDoc()) vis - let TcUnionCaseDecls cenv env parent (thisTy : TType) tpenv unionCases = + let TcUnionCaseDecls cenv env parent (thisTy: TType) tpenv unionCases = let unionCases' = unionCases |> List.map (TcUnionCaseDecl cenv env parent thisTy tpenv) unionCases' |> CheckDuplicates (fun uc -> uc.Id) "union case" @@ -12384,7 +12390,7 @@ module TcRecdUnionAndEnumDeclarations = begin let TcEnumDecls cenv env parent thisTy enumCases = let fieldTy = NewInferenceType () - let enumCases' = enumCases |> List.map (TcEnumDecl cenv env parent thisTy fieldTy) |> CheckDuplicates (fun f -> f.Id) "enum element" + let enumCases' = enumCases |> List.map (TcEnumDecl cenv env parent thisTy fieldTy) |> CheckDuplicates (fun f -> f.Id) "enum element" fieldTy, enumCases' end @@ -12393,10 +12399,10 @@ end // Bind elements of classes //------------------------------------------------------------------------- -let PublishInterface cenv denv (tcref:TyconRef) m compgen ty' = +let PublishInterface cenv denv (tcref: TyconRef) m compgen ty' = if not (isInterfaceTy cenv.g ty') then errorR(Error(FSComp.SR.tcTypeIsNotInterfaceType1(NicePrint.minimalStringOfType denv ty'), m)) let tcaug = tcref.TypeContents - if tcref.HasInterface cenv.g ty' then + if tcref.HasInterface cenv.g ty' then errorR(Error(FSComp.SR.tcDuplicateSpecOfInterface(), m)) tcaug.tcaug_interfaces <- (ty', compgen, m) :: tcaug.tcaug_interfaces @@ -12412,7 +12418,7 @@ let TcAndPublishMemberSpec cenv env containerInfo declKind tpenv memb = [], tpenv -let TcTyconMemberSpecs cenv env containerInfo declKind tpenv (augSpfn: SynMemberSigs) = +let TcTyconMemberSpecs cenv env containerInfo declKind tpenv (augSpfn: SynMemberSigs) = let members, tpenv = List.mapFold (TcAndPublishMemberSpec cenv env containerInfo declKind) tpenv augSpfn List.concat members, tpenv @@ -12421,7 +12427,7 @@ let TcTyconMemberSpecs cenv env containerInfo declKind tpenv (augSpfn: SynMember // Bind 'open' declarations //------------------------------------------------------------------------- -let TcModuleOrNamespaceLidAndPermitAutoResolve tcSink env amap (longId : Ident list) = +let TcModuleOrNamespaceLidAndPermitAutoResolve tcSink env amap (longId: Ident list) = let ad = env.eAccessRights match longId with | [] -> Result [] @@ -12431,7 +12437,7 @@ let TcModuleOrNamespaceLidAndPermitAutoResolve tcSink env amap (longId : Ident l | Result res -> Result res | Exception err -> raze err -let TcOpenDecl tcSink (g:TcGlobals) amap m scopem env (longId : Ident list) = +let TcOpenDecl tcSink (g: TcGlobals) amap m scopem env (longId: Ident list) = let modrefs = ForceRaise (TcModuleOrNamespaceLidAndPermitAutoResolve tcSink env amap longId) // validate opened namespace names @@ -12475,7 +12481,7 @@ let TcOpenDecl tcSink (g:TcGlobals) amap m scopem env (longId : Ident list) = // Bug FSharp 1.0 3133: 'open Lexing'. Skip this warning if we successfully resolved to at least a module name if not (modrefs |> List.exists (fun (_, modref, _) -> modref.IsModule && not (HasFSharpAttribute g g.attrib_RequireQualifiedAccessAttribute modref.Attribs))) then modrefs |> List.iter (fun (_, modref, _) -> - if IsPartiallyQualifiedNamespace modref then + if IsPartiallyQualifiedNamespace modref then errorR(Error(FSComp.SR.tcOpenUsedWithPartiallyQualifiedPath(fullDisplayTextOfModRef modref), m))) let modrefs = List.map p23 modrefs @@ -12498,33 +12504,45 @@ module IncrClassChecking = /// Typechecked info for implicit constructor and it's arguments type IncrClassCtorLhs = - {/// The TyconRef for the type being defined - TyconRef : TyconRef - /// The type parameters allocated for the implicit instance constructor. - /// These may be equated with other (WillBeRigid) type parameters through equirecursive inference, and so - /// should always be renormalized/canonicalized when used. - InstanceCtorDeclaredTypars : Typars - /// The value representing the static implicit constructor. - /// Lazy to ensure the static ctor value is only published if needed. - StaticCtorValInfo : Lazy<(Val list * Val * ValScheme)> - /// The value representing the implicit constructor. - InstanceCtorVal : Val - /// The type of the implicit constructor, representing as a ValScheme. - InstanceCtorValScheme : ValScheme - /// The values representing the arguments to the implicit constructor. - InstanceCtorArgs : Val list - /// The reference cell holding the 'this' parameter within the implicit constructor so it can be referenced in the - /// arguments passed to the base constructor - InstanceCtorSafeThisValOpt : Val option - /// Data indicating if safe-initialization checks need to be inserted for this type. - InstanceCtorSafeInitInfo : SafeInitData - /// The value representing the 'base' variable within the implicit instance constructor. - InstanceCtorBaseValOpt : Val option - /// The value representing the 'this' variable within the implicit instance constructor. - InstanceCtorThisVal : Val - /// The name generator used to generate the names of fields etc. within the type. - NameGenerator : NiceNameGenerator + { + /// The TyconRef for the type being defined + TyconRef: TyconRef + + /// The type parameters allocated for the implicit instance constructor. + /// These may be equated with other (WillBeRigid) type parameters through equirecursive inference, and so + /// should always be renormalized/canonicalized when used. + InstanceCtorDeclaredTypars: Typars + + /// The value representing the static implicit constructor. + /// Lazy to ensure the static ctor value is only published if needed. + StaticCtorValInfo: Lazy<(Val list * Val * ValScheme)> + + /// The value representing the implicit constructor. + InstanceCtorVal: Val + + /// The type of the implicit constructor, representing as a ValScheme. + InstanceCtorValScheme: ValScheme + + /// The values representing the arguments to the implicit constructor. + InstanceCtorArgs: Val list + + /// The reference cell holding the 'this' parameter within the implicit constructor so it can be referenced in the + /// arguments passed to the base constructor + InstanceCtorSafeThisValOpt: Val option + + /// Data indicating if safe-initialization checks need to be inserted for this type. + InstanceCtorSafeInitInfo: SafeInitData + + /// The value representing the 'base' variable within the implicit instance constructor. + InstanceCtorBaseValOpt: Val option + + /// The value representing the 'this' variable within the implicit instance constructor. + InstanceCtorThisVal: Val + + /// The name generator used to generate the names of fields etc. within the type. + NameGenerator: NiceNameGenerator } + /// Get the type parameters of the implicit constructor, after taking equi-recursive inference into account. member ctorInfo.GetNormalizedInstanceCtorDeclaredTypars cenv denv m = let ctorDeclaredTypars = ctorInfo.InstanceCtorDeclaredTypars @@ -12533,7 +12551,7 @@ module IncrClassChecking = /// Check and elaborate the "left hand side" of the implicit class construction /// syntax. - let TcImplictCtorLhs_Phase2A(cenv, env, tpenv, tcref:TyconRef, vis, attrs, spats, thisIdOpt, baseValOpt: Val option, safeInitInfo, m, copyOfTyconTypars, objTy, thisTy) = + let TcImplictCtorLhs_Phase2A(cenv, env, tpenv, tcref: TyconRef, vis, attrs, spats, thisIdOpt, baseValOpt: Val option, safeInitInfo, m, copyOfTyconTypars, objTy, thisTy) = let baseValOpt = match GetSuperTypeOfType cenv.g cenv.amap m objTy with @@ -12565,14 +12583,14 @@ module IncrClassChecking = let ctorTy = mkFunTy argty objTy // REVIEW: no attributes can currently be specified for the implicit constructor let attribs = TcAttributes cenv env (AttributeTargets.Constructor ||| AttributeTargets.Method) attrs - let memberFlags = CtorMemberFlags + let memberFlags = CtorMemberFlags - let synArgInfos = List.map (SynInfo.InferSynArgInfoFromSimplePat []) spats + let synArgInfos = List.map (SynInfo.InferSynArgInfoFromSimplePat []) spats let valSynData = SynValInfo([synArgInfos], SynInfo.unnamedRetVal) - let id = ident ("new", m) + let id = ident ("new", m) CheckForNonAbstractInterface ModuleOrMemberBinding tcref memberFlags id.idRange - let memberInfo = MakeMemberDataAndMangledNameForMemberVal(cenv.g, tcref, false, attribs, [], memberFlags, valSynData, id, false) + let memberInfo = MakeMemberDataAndMangledNameForMemberVal(cenv.g, tcref, false, attribs, [], memberFlags, valSynData, id, false) let partialValReprInfo = TranslateTopValSynInfo m (TcAttributes cenv env) valSynData let prelimTyschemeG = TypeScheme(copyOfTyconTypars, ctorTy) let isComplete = ComputeIsComplete copyOfTyconTypars [] ctorTy @@ -12592,7 +12610,7 @@ module IncrClassChecking = let valSynData = SynValInfo([[]], SynInfo.unnamedRetVal) let id = ident ("cctor", m) CheckForNonAbstractInterface ModuleOrMemberBinding tcref ClassCtorMemberFlags id.idRange - let memberInfo = MakeMemberDataAndMangledNameForMemberVal(cenv.g, tcref, false, [(*no attributes*)], [], ClassCtorMemberFlags, valSynData, id, false) + let memberInfo = MakeMemberDataAndMangledNameForMemberVal(cenv.g, tcref, false, [(*no attributes*)], [], ClassCtorMemberFlags, valSynData, id, false) let partialValReprInfo = TranslateTopValSynInfo m (TcAttributes cenv env) valSynData let prelimTyschemeG = TypeScheme(copyOfTyconTypars, cctorTy) let topValInfo = InferGenericArityFromTyScheme prelimTyschemeG partialValReprInfo @@ -12603,23 +12621,23 @@ module IncrClassChecking = let thisVal = // --- Create this for use inside constructor - let thisId = ident ("this", m) - let thisValScheme = ValScheme(thisId, NonGenericTypeScheme(thisTy), None, None, false, ValInline.Never, CtorThisVal, None, true, false, false, false) - let thisVal = MakeAndPublishVal cenv env (ParentNone, false, ClassLetBinding(false), ValNotInRecScope, thisValScheme, [], XmlDoc.Empty, None, false) + let thisId = ident ("this", m) + let thisValScheme = ValScheme(thisId, NonGenericTypeScheme(thisTy), None, None, false, ValInline.Never, CtorThisVal, None, true, false, false, false) + let thisVal = MakeAndPublishVal cenv env (ParentNone, false, ClassLetBinding(false), ValNotInRecScope, thisValScheme, [], XmlDoc.Empty, None, false) thisVal - {TyconRef = tcref - InstanceCtorDeclaredTypars = copyOfTyconTypars - StaticCtorValInfo = cctorValInfo - InstanceCtorArgs = ctorArgs - InstanceCtorVal = ctorVal - InstanceCtorValScheme = ctorValScheme - InstanceCtorBaseValOpt = baseValOpt - InstanceCtorSafeThisValOpt = safeThisValOpt - InstanceCtorSafeInitInfo = safeInitInfo - InstanceCtorThisVal = thisVal + {TyconRef = tcref + InstanceCtorDeclaredTypars = copyOfTyconTypars + StaticCtorValInfo = cctorValInfo + InstanceCtorArgs = ctorArgs + InstanceCtorVal = ctorVal + InstanceCtorValScheme = ctorValScheme + InstanceCtorBaseValOpt = baseValOpt + InstanceCtorSafeThisValOpt = safeThisValOpt + InstanceCtorSafeInitInfo = safeInitInfo + InstanceCtorThisVal = thisVal // For generating names of local fields - NameGenerator = NiceNameGenerator() + NameGenerator = NiceNameGenerator() } @@ -12631,10 +12649,10 @@ module IncrClassChecking = /// The "v" is the local typed w.r.t. tyvars of the implicit ctor. /// The formalTyparInst does the formal-typars/implicit-ctor-typars subst. /// Field specifications added to a tcref must be in terms of the tcrefs formal typars. - let private MakeIncrClassField(g, cpath, formalTyparInst:TyparInst, v:Val, isStatic, rfref:RecdFieldRef) = + let private MakeIncrClassField(g, cpath, formalTyparInst: TyparInst, v: Val, isStatic, rfref: RecdFieldRef) = let name = rfref.FieldName - let id = ident (name, v.Range) - let ty = v.Type |> instType formalTyparInst + let id = ident (name, v.Range) + let ty = v.Type |> instType formalTyparInst let taccess = TAccess [cpath] let isVolatile = HasFSharpAttribute g g.attrib_VolatileFieldAttribute v.Attribs @@ -12654,12 +12672,12 @@ module IncrClassChecking = /// type defined with implicit class construction. type IncrClassReprInfo = { /// Indicates the set of field names taken within one incremental class - TakenFieldNames:Set - RepInfoTcGlobals:TcGlobals + TakenFieldNames: Set + RepInfoTcGlobals: TcGlobals /// vals mapped to representations - ValReprs : Zmap + ValReprs: Zmap /// vals represented as fields or members from this point on - ValsWithRepresentation : Zset } + ValsWithRepresentation: Zset } static member Empty(g, names) = { TakenFieldNames=Set.ofList names @@ -12668,12 +12686,12 @@ module IncrClassChecking = ValsWithRepresentation = Zset.empty valOrder } /// Find the representation of a value - member localRep.LookupRepr (v:Val) = + member localRep.LookupRepr (v: Val) = match Zmap.tryFind v localRep.ValReprs with | None -> error(InternalError("LookupRepr: failed to find representation for value", v.Range)) | Some res -> res - static member IsMethodRepr cenv (bind:Binding) = + static member IsMethodRepr cenv (bind: Binding) = let v = bind.Var // unit fields are not stored, just run rhs for effects if isUnitTy cenv.g v.Type then @@ -12685,13 +12703,13 @@ module IncrClassChecking = /// Choose how a binding is represented member localRep.ChooseRepresentation (cenv, env: TcEnv, isStatic, isCtorArg, - ctorInfo:IncrClassCtorLhs, + ctorInfo: IncrClassCtorLhs, /// The vars forced to be fields due to static member bindings, instance initialization expressions or instance member bindings - staticForcedFieldVars:FreeLocals, + staticForcedFieldVars: FreeLocals, /// The vars forced to be fields due to instance member bindings - instanceForcedFieldVars:FreeLocals, + instanceForcedFieldVars: FreeLocals, takenFieldNames: Set, - bind:Binding) = + bind: Binding) = let g = cenv.g let v = bind.Var let relevantForcedFieldVars = (if isStatic then staticForcedFieldVars else instanceForcedFieldVars) @@ -12768,7 +12786,7 @@ module IncrClassChecking = ValReprInfo(tpNames@ValReprInfo.InferTyparInfo(copyOfTyconTypars), args, ret) let prelimTyschemeG = TypeScheme(copyOfTyconTypars@tps, memberTauTy) - let memberValScheme = ValScheme(id, prelimTyschemeG, Some(topValInfo), Some(memberInfo), false, ValInline.Never, NormalVal, None, true (* isCompilerGenerated *) , true (* isIncrClass *) , false, false) + let memberValScheme = ValScheme(id, prelimTyschemeG, Some(topValInfo), Some(memberInfo), false, ValInline.Never, NormalVal, None, true (* isCompilerGenerated *), true (* isIncrClass *), false, false) let methodVal = MakeAndPublishVal cenv env (Parent(tcref), false, ModuleOrMemberBinding, ValNotInRecScope, memberValScheme, v.Attribs, XmlDoc.Empty, None, false) reportIfUnused() InMethod(isStatic, methodVal, topValInfo) @@ -12776,7 +12794,7 @@ module IncrClassChecking = repr, takenFieldNames /// Extend the known local representations by choosing a representation for a binding - member localRep.ChooseAndAddRepresentation(cenv, env: TcEnv, isStatic, isCtorArg, ctorInfo:IncrClassCtorLhs, staticForcedFieldVars:FreeLocals, instanceForcedFieldVars: FreeLocals, bind:Binding) = + member localRep.ChooseAndAddRepresentation(cenv, env: TcEnv, isStatic, isCtorArg, ctorInfo: IncrClassCtorLhs, staticForcedFieldVars: FreeLocals, instanceForcedFieldVars: FreeLocals, bind: Binding) = let v = bind.Var let repr, takenFieldNames = localRep.ChooseRepresentation (cenv, env, isStatic, isCtorArg, ctorInfo, staticForcedFieldVars, instanceForcedFieldVars, localRep.TakenFieldNames, bind ) // OK, representation chosen, now add it @@ -12784,21 +12802,21 @@ module IncrClassChecking = TakenFieldNames=takenFieldNames ValReprs = Zmap.add v repr localRep.ValReprs} - member localRep.ValNowWithRepresentation (v:Val) = + member localRep.ValNowWithRepresentation (v: Val) = {localRep with ValsWithRepresentation = Zset.add v localRep.ValsWithRepresentation} - member localRep.IsValWithRepresentation (v:Val) = + member localRep.IsValWithRepresentation (v: Val) = localRep.ValsWithRepresentation.Contains(v) - member localRep.IsValRepresentedAsLocalVar (v:Val) = + member localRep.IsValRepresentedAsLocalVar (v: Val) = match localRep.LookupRepr v with | InVar false -> true | _ -> false - member localRep.IsValRepresentedAsMethod (v:Val) = + member localRep.IsValRepresentedAsMethod (v: Val) = localRep.IsValWithRepresentation(v) && match localRep.LookupRepr(v) with - | InMethod _ -> true + | InMethod _ -> true | _ -> false /// Make the elaborated expression that represents a use of a @@ -12864,15 +12882,15 @@ module IncrClassChecking = /// Mutate a type definition by adding fields /// Used as part of processing "let" bindings in a type definition. - member localRep.PublishIncrClassFields (cenv, denv, cpath, ctorInfo:IncrClassCtorLhs, safeStaticInitInfo) = + member localRep.PublishIncrClassFields (cenv, denv, cpath, ctorInfo: IncrClassCtorLhs, safeStaticInitInfo) = let tcref = ctorInfo.TyconRef - let rfspecs = + let rfspecs = [ for KeyValue(v, repr) in localRep.ValReprs do match repr with | InField(isStatic, _, rfref) -> // Instance fields for structs are published earlier because the full set of fields is determined syntactically from the implicit // constructor arguments. This is important for the "default value" and "does it have an implicit default constructor" - // semantic conditions for structs - see bug FSharp 1.0 5304. + // semantic conditions for structs - see bug FSharp 1.0 5304. if isStatic || not tcref.IsFSharpStructOrEnumTycon then let ctorDeclaredTypars = ctorInfo.GetNormalizedInstanceCtorDeclaredTypars cenv denv ctorInfo.TyconRef.Range @@ -12898,7 +12916,7 @@ module IncrClassChecking = /// Fix up the references to the locals, e.g. /// v -> this.fieldv /// f x -> this.method x - member localRep.FixupIncrClassExprPhase2C cenv thisValOpt safeStaticInitInfo (thisTyInst:TypeInst) expr = + member localRep.FixupIncrClassExprPhase2C cenv thisValOpt safeStaticInitInfo (thisTyInst: TypeInst) expr = // fixup: intercept and expr rewrite let FixupExprNode rw e = //dprintfn "Fixup %s" (showL (exprL e)) @@ -12925,13 +12943,13 @@ module IncrClassChecking = Some (localRep.MakeValueLookup thisValOpt thisTyInst safeStaticInitInfo v [] m) // Rewrite assignments to mutable values stored as fields - | Expr.Op(TOp.LValueOp (LSet, ValDeref v) , [], [arg], m) + | Expr.Op(TOp.LValueOp (LSet, ValDeref v), [], [arg], m) when localRep.IsValWithRepresentation(v) -> let arg = rw arg Some (localRep.MakeValueAssign thisValOpt thisTyInst safeStaticInitInfo v arg m) // Rewrite taking the address of mutable values stored as fields - | Expr.Op(TOp.LValueOp (LAddrOf readonly, ValDeref v), [], [] , m) + | Expr.Op(TOp.LValueOp (LAddrOf readonly, ValDeref v), [], [], m) when localRep.IsValWithRepresentation(v) -> Some (localRep.MakeValueGetAddress readonly thisValOpt thisTyInst safeStaticInitInfo v m) @@ -12953,21 +12971,21 @@ module IncrClassChecking = (cenv, env: TcEnv, /// The lhs information about the implicit constructor - ctorInfo:IncrClassCtorLhs, + ctorInfo: IncrClassCtorLhs, /// The call to the super class constructor inheritsExpr, /// Should we place a sequence point at the 'inheritedTys call? inheritsIsVisible, /// The declarations - decs : IncrClassConstructionBindingsPhase2C list, - memberBinds : Binding list, + decs: IncrClassConstructionBindingsPhase2C list, + memberBinds: Binding list, /// Record any unconstrained type parameters generalized for the outer members as "free choices" in the let bindings generalizedTyparsForRecursiveBlock, - safeStaticInitInfo : SafeInitData) = + safeStaticInitInfo: SafeInitData) = let denv = env.DisplayEnv - let thisVal = ctorInfo.InstanceCtorThisVal + let thisVal = ctorInfo.InstanceCtorThisVal let m = thisVal.Range let ctorDeclaredTypars = ctorInfo.GetNormalizedInstanceCtorDeclaredTypars cenv denv m @@ -12984,14 +13002,14 @@ module IncrClassChecking = let accFreeInExpr acc expr = unionFreeVars acc (freeInExpr CollectLocalsNoCaching expr) - let accFreeInBinding acc (bind:Binding) = + let accFreeInBinding acc (bind: Binding) = accFreeInExpr acc bind.Expr - let accFreeInBindings acc (binds:Binding list) = + let accFreeInBindings acc (binds: Binding list) = (acc, binds) ||> List.fold accFreeInBinding // Find all the variables used in any method. These become fields. - // staticForcedFieldVars:FreeLocals: the vars forced to be fields due to static member bindings, instance initialization expressions or instance member bindings + // staticForcedFieldVars: FreeLocals: the vars forced to be fields due to static member bindings, instance initialization expressions or instance member bindings // instanceForcedFieldVars: FreeLocals: the vars forced to be fields due to instance member bindings let staticForcedFieldVars, instanceForcedFieldVars = @@ -13026,7 +13044,7 @@ module IncrClassChecking = else unionFreeVars staticForcedFieldVars (freeInExpr CollectLocalsNoCaching e) (staticForcedFieldVars, instanceForcedFieldVars))) - let staticForcedFieldVars = (staticForcedFieldVars, memberBinds) ||> accFreeInBindings + let staticForcedFieldVars = (staticForcedFieldVars, memberBinds) ||> accFreeInBindings let instanceForcedFieldVars = (instanceForcedFieldVars, memberBinds) ||> accFreeInBindings // Any references to static variables in the 'inherits' expression force those static variables to be represented as fields @@ -13037,7 +13055,7 @@ module IncrClassChecking = // Compute the implicit construction side effects of single // 'let' or 'let rec' binding in the implicit class construction sequence - let TransBind (reps:IncrClassReprInfo) (TBind(v, rhsExpr, spBind)) = + let TransBind (reps: IncrClassReprInfo) (TBind(v, rhsExpr, spBind)) = if v.MustInline then error(Error(FSComp.SR.tcLocalClassBindingsCannotBeInline(), v.Range)) let rhsExpr = reps.FixupIncrClassExprPhase2C cenv (Some thisVal) safeStaticInitInfo thisTyInst rhsExpr @@ -13083,7 +13101,7 @@ module IncrClassChecking = let m = match spBind, rhsExpr with // Don't generate big sequence points for functions in classes - | _, (Expr.Lambda _ | Expr.TyLambda _) -> v.Range + | _, (Expr.Lambda _ | Expr.TyLambda _) -> v.Range | SequencePointAtBinding m, _ -> m | _ -> v.Range let assignExpr = reps.MakeValueAssign (Some thisVal) thisTyInst NoSafeInitInfo v rhsExpr m @@ -13105,21 +13123,21 @@ module IncrClassChecking = /// Work out the implicit construction side effects of a 'let', 'let rec' or 'do' /// binding in the implicit class construction sequence - let TransTrueDec isCtorArg (reps:IncrClassReprInfo) dec = + let TransTrueDec isCtorArg (reps: IncrClassReprInfo) dec = match dec with | (IncrClassBindingGroup(binds, isStatic, isRec)) -> let actions, reps, methodBinds = - let reps = (reps, binds) ||> List.fold (fun rep bind -> rep.ChooseAndAddRepresentation(cenv, env, isStatic, isCtorArg, ctorInfo, staticForcedFieldVars, instanceForcedFieldVars, bind)) // extend + let reps = (reps, binds) ||> List.fold (fun rep bind -> rep.ChooseAndAddRepresentation(cenv, env, isStatic, isCtorArg, ctorInfo, staticForcedFieldVars, instanceForcedFieldVars, bind)) // extend if isRec then // Note: the recursive calls are made via members on the object // or via access to fields. This means the recursive loop is "broken", // and we can collapse to sequential bindings - let reps = (reps, binds) ||> List.fold (fun rep bind -> rep.ValNowWithRepresentation bind.Var) // inscope before + let reps = (reps, binds) ||> List.fold (fun rep bind -> rep.ValNowWithRepresentation bind.Var) // inscope before let actions, methodBinds = binds |> List.map (TransBind reps) |> List.unzip // since can occur in RHS of own defns actions, reps, methodBinds else - let actions, methodBinds = binds |> List.map (TransBind reps) |> List.unzip - let reps = (reps, binds) ||> List.fold (fun rep bind -> rep.ValNowWithRepresentation bind.Var) // inscope after + let actions, methodBinds = binds |> List.map (TransBind reps) |> List.unzip + let reps = (reps, binds) ||> List.fold (fun rep bind -> rep.ValNowWithRepresentation bind.Var) // inscope after actions, reps, methodBinds let methodBinds = List.concat methodBinds if isStatic then @@ -13139,13 +13157,13 @@ module IncrClassChecking = /// Work out the implicit construction side effects of each declaration /// in the implicit class construction sequence - let TransDec (reps:IncrClassReprInfo) dec = + let TransDec (reps: IncrClassReprInfo) dec = match dec with // The call to the base class constructor is done so we can set the ref cell | Phase2CCtorJustAfterSuperInit -> let binders = [ match ctorInfo.InstanceCtorSafeThisValOpt with - | None -> () + | None -> () | Some v -> let setExpr = mkRefCellSet cenv.g m ctorInfo.InstanceCtorThisVal.Type (exprForVal m v) (exprForVal m ctorInfo.InstanceCtorThisVal) let setExpr = reps.FixupIncrClassExprPhase2C cenv (Some(thisVal)) safeStaticInitInfo thisTyInst setExpr @@ -13229,7 +13247,7 @@ module IncrClassChecking = // This ref cell itself may be stored in a field of the object and accessed via arg0. // Likewise the incoming arguments will eventually be stored in fields and accessed via arg0. // - // As a result, the most natural way to implement this would be to simply capture arg0 if needed + // As a result, the most natural way to implement this would be to simply capture arg0 if needed // and access all variables via that. This would be done by rewriting the inheritsExpr as follows: // let inheritsExpr = reps.FixupIncrClassExprPhase2C (Some(thisVal)) thisTyInst inheritsExpr // However, the rules of IL mean we are not actually allowed to capture arg0 @@ -13293,20 +13311,20 @@ module MutRecBindingChecking = /// Represents one element in a type definition, after the first phase type TyconBindingPhase2A = /// An entry corresponding to the definition of the implicit constructor for a class - | Phase2AIncrClassCtor of IncrClassCtorLhs + | Phase2AIncrClassCtor of IncrClassCtorLhs /// An 'inherit' declaration in an incremental class /// /// Phase2AInherit (ty, arg, baseValOpt, m) - | Phase2AInherit of SynType * SynExpr * Val option * range + | Phase2AInherit of SynType * SynExpr * Val option * range /// A set of value or function definitions in an incremental class /// /// Phase2AIncrClassBindings (tcref, letBinds, isStatic, isRec, m) | Phase2AIncrClassBindings of TyconRef * Ast.SynBinding list * bool * bool * range /// A 'member' definition in a class - | Phase2AMember of PreCheckingRecursiveBinding + | Phase2AMember of PreCheckingRecursiveBinding #if OPEN_IN_TYPE_DECLARATIONS /// A dummy declaration, should we ever support 'open' in type definitions - | Phase2AOpen of LongIdent * range + | Phase2AOpen of LongIdent * range #endif /// Indicates the super init has just been called, 'this' may now be published | Phase2AIncrClassCtorJustAfterSuperInit @@ -13318,15 +13336,15 @@ module MutRecBindingChecking = | TyconBindingsPhase2A of Tycon option * DeclKind * Val list * TyconRef * Typar list * TType * TyconBindingPhase2A list /// The collected syntactic input definitions for a recursive group of type or type-extension definitions - type MutRecDefnsPhase2AData = MutRecShape list + type MutRecDefnsPhase2AData = MutRecShape list /// Represents one element in a type definition, after the second phase type TyconBindingPhase2B = - | Phase2BIncrClassCtor of IncrClassCtorLhs * Tast.Binding option - | Phase2BInherit of Expr * Val option + | Phase2BIncrClassCtor of IncrClassCtorLhs * Tast.Binding option + | Phase2BInherit of Expr * Val option /// A set of value of function definitions in a class definition with an implicit constructor. | Phase2BIncrClassBindings of IncrClassBindingGroup list - | Phase2BMember of int + | Phase2BMember of int /// An intermediate definition that represent the point in an implicit class definition where /// the super type has been initialized. | Phase2BIncrClassCtorJustAfterSuperInit @@ -13341,10 +13359,10 @@ module MutRecBindingChecking = /// Represents one element in a type definition, after the third phase type TyconBindingPhase2C = - | Phase2CIncrClassCtor of IncrClassCtorLhs * Tast.Binding option - | Phase2CInherit of Expr * Val option + | Phase2CIncrClassCtor of IncrClassCtorLhs * Tast.Binding option + | Phase2CInherit of Expr * Val option | Phase2CIncrClassBindings of IncrClassBindingGroup list - | Phase2CMember of PreInitializationGraphEliminationBinding + | Phase2CMember of PreInitializationGraphEliminationBinding // Indicates the last 'field' has been initialized, only 'do' comes after | Phase2CIncrClassCtorJustAfterSuperInit | Phase2CIncrClassCtorJustAfterLastLet @@ -13357,22 +13375,22 @@ module MutRecBindingChecking = // Phase2A: create member prelimRecValues for "recursive" items, i.e. ctor val and member vals // Phase2A: also processes their arg patterns - collecting type assertions - let TcMutRecBindings_Phase2A_CreateRecursiveValuesAndCheckArgumentPatterns cenv tpenv (envMutRec, mutRecDefns : MutRecDefnsPhase2Info) = + let TcMutRecBindings_Phase2A_CreateRecursiveValuesAndCheckArgumentPatterns cenv tpenv (envMutRec, mutRecDefns: MutRecDefnsPhase2Info) = // The basic iteration over the declarations in a single type definition // State: - // tpenv: floating type parameter environment - // recBindIdx: index of the recursive binding - // prelimRecValuesRev: accumulation of prelim value entries - // uncheckedBindsRev: accumulation of unchecked bindings + // tpenv: floating type parameter environment + // recBindIdx: index of the recursive binding + // prelimRecValuesRev: accumulation of prelim value entries + // uncheckedBindsRev: accumulation of unchecked bindings let (defnsAs: MutRecDefnsPhase2AData), (tpenv, _, uncheckedBindsRev) = let initialOuterState = (tpenv, 0, ([]: PreCheckingRecursiveBinding list)) (initialOuterState, envMutRec, mutRecDefns) |||> MutRecShapes.mapFoldWithEnv (fun outerState envForDecls defn -> let (tpenv, recBindIdx, uncheckedBindsRev) = outerState match defn with - | MutRecShape.Module _ -> failwith "unreachable" - | MutRecShape.Open x -> MutRecShape.Open x, outerState - | MutRecShape.ModuleAbbrev x -> MutRecShape.ModuleAbbrev x, outerState + | MutRecShape.Module _ -> failwith "unreachable" + | MutRecShape.Open x -> MutRecShape.Open x, outerState + | MutRecShape.ModuleAbbrev x -> MutRecShape.ModuleAbbrev x, outerState | MutRecShape.Lets recBinds -> let normRecDefns = [ for (RecDefnBindingInfo(a, b, c, bind)) in recBinds do @@ -13479,7 +13497,7 @@ module MutRecBindingChecking = | MemberKind.Constructor -> error(Error(FSComp.SR.tcMeasureDeclarationsRequireStaticMembersNotConstructors(), m)) | _ -> () let rbind = NormalizedRecBindingDefn(containerInfo, newslotsOK, declKind, bind) - let overridesOK = DeclKind.CanOverrideOrImplement(declKind) + let overridesOK = DeclKind.CanOverrideOrImplement(declKind) let (binds, _values), (tpenv, recBindIdx) = AnalyzeAndMakeAndPublishRecursiveValue overridesOK false cenv envForTycon (tpenv, recBindIdx) rbind let cbinds = [ for rbind in binds -> Phase2AMember rbind ] @@ -13519,7 +13537,7 @@ module MutRecBindingChecking = let afterRev = restRev |> List.takeWhile isAfter let beforeRev = restRev |> List.skipWhile isAfter - [ yield! List.rev beforeRev + [ yield! List.rev beforeRev yield Phase2AIncrClassCtorJustAfterLastLet yield! List.rev afterRev ] b1 :: rest @@ -13537,11 +13555,11 @@ module MutRecBindingChecking = /// Phase2B: check each of the bindings, convert from ast to tast and collects type assertions. /// Also generalize incrementally. - let TcMutRecBindings_Phase2B_TypeCheckAndIncrementalGeneralization cenv tpenv envInitial (envMutRec, defnsAs:MutRecDefnsPhase2AData, uncheckedRecBinds: PreCheckingRecursiveBinding list, scopem) : MutRecDefnsPhase2BData * _ * _ = + let TcMutRecBindings_Phase2B_TypeCheckAndIncrementalGeneralization cenv tpenv envInitial (envMutRec, defnsAs: MutRecDefnsPhase2AData, uncheckedRecBinds: PreCheckingRecursiveBinding list, scopem) : MutRecDefnsPhase2BData * _ * _ = let (defnsBs: MutRecDefnsPhase2BData), (tpenv, generalizedRecBinds, preGeneralizationRecBinds, _, _) = - let uncheckedRecBindsTable = uncheckedRecBinds |> List.map (fun rbind -> rbind.RecBindingInfo.Val.Stamp, rbind) |> Map.ofList + let uncheckedRecBindsTable = uncheckedRecBinds |> List.map (fun rbind -> rbind.RecBindingInfo.Val.Stamp, rbind) |> Map.ofList // Loop through the types being defined... // @@ -13550,7 +13568,7 @@ module MutRecBindingChecking = // consider // // type A<'T>() = - // let someFuncValue : 'A = A<'T>.Meth2() + // let someFuncValue: 'A = A<'T>.Meth2() // static member Meth2() = A<'T>.Meth2() // and B<'T>() = // static member Meth1() = A<'T>.Meth2() @@ -13568,14 +13586,14 @@ module MutRecBindingChecking = match defnsA with | MutRecShape.Module _ -> failwith "unreachable" - | MutRecShape.Open x -> MutRecShape.Open x, outerState - | MutRecShape.ModuleAbbrev x -> MutRecShape.ModuleAbbrev x, outerState + | MutRecShape.Open x -> MutRecShape.Open x, outerState + | MutRecShape.ModuleAbbrev x -> MutRecShape.ModuleAbbrev x, outerState | MutRecShape.Lets binds -> let defnBs, (tpenv, _, envNonRec, generalizedRecBinds, preGeneralizationRecBinds, uncheckedRecBindsTable) = let initialInnerState = (tpenv, envForDecls, envNonRec, generalizedRecBinds, preGeneralizationRecBinds, uncheckedRecBindsTable) - (initialInnerState, binds) ||> List.mapFold (fun innerState rbind -> + (initialInnerState, binds) ||> List.mapFold (fun innerState rbind -> let (tpenv, envStatic, envNonRec, generalizedRecBinds, preGeneralizationRecBinds, uncheckedRecBindsTable) = innerState @@ -13595,7 +13613,7 @@ module MutRecBindingChecking = let envForTycon = if isExtrinsic then envForTycon else AddLocalTyconRefs true cenv.g cenv.amap tcref.Range [tcref] envForTycon // Set up the environment so use-before-definition warnings are given, at least // until we reach a Phase2AIncrClassCtorJustAfterSuperInit. - let envForTycon = { envForTycon with eCtorInfo = Some (InitialImplicitCtorInfo()) } + let envForTycon = { envForTycon with eCtorInfo = Some (InitialImplicitCtorInfo()) } let reqdThisValTyOpt = Some thisTy @@ -13610,7 +13628,7 @@ module MutRecBindingChecking = let defnBs, (tpenv, _, _, envNonRec, generalizedRecBinds, preGeneralizationRecBinds, uncheckedRecBindsTable) = let initialInnerState = (tpenv, envForTycon, envForTycon, envNonRec, generalizedRecBinds, preGeneralizationRecBinds, uncheckedRecBindsTable) - (initialInnerState, defnAs) ||> List.mapFold (fun innerState defnA -> + (initialInnerState, defnAs) ||> List.mapFold (fun innerState defnA -> let (tpenv, envInstance, envStatic, envNonRec, generalizedRecBinds, preGeneralizationRecBinds, uncheckedRecBindsTable) = innerState @@ -13623,8 +13641,8 @@ module MutRecBindingChecking = let envStatic = AddDeclaredTypars CheckForDuplicateTypars incrClassCtorLhs.InstanceCtorDeclaredTypars envStatic let envInstance = match incrClassCtorLhs.InstanceCtorSafeThisValOpt with Some v -> AddLocalVal cenv.tcSink scopem v envInstance | None -> envInstance let envInstance = List.foldBack AddLocalValPrimitive incrClassCtorLhs.InstanceCtorArgs envInstance - let envNonRec = match incrClassCtorLhs.InstanceCtorSafeThisValOpt with Some v -> AddLocalVal cenv.tcSink scopem v envNonRec | None -> envNonRec - let envNonRec = List.foldBack AddLocalValPrimitive incrClassCtorLhs.InstanceCtorArgs envNonRec + let envNonRec = match incrClassCtorLhs.InstanceCtorSafeThisValOpt with Some v -> AddLocalVal cenv.tcSink scopem v envNonRec | None -> envNonRec + let envNonRec = List.foldBack AddLocalValPrimitive incrClassCtorLhs.InstanceCtorArgs envNonRec let safeThisValBindOpt = TcLetrecComputeCtorSafeThisValBind cenv incrClassCtorLhs.InstanceCtorSafeThisValOpt let innerState = (tpenv, envInstance, envStatic, envNonRec, generalizedRecBinds, preGeneralizationRecBinds, uncheckedRecBindsTable) @@ -13636,7 +13654,7 @@ module MutRecBindingChecking = let baseTy = baseTy |> convertToTypeWithMetadataIfPossible cenv.g let inheritsExpr, tpenv = TcNewExpr cenv envInstance tpenv baseTy (Some synBaseTy.Range) true arg m let envInstance = match baseValOpt with Some baseVal -> AddLocalVal cenv.tcSink scopem baseVal envInstance | None -> envInstance - let envNonRec = match baseValOpt with Some baseVal -> AddLocalVal cenv.tcSink scopem baseVal envNonRec | None -> envNonRec + let envNonRec = match baseValOpt with Some baseVal -> AddLocalVal cenv.tcSink scopem baseVal envNonRec | None -> envNonRec let innerState = (tpenv, envInstance, envStatic, envNonRec, generalizedRecBinds, preGeneralizationRecBinds, uncheckedRecBindsTable) Phase2BInherit (inheritsExpr, baseValOpt), innerState @@ -13680,7 +13698,7 @@ module MutRecBindingChecking = | _ -> errorR (Error(FSComp.SR.tcMemberAndLocalClassBindingHaveSameName(nm), bind.Var.Range)) // Also add static entries to the envInstance if necessary - let envInstance = (if isStatic then (binds, envInstance) ||> List.foldBack (fun b e -> AddLocalVal cenv.tcSink scopem b.Var e) else env) + let envInstance = (if isStatic then (binds, envInstance) ||> List.foldBack (fun b e -> AddLocalVal cenv.tcSink scopem b.Var e) else env) let envStatic = (if isStatic then env else envStatic) let innerState = (tpenv, envInstance, envStatic, envNonRec, generalizedRecBinds, preGeneralizationRecBinds, uncheckedRecBindsTable) Phase2BIncrClassBindings bindRs, innerState @@ -13691,7 +13709,7 @@ module MutRecBindingChecking = | Phase2AIncrClassCtorJustAfterLastLet -> let innerState = (tpenv, envInstance, envStatic, envNonRec, generalizedRecBinds, preGeneralizationRecBinds, uncheckedRecBindsTable) - Phase2BIncrClassCtorJustAfterLastLet , innerState + Phase2BIncrClassCtorJustAfterLastLet, innerState #if OPEN_IN_TYPE_DECLARATIONS @@ -13717,7 +13735,7 @@ module MutRecBindingChecking = // Type variables derived from the type definition (or implicit constructor) are always generalizable (we check their generalizability later). // Note they may be solved to be equi-recursive. - let extraGeneralizableTypars = copyOfTyconTypars + let extraGeneralizableTypars = copyOfTyconTypars // Inside the incremental class syntax we assert the type of the 'this' variable to be precisely the same type as the // this variable for the implicit class constructor. For static members, we assert the type variables associated @@ -13770,7 +13788,7 @@ module MutRecBindingChecking = | Phase2BInherit (inheritsExpr, basevOpt) -> Phase2CInherit (inheritsExpr, basevOpt) - | Phase2BIncrClassBindings bindRs -> + | Phase2BIncrClassBindings bindRs -> Phase2CIncrClassBindings bindRs | Phase2BIncrClassCtorJustAfterSuperInit -> @@ -13779,11 +13797,11 @@ module MutRecBindingChecking = | Phase2BIncrClassCtorJustAfterLastLet -> Phase2CIncrClassCtorJustAfterLastLet - | Phase2BMember idx -> + | Phase2BMember idx -> // Phase2C: Fixup member bindings let generalizedBinding = generalizedBindingsMap.[idx] let vxbind = TcLetrecAdjustMemberForSpecialVals cenv generalizedBinding - let pgbrind = FixupLetrecBind cenv denv generalizedTyparsForRecursiveBlock vxbind + let pgbrind = FixupLetrecBind cenv denv generalizedTyparsForRecursiveBlock vxbind Phase2CMember pgbrind) TyconBindingsPhase2C(tyconOpt, tcref, defnCs)) @@ -13792,7 +13810,7 @@ module MutRecBindingChecking = [ for idx in bindIdxs do let generalizedBinding = generalizedBindingsMap.[idx] let vxbind = TcLetrecAdjustMemberForSpecialVals cenv generalizedBinding - yield FixupLetrecBind cenv denv generalizedTyparsForRecursiveBlock vxbind ]) + yield FixupLetrecBind cenv denv generalizedTyparsForRecursiveBlock vxbind ]) // --- Extract field bindings from let-bindings @@ -13811,7 +13829,7 @@ module MutRecBindingChecking = // there are some minor concerns about performance w.r.t. these static bindings: // // set.fs (also map.fs) - // static let empty : Set<'T> = + // static let empty: Set<'T> = // let comparer = LanguagePrimitives.FastGenericComparer<'T> // new Set<'T>(comparer, SetEmpty) // @@ -13837,7 +13855,7 @@ module MutRecBindingChecking = | _ -> false) if needsSafeStaticInit && hasStaticBindings then - let rfield = MakeSafeInitField cenv.g envForDecls tcref.Range true + let rfield = MakeSafeInitField cenv.g envForDecls tcref.Range true SafeInitField(mkRecdFieldRef tcref rfield.Name, rfield) else NoSafeInitInfo @@ -13864,7 +13882,7 @@ module MutRecBindingChecking = // Compute the cpath used when creating the hidden fields let cpath = envForTycon.eAccessPath - let localDecs = + let localDecs = defnCs |> List.filter (function | Phase2CIncrClassBindings _ | Phase2CIncrClassCtorJustAfterSuperInit @@ -13873,7 +13891,7 @@ module MutRecBindingChecking = let memberBindsWithFixups = defnCs |> List.choose (function Phase2CMember pgrbind -> Some pgrbind | _ -> None) // Extend localDecs with "let safeThisVal = ref null" if there is a safeThisVal - let localDecs = + let localDecs = match safeThisValBindOpt with | None -> localDecs | Some bind -> Phase2CIncrClassBindings [IncrClassBindingGroup([bind], false, false)] :: localDecs @@ -13885,7 +13903,7 @@ module MutRecBindingChecking = [ for localDec in localDecs do match localDec with | Phase2CIncrClassBindings(binds) -> yield Phase2CBindings binds - | Phase2CIncrClassCtorJustAfterSuperInit -> yield Phase2CCtorJustAfterSuperInit + | Phase2CIncrClassCtorJustAfterSuperInit -> yield Phase2CCtorJustAfterSuperInit | Phase2CIncrClassCtorJustAfterLastLet -> yield Phase2CCtorJustAfterLastLet | _ -> () ] let memberBinds = memberBindsWithFixups |> List.map (fun x -> x.Binding) @@ -13903,7 +13921,7 @@ module MutRecBindingChecking = | Some(cctorBodyLambdaExpr) -> [ (let _, cctorVal, cctorValScheme = incrClassCtorLhs.StaticCtorValInfo.Force() let cctorValueExprBinding = TBind(cctorVal, cctorBodyLambdaExpr, NoSequencePointAtStickyBinding) - let rbind = { ValScheme = cctorValScheme; Binding = cctorValueExprBinding } + let rbind = { ValScheme = cctorValScheme; Binding = cctorValueExprBinding } FixupLetrecBind cenv envForDecls.DisplayEnv generalizedTyparsForRecursiveBlock rbind) ] ) // Publish the fields of the representation to the type @@ -13934,7 +13952,7 @@ module MutRecBindingChecking = tyconOpt, memberBindsWithFixups, []) /// Check a "module X = A.B.C" module abbreviation declaration - let TcModuleAbbrevDecl (cenv:cenv) scopem env (id, p, m) = + let TcModuleAbbrevDecl (cenv: cenv) scopem env (id, p, m) = let ad = env.eAccessRights let resolved = match p with @@ -13968,30 +13986,30 @@ module MutRecBindingChecking = /// Compute the active environments within each nested module. let TcMutRecDefns_ComputeEnvs getTyconOpt getVals (cenv: cenv) report scopem m envInitial mutRecShape = (envInitial, mutRecShape) ||> MutRecShapes.computeEnvs - (fun envAbove (MutRecDefnsPhase2DataForModule (mtypeAcc, mspec)) -> MakeInnerEnvWithAcc envAbove mspec.Id mtypeAcc mspec.ModuleOrNamespaceType.ModuleOrNamespaceKind) + (fun envAbove (MutRecDefnsPhase2DataForModule (mtypeAcc, mspec)) -> MakeInnerEnvWithAcc envAbove mspec.Id mtypeAcc mspec.ModuleOrNamespaceType.ModuleOrNamespaceKind) (fun envAbove decls -> // Collect the type definitions, exception definitions, modules and "open" declarations - let tycons = decls |> List.choose (function MutRecShape.Tycon d -> getTyconOpt d | _ -> None) + let tycons = decls |> List.choose (function MutRecShape.Tycon d -> getTyconOpt d | _ -> None) let mspecs = decls |> List.choose (function MutRecShape.Module (MutRecDefnsPhase2DataForModule (_, mspec), _) -> Some mspec | _ -> None) let moduleAbbrevs = decls |> List.choose (function MutRecShape.ModuleAbbrev (MutRecDataForModuleAbbrev (id, mp, m)) -> Some (id, mp, m) | _ -> None) let opens = decls |> List.choose (function MutRecShape.Open (MutRecDataForOpen (mp, m)) -> Some (mp, m) | _ -> None) let lets = decls |> List.collect (function MutRecShape.Lets binds -> getVals binds | _ -> []) - let exns = tycons |> List.filter (fun (tycon:Tycon) -> tycon.IsExceptionDecl) + let exns = tycons |> List.filter (fun (tycon: Tycon) -> tycon.IsExceptionDecl) // Add the type definitions, exceptions, modules and "open" declarations. - // The order here is sensitive. The things added first will be resolved in an environment - // where not everything has been added. The things added last will be preferred in name + // The order here is sensitive. The things added first will be resolved in an environment + // where not everything has been added. The things added last will be preferred in name // resolution. // // 'open' declarations ('open M') may refer to modules being defined ('M') and so must be - // processed in an environment where 'M' is present. However, in later processing the names of + // processed in an environment where 'M' is present. However, in later processing the names of // modules being defined ('M') take precedence over those coming from 'open' declarations. // So add the names of the modules being defined to the environment twice - once to allow // the processing of 'open M', and once to allow the correct name resolution of 'M'. // // Module abbreviations being defined ('module M = A.B.C') are not available for use in 'open' - // declarations. So + // declarations. So // namespace rec N = // open M // module M = FSharp.Core.Operators @@ -14021,7 +14039,7 @@ module MutRecBindingChecking = // Phase2A: create member prelimRecValues for "recursive" items, i.e. ctor val and member vals // Phase2A: also processes their arg patterns - collecting type assertions - let (defnsAs, uncheckedRecBinds, tpenv) = TcMutRecBindings_Phase2A_CreateRecursiveValuesAndCheckArgumentPatterns cenv tpenv (envMutRecPrelimWithReprs, mutRecDefns) + let (defnsAs, uncheckedRecBinds, tpenv) = TcMutRecBindings_Phase2A_CreateRecursiveValuesAndCheckArgumentPatterns cenv tpenv (envMutRecPrelimWithReprs, mutRecDefns) // Now basic member values are created we can compute the final attributes (i.e. in the case where attributes refer to constructors being defined) mutRecDefns |> MutRecShapes.iterTycons (fun (MutRecDefnsPhase2InfoForTycon(_, _, _, _, _, fixupFinalAttrs)) -> @@ -14036,7 +14054,7 @@ module MutRecBindingChecking = (envInitial, MutRecShapes.dropEnvs defnsAs) ||> TcMutRecDefns_ComputeEnvs (fun (TyconBindingsPhase2A(tyconOpt, _, _, _, _, _, _)) -> tyconOpt) - (fun binds -> [ for bind in binds -> bind.RecBindingInfo.Val ]) + (fun binds -> [ for bind in binds -> bind.RecBindingInfo.Val ]) cenv false scopem scopem ||> MutRecShapes.extendEnvs (fun envForDecls decls -> @@ -14051,7 +14069,7 @@ module MutRecBindingChecking = [ for defnB in defnAs do match defnB with | Phase2AIncrClassCtor (incrClassCtorLhs) -> yield incrClassCtorLhs.InstanceCtorVal - | _ -> () ]) + | _ -> () ]) let envForDeclsUpdated = envForDecls @@ -14077,14 +14095,14 @@ module MutRecBindingChecking = for defnA in defnAs do match defnA with | Phase2AMember rbind -> yield! rbind.RecBindingInfo.EnclosingDeclaredTypars - | _ -> () ]) + | _ -> () ]) // Now check they don't escape the overall scope of the recursive set of types if not (isNil allExtraGeneralizableTypars) then let freeInInitialEnv = GeneralizationHelpers.ComputeUngeneralizableTypars envInitial for extraTypar in allExtraGeneralizableTypars do if Zset.memberOf freeInInitialEnv extraTypar then - let ty = mkTyparTy extraTypar + let ty = mkTyparTy extraTypar error(Error(FSComp.SR.tcNotSufficientlyGenericBecauseOfScope(NicePrint.prettyStringOfTy denv ty), extraTypar.Range)) // Solve any type variables in any part of the overall type signature of the class whose @@ -14110,7 +14128,7 @@ module MutRecBindingChecking = let unsolvedTypars = freeInTypesLeftToRight g true allTypes //printfn "unsolvedTypars.Length = %d" unsolvedTypars.Length //for x in unsolvedTypars do - // printfn "unsolvedTypar : %s #%d" x.DisplayName x.Stamp + // printfn "unsolvedTypar: %s #%d" x.DisplayName x.Stamp let unsolvedTyparsInvolvingGeneralizedVariables = unsolvedTypars |> List.filter (fun tp -> let freeInTypar = (freeInType CollectAllNoCaching (mkTyparTy tp)).FreeTypars @@ -14120,11 +14138,11 @@ module MutRecBindingChecking = freeInTypar.Exists(fun otherTypar -> genSet.Contains otherTypar)) //printfn "unsolvedTyparsInvolvingGeneralizedVariables.Length = %d" unsolvedTyparsInvolvingGeneralizedVariables.Length //for x in unsolvedTypars do - // printfn "unsolvedTyparsInvolvingGeneralizedVariable : %s #%d" x.DisplayName x.Stamp + // printfn "unsolvedTyparsInvolvingGeneralizedVariable: %s #%d" x.DisplayName x.Stamp unsolvedTyparsInvolvingGeneralizedVariables for tp in unsolvedTyparsForRecursiveBlockInvolvingGeneralizedVariables do - //printfn "solving unsolvedTyparsInvolvingGeneralizedVariable : %s #%d" tp.DisplayName tp.Stamp + //printfn "solving unsolvedTyparsInvolvingGeneralizedVariable: %s #%d" tp.DisplayName tp.Stamp if (tp.Rigidity <> TyparRigidity.Rigid) && not tp.IsSolved then ConstraintSolver.ChooseTyparSolutionAndSolve cenv.css denv tp @@ -14151,7 +14169,7 @@ module MutRecBindingChecking = let TcMutRecDefns_Phase2 cenv envInitial bindsm scopem mutRecNSInfo (envMutRec: TcEnv) (mutRecDefns: MutRecDefnsPhase2Data) = let interfacesFromTypeDefn envForTycon tyconMembersData = let (MutRecDefnsPhase2DataForTycon(_, _, declKind, tcref, _, _, declaredTyconTypars, members, _, _, _)) = tyconMembersData - let overridesOK = DeclKind.CanOverrideOrImplement(declKind) + let overridesOK = DeclKind.CanOverrideOrImplement(declKind) members |> List.collect (function | SynMemberDefn.Interface(ity, defnOpt, _) -> let _, ty = if tcref.Deref.IsExceptionDecl then [], cenv.g.exn_ty else generalizeTyconRef tcref @@ -14161,7 +14179,7 @@ let TcMutRecDefns_Phase2 cenv envInitial bindsm scopem mutRecNSInfo (envMutRec: let ity' = let envinner = AddDeclaredTypars CheckForDuplicateTypars declaredTyconTypars envForTycon - TcTypeAndRecover cenv NoNewTypars CheckCxs ItemOccurence.UseInType envinner emptyUnscopedTyparEnv ity |> fst + TcTypeAndRecover cenv NoNewTypars CheckCxs ItemOccurence.UseInType envinner emptyUnscopedTyparEnv ity |> fst if not (isInterfaceTy cenv.g ity') then errorR(Error(FSComp.SR.tcTypeIsNotInterfaceType0(), ity.Range)) if not (tcref.HasInterface cenv.g ity') then @@ -14182,10 +14200,10 @@ let TcMutRecDefns_Phase2 cenv envInitial bindsm scopem mutRecNSInfo (envMutRec: | _ -> []) - let interfaceMembersFromTypeDefn tyconMembersData (ity', defn, _) implTySet = + let interfaceMembersFromTypeDefn tyconMembersData (ity', defn, _) implTySet = let (MutRecDefnsPhase2DataForTycon(_, parent, declKind, tcref, baseValOpt, safeInitInfo, declaredTyconTypars, _, _, newslotsOK, _)) = tyconMembersData let containerInfo = ContainerInfo(parent, Some(MemberOrValContainerInfo(tcref, Some(ity', implTySet), baseValOpt, safeInitInfo, declaredTyconTypars))) - defn |> List.choose (fun mem -> + defn |> List.choose (fun mem -> match mem with | SynMemberDefn.Member(_, m) -> Some(TyconBindingDefn(containerInfo, newslotsOK, declKind, mem, m)) | SynMemberDefn.AutoProperty(_, _, _, _, _, _, _, _, _, _, m) -> Some(TyconBindingDefn(containerInfo, newslotsOK, declKind, mem, m)) @@ -14205,13 +14223,13 @@ let TcMutRecDefns_Phase2 cenv envInitial bindsm scopem mutRecNSInfo (envMutRec: -> Some(TyconBindingDefn(containerInfo, newslotsOK, declKind, memb, memb.Range)) // Interfaces exist in the member list - handled above in interfaceMembersFromTypeDefn - | SynMemberDefn.Interface _ -> None + | SynMemberDefn.Interface _ -> None // The following should have been List.unzip out already in SplitTyconDefn | SynMemberDefn.AbstractSlot _ | SynMemberDefn.ValField _ - | SynMemberDefn.Inherit _ -> error(InternalError("Unexpected declaration element", memb.Range)) - | SynMemberDefn.NestedType _ -> error(Error(FSComp.SR.tcTypesCannotContainNestedTypes(), memb.Range))) + | SynMemberDefn.Inherit _ -> error(InternalError("Unexpected declaration element", memb.Range)) + | SynMemberDefn.NestedType _ -> error(Error(FSComp.SR.tcTypesCannotContainNestedTypes(), memb.Range))) let tpenv = emptyUnscopedTyparEnv @@ -14235,11 +14253,11 @@ let TcMutRecDefns_Phase2 cenv envInitial bindsm scopem mutRecNSInfo (envMutRec: | _ -> error(Error(FSComp.SR.tcDeclarationElementNotPermittedInAugmentation(), mem.Range)))) - let binds : MutRecDefnsPhase2Info = + let binds: MutRecDefnsPhase2Info = (envMutRec, mutRecDefns) ||> MutRecShapes.mapTyconsWithEnv (fun envForDecls tyconData -> let (MutRecDefnsPhase2DataForTycon(tyconOpt, _, declKind, tcref, _, _, declaredTyconTypars, _, _, _, fixupFinalAttrs)) = tyconData let obinds = tyconBindingsOfTypeDefn tyconData - let ibinds = + let ibinds = let intfTypes = interfacesFromTypeDefn envForDecls tyconData let slotImplSets = DispatchSlotChecking.GetSlotImplSets cenv.infoReader envForDecls.DisplayEnv false (List.map (fun (ity, _, m) -> (ity, m)) intfTypes) (intfTypes, slotImplSets) ||> List.map2 (interfaceMembersFromTypeDefn tyconData) |> List.concat @@ -14260,7 +14278,7 @@ module AddAugmentationDeclarations = | ValueSome tcref2 when tyconRefEq g tcref2 tcref -> true | _ -> false) - let AddGenericCompareDeclarations cenv (env: TcEnv) (scSet:Set) (tycon:Tycon) = + let AddGenericCompareDeclarations cenv (env: TcEnv) (scSet: Set) (tycon: Tycon) = if AugmentWithHashCompare.TyconIsCandidateForAugmentationWithCompare cenv.g tycon && scSet.Contains tycon.Stamp then let tcref = mkLocalTyconRef tycon let tcaug = tycon.TypeContents @@ -14297,7 +14315,7 @@ module AddAugmentationDeclarations = - let AddGenericEqualityWithComparerDeclarations cenv (env: TcEnv) (seSet:Set) (tycon:Tycon) = + let AddGenericEqualityWithComparerDeclarations cenv (env: TcEnv) (seSet: Set) (tycon: Tycon) = if AugmentWithHashCompare.TyconIsCandidateForAugmentationWithEquals cenv.g tycon && seSet.Contains tycon.Stamp then let tcref = mkLocalTyconRef tycon let tcaug = tycon.TypeContents @@ -14316,19 +14334,19 @@ module AddAugmentationDeclarations = PublishValueDefn cenv env ModuleOrMemberBinding evspec3 - let AddGenericCompareBindings cenv (tycon:Tycon) = + let AddGenericCompareBindings cenv (tycon: Tycon) = if (* AugmentWithHashCompare.TyconIsCandidateForAugmentationWithCompare cenv.g tycon && *) Option.isSome tycon.GeneratedCompareToValues then AugmentWithHashCompare.MakeBindingsForCompareAugmentation cenv.g tycon else [] - let AddGenericCompareWithComparerBindings cenv (tycon:Tycon) = + let AddGenericCompareWithComparerBindings cenv (tycon: Tycon) = if (* AugmentWithHashCompare.TyconIsCandidateForAugmentationWithCompare cenv.g tycon && *) Option.isSome tycon.GeneratedCompareToWithComparerValues then (AugmentWithHashCompare.MakeBindingsForCompareWithComparerAugmentation cenv.g tycon) else [] - let AddGenericEqualityWithComparerBindings cenv (tycon:Tycon) = + let AddGenericEqualityWithComparerBindings cenv (tycon: Tycon) = if AugmentWithHashCompare.TyconIsCandidateForAugmentationWithEquals cenv.g tycon && Option.isSome tycon.GeneratedHashAndEqualsWithComparerValues then (AugmentWithHashCompare.MakeBindingsForEqualityWithComparerAugmentation cenv.g tycon) else @@ -14367,7 +14385,7 @@ module AddAugmentationDeclarations = let vspec1, vspec2 = AugmentWithHashCompare.MakeValsForEqualsAugmentation cenv.g tcref tcaug.SetEquals (mkLocalValRef vspec1, mkLocalValRef vspec2) if not tycon.IsExceptionDecl then - PublishInterface cenv env.DisplayEnv tcref m true (mkAppTy cenv.g.system_GenericIEquatable_tcref [ty]) + PublishInterface cenv env.DisplayEnv tcref m true (mkAppTy cenv.g.system_GenericIEquatable_tcref [ty]) PublishValueDefn cenv env ModuleOrMemberBinding vspec1 PublishValueDefn cenv env ModuleOrMemberBinding vspec2 AugmentWithHashCompare.MakeBindingsForEqualsAugmentation cenv.g tycon @@ -14383,7 +14401,7 @@ module TyconConstraintInference = let InferSetOfTyconsSupportingComparable cenv (denv: DisplayEnv) tyconsWithStructuralTypes = let g = cenv.g - let tab = tyconsWithStructuralTypes |> List.map (fun (tycon:Tycon, structuralTypes) -> tycon.Stamp, (tycon, structuralTypes)) |> Map.ofList + let tab = tyconsWithStructuralTypes |> List.map (fun (tycon: Tycon, structuralTypes) -> tycon.Stamp, (tycon, structuralTypes)) |> Map.ofList // Initially, assume the equality relation is available for all structural type definitions let initialAssumedTycons = @@ -14396,7 +14414,7 @@ module TyconConstraintInference = // Repeatedly eliminate structural type definitions whose structural component types no longer support // comparison. On the way record type variables which are support the comparison relation. - let rec loop (assumedTycons : Set) (assumedTypars: Set) = + let rec loop (assumedTycons: Set) (assumedTypars: Set) = let assumedTyparsAcc = ref assumedTypars // Checks if a field type supports the 'comparison' constraint based on the assumptions about the type constructors @@ -14422,7 +14440,7 @@ module TyconConstraintInference = match ty with // Look for array, UIntPtr and IntPtr types | SpecialComparableHeadType g tinst -> - tinst |> List.forall (checkIfFieldTypeSupportsComparison tycon) + tinst |> List.forall (checkIfFieldTypeSupportsComparison tycon) // Otherwise it's a nominal type | _ -> @@ -14433,7 +14451,7 @@ module TyconConstraintInference = (if initialAssumedTycons.Contains tcref.Stamp then assumedTycons.Contains tcref.Stamp else - ExistsSameHeadTypeInHierarchy g cenv.amap range0 ty g.mk_IComparable_ty || + ExistsSameHeadTypeInHierarchy g cenv.amap range0 ty g.mk_IComparable_ty || ExistsSameHeadTypeInHierarchy g cenv.amap range0 ty g.mk_IStructuralComparable_ty) && // Check it isn't ruled out by the user @@ -14442,7 +14460,7 @@ module TyconConstraintInference = // Check the structural dependencies (tinst, tcref.TyparsNoRange) ||> List.lengthsEqAndForall2 (fun ty tp -> if tp.ComparisonConditionalOn || assumedTypars.Contains tp.Stamp then - checkIfFieldTypeSupportsComparison tycon ty + checkIfFieldTypeSupportsComparison tycon ty else true) | _ -> @@ -14511,7 +14529,7 @@ module TyconConstraintInference = uneliminatedTycons /// Infer 'equality' constraints from type definitions - let InferSetOfTyconsSupportingEquatable cenv (denv: DisplayEnv) (tyconsWithStructuralTypes:(Tycon * _) list) = + let InferSetOfTyconsSupportingEquatable cenv (denv: DisplayEnv) (tyconsWithStructuralTypes:(Tycon * _) list) = let g = cenv.g let tab = tyconsWithStructuralTypes |> List.map (fun (tycon, c) -> tycon.Stamp, (tycon, c)) |> Map.ofList @@ -14527,12 +14545,12 @@ module TyconConstraintInference = // Repeatedly eliminate structural type definitions whose structural component types no longer support // equality. On the way add type variables which are support the equality relation - let rec loop (assumedTycons : Set) (assumedTypars: Set) = + let rec loop (assumedTycons: Set) (assumedTypars: Set) = let assumedTyparsAcc = ref assumedTypars // Checks if a field type supports the 'equality' constraint based on the assumptions about the type constructors // and type parameters. - let rec checkIfFieldTypeSupportsEquality (tycon:Tycon) (ty: TType) = + let rec checkIfFieldTypeSupportsEquality (tycon: Tycon) (ty: TType) = match tryDestTyparTy cenv.g ty with | ValueSome tp -> // Look for an explicit 'equality' constraint @@ -14569,7 +14587,7 @@ module TyconConstraintInference = // Check the structural dependencies (tinst, tcref.TyparsNoRange) ||> List.lengthsEqAndForall2 (fun ty tp -> if tp.EqualityConditionalOn || assumedTypars.Contains tp.Stamp then - checkIfFieldTypeSupportsEquality tycon ty + checkIfFieldTypeSupportsEquality tycon ty else true) | _ -> @@ -14648,13 +14666,13 @@ let ComputeModuleName (longPath: Ident list) = if longPath.Length <> 1 then error(Error(FSComp.SR.tcInvalidModuleName(), (List.head longPath).idRange)) longPath.Head -let CheckForDuplicateConcreteType env nm m = +let CheckForDuplicateConcreteType env nm m = let curr = GetCurrAccumulatedModuleOrNamespaceType env if Map.containsKey nm curr.AllEntitiesByCompiledAndLogicalMangledNames then // Use 'error' instead of 'errorR' here to avoid cascading errors - see bug 1177 in FSharp 1.0 error (Duplicate(FSComp.SR.tcTypeExceptionOrModule(), nm, m)) -let CheckForDuplicateModule env nm m = +let CheckForDuplicateModule env nm m = let curr = GetCurrAccumulatedModuleOrNamespaceType env if curr.ModulesAndNamespacesByDemangledName.ContainsKey(nm) then errorR (Duplicate(FSComp.SR.tcTypeOrModule(), nm, m)) @@ -14692,7 +14710,7 @@ module TcExceptionDeclarations = if not (isNil args') then errorR (Error(FSComp.SR.tcExceptionAbbreviationsShouldNotHaveArgumentList(), m)) TExnAbbrevRepr exnc - | Item.CtorGroup(_, meths) , [] -> + | Item.CtorGroup(_, meths), [] -> // REVIEW: check this really is an exception type match args' with | [] -> () @@ -14746,7 +14764,7 @@ module TcExceptionDeclarations = let TcExnDefn cenv envInitial parent (SynExceptionDefn(core, aug, m), scopem) = let binds1, exnc = TcExnDefnCore cenv envInitial parent core - let envMutRec = AddLocalExnDefnAndReport cenv.tcSink scopem (AddLocalTycons cenv.g cenv.amap scopem [exnc] envInitial) exnc + let envMutRec = AddLocalExnDefnAndReport cenv.tcSink scopem (AddLocalTycons cenv.g cenv.amap scopem [exnc] envInitial) exnc let defns = [MutRecShape.Tycon(MutRecDefnsPhase2DataForTycon(Some exnc, parent, ModuleOrMemberBinding, mkLocalEntityRef exnc, None, NoSafeInitInfo, [], aug, m, NoNewSlots, (fun () -> ())))] let binds2, envFinal = TcMutRecDefns_Phase2 cenv envInitial m scopem None envMutRec defns @@ -14757,7 +14775,7 @@ module TcExceptionDeclarations = let TcExnSignature cenv envInitial parent tpenv (SynExceptionSig(core, aug, _), scopem) = let binds, exnc = TcExnDefnCore cenv envInitial parent core - let envMutRec = AddLocalExnDefnAndReport cenv.tcSink scopem (AddLocalTycons cenv.g cenv.amap scopem [exnc] envInitial) exnc + let envMutRec = AddLocalExnDefnAndReport cenv.tcSink scopem (AddLocalTycons cenv.g cenv.amap scopem [exnc] envInitial) exnc let ecref = mkLocalEntityRef exnc let vals, _ = TcTyconMemberSpecs cenv envMutRec (ContainerInfo(parent, Some(MemberOrValContainerInfo(ecref, None, None, NoSafeInitInfo, [])))) ModuleOrMemberBinding tpenv aug binds, vals, ecref, envMutRec @@ -14781,7 +14799,7 @@ module TcExceptionDeclarations = module EstablishTypeDefinitionCores = /// Compute the mangled name of a type definition. 'doErase' is true for all type definitions except type abbreviations. - let private ComputeTyconName (longPath: Ident list, doErase:bool, typars: Typars) = + let private ComputeTyconName (longPath: Ident list, doErase: bool, typars: Typars) = if longPath.Length <> 1 then error(Error(FSComp.SR.tcInvalidTypeExtension(), longPath.Head.idRange)) let id = longPath.Head let erasedArity = @@ -14790,11 +14808,11 @@ module EstablishTypeDefinitionCores = mkSynId id.idRange (if erasedArity = 0 then id.idText else id.idText + "`" + string erasedArity) let private GetTyconAttribs g attrs = - let hasClassAttr = HasFSharpAttribute g g.attrib_ClassAttribute attrs + let hasClassAttr = HasFSharpAttribute g g.attrib_ClassAttribute attrs let hasAbstractClassAttr = HasFSharpAttribute g g.attrib_AbstractClassAttribute attrs - let hasInterfaceAttr = HasFSharpAttribute g g.attrib_InterfaceAttribute attrs - let hasStructAttr = HasFSharpAttribute g g.attrib_StructAttribute attrs - let hasMeasureAttr = HasFSharpAttribute g g.attrib_MeasureAttribute attrs + let hasInterfaceAttr = HasFSharpAttribute g g.attrib_InterfaceAttribute attrs + let hasStructAttr = HasFSharpAttribute g g.attrib_StructAttribute attrs + let hasMeasureAttr = HasFSharpAttribute g g.attrib_MeasureAttribute attrs (hasClassAttr, hasAbstractClassAttr, hasInterfaceAttr, hasStructAttr, hasMeasureAttr) //------------------------------------------------------------------------- @@ -14818,14 +14836,14 @@ module EstablishTypeDefinitionCores = else TyconInterface | k -> if hasClassAttr && not (match k with TyconClass -> true | _ -> false) || - hasMeasureAttr && not (match k with TyconClass | TyconAbbrev | TyconHiddenRepr -> true | _ -> false) || + hasMeasureAttr && not (match k with TyconClass | TyconAbbrev | TyconHiddenRepr -> true | _ -> false) || hasInterfaceAttr && not (match k with TyconInterface -> true | _ -> false) || hasStructAttr && not (match k with TyconStruct | TyconRecord | TyconUnion -> true | _ -> false) then error(Error(FSComp.SR.tcKindOfTypeSpecifiedDoesNotMatchDefinition(), m)) k - let private (|TyconCoreAbbrevThatIsReallyAUnion|_|) (hasMeasureAttr, envinner, id:Ident) synTyconRepr = + let private (|TyconCoreAbbrevThatIsReallyAUnion|_|) (hasMeasureAttr, envinner, id: Ident) synTyconRepr = match synTyconRepr with | SynTypeDefnSimpleRepr.TypeAbbrev(_, SynType.LongIdent(LongIdentWithDots([unionCaseName], _)), m) when @@ -14861,11 +14879,11 @@ module EstablishTypeDefinitionCores = errorR(Error(FSComp.SR.tcIllegalFormForExplicitTypeDeclaration(), m)) for argTys in curriedArgTys do for (argty, _) in argTys do - yield (argty , m) + yield (argty, m) | SynTypeDefnSimpleRepr.General (_, _, _, fields, _, _, implicitCtorSynPats, _) when tycon.IsFSharpStructOrEnumTycon -> // for structs for (Field(_, isStatic, _, ty, _, _, _, m)) in fields do - if not isStatic then + if not isStatic then let ty', _ = TcTypeAndRecover cenv NoNewTypars NoCheckCxs ItemOccurence.UseInType env tpenv ty yield (ty', m) @@ -14900,7 +14918,7 @@ module EstablishTypeDefinitionCores = [ for d in compDecls do match d with | MutRecShape.Tycon (MutRecDefnsPhase1DataForTycon(ComponentInfo(_, typars, _, ids, _, _, _, _), _, _, _, _, isAtOriginalTyconDefn), _) -> - if isAtOriginalTyconDefn && (TcTyparDecls cenv env typars |> List.forall (fun p -> p.Kind = TyparKind.Measure)) then + if isAtOriginalTyconDefn && (TcTyparDecls cenv env typars |> List.forall (fun p -> p.Kind = TyparKind.Measure)) then yield (List.last ids).idText | _ -> () ] |> set @@ -14950,7 +14968,7 @@ module EstablishTypeDefinitionCores = let innerTypeNames = TypeNamesInMutRecDecls cenv envForDecls decls MutRecDefnsPhase2DataForModule (mtypeAcc, mspec), (innerParent, innerTypeNames, envForDecls) - /// Establish 'type C < T1... TN > = ...' including + /// Establish 'type C < T1... TN > = ...' including /// - computing the mangled name for C /// but /// - we don't yet 'properly' establish constraints on type parameters @@ -14970,7 +14988,7 @@ module EstablishTypeDefinitionCores = // Establish the visibility of the representation, e.g. // type R = - // private { f:int } + // private { f: int } // member x.P = x.f + x.f let synVisOfRepr = match synTyconRepr with @@ -15001,7 +15019,7 @@ module EstablishTypeDefinitionCores = /// /// synTyconInfo: Syntactic AST for the name, attributes etc. of the type constructor /// synTyconRepr: Syntactic AST for the RHS of the type definition - let private TcTyconDefnCore_Phase1B_EstablishBasicKind cenv inSig envinner (MutRecDefnsPhase1DataForTycon(synTyconInfo, synTyconRepr, _, _, _, _)) (tycon:Tycon) = + let private TcTyconDefnCore_Phase1B_EstablishBasicKind cenv inSig envinner (MutRecDefnsPhase1DataForTycon(synTyconInfo, synTyconRepr, _, _, _, _)) (tycon: Tycon) = let (ComponentInfo(synAttrs, typars, _, _, _, _, _, _)) = synTyconInfo let m = tycon.Range let id = tycon.Id @@ -15031,10 +15049,10 @@ module EstablishTypeDefinitionCores = let repr = match synTyconRepr with - | SynTypeDefnSimpleRepr.Exception _ -> TNoRepr + | SynTypeDefnSimpleRepr.Exception _ -> TNoRepr | SynTypeDefnSimpleRepr.None m -> // Run InferTyconKind to raise errors on inconsistent attribute sets - InferTyconKind cenv.g (TyconHiddenRepr, attrs, [], [], inSig, true, m) |> ignore + InferTyconKind cenv.g (TyconHiddenRepr, attrs, [], [], inSig, true, m) |> ignore if not inSig && not hasMeasureAttr then errorR(Error(FSComp.SR.tcTypeRequiresDefinition(), m)) if hasMeasureAttr then @@ -15051,7 +15069,7 @@ module EstablishTypeDefinitionCores = // Note: the table of union cases is initially empty MakeUnionRepr [] - | SynTypeDefnSimpleRepr.TypeAbbrev _ -> + | SynTypeDefnSimpleRepr.TypeAbbrev _ -> // Run InferTyconKind to raise errors on inconsistent attribute sets InferTyconKind cenv.g (TyconAbbrev, attrs, [], [], inSig, true, m) |> ignore TNoRepr @@ -15065,7 +15083,7 @@ module EstablishTypeDefinitionCores = // Run InferTyconKind to raise errors on inconsistent attribute sets InferTyconKind cenv.g (TyconRecord, attrs, [], [], inSig, true, m) |> ignore // Note: the table of record fields is initially empty - TRecdRepr (MakeRecdFieldsTable []) + TRecdRepr (MakeRecdFieldsTable []) | SynTypeDefnSimpleRepr.General (kind, _, slotsigs, fields, isConcrete, _, _, _) -> let kind = InferTyconKind cenv.g (kind, attrs, slotsigs, fields, inSig, isConcrete, m) @@ -15075,10 +15093,10 @@ module EstablishTypeDefinitionCores = | _ -> let kind = match kind with - | TyconClass -> TTyconClass - | TyconInterface -> TTyconInterface - | TyconDelegate _ -> TTyconDelegate (MakeSlotSig("Invoke", cenv.g.unit_ty, [], [], [], None)) - | TyconStruct -> TTyconStruct + | TyconClass -> TTyconClass + | TyconInterface -> TTyconInterface + | TyconDelegate _ -> TTyconDelegate (MakeSlotSig("Invoke", cenv.g.unit_ty, [], [], [], None)) + | TyconStruct -> TTyconStruct | _ -> error(InternalError("should have inferred tycon kind", m)) let repr = { fsobjmodel_kind=kind @@ -15107,7 +15125,7 @@ module EstablishTypeDefinitionCores = | _ -> None /// Check whether 'type X = ABC<...>' is a generative provided type definition - let private TcTyconDefnCore_TryAsGenerateDeclaration cenv envinner tpenv (tycon:Tycon, rhsType) = + let private TcTyconDefnCore_TryAsGenerateDeclaration cenv envinner tpenv (tycon: Tycon, rhsType) = let tcref = mkLocalTyconRef tycon match TcTyconDefnCore_GetGenerateDeclaration_Rhs rhsType with @@ -15128,7 +15146,7 @@ module EstablishTypeDefinitionCores = let optGeneratedTypePath = Some (tcref.CompilationPath.MangledPath @ [ tcref.LogicalName ]) let _hasNoArgs, providedTypeAfterStaticArguments, checkTypeName = TcProvidedTypeAppToStaticConstantArgs cenv envinner optGeneratedTypePath tpenv tcrefBeforeStaticArguments args m let isGenerated = providedTypeAfterStaticArguments.PUntaint((fun st -> not st.IsErased), m) - if isGenerated then + if isGenerated then Some (tcrefBeforeStaticArguments, providedTypeAfterStaticArguments, checkTypeName, args, m) else None // The provided type (after ApplyStaticArguments) must also be marked 'IsErased=false' @@ -15140,7 +15158,7 @@ module EstablishTypeDefinitionCores = /// Check and establish a 'type X = ABC<...>' provided type definition - let private TcTyconDefnCore_Phase1C_EstablishDeclarationForGeneratedSetOfTypes cenv inSig (tycon:Tycon, rhsType:SynType, tcrefForContainer:TyconRef, theRootType:Tainted, checkTypeName, args, m) = + let private TcTyconDefnCore_Phase1C_EstablishDeclarationForGeneratedSetOfTypes cenv inSig (tycon: Tycon, rhsType: SynType, tcrefForContainer: TyconRef, theRootType: Tainted, checkTypeName, args, m) = // Explanation: We are definitely on the compilation thread here, we just have not propagated the token this far. let ctok = AssumeCompilationThreadWithoutEvidence() @@ -15276,8 +15294,8 @@ module EstablishTypeDefinitionCores = /// Establish any type abbreviations /// /// e.g. for - /// type B<'a when 'a : C> = DDD of C - /// and C = B + /// type B<'a when 'a: C> = DDD of C + /// and C = B /// /// we establish /// @@ -15297,7 +15315,7 @@ module EstablishTypeDefinitionCores = // such as 'isRefTupleTy' will return reliable results, e.g. isRefTupleTy on the /// TAST type for 'PairOfInts' will report 'true' // - let private TcTyconDefnCore_Phase1C_Phase1E_EstablishAbbreviations cenv envinner inSig tpenv pass (MutRecDefnsPhase1DataForTycon(_, synTyconRepr, _, _, _, _)) (tycon:Tycon) (attrs:Attribs) = + let private TcTyconDefnCore_Phase1C_Phase1E_EstablishAbbreviations cenv envinner inSig tpenv pass (MutRecDefnsPhase1DataForTycon(_, synTyconRepr, _, _, _, _)) (tycon: Tycon) (attrs: Attribs) = let m = tycon.Range let checkCxs = if (pass = SecondPass) then CheckCxs else NoCheckCxs let firstPass = (pass = FirstPass) @@ -15357,13 +15375,13 @@ module EstablishTypeDefinitionCores = // Third phase: check and publish the supr types. Run twice, once before constraints are established // and once after - let private TcTyconDefnCore_Phase1D_Phase1F_EstablishSuperTypesAndInterfaceTypes cenv tpenv inSig pass (envMutRec, mutRecDefns:MutRecShape<(_ * (Tycon * (Attribs * _)) option), _, _, _, _> list) = + let private TcTyconDefnCore_Phase1D_Phase1F_EstablishSuperTypesAndInterfaceTypes cenv tpenv inSig pass (envMutRec, mutRecDefns: MutRecShape<(_ * (Tycon * (Attribs * _)) option), _, _, _, _> list) = let checkCxs = if (pass = SecondPass) then CheckCxs else NoCheckCxs let firstPass = (pass = FirstPass) // Publish the immediately declared interfaces. let tyconWithImplementsL = - (envMutRec, mutRecDefns) ||> MutRecShapes.mapTyconsWithEnv (fun envinner (origInfo, tyconAndAttrsOpt) -> + (envMutRec, mutRecDefns) ||> MutRecShapes.mapTyconsWithEnv (fun envinner (origInfo, tyconAndAttrsOpt) -> match origInfo, tyconAndAttrsOpt with | (typeDefCore, _, _), Some (tycon, (attrs, _)) -> let (MutRecDefnsPhase1DataForTycon(_, synTyconRepr, explicitImplements, _, _, _)) = typeDefCore @@ -15440,7 +15458,7 @@ module EstablishTypeDefinitionCores = errorR (Error(FSComp.SR.tcStructsInterfacesEnumsDelegatesMayNotInheritFromOtherTypes(), m)) CheckSuperType cenv ty m if isTyparTy cenv.g ty then - if firstPass then + if firstPass then errorR(Error(FSComp.SR.tcCannotInheritFromVariableType(), m)) Some cenv.g.obj_ty // a "super" that is a variable type causes grief later else @@ -15466,7 +15484,7 @@ module EstablishTypeDefinitionCores = with e -> errorRecovery e m)) /// Establish the fields, dispatch slots and union cases of a type - let private TcTyconDefnCore_Phase1G_EstablishRepresentation cenv envinner tpenv inSig (MutRecDefnsPhase1DataForTycon(_, synTyconRepr, _, _, _, _)) (tycon:Tycon) (attrs:Attribs) = + let private TcTyconDefnCore_Phase1G_EstablishRepresentation cenv envinner tpenv inSig (MutRecDefnsPhase1DataForTycon(_, synTyconRepr, _, _, _, _)) (tycon: Tycon) (attrs: Attribs) = let m = tycon.Range try let id = tycon.Id @@ -15537,7 +15555,7 @@ module EstablishTypeDefinitionCores = let noSealedAttributeCheck(k) = if hasSealedAttr = Some(true) then errorR (Error(k(), m)) - let noFieldsCheck(fields':RecdField list) = + let noFieldsCheck(fields': RecdField list) = match fields' with | (rf :: _) -> errorR (Error(FSComp.SR.tcInterfaceTypesAndDelegatesCannotContainFields(), rf.Range)) | _ -> () @@ -15549,7 +15567,7 @@ module EstablishTypeDefinitionCores = // Notify the Language Service about field names in record/class declaration let ad = envinner.eAccessRights - let writeFakeRecordFieldsToSink (fields:RecdField list) = + let writeFakeRecordFieldsToSink (fields: RecdField list) = let nenv = envinner.NameEnv // Record fields should be visible from IntelliSense, so add fake names for them (similarly to "let a = ..") for fspec in fields do @@ -15601,8 +15619,8 @@ module EstablishTypeDefinitionCores = structLayoutAttributeCheck(false) noAllowNullLiteralAttributeCheck() - TcRecdUnionAndEnumDeclarations.CheckUnionCaseName cenv unionCaseName.idText unionCaseName.idRange - let unionCase = NewUnionCase unionCaseName unionCaseName.idText [] thisTy [] XmlDoc.Empty tycon.Accessibility + TcRecdUnionAndEnumDeclarations.CheckUnionCaseName cenv unionCaseName + let unionCase = NewUnionCase unionCaseName [] thisTy [] XmlDoc.Empty tycon.Accessibility writeFakeUnionCtorsToSink [ unionCase ] MakeUnionRepr [ unionCase ], None, NoSafeInitInfo @@ -15614,14 +15632,14 @@ module EstablishTypeDefinitionCores = errorR (Error(FSComp.SR.tcAbbreviatedTypesCannotBeSealed(), m)) noAbstractClassAttributeCheck() noAllowNullLiteralAttributeCheck() - if hasMeasureableAttr then + if hasMeasureableAttr then let kind = if hasMeasureAttr then TyparKind.Measure else TyparKind.Type let theTypeAbbrev, _ = TcTypeOrMeasureAndRecover (Some kind) cenv NoNewTypars CheckCxs ItemOccurence.UseInType envinner tpenv rhsType TMeasureableRepr theTypeAbbrev, None, NoSafeInitInfo // If we already computed a representation, e.g. for a generative type definition, then don't change it here. - elif (match tycon.TypeReprInfo with TNoRepr -> false | _ -> true) then - tycon.TypeReprInfo , None, NoSafeInitInfo + elif (match tycon.TypeReprInfo with TNoRepr -> false | _ -> true) then + tycon.TypeReprInfo, None, NoSafeInitInfo else TNoRepr, None, NoSafeInitInfo @@ -15649,7 +15667,7 @@ module EstablishTypeDefinitionCores = noAllowNullLiteralAttributeCheck() structLayoutAttributeCheck(true) // these are allowed for records let recdFields = TcRecdUnionAndEnumDeclarations.TcNamedFieldDecls cenv envinner innerParent false tpenv fields - recdFields |> CheckDuplicates (fun f -> f.Id) "field" |> ignore + recdFields |> CheckDuplicates (fun f -> f.Id) "field" |> ignore writeFakeRecordFieldsToSink recdFields TRecdRepr (MakeRecdFieldsTable recdFields), None, NoSafeInitInfo @@ -15678,14 +15696,14 @@ module EstablishTypeDefinitionCores = let taccess = TAccess [envinner.eAccessPath] yield NewRecdField false None id false ty false false [(*no property attributes*)] [(*no field attributes *)] XmlDoc.Empty taccess (*compiler generated:*)true ] - (userFields @ implicitStructFields) |> CheckDuplicates (fun f -> f.Id) "field" |> ignore + (userFields @ implicitStructFields) |> CheckDuplicates (fun f -> f.Id) "field" |> ignore writeFakeRecordFieldsToSink userFields let superTy = tycon.TypeContents.tcaug_super let containerInfo = TyconContainerInfo(innerParent, thisTyconRef, thisTyconRef.Typars(m), NoSafeInitInfo) let kind = InferTyconKind cenv.g (kind, attrs, slotsigs, fields, inSig, isConcrete, m) match kind with - | TyconHiddenRepr -> + | TyconHiddenRepr -> hiddenReprChecks(true) noAllowNullLiteralAttributeCheck() TNoRepr, None, NoSafeInitInfo @@ -15733,7 +15751,7 @@ module EstablishTypeDefinitionCores = noAbstractClassAttributeCheck() noFieldsCheck(userFields) let ty', _ = TcTypeAndRecover cenv NoNewTypars CheckCxs ItemOccurence.UseInType envinner tpenv ty - let _, curriedArgInfos, returnTy, _ = GetTopValTypeInCompiledForm cenv.g (arity |> TranslateTopValSynInfo m (TcAttributes cenv envinner) |> TranslatePartialArity []) ty' m + let _, curriedArgInfos, returnTy, _ = GetTopValTypeInCompiledForm cenv.g (arity |> TranslateTopValSynInfo m (TcAttributes cenv envinner) |> TranslatePartialArity []) ty' m if curriedArgInfos.Length < 1 then error(Error(FSComp.SR.tcInvalidDelegateSpecification(), m)) if curriedArgInfos.Length > 1 then error(Error(FSComp.SR.tcDelegatesCannotBeCurried(), m)) let ttps = thisTyconRef.Typars(m) @@ -15768,7 +15786,7 @@ module EstablishTypeDefinitionCores = let slots = fst (TcAndPublishValSpec (cenv, envinner, containerInfo, ModuleOrMemberBinding, Some memberFlags, tpenv, valSpfn)) // Multiple slots may be returned, e.g. for - // abstract P : int with get, set + // abstract P: int with get, set for slot in slots do yield mkLocalValRef slot ] @@ -15781,7 +15799,7 @@ module EstablishTypeDefinitionCores = TFSharpObjectRepr { fsobjmodel_kind=kind fsobjmodel_vslots= abstractSlots - fsobjmodel_rfields=MakeRecdFieldsTable (userFields @ implicitStructFields @ safeInitFields) } + fsobjmodel_rfields=MakeRecdFieldsTable (userFields @ implicitStructFields @ safeInitFields) } repr, baseValOpt, safeInitInfo | SynTypeDefnSimpleRepr.Enum (decls, m) -> @@ -15825,9 +15843,9 @@ module EstablishTypeDefinitionCores = /// Check that a set of type definitions is free of cycles in abbreviations let private TcTyconDefnCore_CheckForCyclicAbbreviations tycons = - let edgesFrom (tycon:Tycon) = + let edgesFrom (tycon: Tycon) = - let rec accInAbbrevType ty acc = + let rec accInAbbrevType ty acc = match stripTyparEqns ty with | TType_anon (_,l) | TType_tuple (_, l) -> accInAbbrevTypes l acc @@ -15836,7 +15854,7 @@ module EstablishTypeDefinitionCores = let tycon2 = tc.Deref let acc = accInAbbrevTypes tinst acc // Record immediate recursive references - if ListSet.contains (===) tycon2 tycons then + if ListSet.contains (===) tycon2 tycons then (tycon, tycon2) :: acc // Expand the representation of abbreviations elif tc.IsTypeAbbrev then @@ -15856,9 +15874,9 @@ module EstablishTypeDefinitionCores = and accInMeasure ms acc = match stripUnitEqns ms with - | Measure.Con tc when ListSet.contains (===) tc.Deref tycons -> + | Measure.Con tc when ListSet.contains (===) tc.Deref tycons -> (tycon, tc.Deref) :: acc - | Measure.Con tc when tc.IsTypeAbbrev -> + | Measure.Con tc when tc.IsTypeAbbrev -> accInMeasure (reduceTyconRefAbbrevMeasureable tc) acc | Measure.Prod (ms1, ms2) -> accInMeasure ms1 (accInMeasure ms2 acc) | Measure.Inv ms -> accInMeasure ms acc @@ -15901,15 +15919,15 @@ module EstablishTypeDefinitionCores = // // BEGIN: EARLIER COMMENT // Of course structs are not allowed to contain instance fields of their own type: - // type S = struct { field x : S } + // type S = struct { field x: S } // // In addition, see bug 3429. In the .NET IL structs are allowed to contain // static fields of their exact generic type, e.g. - // type S = struct { static field x : S } - // type S = struct { static field x : S } + // type S = struct { static field x: S } + // type S = struct { static field x: S } // but not - // type S = struct { static field x : S } - // type S = struct { static field x : S } + // type S = struct { static field x: S } + // type S = struct { static field x: S } // etc. // // Ideally structs would allow static fields of any type. However @@ -15918,7 +15936,7 @@ module EstablishTypeDefinitionCores = // END: EARLIER COMMENT // edgesFrom tycon collects (tycon, tycon2) edges, for edges as described above. - let edgesFrom (tycon:Tycon) = + let edgesFrom (tycon: Tycon) = // Record edge (tycon, tycon2), only when tycon2 is an "initial" tycon. let insertEdgeToTycon tycon2 acc = if ListSet.contains (===) tycon2 tycons && // note: only add if tycon2 is initial @@ -15934,7 +15952,7 @@ module EstablishTypeDefinitionCores = acc // collect edges from an a struct field (which is struct-contained in tycon) - let rec accStructField (structTycon:Tycon) structTyInst (fspec:RecdField) (doneTypes, acc) = + let rec accStructField (structTycon: Tycon) structTyInst (fspec: RecdField) (doneTypes, acc) = let fieldTy = actualTyOfRecdFieldForTycon structTycon structTyInst fspec accStructFieldType structTycon structTyInst fspec fieldTy (doneTypes, acc) @@ -15942,7 +15960,7 @@ module EstablishTypeDefinitionCores = and accStructFieldType structTycon structTyInst fspec fieldTy (doneTypes, acc) = let fieldTy = stripTyparEqns fieldTy match fieldTy with - | TType_app (tcref2 , tinst2) when tcref2.IsStructOrEnumTycon -> + | TType_app (tcref2, tinst2) when tcref2.IsStructOrEnumTycon -> // The field is a struct. // An edge (tycon, tycon2) should be recorded, unless it is the "static self-typed field" case. let tycon2 = tcref2.Deref @@ -15962,14 +15980,14 @@ module EstablishTypeDefinitionCores = else let acc = insertEdgeToTycon tycon2 acc // collect edge (tycon, tycon2), if tycon2 is initial. accStructInstanceFields fieldTy tycon2 tinst2 (doneTypes, acc) // recurse through struct field looking for more edges - | TType_app (tcref2 , tinst2) when tcref2.IsTypeAbbrev -> + | TType_app (tcref2, tinst2) when tcref2.IsTypeAbbrev -> // The field is a type abbreviation. Expand and repeat. accStructFieldType structTycon structTyInst fspec (reduceTyconRefAbbrev tcref2 tinst2) (doneTypes, acc) | _ -> doneTypes, acc // collect edges from the fields of a given struct type. - and accStructFields includeStaticFields ty (structTycon:Tycon) tinst (doneTypes, acc) = + and accStructFields includeStaticFields ty (structTycon: Tycon) tinst (doneTypes, acc) = if List.exists (typeEquiv cenv.g ty) doneTypes then // This type (type instance) has been seen before, so no need to collect the same edges again (and avoid loops!) doneTypes, acc @@ -15979,7 +15997,7 @@ module EstablishTypeDefinitionCores = let fspecs = if structTycon.IsUnionTycon then [ for uc in structTycon.UnionCasesArray do - for c in uc.FieldTable.FieldsByIndex do + for c in uc.FieldTable.FieldsByIndex do yield c] else structTycon.AllFieldsAsList @@ -15987,7 +16005,7 @@ module EstablishTypeDefinitionCores = let doneTypes, acc = List.foldBack (accStructField structTycon tinst) fspecs (doneTypes, acc) doneTypes, acc and accStructInstanceFields ty structTycon tinst (doneTypes, acc) = accStructFields false ty structTycon tinst (doneTypes, acc) - and accStructAllFields ty (structTycon: Tycon) tinst (doneTypes, acc) = accStructFields true ty structTycon tinst (doneTypes, acc) + and accStructAllFields ty (structTycon: Tycon) tinst (doneTypes, acc) = accStructFields true ty structTycon tinst (doneTypes, acc) let acc = [] let acc = @@ -16020,21 +16038,21 @@ module EstablishTypeDefinitionCores = let TcMutRecDefns_CheckExplicitConstraints cenv tpenv m checkCxs envMutRecPrelim withEnvs = (envMutRecPrelim, withEnvs) ||> MutRecShapes.iterTyconsWithEnv (fun envForDecls (origInfo, tyconOpt) -> match origInfo, tyconOpt with - | (typeDefCore, _, _), Some (tycon:Tycon) -> + | (typeDefCore, _, _), Some (tycon: Tycon) -> let (MutRecDefnsPhase1DataForTycon(synTyconInfo, _, _, _, _, _)) = typeDefCore let (ComponentInfo(_, _, synTyconConstraints, _, _, _, _, _)) = synTyconInfo let envForTycon = AddDeclaredTypars CheckForDuplicateTypars (tycon.Typars(m)) envForDecls let thisTyconRef = mkLocalTyconRef tycon let envForTycon = MakeInnerEnvForTyconRef envForTycon thisTyconRef false - try TcTyparConstraints cenv NoNewTypars checkCxs ItemOccurence.UseInType envForTycon tpenv synTyconConstraints |> ignore + try TcTyparConstraints cenv NoNewTypars checkCxs ItemOccurence.UseInType envForTycon tpenv synTyconConstraints |> ignore with e -> errorRecovery e m | _ -> ()) - let TcMutRecDefns_Phase1 mkLetInfo cenv envInitial parent typeNames inSig tpenv m scopem mutRecNSInfo (mutRecDefns:MutRecShapes) = + let TcMutRecDefns_Phase1 mkLetInfo cenv envInitial parent typeNames inSig tpenv m scopem mutRecNSInfo (mutRecDefns: MutRecShapes) = // Phase1A - build Entity for type definitions, exception definitions and module definitions. - // Also for abbreviations of any of these. Augmentations are skipped in this phase. + // Also for abbreviations of any of these. Augmentations are skipped in this phase. let withEntities = mutRecDefns |> MutRecShapes.mapWithParent @@ -16071,7 +16089,7 @@ module EstablishTypeDefinitionCores = // Publish tycons (envTmp, withEnvs) ||> MutRecShapes.iterTyconsWithEnv - (fun envAbove (_, tyconOpt) -> + (fun envAbove (_, tyconOpt) -> tyconOpt |> Option.iter (fun tycon -> // recheck these in case type is a duplicate in a mutually recursive set CheckForDuplicateConcreteType envAbove tycon.LogicalName tycon.Range @@ -16085,7 +16103,7 @@ module EstablishTypeDefinitionCores = // Add the types to the environment. This does not add the fields and union cases (because we haven't established them yet). // We re-add them to the original environment later on. We don't report them to the Language Service yet as we don't know if // they are well-formed (e.g. free of abbreviation cycles) - let envMutRecPrelim, withEnvs = (envInitial, withEntities) ||> MutRecBindingChecking.TcMutRecDefns_ComputeEnvs snd (fun _ -> []) cenv false scopem m + let envMutRecPrelim, withEnvs = (envInitial, withEntities) ||> MutRecBindingChecking.TcMutRecDefns_ComputeEnvs snd (fun _ -> []) cenv false scopem m // Phase 1B. Establish the kind of each type constructor // Here we run InferTyconKind and record partial information about the kind of the type constructor. @@ -16099,7 +16117,7 @@ module EstablishTypeDefinitionCores = origInfo, res) // Phase 1C. Establish the abbreviations (no constraint checking, because constraints not yet established) - (envMutRecPrelim, withAttrs) ||> MutRecShapes.iterTyconsWithEnv (fun envForDecls (origInfo, tyconAndAttrsOpt) -> + (envMutRecPrelim, withAttrs) ||> MutRecShapes.iterTyconsWithEnv (fun envForDecls (origInfo, tyconAndAttrsOpt) -> match origInfo, tyconAndAttrsOpt with | (typeDefCore, _, _), Some (tycon, (attrs, _)) -> TcTyconDefnCore_Phase1C_Phase1E_EstablishAbbreviations cenv envForDecls inSig tpenv FirstPass typeDefCore tycon attrs | _ -> ()) @@ -16109,7 +16127,7 @@ module EstablishTypeDefinitionCores = TcTyconDefnCore_CheckForCyclicAbbreviations tycons - // Phase 1D. Establish the super type and interfaces (no constraint checking, because constraints not yet established) + // Phase 1D. Establish the super type and interfaces (no constraint checking, because constraints not yet established) (envMutRecPrelim, withAttrs) |> TcTyconDefnCore_Phase1D_Phase1F_EstablishSuperTypesAndInterfaceTypes cenv tpenv inSig FirstPass // Interlude between Phase1D and Phase1E - Add the interface and member declarations for @@ -16140,7 +16158,7 @@ module EstablishTypeDefinitionCores = tyconOpt |> Option.iter (fun tycon -> tycon.Typars(m) |> List.iter (SetTyparRigid cenv.g envForDecls.DisplayEnv m))) // Phase1E. OK, now recheck the abbreviations, super/interface and explicit constraints types (this time checking constraints) - (envMutRecPrelim, withAttrs) ||> MutRecShapes.iterTyconsWithEnv (fun envForDecls (origInfo, tyconAndAttrsOpt) -> + (envMutRecPrelim, withAttrs) ||> MutRecShapes.iterTyconsWithEnv (fun envForDecls (origInfo, tyconAndAttrsOpt) -> match origInfo, tyconAndAttrsOpt with | (typeDefCore, _, _), Some (tycon, (attrs, _)) -> TcTyconDefnCore_Phase1C_Phase1E_EstablishAbbreviations cenv envForDecls inSig tpenv SecondPass typeDefCore tycon attrs | _ -> ()) @@ -16154,8 +16172,8 @@ module EstablishTypeDefinitionCores = let envMutRecPrelim, withAttrs = (envMutRecPrelim, withAttrs) ||> MutRecShapes.extendEnvs (fun envForDecls decls -> - let tycons = decls |> List.choose (function MutRecShape.Tycon (_, Some (tycon, _)) -> Some tycon | _ -> None) - let exns = tycons |> List.filter (fun tycon -> tycon.IsExceptionDecl) + let tycons = decls |> List.choose (function MutRecShape.Tycon (_, Some (tycon, _)) -> Some tycon | _ -> None) + let exns = tycons |> List.filter (fun tycon -> tycon.IsExceptionDecl) let envForDecls = (envForDecls, exns) ||> List.fold (AddLocalExnDefnAndReport cenv.tcSink scopem) envForDecls) @@ -16189,7 +16207,7 @@ module TcDeclarations = /// Given a type definition, compute whether its members form an extension of an existing type, and if so if it is an /// intrinsic or extrinsic extension - let private ComputeTyconDeclKind tyconOpt isAtOriginalTyconDefn cenv envForDecls inSig m (synTypars:SynTyparDecl list) synTyparCxs longPath = + let private ComputeTyconDeclKind tyconOpt isAtOriginalTyconDefn cenv envForDecls inSig m (synTypars: SynTyparDecl list) synTyparCxs longPath = let ad = envForDecls.eAccessRights let tcref = @@ -16265,15 +16283,15 @@ module TcDeclarations = let private isAugmentationTyconDefnRepr = function (SynTypeDefnSimpleRepr.General(TyconAugmentation, _, _, _, _, _, _, _)) -> true | _ -> false - let private isAutoProperty = function SynMemberDefn.AutoProperty _ -> true | _ -> false - let private isMember = function SynMemberDefn.Member _ -> true | _ -> false - let private isImplicitCtor = function SynMemberDefn.ImplicitCtor _ -> true | _ -> false + let private isAutoProperty = function SynMemberDefn.AutoProperty _ -> true | _ -> false + let private isMember = function SynMemberDefn.Member _ -> true | _ -> false + let private isImplicitCtor = function SynMemberDefn.ImplicitCtor _ -> true | _ -> false let private isImplicitInherit = function SynMemberDefn.ImplicitInherit _ -> true | _ -> false - let private isAbstractSlot = function SynMemberDefn.AbstractSlot _ -> true | _ -> false - let private isInterface = function SynMemberDefn.Interface _ -> true | _ -> false - let private isInherit = function SynMemberDefn.Inherit _ -> true | _ -> false - let private isField = function SynMemberDefn.ValField (_, _) -> true | _ -> false - let private isTycon = function SynMemberDefn.NestedType _ -> true | _ -> false + let private isAbstractSlot = function SynMemberDefn.AbstractSlot _ -> true | _ -> false + let private isInterface = function SynMemberDefn.Interface _ -> true | _ -> false + let private isInherit = function SynMemberDefn.Inherit _ -> true | _ -> false + let private isField = function SynMemberDefn.ValField (_, _) -> true | _ -> false + let private isTycon = function SynMemberDefn.NestedType _ -> true | _ -> false let private allFalse ps x = List.forall (fun p -> not (p x)) ps @@ -16306,30 +16324,30 @@ module TcDeclarations = let _, ds = ds |> List.takeUntil (allFalse [isMember;isAbstractSlot;isInterface;isAutoProperty]) match ds with - | SynMemberDefn.Member (_, m) :: _ -> errorR(InternalError("List.takeUntil is wrong, have binding", m)) - | SynMemberDefn.AbstractSlot (_, _, m) :: _ -> errorR(InternalError("List.takeUntil is wrong, have slotsig", m)) - | SynMemberDefn.Interface (_, _, m) :: _ -> errorR(InternalError("List.takeUntil is wrong, have interface", m)) - | SynMemberDefn.ImplicitCtor (_, _, _, _, m) :: _ -> errorR(InternalError("implicit class construction with two implicit constructions", m)) + | SynMemberDefn.Member (_, m) :: _ -> errorR(InternalError("List.takeUntil is wrong, have binding", m)) + | SynMemberDefn.AbstractSlot (_, _, m) :: _ -> errorR(InternalError("List.takeUntil is wrong, have slotsig", m)) + | SynMemberDefn.Interface (_, _, m) :: _ -> errorR(InternalError("List.takeUntil is wrong, have interface", m)) + | SynMemberDefn.ImplicitCtor (_, _, _, _, m) :: _ -> errorR(InternalError("implicit class construction with two implicit constructions", m)) | SynMemberDefn.AutoProperty (_, _, _, _, _, _, _, _, _, _, m) :: _ -> errorR(InternalError("List.takeUntil is wrong, have auto property", m)) | SynMemberDefn.ImplicitInherit (_, _, _, m) :: _ -> errorR(Error(FSComp.SR.tcTypeDefinitionsWithImplicitConstructionMustHaveOneInherit(), m)) - | SynMemberDefn.LetBindings (_, _, _, m) :: _ -> errorR(Error(FSComp.SR.tcTypeDefinitionsWithImplicitConstructionMustHaveLocalBindingsBeforeMembers(), m)) - | SynMemberDefn.Inherit (_, _, m) :: _ -> errorR(Error(FSComp.SR.tcInheritDeclarationMissingArguments(), m)) - | SynMemberDefn.NestedType (_, _, m) :: _ -> errorR(Error(FSComp.SR.tcTypesCannotContainNestedTypes(), m)) + | SynMemberDefn.LetBindings (_, _, _, m) :: _ -> errorR(Error(FSComp.SR.tcTypeDefinitionsWithImplicitConstructionMustHaveLocalBindingsBeforeMembers(), m)) + | SynMemberDefn.Inherit (_, _, m) :: _ -> errorR(Error(FSComp.SR.tcInheritDeclarationMissingArguments(), m)) + | SynMemberDefn.NestedType (_, _, m) :: _ -> errorR(Error(FSComp.SR.tcTypesCannotContainNestedTypes(), m)) | _ -> () | ds -> // Classic class construction let _, ds = List.takeUntil (allFalse [isMember;isAbstractSlot;isInterface;isInherit;isField;isTycon]) ds match ds with - | SynMemberDefn.Member (_, m) :: _ -> errorR(InternalError("CheckMembersForm: List.takeUntil is wrong", m)) - | SynMemberDefn.ImplicitCtor (_, _, _, _, m) :: _ -> errorR(InternalError("CheckMembersForm: implicit ctor line should be first", m)) + | SynMemberDefn.Member (_, m) :: _ -> errorR(InternalError("CheckMembersForm: List.takeUntil is wrong", m)) + | SynMemberDefn.ImplicitCtor (_, _, _, _, m) :: _ -> errorR(InternalError("CheckMembersForm: implicit ctor line should be first", m)) | SynMemberDefn.ImplicitInherit (_, _, _, m) :: _ -> errorR(Error(FSComp.SR.tcInheritConstructionCallNotPartOfImplicitSequence(), m)) - | SynMemberDefn.AutoProperty(_, _, _, _, _, _, _, _, _, _, m) :: _ -> errorR(Error(FSComp.SR.tcAutoPropertyRequiresImplicitConstructionSequence(), m)) + | SynMemberDefn.AutoProperty(_, _, _, _, _, _, _, _, _, _, m) :: _ -> errorR(Error(FSComp.SR.tcAutoPropertyRequiresImplicitConstructionSequence(), m)) | SynMemberDefn.LetBindings (_, false, _, m) :: _ -> errorR(Error(FSComp.SR.tcLetAndDoRequiresImplicitConstructionSequence(), m)) - | SynMemberDefn.AbstractSlot (_, _, m) :: _ - | SynMemberDefn.Interface (_, _, m) :: _ - | SynMemberDefn.Inherit (_, _, m) :: _ - | SynMemberDefn.ValField (_, m) :: _ - | SynMemberDefn.NestedType (_, _, m) :: _ -> errorR(InternalError("CheckMembersForm: List.takeUntil is wrong", m)) + | SynMemberDefn.AbstractSlot (_, _, m) :: _ + | SynMemberDefn.Interface (_, _, m) :: _ + | SynMemberDefn.Inherit (_, _, m) :: _ + | SynMemberDefn.ValField (_, m) :: _ + | SynMemberDefn.NestedType (_, _, m) :: _ -> errorR(InternalError("CheckMembersForm: List.takeUntil is wrong", m)) | _ -> () @@ -16344,17 +16362,17 @@ module TcDeclarations = match trepr with | SynTypeDefnRepr.ObjectModel(kind, cspec, m) -> CheckMembersForm cspec - let fields = cspec |> List.choose (function SynMemberDefn.ValField (f, _) -> Some(f) | _ -> None) + let fields = cspec |> List.choose (function SynMemberDefn.ValField (f, _) -> Some(f) | _ -> None) let implements2 = cspec |> List.choose (function SynMemberDefn.Interface (ty, _, _) -> Some(ty, ty.Range) | _ -> None) - let inherits = cspec |> List.choose (function - | SynMemberDefn.Inherit (ty, idOpt, m) -> Some(ty, m, idOpt) + let inherits = cspec |> List.choose (function + | SynMemberDefn.Inherit (ty, idOpt, m) -> Some(ty, m, idOpt) | SynMemberDefn.ImplicitInherit (ty, _, idOpt, m) -> Some(ty, m, idOpt) | _ -> None) //let nestedTycons = cspec |> List.choose (function SynMemberDefn.NestedType (x, _, _) -> Some(x) | _ -> None) - let slotsigs = cspec |> List.choose (function SynMemberDefn.AbstractSlot (x, y, _) -> Some(x, y) | _ -> None) + let slotsigs = cspec |> List.choose (function SynMemberDefn.AbstractSlot (x, y, _) -> Some(x, y) | _ -> None) let members = - let membersIncludingAutoProps = + let membersIncludingAutoProps = cspec |> List.filter (fun memb -> match memb with | SynMemberDefn.Interface _ @@ -16364,7 +16382,7 @@ module TcDeclarations = | SynMemberDefn.AutoProperty _ | SynMemberDefn.Open _ | SynMemberDefn.ImplicitInherit _ -> true - | SynMemberDefn.NestedType (_, _, m) -> error(Error(FSComp.SR.tcTypesCannotContainNestedTypes(), m)); false + | SynMemberDefn.NestedType (_, _, m) -> error(Error(FSComp.SR.tcTypesCannotContainNestedTypes(), m)); false // covered above | SynMemberDefn.ValField _ | SynMemberDefn.Inherit _ @@ -16399,7 +16417,7 @@ module TcDeclarations = // Convert autoproperties to member bindings in the post-list let rec postAutoProps memb = match memb with - | SynMemberDefn.AutoProperty (attribs, isStatic, id, tyOpt, propKind, memberFlags, xmlDoc, access, _synExpr, mGetSetOpt, _mWholeAutoProp) -> + | SynMemberDefn.AutoProperty (attribs, isStatic, id, tyOpt, propKind, memberFlags, xmlDoc, access, _synExpr, mGetSetOpt, _mWholeAutoProp) -> let mMemberPortion = id.idRange // Only the keep the non-field-targeted attributes let attribs = attribs |> List.filter (fun a -> match a.Target with Some t when t.idText = "field" -> false | _ -> true) @@ -16472,7 +16490,7 @@ module TcDeclarations = let implicitCtorSynPats = members |> List.tryPick (function - | SynMemberDefn.ImplicitCtor (_, _, spats, _, _) -> Some spats + | SynMemberDefn.ImplicitCtor (_, _, spats, _, _) -> Some spats | _ -> None) // An ugly bit of code to pre-determine if a type has a nullary constructor, prior to establishing the @@ -16505,7 +16523,7 @@ module TcDeclarations = /// Bind a collection of mutually recursive definitions in an implementation file let TcMutRecDefinitions cenv envInitial parent typeNames tpenv m scopem mutRecNSInfo (mutRecDefns: MutRecDefnsInitialData) = - // Split the definitions into "core representations" and "members". The code to process core representations + // Split the definitions into "core representations" and "members". The code to process core representations // is shared between processing of signature files and implementation files. let mutRecDefnsAfterSplit = mutRecDefns |> MutRecShapes.mapTycons SplitTyconDefn @@ -16534,7 +16552,7 @@ module TcDeclarations = MutRecDefnsPhase2DataForTycon(tyconOpt, innerParent, declKind, tcref, baseValOpt, safeInitInfo, declaredTyconTypars, members, tyDeclRange, newslotsOK, fixupFinalAttrs)) // By now we've established the full contents of type definitions apart from their - // members and any fields determined by implicit construction. We know the kinds and + // members and any fields determined by implicit construction. We know the kinds and // representations of types and have established them as valid. // // We now reconstruct the active environments all over again - this will add the union cases and fields. @@ -16545,11 +16563,11 @@ module TcDeclarations = (envInitial, MutRecShapes.dropEnvs mutRecDefnsAfterPrep) ||> MutRecBindingChecking.TcMutRecDefns_ComputeEnvs (fun (MutRecDefnsPhase2DataForTycon(tyconOpt, _, _, _, _, _, _, _, _, _, _)) -> tyconOpt) - (fun _binds -> [ (* no values are available yet *) ]) + (fun _binds -> [ (* no values are available yet *) ]) cenv true scopem m // Check the members and decide on representations for types with implicit constructors. - let withBindings, envFinal = TcMutRecDefns_Phase2 cenv envInitial m scopem mutRecNSInfo envMutRecPrelimWithReprs withEnvs + let withBindings, envFinal = TcMutRecDefns_Phase2 cenv envInitial m scopem mutRecNSInfo envMutRecPrelimWithReprs withEnvs // Generate the hash/compare/equality bindings for all tycons. // @@ -16583,15 +16601,15 @@ module TcDeclarations = match trepr with | SynTypeDefnSigRepr.ObjectModel(kind, cspec, m) -> - let fields = cspec |> List.choose (function SynMemberSig.ValField (f, _) -> Some(f) | _ -> None) + let fields = cspec |> List.choose (function SynMemberSig.ValField (f, _) -> Some(f) | _ -> None) let implements2 = cspec |> List.choose (function SynMemberSig.Interface (ty, m) -> Some(ty, m) | _ -> None) - let inherits = cspec |> List.choose (function SynMemberSig.Inherit (ty, _) -> Some(ty, m, None) | _ -> None) + let inherits = cspec |> List.choose (function SynMemberSig.Inherit (ty, _) -> Some(ty, m, None) | _ -> None) //let nestedTycons = cspec |> List.choose (function SynMemberSig.NestedType (x, _) -> Some(x) | _ -> None) - let slotsigs = cspec |> List.choose (function SynMemberSig.Member (v, fl, _) when fl.IsDispatchSlot -> Some(v, fl) | _ -> None) - let members = cspec |> List.filter (function + let slotsigs = cspec |> List.choose (function SynMemberSig.Member (v, fl, _) when fl.IsDispatchSlot -> Some(v, fl) | _ -> None) + let members = cspec |> List.filter (function | SynMemberSig.Interface _ -> true | SynMemberSig.Member (_, memberFlags, _) when not memberFlags.IsDispatchSlot -> true - | SynMemberSig.NestedType (_, m) -> error(Error(FSComp.SR.tcTypesCannotContainNestedTypes(), m)); false + | SynMemberSig.NestedType (_, m) -> error(Error(FSComp.SR.tcTypesCannotContainNestedTypes(), m)); false | _ -> false) let isConcrete = members |> List.exists (function @@ -16606,7 +16624,7 @@ module TcDeclarations = memberFlags.MemberKind=MemberKind.Constructor && // REVIEW: This is a syntactic approximation (match valSpfn.SynType, valSpfn.SynInfo.ArgInfos with - | SynType.Fun (SynType.LongIdent (LongIdentWithDots([id], _)), _, _), [[_]] when id.idText = "unit" -> true + | SynType.Fun (SynType.LongIdent (LongIdentWithDots([id], _)), _, _), [[_]] when id.idText = "unit" -> true | _ -> false) | _ -> false) @@ -16659,7 +16677,7 @@ module TcDeclarations = /// Bind a collection of mutually recursive declarations in a signature file - let TcMutRecSignatureDecls cenv envInitial parent typeNames tpenv m scopem mutRecNSInfo (mutRecSigs:MutRecSigsInitialData) = + let TcMutRecSignatureDecls cenv envInitial parent typeNames tpenv m scopem mutRecNSInfo (mutRecSigs: MutRecSigsInitialData) = let mutRecSigsAfterSplit = mutRecSigs |> MutRecShapes.mapTycons SplitTyconSignature let _tycons, envMutRec, mutRecDefnsAfterCore = EstablishTypeDefinitionCores.TcMutRecDefns_Phase1 (fun containerInfo valDecl -> (containerInfo, valDecl)) cenv envInitial parent typeNames true tpenv m scopem mutRecNSInfo mutRecSigsAfterSplit @@ -16667,7 +16685,7 @@ module TcDeclarations = MutRecBindingChecking.TcMutRecDefns_UpdateModuleContents mutRecNSInfo mutRecDefnsAfterCore // By now we've established the full contents of type definitions apart from their - // members and any fields determined by implicit construction. We know the kinds and + // members and any fields determined by implicit construction. We know the kinds and // representations of types and have established them as valid. // // We now reconstruct the active environments all over again - this will add the union cases and fields. @@ -16678,7 +16696,7 @@ module TcDeclarations = (envInitial, MutRecShapes.dropEnvs mutRecDefnsAfterCore) ||> MutRecBindingChecking.TcMutRecDefns_ComputeEnvs (fun (_, tyconOpt, _, _) -> tyconOpt) - (fun _binds -> [ (* no values are available yet *) ]) + (fun _binds -> [ (* no values are available yet *) ]) cenv true scopem m let mutRecDefnsAfterVals = TcMutRecSignatureDecls_Phase2 cenv scopem envMutRecPrelimWithReprs withEnvs @@ -16692,7 +16710,7 @@ module TcDeclarations = // Bind module types //------------------------------------------------------------------------- -let rec TcSignatureElementNonMutRec cenv parent typeNames endm (env: TcEnv) synSigDecl : Eventually = +let rec TcSignatureElementNonMutRec cenv parent typeNames endm (env: TcEnv) synSigDecl: Eventually = eventually { try match synSigDecl with @@ -16741,7 +16759,7 @@ let rec TcSignatureElementNonMutRec cenv parent typeNames endm (env: TcEnv) synS // Now typecheck the signature, accumulating and then recording the submodule description. let id = ident (modName, id.idRange) - let mspec = NewModuleOrNamespace (Some env.eCompPath) vis id (xml.ToXmlDoc()) attribs (MaybeLazy.Strict (NewEmptyModuleOrNamespaceType modKind)) + let mspec = NewModuleOrNamespace (Some env.eCompPath) vis id (xml.ToXmlDoc()) attribs (MaybeLazy.Strict (NewEmptyModuleOrNamespaceType modKind)) let! (mtyp, _) = TcModuleOrNamespaceSignatureElementsNonMutRec cenv (Parent (mkLocalModRef mspec)) env (id, modKind, mdefs, m, xml) @@ -16867,7 +16885,7 @@ and TcSignatureElementsMutRec cenv parent typeNames endm mutRecNSInfo envInitial let scopem = (defs, endm) ||> List.foldBack (fun h m -> unionRanges h.Range m) let mutRecDefns = - let rec loop isNamespace defs : MutRecSigsInitialData = + let rec loop isNamespace defs: MutRecSigsInitialData = ((true, true), defs) ||> List.collectFold (fun (openOk, moduleAbbrevOk) def -> match def with | SynModuleSigDecl.Types (typeSpecs, _) -> @@ -16914,7 +16932,7 @@ and TcSignatureElementsMutRec cenv parent typeNames endm mutRecNSInfo envInitial -and TcModuleOrNamespaceSignatureElementsNonMutRec cenv parent env (id, modKind, defs, m:range, xml) = +and TcModuleOrNamespaceSignatureElementsNonMutRec cenv parent env (id, modKind, defs, m: range, xml) = eventually { let endm = m.EndRange // use end of range for errors @@ -16962,7 +16980,7 @@ let TcMutRecDefnsEscapeCheck (binds: MutRecShapes<_, _, _, _, _>) env = // ignore solitary '()' expressions and 'do ()' bindings, since these are allowed in namespaces // for the purposes of attaching attributes to an assembly, e.g. // namespace A.B.C -// [] +// [] // do() let CheckLetOrDoInNamespace binds m = @@ -16975,7 +16993,7 @@ let CheckLetOrDoInNamespace binds m = error(NumberedError(FSComp.SR.tcNamespaceCannotContainValues(), binds.Head.RangeOfHeadPat)) /// The non-mutually recursive case for a declaration -let rec TcModuleOrNamespaceElementNonMutRec (cenv:cenv) parent typeNames scopem env synDecl = +let rec TcModuleOrNamespaceElementNonMutRec (cenv: cenv) parent typeNames scopem env synDecl = eventually { cenv.synArgNameGenerator.Reset() let tpenv = emptyUnscopedTyparEnv @@ -17020,7 +17038,7 @@ let rec TcModuleOrNamespaceElementNonMutRec (cenv:cenv) parent typeNames scopem if letrec then let scopem = unionRanges m scopem let binds = binds |> List.map (fun bind -> RecDefnBindingInfo(containerInfo, NoNewSlots, ModuleOrMemberBinding, bind)) - let binds, env, _ = TcLetrec WarnOnOverrides cenv env tpenv (binds, m, scopem) + let binds, env, _ = TcLetrec WarnOnOverrides cenv env tpenv (binds, m, scopem) return ((fun e -> TMDefRec(true, [], binds |> List.map ModuleOrNamespaceBinding.Binding, m) :: e), []), env, env else let binds, env, _ = TcLetBindings cenv env containerInfo ModuleOrMemberBinding tpenv (binds, m, scopem) @@ -17080,7 +17098,7 @@ let rec TcModuleOrNamespaceElementNonMutRec (cenv:cenv) parent typeNames scopem // // In this case the envAtEnd is the environment at the end of this module, which doesn't contain the module definition itself // but does contain the results of all the 'open' declarations and so on. - let envAtEnd = (if isContinuingModule then envAtEnd else env) + let envAtEnd = (if isContinuingModule then envAtEnd else env) return ((fun modDefs -> modDefn :: modDefs), topAttrsNew), env, envAtEnd @@ -17168,7 +17186,7 @@ and TcModuleOrNamespaceElementsNonMutRec cenv parent typeNames endm (defsSoFar, let! firstDef', env', envAtEnd' = TcModuleOrNamespaceElementNonMutRec cenv parent typeNames scopem env firstDef // tail recursive - return! TcModuleOrNamespaceElementsNonMutRec cenv parent typeNames endm ( (firstDef' :: defsSoFar), env', envAtEnd') otherDefs + return! TcModuleOrNamespaceElementsNonMutRec cenv parent typeNames endm ( (firstDef' :: defsSoFar), env', envAtEnd') otherDefs | [] -> return List.rev defsSoFar, envAtEnd } @@ -17181,7 +17199,7 @@ and TcModuleOrNamespaceElementsMutRec cenv parent typeNames endm envInitial mutR let scopem = (defs, endm) ||> List.foldBack (fun h m -> unionRanges h.Range m) let (mutRecDefns, (_, _, synAttrs)) = - let rec loop isNamespace attrs defs : (MutRecDefnsInitialData * _) = + let rec loop isNamespace attrs defs: (MutRecDefnsInitialData * _) = ((true, true, attrs), defs) ||> List.collectFold (fun (openOk, moduleAbbrevOk, attrs) def -> match ElimModuleDoBinding def with @@ -17228,7 +17246,7 @@ and TcModuleOrNamespaceElementsMutRec cenv parent typeNames endm envInitial mutR | SynModuleDecl.DoExpr _ -> failwith "unreachable: SynModuleDecl.DoExpr - ElimModuleDoBinding" - | (SynModuleDecl.NamespaceFragment _ as d) -> error(Error(FSComp.SR.tcUnsupportedMutRecDecl(), d.Range))) + | (SynModuleDecl.NamespaceFragment _ as d) -> error(Error(FSComp.SR.tcUnsupportedMutRecDecl(), d.Range))) loop (match parent with ParentNone -> true | Parent _ -> false) [] defs @@ -17298,16 +17316,16 @@ and TcModuleOrNamespaceElements cenv parent endm env xml mutRecNSInfo defs = //-------------------------------------------------------------------------- -let ApplyAssemblyLevelAutoOpenAttributeToTcEnv g amap (ccu: CcuThunk) scopem env (p, root) = +let ApplyAssemblyLevelAutoOpenAttributeToTcEnv g amap (ccu: CcuThunk) scopem env (p, root) = let warn() = warning(Error(FSComp.SR.tcAttributeAutoOpenWasIgnored(p, ccu.AssemblyName), scopem)) env let p = splitNamespace p if isNil p then warn() else let h, t = List.frontAndBack p - let modref = mkNonLocalTyconRef (mkNonLocalEntityRef ccu (Array.ofList h)) t + let modref = mkNonLocalTyconRef (mkNonLocalEntityRef ccu (Array.ofList h)) t match modref.TryDeref with - | ValueNone -> warn() + | ValueNone -> warn() | ValueSome _ -> let openDecl = OpenDeclaration.Create ([], [modref], scopem, false) OpenModulesOrNamespaces TcResultsSink.NoSink g amap scopem root env [modref] openDecl @@ -17319,7 +17337,7 @@ let AddCcuToTcEnv(g, amap, scopem, env, assemblyName, ccu, autoOpens, internalsV // See https://fslang.uservoice.com/forums/245727-f-language/suggestions/6107641-make-microsoft-prefix-optional-when-using-core-f // "Microsoft" is opened by default in FSharp.Core let autoOpens = - let autoOpens = autoOpens |> List.map (fun p -> (p, false)) + let autoOpens = autoOpens |> List.map (fun p -> (p, false)) if ccuEq ccu g.fslibCcu then // Auto open 'Microsoft' in FSharp.Core.dll. Even when using old versions of FSharp.Core.dll that do // not have this attribute. The 'true' means 'treat all namespaces so revealed as "roots" accessible via @@ -17347,19 +17365,19 @@ type ConditionalDefines = type TopAttribs = { mainMethodAttrs: Attribs netModuleAttrs: Attribs - assemblyAttrs : Attribs } + assemblyAttrs: Attribs } let EmptyTopAttrs = { mainMethodAttrs=[] netModuleAttrs=[] - assemblyAttrs =[] } + assemblyAttrs =[] } let CombineTopAttrs topAttrs1 topAttrs2 = { mainMethodAttrs = topAttrs1.mainMethodAttrs @ topAttrs2.mainMethodAttrs - netModuleAttrs = topAttrs1.netModuleAttrs @ topAttrs2.netModuleAttrs - assemblyAttrs = topAttrs1.assemblyAttrs @ topAttrs2.assemblyAttrs } + netModuleAttrs = topAttrs1.netModuleAttrs @ topAttrs2.netModuleAttrs + assemblyAttrs = topAttrs1.assemblyAttrs @ topAttrs2.assemblyAttrs } -let rec IterTyconsOfModuleOrNamespaceType f (mty:ModuleOrNamespaceType) = +let rec IterTyconsOfModuleOrNamespaceType f (mty: ModuleOrNamespaceType) = mty.AllEntities |> QueueList.iter (fun tycon -> f tycon) mty.ModuleAndNamespaceDefinitions |> List.iter (fun v -> IterTyconsOfModuleOrNamespaceType f v.ModuleOrNamespaceType) @@ -17402,7 +17420,7 @@ let ApplyDefaults cenv g denvAtEnd m mexpr extraAttribs = let CheckValueRestriction denvAtEnd rootSigOpt implFileTypePriorToSig m = if Option.isNone rootSigOpt then - let rec check (mty:ModuleOrNamespaceType) = + let rec check (mty: ModuleOrNamespaceType) = for v in mty.AllValsAndMembers do let ftyvs = (freeInVal CollectTyparsNoCaching v).FreeTypars |> Zset.elements if (not v.IsCompilerGenerated && @@ -17449,11 +17467,11 @@ let CheckModuleSignature g cenv m denvAtEnd rootSigOpt implFileTypePriorToSig im raise (ReportedError None) // Compute the remapping from implementation to signature - let remapInfo , _ = ComputeRemappingFromInferredSignatureToExplicitSignature cenv.g implFileTypePriorToSig sigFileType + let remapInfo, _ = ComputeRemappingFromInferredSignatureToExplicitSignature cenv.g implFileTypePriorToSig sigFileType let aenv = { TypeEquivEnv.Empty with EquivTycons = TyconRefMap.OfList remapInfo.RepackagedEntities } - if not (SignatureConformance.Checker(cenv.g, cenv.amap, denv, remapInfo, true).CheckSignature aenv (mkLocalModRef implFileSpecPriorToSig) sigFileType) then ( + if not (SignatureConformance.Checker(cenv.g, cenv.amap, denv, remapInfo, true).CheckSignature aenv (mkLocalModRef implFileSpecPriorToSig) sigFileType) then ( // We can just raise 'ReportedError' since CheckModuleOrNamespace raises its own error raise (ReportedError None) ) @@ -17469,7 +17487,7 @@ let TypeCheckOneImplFile // checkForErrors: A function to help us stop reporting cascading errors (g, niceNameGen, amap, topCcu, checkForErrors, conditionalDefines, tcSink, isInternalTestSpanStackReferring) env - (rootSigOpt : ModuleOrNamespaceType option) + (rootSigOpt: ModuleOrNamespaceType option) (ParsedImplFileInput(_, isScript, qualNameOfFile, scopedPragmas, _, implFileFrags, isLastCompiland)) = eventually { @@ -17488,8 +17506,8 @@ let TypeCheckOneImplFile // REVIEW: consider checking if '_others' is empty let netModuleAttrs, _others = others |> List.partition (fun (possTargets, _) -> possTargets &&& AttributeTargets.Module <> enum 0) { mainMethodAttrs = List.map snd mainMethodAttrs - netModuleAttrs = List.map snd netModuleAttrs - assemblyAttrs = List.map snd assemblyAttrs} + netModuleAttrs = List.map snd netModuleAttrs + assemblyAttrs = List.map snd assemblyAttrs} let denvAtEnd = envAtEnd.DisplayEnv let m = qualNameOfFile.Range @@ -17552,7 +17570,7 @@ let TypeCheckOneImplFile // Warn on version attributes. topAttrs.assemblyAttrs |> List.iter (function - | Attrib(tref, _, [ AttribExpr(Expr.Const (Const.String(version), range, _), _) ] , _, _, _, _) -> + | Attrib(tref, _, [ AttribExpr(Expr.Const (Const.String(version), range, _), _) ], _, _, _, _) -> let attrName = tref.CompiledRepresentationForNamedType.FullName let isValid() = try IL.parseILVersion version |> ignore; true @@ -17572,7 +17590,7 @@ let TypeCheckOneImplFile /// Check an entire signature file -let TypeCheckOneSigFile (g, niceNameGen, amap, topCcu, checkForErrors, conditionalDefines, tcSink, isInternalTestSpanStackReferring) tcEnv (ParsedSigFileInput(_, qualNameOfFile, _, _, sigFileFrags)) = +let TypeCheckOneSigFile (g, niceNameGen, amap, topCcu, checkForErrors, conditionalDefines, tcSink, isInternalTestSpanStackReferring) tcEnv (ParsedSigFileInput(_, qualNameOfFile, _, _, sigFileFrags)) = eventually { let cenv = cenv.Create (g, false, niceNameGen, amap, topCcu, true, false, conditionalDefines, tcSink, (LightweightTcValForUsingInBuildMethodCall g), isInternalTestSpanStackReferring) let envinner, mtypeAcc = MakeInitialEnv tcEnv diff --git a/src/fcs-fable/src/fsharp/TypeRelations.fs b/src/fcs-fable/src/fsharp/TypeRelations.fs index 5b633acb50..05c016d3cf 100755 --- a/src/fcs-fable/src/fsharp/TypeRelations.fs +++ b/src/fcs-fable/src/fsharp/TypeRelations.fs @@ -13,11 +13,7 @@ open FSharp.Compiler.TcGlobals open FSharp.Compiler.Infos open FSharp.Compiler.PrettyNaming -//------------------------------------------------------------------------- -// a :> b without coercion based on finalized (no type variable) types -//------------------------------------------------------------------------- - - +/// Implements a :> b without coercion based on finalized (no type variable) types // QUERY: This relation is approximate and not part of the language specification. // // Some appropriate uses: @@ -34,15 +30,15 @@ let rec TypeDefinitelySubsumesTypeNoCoercion ndeep g amap m ty1 ty2 = else let ty1 = stripTyEqns g ty1 let ty2 = stripTyEqns g ty2 - match ty1,ty2 with - | TType_app (tc1,l1) ,TType_app (tc2,l2) when tyconRefEq g tc1 tc2 -> + match ty1, ty2 with + | TType_app (tc1, l1), TType_app (tc2, l2) when tyconRefEq g tc1 tc2 -> List.lengthsEqAndForall2 (typeEquiv g) l1 l2 - | TType_ucase (tc1,l1) ,TType_ucase (tc2,l2) when g.unionCaseRefEq tc1 tc2 -> + | TType_ucase (tc1, l1), TType_ucase (tc2, l2) when g.unionCaseRefEq tc1 tc2 -> List.lengthsEqAndForall2 (typeEquiv g) l1 l2 - | TType_tuple (tupInfo1,l1) ,TType_tuple (tupInfo2,l2) -> + | TType_tuple (tupInfo1, l1), TType_tuple (tupInfo2, l2) -> evalTupInfoIsStruct tupInfo1 = evalTupInfoIsStruct tupInfo2 && List.lengthsEqAndForall2 (typeEquiv g) l1 l2 - | TType_fun (d1,r1) ,TType_fun (d2,r2) -> + | TType_fun (d1, r1), TType_fun (d2, r2) -> typeEquiv g d1 d2 && typeEquiv g r1 r2 | TType_measure measure1, TType_measure measure2 -> measureEquiv g measure1 measure2 @@ -69,16 +65,16 @@ let rec TypesFeasiblyEquiv ndeep g amap m ty1 ty2 = if ndeep > 100 then error(InternalError("recursive class hierarchy (detected in TypeFeasiblySubsumesType), ty1 = " + (DebugPrint.showType ty1), m)); let ty1 = stripTyEqns g ty1 let ty2 = stripTyEqns g ty2 - match ty1,ty2 with + match ty1, ty2 with // QUERY: should these be false for non-equal rigid typars? warn-if-not-rigid typars? - | TType_var _ , _ + | TType_var _, _ | _, TType_var _ -> true - | TType_app (tc1,l1) ,TType_app (tc2,l2) when tyconRefEq g tc1 tc2 -> + | TType_app (tc1, l1), TType_app (tc2, l2) when tyconRefEq g tc1 tc2 -> List.lengthsEqAndForall2 (TypesFeasiblyEquiv ndeep g amap m) l1 l2 - | TType_tuple (tupInfo1, l1) ,TType_tuple (tupInfo2, l2) -> + | TType_tuple (tupInfo1, l1), TType_tuple (tupInfo2, l2) -> evalTupInfoIsStruct tupInfo1 = evalTupInfoIsStruct tupInfo2 && List.lengthsEqAndForall2 (TypesFeasiblyEquiv ndeep g amap m) l1 l2 - | TType_fun (d1,r1) ,TType_fun (d2,r2) -> + | TType_fun (d1, r1), TType_fun (d2, r2) -> (TypesFeasiblyEquiv ndeep g amap m) d1 d2 && (TypesFeasiblyEquiv ndeep g amap m) r1 r2 | TType_measure _, TType_measure _ -> true @@ -91,16 +87,16 @@ let rec TypeFeasiblySubsumesType ndeep g amap m ty1 canCoerce ty2 = if ndeep > 100 then error(InternalError("recursive class hierarchy (detected in TypeFeasiblySubsumesType), ty1 = " + (DebugPrint.showType ty1), m)) let ty1 = stripTyEqns g ty1 let ty2 = stripTyEqns g ty2 - match ty1,ty2 with + match ty1, ty2 with // QUERY: should these be false for non-equal rigid typars? warn-if-not-rigid typars? - | TType_var _ , _ | _, TType_var _ -> true + | TType_var _, _ | _, TType_var _ -> true - | TType_app (tc1,l1) ,TType_app (tc2,l2) when tyconRefEq g tc1 tc2 -> + | TType_app (tc1, l1), TType_app (tc2, l2) when tyconRefEq g tc1 tc2 -> List.lengthsEqAndForall2 (TypesFeasiblyEquiv ndeep g amap m) l1 l2 - | TType_tuple (tupInfo1,l1) ,TType_tuple (tupInfo2,l2) -> + | TType_tuple (tupInfo1, l1), TType_tuple (tupInfo2, l2) -> evalTupInfoIsStruct tupInfo1 = evalTupInfoIsStruct tupInfo2 && List.lengthsEqAndForall2 (TypesFeasiblyEquiv ndeep g amap m) l1 l2 - | TType_fun (d1,r1) ,TType_fun (d2,r2) -> + | TType_fun (d1, r1), TType_fun (d2, r2) -> (TypesFeasiblyEquiv ndeep g amap m) d1 d2 && (TypesFeasiblyEquiv ndeep g amap m) r1 r2 | TType_measure _, TType_measure _ -> true @@ -121,60 +117,60 @@ let rec TypeFeasiblySubsumesType ndeep g amap m ty1 canCoerce ty2 = /// 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) = ([],[]) +/// e.g. let ([], x) = ([], []) /// Here x gets a generalized type "list<'T>". let ChooseTyparSolutionAndRange (g: TcGlobals) amap (tp:Typar) = let m = tp.Range - let max,m = + let max, m = let initial = match tp.Kind with | TyparKind.Type -> g.obj_ty | TyparKind.Measure -> TType_measure Measure.One // Loop through the constraints computing the lub - ((initial,m), tp.Constraints) ||> List.fold (fun (maxSoFar,_) tpc -> + ((initial, m), tp.Constraints) ||> List.fold (fun (maxSoFar, _) tpc -> let join m x = if TypeFeasiblySubsumesType 0 g amap m x CanCoerce maxSoFar then maxSoFar elif TypeFeasiblySubsumesType 0 g amap m maxSoFar CanCoerce x then x - else errorR(Error(FSComp.SR.typrelCannotResolveImplicitGenericInstantiation((DebugPrint.showType x), (DebugPrint.showType maxSoFar)),m)); maxSoFar + else errorR(Error(FSComp.SR.typrelCannotResolveImplicitGenericInstantiation((DebugPrint.showType x), (DebugPrint.showType maxSoFar)), m)); maxSoFar // Don't continue if an error occurred and we set the value eagerly - if tp.IsSolved then maxSoFar,m else + if tp.IsSolved then maxSoFar, m else match tpc with - | TyparConstraint.CoercesTo(x,m) -> - join m x,m - | TyparConstraint.MayResolveMember(TTrait(_,_,_,_,_,_),m) -> - maxSoFar,m - | TyparConstraint.SimpleChoice(_,m) -> - errorR(Error(FSComp.SR.typrelCannotResolveAmbiguityInPrintf(),m)) - maxSoFar,m + | TyparConstraint.CoercesTo(x, m) -> + join m x, m + | TyparConstraint.MayResolveMember(TTrait(_, _, _, _, _, _), m) -> + maxSoFar, m + | TyparConstraint.SimpleChoice(_, m) -> + errorR(Error(FSComp.SR.typrelCannotResolveAmbiguityInPrintf(), m)) + maxSoFar, m | TyparConstraint.SupportsNull m -> - maxSoFar,m + maxSoFar, m | TyparConstraint.SupportsComparison m -> - join m g.mk_IComparable_ty,m + join m g.mk_IComparable_ty, m | TyparConstraint.SupportsEquality m -> - maxSoFar,m - | TyparConstraint.IsEnum(_,m) -> - errorR(Error(FSComp.SR.typrelCannotResolveAmbiguityInEnum(),m)) - maxSoFar,m - | TyparConstraint.IsDelegate(_,_,m) -> - errorR(Error(FSComp.SR.typrelCannotResolveAmbiguityInDelegate(),m)) - maxSoFar,m + maxSoFar, m + | TyparConstraint.IsEnum(_, m) -> + errorR(Error(FSComp.SR.typrelCannotResolveAmbiguityInEnum(), m)) + maxSoFar, m + | TyparConstraint.IsDelegate(_, _, m) -> + errorR(Error(FSComp.SR.typrelCannotResolveAmbiguityInDelegate(), m)) + maxSoFar, m | TyparConstraint.IsNonNullableStruct m -> - join m g.int_ty,m + join m g.int_ty, m | TyparConstraint.IsUnmanaged m -> - errorR(Error(FSComp.SR.typrelCannotResolveAmbiguityInUnmanaged(),m)) - maxSoFar,m + errorR(Error(FSComp.SR.typrelCannotResolveAmbiguityInUnmanaged(), m)) + maxSoFar, m | TyparConstraint.RequiresDefaultConstructor m -> - maxSoFar,m + maxSoFar, m | TyparConstraint.IsReferenceType m -> - maxSoFar,m - | TyparConstraint.DefaultsTo(_priority,_ty,m) -> - maxSoFar,m) - max,m + maxSoFar, m + | TyparConstraint.DefaultsTo(_priority, _ty, m) -> + maxSoFar, m) + max, m let ChooseTyparSolution g amap tp = - let ty,_m = ChooseTyparSolutionAndRange g amap tp + let ty, _m = ChooseTyparSolutionAndRange g amap tp if tp.Rigidity = TyparRigidity.Anon && typeEquiv g ty (TType_measure Measure.One) then - warning(Error(FSComp.SR.csCodeLessGeneric(),tp.Range)) + warning(Error(FSComp.SR.csCodeLessGeneric(), tp.Range)) ty // Solutions can, in theory, refer to each other @@ -205,7 +201,7 @@ let IterativelySubstituteTyparSolutions g tps solutions = let ChooseTyparSolutionsForFreeChoiceTypars g amap e = match e with - | Expr.TyChoose(tps,e1,_m) -> + | Expr.TyChoose(tps, e1, _m) -> /// Only make choices for variables that are actually used in the expression let ftvs = (freeInExpr CollectTyparsNoCaching e1).FreeTyvars.FreeTypars @@ -222,44 +218,44 @@ let ChooseTyparSolutionsForFreeChoiceTypars g amap e = /// Break apart lambdas. Needs ChooseTyparSolutionsForFreeChoiceTypars because it's used in /// PostTypeCheckSemanticChecks before we've eliminated these nodes. -let tryDestTopLambda g amap (ValReprInfo (tpNames,_,_) as tvd) (e,ty) = - let rec stripLambdaUpto n (e,ty) = +let tryDestTopLambda g amap (ValReprInfo (tpNames, _, _) as tvd) (e, ty) = + let rec stripLambdaUpto n (e, ty) = match e with - | Expr.Lambda (_,None,None,v,b,_,retTy) when n > 0 -> - let (vs',b',retTy') = stripLambdaUpto (n-1) (b,retTy) + | Expr.Lambda (_, None, None, v, b, _, retTy) when n > 0 -> + let (vs', b', retTy') = stripLambdaUpto (n-1) (b, retTy) (v :: vs', b', retTy') | _ -> - ([],e,ty) + ([], e, ty) - let rec startStripLambdaUpto n (e,ty) = + let rec startStripLambdaUpto n (e, ty) = match e with - | Expr.Lambda (_,ctorThisValOpt,baseValOpt,v,b,_,retTy) when n > 0 -> - let (vs',b',retTy') = stripLambdaUpto (n-1) (b,retTy) - (ctorThisValOpt,baseValOpt, (v :: vs'), b', retTy') - | Expr.TyChoose (_tps,_b,_) -> + | Expr.Lambda (_, ctorThisValOpt, baseValOpt, v, b, _, retTy) when n > 0 -> + let (vs', b', retTy') = stripLambdaUpto (n-1) (b, retTy) + (ctorThisValOpt, baseValOpt, (v :: vs'), b', retTy') + | Expr.TyChoose (_tps, _b, _) -> startStripLambdaUpto n (ChooseTyparSolutionsForFreeChoiceTypars g amap e, ty) | _ -> - (None,None,[],e,ty) + (None, None, [], e, ty) let n = tvd.NumCurriedArgs - let tps,taue,tauty = + let tps, taue, tauty = match e with - | Expr.TyLambda (_,tps,b,_,retTy) when not (isNil tpNames) -> tps,b,retTy - | _ -> [],e,ty - let ctorThisValOpt,baseValOpt,vsl,body,retTy = startStripLambdaUpto n (taue,tauty) + | Expr.TyLambda (_, tps, b, _, retTy) when not (isNil tpNames) -> tps, b, retTy + | _ -> [], e, ty + let ctorThisValOpt, baseValOpt, vsl, body, retTy = startStripLambdaUpto n (taue, tauty) if vsl.Length <> n then None else - Some (tps,ctorThisValOpt,baseValOpt,vsl,body,retTy) + Some (tps, ctorThisValOpt, baseValOpt, vsl, body, retTy) -let destTopLambda g amap topValInfo (e,ty) = - match tryDestTopLambda g amap topValInfo (e,ty) with +let destTopLambda g amap topValInfo (e, ty) = + match tryDestTopLambda g amap topValInfo (e, ty) with | None -> error(Error(FSComp.SR.typrelInvalidValue(), e.Range)) | Some res -> res let IteratedAdjustArityOfLambdaBody g arities vsl body = - (arities, vsl, ([],body)) |||> List.foldBack2 (fun arities vs (allvs,body) -> - let vs,body = AdjustArityOfLambdaBody g arities vs body + (arities, vsl, ([], body)) |||> List.foldBack2 (fun arities vs (allvs, body) -> + let vs, body = AdjustArityOfLambdaBody g arities vs body vs :: allvs, body) /// Do AdjustArityOfLambdaBody for a series of @@ -267,12 +263,12 @@ let IteratedAdjustArityOfLambdaBody g arities vsl body = /// The required iterated function arity (List.length topValInfo) must be identical /// to the iterated function arity of the input lambda (List.length vsl) let IteratedAdjustArityOfLambda g amap topValInfo e = - let tps,ctorThisValOpt,baseValOpt,vsl,body,bodyty = destTopLambda g amap topValInfo (e, tyOfExpr g e) + let tps, ctorThisValOpt, baseValOpt, vsl, body, bodyty = destTopLambda g amap topValInfo (e, tyOfExpr g e) let arities = topValInfo.AritiesOfArgs if arities.Length <> vsl.Length then errorR(InternalError(sprintf "IteratedAdjustArityOfLambda, List.length arities = %d, List.length vsl = %d" arities.Length vsl.Length, body.Range)) - let vsl,body = IteratedAdjustArityOfLambdaBody g arities vsl body - tps,ctorThisValOpt,baseValOpt,vsl,body,bodyty + let vsl, body = IteratedAdjustArityOfLambdaBody g arities vsl body + tps, ctorThisValOpt, baseValOpt, vsl, body, bodyty /// "Single Feasible Type" inference diff --git a/src/fcs-fable/src/fsharp/ast.fs b/src/fcs-fable/src/fsharp/ast.fs index dec2779856..a5068dae2d 100644 --- a/src/fcs-fable/src/fsharp/ast.fs +++ b/src/fcs-fable/src/fsharp/ast.fs @@ -45,7 +45,7 @@ type XmlDocCollector() = lazy (savedGrabPoints.ToArray() |> Array.sortWith posCompare) let savedLinesAsArray = - lazy (savedLines.ToArray() |> Array.sortWith (fun (_,p1) (_,p2) -> posCompare p1 p2)) + lazy (savedLines.ToArray() |> Array.sortWith (fun (_, p1) (_, p2) -> posCompare p1 p2)) let check() = assert (not savedLinesAsArray.IsValueCreated && "can't add more XmlDoc elements to XmlDocCollector after extracting first XmlDoc from the overall results" <> "") @@ -54,15 +54,15 @@ type XmlDocCollector() = check() savedGrabPoints.Add pos - member x.AddXmlDocLine(line,pos) = + member x.AddXmlDocLine(line, pos) = check() - savedLines.Add(line,pos) + savedLines.Add(line, pos) - member x.LinesBefore(grabPointPos) = + member x.LinesBefore(grabPointPos) = try let lines = savedLinesAsArray.Force() let grabPoints = savedGrabPointsAsArray.Force() - let firstLineIndexAfterGrabPoint = Array.findFirstIndexWhereTrue lines (fun (_,pos) -> posGeq pos grabPointPos) + let firstLineIndexAfterGrabPoint = Array.findFirstIndexWhereTrue lines (fun (_, pos) -> posGeq pos grabPointPos) let grabPointIndex = Array.findFirstIndexWhereTrue grabPoints (fun pos -> posGeq pos grabPointPos) assert (posEq grabPoints.[grabPointIndex] grabPointPos) let firstLineIndexAfterPrevGrabPoint = @@ -70,34 +70,39 @@ type XmlDocCollector() = 0 else let prevGrabPointPos = grabPoints.[grabPointIndex-1] - Array.findFirstIndexWhereTrue lines (fun (_,pos) -> posGeq pos prevGrabPointPos) + Array.findFirstIndexWhereTrue lines (fun (_, pos) -> posGeq pos prevGrabPointPos) //printfn "#lines = %d, firstLineIndexAfterPrevGrabPoint = %d, firstLineIndexAfterGrabPoint = %d" lines.Length firstLineIndexAfterPrevGrabPoint firstLineIndexAfterGrabPoint let lines = lines.[firstLineIndexAfterPrevGrabPoint..firstLineIndexAfterGrabPoint-1] |> Array.rev - if lines.Length = 0 then + if lines.Length = 0 then [| |] else let firstLineNumber = (snd lines.[0]).Line - lines + lines |> Array.mapi (fun i x -> firstLineNumber - i, x) |> Array.takeWhile (fun (sequencedLineNumber, (_, pos)) -> sequencedLineNumber = pos.Line) |> Array.map (fun (_, (lineStr, _)) -> lineStr) |> Array.rev - with e -> + with e -> //printfn "unexpected error in LinesBefore:\n%s" (e.ToString()) [| |] type XmlDoc = | XmlDoc of string[] + static member Empty = XmlDocStatics.Empty + member x.NonEmpty = (let (XmlDoc lines) = x in lines.Length <> 0) + static member Merge (XmlDoc lines) (XmlDoc lines') = XmlDoc (Array.append lines lines') + + /// This code runs for .XML generation and thus influences cross-project xmldoc tooltips; for within-project tooltips, + /// see XmlDocumentation.fs in the language service static member Process (XmlDoc lines) = - // This code runs for .XML generation and thus influences cross-project xmldoc tooltips; for within-project tooltips, see XmlDocumentation.fs in the language service - let rec processLines (lines:string list) = + let rec processLines (lines: string list) = match lines with | [] -> [] - | (lineA::rest) as lines -> + | (lineA:: rest) as lines -> let lineAT = lineA.TrimStart([|' '|]) if lineAT = "" then processLines rest else if lineAT.StartsWithOrdinal("<") then lines @@ -111,7 +116,9 @@ type XmlDoc = // Discriminated unions can't contain statics, so we use a separate type and XmlDocStatics() = + static let empty = XmlDoc[| |] + static member Empty = empty type PreXmlDoc = @@ -121,19 +128,20 @@ type PreXmlDoc = member x.ToXmlDoc() = match x with - | PreXmlMerge(a,b) -> XmlDoc.Merge (a.ToXmlDoc()) (b.ToXmlDoc()) + | PreXmlMerge(a, b) -> XmlDoc.Merge (a.ToXmlDoc()) (b.ToXmlDoc()) | PreXmlDocEmpty -> XmlDoc.Empty - | PreXmlDoc (pos,collector) -> + | PreXmlDoc (pos, collector) -> let lines = collector.LinesBefore pos if lines.Length = 0 then XmlDoc.Empty else XmlDoc lines - static member CreateFromGrabPoint(collector:XmlDocCollector,grabPointPos) = + static member CreateFromGrabPoint(collector: XmlDocCollector, grabPointPos) = collector.AddGrabPoint grabPointPos - PreXmlDoc(grabPointPos,collector) + PreXmlDoc(grabPointPos, collector) static member Empty = PreXmlDocEmpty - static member Merge a b = PreXmlMerge (a,b) + + static member Merge a b = PreXmlMerge (a, b) type ParserDetail = | Ok @@ -161,25 +169,25 @@ type LongIdentWithDots = /// if dotms.Length = lid.Length, then the parser must have reported an error, so the typechecker is allowed /// more freedom about typechecking these expressions. /// LongIdent can be empty list - it is used to denote that name of some AST element is absent (i.e. empty type name in inherit) - | LongIdentWithDots of id:LongIdent * dotms:range list + | LongIdentWithDots of id: LongIdent * dotms: range list member this.Range = match this with - | LongIdentWithDots([],_) -> failwith "rangeOfLidwd" - | LongIdentWithDots([id],[]) -> id.idRange - | LongIdentWithDots([id],[m]) -> unionRanges id.idRange m - | LongIdentWithDots(h::t,[]) -> unionRanges h.idRange (List.last t).idRange - | LongIdentWithDots(h::t,dotms) -> unionRanges h.idRange (List.last t).idRange |> unionRanges (List.last dotms) + | LongIdentWithDots([], _) -> failwith "rangeOfLidwd" + | LongIdentWithDots([id], []) -> id.idRange + | LongIdentWithDots([id], [m]) -> unionRanges id.idRange m + | LongIdentWithDots(h::t, []) -> unionRanges h.idRange (List.last t).idRange + | LongIdentWithDots(h::t, dotms) -> unionRanges h.idRange (List.last t).idRange |> unionRanges (List.last dotms) - member this.Lid = match this with LongIdentWithDots(lid,_) -> lid + member this.Lid = match this with LongIdentWithDots(lid, _) -> lid - member this.ThereIsAnExtraDotAtTheEnd = match this with LongIdentWithDots(lid,dots) -> lid.Length = dots.Length + member this.ThereIsAnExtraDotAtTheEnd = match this with LongIdentWithDots(lid, dots) -> lid.Length = dots.Length member this.RangeSansAnyExtraDot = match this with - | LongIdentWithDots([],_) -> failwith "rangeOfLidwd" - | LongIdentWithDots([id],_) -> id.idRange - | LongIdentWithDots(h::t,dotms) -> + | LongIdentWithDots([], _) -> failwith "rangeOfLidwd" + | LongIdentWithDots([id], _) -> id.idRange + | LongIdentWithDots(h::t, dotms) -> let nonExtraDots = if dotms.Length = t.Length then dotms else List.truncate t.Length dotms unionRanges h.idRange (List.last t).idRange |> unionRanges (List.last nonExtraDots) @@ -193,12 +201,12 @@ type TyparStaticReq = [] type SynTypar = - | Typar of ident:Ident * staticReq:TyparStaticReq * isCompGen:bool + | Typar of ident: Ident * staticReq: TyparStaticReq * isCompGen: bool - with member this.Range = - match this with - | Typar(id,_,_) -> - id.idRange + member this.Range = + match this with + | Typar(id, _, _) -> + id.idRange //------------------------------------------------------------------------ // AST: the grammar of constants and measures @@ -260,27 +268,27 @@ type /// UserNum(value, suffix) /// /// F# syntax: 1Q, 1Z, 1R, 1N, 1G - | UserNum of value:string * suffix:string + | UserNum of value: string * suffix: string /// F# syntax: verbatim or regular string, e.g. "abc" - | String of text:string * range:range + | String of text: string * range: range /// 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. - | Bytes of bytes:byte[] * range:range + | Bytes of bytes: byte[] * range: range /// Used internally in the typechecker once an array of unit16 constants /// is detected, to allow more efficient processing of large arrays of uint16 constants. | UInt16s of uint16[] /// Old comment: "we never iterate, so the const here is not another SynConst.Measure" - | Measure of constant:SynConst * SynMeasure + | Measure of constant: SynConst * SynMeasure member c.Range dflt = match c with - | SynConst.String (_,m0) | SynConst.Bytes (_,m0) -> m0 + | SynConst.String (_, m0) | SynConst.Bytes (_, m0) -> m0 | _ -> dflt and @@ -288,21 +296,21 @@ and /// The unchecked abstract syntax tree of F# unit of measure annotations. /// This should probably be merged with the representation of SynType. SynMeasure = - | Named of longId:LongIdent * range:range + | Named of longId: LongIdent * range: range - | Product of SynMeasure * SynMeasure * range:range + | Product of SynMeasure * SynMeasure * range: range - | Seq of SynMeasure list * range:range + | Seq of SynMeasure list * range: range - | Divide of SynMeasure * SynMeasure * range:range + | Divide of SynMeasure * SynMeasure * range: range - | Power of SynMeasure * SynRationalConst * range:range + | Power of SynMeasure * SynRationalConst * range: range | One - | Anon of range:range + | Anon of range: range - | Var of SynTypar * range:range + | Var of SynTypar * range: range and [] @@ -310,11 +318,10 @@ and SynRationalConst = | Integer of int32 - | Rational of int32 * int32 * range:range + | Rational of int32 * int32 * range: range | Negate of SynRationalConst - //------------------------------------------------------------------------ // AST: the grammar of types, expressions, declarations etc. //----------------------------------------------------------------------- @@ -339,34 +346,34 @@ type SequencePointInfoForSeq = | SuppressSequencePointOnStmtOfSequential type SequencePointInfoForTry = - | SequencePointAtTry of range:range + | SequencePointAtTry of range: range // Used for "use" and "for" | SequencePointInBodyOfTry | NoSequencePointAtTry type SequencePointInfoForWith = - | SequencePointAtWith of range:range + | SequencePointAtWith of range: range | NoSequencePointAtWith type SequencePointInfoForFinally = - | SequencePointAtFinally of range:range + | SequencePointAtFinally of range: range | NoSequencePointAtFinally type SequencePointInfoForForLoop = - | SequencePointAtForLoop of range:range + | SequencePointAtForLoop of range: range | NoSequencePointAtForLoop type SequencePointInfoForWhileLoop = - | SequencePointAtWhileLoop of range:range + | SequencePointAtWhileLoop of range: range | NoSequencePointAtWhileLoop type SequencePointInfoForBinding = - | SequencePointAtBinding of range:range + | SequencePointAtBinding of range: range // Indicates the omission of a sequence point for a binding for a 'do expr' | NoSequencePointAtDoBinding - // Indicates the omission of a sequence point for a binding for a 'let e = expr' where + // Indicates the omission of a sequence point for a binding for a 'let e = expr' where // 'expr' has immediate control flow | NoSequencePointAtLetBinding @@ -385,8 +392,8 @@ type SequencePointInfoForBinding = | NoSequencePointAtInvisibleBinding // Don't drop sequence points when combining sequence points - member x.Combine(y:SequencePointInfoForBinding) = - match x,y with + member x.Combine(y: SequencePointInfoForBinding) = + match x, y with | SequencePointAtBinding _ as g, _ -> g | _, (SequencePointAtBinding _ as g) -> g | _ -> x @@ -427,106 +434,106 @@ type [] /// Represents the explicit declaration of a type parameter SynTyparDecl = - | TyparDecl of attributes:SynAttributes * SynTypar + | TyparDecl of attributes: SynAttributes * SynTypar and [] /// The unchecked abstract syntax tree of F# type constraints SynTypeConstraint = - /// F# syntax : is 'typar : struct - | WhereTyparIsValueType of genericName:SynTypar * range:range + /// F# syntax: is 'typar: struct + | WhereTyparIsValueType of genericName: SynTypar * range: range - /// F# syntax : is 'typar : not struct - | WhereTyparIsReferenceType of genericName:SynTypar * range:range + /// F# syntax: is 'typar: not struct + | WhereTyparIsReferenceType of genericName: SynTypar * range: range - /// F# syntax is 'typar : unmanaged - | WhereTyparIsUnmanaged of genericName:SynTypar * range:range + /// F# syntax is 'typar: unmanaged + | WhereTyparIsUnmanaged of genericName: SynTypar * range: range - /// F# syntax is 'typar : null - | WhereTyparSupportsNull of genericName:SynTypar * range:range + /// F# syntax is 'typar: null + | WhereTyparSupportsNull of genericName: SynTypar * range: range - /// F# syntax is 'typar : comparison - | WhereTyparIsComparable of genericName:SynTypar * range:range + /// F# syntax is 'typar: comparison + | WhereTyparIsComparable of genericName: SynTypar * range: range - /// F# syntax is 'typar : equality - | WhereTyparIsEquatable of genericName:SynTypar * range:range + /// F# syntax is 'typar: equality + | WhereTyparIsEquatable of genericName: SynTypar * range: range - /// F# syntax is default ^T : type - | WhereTyparDefaultsToType of genericName:SynTypar * typeName:SynType * range:range + /// F# syntax is default ^T: type + | WhereTyparDefaultsToType of genericName: SynTypar * typeName: SynType * range: range /// F# syntax is 'typar :> type - | WhereTyparSubtypeOfType of genericName:SynTypar * typeName:SynType * range:range + | WhereTyparSubtypeOfType of genericName: SynTypar * typeName: SynType * range: range - /// F# syntax is ^T : (static member MemberName : ^T * int -> ^T) - | WhereTyparSupportsMember of genericNames:SynType list * memberSig:SynMemberSig * range:range + /// F# syntax is ^T: (static member MemberName: ^T * int -> ^T) + | WhereTyparSupportsMember of genericNames: SynType list * memberSig: SynMemberSig * range: range - /// F# syntax is 'typar : enum<'UnderlyingType> - | WhereTyparIsEnum of genericName:SynTypar * SynType list * range:range + /// F# syntax is 'typar: enum<'UnderlyingType> + | WhereTyparIsEnum of genericName: SynTypar * SynType list * range: range - /// F# syntax is 'typar : delegate<'Args,unit> - | WhereTyparIsDelegate of genericName:SynTypar * SynType list * range:range + /// F# syntax is 'typar: delegate<'Args, unit> + | WhereTyparIsDelegate of genericName: SynTypar * SynType list * range: range and [] /// The unchecked abstract syntax tree of F# types SynType = - /// F# syntax : A.B.C - | LongIdent of longDotId:LongIdentWithDots + /// F# syntax: A.B.C + | LongIdent of longDotId: LongIdentWithDots /// App(typeName, LESSm, typeArgs, commasm, GREATERm, isPostfix, m) /// - /// F# syntax : type or type type or (type,...,type) type - /// isPostfix: indicates a postfix type application e.g. "int list" or "(int,string) dict" + /// F# syntax: type or type type or (type, ..., type) type + /// isPostfix: indicates a postfix type application e.g. "int list" or "(int, string) dict" /// commasm: ranges for interstitial commas, these only matter for parsing/design-time tooling, the typechecker may munge/discard them - | App of typeName:SynType * LESSrange:range option * typeArgs:SynType list * commaRanges:range list * GREATERrange:range option * isPostfix:bool * range:range + | App of typeName: SynType * LESSrange: range option * typeArgs: SynType list * commaRanges: range list * GREATERrange: range option * isPostfix: bool * range: range /// LongIdentApp(typeName, longId, LESSm, tyArgs, commasm, GREATERm, wholem) /// - /// F# syntax : type.A.B.C + /// F# syntax: type.A.B.C /// commasm: ranges for interstitial commas, these only matter for parsing/design-time tooling, the typechecker may munge/discard them - | LongIdentApp of typeName:SynType * longDotId:LongIdentWithDots * LESSRange:range option * typeArgs:SynType list * commaRanges:range list * GREATERrange:range option * range:range + | LongIdentApp of typeName: SynType * longDotId: LongIdentWithDots * LESSRange: range option * typeArgs: SynType list * commaRanges: range list * GREATERrange: range option * range: range - /// F# syntax : type * ... * type - /// F# syntax : struct (type * ... * type) + /// F# syntax: type * ... * type + /// F# syntax: struct (type * ... * type) // the bool is true if / rather than * follows the type - | Tuple of isStruct:bool * typeNames:(bool*SynType) list * range:range + | Tuple of isStruct: bool * typeNames:(bool*SynType) list * range: range - /// F# syntax : {| id: type; ...; id: type |} - /// F# syntax : struct {| id: type; ...; id: type |} - | AnonRecd of isStruct:bool * typeNames:(Ident * SynType) list * range:range + /// F# syntax: {| id: type; ...; id: type |} + /// F# syntax: struct {| id: type; ...; id: type |} + | AnonRecd of isStruct: bool * typeNames:(Ident * SynType) list * range: range - /// F# syntax : type[] - | Array of int * elementType:SynType * range:range + /// F# syntax: type[] + | Array of int * elementType: SynType * range: range - /// F# syntax : type -> type - | Fun of argType:SynType * returnType:SynType * range:range + /// F# syntax: type -> type + | Fun of argType: SynType * returnType: SynType * range: range - /// F# syntax : 'Var - | Var of genericName:SynTypar * range:range + /// F# syntax: 'Var + | Var of genericName: SynTypar * range: range - /// F# syntax : _ - | Anon of range:range + /// F# syntax: _ + | Anon of range: range - /// F# syntax : typ with constraints - | WithGlobalConstraints of typeName:SynType * constraints:SynTypeConstraint list * range:range + /// F# syntax: typ with constraints + | WithGlobalConstraints of typeName: SynType * constraints: SynTypeConstraint list * range: range - /// F# syntax : #type - | HashConstraint of SynType * range:range + /// F# syntax: #type + | HashConstraint of SynType * range: range - /// F# syntax : for units of measure e.g. m / s - | MeasureDivide of dividendType:SynType * divisorType:SynType * range:range + /// F# syntax: for units of measure e.g. m / s + | MeasureDivide of dividendType: SynType * divisorType: SynType * range: range - /// F# syntax : for units of measure e.g. m^3, kg^1/2 - | MeasurePower of measureType:SynType * SynRationalConst * range:range + /// F# syntax: for units of measure e.g. m^3, kg^1/2 + | MeasurePower of measureType: SynType * SynRationalConst * range: range - /// F# syntax : 1, "abc" etc, used in parameters to type providers - /// For the dimensionless units i.e. 1 , and static parameters to provided types - | StaticConstant of constant:SynConst * range:range + /// F# syntax: 1, "abc" etc, used in parameters to type providers + /// For the dimensionless units i.e. 1, and static parameters to provided types + | StaticConstant of constant: SynConst * range: range - /// F# syntax : const expr, used in static parameters to type providers - | StaticConstantExpr of expr:SynExpr * range:range + /// F# syntax: const expr, used in static parameters to type providers + | StaticConstantExpr of expr: SynExpr * range: range - /// F# syntax : ident=1 etc., used in static parameters to type providers - | StaticConstantNamed of expr:SynType * SynType * range:range + /// F# syntax: ident=1 etc., used in static parameters to type providers + | StaticConstantNamed of expr: SynType * SynType * range: range /// Get the syntactic range of source code covered by this construct. member x.Range = @@ -556,97 +563,97 @@ and /// /// Paren(expr, leftParenRange, rightParenRange, wholeRangeIncludingParentheses) /// - /// Parenthesized expressions. Kept in AST to distinguish A.M((x,y)) - /// from A.M(x,y), among other things. - | Paren of expr:SynExpr * leftParenRange:range * rightParenRange:range option * range:range + /// Parenthesized expressions. Kept in AST to distinguish A.M((x, y)) + /// from A.M(x, y), among other things. + | Paren of expr: SynExpr * leftParenRange: range * rightParenRange: range option * range: range /// F# syntax: <@ expr @>, <@@ expr @@> /// - /// Quote(operator,isRaw,quotedSynExpr,isFromQueryExpression,m) - | Quote of operator:SynExpr * isRaw:bool * quotedSynExpr:SynExpr * isFromQueryExpression:bool * range:range + /// Quote(operator, isRaw, quotedSynExpr, isFromQueryExpression, m) + | Quote of operator: SynExpr * isRaw: bool * quotedSynExpr: SynExpr * isFromQueryExpression: bool * range: range /// F# syntax: 1, 1.3, () etc. - | Const of constant:SynConst * range:range + | Const of constant: SynConst * range: range - /// F# syntax: expr : type - | Typed of expr:SynExpr * typeName:SynType * range:range + /// F# syntax: expr: type + | Typed of expr: SynExpr * typeName: SynType * range: range /// F# syntax: e1, ..., eN - | Tuple of isStruct: bool * exprs:SynExpr list * commaRanges:range list * range:range // "range list" is for interstitial commas, these only matter for parsing/design-time tooling, the typechecker may munge/discard them + | Tuple of isStruct: bool * exprs: SynExpr list * commaRanges: range list * range: range // "range list" is for interstitial commas, these only matter for parsing/design-time tooling, the typechecker may munge/discard them /// F# syntax: {| id1=e1; ...; idN=eN |} /// F# syntax: struct {| id1=e1; ...; idN=eN |} - | AnonRecd of isStruct: bool * copyInfo:(SynExpr * BlockSeparator) option * recordFields:(Ident * SynExpr) list * range:range + | AnonRecd of isStruct: bool * copyInfo:(SynExpr * BlockSeparator) option * recordFields:(Ident * SynExpr) list * range: range /// F# syntax: [ e1; ...; en ], [| e1; ...; en |] - | ArrayOrList of isList:bool * exprs:SynExpr list * range:range + | ArrayOrList of isList: bool * exprs: SynExpr list * range: range /// F# syntax: { f1=e1; ...; fn=en } /// SynExpr.Record((baseType, baseCtorArgs, mBaseCtor, sepAfterBase, mInherits), (copyExpr, sepAfterCopyExpr), (recordFieldName, fieldValue, sepAfterField), mWholeExpr) /// 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) - | Record of baseInfo:(SynType * SynExpr * range * BlockSeparator option * range) option * copyInfo:(SynExpr * BlockSeparator) option * recordFields:(RecordFieldName * (SynExpr option) * BlockSeparator option) list * range:range + | Record of baseInfo:(SynType * SynExpr * range * BlockSeparator option * range) option * copyInfo:(SynExpr * BlockSeparator) option * recordFields:(RecordFieldName * (SynExpr option) * BlockSeparator option) list * range: range /// F# syntax: new C(...) /// The flag is true if known to be 'family' ('protected') scope - | New of isProtected:bool * typeName:SynType * expr:SynExpr * range:range + | New of isProtected: bool * typeName: SynType * expr: SynExpr * range: range - /// SynExpr.ObjExpr(objTy,argOpt,binds,extraImpls,mNewExpr,mWholeExpr) + /// SynExpr.ObjExpr(objTy, argOpt, binds, extraImpls, mNewExpr, mWholeExpr) /// /// F# syntax: { new ... with ... } - | ObjExpr of objType:SynType * argOptions:(SynExpr * Ident option) option * bindings:SynBinding list * extraImpls:SynInterfaceImpl list * newExprRange:range * range:range + | ObjExpr of objType: SynType * argOptions:(SynExpr * Ident option) option * bindings: SynBinding list * extraImpls: SynInterfaceImpl list * newExprRange: range * range: range /// F# syntax: 'while ... do ...' - | While of whileSeqPoint:SequencePointInfoForWhileLoop * whileExpr:SynExpr * doExpr:SynExpr * range:range + | While of whileSeqPoint: SequencePointInfoForWhileLoop * whileExpr: SynExpr * doExpr: SynExpr * range: range /// F# syntax: 'for i = ... to ... do ...' - | For of forSeqPoint:SequencePointInfoForForLoop * ident:Ident * identBody:SynExpr * bool * toBody:SynExpr * doBody:SynExpr * range:range + | For of forSeqPoint: SequencePointInfoForForLoop * ident: Ident * identBody: SynExpr * bool * toBody: SynExpr * doBody: SynExpr * range: range /// SynExpr.ForEach (spBind, seqExprOnly, isFromSource, pat, enumExpr, bodyExpr, mWholeExpr). /// /// F# syntax: 'for ... in ... do ...' - | ForEach of forSeqPoint:SequencePointInfoForForLoop * seqExprOnly:SeqExprOnly * isFromSource:bool * pat:SynPat * enumExpr:SynExpr * bodyExpr:SynExpr * range:range + | ForEach of forSeqPoint: SequencePointInfoForForLoop * seqExprOnly: SeqExprOnly * isFromSource: bool * pat: SynPat * enumExpr: SynExpr * bodyExpr: SynExpr * range: range /// F# syntax: [ expr ], [| expr |] - | ArrayOrListOfSeqExpr of isArray:bool * expr:SynExpr * range:range + | ArrayOrListOfSeqExpr of isArray: bool * expr: SynExpr * range: range /// CompExpr(isArrayOrList, isNotNakedRefCell, expr) /// /// F# syntax: { expr } - | CompExpr of isArrayOrList:bool * isNotNakedRefCell:bool ref * expr:SynExpr * range:range + | CompExpr of isArrayOrList: bool * isNotNakedRefCell: bool ref * expr: SynExpr * range: range /// First bool indicates if lambda originates from a method. Patterns here are always "simple" /// Second bool indicates if this is a "later" part of an iterated sequence of lambdas /// /// F# syntax: fun pat -> expr - | Lambda of fromMethod:bool * inLambdaSeq:bool * args:SynSimplePats * body:SynExpr * range:range + | Lambda of fromMethod: bool * inLambdaSeq: bool * args: SynSimplePats * body: SynExpr * range: range /// F# syntax: function pat1 -> expr | ... | patN -> exprN - | MatchLambda of isExnMatch:bool * range * SynMatchClause list * matchSeqPoint:SequencePointInfoForBinding * range:range + | MatchLambda of isExnMatch: bool * range * SynMatchClause list * matchSeqPoint: SequencePointInfoForBinding * range: range /// F# syntax: match expr with pat1 -> expr | ... | patN -> exprN - | Match of matchSeqPoint:SequencePointInfoForBinding * expr:SynExpr * clauses:SynMatchClause list * range:range (* bool indicates if this is an exception match in a computation expression which throws unmatched exceptions *) + | Match of matchSeqPoint: SequencePointInfoForBinding * expr: SynExpr * clauses: SynMatchClause list * range: range (* bool indicates if this is an exception match in a computation expression which throws unmatched exceptions *) /// F# syntax: do expr - | Do of expr:SynExpr * range:range + | Do of expr: SynExpr * range: range /// F# syntax: assert expr - | Assert of expr:SynExpr * range:range + | Assert of expr: SynExpr * range: range /// App(exprAtomicFlag, isInfix, funcExpr, argExpr, m) /// - exprAtomicFlag: 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 - /// (or more generally, for higher operator fixities, if App(x,y) is such that y comes before x in the source code, then the node is marked isInfix=true) + /// - 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 + /// (or more generally, for higher operator fixities, if App(x, y) is such that y comes before x in the source code, then the node is marked isInfix=true) /// /// F# syntax: f x - | App of ExprAtomicFlag * isInfix:bool * funcExpr:SynExpr * argExpr:SynExpr * range:range + | App of ExprAtomicFlag * isInfix: bool * funcExpr: SynExpr * argExpr: SynExpr * range: range /// TypeApp(expr, mLessThan, types, mCommas, mGreaterThan, mTypeArgs, mWholeExpr) /// "mCommas" are the ranges for interstitial commas, these only matter for parsing/design-time tooling, the typechecker may munge/discard them /// - /// F# syntax: expr - | TypeApp of expr:SynExpr * LESSrange:range * typeNames:SynType list * commaRanges:range list * GREATERrange:range option * typeArgsRange:range * range:range + /// F# syntax: expr + | TypeApp of expr: SynExpr * LESSrange: range * typeNames: SynType list * commaRanges: range list * GREATERrange: range option * typeArgsRange: range * range: range /// LetOrUse(isRecursive, isUse, bindings, body, wholeRange) /// @@ -654,146 +661,146 @@ and /// 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 - | LetOrUse of isRecursive:bool * isUse:bool * bindings:SynBinding list * body:SynExpr * range:range + | LetOrUse of isRecursive: bool * isUse: bool * bindings: SynBinding list * body: SynExpr * range: range /// F# syntax: try expr with pat -> expr - | TryWith of tryExpr:SynExpr * tryRange:range * withCases:SynMatchClause list * withRange:range * range:range * trySeqPoint:SequencePointInfoForTry * withSeqPoint:SequencePointInfoForWith + | TryWith of tryExpr: SynExpr * tryRange: range * withCases: SynMatchClause list * withRange: range * range: range * trySeqPoint: SequencePointInfoForTry * withSeqPoint: SequencePointInfoForWith /// F# syntax: try expr finally expr - | TryFinally of tryExpr:SynExpr * finallyExpr:SynExpr * range:range * trySeqPoint:SequencePointInfoForTry * finallySeqPoint:SequencePointInfoForFinally + | TryFinally of tryExpr: SynExpr * finallyExpr: SynExpr * range: range * trySeqPoint: SequencePointInfoForTry * finallySeqPoint: SequencePointInfoForFinally /// F# syntax: lazy expr - | Lazy of SynExpr * range:range + | Lazy of SynExpr * range: range /// Seq(seqPoint, isTrueSeq, e1, e2, m) /// isTrueSeq: false indicates "let v = a in b; v" /// /// F# syntax: expr; expr - | Sequential of seqPoint:SequencePointInfoForSeq * isTrueSeq:bool * expr1:SynExpr * expr2:SynExpr * range:range + | Sequential of seqPoint: SequencePointInfoForSeq * isTrueSeq: bool * expr1: SynExpr * expr2: SynExpr * range: range - /// IfThenElse(exprGuard,exprThen,optionalExprElse,spIfToThen,isFromErrorRecovery,mIfToThen,mIfToEndOfLastBranch) + /// IfThenElse(exprGuard, exprThen, optionalExprElse, spIfToThen, isFromErrorRecovery, mIfToThen, mIfToEndOfLastBranch) /// /// F# syntax: if expr then expr /// F# syntax: if expr then expr else expr - | IfThenElse of ifExpr:SynExpr * thenExpr:SynExpr * elseExpr:SynExpr option * spIfToThen:SequencePointInfoForBinding * isFromErrorRecovery:bool * ifToThenRange:range * range:range + | IfThenElse of ifExpr: SynExpr * thenExpr: SynExpr * elseExpr: SynExpr option * spIfToThen: SequencePointInfoForBinding * isFromErrorRecovery: bool * ifToThenRange: range * range: range /// F# syntax: ident - /// Optimized representation, = SynExpr.LongIdent(false,[id],id.idRange) + /// Optimized representation, = SynExpr.LongIdent(false, [id], id.idRange) | Ident of Ident /// F# syntax: ident.ident...ident /// LongIdent(isOptional, longIdent, altNameRefCell, m) /// 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 - | LongIdent of isOptional:bool * longDotId:LongIdentWithDots * altNameRefCell:SynSimplePatAlternativeIdInfo ref option * range:range + | LongIdent of isOptional: bool * longDotId: LongIdentWithDots * altNameRefCell: SynSimplePatAlternativeIdInfo ref option * range: range /// F# syntax: ident.ident...ident <- expr - | LongIdentSet of longDotId:LongIdentWithDots * expr:SynExpr * range:range + | LongIdentSet of longDotId: LongIdentWithDots * expr: SynExpr * range: range /// DotGet(expr, rangeOfDot, lid, wholeRange) /// /// F# syntax: expr.ident.ident - | DotGet of expr:SynExpr * rangeOfDot:range * longDotId:LongIdentWithDots * range:range + | DotGet of expr: SynExpr * rangeOfDot: range * longDotId: LongIdentWithDots * range: range /// F# syntax: expr.ident...ident <- expr - | DotSet of SynExpr * longDotId:LongIdentWithDots * SynExpr * range:range + | DotSet of SynExpr * longDotId: LongIdentWithDots * SynExpr * range: range /// F# syntax: expr <- expr - | Set of SynExpr * SynExpr * range:range + | Set of SynExpr * SynExpr * range: range - /// F# syntax: expr.[expr,...,expr] - | DotIndexedGet of SynExpr * SynIndexerArg list * range * range:range + /// F# syntax: expr.[expr, ..., expr] + | DotIndexedGet of SynExpr * SynIndexerArg list * range * range: range /// DotIndexedSet (objectExpr, indexExprs, valueExpr, rangeOfLeftOfSet, rangeOfDot, rangeOfWholeExpr) /// - /// F# syntax: expr.[expr,...,expr] <- expr - | DotIndexedSet of objectExpr:SynExpr * indexExprs:SynIndexerArg list * valueExpr:SynExpr * leftOfSetRange:range * dotRange:range * range:range + /// F# syntax: expr.[expr, ..., expr] <- expr + | DotIndexedSet of objectExpr: SynExpr * indexExprs: SynIndexerArg list * valueExpr: SynExpr * leftOfSetRange: range * dotRange: range * range: range - /// F# syntax: Type.Items(e1) <- e2 , rarely used named-property-setter notation, e.g. Foo.Bar.Chars(3) <- 'a' - | NamedIndexedPropertySet of longDotId:LongIdentWithDots * SynExpr * SynExpr * range:range + /// F# syntax: Type.Items(e1) <- e2, rarely used named-property-setter notation, e.g. Foo.Bar.Chars(3) <- 'a' + | NamedIndexedPropertySet of longDotId: LongIdentWithDots * SynExpr * SynExpr * range: range - /// F# syntax: expr.Items(e1) <- e2 , rarely used named-property-setter notation, e.g. (stringExpr).Chars(3) <- 'a' - | DotNamedIndexedPropertySet of SynExpr * longDotId:LongIdentWithDots * SynExpr * SynExpr * range:range + /// F# syntax: expr.Items(e1) <- e2, rarely used named-property-setter notation, e.g. (stringExpr).Chars(3) <- 'a' + | DotNamedIndexedPropertySet of SynExpr * longDotId: LongIdentWithDots * SynExpr * SynExpr * range: range /// F# syntax: expr :? type - | TypeTest of expr:SynExpr * typeName:SynType * range:range + | TypeTest of expr: SynExpr * typeName: SynType * range: range /// F# syntax: expr :> type - | Upcast of expr:SynExpr * typeName:SynType * range:range + | Upcast of expr: SynExpr * typeName: SynType * range: range /// F# syntax: expr :?> type - | Downcast of expr:SynExpr * typeName:SynType * range:range + | Downcast of expr: SynExpr * typeName: SynType * range: range /// F# syntax: upcast expr - | InferredUpcast of expr:SynExpr * range:range + | InferredUpcast of expr: SynExpr * range: range /// F# syntax: downcast expr - | InferredDowncast of expr:SynExpr * range:range + | InferredDowncast of expr: SynExpr * range: range /// F# syntax: null - | Null of range:range + | Null of range: range /// F# syntax: &expr, &&expr - | AddressOf of isByref:bool * SynExpr * range * range:range + | AddressOf of isByref: bool * SynExpr * range * range: range /// F# syntax: ((typar1 or ... or typarN): (member-dig) expr) - | TraitCall of SynTypar list * SynMemberSig * SynExpr * range:range + | TraitCall of SynTypar list * SynMemberSig * SynExpr * range: range /// F# syntax: ... in ... /// Computation expressions only, based on JOIN_IN token from lex filter - | JoinIn of SynExpr * range * SynExpr * range:range + | JoinIn of SynExpr * range * SynExpr * range: range /// F# syntax: /// Computation expressions only, implied by final "do" or "do!" - | ImplicitZero of range:range + | ImplicitZero of range: range /// F# syntax: yield expr /// F# syntax: return expr /// Computation expressions only - | YieldOrReturn of (bool * bool) * expr:SynExpr * range:range + | YieldOrReturn of (bool * bool) * expr: SynExpr * range: range /// F# syntax: yield! expr /// F# syntax: return! expr /// Computation expressions only - | YieldOrReturnFrom of (bool * bool) * expr:SynExpr * range:range + | YieldOrReturnFrom of (bool * bool) * expr: SynExpr * range: range /// SynExpr.LetOrUseBang(spBind, isUse, isFromSource, pat, rhsExpr, bodyExpr, mWholeExpr). /// /// F# syntax: let! pat = expr in expr /// F# syntax: use! pat = expr in expr /// Computation expressions only - | LetOrUseBang of bindSeqPoint:SequencePointInfoForBinding * isUse:bool * isFromSource:bool * SynPat * SynExpr * SynExpr * range:range + | LetOrUseBang of bindSeqPoint: SequencePointInfoForBinding * isUse: bool * isFromSource: bool * SynPat * SynExpr * SynExpr * range: range /// F# syntax: match! expr with pat1 -> expr | ... | patN -> exprN - | MatchBang of matchSeqPoint:SequencePointInfoForBinding * expr:SynExpr * clauses:SynMatchClause list * range:range (* bool indicates if this is an exception match in a computation expression which throws unmatched exceptions *) + | MatchBang of matchSeqPoint: SequencePointInfoForBinding * expr: SynExpr * clauses: SynMatchClause list * range: range (* bool indicates if this is an exception match in a computation expression which throws unmatched exceptions *) /// F# syntax: do! expr /// Computation expressions only - | DoBang of expr:SynExpr * range:range + | DoBang of expr: SynExpr * range: range /// Only used in FSharp.Core - | LibraryOnlyILAssembly of ILInstr array * SynType list * SynExpr list * SynType list * range:range (* Embedded IL assembly code *) + | LibraryOnlyILAssembly of ILInstr array * SynType list * SynExpr list * SynType list * range: range (* Embedded IL assembly code *) /// Only used in FSharp.Core - | LibraryOnlyStaticOptimization of SynStaticOptimizationConstraint list * SynExpr * SynExpr * range:range + | LibraryOnlyStaticOptimization of SynStaticOptimizationConstraint list * SynExpr * SynExpr * range: range /// Only used in FSharp.Core - | LibraryOnlyUnionCaseFieldGet of expr:SynExpr * longId:LongIdent * int * range:range + | LibraryOnlyUnionCaseFieldGet of expr: SynExpr * longId: LongIdent * int * range: range /// Only used in FSharp.Core - | LibraryOnlyUnionCaseFieldSet of SynExpr * longId:LongIdent * int * SynExpr * range:range + | LibraryOnlyUnionCaseFieldSet of SynExpr * longId: LongIdent * int * SynExpr * range: range /// Inserted for error recovery - | ArbitraryAfterError of debugStr:string * range:range + | ArbitraryAfterError of debugStr: string * range: range /// Inserted for error recovery - | FromParseError of expr:SynExpr * range:range + | FromParseError of expr: SynExpr * range: range /// Inserted for error recovery when there is "expr." and missing tokens or error recovery after the dot - | DiscardAfterMissingQualificationAfterDot of SynExpr * range:range + | DiscardAfterMissingQualificationAfterDot of SynExpr * range: range /// 'use x = fixed expr' - | Fixed of expr:SynExpr * range:range + | Fixed of expr: SynExpr * range: range /// Get the syntactic range of source code covered by this construct. member e.Range = @@ -919,10 +926,10 @@ and | SynExpr.LetOrUseBang (range=m) | SynExpr.MatchBang (range=m) | SynExpr.DoBang (range=m) -> m - | SynExpr.DotGet (expr,_,lidwd,m) -> if lidwd.ThereIsAnExtraDotAtTheEnd then unionRanges expr.Range lidwd.RangeSansAnyExtraDot else m - | SynExpr.LongIdent (_,lidwd,_,_) -> lidwd.RangeSansAnyExtraDot - | SynExpr.DiscardAfterMissingQualificationAfterDot (expr,_) -> expr.Range - | SynExpr.Fixed (_,m) -> m + | SynExpr.DotGet (expr, _, lidwd, m) -> if lidwd.ThereIsAnExtraDotAtTheEnd then unionRanges expr.Range lidwd.RangeSansAnyExtraDot else m + | SynExpr.LongIdent (_, lidwd, _, _) -> lidwd.RangeSansAnyExtraDot + | SynExpr.DiscardAfterMissingQualificationAfterDot (expr, _) -> expr.Range + | SynExpr.Fixed (_, m) -> m | SynExpr.Ident id -> id.idRange /// Attempt to get the range of the first token or initial portion only - this is extremely ad-hoc, just a cheap way to improve a certain 'query custom operation' error range @@ -985,16 +992,16 @@ and | SynExpr.MatchBang (range=m) | SynExpr.DoBang (range=m) -> m // these are better than just .Range, and also commonly applicable inside queries - | SynExpr.Paren(_,m,_,_) -> m - | SynExpr.Sequential (_,_,e1,_,_) - | SynExpr.App (_,_,e1,_,_) -> + | SynExpr.Paren(_, m, _, _) -> m + | SynExpr.Sequential (_, _, e1, _, _) + | SynExpr.App (_, _, e1, _, _) -> e1.RangeOfFirstPortion - | SynExpr.ForEach (_,_,_,pat,_,_,r) -> + | SynExpr.ForEach (_, _, _, pat, _, _, r) -> let start = r.Start - let e = (pat.Range : range).Start + let e = (pat.Range: range).Start mkRange r.FileName start e | SynExpr.Ident id -> id.idRange - | SynExpr.Fixed (_,m) -> m + | SynExpr.Fixed (_, m) -> m and [] @@ -1004,9 +1011,9 @@ and | One of SynExpr - member x.Range = match x with Two (e1,e2) -> unionRanges e1.Range e2.Range | One e -> e.Range + member x.Range = match x with Two (e1, e2) -> unionRanges e1.Range e2.Range | One e -> e.Range - member x.Exprs = match x with Two (e1,e2) -> [e1;e2] | One e -> [e] + member x.Exprs = match x with Two (e1, e2) -> [e1;e2] | One e -> [e] and [] @@ -1022,14 +1029,14 @@ and /// The info indicates an alternative (compiler generated) identifier to be used because the name of the identifier is already bound. /// See Product Studio FSharp 1.0, bug 6389. /// - /// isCompilerGenerated : true if a compiler generated name + /// isCompilerGenerated: true if a compiler generated name /// isThisVar: true if 'this' variable in member /// isOptArg: true if a '?' is in front of the name - | Id of ident:Ident * altNameRefCell:SynSimplePatAlternativeIdInfo ref option * isCompilerGenerated:bool * isThisVar:bool * isOptArg:bool * range:range + | Id of ident: Ident * altNameRefCell: SynSimplePatAlternativeIdInfo ref option * isCompilerGenerated: bool * isThisVar: bool * isOptArg: bool * range: range - | Typed of SynSimplePat * SynType * range:range + | Typed of SynSimplePat * SynType * range: range - | Attrib of SynSimplePat * SynAttributes * range:range + | Attrib of SynSimplePat * SynAttributes * range: range and SynSimplePatAlternativeIdInfo = @@ -1043,79 +1050,79 @@ and [] SynStaticOptimizationConstraint = - | WhenTyparTyconEqualsTycon of SynTypar * SynType * range:range + | WhenTyparTyconEqualsTycon of SynTypar * SynType * range: range - | WhenTyparIsStruct of SynTypar * range:range + | WhenTyparIsStruct of SynTypar * range: range and [] - /// Represents a simple set of variable bindings a, (a,b) or (a:Type,b:Type) at a lambda, + /// 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 ..." SynSimplePats = - | SimplePats of SynSimplePat list * range:range + | SimplePats of SynSimplePat list * range: range - | Typed of SynSimplePats * SynType * range:range + | Typed of SynSimplePats * SynType * range: range and SynConstructorArgs = | Pats of SynPat list - | NamePatPairs of (Ident * SynPat) list * range:range + | NamePatPairs of (Ident * SynPat) list * range: range and [] SynPat = - | Const of SynConst * range:range + | Const of SynConst * range: range - | Wild of range:range + | Wild of range: range - | Named of SynPat * Ident * isSelfIdentifier:bool (* true if 'this' variable *) * accessibility:SynAccess option * range:range + | Named of SynPat * Ident * isSelfIdentifier: bool (* true if 'this' variable *) * accessibility: SynAccess option * range: range - | Typed of SynPat * SynType * range:range + | Typed of SynPat * SynType * range: range - | Attrib of SynPat * SynAttributes * range:range + | Attrib of SynPat * SynAttributes * range: range - | Or of SynPat * SynPat * range:range + | Or of SynPat * SynPat * range: range - | Ands of SynPat list * range:range + | Ands of SynPat list * range: range - | LongIdent of - longDotId:LongIdentWithDots * - Ident option * // holds additional ident for tooling + | LongIdent of + longDotId: LongIdentWithDots * + Ident option * // holds additional ident for tooling SynValTyparDecls option * // usually None: temporary used to parse "f<'a> x = x"*) - SynConstructorArgs * - accessibility:SynAccess option * - range:range + SynConstructorArgs * + accessibility: SynAccess option * + range: range - | Tuple of isStruct: bool * SynPat list * range:range + | Tuple of isStruct: bool * SynPat list * range: range - | Paren of SynPat * range:range + | Paren of SynPat * range: range - | ArrayOrList of bool * SynPat list * range:range + | ArrayOrList of bool * SynPat list * range: range - | Record of ((LongIdent * Ident) * SynPat) list * range:range + | Record of ((LongIdent * Ident) * SynPat) list * range: range /// 'null' - | Null of range:range + | Null of range: range /// '?id' -- for optional argument names - | OptionalVal of Ident * range:range + | OptionalVal of Ident * range: range /// ':? type ' - | IsInst of SynType * range:range + | IsInst of SynType * range: range /// <@ expr @>, used for active pattern arguments - | QuoteExpr of SynExpr * range:range + | QuoteExpr of SynExpr * range: range - /// Deprecated character range:ranges - | DeprecatedCharRange of char * char * range:range + /// Deprecated character range: ranges + | DeprecatedCharRange of char * char * range: range /// Used internally in the type checker - | InstanceMember of Ident * Ident * (* holds additional ident for tooling *) Ident option * accessibility:SynAccess option * range:range (* adhoc overloaded method/property *) + | InstanceMember of Ident * Ident * (* holds additional ident for tooling *) Ident option * accessibility: SynAccess option * range: range (* adhoc overloaded method/property *) /// A pattern arising from a parse error - | FromParseError of SynPat * range:range + | FromParseError of SynPat * range: range member p.Range = match p with @@ -1142,23 +1149,23 @@ and and [] SynInterfaceImpl = - | InterfaceImpl of SynType * SynBinding list * range:range + | InterfaceImpl of SynType * SynBinding list * range: range and [] SynMatchClause = - | Clause of SynPat * SynExpr option * SynExpr * range:range * SequencePointInfoForTarget + | Clause of SynPat * whenExpr: SynExpr option * SynExpr * range: range * SequencePointInfoForTarget member this.RangeOfGuardAndRhs = match this with - | Clause(_,eo,e,_,_) -> + | Clause(_, eo, e, _, _) -> match eo with | None -> e.Range | Some x -> unionRanges e.Range x.Range member this.Range = match this with - | Clause(_,eo,e,m,_) -> + | Clause(_, eo, e, m, _) -> match eo with | None -> unionRanges e.Range m | Some x -> unionRanges (unionRanges e.Range m) x.Range @@ -1172,7 +1179,7 @@ and ArgExpr: SynExpr - /// Target specifier, e.g. "assembly","module",etc. + /// Target specifier, e.g. "assembly", "module", etc. Target: Ident option /// Is this attribute being applied to a property getter or setter? @@ -1189,18 +1196,18 @@ and [] SynBinding = | Binding of - accessibility:SynAccess option * - kind:SynBindingKind * - mustInline:bool * - isMutable:bool * - attrs:SynAttributes * - xmlDoc:PreXmlDoc * - valData:SynValData * - headPat:SynPat * - returnInfo:SynBindingReturnInfo option * - expr:SynExpr * - range:range * - seqPoint:SequencePointInfoForBinding + accessibility: SynAccess option * + kind: SynBindingKind * + mustInline: bool * + isMutable: bool * + attrs: SynAttributes * + xmlDoc: PreXmlDoc * + valData: SynValData * + headPat: SynPat * + returnInfo: SynBindingReturnInfo option * + expr: SynExpr * + range: range * + seqPoint: SequencePointInfoForBinding // no member just named "Range", as that would be confusing: // - for everything else, the 'range' member that appears last/second-to-last is the 'full range' of the whole tree construct @@ -1215,7 +1222,7 @@ and and [] SynBindingReturnInfo = - | SynBindingReturnInfo of typeName:SynType * range:range * attributes:SynAttributes + | SynBindingReturnInfo of typeName: SynType * range: range * attributes: SynAttributes and @@ -1251,15 +1258,15 @@ and /// and member constraints. SynMemberSig = - | Member of SynValSig * MemberFlags * range:range + | Member of SynValSig * MemberFlags * range: range - | Interface of typeName:SynType * range:range + | Interface of typeName: SynType * range: range - | Inherit of typeName:SynType * range:range + | Inherit of typeName: SynType * range: range - | ValField of SynField * range:range + | ValField of SynField * range: range - | NestedType of SynTypeDefnSig * range:range + | NestedType of SynTypeDefnSig * range: range and SynMemberSigs = SynMemberSig list @@ -1285,30 +1292,30 @@ and SynTypeDefnSimpleRepr = /// A union type definition, type X = A | B - | Union of accessibility:SynAccess option * unionCases:SynUnionCases * range:range + | Union of accessibility: SynAccess option * unionCases: SynUnionCases * range: range /// An enum type definition, type X = A = 1 | B = 2 - | Enum of SynEnumCases * range:range + | Enum of SynEnumCases * range: range - /// A record type definition, type X = { A : int; B : int } - | Record of accessibility:SynAccess option * recordFields:SynFields * range:range + /// A record type definition, type X = { A: int; B: int } + | Record of accessibility: SynAccess option * recordFields: SynFields * range: range /// 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. - | General of SynTypeDefnKind * (SynType * range * Ident option) list * (SynValSig * MemberFlags) list * SynField list * bool * bool * SynSimplePat list option * range:range + | General of SynTypeDefnKind * (SynType * range * Ident option) list * (SynValSig * MemberFlags) list * SynField list * bool * bool * SynSimplePat list option * range: range /// A type defined by using an IL assembly representation. Only used in FSharp.Core. /// /// F# syntax: "type X = (# "..."#) - | LibraryOnlyILAssembly of ILType * range:range + | LibraryOnlyILAssembly of ILType * range: range /// A type abbreviation, "type X = A.B.C" - | TypeAbbrev of ParserDetail * SynType * range:range + | TypeAbbrev of ParserDetail * SynType * range: range - /// An abstract definition , "type X" - | None of range:range + /// An abstract definition, "type X" + | None of range: range - /// An exception definition , "exception E = ..." + /// An exception definition, "exception E = ..." | Exception of SynExceptionDefnRepr member this.Range = @@ -1329,7 +1336,7 @@ and SynEnumCase = /// The untyped, unchecked syntax tree for one case in an enum definition. - | EnumCase of attrs:SynAttributes * ident:Ident * SynConst * PreXmlDoc * range:range + | EnumCase of attrs: SynAttributes * ident: Ident * SynConst * PreXmlDoc * range: range member this.Range = match this with @@ -1342,7 +1349,7 @@ and SynUnionCase = /// The untyped, unchecked syntax tree for one case in a union definition. - | UnionCase of SynAttributes * ident:Ident * SynUnionCaseType * PreXmlDoc * accessibility:SynAccess option * range:range + | UnionCase of SynAttributes * ident: Ident * SynUnionCaseType * PreXmlDoc * accessibility: SynAccess option * range: range member this.Range = match this with @@ -1355,9 +1362,9 @@ and SynUnionCaseType = /// Normal style declaration - | UnionCaseFields of cases:SynField list + | UnionCaseFields of cases: SynField list - /// Full type spec given by 'UnionCase : ty1 * tyN -> rty'. Only used in FSharp.Core, otherwise a warning. + /// Full type spec given by 'UnionCase: ty1 * tyN -> rty'. Only used in FSharp.Core, otherwise a warning. | UnionCaseFullType of (SynType * SynValInfo) and @@ -1368,10 +1375,10 @@ and SynTypeDefnSigRepr = /// Indicates the right right-hand-side is a class, struct, interface or other object-model type - | ObjectModel of SynTypeDefnKind * memberSigs:SynMemberSigs * range:range + | ObjectModel of SynTypeDefnKind * memberSigs: SynMemberSigs * range: range /// Indicates the right right-hand-side is a record, union or other simple type. - | Simple of SynTypeDefnSimpleRepr * range:range + | Simple of SynTypeDefnSimpleRepr * range: range | Exception of SynExceptionDefnRepr @@ -1387,7 +1394,7 @@ and SynTypeDefnSig = /// The information for a type definition in a signature - | TypeDefnSig of SynComponentInfo * SynTypeDefnSigRepr * SynMemberSigs * range:range + | TypeDefnSig of SynComponentInfo * SynTypeDefnSigRepr * SynMemberSigs * range: range and SynFields = SynField list @@ -1395,7 +1402,7 @@ and [] /// The untyped, unchecked syntax tree for a field declaration in a record or class SynField = - | Field of attrs:SynAttributes * isStatic:bool * Ident option * SynType * bool * xmlDoc:PreXmlDoc * accessibility:SynAccess option * range:range + | Field of attrs: SynAttributes * isStatic: bool * Ident option * SynType * isMutable: bool * xmlDoc: PreXmlDoc * accessibility: SynAccess option * range: range and [] @@ -1406,7 +1413,7 @@ and /// for a type definition or module. For modules, entries such as the type parameters are /// always empty. SynComponentInfo = - | ComponentInfo of attribs:SynAttributes * typeParams:SynTyparDecl list * constraints:SynTypeConstraint list * longId:LongIdent * xmlDoc:PreXmlDoc * preferPostfix:bool * accessibility:SynAccess option * range:range + | ComponentInfo of attribs: SynAttributes * typeParams: SynTyparDecl list * constraints: SynTypeConstraint list * longId: LongIdent * xmlDoc: PreXmlDoc * preferPostfix: bool * accessibility: SynAccess option * range: range member this.Range = match this with @@ -1416,17 +1423,17 @@ and [] SynValSig = | ValSpfn of - synAttributes:SynAttributes * - ident:Ident * - explicitValDecls:SynValTyparDecls * - synType:SynType * - arity:SynValInfo * - isInline:bool * - isMutable:bool * - xmlDoc:PreXmlDoc * - accessibility:SynAccess option * - synExpr:SynExpr option * - range:range + synAttributes: SynAttributes * + ident: Ident * + explicitValDecls: SynValTyparDecls * + synType: SynType * + arity: SynValInfo * + isInline: bool * + isMutable: bool * + xmlDoc: PreXmlDoc * + accessibility: SynAccess option * + synExpr: SynExpr option * + range: range member x.RangeOfId = let (ValSpfn(ident=id)) = x in id.idRange @@ -1442,27 +1449,27 @@ and /// SynValInfo(curriedArgInfos, returnInfo) | SynValInfo of SynArgInfo list list * SynArgInfo - member x.ArgInfos = (let (SynValInfo(args,_)) = x in args) + member x.ArgInfos = (let (SynValInfo(args, _)) = x in args) /// The argument names and other metadata for a parameter for a member or function and [] SynArgInfo = - | SynArgInfo of SynAttributes * optional:bool * Ident option + | SynArgInfo of SynAttributes * optional: bool * Ident option /// The names and other metadata for the type parameters for a member or function and [] SynValTyparDecls = - | SynValTyparDecls of SynTyparDecl list * bool * constraints:SynTypeConstraint list + | SynValTyparDecls of SynTyparDecl list * bool * constraints: SynTypeConstraint list /// 'exception E = ... ' and [] SynExceptionDefnRepr = - | SynExceptionDefnRepr of SynAttributes * SynUnionCase * longId:LongIdent option * xmlDoc:PreXmlDoc * accessiblity:SynAccess option * range:range + | SynExceptionDefnRepr of SynAttributes * SynUnionCase * longId: LongIdent option * xmlDoc: PreXmlDoc * accessiblity: SynAccess option * range: range member this.Range = match this with SynExceptionDefnRepr (range=m) -> m @@ -1471,7 +1478,7 @@ and [] SynExceptionDefn = - | SynExceptionDefn of SynExceptionDefnRepr * SynMemberDefns * range:range + | SynExceptionDefn of SynExceptionDefnRepr * SynMemberDefns * range: range member this.Range = match this with @@ -1481,9 +1488,9 @@ and [] SynTypeDefnRepr = - | ObjectModel of SynTypeDefnKind * SynMemberDefns * range:range + | ObjectModel of SynTypeDefnKind * SynMemberDefns * range: range - | Simple of SynTypeDefnSimpleRepr * range:range + | Simple of SynTypeDefnSimpleRepr * range: range | Exception of SynExceptionDefnRepr @@ -1496,7 +1503,7 @@ and and [] SynTypeDefn = - | TypeDefn of SynComponentInfo * SynTypeDefnRepr * members:SynMemberDefns * range:range + | TypeDefn of SynComponentInfo * SynTypeDefnRepr * members: SynMemberDefns * range: range member this.Range = match this with | TypeDefn (range=m) -> m @@ -1505,47 +1512,47 @@ and [] SynMemberDefn = - | Open of longId:LongIdent * range:range + | Open of longId: LongIdent * range: range - | Member of memberDefn:SynBinding * range:range + | Member of memberDefn: SynBinding * range: range /// implicit ctor args as a defn line, 'as' specification - | ImplicitCtor of accessiblity:SynAccess option * attributes:SynAttributes * ctorArgs:SynSimplePat list * selfIdentifier:Ident option * range:range + | ImplicitCtor of accessiblity: SynAccess option * attributes: SynAttributes * ctorArgs: SynSimplePat list * selfIdentifier: Ident option * range: range /// inherit (args...) as base - | ImplicitInherit of inheritType:SynType * inheritArgs:SynExpr * inheritAlias:Ident option * range:range + | ImplicitInherit of inheritType: SynType * inheritArgs: SynExpr * inheritAlias: Ident option * range: range /// LetBindings(bindingList, isStatic, isRecursive, wholeRange) /// /// localDefns - | LetBindings of SynBinding list * isStatic:bool * isRecursive:bool * range:range + | LetBindings of SynBinding list * isStatic: bool * isRecursive: bool * range: range - | AbstractSlot of SynValSig * MemberFlags * range:range + | AbstractSlot of SynValSig * MemberFlags * range: range - | Interface of SynType * SynMemberDefns option * range:range + | Interface of SynType * SynMemberDefns option * range: range - | Inherit of SynType * Ident option * range:range + | Inherit of SynType * Ident option * range: range - | ValField of SynField * range:range + | ValField of SynField * range: range /// A feature that is not implemented - | NestedType of typeDefn:SynTypeDefn * accessibility:SynAccess option * range:range + | NestedType of typeDefn: SynTypeDefn * accessibility: SynAccess option * range: range - /// SynMemberDefn.AutoProperty (attribs,isStatic,id,tyOpt,propKind,memberFlags,xmlDoc,access,synExpr,mGetSet,mWholeAutoProp). + /// SynMemberDefn.AutoProperty (attribs, isStatic, id, tyOpt, propKind, memberFlags, xmlDoc, access, synExpr, mGetSet, mWholeAutoProp). /// /// F# syntax: 'member val X = expr' - | AutoProperty of - attribs:SynAttributes * - isStatic:bool * - ident:Ident * - typeOpt:SynType option * - propKind:MemberKind * - memberFlags:(MemberKind -> MemberFlags) * - xmlDoc:PreXmlDoc * - accessiblity:SynAccess option * - synExpr:SynExpr * - getSetRange:range option * - range:range + | AutoProperty of + attribs: SynAttributes * + isStatic: bool * + ident: Ident * + typeOpt: SynType option * + propKind: MemberKind * + memberFlags:(MemberKind -> MemberFlags) * + xmlDoc: PreXmlDoc * + accessiblity: SynAccess option * + synExpr: SynExpr * + getSetRange: range option * + range: range member d.Range = match d with @@ -1566,15 +1573,15 @@ and SynMemberDefns = SynMemberDefn list and [] SynModuleDecl = - | ModuleAbbrev of ident:Ident * longId:LongIdent * range:range - | NestedModule of SynComponentInfo * isRecursive:bool * SynModuleDecls * bool * range:range - | Let of isRecursive:bool * SynBinding list * range:range - | DoExpr of SequencePointInfoForBinding * SynExpr * range:range - | Types of SynTypeDefn list * range:range - | Exception of SynExceptionDefn * range:range - | Open of longDotId:LongIdentWithDots * range:range - | Attributes of SynAttributes * range:range - | HashDirective of ParsedHashDirective * range:range + | ModuleAbbrev of ident: Ident * longId: LongIdent * range: range + | NestedModule of SynComponentInfo * isRecursive: bool * SynModuleDecls * bool * range: range + | Let of isRecursive: bool * SynBinding list * range: range + | DoExpr of SequencePointInfoForBinding * SynExpr * range: range + | Types of SynTypeDefn list * range: range + | Exception of SynExceptionDefn * range: range + | Open of longDotId: LongIdentWithDots * range: range + | Attributes of SynAttributes * range: range + | HashDirective of ParsedHashDirective * range: range | NamespaceFragment of SynModuleOrNamespace member d.Range = match d with @@ -1594,18 +1601,18 @@ and SynModuleDecls = SynModuleDecl list and [] SynExceptionSig = - | SynExceptionSig of SynExceptionDefnRepr * SynMemberSigs * range:range + | SynExceptionSig of SynExceptionDefnRepr * SynMemberSigs * range: range and [] SynModuleSigDecl = - | ModuleAbbrev of ident:Ident * longId:LongIdent * range:range - | NestedModule of SynComponentInfo * isRecursive:bool * SynModuleSigDecls * range:range - | Val of SynValSig * range:range - | Types of SynTypeDefnSig list * range:range - | Exception of SynExceptionSig * range:range - | Open of longId:LongIdent * range:range - | HashDirective of ParsedHashDirective * range:range + | ModuleAbbrev of ident: Ident * longId: LongIdent * range: range + | NestedModule of SynComponentInfo * isRecursive: bool * SynModuleSigDecls * range: range + | Val of SynValSig * range: range + | Types of SynTypeDefnSig list * range: range + | Exception of SynExceptionSig * range: range + | Open of longId: LongIdent * range: range + | HashDirective of ParsedHashDirective * range: range | NamespaceFragment of SynModuleOrNamespaceSig member d.Range = @@ -1637,7 +1644,7 @@ and and [] SynModuleOrNamespace = - | SynModuleOrNamespace of longId:LongIdent * isRecursive:bool * kind:SynModuleOrNamespaceKind * decls:SynModuleDecls * xmlDoc:PreXmlDoc * attribs:SynAttributes * accessibility:SynAccess option * range:range + | SynModuleOrNamespace of longId: LongIdent * isRecursive: bool * kind: SynModuleOrNamespaceKind * decls: SynModuleDecls * xmlDoc: PreXmlDoc * attribs: SynAttributes * accessibility: SynAccess option * range: range member this.Range = match this with | SynModuleOrNamespace (range=m) -> m @@ -1645,43 +1652,43 @@ and and [] SynModuleOrNamespaceSig = - | SynModuleOrNamespaceSig of longId:LongIdent * isRecursive:bool * kind:SynModuleOrNamespaceKind * SynModuleSigDecls * xmlDoc:PreXmlDoc * attribs:SynAttributes * accessibility:SynAccess option * range:range + | SynModuleOrNamespaceSig of longId: LongIdent * isRecursive: bool * kind: SynModuleOrNamespaceKind * SynModuleSigDecls * xmlDoc: PreXmlDoc * attribs: SynAttributes * accessibility: SynAccess option * range: range and [] ParsedHashDirective = - | ParsedHashDirective of string * string list * range:range + | ParsedHashDirective of string * string list * range: range [] type ParsedImplFileFragment = - | AnonModule of SynModuleDecls * range:range + | AnonModule of SynModuleDecls * range: range | NamedModule of SynModuleOrNamespace - | NamespaceFragment of longId:LongIdent * bool * SynModuleOrNamespaceKind * SynModuleDecls * xmlDoc:PreXmlDoc * SynAttributes * range:range + | NamespaceFragment of longId: LongIdent * bool * SynModuleOrNamespaceKind * SynModuleDecls * xmlDoc: PreXmlDoc * SynAttributes * range: range [] type ParsedSigFileFragment = - | AnonModule of SynModuleSigDecls * range:range + | AnonModule of SynModuleSigDecls * range: range | NamedModule of SynModuleOrNamespaceSig - | NamespaceFragment of longId:LongIdent * bool * SynModuleOrNamespaceKind * SynModuleSigDecls * xmlDoc:PreXmlDoc * SynAttributes * range:range + | NamespaceFragment of longId: LongIdent * bool * SynModuleOrNamespaceKind * SynModuleSigDecls * xmlDoc: PreXmlDoc * SynAttributes * range: range [] type ParsedFsiInteraction = - | IDefns of SynModuleDecl list * range:range - | IHash of ParsedHashDirective * range:range + | IDefns of SynModuleDecl list * range: range + | IHash of ParsedHashDirective * range: range [] type ParsedImplFile = - | ParsedImplFile of hashDirectives:ParsedHashDirective list * ParsedImplFileFragment list + | ParsedImplFile of hashDirectives: ParsedHashDirective list * ParsedImplFileFragment list [] type ParsedSigFile = - | ParsedSigFile of hashDirectives:ParsedHashDirective list * ParsedSigFileFragment list + | ParsedSigFile of hashDirectives: ParsedHashDirective list * ParsedSigFileFragment list //---------------------------------------------------------------------- // AST and parsing utilities. //---------------------------------------------------------------------- -let ident (s,r) = new Ident(s,r) -let textOfId (id:Ident) = id.idText +let ident (s, r) = new Ident(s, r) +let textOfId (id: Ident) = id.idText let pathOfLid lid = List.map textOfId lid let arrPathOfLid lid = Array.ofList (pathOfLid lid) let textOfPath path = String.concat "." path @@ -1695,11 +1702,11 @@ let rangeOfLid (lid: Ident list) = [] type ScopedPragma = - | WarningOff of range:range * int + | WarningOff of range: range * int // Note: this type may be extended in the future with optimization on/off switches etc. // These are the results of parsing + folding in the implicit file name -/// ImplFile(modname,isScript,qualName,hashDirectives,modules,isLastCompiland) +/// ImplFile(modname, isScript, qualName, hashDirectives, modules, isLastCompiland) /// QualifiedNameOfFile acts to fully-qualify module specifications and implementations, /// most importantly the ones that simply contribute fragments to a namespace (i.e. the ParsedSigFileFragment.NamespaceFragment case) @@ -1715,23 +1722,23 @@ type QualifiedNameOfFile = [] type ParsedImplFileInput = - | ParsedImplFileInput of - fileName : string * - isScript : bool * - qualifiedNameOfFile : QualifiedNameOfFile * - scopedPragmas : ScopedPragma list * - hashDirectives : ParsedHashDirective list * - modules : SynModuleOrNamespace list * + | ParsedImplFileInput of + fileName: string * + isScript: bool * + qualifiedNameOfFile: QualifiedNameOfFile * + scopedPragmas: ScopedPragma list * + hashDirectives: ParsedHashDirective list * + modules: SynModuleOrNamespace list * isLastCompiland: (bool * bool) [] type ParsedSigFileInput = - | ParsedSigFileInput of - fileName : string * - qualifiedNameOfFile : QualifiedNameOfFile * - scopedPragmas : ScopedPragma list * - hashDirectives : ParsedHashDirective list * - modules : SynModuleOrNamespaceSig list + | ParsedSigFileInput of + fileName: string * + qualifiedNameOfFile: QualifiedNameOfFile * + scopedPragmas: ScopedPragma list * + hashDirectives: ParsedHashDirective list * + modules: SynModuleOrNamespaceSig list [] type ParsedInput = @@ -1767,31 +1774,31 @@ type SynArgNameGenerator() = //----------------------------------------------------------------------- -let mkSynId m s = Ident(s,m) +let mkSynId m s = Ident(s, m) let pathToSynLid m p = List.map (mkSynId m) p let mkSynIdGet m n = SynExpr.Ident(mkSynId m n) let mkSynLidGet m path n = let lid = pathToSynLid m path @ [mkSynId m n] let dots = List.replicate (lid.Length - 1) m - SynExpr.LongIdent(false,LongIdentWithDots(lid,dots),None,m) + SynExpr.LongIdent(false, LongIdentWithDots(lid, dots), None, m) let mkSynIdGetWithAlt m id altInfo = match altInfo with | None -> SynExpr.Ident id - | _ -> SynExpr.LongIdent(false,LongIdentWithDots([id],[]),altInfo,m) + | _ -> SynExpr.LongIdent(false, LongIdentWithDots([id], []), altInfo, m) -let mkSynSimplePatVar isOpt id = SynSimplePat.Id (id,None,false,false,isOpt,id.idRange) -let mkSynCompGenSimplePatVar id = SynSimplePat.Id (id,None,true,false,false,id.idRange) +let mkSynSimplePatVar isOpt id = SynSimplePat.Id (id, None, false, false, isOpt, id.idRange) +let mkSynCompGenSimplePatVar id = SynSimplePat.Id (id, None, true, false, false, id.idRange) /// Match a long identifier, including the case for single identifiers which gets a more optimized node in the syntax tree. let (|LongOrSingleIdent|_|) inp = match inp with - | SynExpr.LongIdent(isOpt,lidwd,altId,_m) -> Some (isOpt,lidwd,altId,lidwd.RangeSansAnyExtraDot) - | SynExpr.Ident id -> Some (false,LongIdentWithDots([id],[]),None,id.idRange) + | SynExpr.LongIdent(isOpt, lidwd, altId, _m) -> Some (isOpt, lidwd, altId, lidwd.RangeSansAnyExtraDot) + | SynExpr.Ident id -> Some (false, LongIdentWithDots([id], []), None, id.idRange) | _ -> None let (|SingleIdent|_|) inp = match inp with - | SynExpr.LongIdent(false,LongIdentWithDots([id],_),None,_) -> Some id + | SynExpr.LongIdent(false, LongIdentWithDots([id], _), None, _) -> Some id | SynExpr.Ident id -> Some id | _ -> None @@ -1803,7 +1810,7 @@ let rec IsControlFlowExpression e = | SynExpr.LetOrUse _ | SynExpr.Sequential _ // Treat "ident { ... }" as a control flow expression - | SynExpr.App (_, _, SynExpr.Ident _, SynExpr.CompExpr _,_) + | SynExpr.App (_, _, SynExpr.Ident _, SynExpr.CompExpr _, _) | SynExpr.IfThenElse _ | SynExpr.LetOrUseBang _ | SynExpr.Match _ @@ -1812,121 +1819,121 @@ let rec IsControlFlowExpression e = | SynExpr.For _ | SynExpr.ForEach _ | SynExpr.While _ -> true - | SynExpr.Typed(e,_,_) -> IsControlFlowExpression e + | SynExpr.Typed(e, _, _) -> IsControlFlowExpression e | _ -> false -let mkAnonField (ty: SynType) = Field([],false,None,ty,false,PreXmlDoc.Empty,None,ty.Range) -let mkNamedField (ident, ty: SynType) = Field([],false,Some ident,ty,false,PreXmlDoc.Empty,None,ty.Range) +let mkAnonField (ty: SynType) = Field([], false, None, ty, false, PreXmlDoc.Empty, None, ty.Range) +let mkNamedField (ident, ty: SynType) = Field([], false, Some ident, ty, false, PreXmlDoc.Empty, None, ty.Range) -let mkSynPatVar vis (id:Ident) = SynPat.Named (SynPat.Wild id.idRange,id,false,vis,id.idRange) -let mkSynThisPatVar (id:Ident) = SynPat.Named (SynPat.Wild id.idRange,id,true,None,id.idRange) -let mkSynPatMaybeVar lidwd vis m = SynPat.LongIdent (lidwd,None,None,SynConstructorArgs.Pats [],vis,m) +let mkSynPatVar vis (id: Ident) = SynPat.Named (SynPat.Wild id.idRange, id, false, vis, id.idRange) +let mkSynThisPatVar (id: Ident) = SynPat.Named (SynPat.Wild id.idRange, id, true, None, id.idRange) +let mkSynPatMaybeVar lidwd vis m = SynPat.LongIdent (lidwd, None, None, SynConstructorArgs.Pats [], vis, m) /// Extract the argument for patterns corresponding to the declaration of 'new ... = ...' let (|SynPatForConstructorDecl|_|) x = match x with - | SynPat.LongIdent (LongIdentWithDots([_],_),_,_, SynConstructorArgs.Pats [arg],_,_) -> Some arg + | SynPat.LongIdent (LongIdentWithDots([_], _), _, _, SynConstructorArgs.Pats [arg], _, _) -> Some arg | _ -> None /// Recognize the '()' in 'new()' let (|SynPatForNullaryArgs|_|) x = match x with - | SynPat.Paren(SynPat.Const(SynConst.Unit,_),_) -> Some() + | SynPat.Paren(SynPat.Const(SynConst.Unit, _), _) -> Some() | _ -> None -let (|SynExprErrorSkip|) (p:SynExpr) = +let (|SynExprErrorSkip|) (p: SynExpr) = match p with - | SynExpr.FromParseError(p,_) -> p + | SynExpr.FromParseError(p, _) -> p | _ -> p -let (|SynExprParen|_|) (e:SynExpr) = +let (|SynExprParen|_|) (e: SynExpr) = match e with - | SynExpr.Paren(SynExprErrorSkip e,a,b,c) -> Some (e,a,b,c) + | SynExpr.Paren(SynExprErrorSkip e, a, b, c) -> Some (e, a, b, c) | _ -> None -let (|SynPatErrorSkip|) (p:SynPat) = +let (|SynPatErrorSkip|) (p: SynPat) = match p with - | SynPat.FromParseError(p,_) -> p + | SynPat.FromParseError(p, _) -> p | _ -> p /// Push non-simple parts of a patten match over onto the r.h.s. of a lambda. /// Return a simple pattern and a function to build a match on the r.h.s. if the pattern is complex let rec SimplePatOfPat (synArgNameGenerator: SynArgNameGenerator) p = match p with - | SynPat.Typed(p',ty,m) -> - let p2,laterf = SimplePatOfPat synArgNameGenerator p' - SynSimplePat.Typed(p2,ty,m), + | SynPat.Typed(p', ty, m) -> + let p2, laterf = SimplePatOfPat synArgNameGenerator p' + SynSimplePat.Typed(p2, ty, m), laterf - | SynPat.Attrib(p',attribs,m) -> - let p2,laterf = SimplePatOfPat synArgNameGenerator p' - SynSimplePat.Attrib(p2,attribs,m), + | SynPat.Attrib(p', attribs, m) -> + let p2, laterf = SimplePatOfPat synArgNameGenerator p' + SynSimplePat.Attrib(p2, attribs, m), laterf - | SynPat.Named (SynPat.Wild _, v,thisv,_,m) -> - SynSimplePat.Id (v,None,false,thisv,false,m), + | SynPat.Named (SynPat.Wild _, v, thisv, _, m) -> + SynSimplePat.Id (v, None, false, thisv, false, m), None - | SynPat.OptionalVal (v,m) -> - SynSimplePat.Id (v,None,false,false,true,m), + | SynPat.OptionalVal (v, m) -> + SynSimplePat.Id (v, None, false, false, true, m), None - | SynPat.Paren (p,_) -> SimplePatOfPat synArgNameGenerator p - | SynPat.FromParseError (p,_) -> SimplePatOfPat synArgNameGenerator p + | SynPat.Paren (p, _) -> SimplePatOfPat synArgNameGenerator p + | SynPat.FromParseError (p, _) -> SimplePatOfPat synArgNameGenerator p | _ -> let m = p.Range - let isCompGen,altNameRefCell,id,item = + let isCompGen, altNameRefCell, id, item = match p with - | SynPat.LongIdent(LongIdentWithDots([id],_),_,None, SynConstructorArgs.Pats [],None,_) -> + | SynPat.LongIdent(LongIdentWithDots([id], _), _, None, SynConstructorArgs.Pats [], None, _) -> // The pattern is 'V' or some other capitalized identifier. // It may be a real variable, in which case we want to maintain its name. // But it may also be a nullary union case or some other identifier. // In this case, we want to use an alternate compiler generated name for the hidden variable. let altNameRefCell = Some (ref (Undecided (mkSynId m (synArgNameGenerator.New())))) let item = mkSynIdGetWithAlt m id altNameRefCell - false,altNameRefCell,id,item + false, altNameRefCell, id, item | _ -> let nm = synArgNameGenerator.New() let id = mkSynId m nm let item = mkSynIdGet m nm - true,None,id,item - SynSimplePat.Id (id,altNameRefCell,isCompGen,false,false,id.idRange), + true, None, id, item + SynSimplePat.Id (id, altNameRefCell, isCompGen, false, false, id.idRange), Some (fun e -> - let clause = Clause(p,None,e,m,SuppressSequencePointAtTarget) - SynExpr.Match(NoSequencePointAtInvisibleBinding,item,[clause],clause.Range)) + let clause = Clause(p, None, e, m, SuppressSequencePointAtTarget) + SynExpr.Match(NoSequencePointAtInvisibleBinding, item, [clause], clause.Range)) let appFunOpt funOpt x = match funOpt with None -> x | Some f -> f x let composeFunOpt funOpt1 funOpt2 = match funOpt2 with None -> funOpt1 | Some f -> Some (fun x -> appFunOpt funOpt1 (f x)) let rec SimplePatsOfPat synArgNameGenerator p = match p with - | SynPat.FromParseError (p,_) -> SimplePatsOfPat synArgNameGenerator p - | SynPat.Typed(p',ty,m) -> - let p2,laterf = SimplePatsOfPat synArgNameGenerator p' - SynSimplePats.Typed(p2,ty,m), + | SynPat.FromParseError (p, _) -> SimplePatsOfPat synArgNameGenerator p + | SynPat.Typed(p', ty, m) -> + let p2, laterf = SimplePatsOfPat synArgNameGenerator p' + SynSimplePats.Typed(p2, ty, m), laterf -// | SynPat.Paren (p,m) -> SimplePatsOfPat synArgNameGenerator p - | SynPat.Tuple (false,ps,m) - | SynPat.Paren(SynPat.Tuple (false,ps,m),_) -> - let ps2,laterf = +// | SynPat.Paren (p, m) -> SimplePatsOfPat synArgNameGenerator p + | SynPat.Tuple (false, ps, m) + | SynPat.Paren(SynPat.Tuple (false, ps, m), _) -> + let ps2, laterf = List.foldBack - (fun (p',rhsf) (ps',rhsf') -> + (fun (p', rhsf) (ps', rhsf') -> p'::ps', (composeFunOpt rhsf rhsf')) (List.map (SimplePatOfPat synArgNameGenerator) ps) ([], None) - SynSimplePats.SimplePats (ps2,m), + SynSimplePats.SimplePats (ps2, m), laterf - | SynPat.Paren(SynPat.Const (SynConst.Unit,m),_) - | SynPat.Const (SynConst.Unit,m) -> - SynSimplePats.SimplePats ([],m), + | SynPat.Paren(SynPat.Const (SynConst.Unit, m), _) + | SynPat.Const (SynConst.Unit, m) -> + SynSimplePats.SimplePats ([], m), None | _ -> let m = p.Range - let sp,laterf = SimplePatOfPat synArgNameGenerator p - SynSimplePats.SimplePats ([sp],m),laterf + let sp, laterf = SimplePatOfPat synArgNameGenerator p + SynSimplePats.SimplePats ([sp], m), laterf let PushPatternToExpr synArgNameGenerator isMember pat (rhs: SynExpr) = - let nowpats,laterf = SimplePatsOfPat synArgNameGenerator pat - nowpats, SynExpr.Lambda (isMember,false,nowpats, appFunOpt laterf rhs,rhs.Range) + let nowpats, laterf = SimplePatsOfPat synArgNameGenerator pat + nowpats, SynExpr.Lambda (isMember, false, nowpats, appFunOpt laterf rhs, rhs.Range) let private isSimplePattern pat = - let _nowpats,laterf = SimplePatsOfPat (SynArgNameGenerator()) pat + let _nowpats, laterf = SimplePatsOfPat (SynArgNameGenerator()) pat Option.isNone laterf /// "fun (UnionCase x) (UnionCase y) -> body" @@ -1938,29 +1945,29 @@ let private isSimplePattern pat = let PushCurriedPatternsToExpr synArgNameGenerator wholem isMember pats rhs = // Two phases // First phase: Fold back, from right to left, pushing patterns into r.h.s. expr - let spatsl,rhs = - (pats, ([],rhs)) - ||> List.foldBack (fun arg (spatsl,body) -> - let spats,bodyf = SimplePatsOfPat synArgNameGenerator arg + let spatsl, rhs = + (pats, ([], rhs)) + ||> List.foldBack (fun arg (spatsl, body) -> + let spats, bodyf = SimplePatsOfPat synArgNameGenerator arg // accumulate the body. This builds "let (UnionCase y) = tmp2 in body" let body = appFunOpt bodyf body // accumulate the patterns let spatsl = spats::spatsl - (spatsl,body)) + (spatsl, body)) // Second phase: build lambdas. Mark subsequent ones with "true" indicating they are part of an iterated sequence of lambdas let expr = match spatsl with | [] -> rhs | h::t -> - let expr = List.foldBack (fun spats e -> SynExpr.Lambda (isMember,true,spats, e,wholem)) t rhs - let expr = SynExpr.Lambda (isMember,false,h, expr,wholem) + let expr = List.foldBack (fun spats e -> SynExpr.Lambda (isMember, true, spats, e, wholem)) t rhs + let expr = SynExpr.Lambda (isMember, false, h, expr, wholem) expr - spatsl,expr + spatsl, expr /// Helper for parsing the inline IL fragments. #if NO_INLINE_IL_PARSER let ParseAssemblyCodeInstructions _s m = - errorR(Error((193,"Inline IL not valid in a hosted environment"),m)) + errorR(Error((193, "Inline IL not valid in a hosted environment"), m)) [| |] #else let ParseAssemblyCodeInstructions s m = @@ -1975,7 +1982,7 @@ let ParseAssemblyCodeInstructions s m = /// Helper for parsing the inline IL fragments. #if NO_INLINE_IL_PARSER let ParseAssemblyCodeType _s m = - errorR(Error((193,"Inline IL not valid in a hosted environment"),m)) + errorR(Error((193, "Inline IL not valid in a hosted environment"), m)) IL.EcmaMscorlibILGlobals.typ_Object #else let ParseAssemblyCodeType s m = @@ -1983,7 +1990,7 @@ let ParseAssemblyCodeType s m = FSharp.Compiler.AbstractIL.Internal.AsciiLexer.token (UnicodeLexing.StringAsLexbuf s) with RecoverableParseError -> - errorR(Error(FSComp.SR.astParseEmbeddedILTypeError(),m)); + errorR(Error(FSComp.SR.astParseEmbeddedILTypeError(), m)); IL.EcmaMscorlibILGlobals.typ_Object #endif @@ -1995,107 +2002,107 @@ let opNameParenGet = CompileOpName parenGet let opNameQMark = CompileOpName qmark let mkSynOperator opm oper = mkSynIdGet opm (CompileOpName oper) -let mkSynInfix opm (l:SynExpr) oper (r:SynExpr) = +let mkSynInfix opm (l: SynExpr) oper (r: SynExpr) = let firstTwoRange = unionRanges l.Range opm let wholeRange = unionRanges l.Range r.Range SynExpr.App (ExprAtomicFlag.NonAtomic, false, SynExpr.App (ExprAtomicFlag.NonAtomic, true, mkSynOperator opm oper, l, firstTwoRange), r, wholeRange) -let mkSynBifix m oper x1 x2 = - SynExpr.App (ExprAtomicFlag.NonAtomic, false, SynExpr.App (ExprAtomicFlag.NonAtomic, true, mkSynOperator m oper,x1,m), x2,m) +let mkSynBifix m oper x1 x2 = + SynExpr.App (ExprAtomicFlag.NonAtomic, false, SynExpr.App (ExprAtomicFlag.NonAtomic, true, mkSynOperator m oper, x1, m), x2, m) -let mkSynTrifix m oper x1 x2 x3 = - SynExpr.App (ExprAtomicFlag.NonAtomic, false, SynExpr.App (ExprAtomicFlag.NonAtomic, false, SynExpr.App (ExprAtomicFlag.NonAtomic, true, mkSynOperator m oper,x1,m), x2,m), x3,m) +let mkSynTrifix m oper x1 x2 x3 = + SynExpr.App (ExprAtomicFlag.NonAtomic, false, SynExpr.App (ExprAtomicFlag.NonAtomic, false, SynExpr.App (ExprAtomicFlag.NonAtomic, true, mkSynOperator m oper, x1, m), x2, m), x3, m) -let mkSynPrefixPrim opm m oper x = - SynExpr.App (ExprAtomicFlag.NonAtomic, false, mkSynOperator opm oper, x,m) +let mkSynPrefixPrim opm m oper x = + SynExpr.App (ExprAtomicFlag.NonAtomic, false, mkSynOperator opm oper, x, m) -let mkSynPrefix opm m oper x = - if oper = "~&" then - SynExpr.AddressOf(true,x,opm,m) - elif oper = "~&&" then - SynExpr.AddressOf(false,x,opm,m) +let mkSynPrefix opm m oper x = + if oper = "~&" then + SynExpr.AddressOf(true, x, opm, m) + elif oper = "~&&" then + SynExpr.AddressOf(false, x, opm, m) else mkSynPrefixPrim opm m oper x let mkSynCaseName m n = [mkSynId m (CompileOpName n)] -let mkSynApp1 f x1 m = SynExpr.App(ExprAtomicFlag.NonAtomic,false,f,x1,m) +let mkSynApp1 f x1 m = SynExpr.App(ExprAtomicFlag.NonAtomic, false, f, x1, m) let mkSynApp2 f x1 x2 m = mkSynApp1 (mkSynApp1 f x1 m) x2 m let mkSynApp3 f x1 x2 x3 m = mkSynApp1 (mkSynApp2 f x1 x2 m) x3 m let mkSynApp4 f x1 x2 x3 x4 m = mkSynApp1 (mkSynApp3 f x1 x2 x3 m) x4 m let mkSynApp5 f x1 x2 x3 x4 x5 m = mkSynApp1 (mkSynApp4 f x1 x2 x3 x4 m) x5 m let mkSynDotParenSet m a b c = mkSynTrifix m parenSet a b c -let mkSynDotBrackGet m mDot a b = SynExpr.DotIndexedGet(a,[SynIndexerArg.One b],mDot,m) +let mkSynDotBrackGet m mDot a b = SynExpr.DotIndexedGet(a, [SynIndexerArg.One b], mDot, m) let mkSynQMarkSet m a b c = mkSynTrifix m qmarkSet a b c -let mkSynDotBrackSliceGet m mDot arr sliceArg = SynExpr.DotIndexedGet(arr,[sliceArg],mDot,m) +let mkSynDotBrackSliceGet m mDot arr sliceArg = SynExpr.DotIndexedGet(arr, [sliceArg], mDot, m) -let mkSynDotBrackSeqSliceGet m mDot arr (argslist:list) = +let mkSynDotBrackSeqSliceGet m mDot arr (argslist: list) = let notsliced=[ for arg in argslist do match arg with | SynIndexerArg.One x -> yield x | _ -> () ] if notsliced.Length = argslist.Length then - SynExpr.DotIndexedGet(arr,[SynIndexerArg.One (SynExpr.Tuple(false,notsliced,[],unionRanges (List.head notsliced).Range (List.last notsliced).Range))],mDot,m) + SynExpr.DotIndexedGet(arr, [SynIndexerArg.One (SynExpr.Tuple(false, notsliced, [], unionRanges (List.head notsliced).Range (List.last notsliced).Range))], mDot, m) else - SynExpr.DotIndexedGet(arr,argslist,mDot,m) + SynExpr.DotIndexedGet(arr, argslist, mDot, m) let mkSynDotParenGet lhsm dotm a b = match b with - | SynExpr.Tuple (false,[_;_],_,_) -> errorR(Deprecated(FSComp.SR.astDeprecatedIndexerNotation(),lhsm)) ; SynExpr.Const(SynConst.Unit,lhsm) - | SynExpr.Tuple (false,[_;_;_],_,_) -> errorR(Deprecated(FSComp.SR.astDeprecatedIndexerNotation(),lhsm)) ; SynExpr.Const(SynConst.Unit,lhsm) + | SynExpr.Tuple (false, [_;_], _, _) -> errorR(Deprecated(FSComp.SR.astDeprecatedIndexerNotation(), lhsm)) ; SynExpr.Const(SynConst.Unit, lhsm) + | SynExpr.Tuple (false, [_;_;_], _, _) -> errorR(Deprecated(FSComp.SR.astDeprecatedIndexerNotation(), lhsm)) ; SynExpr.Const(SynConst.Unit, lhsm) | _ -> mkSynInfix dotm a parenGet b -let mkSynUnit m = SynExpr.Const(SynConst.Unit,m) -let mkSynUnitPat m = SynPat.Const(SynConst.Unit,m) -let mkSynDelay m e = SynExpr.Lambda (false,false,SynSimplePats.SimplePats ([mkSynCompGenSimplePatVar (mkSynId m "unitVar")],m), e, m) +let mkSynUnit m = SynExpr.Const(SynConst.Unit, m) +let mkSynUnitPat m = SynPat.Const(SynConst.Unit, m) +let mkSynDelay m e = SynExpr.Lambda (false, false, SynSimplePats.SimplePats ([mkSynCompGenSimplePatVar (mkSynId m "unitVar")], m), e, m) let mkSynAssign (l: SynExpr) (r: SynExpr) = let m = unionRanges l.Range r.Range match l with - //| SynExpr.Paren(l2,m2) -> mkSynAssign m l2 r - | LongOrSingleIdent(false,v,None,_) -> SynExpr.LongIdentSet (v,r,m) - | SynExpr.DotGet(e,_,v,_) -> SynExpr.DotSet (e,v,r,m) - | SynExpr.DotIndexedGet(e1,e2,mDot,mLeft) -> SynExpr.DotIndexedSet (e1,e2,r,mLeft,mDot,m) - | SynExpr.LibraryOnlyUnionCaseFieldGet (x,y,z,_) -> SynExpr.LibraryOnlyUnionCaseFieldSet (x,y,z,r,m) - | SynExpr.App (_, _, SynExpr.App(_, _, SingleIdent(nm), a, _),b,_) when nm.idText = opNameQMark -> + //| SynExpr.Paren(l2, m2) -> mkSynAssign m l2 r + | LongOrSingleIdent(false, v, None, _) -> SynExpr.LongIdentSet (v, r, m) + | SynExpr.DotGet(e, _, v, _) -> SynExpr.DotSet (e, v, r, m) + | SynExpr.DotIndexedGet(e1, e2, mDot, mLeft) -> SynExpr.DotIndexedSet (e1, e2, r, mLeft, mDot, m) + | SynExpr.LibraryOnlyUnionCaseFieldGet (x, y, z, _) -> SynExpr.LibraryOnlyUnionCaseFieldSet (x, y, z, r, m) + | SynExpr.App (_, _, SynExpr.App(_, _, SingleIdent(nm), a, _), b, _) when nm.idText = opNameQMark -> mkSynQMarkSet m a b r - | SynExpr.App (_, _, SynExpr.App(_, _, SingleIdent(nm), a, _),b,_) when nm.idText = opNameParenGet -> + | SynExpr.App (_, _, SynExpr.App(_, _, SingleIdent(nm), a, _), b, _) when nm.idText = opNameParenGet -> mkSynDotParenSet m a b r - | SynExpr.App (_, _, SynExpr.LongIdent(false,v,None,_),x,_) -> SynExpr.NamedIndexedPropertySet (v,x,r,m) - | SynExpr.App (_, _, SynExpr.DotGet(e,_,v,_),x,_) -> SynExpr.DotNamedIndexedPropertySet (e,v,x,r,m) - | l -> SynExpr.Set (l,r,m) + | SynExpr.App (_, _, SynExpr.LongIdent(false, v, None, _), x, _) -> SynExpr.NamedIndexedPropertySet (v, x, r, m) + | SynExpr.App (_, _, SynExpr.DotGet(e, _, v, _), x, _) -> SynExpr.DotNamedIndexedPropertySet (e, v, x, r, m) + | l -> SynExpr.Set (l, r, m) //| _ -> errorR(Error(FSComp.SR.astInvalidExprLeftHandOfAssignment(), m)); l // return just the LHS, so the typechecker can see it and capture expression typings that may be useful for dot lookups let rec mkSynDot dotm m l r = match l with - | SynExpr.LongIdent(isOpt,LongIdentWithDots(lid,dots),None,_) -> - SynExpr.LongIdent(isOpt,LongIdentWithDots(lid@[r],dots@[dotm]),None,m) // REVIEW: MEMORY PERFORMANCE: This list operation is memory intensive (we create a lot of these list nodes) - an ImmutableArray would be better here + | SynExpr.LongIdent(isOpt, LongIdentWithDots(lid, dots), None, _) -> + SynExpr.LongIdent(isOpt, LongIdentWithDots(lid@[r], dots@[dotm]), None, m) // REVIEW: MEMORY PERFORMANCE: This list operation is memory intensive (we create a lot of these list nodes) - an ImmutableArray would be better here | SynExpr.Ident id -> - SynExpr.LongIdent(false,LongIdentWithDots([id;r],[dotm]),None,m) - | SynExpr.DotGet(e,dm,LongIdentWithDots(lid,dots),_) -> - SynExpr.DotGet(e,dm,LongIdentWithDots(lid@[r],dots@[dotm]),m)// REVIEW: MEMORY PERFORMANCE: This is memory intensive (we create a lot of these list nodes) - an ImmutableArray would be better here + SynExpr.LongIdent(false, LongIdentWithDots([id;r], [dotm]), None, m) + | SynExpr.DotGet(e, dm, LongIdentWithDots(lid, dots), _) -> + SynExpr.DotGet(e, dm, LongIdentWithDots(lid@[r], dots@[dotm]), m)// REVIEW: MEMORY PERFORMANCE: This is memory intensive (we create a lot of these list nodes) - an ImmutableArray would be better here | expr -> - SynExpr.DotGet(expr,dotm,LongIdentWithDots([r],[]),m) + SynExpr.DotGet(expr, dotm, LongIdentWithDots([r], []), m) let rec mkSynDotMissing dotm m l = match l with - | SynExpr.LongIdent(isOpt,LongIdentWithDots(lid,dots),None,_) -> - SynExpr.LongIdent(isOpt,LongIdentWithDots(lid,dots@[dotm]),None,m) // REVIEW: MEMORY PERFORMANCE: This list operation is memory intensive (we create a lot of these list nodes) - an ImmutableArray would be better here + | SynExpr.LongIdent(isOpt, LongIdentWithDots(lid, dots), None, _) -> + SynExpr.LongIdent(isOpt, LongIdentWithDots(lid, dots@[dotm]), None, m) // REVIEW: MEMORY PERFORMANCE: This list operation is memory intensive (we create a lot of these list nodes) - an ImmutableArray would be better here | SynExpr.Ident id -> - SynExpr.LongIdent(false,LongIdentWithDots([id],[dotm]),None,m) - | SynExpr.DotGet(e,dm,LongIdentWithDots(lid,dots),_) -> - SynExpr.DotGet(e,dm,LongIdentWithDots(lid,dots@[dotm]),m)// REVIEW: MEMORY PERFORMANCE: This is memory intensive (we create a lot of these list nodes) - an ImmutableArray would be better here + SynExpr.LongIdent(false, LongIdentWithDots([id], [dotm]), None, m) + | SynExpr.DotGet(e, dm, LongIdentWithDots(lid, dots), _) -> + SynExpr.DotGet(e, dm, LongIdentWithDots(lid, dots@[dotm]), m)// REVIEW: MEMORY PERFORMANCE: This is memory intensive (we create a lot of these list nodes) - an ImmutableArray would be better here | expr -> - SynExpr.DiscardAfterMissingQualificationAfterDot(expr,m) + SynExpr.DiscardAfterMissingQualificationAfterDot(expr, m) let mkSynFunMatchLambdas synArgNameGenerator isMember wholem ps e = - let _,e = PushCurriedPatternsToExpr synArgNameGenerator wholem isMember ps e + let _, e = PushCurriedPatternsToExpr synArgNameGenerator wholem isMember ps e e // error recovery - the contract is that these expressions can only be produced if an error has already been reported // (as a result, future checking may choose not to report errors involving these, to prevent noisy cascade errors) -let arbExpr(debugStr,range:range) = SynExpr.ArbitraryAfterError(debugStr,range.MakeSynthetic()) +let arbExpr(debugStr, range: range) = SynExpr.ArbitraryAfterError(debugStr, range.MakeSynthetic()) type SynExpr with member this.IsArbExprAndThusAlreadyReportedError = match this with @@ -2106,7 +2113,7 @@ type SynExpr with /// mostly dummy information to make the return element look like an argument, /// the important thing is that (a) you can give a return type for the function or method, and /// (b) you can associate .NET attributes to return of a function or method and these get stored in .NET metadata. -type SynReturnInfo = SynReturnInfo of (SynType * SynArgInfo) * range:range +type SynReturnInfo = SynReturnInfo of (SynType * SynArgInfo) * range: range /// Operations related to the syntactic analysis of arguments of value, function and member definitions and signatures. @@ -2130,7 +2137,7 @@ type SynReturnInfo = SynReturnInfo of (SynType * SynArgInfo) * range:range /// StaticProperty with set(v) --> [1] module SynInfo = /// The argument information for an argument without a name - let unnamedTopArg1 = SynArgInfo([],false,None) + let unnamedTopArg1 = SynArgInfo([], false, None) /// The argument information for a curried argument without a name let unnamedTopArg = [unnamedTopArg1] @@ -2139,64 +2146,64 @@ module SynInfo = let unitArgData = unnamedTopArg /// The 'argument' information for a return value where no attributes are given for the return value (the normal case) - let unnamedRetVal = SynArgInfo([],false,None) + let unnamedRetVal = SynArgInfo([], false, None) /// The 'argument' information for the 'this'/'self' parameter in the cases where it is not given explicitly let selfMetadata = unnamedTopArg /// Determine if a syntactic information represents a member without arguments (which is implicitly a property getter) - let HasNoArgs (SynValInfo(args,_)) = isNil args + let HasNoArgs (SynValInfo(args, _)) = isNil args /// Check if one particular argument is an optional argument. Used when adjusting the /// types of optional arguments for function and member signatures. - let IsOptionalArg (SynArgInfo(_,isOpt,_)) = isOpt + let IsOptionalArg (SynArgInfo(_, isOpt, _)) = isOpt /// 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. - let HasOptionalArgs (SynValInfo(args,_)) = List.exists (List.exists IsOptionalArg) args + let HasOptionalArgs (SynValInfo(args, _)) = List.exists (List.exists IsOptionalArg) args /// 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. - let IncorporateEmptyTupledArgForPropertyGetter (SynValInfo(args,retInfo)) = SynValInfo([]::args,retInfo) + let IncorporateEmptyTupledArgForPropertyGetter (SynValInfo(args, retInfo)) = SynValInfo([]::args, retInfo) /// 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. - let IncorporateSelfArg (SynValInfo(args,retInfo)) = SynValInfo(selfMetadata::args,retInfo) + let IncorporateSelfArg (SynValInfo(args, retInfo)) = SynValInfo(selfMetadata::args, retInfo) /// 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. - let IncorporateSetterArg (SynValInfo(args,retInfo)) = + let IncorporateSetterArg (SynValInfo(args, retInfo)) = let args = match args with | [] -> [unnamedTopArg] | [arg] -> [arg@[unnamedTopArg1]] | _ -> failwith "invalid setter type" - SynValInfo(args,retInfo) + SynValInfo(args, retInfo) /// Get the argument counts for each curried argument group. Used in some adhoc places in tc.fs. - let AritiesOfArgs (SynValInfo(args,_)) = List.map List.length args + let AritiesOfArgs (SynValInfo(args, _)) = List.map List.length args /// Get the argument attributes from the syntactic information for an argument. - let AttribsOfArgData (SynArgInfo(attribs,_,_)) = attribs + let AttribsOfArgData (SynArgInfo(attribs, _, _)) = attribs /// Infer the syntactic argument info for a single argument from a simple pattern. let rec InferSynArgInfoFromSimplePat attribs p = match p with - | SynSimplePat.Id(nm,_,isCompGen,_,isOpt,_) -> + | SynSimplePat.Id(nm, _, isCompGen, _, isOpt, _) -> SynArgInfo(attribs, isOpt, (if isCompGen then None else Some nm)) - | SynSimplePat.Typed(a,_,_) -> InferSynArgInfoFromSimplePat attribs a - | SynSimplePat.Attrib(a,attribs2,_) -> InferSynArgInfoFromSimplePat (attribs @ attribs2) a + | SynSimplePat.Typed(a, _, _) -> InferSynArgInfoFromSimplePat attribs a + | SynSimplePat.Attrib(a, attribs2, _) -> InferSynArgInfoFromSimplePat (attribs @ attribs2) a /// Infer the syntactic argument info for one or more arguments one or more simple patterns. let rec InferSynArgInfoFromSimplePats x = match x with - | SynSimplePats.SimplePats(ps,_) -> List.map (InferSynArgInfoFromSimplePat []) ps - | SynSimplePats.Typed(ps,_,_) -> InferSynArgInfoFromSimplePats ps + | SynSimplePats.SimplePats(ps, _) -> List.map (InferSynArgInfoFromSimplePat []) ps + | SynSimplePats.Typed(ps, _, _) -> InferSynArgInfoFromSimplePats ps /// Infer the syntactic argument info for one or more arguments a pattern. let InferSynArgInfoFromPat p = // It is ok to use a fresh SynArgNameGenerator here, because compiler generated names are filtered from SynArgInfo, see InferSynArgInfoFromSimplePat above - let sp,_ = SimplePatsOfPat (SynArgNameGenerator()) p + let sp, _ = SimplePatsOfPat (SynArgNameGenerator()) p InferSynArgInfoFromSimplePats sp /// Make sure only a solitary unit argument has unit elimination @@ -2219,7 +2226,7 @@ module SynInfo = let InferLambdaArgs origRhsExpr = let rec loop e = match e with - | SynExpr.Lambda(false,_,spats,rest,_) -> + | SynExpr.Lambda(false, _, spats, rest, _) -> InferSynArgInfoFromSimplePats spats :: loop rest | _ -> [] loop origRhsExpr @@ -2227,11 +2234,11 @@ module SynInfo = let InferSynReturnData (retInfo: SynReturnInfo option) = match retInfo with | None -> unnamedRetVal - | Some(SynReturnInfo((_,retInfo),_)) -> retInfo + | Some(SynReturnInfo((_, retInfo), _)) -> retInfo - let private emptySynValInfo = SynValInfo([],unnamedRetVal) + let private emptySynValInfo = SynValInfo([], unnamedRetVal) - let emptySynValData = SynValData(None,emptySynValInfo,None) + let emptySynValData = SynValData(None, emptySynValInfo, None) /// 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 @@ -2240,12 +2247,12 @@ module SynInfo = let infosForExplicitArgs = match pat with - | Some(SynPat.LongIdent(_,_,_, SynConstructorArgs.Pats curriedArgs,_,_)) -> List.map InferSynArgInfoFromPat curriedArgs + | Some(SynPat.LongIdent(_, _, _, SynConstructorArgs.Pats curriedArgs, _, _)) -> List.map InferSynArgInfoFromPat curriedArgs | _ -> [] let explicitArgsAreSimple = match pat with - | Some(SynPat.LongIdent(_,_,_, SynConstructorArgs.Pats curriedArgs,_,_)) -> List.forall isSimplePattern curriedArgs + | Some(SynPat.LongIdent(_, _, _, SynConstructorArgs.Pats curriedArgs, _, _)) -> List.forall isSimplePattern curriedArgs | _ -> true let retInfo = InferSynReturnData retInfo @@ -2255,7 +2262,7 @@ module SynInfo = let infosForLambdaArgs = InferLambdaArgs origRhsExpr let infosForArgs = infosForExplicitArgs @ (if explicitArgsAreSimple then infosForLambdaArgs else []) let infosForArgs = AdjustArgsForUnitElimination infosForArgs - SynValData(None,SynValInfo(infosForArgs,retInfo),None) + SynValData(None, SynValInfo(infosForArgs, retInfo), None) | Some memFlags -> let infosForObjArgs = @@ -2265,22 +2272,22 @@ module SynInfo = let infosForArgs = AdjustArgsForUnitElimination infosForArgs let argInfos = infosForObjArgs @ infosForArgs - SynValData(Some(memFlags),SynValInfo(argInfos,retInfo),None) + SynValData(Some(memFlags), SynValInfo(argInfos, retInfo), None) let mkSynBindingRhs staticOptimizations rhsExpr mRhs retInfo = - let rhsExpr = List.foldBack (fun (c,e1) e2 -> SynExpr.LibraryOnlyStaticOptimization (c,e1,e2,mRhs)) staticOptimizations rhsExpr - let rhsExpr,retTyOpt = + let rhsExpr = List.foldBack (fun (c, e1) e2 -> SynExpr.LibraryOnlyStaticOptimization (c, e1, e2, mRhs)) staticOptimizations rhsExpr + let rhsExpr, retTyOpt = match retInfo with - | Some (SynReturnInfo((ty,SynArgInfo(rattribs,_,_)),tym)) -> SynExpr.Typed(rhsExpr,ty,rhsExpr.Range), Some(SynBindingReturnInfo(ty,tym,rattribs) ) - | None -> rhsExpr,None - rhsExpr,retTyOpt + | Some (SynReturnInfo((ty, SynArgInfo(rattribs, _, _)), tym)) -> SynExpr.Typed(rhsExpr, ty, rhsExpr.Range), Some(SynBindingReturnInfo(ty, tym, rattribs) ) + | None -> rhsExpr, None + rhsExpr, retTyOpt -let mkSynBinding (xmlDoc,headPat) (vis,isInline,isMutable,mBind,spBind,retInfo,origRhsExpr,mRhs,staticOptimizations,attrs,memberFlagsOpt) = +let mkSynBinding (xmlDoc, headPat) (vis, isInline, isMutable, mBind, spBind, retInfo, origRhsExpr, mRhs, staticOptimizations, attrs, memberFlagsOpt) = let info = SynInfo.InferSynValData (memberFlagsOpt, Some headPat, retInfo, origRhsExpr) - let rhsExpr,retTyOpt = mkSynBindingRhs staticOptimizations origRhsExpr mRhs retInfo - Binding (vis,NormalBinding,isInline,isMutable,attrs,xmlDoc,info,headPat,retTyOpt,rhsExpr,mBind,spBind) + let rhsExpr, retTyOpt = mkSynBindingRhs staticOptimizations origRhsExpr mRhs retInfo + Binding (vis, NormalBinding, isInline, isMutable, attrs, xmlDoc, info, headPat, retTyOpt, rhsExpr, mBind, spBind) let NonVirtualMemberFlags k = { MemberKind=k; IsInstance=true; IsDispatchSlot=false; IsOverrideOrExplicitImpl=false; IsFinal=false } let CtorMemberFlags = { MemberKind=MemberKind.Constructor; IsInstance=false; IsDispatchSlot=false; IsOverrideOrExplicitImpl=false; IsFinal=false } @@ -2289,8 +2296,8 @@ let OverrideMemberFlags k = { MemberKind=k; IsInstan let AbstractMemberFlags k = { MemberKind=k; IsInstance=true; IsDispatchSlot=true; IsOverrideOrExplicitImpl=false; IsFinal=false } let StaticMemberFlags k = { MemberKind=k; IsInstance=false; IsDispatchSlot=false; IsOverrideOrExplicitImpl=false; IsFinal=false } -let inferredTyparDecls = SynValTyparDecls([],true,[]) -let noInferredTypars = SynValTyparDecls([],false,[]) +let inferredTyparDecls = SynValTyparDecls([], true, []) +let noInferredTypars = SynValTyparDecls([], false, []) //------------------------------------------------------------------------ // Lexer args: status of #if/#endif processing. @@ -2305,21 +2312,21 @@ type LexerIfdefStack = LexerIfdefStackEntries ref /// or to continue with 'skip' function. type LexerEndlineContinuation = | Token of LexerIfdefStackEntries - | Skip of LexerIfdefStackEntries * int * range:range + | Skip of LexerIfdefStackEntries * int * range: range member x.LexerIfdefStack = match x with | LexerEndlineContinuation.Token(ifd) | LexerEndlineContinuation.Skip(ifd, _, _) -> ifd type LexerIfdefExpression = - | IfdefAnd of LexerIfdefExpression*LexerIfdefExpression - | IfdefOr of LexerIfdefExpression*LexerIfdefExpression - | IfdefNot of LexerIfdefExpression - | IfdefId of string - -let rec LexerIfdefEval (lookup : string -> bool) = function - | IfdefAnd (l,r) -> (LexerIfdefEval lookup l) && (LexerIfdefEval lookup r) - | IfdefOr (l,r) -> (LexerIfdefEval lookup l) || (LexerIfdefEval lookup r) + | IfdefAnd of LexerIfdefExpression*LexerIfdefExpression + | IfdefOr of LexerIfdefExpression*LexerIfdefExpression + | IfdefNot of LexerIfdefExpression + | IfdefId of string + +let rec LexerIfdefEval (lookup: string -> bool) = function + | IfdefAnd (l, r) -> (LexerIfdefEval lookup l) && (LexerIfdefEval lookup r) + | IfdefOr (l, r) -> (LexerIfdefEval lookup l) || (LexerIfdefEval lookup r) | IfdefNot e -> not (LexerIfdefEval lookup e) | IfdefId id -> lookup id @@ -2330,18 +2337,18 @@ let rec LexerIfdefEval (lookup : string -> bool) = function [] [] type LexerWhitespaceContinuation = - | Token of ifdef:LexerIfdefStackEntries - | IfDefSkip of ifdef:LexerIfdefStackEntries * int * range:range - | String of ifdef:LexerIfdefStackEntries * range:range - | VerbatimString of ifdef:LexerIfdefStackEntries * range:range - | TripleQuoteString of ifdef:LexerIfdefStackEntries * range:range - | Comment of ifdef:LexerIfdefStackEntries * int * range:range - | SingleLineComment of ifdef:LexerIfdefStackEntries * int * range:range - | StringInComment of ifdef:LexerIfdefStackEntries * int * range:range - | VerbatimStringInComment of ifdef:LexerIfdefStackEntries * int * range:range - | TripleQuoteStringInComment of ifdef:LexerIfdefStackEntries * int * range:range - | MLOnly of ifdef:LexerIfdefStackEntries * range:range - | EndLine of LexerEndlineContinuation + | Token of ifdef: LexerIfdefStackEntries + | IfDefSkip of ifdef: LexerIfdefStackEntries * int * range: range + | String of ifdef: LexerIfdefStackEntries * range: range + | VerbatimString of ifdef: LexerIfdefStackEntries * range: range + | TripleQuoteString of ifdef: LexerIfdefStackEntries * range: range + | Comment of ifdef: LexerIfdefStackEntries * int * range: range + | SingleLineComment of ifdef: LexerIfdefStackEntries * int * range: range + | StringInComment of ifdef: LexerIfdefStackEntries * int * range: range + | VerbatimStringInComment of ifdef: LexerIfdefStackEntries * int * range: range + | TripleQuoteStringInComment of ifdef: LexerIfdefStackEntries * int * range: range + | MLOnly of ifdef: LexerIfdefStackEntries * range: range + | EndLine of LexerEndlineContinuation member x.LexerIfdefStack = match x with @@ -2369,14 +2376,14 @@ and LexCont = LexerWhitespaceContinuation /// 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. [] -exception SyntaxError of obj (* ParseErrorContext<_> *) * range:range +exception SyntaxError of obj (* ParseErrorContext<_> *) * range: range /// Get an F# compiler position from a lexer position -let internal posOfLexPosition (p:Position) = +let internal posOfLexPosition (p: Position) = mkPos p.Line p.Column /// Get an F# compiler range from a lexer range -let internal mkSynRange (p1:Position) (p2: Position) = +let internal mkSynRange (p1: Position) (p2: Position) = mkFileIndexRange p1.FileIndex (posOfLexPosition p1) (posOfLexPosition p2) type LexBuffer<'Char> with @@ -2389,18 +2396,18 @@ let internal lhs (parseState: IParseState) = mkSynRange p1 p2 /// Get the range covering two of the r.h.s. symbols of a grammar rule while it is being reduced -let internal rhs2 (parseState: IParseState) i j = +let internal rhs2 (parseState: IParseState) i j = let p1 = parseState.InputStartPosition i let p2 = parseState.InputEndPosition j mkSynRange p1 p2 /// Get the range corresponding to one of the r.h.s. symbols of a grammar rule while it is being reduced -let internal rhs parseState i = rhs2 parseState i i +let internal rhs parseState i = rhs2 parseState i i type IParseState with /// Get the generator used for compiler-generated argument names. - member internal x.SynArgNameGenerator = + member internal x.SynArgNameGenerator = let key = "SynArgNameGenerator" let bls = x.LexBuffer.BufferLocalStore let gen = @@ -2422,11 +2429,11 @@ module LexbufLocalXmlDocStore = // The key into the BufferLocalStore used to hold the current accumulated XmlDoc lines let private xmlDocKey = "XmlDoc" - let internal ClearXmlDoc (lexbuf:Lexbuf) = + let internal ClearXmlDoc (lexbuf: Lexbuf) = lexbuf.BufferLocalStore.[xmlDocKey] <- box (XmlDocCollector()) /// Called from the lexer to save a single line of XML doc comment. - let internal SaveXmlDocLine (lexbuf:Lexbuf, lineText, pos) = + let internal SaveXmlDocLine (lexbuf: Lexbuf, lineText, pos) = let collector = match lexbuf.BufferLocalStore.TryGetValue(xmlDocKey) with | true, collector -> collector @@ -2439,7 +2446,7 @@ module LexbufLocalXmlDocStore = /// Called from the parser each time we parse a construct that marks the end of an XML doc comment range, /// e.g. a 'type' declaration. The markerRange is the range of the keyword that delimits the construct. - let internal GrabXmlDocBeforeMarker (lexbuf:Lexbuf, markerRange:range) = + let internal GrabXmlDocBeforeMarker (lexbuf: Lexbuf, markerRange: range) = match lexbuf.BufferLocalStore.TryGetValue(xmlDocKey) with | true, collector -> let collector = unbox(collector) @@ -2459,10 +2466,10 @@ module LexbufLocalXmlDocStore = type NiceNameGenerator() = let lockObj = obj() - let basicNameCounts = new Dictionary(100) + let basicNameCounts = new Dictionary(100) - member x.FreshCompilerGeneratedName (name,m:range) = - lock lockObj (fun () -> + member x.FreshCompilerGeneratedName (name, m: range) = + lock lockObj (fun () -> let basicName = GetBasicNameOfPossibleCompilerGeneratedName name let n = match basicNameCounts.TryGetValue(basicName) with @@ -2472,8 +2479,8 @@ type NiceNameGenerator() = basicNameCounts.[basicName] <- n + 1 nm) - member x.Reset () = - lock lockObj (fun () -> + member x.Reset () = + lock lockObj (fun () -> basicNameCounts.Clear() ) @@ -2489,11 +2496,11 @@ type StableNiceNameGenerator() = let lockObj = obj() - let names = new Dictionary<(string * int64),string>(100) - let basicNameCounts = new Dictionary(100) + let names = new Dictionary<(string * int64), string>(100) + let basicNameCounts = new Dictionary(100) - member x.GetUniqueCompilerGeneratedName (name,m:range,uniq) = - lock lockObj (fun () -> + member x.GetUniqueCompilerGeneratedName (name, m: range, uniq) = + lock lockObj (fun () -> let basicName = GetBasicNameOfPossibleCompilerGeneratedName name let key = basicName, uniq match names.TryGetValue(key) with @@ -2510,7 +2517,7 @@ type StableNiceNameGenerator() = ) member x.Reset () = - lock lockObj (fun () -> + lock lockObj (fun () -> basicNameCounts.Clear() names.Clear() ) @@ -2519,7 +2526,7 @@ let rec synExprContainsError inpExpr = let rec walkBind (Binding(_, _, _, _, _, _, _, _, _, synExpr, _, _)) = walkExpr synExpr and walkExprs es = es |> List.exists walkExpr and walkBinds es = es |> List.exists walkBind - and walkMatchClauses cl = cl |> List.exists (fun (Clause(_,whenExpr,e,_,_)) -> walkExprOpt whenExpr || walkExpr e) + and walkMatchClauses cl = cl |> List.exists (fun (Clause(_, whenExpr, e, _, _)) -> walkExprOpt whenExpr || walkExpr e) and walkExprOpt eOpt = eOpt |> Option.exists walkExpr and walkExpr e = match e with @@ -2535,88 +2542,88 @@ let rec synExprContainsError inpExpr = | SynExpr.ImplicitZero _ | SynExpr.Const _ -> false - | SynExpr.TypeTest (e,_,_) - | SynExpr.Upcast (e,_,_) - | SynExpr.AddressOf (_,e,_,_) - | SynExpr.CompExpr (_,_,e,_) - | SynExpr.ArrayOrListOfSeqExpr (_,e,_) - | SynExpr.Typed (e,_,_) - | SynExpr.FromParseError (e,_) - | SynExpr.Do (e,_) - | SynExpr.Assert (e,_) - | SynExpr.DotGet (e,_,_,_) - | SynExpr.LongIdentSet (_,e,_) - | SynExpr.New (_,_,e,_) - | SynExpr.TypeApp (e,_,_,_,_,_,_) - | SynExpr.LibraryOnlyUnionCaseFieldGet (e,_,_,_) - | SynExpr.Downcast (e,_,_) - | SynExpr.InferredUpcast (e,_) - | SynExpr.InferredDowncast (e,_) + | SynExpr.TypeTest (e, _, _) + | SynExpr.Upcast (e, _, _) + | SynExpr.AddressOf (_, e, _, _) + | SynExpr.CompExpr (_, _, e, _) + | SynExpr.ArrayOrListOfSeqExpr (_, e, _) + | SynExpr.Typed (e, _, _) + | SynExpr.FromParseError (e, _) + | SynExpr.Do (e, _) + | SynExpr.Assert (e, _) + | SynExpr.DotGet (e, _, _, _) + | SynExpr.LongIdentSet (_, e, _) + | SynExpr.New (_, _, e, _) + | SynExpr.TypeApp (e, _, _, _, _, _, _) + | SynExpr.LibraryOnlyUnionCaseFieldGet (e, _, _, _) + | SynExpr.Downcast (e, _, _) + | SynExpr.InferredUpcast (e, _) + | SynExpr.InferredDowncast (e, _) | SynExpr.Lazy (e, _) - | SynExpr.TraitCall(_,_,e,_) - | SynExpr.YieldOrReturn (_,e,_) - | SynExpr.YieldOrReturnFrom (_,e,_) - | SynExpr.DoBang (e,_) - | SynExpr.Fixed (e,_) - | SynExpr.Paren (e,_,_,_) -> + | SynExpr.TraitCall(_, _, e, _) + | SynExpr.YieldOrReturn (_, e, _) + | SynExpr.YieldOrReturnFrom (_, e, _) + | SynExpr.DoBang (e, _) + | SynExpr.Fixed (e, _) + | SynExpr.Paren (e, _, _, _) -> walkExpr e - | SynExpr.NamedIndexedPropertySet (_,e1,e2,_) - | SynExpr.DotSet (e1,_,e2,_) - | SynExpr.Set (e1,e2,_) - | SynExpr.LibraryOnlyUnionCaseFieldSet (e1,_,_,e2,_) - | SynExpr.JoinIn (e1,_,e2,_) - | SynExpr.App (_,_,e1,e2,_) -> + | SynExpr.NamedIndexedPropertySet (_, e1, e2, _) + | SynExpr.DotSet (e1, _, e2, _) + | SynExpr.Set (e1, e2, _) + | SynExpr.LibraryOnlyUnionCaseFieldSet (e1, _, _, e2, _) + | SynExpr.JoinIn (e1, _, e2, _) + | SynExpr.App (_, _, e1, e2, _) -> walkExpr e1 || walkExpr e2 - | SynExpr.ArrayOrList (_,es,_) - | SynExpr.Tuple (_,es,_,_) -> + | SynExpr.ArrayOrList (_, es, _) + | SynExpr.Tuple (_, es, _, _) -> walkExprs es - | SynExpr.AnonRecd (_,origExpr,flds,_) -> - (match origExpr with Some (e,_) -> walkExpr e | None -> false) || + | SynExpr.AnonRecd (_, origExpr, flds, _) -> + (match origExpr with Some (e, _) -> walkExpr e | None -> false) || walkExprs (List.map snd flds) - | SynExpr.Record (_,origExpr,fs,_) -> - (match origExpr with Some (e,_) -> walkExpr e | None -> false) || + | SynExpr.Record (_, origExpr, fs, _) -> + (match origExpr with Some (e, _) -> walkExpr e | None -> false) || let flds = fs |> List.choose (fun (_, v, _) -> v) walkExprs (flds) - | SynExpr.ObjExpr (_,_,bs,is,_,_) -> - walkBinds bs || walkBinds [ for (InterfaceImpl(_,bs,_)) in is do yield! bs ] - | SynExpr.ForEach (_,_,_,_,e1,e2,_) - | SynExpr.While (_,e1,e2,_) -> + | SynExpr.ObjExpr (_, _, bs, is, _, _) -> + walkBinds bs || walkBinds [ for (InterfaceImpl(_, bs, _)) in is do yield! bs ] + | SynExpr.ForEach (_, _, _, _, e1, e2, _) + | SynExpr.While (_, e1, e2, _) -> walkExpr e1 || walkExpr e2 - | SynExpr.For (_,_,e1,_,e2,e3,_) -> + | SynExpr.For (_, _, e1, _, e2, e3, _) -> walkExpr e1 || walkExpr e2 || walkExpr e3 - | SynExpr.MatchLambda(_,_,cl,_,_) -> + | SynExpr.MatchLambda(_, _, cl, _, _) -> walkMatchClauses cl - | SynExpr.Lambda (_,_,_,e,_) -> + | SynExpr.Lambda (_, _, _, e, _) -> walkExpr e - | SynExpr.Match (_,e,cl,_) -> + | SynExpr.Match (_, e, cl, _) -> walkExpr e || walkMatchClauses cl - | SynExpr.LetOrUse (_,_,bs,e,_) -> + | SynExpr.LetOrUse (_, _, bs, e, _) -> walkBinds bs || walkExpr e - | SynExpr.TryWith (e,_,cl,_,_,_,_) -> + | SynExpr.TryWith (e, _, cl, _, _, _, _) -> walkExpr e || walkMatchClauses cl - | SynExpr.TryFinally (e1,e2,_,_,_) -> + | SynExpr.TryFinally (e1, e2, _, _, _) -> walkExpr e1 || walkExpr e2 - | SynExpr.Sequential (_,_,e1,e2,_) -> + | SynExpr.Sequential (_, _, e1, e2, _) -> walkExpr e1 || walkExpr e2 - | SynExpr.IfThenElse (e1,e2,e3opt,_,_,_,_) -> + | SynExpr.IfThenElse (e1, e2, e3opt, _, _, _, _) -> walkExpr e1 || walkExpr e2 || walkExprOpt e3opt - | SynExpr.DotIndexedGet (e1,es,_,_) -> + | SynExpr.DotIndexedGet (e1, es, _, _) -> walkExpr e1 || walkExprs [ for e in es do yield! e.Exprs ] - | SynExpr.DotIndexedSet (e1,es,e2,_,_,_) -> + | SynExpr.DotIndexedSet (e1, es, e2, _, _, _) -> walkExpr e1 || walkExprs [ for e in es do yield! e.Exprs ] || walkExpr e2 - | SynExpr.DotNamedIndexedPropertySet (e1,_,e2,e3,_) -> + | SynExpr.DotNamedIndexedPropertySet (e1, _, e2, e3, _) -> walkExpr e1 || walkExpr e2 || walkExpr e3 - | SynExpr.MatchBang (_,e,cl,_) -> + | SynExpr.MatchBang (_, e, cl, _) -> walkExpr e || walkMatchClauses cl - | SynExpr.LetOrUseBang (_,_,_,_,e1,e2,_) -> + | SynExpr.LetOrUseBang (_, _, _, _, e1, e2, _) -> walkExpr e1 || walkExpr e2 walkExpr inpExpr diff --git a/src/fcs-fable/src/fsharp/autobox.fs b/src/fcs-fable/src/fsharp/autobox.fs index 22e9409a69..dd76156619 100644 --- a/src/fcs-fable/src/fsharp/autobox.fs +++ b/src/fcs-fable/src/fsharp/autobox.fs @@ -44,41 +44,39 @@ let DecideLambda exprF cenv topValInfo expr ety z = | _ -> z ///Special cases where representation uses Lambda. -let DecideExprOp exprF z (op, tyargs, args) = - (* Special cases *) +/// Handle these as special cases since mutables are allowed inside their bodies +let DecideExprOp exprF noInterceptF (z: Zset) (expr: Expr) (op, tyargs, args) = + match op, tyargs, args with - // Handle these as special cases since mutables are allowed inside their bodies | TOp.While _, _, [Expr.Lambda(_, _, _, [_], e1, _, _);Expr.Lambda(_, _, _, [_], e2, _, _)] -> - Some (exprF (exprF z e1) e2) + exprF (exprF z e1) e2 | TOp.TryFinally _, [_], [Expr.Lambda(_, _, _, [_], e1, _, _); Expr.Lambda(_, _, _, [_], e2, _, _)] -> - Some (exprF (exprF z e1) e2) + exprF (exprF z e1) e2 | TOp.For(_), _, [Expr.Lambda(_, _, _, [_], e1, _, _);Expr.Lambda(_, _, _, [_], e2, _, _);Expr.Lambda(_, _, _, [_], e3, _, _)] -> - Some (exprF (exprF (exprF z e1) e2) e3) + exprF (exprF (exprF z e1) e2) e3 | TOp.TryCatch _, [_], [Expr.Lambda(_, _, _, [_], e1, _, _); Expr.Lambda(_, _, _, [_], _e2, _, _); Expr.Lambda(_, _, _, [_], e3, _, _)] -> - Some (exprF (exprF (exprF z e1) _e2) e3) + exprF (exprF (exprF z e1) _e2) e3 // In Check code it said // e2; -- don't check filter body - duplicates logic in 'catch' body // Is that true for this code too? - | _ -> None - + | _ -> + noInterceptF z expr /// Find all the mutable locals that escape a lambda expression or object expression -let DecideExpr cenv exprF z expr = +let DecideExpr cenv exprF noInterceptF z expr = match expr with | Expr.Lambda(_, _ctorThisValOpt, _baseValOpt, argvs, _, m, rty) -> let topValInfo = ValReprInfo ([], [argvs |> List.map (fun _ -> ValReprInfo.unnamedTopArg1)], ValReprInfo.unnamedRetVal) let ty = mkMultiLambdaTy m argvs rty - let z = DecideLambda (Some exprF) cenv topValInfo expr ty z - Some z + DecideLambda (Some exprF) cenv topValInfo expr ty z | Expr.TyLambda(_, tps, _, _m, rty) -> let topValInfo = ValReprInfo (ValReprInfo.InferTyparInfo tps, [], ValReprInfo.unnamedRetVal) let ty = mkForallTyIfNeeded tps rty - let z = DecideLambda (Some exprF) cenv topValInfo expr ty z - Some z + DecideLambda (Some exprF) cenv topValInfo expr ty z | Expr.Obj (_, _, baseValOpt, superInitCall, overrides, iimpls, _m) -> let CheckMethod z (TObjExprMethod(_, _attribs, _tps, vs, body, _m)) = @@ -94,12 +92,13 @@ let DecideExpr cenv exprF z expr = let z = exprF z superInitCall let z = CheckMethods z overrides let z = (z, iimpls) ||> List.fold CheckInterfaceImpl - Some z + z | Expr.Op (c, tyargs, args, _m) -> - DecideExprOp exprF z (c, tyargs, args) + DecideExprOp exprF noInterceptF z expr (c, tyargs, args) - | _ -> None + | _ -> + noInterceptF z expr /// Find all the mutable locals that escape a binding let DecideBinding cenv z (TBind(v, expr, _m) as bind) = diff --git a/src/fcs-fable/src/fsharp/fsc.fs b/src/fcs-fable/src/fsharp/fsc.fs index 22b050388d..f88d7789ee 100755 --- a/src/fcs-fable/src/fsharp/fsc.fs +++ b/src/fcs-fable/src/fsharp/fsc.fs @@ -96,7 +96,7 @@ type ErrorLoggerUpToMaxErrors(tcConfigB: TcConfigBuilder, exiter: Exiter, nameFo /// Create an error logger that counts and prints errors -let ConsoleErrorLoggerUpToMaxErrors (tcConfigB:TcConfigBuilder, exiter : Exiter) = +let ConsoleErrorLoggerUpToMaxErrors (tcConfigB: TcConfigBuilder, exiter : Exiter) = { new ErrorLoggerUpToMaxErrors(tcConfigB, exiter, "ConsoleErrorLoggerUpToMaxErrors") with member __.HandleTooManyErrors(text : string) = @@ -114,7 +114,7 @@ let ConsoleErrorLoggerUpToMaxErrors (tcConfigB:TcConfigBuilder, exiter : Exiter) type DelayAndForwardErrorLogger(exiter: Exiter, errorLoggerProvider: ErrorLoggerProvider) = inherit CapturingErrorLogger("DelayAndForwardErrorLogger") - member x.ForwardDelayedDiagnostics(tcConfigB:TcConfigBuilder) = + member x.ForwardDelayedDiagnostics(tcConfigB: TcConfigBuilder) = let errorLogger = errorLoggerProvider.CreateErrorLoggerUpToMaxErrors(tcConfigB, exiter) x.CommitDelayedDiagnostics(errorLogger) @@ -163,7 +163,7 @@ type ConsoleLoggerProvider() = override this.CreateErrorLoggerUpToMaxErrors(tcConfigBuilder, exiter) = ConsoleErrorLoggerUpToMaxErrors(tcConfigBuilder, exiter) /// Notify the exiter if any error has occurred -let AbortOnError (errorLogger:ErrorLogger, exiter : Exiter) = +let AbortOnError (errorLogger: ErrorLogger, exiter : Exiter) = if errorLogger.ErrorCount > 0 then exiter.Exit 1 @@ -187,7 +187,7 @@ type DisposablesTracker() = try i.Dispose() with _ -> () -let TypeCheck (ctok, tcConfig, tcImports, tcGlobals, errorLogger:ErrorLogger, assemblyName, niceNameGen, tcEnv0, inputs, exiter: Exiter) = +let TypeCheck (ctok, tcConfig, tcImports, tcGlobals, errorLogger: ErrorLogger, assemblyName, niceNameGen, tcEnv0, inputs, exiter: Exiter) = try if isNil inputs then error(Error(FSComp.SR.fscNoImplementationFiles(), Range.rangeStartup)) let ccuName = assemblyName @@ -198,7 +198,7 @@ let TypeCheck (ctok, tcConfig, tcImports, tcGlobals, errorLogger:ErrorLogger, as exiter.Exit 1 /// Check for .fsx and, if present, compute the load closure for of #loaded files. -let AdjustForScriptCompile(ctok, tcConfigB:TcConfigBuilder, commandLineSourceFiles, lexResourceManager) = +let AdjustForScriptCompile(ctok, tcConfigB: TcConfigBuilder, commandLineSourceFiles, lexResourceManager) = let combineFilePath file = try @@ -215,7 +215,7 @@ let AdjustForScriptCompile(ctok, tcConfigB:TcConfigBuilder, commandLineSourceFil let tcConfig = TcConfig.Create(tcConfigB, validate=false) - let AddIfNotPresent(filename:string) = + let AddIfNotPresent(filename: string) = if not(!allSources |> List.contains filename) then allSources := filename::!allSources @@ -301,7 +301,7 @@ module InterfaceFileWriter = FSharpLib.ControlPath (IL.splitNamespace FSharpLib.ExtraTopLevelOperatorsName) ] - let WriteInterfaceFile (tcGlobals, tcConfig:TcConfig, infoReader, declaredImpls) = + let WriteInterfaceFile (tcGlobals, tcConfig: TcConfig, infoReader, declaredImpls) = /// Use a UTF-8 Encoding with no Byte Order Mark let os = @@ -332,11 +332,11 @@ module XmlDocWriter = | XmlDoc [| |] -> false | _ -> true - let computeXmlDocSigs (tcGlobals, generatedCcu:CcuThunk) = + let computeXmlDocSigs (tcGlobals, generatedCcu: CcuThunk) = (* the xmlDocSigOf* functions encode type into string to be used in "id" *) let g = tcGlobals - let doValSig ptext (v:Val) = if (hasDoc v.XmlDoc) then v.XmlDocSig <- XmlDocSigOfVal g ptext v - let doTyconSig ptext (tc:Tycon) = + let doValSig ptext (v: Val) = if (hasDoc v.XmlDoc) then v.XmlDocSig <- XmlDocSigOfVal g ptext v + let doTyconSig ptext (tc: Tycon) = if (hasDoc tc.XmlDoc) then tc.XmlDocSig <- XmlDocSigOfTycon [ptext; tc.CompiledName] for vref in tc.MembersOfFSharpTyconSorted do doValSig ptext vref.Deref @@ -351,9 +351,9 @@ module XmlDocWriter = else XmlDocSigOfField [ptext; tc.CompiledName; rf.Id.idText] - let doModuleMemberSig path (m:ModuleOrNamespace) = m.XmlDocSig <- XmlDocSigOfSubModul [path] + let doModuleMemberSig path (m: ModuleOrNamespace) = m.XmlDocSig <- XmlDocSigOfSubModul [path] (* moduleSpec - recurses *) - let rec doModuleSig path (mspec:ModuleOrNamespace) = + let rec doModuleSig path (mspec: ModuleOrNamespace) = let mtype = mspec.ModuleOrNamespaceType let path = (* skip the first item in the path which is the assembly name *) @@ -375,7 +375,7 @@ module XmlDocWriter = doModuleSig None generatedCcu.Contents - let writeXmlDoc (assemblyName, generatedCcu:CcuThunk, xmlfile) = + let writeXmlDoc (assemblyName, generatedCcu: CcuThunk, xmlfile) = if not (Filename.hasSuffixCaseInsensitive "xml" xmlfile ) then error(Error(FSComp.SR.docfileNoXmlSuffix(), Range.rangeStartup)) (* the xmlDocSigOf* functions encode type into string to be used in "id" *) @@ -384,10 +384,10 @@ module XmlDocWriter = if hasDoc xmlDoc then let doc = getDoc xmlDoc members := (id, doc) :: !members - let doVal (v:Val) = addMember v.XmlDocSig v.XmlDoc - let doUnionCase (uc:UnionCase) = addMember uc.XmlDocSig uc.XmlDoc - let doField (rf:RecdField) = addMember rf.XmlDocSig rf.XmlDoc - let doTycon (tc:Tycon) = + let doVal (v: Val) = addMember v.XmlDocSig v.XmlDoc + let doUnionCase (uc: UnionCase) = addMember uc.XmlDocSig uc.XmlDoc + let doField (rf: RecdField) = addMember rf.XmlDocSig rf.XmlDoc + let doTycon (tc: Tycon) = addMember tc.XmlDocSig tc.XmlDoc for vref in tc.MembersOfFSharpTyconSorted do doVal vref.Deref @@ -396,10 +396,10 @@ module XmlDocWriter = for rf in tc.AllFieldsArray do doField rf - let modulMember (m:ModuleOrNamespace) = addMember m.XmlDocSig m.XmlDoc + let modulMember (m: ModuleOrNamespace) = addMember m.XmlDocSig m.XmlDoc (* moduleSpec - recurses *) - let rec doModule (mspec:ModuleOrNamespace) = + let rec doModule (mspec: ModuleOrNamespace) = let mtype = mspec.ModuleOrNamespaceType if mspec.IsModule then modulMember mspec let vals = @@ -430,7 +430,7 @@ module XmlDocWriter = let DefaultFSharpBinariesDir = FSharpEnvironment.BinFolderOfDefaultFSharpCompiler(FSharpEnvironment.tryCurrentDomain()).Value -let GenerateInterfaceData(tcConfig:TcConfig) = +let GenerateInterfaceData(tcConfig: TcConfig) = not tcConfig.standalone && not tcConfig.noSignatureData let EncodeInterfaceData(tcConfig: TcConfig, tcGlobals, exportRemapping, generatedCcu, outfile, isIncrementalBuild) = @@ -482,11 +482,11 @@ module BinaryGenerationUtilities = let b2 n = byte ((n >>> 16) &&& 0xFF) let b3 n = byte ((n >>> 24) &&& 0xFF) - let i16 (i:int32) = [| b0 i; b1 i |] - let i32 (i:int32) = [| b0 i; b1 i; b2 i; b3 i |] + let i16 (i: int32) = [| b0 i; b1 i |] + let i32 (i: int32) = [| b0 i; b1 i; b2 i; b3 i |] // Emit the bytes and pad to a 32-bit alignment - let Padded initialAlignment (v:byte[]) = + let Padded initialAlignment (v: byte[]) = [| yield! v for _ in 1..(4 - (initialAlignment + v.Length) % 4) % 4 do yield 0x0uy |] @@ -496,7 +496,7 @@ module BinaryGenerationUtilities = module ResFileFormat = open BinaryGenerationUtilities - let ResFileNode(dwTypeID, dwNameID, wMemFlags, wLangID, data:byte[]) = + let ResFileNode(dwTypeID, dwNameID, wMemFlags, wLangID, data: byte[]) = [| yield! i32 data.Length // DWORD ResHdr.dwDataSize yield! i32 0x00000020 // dwHeaderSize yield! i32 ((dwTypeID <<< 16) ||| 0x0000FFFF) // dwTypeID, sizeof(DWORD) @@ -516,11 +516,11 @@ module ResFileFormat = module VersionResourceFormat = open BinaryGenerationUtilities - let VersionInfoNode(data:byte[]) = + let VersionInfoNode(data: byte[]) = [| yield! i16 (data.Length + 2) // wLength : int16 // Specifies the length, in bytes, of the VS_VERSION_INFO structure. yield! data |] - let VersionInfoElement(wType, szKey, valueOpt: byte[] option, children:byte[][], isString) = + let VersionInfoElement(wType, szKey, valueOpt: byte[] option, children: byte[][], isString) = // for String structs, wValueLength represents the word count, not the byte count let wValueLength = (match valueOpt with None -> 0 | Some value -> (if isString then value.Length / 2 else value.Length)) VersionInfoNode @@ -582,12 +582,12 @@ module VersionResourceFormat = yield! i16 codePage |]), [| |], false) |] VersionInfoElement(wType, szKey, None, children, false) - let VS_FIXEDFILEINFO(fileVersion:ILVersionInfo, - productVersion:ILVersionInfo, + let VS_FIXEDFILEINFO(fileVersion: ILVersionInfo, + productVersion: ILVersionInfo, dwFileFlagsMask, dwFileFlags, dwFileOS, dwFileType, dwFileSubtype, - lwFileDate:int64) = + lwFileDate: int64) = let dwStrucVersion = 0x00010000 [| // DWORD dwSignature // Contains the value 0xFEEFO4BD. yield! i32 0xFEEF04BD @@ -788,7 +788,7 @@ module MainModuleBuilder = Seq.map (fun t -> mkTypeForwarder (tcGlobals.ilg.primaryAssemblyScopeRef) t (mkILNestedExportedTypes List.empty) (mkILCustomAttrs List.empty) ILTypeDefAccess.Public ) |> Seq.toList - let createSystemNumericsExportList (tcConfig: TcConfig) (tcImports:TcImports) = + let createSystemNumericsExportList (tcConfig: TcConfig) (tcImports: TcImports) = let refNumericsDllName = if (tcConfig.primaryAssembly.Name = "mscorlib") then "System.Numerics" else "System.Runtime.Numerics" @@ -845,7 +845,7 @@ module MainModuleBuilder = let CreateMainModule - (ctok, tcConfig:TcConfig, tcGlobals, tcImports:TcImports, + (ctok, tcConfig: TcConfig, tcGlobals, tcImports: TcImports, pdbfile, assemblyName, outfile, topAttrs, (iattrs, intfDataResources), optDataResources, codegenResults, assemVerFromAttrib, metadataVersion, secDecls) = @@ -1211,7 +1211,7 @@ module StaticLinker = // build new FSharp.Core for that configuration. // // Find all IL modules that are to be statically linked given the static linking roots. - let LegacyFindAndAddMscorlibTypesForStaticLinkingIntoFSharpCoreLibraryForNet20 (tcConfig:TcConfig, ilGlobals:ILGlobals, ilxMainModule) = + let LegacyFindAndAddMscorlibTypesForStaticLinkingIntoFSharpCoreLibraryForNet20 (tcConfig: TcConfig, ilGlobals: ILGlobals, ilxMainModule) = let mscorlib40 = tcConfig.compilingFslib20.Value let ilBinaryReader = @@ -1274,7 +1274,7 @@ module StaticLinker = mutable visited: bool } // Find all IL modules that are to be statically linked given the static linking roots. - let FindDependentILModulesForStaticLinking (ctok, tcConfig:TcConfig, tcImports:TcImports, ilGlobals, ilxMainModule) = + let FindDependentILModulesForStaticLinking (ctok, tcConfig: TcConfig, tcImports: TcImports, ilGlobals, ilxMainModule) = if not tcConfig.standalone && tcConfig.extraStaticLinkRoots.IsEmpty then [] else @@ -1387,7 +1387,7 @@ module StaticLinker = yield (n.ccu, n.data) ] // Add all provider-generated assemblies into the static linking set - let FindProviderGeneratedILModules (ctok, tcImports:TcImports, providerGeneratedAssemblies: (ImportedBinary * _) list) = + let FindProviderGeneratedILModules (ctok, tcImports: TcImports, providerGeneratedAssemblies: (ImportedBinary * _) list) = [ for (importedBinary, provAssemStaticLinkInfo) in providerGeneratedAssemblies do let ilAssemRef = importedBinary.ILScopeRef.AssemblyRef if debugStaticLinking then printfn "adding provider-generated assembly '%s' into static linking set" ilAssemRef.Name @@ -1405,13 +1405,13 @@ module StaticLinker = // Compute a static linker. This only captures tcImports (a large data structure) if // static linking is enabled. Normally this is not the case, which lets us collect tcImports // prior to this point. - let StaticLink (ctok, tcConfig:TcConfig, tcImports:TcImports, ilGlobals:ILGlobals) = + let StaticLink (ctok, tcConfig: TcConfig, tcImports: TcImports, ilGlobals: ILGlobals) = #if !NO_EXTENSIONTYPING let providerGeneratedAssemblies = [ // Add all EST-generated assemblies into the static linking set - for KeyValue(_, importedBinary:ImportedBinary) in tcImports.DllTable do + for KeyValue(_, importedBinary: ImportedBinary) in tcImports.DllTable do if importedBinary.IsProviderGenerated then match importedBinary.ProviderGeneratedStaticLinkMap with | None -> () @@ -1470,7 +1470,7 @@ module StaticLinker = // Build a dictionary of all IL type defs, mapping ilOrigTyRef --> ilTypeDef let allTypeDefsInProviderGeneratedAssemblies = - let rec loop ilOrigTyRef (ilTypeDef:ILTypeDef) = + let rec loop ilOrigTyRef (ilTypeDef: ILTypeDef) = seq { yield (ilOrigTyRef, ilTypeDef) for ntdef in ilTypeDef.NestedTypes do yield! loop (mkILTyRefInTyRef (ilOrigTyRef, ntdef.Name)) ntdef } @@ -1510,7 +1510,7 @@ module StaticLinker = let access = (if isNested then ILTypeDefAccess.Nested ILMemberAccess.Public else ILTypeDefAccess.Public) let tdefs = mkILTypeDefs (List.map buildRelocatedGeneratedType ch) - mkILSimpleClass ilGlobals (ilTgtTyRef.Name, access, emptyILMethods, emptyILFields, tdefs , emptyILProperties, emptyILEvents, emptyILCustomAttrs, ILTypeInit.OnAny) + mkILSimpleClass ilGlobals (ilTgtTyRef.Name, access, emptyILMethods, emptyILFields, tdefs, emptyILProperties, emptyILEvents, emptyILCustomAttrs, ILTypeInit.OnAny) [ for (ProviderGeneratedType(_, ilTgtTyRef, _) as node) in tcImports.ProviderGeneratedTypeRoots do yield (ilTgtTyRef, buildRelocatedGeneratedType node) ] @@ -1528,7 +1528,7 @@ module StaticLinker = loop xs [] /// Implant the (nested) type definition 'td' at path 'enc' in 'tdefs'. - let rec implantTypeDef isNested (tdefs: ILTypeDefs) (enc:string list) (td: ILTypeDef) = + let rec implantTypeDef isNested (tdefs: ILTypeDefs) (enc: string list) (td: ILTypeDef) = match enc with | [] -> addILTypeDef td tdefs | h::t -> @@ -1665,10 +1665,6 @@ let GetStrongNameSigner signingInfo = // CopyFSharpCore //---------------------------------------------------------------------------- -#if FX_RESHAPED_REFLECTION -type private TypeInThisAssembly (_dummy:obj) = class end -#endif - // If the --nocopyfsharpcore switch is not specified, this will: // 1) Look into the referenced assemblies, if FSharp.Core.dll is specified, it will copy it to output directory. // 2) If not, but FSharp.Core.dll exists beside the compiler binaries, it will copy it to output directory. @@ -1685,11 +1681,7 @@ let CopyFSharpCore(outFile: string, referencedDlls: AssemblyReference list) = | Some referencedFsharpCoreDll -> copyFileIfDifferent referencedFsharpCoreDll.Text fsharpCoreDestinationPath | None -> let executionLocation = -#if FX_RESHAPED_REFLECTION - TypeInThisAssembly(null).GetType().GetTypeInfo().Assembly.Location -#else Assembly.GetExecutingAssembly().Location -#endif let compilerLocation = Path.GetDirectoryName(executionLocation) let compilerFsharpCoreDllPath = Path.Combine(compilerLocation, fsharpCoreAssemblyName) if File.Exists(compilerFsharpCoreDllPath) then @@ -1705,8 +1697,8 @@ let CopyFSharpCore(outFile: string, referencedDlls: AssemblyReference list) = type Args<'T> = Args of 'T let main0(ctok, argv, legacyReferenceResolver, bannerAlreadyPrinted, - reduceMemoryUsage:ReduceMemoryFlag, defaultCopyFSharpCore: CopyFSharpCoreFlag, - exiter:Exiter, errorLoggerProvider : ErrorLoggerProvider, disposables : DisposablesTracker) = + reduceMemoryUsage: ReduceMemoryFlag, defaultCopyFSharpCore: CopyFSharpCoreFlag, + exiter: Exiter, errorLoggerProvider : ErrorLoggerProvider, disposables : DisposablesTracker) = // See Bug 735819 let lcidFromCodePage = @@ -1829,7 +1821,7 @@ let main0(ctok, argv, legacyReferenceResolver, bannerAlreadyPrinted, let isLastCompiland, isExe = sourceFiles |> tcConfig.ComputeCanContainEntryPoint isLastCompiland |> List.zip sourceFiles // PERF: consider making this parallel, once uses of global state relevant to parsing are cleaned up - |> List.choose (fun (filename:string, isLastCompiland) -> + |> List.choose (fun (filename: string, isLastCompiland) -> let pathOfMetaCommandSource = Path.GetDirectoryName(filename) match ParseOneInputFile(tcConfig, lexResourceManager, ["COMPILED"], filename, (isLastCompiland, isExe), errorLogger, (*retryLocked*)false) with | Some input -> Some (input, pathOfMetaCommandSource) @@ -2008,7 +2000,7 @@ let main1OfAst (ctok, legacyReferenceResolver, reduceMemoryUsage, assemblyName, // data structures involved here are so large we can't take the risk. Args(ctok, tcConfig, tcImports, frameworkTcImports, tcGlobals, errorLogger, generatedCcu, outfile, typedAssembly, topAttrs, pdbFile, assemblyName, - assemVerFromAttrib, signingInfo ,exiter) + assemVerFromAttrib, signingInfo,exiter) /// Phase 2a: encode signature data, optimize, encode optimization data @@ -2094,7 +2086,7 @@ let main2b Args (ctok, tcConfig, tcImports, tcGlobals, errorLogger, staticLinker, outfile, pdbfile, ilxMainModule, signingInfo, exiter) /// Phase 3: static linking -let main3(Args (ctok, tcConfig, tcImports, tcGlobals, errorLogger: ErrorLogger, staticLinker, outfile, pdbfile, ilxMainModule, signingInfo, exiter:Exiter)) = +let main3(Args (ctok, tcConfig, tcImports, tcGlobals, errorLogger: ErrorLogger, staticLinker, outfile, pdbfile, ilxMainModule, signingInfo, exiter: Exiter)) = use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Output @@ -2124,7 +2116,7 @@ let main4 dynamicAssemblyCreator (Args (ctok, tcConfig, tcImports: TcImports, t let pdbfile = pdbfile |> Option.map (tcConfig.MakePathAbsolute >> FileSystem.GetFullPathShim) - let normalizeAssemblyRefs (aref:ILAssemblyRef) = + let normalizeAssemblyRefs (aref: ILAssemblyRef) = match tcImports.TryFindDllInfo (ctok, Range.rangeStartup, aref.Name, lookupOnly=false) with | Some dllInfo -> match dllInfo.ILScopeRef with @@ -2175,7 +2167,7 @@ let main4 dynamicAssemblyCreator (Args (ctok, tcConfig, tcImports: TcImports, t /// Entry point typecheckAndCompile let typecheckAndCompile (ctok, argv, legacyReferenceResolver, bannerAlreadyPrinted, reduceMemoryUsage, - defaultCopyFSharpCore, exiter:Exiter, errorLoggerProvider, tcImportsCapture, dynamicAssemblyCreator) = + defaultCopyFSharpCore, exiter: Exiter, errorLoggerProvider, tcImportsCapture, dynamicAssemblyCreator) = use d = new DisposablesTracker() use e = new SaveAndRestoreConsoleEncoding() diff --git a/src/fcs-fable/src/fsharp/fsc/fsc.fsproj b/src/fcs-fable/src/fsharp/fsc/fsc.fsproj index 40f56a0627..581b4a1179 100644 --- a/src/fcs-fable/src/fsharp/fsc/fsc.fsproj +++ b/src/fcs-fable/src/fsharp/fsc/fsc.fsproj @@ -5,16 +5,19 @@ Exe net46;netcoreapp2.1 + netcoreapp2.1 .exe - fsc $(NoWarn);45;55;62;75;1204 true $(OtherFlags) --maxerrors:20 --extraoptimizationloops:1 - true true true + + x86 + + fscmain.fs diff --git a/src/fcs-fable/src/fsharp/fscmain.fs b/src/fcs-fable/src/fsharp/fscmain.fs index 2a19cd0d6c..f74c47e0da 100644 --- a/src/fcs-fable/src/fsharp/fscmain.fs +++ b/src/fcs-fable/src/fsharp/fscmain.fs @@ -20,13 +20,7 @@ open FSharp.Compiler.CompileOps open FSharp.Compiler.AbstractIL.Internal.Library open Internal.Utilities -#if FX_RESHAPED_REFLECTION -open Microsoft.FSharp.Core.ReflectionAdapters -#endif - -#if !FX_NO_DEFAULT_DEPENDENCY_TYPE [] -#endif do () @@ -83,10 +77,8 @@ let main(argv) = System.Runtime.GCSettings.LatencyMode <- System.Runtime.GCLatencyMode.Batch use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parameter -#if !FX_NO_HEAPTERMINATION if not runningOnMono then Lib.UnmanagedProcessExecutionOptions.EnableHeapTerminationOnCorruption() (* SDL recommendation *) Lib.UnmanagedProcessExecutionOptions.EnableHeapTerminationOnCorruption() (* SDL recommendation *) -#endif try Driver.main(Array.append [| "fsc.exe" |] argv) diff --git a/src/fcs-fable/src/fsharp/fsi/fsi.fs b/src/fcs-fable/src/fsharp/fsi/fsi.fs index 29e2b3c956..7a4a8edead 100644 --- a/src/fcs-fable/src/fsharp/fsi/fsi.fs +++ b/src/fcs-fable/src/fsharp/fsi/fsi.fs @@ -55,11 +55,6 @@ open Internal.Utilities open Internal.Utilities.Collections open Internal.Utilities.StructuredFormat -#if FX_RESHAPED_REFLECTION -open Microsoft.FSharp.Core.ReflectionAdapters -#endif - - //---------------------------------------------------------------------------- // For the FSI as a service methods... //---------------------------------------------------------------------------- @@ -91,11 +86,7 @@ module internal Utilities = let ignoreAllErrors f = try f() with _ -> () // TODO: this dotnet/core polyfill can be removed when it surfaces in Type -#if FX_RESHAPED_REFLECTION - let getMember (name: string) (memberType: MemberTypes) (attr: System.Reflection.BindingFlags) (declaringType: Type) = -#else let getMember (name: string) (memberType: MemberTypes) (attr: BindingFlags) (declaringType: Type) = -#endif let memberType = if memberType &&& MemberTypes.NestedType = MemberTypes.NestedType then memberType ||| MemberTypes.TypeInfo @@ -104,11 +95,7 @@ module internal Utilities = declaringType.GetMembers(attr) |> Array.filter(fun m -> 0 <> (int(m.MemberType &&& memberType)) && m.Name = name) let rec tryFindMember (name: string) (memberType: MemberTypes) (declaringType: Type) = -#if FX_RESHAPED_REFLECTION - let bindingFlags = System.Reflection.BindingFlags.Instance ||| System.Reflection.BindingFlags.Public ||| System.Reflection.BindingFlags.NonPublic -#else let bindingFlags = BindingFlags.Instance ||| BindingFlags.Public ||| BindingFlags.NonPublic -#endif match declaringType |> getMember name memberType bindingFlags with | [||] -> declaringType.GetInterfaces() |> Array.tryPick (tryFindMember name memberType) | [|m|] -> Some m @@ -184,11 +171,6 @@ module internal Utilities = outWriter.WriteLine() -#if FX_RESHAPED_REFLECTION -// restore type alias -type BindingFlags = System.Reflection.BindingFlags -#endif - //---------------------------------------------------------------------------- // Timing support //---------------------------------------------------------------------------- @@ -714,8 +696,8 @@ type internal FsiCommandLineOptions(fsi: FsiEvaluationSessionHostConfig, argv: s Some (FSIstrings.SR.fsiHelp())) ]); PrivateOptions( - [ CompilerOption("?" , tagNone, OptionHelp (fun blocks -> displayHelpFsi tcConfigB blocks), None, None); // "Short form of --help"); - CompilerOption("help" , tagNone, OptionHelp (fun blocks -> displayHelpFsi tcConfigB blocks), None, None); // "Short form of --help"); + [ CompilerOption("?", tagNone, OptionHelp (fun blocks -> displayHelpFsi tcConfigB blocks), None, None); // "Short form of --help"); + CompilerOption("help", tagNone, OptionHelp (fun blocks -> displayHelpFsi tcConfigB blocks), None, None); // "Short form of --help"); CompilerOption("full-help", tagNone, OptionHelp (fun blocks -> displayHelpFsi tcConfigB blocks), None, None); // "Short form of --help"); ]); PublicOptions(FSComp.SR.optsHelpBannerAdvanced(), @@ -1588,23 +1570,17 @@ type internal FsiInterruptController(fsiOptions : FsiCommandLineOptions, module internal MagicAssemblyResolution = // FxCop identifies Assembly.LoadFrom. - [] - let private assemblyLoadFrom (path:string) = - // See bug 5501 for details on decision to use UnsafeLoadFrom here. // Summary: // It is an explicit user trust decision to load an assembly with #r. Scripts are not run automatically (for example, by double-clicking in explorer). // We considered setting loadFromRemoteSources in fsi.exe.config but this would transitively confer unsafe loading to the code in the referenced // assemblies. Better to let those assemblies decide for themselves which is safer. -#if NETSTANDARD1_6 || NETSTANDARD2_0 - Assembly.LoadFrom(path) -#else - Assembly.UnsafeLoadFrom(path) -#endif + [] + let private assemblyLoadFrom (path:string) = Assembly.UnsafeLoadFrom(path) let Install(tcConfigB, tcImports: TcImports, fsiDynamicCompiler: FsiDynamicCompiler, fsiConsoleOutput: FsiConsoleOutput) = -#if NETSTANDARD1_6 || NETSTANDARD2_0 +#if NETSTANDARD ignore tcConfigB ignore tcImports ignore fsiDynamicCompiler @@ -2005,9 +1981,9 @@ type internal FsiInteractionProcessor let rec execParsedInteractions (ctok, tcConfig, istate, action, errorLogger: ErrorLogger, lastResult:option) = let action,nextAction,istate = match action with - | None -> None ,None,istate + | None -> None,None,istate | Some (IHash _) -> action,None,istate - | Some (IDefns ([],_)) -> None ,None,istate + | Some (IDefns ([],_)) -> None,None,istate | Some (IDefns (SynModuleDecl.HashDirective(hash,mh)::defs,m)) -> Some (IHash(hash,mh)),Some (IDefns(defs,m)),istate @@ -2017,7 +1993,7 @@ type internal FsiInteractionProcessor // only add automatic debugger breaks before 'let' or 'do' expressions with sequence points match def with | SynModuleDecl.DoExpr (SequencePointInfoForBinding.SequencePointAtBinding _, _, _) - | SynModuleDecl.Let (_, SynBinding.Binding(_, _, _, _, _, _, _, _ ,_ ,_ ,_ , SequencePointInfoForBinding.SequencePointAtBinding _) :: _, _) -> true + | SynModuleDecl.Let (_, SynBinding.Binding(_, _, _, _, _, _, _, _,_,_,_, SequencePointInfoForBinding.SequencePointAtBinding _) :: _, _) -> true | _ -> false let defsA = Seq.takeWhile (isDefHash >> not) defs |> Seq.toList let defsB = Seq.skipWhile (isDefHash >> not) defs |> Seq.toList @@ -2414,9 +2390,7 @@ let internal DriveFsiEventLoop (fsi: FsiEvaluationSessionHostConfig, fsiConsoleO /// text input, writing to the given text output and error writers. type FsiEvaluationSession (fsi: FsiEvaluationSessionHostConfig, argv:string[], inReader:TextReader, outWriter:TextWriter, errorWriter: TextWriter, fsiCollectible: bool, legacyReferenceResolver: ReferenceResolver.Resolver option) = -#if !FX_NO_HEAPTERMINATION do if not runningOnMono then Lib.UnmanagedProcessExecutionOptions.EnableHeapTerminationOnCorruption() (* SDL recommendation *) -#endif // Explanation: When FsiEvaluationSession.Create is called we do a bunch of processing. For fsi.exe // and fsiAnyCpu.exe there are no other active threads at this point, so we can assume this is the @@ -2467,7 +2441,7 @@ type FsiEvaluationSession (fsi: FsiEvaluationSessionHostConfig, argv:string[], i do tcConfigB.resolutionEnvironment <- ResolutionEnvironment.CompilationAndEvaluation // See Bug 3608 do tcConfigB.useFsiAuxLib <- fsi.UseFsiAuxLib -#if NETSTANDARD1_6 || NETSTANDARD2_0 +#if NETSTANDARD do tcConfigB.useSimpleResolution <- true do SetTargetProfile tcConfigB "netcore" // always assume System.Runtime codegen #endif @@ -2477,7 +2451,7 @@ type FsiEvaluationSession (fsi: FsiEvaluationSessionHostConfig, argv:string[], i do SetDebugSwitch tcConfigB (Some "pdbonly") OptionSwitch.On do SetTailcallSwitch tcConfigB OptionSwitch.On -#if NETSTANDARD1_6 || NETSTANDARD2_0 +#if NETSTANDARD // set platform depending on whether the current process is a 64-bit process. // BUG 429882 : FsiAnyCPU.exe issues warnings (x64 v MSIL) when referencing 64-bit assemblies do tcConfigB.platform <- if IntPtr.Size = 8 then Some AMD64 else Some X86 diff --git a/src/fcs-fable/src/fsharp/fsi/fsi.fsproj b/src/fcs-fable/src/fsharp/fsi/fsi.fsproj index 5dbcac7557..77a9274a1e 100644 --- a/src/fcs-fable/src/fsharp/fsi/fsi.fsproj +++ b/src/fcs-fable/src/fsharp/fsi/fsi.fsproj @@ -5,18 +5,18 @@ Exe net46;netcoreapp2.1 + netcoreapp2.1 .exe - fsi $(NoWarn);45;55;62;75;1204 true $(OtherFlags) --warnon:1182 --maxerrors:20 --extraoptimizationloops:1 fsi.res - true true true + x86 $(DefineConstants);FSI_SHADOW_COPY_REFERENCES;FSI_SERVER diff --git a/src/fcs-fable/src/fsharp/fsi/fsimain.fs b/src/fcs-fable/src/fsharp/fsi/fsimain.fs index 90bf78b650..8bb27f1c63 100644 --- a/src/fcs-fable/src/fsharp/fsi/fsimain.fs +++ b/src/fcs-fable/src/fsharp/fsi/fsimain.fs @@ -28,21 +28,13 @@ open FSharp.Compiler.Interactive.Shell open FSharp.Compiler.Interactive open FSharp.Compiler.Interactive.Shell.Settings -#if FX_RESHAPED_REFLECTION -open Microsoft.FSharp.Core.ReflectionAdapters -#endif - #nowarn "55" #nowarn "40" // let rec on value 'fsiConfig' - // Hardbinding dependencies should we NGEN fsi.exe -#if !FX_NO_DEFAULT_DEPENDENCY_TYPE [] do () [] do () -#endif - // Standard attributes [] [] @@ -202,7 +194,7 @@ let evaluateSession(argv: string[]) = //#if USE_FSharp_Compiler_Interactive_Settings let fsiObjOpt = let defaultFSharpBinariesDir = -#if FX_RESHAPED_REFLECTION +#if FX_NO_APP_DOMAINS System.AppContext.BaseDirectory #else System.AppDomain.CurrentDomain.BaseDirectory @@ -324,9 +316,7 @@ let evaluateSession(argv: string[]) = // Mark the main thread as STAThread since it is a GUI thread [] [] -#if !FX_NO_LOADER_OPTIMIZATION [] -#endif let MainMain argv = ignore argv let argv = System.Environment.GetCommandLineArgs() diff --git a/src/fcs-fable/src/fsharp/fsiAnyCpu/fsiAnyCpu.fsproj b/src/fcs-fable/src/fsharp/fsiAnyCpu/fsiAnyCpu.fsproj index 200bd6d40a..b310a33b43 100644 --- a/src/fcs-fable/src/fsharp/fsiAnyCpu/fsiAnyCpu.fsproj +++ b/src/fcs-fable/src/fsharp/fsiAnyCpu/fsiAnyCpu.fsproj @@ -7,13 +7,12 @@ net46 AnyCPU .exe - fsiAnyCpu $(NoWarn);45;55;62;75;1204 true $(OtherFlags) --warnon:1182 --maxerrors:20 --extraoptimizationloops:1 ..\fsi\fsi.res - true true + true diff --git a/src/fcs-fable/src/fsharp/import.fs b/src/fcs-fable/src/fsharp/import.fs index c8cb751cca..2bbb90d638 100755 --- a/src/fcs-fable/src/fsharp/import.fs +++ b/src/fcs-fable/src/fsharp/import.fs @@ -52,13 +52,13 @@ type AssemblyLoader = /// 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. [] -type ImportMap(g:TcGlobals,assemblyLoader:AssemblyLoader) = - let typeRefToTyconRefCache = ConcurrentDictionary() +type ImportMap(g: TcGlobals, assemblyLoader: AssemblyLoader) = + let typeRefToTyconRefCache = ConcurrentDictionary() member this.g = g member this.assemblyLoader = assemblyLoader member this.ILTypeRefToTyconRefCache = typeRefToTyconRefCache -let CanImportILScopeRef (env:ImportMap) m scoref = +let CanImportILScopeRef (env: ImportMap) m scoref = match scoref with | ILScopeRef.Local -> true | ILScopeRef.Module _ -> true @@ -74,7 +74,7 @@ let CanImportILScopeRef (env:ImportMap) m scoref = /// Import a reference to a type definition, given the AbstractIL data for the type reference -let ImportTypeRefData (env:ImportMap) m (scoref,path,typeName) = +let ImportTypeRefData (env: ImportMap) m (scoref, path, typeName) = // Explanation: This represents an unchecked invariant in the hosted compiler: that any operations // which import types (and resolve assemblies from the tcImports tables) happen on the compilation thread. @@ -82,8 +82,8 @@ let ImportTypeRefData (env:ImportMap) m (scoref,path,typeName) = let ccu = match scoref with - | ILScopeRef.Local -> error(InternalError("ImportILTypeRef: unexpected local scope",m)) - | ILScopeRef.Module _ -> error(InternalError("ImportILTypeRef: reference found to a type in an auxiliary module",m)) + | ILScopeRef.Local -> error(InternalError("ImportILTypeRef: unexpected local scope", m)) + | ILScopeRef.Module _ -> error(InternalError("ImportILTypeRef: reference found to a type in an auxiliary module", m)) | ILScopeRef.Assembly assemblyRef -> env.assemblyLoader.FindCcuFromAssemblyRef (ctok, m, assemblyRef) // NOTE: only assemblyLoader callsite // Do a dereference of a fake tcref for the type just to check it exists in the target assembly and to find @@ -92,48 +92,48 @@ let ImportTypeRefData (env:ImportMap) m (scoref,path,typeName) = match ccu with | ResolvedCcu ccu->ccu | UnresolvedCcu ccuName -> - error (Error(FSComp.SR.impTypeRequiredUnavailable(typeName, ccuName),m)) + error (Error(FSComp.SR.impTypeRequiredUnavailable(typeName, ccuName), m)) let fakeTyconRef = mkNonLocalTyconRef (mkNonLocalEntityRef ccu path) typeName let tycon = try fakeTyconRef.Deref with _ -> - error (Error(FSComp.SR.impReferencedTypeCouldNotBeFoundInAssembly(String.concat "." (Array.append path [| typeName |]), ccu.AssemblyName),m)) + error (Error(FSComp.SR.impReferencedTypeCouldNotBeFoundInAssembly(String.concat "." (Array.append path [| typeName |]), ccu.AssemblyName), m)) #if !NO_EXTENSIONTYPING // Validate (once because of caching) match tycon.TypeReprInfo with | TProvidedTypeExtensionPoint info -> //printfn "ImportTypeRefData: validating type: typeLogicalName = %A" typeName - ExtensionTyping.ValidateProvidedTypeAfterStaticInstantiation(m,info.ProvidedType,path,typeName) + ExtensionTyping.ValidateProvidedTypeAfterStaticInstantiation(m, info.ProvidedType, path, typeName) | _ -> () #endif match tryRescopeEntity ccu tycon with - | ValueNone -> error (Error(FSComp.SR.impImportedAssemblyUsesNotPublicType(String.concat "." (Array.toList path@[typeName])),m)) + | ValueNone -> error (Error(FSComp.SR.impImportedAssemblyUsesNotPublicType(String.concat "." (Array.toList path@[typeName])), m)) | ValueSome tcref -> tcref /// Import a reference to a type definition, given an AbstractIL ILTypeRef, without caching // // Note, the type names that flow to the point include the "mangled" type names used for static parameters for provided types. -// For example, +// For example, // Foo.Bar,"1.0" // This is because ImportProvidedType goes via Abstract IL type references. -let ImportILTypeRefUncached (env:ImportMap) m (tref:ILTypeRef) = - let path,typeName = +let ImportILTypeRefUncached (env: ImportMap) m (tref: ILTypeRef) = + let path, typeName = match tref.Enclosing with | [] -> splitILTypeNameWithPossibleStaticArguments tref.Name | h :: t -> - let nsp,tname = splitILTypeNameWithPossibleStaticArguments h + let nsp, tname = splitILTypeNameWithPossibleStaticArguments h // Note, subsequent type names do not need to be split, only the first [| yield! nsp; yield tname; yield! t |], tref.Name - ImportTypeRefData (env:ImportMap) m (tref.Scope,path,typeName) + ImportTypeRefData (env: ImportMap) m (tref.Scope, path, typeName) /// Import a reference to a type definition, given an AbstractIL ILTypeRef, with caching -let ImportILTypeRef (env:ImportMap) m (tref:ILTypeRef) = +let ImportILTypeRef (env: ImportMap) m (tref: ILTypeRef) = match env.ILTypeRefToTyconRefCache.TryGetValue(tref) with | true, tcref -> tcref | _ -> @@ -142,23 +142,23 @@ let ImportILTypeRef (env:ImportMap) m (tref:ILTypeRef) = tcref /// Import a reference to a type definition, given an AbstractIL ILTypeRef, with caching -let CanImportILTypeRef (env:ImportMap) m (tref:ILTypeRef) = +let CanImportILTypeRef (env: ImportMap) m (tref: ILTypeRef) = env.ILTypeRefToTyconRefCache.ContainsKey(tref) || CanImportILScopeRef env m tref.Scope /// Import a type, given an AbstractIL ILTypeRef and an F# type instantiation. /// /// Prefer the F# abbreviation for some built-in types, e.g. 'string' rather than /// 'System.String', since we prefer the F# abbreviation to the .NET equivalents. -let ImportTyconRefApp (env:ImportMap) tcref tyargs = +let ImportTyconRefApp (env: ImportMap) tcref tyargs = env.g.improveType tcref tyargs /// Import an IL type as an F# type. -let rec ImportILType (env:ImportMap) m tinst ty = +let rec ImportILType (env: ImportMap) m tinst ty = match ty with | ILType.Void -> env.g.unit_ty - | ILType.Array(bounds,ty) -> + | ILType.Array(bounds, ty) -> let n = bounds.Rank let elementType = ImportILType env m tinst ty mkArrayTy env.g n elementType m @@ -172,15 +172,15 @@ let rec ImportILType (env:ImportMap) m tinst ty = | ILType.Ptr ILType.Void when env.g.voidptr_tcr.CanDeref -> mkVoidPtrTy env.g | ILType.Ptr ty -> mkNativePtrTy env.g (ImportILType env m tinst ty) | ILType.FunctionPointer _ -> env.g.nativeint_ty (* failwith "cannot import this kind of type (ptr, fptr)" *) - | ILType.Modified(_,_,ty) -> + | ILType.Modified(_, _, ty) -> // All custom modifiers are ignored ImportILType env m tinst ty | ILType.TypeVar u16 -> try List.item (int u16) tinst with _ -> - error(Error(FSComp.SR.impNotEnoughTypeParamsInScopeWhileImporting(),m)) + error(Error(FSComp.SR.impNotEnoughTypeParamsInScopeWhileImporting(), m)) -let rec CanImportILType (env:ImportMap) m ty = +let rec CanImportILType (env: ImportMap) m ty = match ty with | ILType.Void -> true | ILType.Array(_bounds, ety) -> CanImportILType env m ety @@ -190,58 +190,58 @@ let rec CanImportILType (env:ImportMap) m ty = | ILType.Byref ety -> CanImportILType env m ety | ILType.Ptr ety -> CanImportILType env m ety | ILType.FunctionPointer _ -> true - | ILType.Modified(_,_,ety) -> CanImportILType env m ety + | ILType.Modified(_, _, ety) -> CanImportILType env m ety | ILType.TypeVar _u16 -> true #if !NO_EXTENSIONTYPING /// Import a provided type reference as an F# type TyconRef -let ImportProvidedNamedType (env:ImportMap) (m:range) (st:Tainted) = +let ImportProvidedNamedType (env: ImportMap) (m: range) (st: Tainted) = // See if a reverse-mapping exists for a generated/relocated System.Type - match st.PUntaint((fun st -> st.TryGetTyconRef()),m) with + match st.PUntaint((fun st -> st.TryGetTyconRef()), m) with | Some x -> (x :?> TyconRef) | None -> - let tref = ExtensionTyping.GetILTypeRefOfProvidedType (st,m) + let tref = ExtensionTyping.GetILTypeRefOfProvidedType (st, m) ImportILTypeRef env m tref /// Import a provided type as an AbstractIL type -let rec ImportProvidedTypeAsILType (env:ImportMap) (m:range) (st:Tainted) = - if st.PUntaint ((fun x -> x.IsVoid),m) then ILType.Void - elif st.PUntaint((fun st -> st.IsGenericParameter),m) then - mkILTyvarTy (uint16 (st.PUntaint((fun st -> st.GenericParameterPosition),m))) - elif st.PUntaint((fun st -> st.IsArray),m) then - let et = ImportProvidedTypeAsILType env m (st.PApply((fun st -> st.GetElementType()),m)) - ILType.Array(ILArrayShape.FromRank (st.PUntaint((fun st -> st.GetArrayRank()),m)), et) - elif st.PUntaint((fun st -> st.IsByRef),m) then - let et = ImportProvidedTypeAsILType env m (st.PApply((fun st -> st.GetElementType()),m)) +let rec ImportProvidedTypeAsILType (env: ImportMap) (m: range) (st: Tainted) = + if st.PUntaint ((fun x -> x.IsVoid), m) then ILType.Void + elif st.PUntaint((fun st -> st.IsGenericParameter), m) then + mkILTyvarTy (uint16 (st.PUntaint((fun st -> st.GenericParameterPosition), m))) + elif st.PUntaint((fun st -> st.IsArray), m) then + let et = ImportProvidedTypeAsILType env m (st.PApply((fun st -> st.GetElementType()), m)) + ILType.Array(ILArrayShape.FromRank (st.PUntaint((fun st -> st.GetArrayRank()), m)), et) + elif st.PUntaint((fun st -> st.IsByRef), m) then + let et = ImportProvidedTypeAsILType env m (st.PApply((fun st -> st.GetElementType()), m)) ILType.Byref et - elif st.PUntaint((fun st -> st.IsPointer),m) then - let et = ImportProvidedTypeAsILType env m (st.PApply((fun st -> st.GetElementType()),m)) + elif st.PUntaint((fun st -> st.IsPointer), m) then + let et = ImportProvidedTypeAsILType env m (st.PApply((fun st -> st.GetElementType()), m)) ILType.Ptr et else let gst, genericArgs = - if st.PUntaint((fun st -> st.IsGenericType),m) then - let args = st.PApplyArray((fun st -> st.GetGenericArguments()),"GetGenericArguments",m) |> Array.map (ImportProvidedTypeAsILType env m) |> List.ofArray - let gst = st.PApply((fun st -> st.GetGenericTypeDefinition()),m) + if st.PUntaint((fun st -> st.IsGenericType), m) then + let args = st.PApplyArray((fun st -> st.GetGenericArguments()), "GetGenericArguments", m) |> Array.map (ImportProvidedTypeAsILType env m) |> List.ofArray + let gst = st.PApply((fun st -> st.GetGenericTypeDefinition()), m) gst, args else st, [] - let tref = ExtensionTyping.GetILTypeRefOfProvidedType (gst,m) + let tref = ExtensionTyping.GetILTypeRefOfProvidedType (gst, m) let tcref = ImportProvidedNamedType env m gst let tps = tcref.Typars m if tps.Length <> genericArgs.Length then - error(Error(FSComp.SR.impInvalidNumberOfGenericArguments(tcref.CompiledName, tps.Length, genericArgs.Length),m)) + error(Error(FSComp.SR.impInvalidNumberOfGenericArguments(tcref.CompiledName, tps.Length, genericArgs.Length), m)) // We're converting to an IL type, where generic arguments are erased - let genericArgs = List.zip tps genericArgs |> List.filter (fun (tp,_) -> not tp.IsErased) |> List.map snd + let genericArgs = List.zip tps genericArgs |> List.filter (fun (tp, _) -> not tp.IsErased) |> List.map snd - let tspec = mkILTySpec(tref,genericArgs) - if st.PUntaint((fun st -> st.IsValueType),m) then + let tspec = mkILTySpec(tref, genericArgs) + if st.PUntaint((fun st -> st.IsValueType), m) then ILType.Value tspec else mkILBoxedType tspec /// Import a provided type as an F# type. -let rec ImportProvidedType (env:ImportMap) (m:range) (* (tinst:TypeInst) *) (st:Tainted) = +let rec ImportProvidedType (env: ImportMap) (m: range) (* (tinst: TypeInst) *) (st: Tainted) = // Explanation: The two calls below represent am unchecked invariant of the hosted compiler: // that type providers are only activated on the CompilationThread. This invariant is not currently checked @@ -253,14 +253,14 @@ let rec ImportProvidedType (env:ImportMap) (m:range) (* (tinst:TypeInst) *) (st: RequireCompilationThread ctok let g = env.g - if st.PUntaint((fun st -> st.IsArray),m) then - let elemTy = (ImportProvidedType env m (* tinst *) (st.PApply((fun st -> st.GetElementType()),m))) - mkArrayTy g (st.PUntaint((fun st -> st.GetArrayRank()),m)) elemTy m - elif st.PUntaint((fun st -> st.IsByRef),m) then - let elemTy = (ImportProvidedType env m (* tinst *) (st.PApply((fun st -> st.GetElementType()),m))) + if st.PUntaint((fun st -> st.IsArray), m) then + let elemTy = (ImportProvidedType env m (* tinst *) (st.PApply((fun st -> st.GetElementType()), m))) + mkArrayTy g (st.PUntaint((fun st -> st.GetArrayRank()), m)) elemTy m + elif st.PUntaint((fun st -> st.IsByRef), m) then + let elemTy = (ImportProvidedType env m (* tinst *) (st.PApply((fun st -> st.GetElementType()), m))) mkByrefTy g elemTy - elif st.PUntaint((fun st -> st.IsPointer),m) then - let elemTy = (ImportProvidedType env m (* tinst *) (st.PApply((fun st -> st.GetElementType()),m))) + elif st.PUntaint((fun st -> st.IsPointer), m) then + let elemTy = (ImportProvidedType env m (* tinst *) (st.PApply((fun st -> st.GetElementType()), m))) if isUnitTy g elemTy || isVoidTy g elemTy && g.voidptr_tcr.CanDeref then mkVoidPtrTy g else @@ -269,10 +269,10 @@ let rec ImportProvidedType (env:ImportMap) (m:range) (* (tinst:TypeInst) *) (st: // REVIEW: Extension type could try to be its own generic arg (or there could be a type loop) let tcref, genericArgs = - if st.PUntaint((fun st -> st.IsGenericType),m) then - let tcref = ImportProvidedNamedType env m (st.PApply((fun st -> st.GetGenericTypeDefinition()),m)) - let args = st.PApplyArray((fun st -> st.GetGenericArguments()),"GetGenericArguments",m) |> Array.map (ImportProvidedType env m (* tinst *) ) |> List.ofArray - tcref,args + if st.PUntaint((fun st -> st.IsGenericType), m) then + let tcref = ImportProvidedNamedType env m (st.PApply((fun st -> st.GetGenericTypeDefinition()), m)) + let args = st.PApplyArray((fun st -> st.GetGenericArguments()), "GetGenericArguments", m) |> Array.map (ImportProvidedType env m (* tinst *) ) |> List.ofArray + tcref, args else let tcref = ImportProvidedNamedType env m st tcref, [] @@ -290,22 +290,22 @@ let rec ImportProvidedType (env:ImportMap) (m:range) (* (tinst:TypeInst) *) (st: let tps = tcref.Typars m if tps.Length <> genericArgs.Length then - error(Error(FSComp.SR.impInvalidNumberOfGenericArguments(tcref.CompiledName, tps.Length, genericArgs.Length),m)) + error(Error(FSComp.SR.impInvalidNumberOfGenericArguments(tcref.CompiledName, tps.Length, genericArgs.Length), m)) let genericArgs = - (tps,genericArgs) ||> List.map2 (fun tp genericArg -> + (tps, genericArgs) ||> List.map2 (fun tp genericArg -> if tp.Kind = TyparKind.Measure then let rec conv ty = match ty with - | TType_app (tcref,[t1;t2]) when tyconRefEq g tcref g.measureproduct_tcr -> Measure.Prod (conv t1, conv t2) - | TType_app (tcref,[t1]) when tyconRefEq g tcref g.measureinverse_tcr -> Measure.Inv (conv t1) - | TType_app (tcref,[]) when tyconRefEq g tcref g.measureone_tcr -> Measure.One - | TType_app (tcref,[]) when tcref.TypeOrMeasureKind = TyparKind.Measure -> Measure.Con tcref - | TType_app (tcref,_) -> - errorR(Error(FSComp.SR.impInvalidMeasureArgument1(tcref.CompiledName, tp.Name),m)) + | TType_app (tcref, [t1;t2]) when tyconRefEq g tcref g.measureproduct_tcr -> Measure.Prod (conv t1, conv t2) + | TType_app (tcref, [t1]) when tyconRefEq g tcref g.measureinverse_tcr -> Measure.Inv (conv t1) + | TType_app (tcref, []) when tyconRefEq g tcref g.measureone_tcr -> Measure.One + | TType_app (tcref, []) when tcref.TypeOrMeasureKind = TyparKind.Measure -> Measure.Con tcref + | TType_app (tcref, _) -> + errorR(Error(FSComp.SR.impInvalidMeasureArgument1(tcref.CompiledName, tp.Name), m)) Measure.One | _ -> - errorR(Error(FSComp.SR.impInvalidMeasureArgument2(tp.Name),m)) + errorR(Error(FSComp.SR.impInvalidMeasureArgument2(tp.Name), m)) Measure.One TType_measure (conv genericArg) @@ -316,73 +316,73 @@ let rec ImportProvidedType (env:ImportMap) (m:range) (* (tinst:TypeInst) *) (st: /// Import a provided method reference as an Abstract IL method reference -let ImportProvidedMethodBaseAsILMethodRef (env:ImportMap) (m:range) (mbase: Tainted) = - let tref = ExtensionTyping.GetILTypeRefOfProvidedType (mbase.PApply((fun mbase -> mbase.DeclaringType),m), m) +let ImportProvidedMethodBaseAsILMethodRef (env: ImportMap) (m: range) (mbase: Tainted) = + let tref = ExtensionTyping.GetILTypeRefOfProvidedType (mbase.PApply((fun mbase -> mbase.DeclaringType), m), m) let mbase = // Find the formal member corresponding to the called member match mbase.OfType() with | Some minfo when - minfo.PUntaint((fun minfo -> minfo.IsGenericMethod|| minfo.DeclaringType.IsGenericType),m) -> - let declaringType = minfo.PApply((fun minfo -> minfo.DeclaringType),m) + minfo.PUntaint((fun minfo -> minfo.IsGenericMethod|| minfo.DeclaringType.IsGenericType), m) -> + let declaringType = minfo.PApply((fun minfo -> minfo.DeclaringType), m) let declaringGenericTypeDefn = - if declaringType.PUntaint((fun t -> t.IsGenericType),m) then - declaringType.PApply((fun declaringType -> declaringType.GetGenericTypeDefinition()),m) + if declaringType.PUntaint((fun t -> t.IsGenericType), m) then + declaringType.PApply((fun declaringType -> declaringType.GetGenericTypeDefinition()), m) else declaringType - let methods = declaringGenericTypeDefn.PApplyArray((fun x -> x.GetMethods()),"GetMethods",m) - let metadataToken = minfo.PUntaint((fun minfo -> minfo.MetadataToken),m) - let found = methods |> Array.tryFind (fun x -> x.PUntaint((fun x -> x.MetadataToken),m) = metadataToken) + let methods = declaringGenericTypeDefn.PApplyArray((fun x -> x.GetMethods()), "GetMethods", m) + let metadataToken = minfo.PUntaint((fun minfo -> minfo.MetadataToken), m) + let found = methods |> Array.tryFind (fun x -> x.PUntaint((fun x -> x.MetadataToken), m) = metadataToken) match found with | Some found -> found.Coerce(m) | None -> - let methodName = minfo.PUntaint((fun minfo -> minfo.Name),m) - let typeName = declaringGenericTypeDefn.PUntaint((fun declaringGenericTypeDefn -> declaringGenericTypeDefn.FullName),m) - error(NumberedError(FSComp.SR.etIncorrectProvidedMethod(ExtensionTyping.DisplayNameOfTypeProvider(minfo.TypeProvider, m),methodName,metadataToken,typeName), m)) + let methodName = minfo.PUntaint((fun minfo -> minfo.Name), m) + let typeName = declaringGenericTypeDefn.PUntaint((fun declaringGenericTypeDefn -> declaringGenericTypeDefn.FullName), m) + error(NumberedError(FSComp.SR.etIncorrectProvidedMethod(ExtensionTyping.DisplayNameOfTypeProvider(minfo.TypeProvider, m), methodName, metadataToken, typeName), m)) | _ -> match mbase.OfType() with - | Some cinfo when cinfo.PUntaint((fun x -> x.DeclaringType.IsGenericType),m) -> - let declaringType = cinfo.PApply((fun x -> x.DeclaringType),m) - let declaringGenericTypeDefn = declaringType.PApply((fun x -> x.GetGenericTypeDefinition()),m) + | Some cinfo when cinfo.PUntaint((fun x -> x.DeclaringType.IsGenericType), m) -> + let declaringType = cinfo.PApply((fun x -> x.DeclaringType), m) + let declaringGenericTypeDefn = declaringType.PApply((fun x -> x.GetGenericTypeDefinition()), m) // We have to find the uninstantiated formal signature corresponding to this instantiated constructor. // Annoyingly System.Reflection doesn't give us a MetadataToken to compare on, so we have to look by doing // the instantiation and comparing.. let found = - let ctors = declaringGenericTypeDefn.PApplyArray((fun x -> x.GetConstructors()),"GetConstructors",m) + let ctors = declaringGenericTypeDefn.PApplyArray((fun x -> x.GetConstructors()), "GetConstructors", m) let actualParameterTypes = - [ for p in cinfo.PApplyArray((fun x -> x.GetParameters()), "GetParameters",m) do - yield ImportProvidedType env m (p.PApply((fun p -> p.ParameterType),m)) ] + [ for p in cinfo.PApplyArray((fun x -> x.GetParameters()), "GetParameters", m) do + yield ImportProvidedType env m (p.PApply((fun p -> p.ParameterType), m)) ] let actualGenericArgs = argsOfAppTy env.g (ImportProvidedType env m declaringType) ctors |> Array.tryFind (fun ctor -> let formalParameterTypesAfterInstantiation = - [ for p in ctor.PApplyArray((fun x -> x.GetParameters()), "GetParameters",m) do - let ilFormalTy = ImportProvidedTypeAsILType env m (p.PApply((fun p -> p.ParameterType),m)) + [ for p in ctor.PApplyArray((fun x -> x.GetParameters()), "GetParameters", m) do + let ilFormalTy = ImportProvidedTypeAsILType env m (p.PApply((fun p -> p.ParameterType), m)) yield ImportILType env m actualGenericArgs ilFormalTy ] - (formalParameterTypesAfterInstantiation,actualParameterTypes) ||> List.lengthsEqAndForall2 (typeEquiv env.g)) + (formalParameterTypesAfterInstantiation, actualParameterTypes) ||> List.lengthsEqAndForall2 (typeEquiv env.g)) match found with | Some found -> found.Coerce(m) | None -> - let typeName = declaringGenericTypeDefn.PUntaint((fun x -> x.FullName),m) - error(NumberedError(FSComp.SR.etIncorrectProvidedConstructor(ExtensionTyping.DisplayNameOfTypeProvider(cinfo.TypeProvider, m),typeName), m)) + let typeName = declaringGenericTypeDefn.PUntaint((fun x -> x.FullName), m) + error(NumberedError(FSComp.SR.etIncorrectProvidedConstructor(ExtensionTyping.DisplayNameOfTypeProvider(cinfo.TypeProvider, m), typeName), m)) | _ -> mbase let rty = match mbase.OfType() with - | Some minfo -> minfo.PApply((fun minfo -> minfo.ReturnType),m) + | Some minfo -> minfo.PApply((fun minfo -> minfo.ReturnType), m) | None -> match mbase.OfType() with - | Some _ -> mbase.PApply((fun _ -> ProvidedType.Void),m) + | Some _ -> mbase.PApply((fun _ -> ProvidedType.Void), m) | _ -> failwith "unexpected" let genericArity = - if mbase.PUntaint((fun x -> x.IsGenericMethod),m) then - mbase.PUntaint((fun x -> x.GetGenericArguments().Length),m) + if mbase.PUntaint((fun x -> x.IsGenericMethod), m) then + mbase.PUntaint((fun x -> x.GetGenericArguments().Length), m) else 0 - let callingConv = (if mbase.PUntaint((fun x -> x.IsStatic),m) then ILCallingConv.Static else ILCallingConv.Instance) + let callingConv = (if mbase.PUntaint((fun x -> x.IsStatic), m) then ILCallingConv.Static else ILCallingConv.Instance) let parameters = - [ for p in mbase.PApplyArray((fun x -> x.GetParameters()), "GetParameters",m) do - yield ImportProvidedTypeAsILType env m (p.PApply((fun p -> p.ParameterType),m)) ] - mkILMethRef (tref, callingConv, mbase.PUntaint((fun x -> x.Name),m), genericArity, parameters, ImportProvidedTypeAsILType env m rty ) + [ for p in mbase.PApplyArray((fun x -> x.GetParameters()), "GetParameters", m) do + yield ImportProvidedTypeAsILType env m (p.PApply((fun p -> p.ParameterType), m)) ] + mkILMethRef (tref, callingConv, mbase.PUntaint((fun x -> x.Name), m), genericArity, parameters, ImportProvidedTypeAsILType env m rty ) #endif //------------------------------------------------------------------------- @@ -406,8 +406,8 @@ let ImportILGenericParameters amap m scoref tinst (gps: ILGenericParameterDefs) let tptys = tps |> List.map mkTyparTy let importInst = tinst@tptys - (tps,gps) ||> List.iter2 (fun tp gp -> - let constraints = gp.Constraints |> List.map (fun ilty -> TyparConstraint.CoercesTo(ImportILType amap m importInst (rescopeILType scoref ilty),m) ) + (tps, gps) ||> List.iter2 (fun tp gp -> + let constraints = gp.Constraints |> List.map (fun ilty -> TyparConstraint.CoercesTo(ImportILType amap m importInst (rescopeILType scoref ilty), m) ) let constraints = if gp.HasReferenceTypeConstraint then (TyparConstraint.IsReferenceType(m)::constraints) else constraints let constraints = if gp.HasNotNullableValueTypeConstraint then (TyparConstraint.IsNonNullableStruct(m)::constraints) else constraints let constraints = if gp.HasDefaultConstructorConstraint then (TyparConstraint.RequiresDefaultConstructor(m)::constraints) else constraints @@ -422,7 +422,7 @@ let ImportILGenericParameters amap m scoref tinst (gps: ILGenericParameterDefs) let multisetDiscriminateAndMap nodef tipf (items: ('Key list * 'Value) list) = // Find all the items with an empty key list and call 'tipf' let tips = - [ for (keylist,v) in items do + [ for (keylist, v) in items do match keylist with | [] -> yield tipf v | _ -> () ] @@ -430,23 +430,23 @@ let multisetDiscriminateAndMap nodef tipf (items: ('Key list * 'Value) list) = // Find all the items with a non-empty key list. Bucket them together by // the first key. For each bucket, call 'nodef' on that head key and the bucket. let nodes = - let buckets = new Dictionary<_,_>(10) - for (keylist,v) in items do + let buckets = new Dictionary<_, _>(10) + for (keylist, v) in items do match keylist with | [] -> () | key :: rest -> buckets.[key] <- match buckets.TryGetValue(key) with - | true, b -> (rest,v) :: b - | _ -> (rest,v) :: [] + | true, b -> (rest, v) :: b + | _ -> (rest, v) :: [] - [ for (KeyValue(key,items)) in buckets -> nodef key items ] + [ for (KeyValue(key, items)) in buckets -> nodef key items ] tips @ nodes /// Import an IL type definition as a new F# TAST Entity node. -let rec ImportILTypeDef amap m scoref (cpath:CompilationPath) enc nm (tdef:ILTypeDef) = +let rec ImportILTypeDef amap m scoref (cpath: CompilationPath) enc nm (tdef: ILTypeDef) = let lazyModuleOrNamespaceTypeForNestedTypes = lazy let cpath = cpath.NestedCompPath nm ModuleOrType @@ -454,17 +454,17 @@ let rec ImportILTypeDef amap m scoref (cpath:CompilationPath) enc nm (tdef:ILTyp // Add the type itself. NewILTycon (Some cpath) - (nm,m) + (nm, m) // The read of the type parameters may fail to resolve types. We pick up a new range from the point where that read is forced // Make sure we reraise the original exception one occurs - see findOriginalException. (LazyWithContext.Create((fun m -> ImportILGenericParameters amap m scoref [] tdef.GenericParams), ErrorLogger.findOriginalException)) - (scoref,enc,tdef) + (scoref, enc, tdef) (MaybeLazy.Lazy lazyModuleOrNamespaceTypeForNestedTypes) /// Import a list of (possibly nested) IL types as a new ModuleOrNamespaceType node /// containing new entities, bucketing by namespace along the way. -and ImportILTypeDefList amap m (cpath:CompilationPath) enc items = +and ImportILTypeDefList amap m (cpath: CompilationPath) enc items = // Split into the ones with namespaces and without. Add the ones with namespaces in buckets. // That is, discriminate based in the first element of the namespace list (e.g. "System") // and, for each bag, fold-in a lazy computation to add the types under that bag . @@ -479,8 +479,8 @@ and ImportILTypeDefList amap m (cpath:CompilationPath) enc items = (fun n tgs -> let modty = lazy (ImportILTypeDefList amap m (cpath.NestedCompPath n Namespace) enc tgs) NewModuleOrNamespace (Some cpath) taccessPublic (mkSynId m n) XmlDoc.Empty [] (MaybeLazy.Lazy modty)) - (fun (n,info:Lazy<_>) -> - let (scoref2,_,lazyTypeDef:ILPreTypeDef) = info.Force() + (fun (n, info: Lazy<_>) -> + let (scoref2, _, lazyTypeDef: ILPreTypeDef) = info.Force() ImportILTypeDef amap m scoref2 cpath enc n (lazyTypeDef.GetTypeDef())) let kind = match enc with [] -> Namespace | _ -> ModuleOrType @@ -491,7 +491,7 @@ and ImportILTypeDefList amap m (cpath:CompilationPath) enc items = and ImportILTypeDefs amap m scoref cpath enc (tdefs: ILTypeDefs) = // We be very careful not to force a read of the type defs here tdefs.AsArrayOfPreTypeDefs - |> Array.map (fun pre -> (pre.Namespace,(pre.Name,notlazy(scoref,pre.MetadataIndex,pre)))) + |> Array.map (fun pre -> (pre.Namespace, (pre.Name, notlazy(scoref, pre.MetadataIndex, pre)))) |> Array.toList |> ImportILTypeDefList amap m cpath enc @@ -501,15 +501,15 @@ and ImportILTypeDefs amap m scoref cpath enc (tdefs: ILTypeDefs) = /// the return ModuleOrNamespaceType will contain namespace entities for "System" and "Library", which in turn contain /// type definition entities for ["Char"; "Int32"] and ["C"] respectively. let ImportILAssemblyMainTypeDefs amap m scoref modul = - modul.TypeDefs |> ImportILTypeDefs amap m scoref (CompPath(scoref,[])) [] + modul.TypeDefs |> ImportILTypeDefs amap m scoref (CompPath(scoref, [])) [] /// Import the "exported types" table for multi-module assemblies. -let ImportILAssemblyExportedType amap m auxModLoader (scoref:ILScopeRef) (exportedType:ILExportedTypeOrForwarder) = +let ImportILAssemblyExportedType amap m auxModLoader (scoref: ILScopeRef) (exportedType: ILExportedTypeOrForwarder) = // Forwarders are dealt with separately in the ref->def dereferencing logic in tast.fs as they effectively give rise to type equivalences if exportedType.IsForwarder then [] else - let ns,n = splitILTypeName exportedType.Name + let ns, n = splitILTypeName exportedType.Name let info = lazy (match (try @@ -519,11 +519,11 @@ let ImportILAssemblyExportedType amap m auxModLoader (scoref:ILScopeRef) (export with :? KeyNotFoundException -> None) with | None -> - error(Error(FSComp.SR.impReferenceToDllRequiredByAssembly(exportedType.ScopeRef.QualifiedName, scoref.QualifiedName, exportedType.Name),m)) + error(Error(FSComp.SR.impReferenceToDllRequiredByAssembly(exportedType.ScopeRef.QualifiedName, scoref.QualifiedName, exportedType.Name), m)) | Some preTypeDef -> - scoref,-1,preTypeDef) + scoref, -1, preTypeDef) - [ ImportILTypeDefList amap m (CompPath(scoref,[])) [] [(ns,(n,info))] ] + [ ImportILTypeDefList amap m (CompPath(scoref, [])) [] [(ns, (n, info))] ] /// Import the "exported types" table for multi-module assemblies. let ImportILAssemblyExportedTypes amap m auxModLoader scoref (exportedTypes: ILExportedTypesAndForwarders) = @@ -532,42 +532,42 @@ let ImportILAssemblyExportedTypes amap m auxModLoader scoref (exportedTypes: ILE /// Import both the main type definitions and the "exported types" table, i.e. all the /// types defined in an IL assembly. -let ImportILAssemblyTypeDefs (amap, m, auxModLoader, aref, mainmod:ILModuleDef) = +let ImportILAssemblyTypeDefs (amap, m, auxModLoader, aref, mainmod: ILModuleDef) = let scoref = ILScopeRef.Assembly aref let mtypsForExportedTypes = ImportILAssemblyExportedTypes amap m auxModLoader scoref mainmod.ManifestOfAssembly.ExportedTypes let mainmod = ImportILAssemblyMainTypeDefs amap m scoref mainmod CombineCcuContentFragments m (mainmod :: mtypsForExportedTypes) /// Import the type forwarder table for an IL assembly -let ImportILAssemblyTypeForwarders (amap, m, exportedTypes:ILExportedTypesAndForwarders) = +let ImportILAssemblyTypeForwarders (amap, m, exportedTypes: ILExportedTypesAndForwarders) = // Note 'td' may be in another module or another assembly! // Note: it is very important that we call auxModLoader lazily [ //printfn "reading forwarders..." for exportedType in exportedTypes.AsList do - let ns,n = splitILTypeName exportedType.Name + let ns, n = splitILTypeName exportedType.Name //printfn "found forwarder for %s..." n - let tcref = lazy ImportILTypeRefUncached (amap()) m (ILTypeRef.Create(exportedType.ScopeRef,[],exportedType.Name)) - yield (Array.ofList ns,n),tcref - let rec nested (nets:ILNestedExportedTypes) enc = + let tcref = lazy ImportILTypeRefUncached (amap()) m (ILTypeRef.Create(exportedType.ScopeRef, [], exportedType.Name)) + yield (Array.ofList ns, n), tcref + let rec nested (nets: ILNestedExportedTypes) enc = [ for net in nets.AsList do //printfn "found nested forwarder for %s..." net.Name - let tcref = lazy ImportILTypeRefUncached (amap()) m (ILTypeRef.Create (exportedType.ScopeRef,enc,net.Name)) - yield (Array.ofList enc,exportedType.Name),tcref + let tcref = lazy ImportILTypeRefUncached (amap()) m (ILTypeRef.Create (exportedType.ScopeRef, enc, net.Name)) + yield (Array.ofList enc, exportedType.Name), tcref yield! nested net.Nested (enc @ [ net.Name ]) ] yield! nested exportedType.Nested (ns@[n]) ] |> Map.ofList /// Import an IL assembly as a new TAST CCU -let ImportILAssembly(amap:(unit -> ImportMap), m, auxModuleLoader, ilScopeRef, sourceDir, filename, ilModule:ILModuleDef, invalidateCcu:IEvent) = +let ImportILAssembly(amap:(unit -> ImportMap), m, auxModuleLoader, ilScopeRef, sourceDir, filename, ilModule: ILModuleDef, invalidateCcu: IEvent) = invalidateCcu |> ignore let aref = match ilScopeRef with | ILScopeRef.Assembly aref -> aref - | _ -> error(InternalError("ImportILAssembly: cannot reference .NET netmodules directly, reference the containing assembly instead",m)) + | _ -> error(InternalError("ImportILAssembly: cannot reference .NET netmodules directly, reference the containing assembly instead", m)) let nm = aref.Name - let mty = ImportILAssemblyTypeDefs(amap,m,auxModuleLoader,aref,ilModule) + let mty = ImportILAssemblyTypeDefs(amap, m, auxModuleLoader, aref, ilModule) let ccuData : CcuData = { IsFSharp=false UsesFSharp20PlusQuotations=false @@ -587,6 +587,6 @@ let ImportILAssembly(amap:(unit -> ImportMap), m, auxModuleLoader, ilScopeRef, s TypeForwarders = (match ilModule.Manifest with | None -> Map.empty - | Some manifest -> ImportILAssemblyTypeForwarders(amap,m,manifest.ExportedTypes)) } + | Some manifest -> ImportILAssemblyTypeForwarders(amap, m, manifest.ExportedTypes)) } - CcuThunk.Create(nm,ccuData) + CcuThunk.Create(nm, ccuData) diff --git a/src/fcs-fable/src/fsharp/infos.fs b/src/fcs-fable/src/fsharp/infos.fs index d8b2cc37f4..ae9e1ff49a 100755 --- a/src/fcs-fable/src/fsharp/infos.fs +++ b/src/fcs-fable/src/fsharp/infos.fs @@ -1,15 +1,11 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -/// tinfos, minfos, finfos, pinfos - summaries of information for references -/// to .NET and F# constructs. - - module internal FSharp.Compiler.Infos -open FSharp.Compiler.AbstractIL -open FSharp.Compiler.AbstractIL.IL +open FSharp.Compiler.AbstractIL +open FSharp.Compiler.AbstractIL.IL open FSharp.Compiler.AbstractIL.Internal.Library -open FSharp.Compiler +open FSharp.Compiler open FSharp.Compiler.Range open FSharp.Compiler.Ast open FSharp.Compiler.ErrorLogger @@ -24,78 +20,74 @@ open Microsoft.FSharp.Core.Printf open FSharp.Compiler.ExtensionTyping #endif -#if FX_RESHAPED_REFLECTION -open Microsoft.FSharp.Core.ReflectionAdapters -#endif - //------------------------------------------------------------------------- // From IL types to F# types -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- /// Import an IL type as an F# type. importInst gives the context for interpreting type variables. -let ImportILType scoref amap m importInst ilty = - ilty |> rescopeILType scoref |> Import.ImportILType amap m importInst +let ImportILType scoref amap m importInst ilty = + ilty |> rescopeILType scoref |> Import.ImportILType amap m importInst -let CanImportILType scoref amap m ilty = - ilty |> rescopeILType scoref |> Import.CanImportILType amap m +let CanImportILType scoref amap m ilty = + ilty |> rescopeILType scoref |> Import.CanImportILType amap m //------------------------------------------------------------------------- -// Fold the hierarchy. +// Fold the hierarchy. // REVIEW: this code generalizes the iteration used below for member lookup. -//------------------------------------------------------------------------- +//------------------------------------------------------------------------- /// Indicates if an F# type is the type associated with an F# exception declaration -let isExnDeclTy g ty = +let isExnDeclTy g ty = isAppTy g ty && (tcrefOfAppTy g ty).IsExceptionDecl - + /// Get the base type of a type, taking into account type instantiations. Return None if the /// type has no base type. -let GetSuperTypeOfType g amap m ty = +let GetSuperTypeOfType g amap m ty = #if !NO_EXTENSIONTYPING let ty = (if isAppTy g ty && (tcrefOfAppTy g ty).IsProvided then stripTyEqns g ty else stripTyEqnsAndMeasureEqns g ty) #else - let ty = stripTyEqnsAndMeasureEqns g ty + let ty = stripTyEqnsAndMeasureEqns g ty #endif - match metadataOfTy g ty with + match metadataOfTy g ty with #if !NO_EXTENSIONTYPING - | ProvidedTypeMetadata info -> + | ProvidedTypeMetadata info -> let st = info.ProvidedType - let superOpt = st.PApplyOption((fun st -> match st.BaseType with null -> None | t -> Some t),m) - match superOpt with + let superOpt = st.PApplyOption((fun st -> match st.BaseType with null -> None | t -> Some t), m) + match superOpt with | None -> None | Some super -> Some(Import.ImportProvidedType amap m super) #endif - | ILTypeMetadata (TILObjectReprData(scoref,_,tdef)) -> + | ILTypeMetadata (TILObjectReprData(scoref, _, tdef)) -> let tinst = argsOfAppTy g ty - match tdef.Extends with + match tdef.Extends with | None -> None | Some ilty -> Some (ImportILType scoref amap m tinst ilty) - | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> - if isFSharpObjModelTy g ty || isExnDeclTy g ty then + | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> + if isFSharpObjModelTy g ty || isExnDeclTy g ty then let tcref = tcrefOfAppTy g ty Some (instType (mkInstForAppTy g ty) (superOfTycon g tcref.Deref)) elif isArrayTy g ty then Some g.system_Array_ty - elif isRefTy g ty && not (isObjTy g ty) then + elif isRefTy g ty && not (isObjTy g ty) then Some g.obj_ty - elif isStructTupleTy g ty then + elif isStructTupleTy g ty then Some g.obj_ty elif isFSharpStructOrEnumTy g ty then if isFSharpEnumTy g ty then Some(g.system_Enum_ty) else Some (g.system_Value_ty) - elif isAnonRecdTy g ty then + elif isAnonRecdTy g ty then Some g.obj_ty elif isRecdTy g ty || isUnionTy g ty then Some g.obj_ty - else + else None /// Make a type for System.Collections.Generic.IList -let mkSystemCollectionsGenericIListTy (g: TcGlobals) ty = TType_app(g.tcref_System_Collections_Generic_IList,[ty]) +let mkSystemCollectionsGenericIListTy (g: TcGlobals) ty = TType_app(g.tcref_System_Collections_Generic_IList, [ty]) [] /// Indicates whether we can skip interface types that lie outside the reference set @@ -104,65 +96,65 @@ type SkipUnrefInterfaces = Yes | No /// Collect the set of immediate declared interface types for an F# type, but do not /// traverse the type hierarchy to collect further interfaces. -let rec GetImmediateInterfacesOfType skipUnref g amap m ty = - let itys = +let rec GetImmediateInterfacesOfType skipUnref g amap m ty = + let itys = match tryAppTy g ty with - | ValueSome(tcref,tinst) -> - if tcref.IsMeasureableReprTycon then - [ match tcref.TypeReprInfo with - | TMeasureableRepr reprTy -> - for ity in GetImmediateInterfacesOfType skipUnref g amap m reprTy do - if isAppTy g ity then + | ValueSome(tcref, tinst) -> + if tcref.IsMeasureableReprTycon then + [ match tcref.TypeReprInfo with + | TMeasureableRepr reprTy -> + for ity in GetImmediateInterfacesOfType skipUnref g amap m reprTy do + if isAppTy g ity then let itcref = tcrefOfAppTy g ity - if not (tyconRefEq g itcref g.system_GenericIComparable_tcref) && - not (tyconRefEq g itcref g.system_GenericIEquatable_tcref) then + if not (tyconRefEq g itcref g.system_GenericIComparable_tcref) && + not (tyconRefEq g itcref g.system_GenericIEquatable_tcref) then yield ity | _ -> () - yield mkAppTy g.system_GenericIComparable_tcref [ty] + yield mkAppTy g.system_GenericIComparable_tcref [ty] yield mkAppTy g.system_GenericIEquatable_tcref [ty]] else - match metadataOfTy g ty with + match metadataOfTy g ty with #if !NO_EXTENSIONTYPING - | ProvidedTypeMetadata info -> + | ProvidedTypeMetadata info -> [ for ity in info.ProvidedType.PApplyArray((fun st -> st.GetInterfaces()), "GetInterfaces", m) do yield Import.ImportProvidedType amap m ity ] #endif - | ILTypeMetadata (TILObjectReprData(scoref,_,tdef)) -> + | ILTypeMetadata (TILObjectReprData(scoref, _, tdef)) -> // ImportILType may fail for an interface if the assembly load set is incomplete and the interface // comes from another assembly. In this case we simply skip the interface: // if we don't skip it, then compilation will just fail here, and if type checking - // succeeds with fewer non-dereferencable interfaces reported then it would have - // succeeded with more reported. There are pathological corner cases where this - // doesn't apply: e.g. for mscorlib interfaces like IComparable, but we can always - // assume those are present. - tdef.Implements |> List.choose (fun ity -> - if skipUnref = SkipUnrefInterfaces.No || CanImportILType scoref amap m ity then + // succeeds with fewer non-dereferencable interfaces reported then it would have + // succeeded with more reported. There are pathological corner cases where this + // doesn't apply: e.g. for mscorlib interfaces like IComparable, but we can always + // assume those are present. + tdef.Implements |> List.choose (fun ity -> + if skipUnref = SkipUnrefInterfaces.No || CanImportILType scoref amap m ity then Some (ImportILType scoref amap m tinst ity) else None) - | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> - tcref.ImmediateInterfaceTypesOfFSharpTycon |> List.map (instType (mkInstForAppTy g ty)) + | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> + tcref.ImmediateInterfaceTypesOfFSharpTycon |> List.map (instType (mkInstForAppTy g ty)) | _ -> [] - + // .NET array types are considered to implement IList let itys = - if isArray1DTy g ty then + if isArray1DTy g ty then mkSystemCollectionsGenericIListTy g (destArrayTy g ty) :: itys - else + else itys itys - + [] /// Indicates whether we should visit multiple instantiations of the same generic interface or not type AllowMultiIntfInstantiations = Yes | No -/// Traverse the type hierarchy, e.g. f D (f C (f System.Object acc)). +/// Traverse the type hierarchy, e.g. f D (f C (f System.Object acc)). /// Visit base types and interfaces first. -let private FoldHierarchyOfTypeAux followInterfaces allowMultiIntfInst skipUnref visitor g amap m ty acc = - let rec loop ndeep ty ((visitedTycon,visited:TyconRefMultiMap<_>,acc) as state) = +let private FoldHierarchyOfTypeAux followInterfaces allowMultiIntfInst skipUnref visitor g amap m ty acc = + let rec loop ndeep ty ((visitedTycon, visited: TyconRefMultiMap<_>, acc) as state) = - let seenThisTycon = isAppTy g ty && Set.contains (tcrefOfAppTy g ty).Stamp visitedTycon + let seenThisTycon = isAppTy g ty && Set.contains (tcrefOfAppTy g ty).Stamp visitedTycon // Do not visit the same type twice. Could only be doing this if we've seen this tycon if seenThisTycon && List.exists (typeEquiv g ty) (visited.Find (tcrefOfAppTy g ty)) then state else @@ -170,28 +162,28 @@ let private FoldHierarchyOfTypeAux followInterfaces allowMultiIntfInst skipUnref // Do not visit the same tycon twice, e.g. I and I, collect I only, unless directed to allow this if seenThisTycon && allowMultiIntfInst = AllowMultiIntfInstantiations.No then state else - let state = - if isAppTy g ty then + let state = + if isAppTy g ty then let tcref = tcrefOfAppTy g ty - let visitedTycon = Set.add tcref.Stamp visitedTycon - visitedTycon, visited.Add (tcref,ty), acc + let visitedTycon = Set.add tcref.Stamp visitedTycon + visitedTycon, visited.Add (tcref, ty), acc else state - if ndeep > 100 then (errorR(Error((FSComp.SR.recursiveClassHierarchy (showType ty)),m)); (visitedTycon,visited,acc)) else - let visitedTycon,visited,acc = - if isInterfaceTy g ty then - List.foldBack - (loop (ndeep+1)) - (GetImmediateInterfacesOfType skipUnref g amap m ty) + if ndeep > 100 then (errorR(Error((FSComp.SR.recursiveClassHierarchy (showType ty)), m)); (visitedTycon, visited, acc)) else + let visitedTycon, visited, acc = + if isInterfaceTy g ty then + List.foldBack + (loop (ndeep+1)) + (GetImmediateInterfacesOfType skipUnref g amap m ty) (loop ndeep g.obj_ty state) else match tryDestTyparTy g ty with | ValueSome tp -> - let state = loop (ndeep+1) g.obj_ty state - List.foldBack - (fun x vacc -> - match x with + let state = loop (ndeep+1) g.obj_ty state + List.foldBack + (fun x vacc -> + match x with | TyparConstraint.MayResolveMember _ | TyparConstraint.DefaultsTo _ | TyparConstraint.SupportsComparison _ @@ -199,89 +191,89 @@ let private FoldHierarchyOfTypeAux followInterfaces allowMultiIntfInst skipUnref | TyparConstraint.IsEnum _ | TyparConstraint.IsDelegate _ | TyparConstraint.SupportsNull _ - | TyparConstraint.IsNonNullableStruct _ - | TyparConstraint.IsUnmanaged _ - | TyparConstraint.IsReferenceType _ - | TyparConstraint.SimpleChoice _ + | TyparConstraint.IsNonNullableStruct _ + | TyparConstraint.IsUnmanaged _ + | TyparConstraint.IsReferenceType _ + | TyparConstraint.SimpleChoice _ | TyparConstraint.RequiresDefaultConstructor _ -> vacc - | TyparConstraint.CoercesTo(cty,_) -> - loop (ndeep + 1) cty vacc) - tp.Constraints + | TyparConstraint.CoercesTo(cty, _) -> + loop (ndeep + 1) cty vacc) + tp.Constraints state - | _ -> - let state = - if followInterfaces then - List.foldBack - (loop (ndeep+1)) - (GetImmediateInterfacesOfType skipUnref g amap m ty) - state - else + | _ -> + let state = + if followInterfaces then + List.foldBack + (loop (ndeep+1)) + (GetImmediateInterfacesOfType skipUnref g amap m ty) + state + else state - let state = - Option.foldBack - (loop (ndeep+1)) - (GetSuperTypeOfType g amap m ty) + let state = + Option.foldBack + (loop (ndeep+1)) + (GetSuperTypeOfType g amap m ty) state state let acc = visitor ty acc - (visitedTycon,visited,acc) - loop 0 ty (Set.empty,TyconRefMultiMap<_>.Empty,acc) |> p33 + (visitedTycon, visited, acc) + loop 0 ty (Set.empty, TyconRefMultiMap<_>.Empty, acc) |> p33 /// Fold, do not follow interfaces (unless the type is itself an interface) -let FoldPrimaryHierarchyOfType f g amap m allowMultiIntfInst ty acc = - FoldHierarchyOfTypeAux false allowMultiIntfInst SkipUnrefInterfaces.No f g amap m ty acc +let FoldPrimaryHierarchyOfType f g amap m allowMultiIntfInst ty acc = + FoldHierarchyOfTypeAux false allowMultiIntfInst SkipUnrefInterfaces.No f g amap m ty acc /// Fold, following interfaces. Skipping interfaces that lie outside the referenced assembly set is allowed. -let FoldEntireHierarchyOfType f g amap m allowMultiIntfInst ty acc = +let FoldEntireHierarchyOfType f g amap m allowMultiIntfInst ty acc = FoldHierarchyOfTypeAux true allowMultiIntfInst SkipUnrefInterfaces.Yes f g amap m ty acc /// Iterate, following interfaces. Skipping interfaces that lie outside the referenced assembly set is allowed. -let IterateEntireHierarchyOfType f g amap m allowMultiIntfInst ty = - FoldHierarchyOfTypeAux true allowMultiIntfInst SkipUnrefInterfaces.Yes (fun ty () -> f ty) g amap m ty () +let IterateEntireHierarchyOfType f g amap m allowMultiIntfInst ty = + FoldHierarchyOfTypeAux true allowMultiIntfInst SkipUnrefInterfaces.Yes (fun ty () -> f ty) g amap m ty () /// Search for one element satisfying a predicate, following interfaces -let ExistsInEntireHierarchyOfType f g amap m allowMultiIntfInst ty = - FoldHierarchyOfTypeAux true allowMultiIntfInst SkipUnrefInterfaces.Yes (fun ty acc -> acc || f ty ) g amap m ty false +let ExistsInEntireHierarchyOfType f g amap m allowMultiIntfInst ty = + FoldHierarchyOfTypeAux true allowMultiIntfInst SkipUnrefInterfaces.Yes (fun ty acc -> acc || f ty ) g amap m ty false /// Search for one element where a function returns a 'Some' result, following interfaces -let SearchEntireHierarchyOfType f g amap m ty = +let SearchEntireHierarchyOfType f g amap m ty = FoldHierarchyOfTypeAux true AllowMultiIntfInstantiations.Yes SkipUnrefInterfaces.Yes - (fun ty acc -> - match acc with - | None -> if f ty then Some(ty) else None - | Some _ -> acc) + (fun ty acc -> + match acc with + | None -> if f ty then Some(ty) else None + | Some _ -> acc) g amap m ty None /// Get all super types of the type, including the type itself -let AllSuperTypesOfType g amap m allowMultiIntfInst ty = - FoldHierarchyOfTypeAux true allowMultiIntfInst SkipUnrefInterfaces.No (ListSet.insert (typeEquiv g)) g amap m ty [] +let AllSuperTypesOfType g amap m allowMultiIntfInst ty = + FoldHierarchyOfTypeAux true allowMultiIntfInst SkipUnrefInterfaces.No (ListSet.insert (typeEquiv g)) g amap m ty [] /// Get all interfaces of a type, including the type itself if it is an interface -let AllInterfacesOfType g amap m allowMultiIntfInst ty = +let AllInterfacesOfType g amap m allowMultiIntfInst ty = AllSuperTypesOfType g amap m allowMultiIntfInst ty |> List.filter (isInterfaceTy g) /// Check if two types have the same nominal head type -let HaveSameHeadType g ty1 ty2 = +let HaveSameHeadType g ty1 ty2 = isAppTy g ty1 && isAppTy g ty2 && tyconRefEq g (tcrefOfAppTy g ty1) (tcrefOfAppTy g ty2) /// Check if a type has a particular head type -let HasHeadType g tcref ty2 = +let HasHeadType g tcref ty2 = isAppTy g ty2 && tyconRefEq g tcref (tcrefOfAppTy g ty2) - + /// 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) -let ExistsSameHeadTypeInHierarchy g amap m typeToSearchFrom typeToLookFor = +let ExistsSameHeadTypeInHierarchy g amap m typeToSearchFrom typeToLookFor = ExistsInEntireHierarchyOfType (HaveSameHeadType g typeToLookFor) g amap m AllowMultiIntfInstantiations.Yes typeToSearchFrom - + /// Check if a type exists somewhere in the hierarchy which has the given head type. -let ExistsHeadTypeInEntireHierarchy g amap m typeToSearchFrom tcrefToLookFor = +let ExistsHeadTypeInEntireHierarchy g amap m typeToSearchFrom tcrefToLookFor = ExistsInEntireHierarchyOfType (HasHeadType g tcrefToLookFor) g amap m AllowMultiIntfInstantiations.Yes typeToSearchFrom - + /// Read an Abstract IL type from metadata and convert to an F# type. -let ImportILTypeFromMetadata amap m scoref tinst minst ilty = +let ImportILTypeFromMetadata amap m scoref tinst minst ilty = ImportILType scoref amap m (tinst@minst) ilty /// Read an Abstract IL type from metadata, including any attributes that may affect the type itself, and convert to an F# type. @@ -293,14 +285,14 @@ let ImportILTypeFromMetadataWithAttributes amap m scoref tinst minst ilty cattrs else ty -/// Get the parameter type of an IL method. +/// Get the parameter type of an IL method. let ImportParameterTypeFromMetadata amap m ilty cattrs scoref tinst mist = ImportILTypeFromMetadataWithAttributes amap m scoref tinst mist ilty cattrs - + /// 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'. let ImportReturnTypeFromMetadata amap m ilty cattrs scoref tinst minst = - match ilty with + match ilty with | ILType.Void -> None | retTy -> Some(ImportILTypeFromMetadataWithAttributes amap m scoref tinst minst retTy cattrs) @@ -308,93 +300,93 @@ let ImportReturnTypeFromMetadata amap m ilty cattrs scoref tinst minst = /// 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 +/// 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. -let CopyTyparConstraints m tprefInst (tporig:Typar) = - tporig.Constraints - |> List.map (fun tpc -> - match tpc with - | TyparConstraint.CoercesTo(ty,_) -> - TyparConstraint.CoercesTo (instType tprefInst ty,m) - | TyparConstraint.DefaultsTo(priority,ty,_) -> - TyparConstraint.DefaultsTo (priority,instType tprefInst ty,m) - | TyparConstraint.SupportsNull _ -> +let CopyTyparConstraints m tprefInst (tporig: Typar) = + tporig.Constraints + |> List.map (fun tpc -> + match tpc with + | TyparConstraint.CoercesTo(ty, _) -> + TyparConstraint.CoercesTo (instType tprefInst ty, m) + | TyparConstraint.DefaultsTo(priority, ty, _) -> + TyparConstraint.DefaultsTo (priority, instType tprefInst ty, m) + | TyparConstraint.SupportsNull _ -> TyparConstraint.SupportsNull m - | TyparConstraint.IsEnum (uty,_) -> - TyparConstraint.IsEnum (instType tprefInst uty,m) - | TyparConstraint.SupportsComparison _ -> + | TyparConstraint.IsEnum (uty, _) -> + TyparConstraint.IsEnum (instType tprefInst uty, m) + | TyparConstraint.SupportsComparison _ -> TyparConstraint.SupportsComparison m - | TyparConstraint.SupportsEquality _ -> + | TyparConstraint.SupportsEquality _ -> TyparConstraint.SupportsEquality m - | TyparConstraint.IsDelegate(aty, bty,_) -> - TyparConstraint.IsDelegate (instType tprefInst aty,instType tprefInst bty,m) - | TyparConstraint.IsNonNullableStruct _ -> + | TyparConstraint.IsDelegate(aty, bty, _) -> + TyparConstraint.IsDelegate (instType tprefInst aty, instType tprefInst bty, m) + | TyparConstraint.IsNonNullableStruct _ -> TyparConstraint.IsNonNullableStruct m | TyparConstraint.IsUnmanaged _ -> TyparConstraint.IsUnmanaged m - | TyparConstraint.IsReferenceType _ -> + | TyparConstraint.IsReferenceType _ -> TyparConstraint.IsReferenceType m - | TyparConstraint.SimpleChoice (tys,_) -> - TyparConstraint.SimpleChoice (List.map (instType tprefInst) tys,m) - | TyparConstraint.RequiresDefaultConstructor _ -> + | TyparConstraint.SimpleChoice (tys, _) -> + TyparConstraint.SimpleChoice (List.map (instType tprefInst) tys, m) + | TyparConstraint.RequiresDefaultConstructor _ -> TyparConstraint.RequiresDefaultConstructor m - | TyparConstraint.MayResolveMember(traitInfo,_) -> - TyparConstraint.MayResolveMember (instTrait tprefInst traitInfo,m)) + | TyparConstraint.MayResolveMember(traitInfo, _) -> + TyparConstraint.MayResolveMember (instTrait tprefInst traitInfo, m)) -/// The constraints for each typar copied from another typar can only be fixed up once -/// we have generated all the new constraints, e.g. f List, B :> List> ... -let FixupNewTypars m (formalEnclosingTypars:Typars) (tinst: TType list) (tpsorig: Typars) (tps: Typars) = +/// The constraints for each typar copied from another typar can only be fixed up once +/// we have generated all the new constraints, e.g. f List, B :> List> ... +let FixupNewTypars m (formalEnclosingTypars: Typars) (tinst: TType list) (tpsorig: Typars) (tps: Typars) = // Checks.. These are defensive programming against early reported errors. let n0 = formalEnclosingTypars.Length let n1 = tinst.Length let n2 = tpsorig.Length let n3 = tps.Length - if n0 <> n1 then error(Error((FSComp.SR.tcInvalidTypeArgumentCount(n0,n1)),m)) - if n2 <> n3 then error(Error((FSComp.SR.tcInvalidTypeArgumentCount(n2,n3)),m)) + if n0 <> n1 then error(Error((FSComp.SR.tcInvalidTypeArgumentCount(n0, n1)), m)) + if n2 <> n3 then error(Error((FSComp.SR.tcInvalidTypeArgumentCount(n2, n3)), m)) - // The real code.. - let renaming,tptys = mkTyparToTyparRenaming tpsorig tps + // The real code.. + let renaming, tptys = mkTyparToTyparRenaming tpsorig tps let tprefInst = mkTyparInst formalEnclosingTypars tinst @ renaming - (tpsorig,tps) ||> List.iter2 (fun tporig tp -> tp.SetConstraints (CopyTyparConstraints m tprefInst tporig)) - renaming,tptys + (tpsorig, tps) ||> List.iter2 (fun tporig tp -> tp.SetConstraints (CopyTyparConstraints m tprefInst tporig)) + renaming, tptys //------------------------------------------------------------------------- // Predicates and properties on values and members - -type ValRef with + +type ValRef with /// Indicates if an F#-declared function or member value is a CLIEvent property compiled as a .NET event - member x.IsFSharpEventProperty g = + member x.IsFSharpEventProperty g = x.IsMember && CompileAsEvent g x.Attribs && not x.IsExtensionMember /// Check if an F#-declared member value is a virtual method - member vref.IsVirtualMember = + member vref.IsVirtualMember = let flags = vref.MemberInfo.Value.MemberFlags flags.IsDispatchSlot || flags.IsOverrideOrExplicitImpl /// Check if an F#-declared member value is a dispatch slot - member vref.IsDispatchSlotMember = + member vref.IsDispatchSlotMember = let membInfo = vref.MemberInfo.Value - membInfo.MemberFlags.IsDispatchSlot + membInfo.MemberFlags.IsDispatchSlot /// Check if an F#-declared member value is an 'override' or explicit member implementation - member vref.IsDefiniteFSharpOverrideMember = - let membInfo = vref.MemberInfo.Value + member vref.IsDefiniteFSharpOverrideMember = + let membInfo = vref.MemberInfo.Value let flags = membInfo.MemberFlags not flags.IsDispatchSlot && (flags.IsOverrideOrExplicitImpl || not (isNil membInfo.ImplementedSlotSigs)) /// Check if an F#-declared member value is an explicit interface member implementation - member vref.IsFSharpExplicitInterfaceImplementation g = - match vref.MemberInfo with + member vref.IsFSharpExplicitInterfaceImplementation g = + match vref.MemberInfo with | None -> false | Some membInfo -> - not membInfo.MemberFlags.IsDispatchSlot && - (match membInfo.ImplementedSlotSigs with - | TSlotSig(_,oty,_,_,_,_) :: _ -> isInterfaceTy g oty + not membInfo.MemberFlags.IsDispatchSlot && + (match membInfo.ImplementedSlotSigs with + | TSlotSig(_, oty, _, _, _, _) :: _ -> isInterfaceTy g oty | [] -> false) member vref.ImplementedSlotSignatures = @@ -403,90 +395,90 @@ type ValRef with | Some membInfo -> membInfo.ImplementedSlotSigs //------------------------------------------------------------------------- -// Helper methods associated with using TAST metadata (F# members, values etc.) +// Helper methods associated with using TAST metadata (F# members, values etc.) // as backing data for MethInfo, PropInfo etc. #if !NO_EXTENSIONTYPING /// Get the return type of a provided method, where 'void' is returned as 'None' -let GetCompiledReturnTyOfProvidedMethodInfo amap m (mi:Tainted) = - let returnType = - if mi.PUntaint((fun mi -> mi.IsConstructor),m) then - mi.PApply((fun mi -> mi.DeclaringType),m) - else mi.Coerce(m).PApply((fun mi -> mi.ReturnType),m) +let GetCompiledReturnTyOfProvidedMethodInfo amap m (mi: Tainted) = + let returnType = + if mi.PUntaint((fun mi -> mi.IsConstructor), m) then + mi.PApply((fun mi -> mi.DeclaringType), m) + else mi.Coerce(m).PApply((fun mi -> mi.ReturnType), m) let ty = Import.ImportProvidedType amap m returnType if isVoidTy amap.g ty then None else Some ty #endif /// 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 -let ReparentSlotSigToUseMethodTypars g m ovByMethValRef slotsig = +/// Reverse-map the slotsig so it is in terms of the type parameters for the overriding method +let ReparentSlotSigToUseMethodTypars g m ovByMethValRef slotsig = match PartitionValRefTypars g ovByMethValRef with - | Some(_,enclosingTypars,_,_,_) -> - let parentToMemberInst,_ = mkTyparToTyparRenaming (ovByMethValRef.MemberApparentEntity.Typars(m)) enclosingTypars + | Some(_, enclosingTypars, _, _, _) -> + let parentToMemberInst, _ = mkTyparToTyparRenaming (ovByMethValRef.MemberApparentEntity.Typars(m)) enclosingTypars let res = instSlotSig parentToMemberInst slotsig res - | None -> - // Note: it appears PartitionValRefTypars should never return 'None' + | None -> + // Note: it appears PartitionValRefTypars should never return 'None' slotsig /// Construct the data representing a parameter in the signature of an abstract method slot -let MakeSlotParam (ty,argInfo:ArgReprInfo) = TSlotParam(Option.map textOfId argInfo.Name, ty, false,false,false,argInfo.Attribs) +let MakeSlotParam (ty, argInfo: ArgReprInfo) = TSlotParam(Option.map textOfId argInfo.Name, ty, false, false, false, argInfo.Attribs) /// Construct the data representing the signature of an abstract method slot -let MakeSlotSig (nm,ty,ctps,mtps,paraml,retTy) = copySlotSig (TSlotSig(nm,ty,ctps,mtps,paraml,retTy)) +let MakeSlotSig (nm, ty, ctps, mtps, paraml, retTy) = copySlotSig (TSlotSig(nm, ty, ctps, mtps, paraml, retTy)) -/// Split the type of an F# member value into +/// Split the type of an F# member value into /// - the type parameters associated with method but matching those of the enclosing type /// - the type parameters associated with a generic method /// - the return type of the method /// - the actual type arguments of the enclosing type. -let private AnalyzeTypeOfMemberVal isCSharpExt g (ty,vref:ValRef) = - let memberAllTypars,_,retTy,_ = GetTypeOfMemberInMemberForm g vref - if isCSharpExt || vref.IsExtensionMember then - [],memberAllTypars,retTy,[] +let private AnalyzeTypeOfMemberVal isCSharpExt g (ty, vref: ValRef) = + let memberAllTypars, _, retTy, _ = GetTypeOfMemberInMemberForm g vref + if isCSharpExt || vref.IsExtensionMember then + [], memberAllTypars, retTy, [] else let parentTyArgs = argsOfAppTy g ty - let memberParentTypars,memberMethodTypars = List.splitAt parentTyArgs.Length memberAllTypars - memberParentTypars,memberMethodTypars,retTy,parentTyArgs + let memberParentTypars, memberMethodTypars = List.splitAt parentTyArgs.Length memberAllTypars + memberParentTypars, memberMethodTypars, retTy, parentTyArgs /// Get the object type for a member value which is an extension method (C#-style or F#-style) -let private GetObjTypeOfInstanceExtensionMethod g (vref:ValRef) = - let _,curriedArgInfos,_,_ = GetTopValTypeInCompiledForm g vref.ValReprInfo.Value vref.Type vref.Range +let private GetObjTypeOfInstanceExtensionMethod g (vref: ValRef) = + let _, curriedArgInfos, _, _ = GetTopValTypeInCompiledForm g vref.ValReprInfo.Value vref.Type vref.Range curriedArgInfos.Head.Head |> fst -/// Get the object type for a member value which is a C#-style extension method -let private GetArgInfosOfMember isCSharpExt g (vref:ValRef) = - if isCSharpExt then - let _,curriedArgInfos,_,_ = GetTopValTypeInCompiledForm g vref.ValReprInfo.Value vref.Type vref.Range +/// Get the object type for a member value which is a C#-style extension method +let private GetArgInfosOfMember isCSharpExt g (vref: ValRef) = + if isCSharpExt then + let _, curriedArgInfos, _, _ = GetTopValTypeInCompiledForm g vref.ValReprInfo.Value vref.Type vref.Range [ curriedArgInfos.Head.Tail ] else ArgInfosOfMember g vref /// Combine the type instantiation and generic method instantiation -let private CombineMethInsts ttps mtps tinst minst = (mkTyparInst ttps tinst @ mkTyparInst mtps minst) +let private CombineMethInsts ttps mtps tinst minst = (mkTyparInst ttps tinst @ mkTyparInst mtps minst) /// Work out the instantiation relevant to interpret the backing metadata for a member. /// /// The 'methTyArgs' is the instantiation of any generic method type parameters (this instantiation is -/// not included in the MethInfo objects, but carried separately). -let private GetInstantiationForMemberVal g isCSharpExt (ty, vref, methTyArgs: TypeInst) = - let memberParentTypars,memberMethodTypars,_retTy,parentTyArgs = AnalyzeTypeOfMemberVal isCSharpExt g (ty,vref) - /// In some recursive inference cases involving constraints this may need to be - /// fixed up - we allow uniform generic recursion but nothing else. +/// not included in the MethInfo objects, but carried separately). +let private GetInstantiationForMemberVal g isCSharpExt (ty, vref, methTyArgs: TypeInst) = + let memberParentTypars, memberMethodTypars, _retTy, parentTyArgs = AnalyzeTypeOfMemberVal isCSharpExt g (ty, vref) + /// In some recursive inference cases involving constraints this may need to be + /// fixed up - we allow uniform generic recursion but nothing else. /// See https://github.com/Microsoft/visualfsharp/issues/3038#issuecomment-309429410 - let methTyArgsFixedUp = + let methTyArgsFixedUp = if methTyArgs.Length < memberMethodTypars.Length then methTyArgs @ (List.skip methTyArgs.Length memberMethodTypars |> generalizeTypars) - else + else methTyArgs CombineMethInsts memberParentTypars memberMethodTypars parentTyArgs methTyArgsFixedUp /// Work out the instantiation relevant to interpret the backing metadata for a property. -let private GetInstantiationForPropertyVal g (ty,vref) = - let memberParentTypars,memberMethodTypars,_retTy,parentTyArgs = AnalyzeTypeOfMemberVal false g (ty,vref) +let private GetInstantiationForPropertyVal g (ty, vref) = + let memberParentTypars, memberMethodTypars, _retTy, parentTyArgs = AnalyzeTypeOfMemberVal false g (ty, vref) CombineMethInsts memberParentTypars memberMethodTypars parentTyArgs (generalizeTypars memberMethodTypars) /// Describes the sequence order of the introduction of an extension method. Extension methods that are introduced @@ -496,63 +488,63 @@ type ExtensionMethodPriority = uint64 //------------------------------------------------------------------------- // OptionalArgCallerSideValue, OptionalArgInfo -/// The caller-side value for the optional arg, if any -type OptionalArgCallerSideValue = +/// The caller-side value for the optional arg, if any +type OptionalArgCallerSideValue = | Constant of IL.ILFieldInit | DefaultValue | MissingValue - | WrapperForIDispatch + | WrapperForIDispatch | WrapperForIUnknown | PassByRef of TType * OptionalArgCallerSideValue - + /// Represents information about a parameter indicating if it is optional. -type OptionalArgInfo = +type OptionalArgInfo = /// The argument is not optional | NotOptional - /// The argument is optional, and is an F# callee-side optional arg + /// The argument is optional, and is an F# callee-side optional arg | CalleeSide /// The argument is optional, and is a caller-side .NET optional or default arg. /// 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. - | CallerSide of OptionalArgCallerSideValue - member x.IsOptional = match x with CalleeSide | CallerSide _ -> true | NotOptional -> false + | CallerSide of OptionalArgCallerSideValue + member x.IsOptional = match x with CalleeSide | CallerSide _ -> true | NotOptional -> false /// Compute the OptionalArgInfo for an IL parameter /// /// This includes the Visual Basic rules for IDispatchConstant and IUnknownConstant and optional arguments. - static member FromILParameter g amap m ilScope ilTypeInst (ilParam: ILParameter) = - if ilParam.IsOptional then - match ilParam.Default with - | None -> + static member FromILParameter g amap m ilScope ilTypeInst (ilParam: ILParameter) = + if ilParam.IsOptional then + match ilParam.Default with + | None -> // Do a type-directed analysis of the IL type to determine the default value to pass. // The same rules as Visual Basic are applied here. - let rec analyze ty = - if isByrefTy g ty then + let rec analyze ty = + if isByrefTy g ty then let ty = destByrefTy g ty PassByRef (ty, analyze ty) elif isObjTy g ty then match ilParam.Marshal with | Some(ILNativeType.IUnknown | ILNativeType.IDispatch | ILNativeType.Interface) -> Constant(ILFieldInit.Null) - | _ -> + | _ -> if TryFindILAttributeOpt g.attrib_IUnknownConstantAttribute ilParam.CustomAttrs then WrapperForIUnknown elif TryFindILAttributeOpt g.attrib_IDispatchConstantAttribute ilParam.CustomAttrs then WrapperForIDispatch else MissingValue - else + else DefaultValue CallerSide (analyze (ImportILTypeFromMetadata amap m ilScope ilTypeInst [] ilParam.Type)) - | Some v -> + | Some v -> CallerSide (Constant v) - else + else NotOptional - - static member ValueOfDefaultParameterValueAttrib (Attrib (_,_,exprs,_,_,_,_)) = - let (AttribExpr (_,defaultValueExpr)) = List.head exprs + + static member ValueOfDefaultParameterValueAttrib (Attrib (_, _, exprs, _, _, _, _)) = + let (AttribExpr (_, defaultValueExpr)) = List.head exprs match defaultValueExpr with - | Expr.Const (_,_,_) -> Some defaultValueExpr + | Expr.Const (_, _, _) -> Some defaultValueExpr | _ -> None static member FieldInitForDefaultParameterValueAttrib attrib = match OptionalArgInfo.ValueOfDefaultParameterValueAttrib attrib with - | Some (Expr.Const (ConstToILFieldInit fi,_,_)) -> Some fi + | Some (Expr.Const (ConstToILFieldInit fi, _, _)) -> Some fi | _ -> None type CallerInfo = @@ -564,9 +556,9 @@ type CallerInfo = override x.ToString() = sprintf "%+A" x [] -type ReflectedArgInfo = - | None - | Quote of bool +type ReflectedArgInfo = + | None + | Quote of bool member x.AutoQuote = match x with None -> false | Quote _ -> true //------------------------------------------------------------------------- @@ -574,17 +566,17 @@ type ReflectedArgInfo = [] /// Partial information about a parameter returned for use by the Language Service -type ParamNameAndType = +type ParamNameAndType = | ParamNameAndType of Ident option * TType - static member FromArgInfo (ty,argInfo : ArgReprInfo) = ParamNameAndType(argInfo.Name, ty) + static member FromArgInfo (ty, argInfo : ArgReprInfo) = ParamNameAndType(argInfo.Name, ty) static member FromMember isCSharpExtMem g vref = GetArgInfosOfMember isCSharpExtMem g vref |> List.mapSquared ParamNameAndType.FromArgInfo - static member Instantiate inst p = let (ParamNameAndType(nm,ty)) = p in ParamNameAndType(nm, instType inst ty) + static member Instantiate inst p = let (ParamNameAndType(nm, ty)) = p in ParamNameAndType(nm, instType inst ty) static member InstantiateCurried inst paramTypes = paramTypes |> List.mapSquared (ParamNameAndType.Instantiate inst) [] /// Full information about a parameter returned for use by the type checker and language service. -type ParamData = +type ParamData = /// ParamData(isParamArray, isOut, optArgInfo, callerInfo, nameOpt, reflArgInfo, ttype) ParamData of bool * bool * bool * OptionalArgInfo * CallerInfo * Ident option * ReflectedArgInfo * TType @@ -594,15 +586,15 @@ type ParamData = #if !NO_EXTENSIONTYPING -type ILFieldInit with +type ILFieldInit with /// Compute the ILFieldInit for the given provided constant value for a provided enum type. - static member FromProvidedObj m (v:obj) = + static member FromProvidedObj m (v: obj) = match v with | null -> ILFieldInit.Null | _ -> let objTy = v.GetType() let v = if objTy.IsEnum then objTy.GetField("value__").GetValue(v) else v - match v with + match v with | :? single as i -> ILFieldInit.Single i | :? double as i -> ILFieldInit.Double i | :? bool as i -> ILFieldInit.Bool i @@ -616,49 +608,49 @@ type ILFieldInit with | :? uint32 as i -> ILFieldInit.UInt32 i | :? int64 as i -> ILFieldInit.Int64 i | :? uint64 as i -> ILFieldInit.UInt64 i - | _ -> error(Error(FSComp.SR.infosInvalidProvidedLiteralValue(try v.ToString() with _ -> "?"),m)) + | _ -> error(Error(FSComp.SR.infosInvalidProvidedLiteralValue(try v.ToString() with _ -> "?"), m)) -/// Compute the OptionalArgInfo for a provided parameter. +/// Compute the OptionalArgInfo for a provided parameter. /// -/// This is the same logic as OptionalArgInfoOfILParameter except we do not apply the -/// Visual Basic rules for IDispatchConstant and IUnknownConstant to optional +/// This is the same logic as OptionalArgInfoOfILParameter except we do not apply the +/// Visual Basic rules for IDispatchConstant and IUnknownConstant to optional /// provided parameters. -let OptionalArgInfoOfProvidedParameter (amap:Import.ImportMap) m (provParam : Tainted) = +let OptionalArgInfoOfProvidedParameter (amap: Import.ImportMap) m (provParam : Tainted) = let g = amap.g - if provParam.PUntaint((fun p -> p.IsOptional),m) then - match provParam.PUntaint((fun p -> p.HasDefaultValue),m) with - | false -> + if provParam.PUntaint((fun p -> p.IsOptional), m) then + match provParam.PUntaint((fun p -> p.HasDefaultValue), m) with + | false -> // Do a type-directed analysis of the IL type to determine the default value to pass. - let rec analyze ty = - if isByrefTy g ty then + let rec analyze ty = + if isByrefTy g ty then let ty = destByrefTy g ty PassByRef (ty, analyze ty) elif isObjTy g ty then MissingValue else DefaultValue - let pty = Import.ImportProvidedType amap m (provParam.PApply((fun p -> p.ParameterType),m)) + let pty = Import.ImportProvidedType amap m (provParam.PApply((fun p -> p.ParameterType), m)) CallerSide (analyze pty) - | _ -> - let v = provParam.PUntaint((fun p -> p.RawDefaultValue),m) + | _ -> + let v = provParam.PUntaint((fun p -> p.RawDefaultValue), m) CallerSide (Constant (ILFieldInit.FromProvidedObj m v)) - else + else NotOptional /// Compute the ILFieldInit for the given provided constant value for a provided enum type. -let GetAndSanityCheckProviderMethod m (mi: Tainted<'T :> ProvidedMemberInfo>) (get : 'T -> ProvidedMethodInfo) err = - match mi.PApply((fun mi -> (get mi :> ProvidedMethodBase)),m) with - | Tainted.Null -> error(Error(err(mi.PUntaint((fun mi -> mi.Name),m),mi.PUntaint((fun mi -> mi.DeclaringType.Name),m)),m)) +let GetAndSanityCheckProviderMethod m (mi: Tainted<'T :> ProvidedMemberInfo>) (get : 'T -> ProvidedMethodInfo) err = + match mi.PApply((fun mi -> (get mi :> ProvidedMethodBase)), m) with + | Tainted.Null -> error(Error(err(mi.PUntaint((fun mi -> mi.Name), m), mi.PUntaint((fun mi -> mi.DeclaringType.Name), m)), m)) | meth -> meth /// Try to get an arbitrary ProvidedMethodInfo associated with a property. -let ArbitraryMethodInfoOfPropertyInfo (pi:Tainted) m = - if pi.PUntaint((fun pi -> pi.CanRead), m) then +let ArbitraryMethodInfoOfPropertyInfo (pi: Tainted) m = + if pi.PUntaint((fun pi -> pi.CanRead), m) then GetAndSanityCheckProviderMethod m pi (fun pi -> pi.GetGetMethod()) FSComp.SR.etPropertyCanReadButHasNoGetter - elif pi.PUntaint((fun pi -> pi.CanWrite), m) then + elif pi.PUntaint((fun pi -> pi.CanWrite), m) then GetAndSanityCheckProviderMethod m pi (fun pi -> pi.GetSetMethod()) FSComp.SR.etPropertyCanWriteButHasNoSetter - else - error(Error(FSComp.SR.etPropertyNeedsCanWriteOrCanRead(pi.PUntaint((fun mi -> mi.Name),m),pi.PUntaint((fun mi -> mi.DeclaringType.Name),m)),m)) + else + error(Error(FSComp.SR.etPropertyNeedsCanWriteOrCanRead(pi.PUntaint((fun mi -> mi.Name), m), pi.PUntaint((fun mi -> mi.DeclaringType.Name), m)), m)) #endif @@ -670,17 +662,17 @@ let ArbitraryMethodInfoOfPropertyInfo (pi:Tainted) m = /// /// This is really just 1:1 with the subset ot TType which result from building types using IL type definitions. [] -type ILTypeInfo = +type ILTypeInfo = /// ILTypeInfo (tyconRef, ilTypeRef, typeArgs, ilTypeDef). | ILTypeInfo of TcGlobals * TType * ILTypeRef * ILTypeDef - member x.TcGlobals = let (ILTypeInfo(g,_,_,_)) = x in g + member x.TcGlobals = let (ILTypeInfo(g, _, _, _)) = x in g - member x.ILTypeRef = let (ILTypeInfo(_,_,tref,_)) = x in tref + member x.ILTypeRef = let (ILTypeInfo(_, _, tref, _)) = x in tref - member x.RawMetadata = let (ILTypeInfo(_,_,_,tdef)) = x in tdef + member x.RawMetadata = let (ILTypeInfo(_, _, _, tdef)) = x in tdef - member x.ToType = let (ILTypeInfo(_,ty,_,_)) = x in ty + member x.ToType = let (ILTypeInfo(_, ty, _, _)) = x in ty /// Get the compiled nominal type. In the case of tuple types, this is a .NET tuple type member x.ToAppType = convertToTypeWithMetadataIfPossible x.TcGlobals x.ToType @@ -695,26 +687,26 @@ type ILTypeInfo = member x.IsValueType = x.RawMetadata.IsStructOrEnum - member x.Instantiate inst = - let (ILTypeInfo(g,ty,tref,tdef)) = x - ILTypeInfo(g,instType inst ty,tref,tdef) + member x.Instantiate inst = + let (ILTypeInfo(g, ty, tref, tdef)) = x + ILTypeInfo(g, instType inst ty, tref, tdef) - static member FromType g ty = - if isAnyTupleTy g ty then + static member FromType g ty = + if isAnyTupleTy g ty then // When getting .NET metadata for the properties and methods // of an F# tuple type, use the compiled nominal type, which is a .NET tuple type let metadataTy = convertToTypeWithMetadataIfPossible g ty assert (isILAppTy g metadataTy) let metadataTyconRef = tcrefOfAppTy g metadataTy let (TILObjectReprData(scoref, enc, tdef)) = metadataTyconRef.ILTyconInfo - let metadataILTypeRef = mkRefForNestedILTypeDef scoref (enc,tdef) + let metadataILTypeRef = mkRefForNestedILTypeDef scoref (enc, tdef) ILTypeInfo(g, ty, metadataILTypeRef, tdef) - elif isILAppTy g ty then + elif isILAppTy g ty then let tcref = tcrefOfAppTy g ty let (TILObjectReprData(scoref, enc, tdef)) = tcref.ILTyconInfo - let tref = mkRefForNestedILTypeDef scoref (enc,tdef) + let tref = mkRefForNestedILTypeDef scoref (enc, tdef) ILTypeInfo(g, ty, tref, tdef) - else + else failwith "ILTypeInfo.FromType - no IL metadata for type" //------------------------------------------------------------------------- @@ -726,30 +718,30 @@ type ILTypeInfo = type ILMethInfo = /// ILMethInfo(g, ilApparentType, ilDeclaringTyconRefOpt, ilMethodDef, ilGenericMethodTyArgs) /// - /// Describes an F# use of an IL method. + /// Describes an F# use of an IL method. /// /// If ilDeclaringTyconRefOpt is 'Some' then this is an F# use of an C#-style extension method. /// If ilDeclaringTyconRefOpt is 'None' then ilApparentType is an IL type definition. - | ILMethInfo of TcGlobals * TType * TyconRef option * ILMethodDef * Typars + | ILMethInfo of TcGlobals * TType * TyconRef option * ILMethodDef * Typars - member x.TcGlobals = match x with ILMethInfo(g,_,_,_,_) -> g + member x.TcGlobals = match x with ILMethInfo(g, _, _, _, _) -> g - /// 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 + /// 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. - member x.ApparentEnclosingType = match x with ILMethInfo(_,ty,_,_,_) -> ty + member x.ApparentEnclosingType = match x with ILMethInfo(_, ty, _, _, _) -> ty /// Like ApparentEnclosingType but use the compiled nominal type if this is a method on a tuple type member x.ApparentEnclosingAppType = convertToTypeWithMetadataIfPossible x.TcGlobals x.ApparentEnclosingType /// Get the declaring type associated with an extension member, if any. - member x.ILExtensionMethodDeclaringTyconRef = match x with ILMethInfo(_,_,tcrefOpt,_,_) -> tcrefOpt + member x.ILExtensionMethodDeclaringTyconRef = match x with ILMethInfo(_, _, tcrefOpt, _, _) -> tcrefOpt /// Get the Abstract IL metadata associated with the method. - member x.RawMetadata = match x with ILMethInfo(_,_,_,md,_) -> md + member x.RawMetadata = match x with ILMethInfo(_, _, _, md, _) -> md /// Get the formal method type parameters associated with a method. - member x.FormalMethodTypars = match x with ILMethInfo(_,_,_,_,fmtps) -> fmtps + member x.FormalMethodTypars = match x with ILMethInfo(_, _, _, _, fmtps) -> fmtps /// Get the IL name of the method member x.ILName = x.RawMetadata.Name @@ -759,39 +751,39 @@ type ILMethInfo = /// 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. - member x.DeclaringTyconRef = - match x.ILExtensionMethodDeclaringTyconRef with - | Some tcref -> tcref + member x.DeclaringTyconRef = + match x.ILExtensionMethodDeclaringTyconRef with + | Some tcref -> tcref | None -> tcrefOfAppTy x.TcGlobals x.ApparentEnclosingAppType - /// Get the instantiation of the declaring type of the 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. - member x.DeclaringTypeInst = - if x.IsILExtensionMethod then [] + member x.DeclaringTypeInst = + if x.IsILExtensionMethod then [] else argsOfAppTy x.TcGlobals x.ApparentEnclosingAppType /// Get the Abstract IL scope information associated with interpreting the Abstract IL metadata that backs this method. member x.MetadataScope = x.DeclaringTyconRef.CompiledRepresentationForNamedType.Scope - - /// Get the Abstract IL metadata corresponding to the parameters of 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. - member x.ParamMetadata = + member x.ParamMetadata = let ps = x.RawMetadata.Parameters if x.IsILExtensionMethod then List.tail ps else ps /// Get the number of parameters of the method member x.NumParams = x.ParamMetadata.Length - + /// Indicates if the method is a constructor - member x.IsConstructor = x.RawMetadata.IsConstructor + member x.IsConstructor = x.RawMetadata.IsConstructor /// Indicates if the method is a class initializer. member x.IsClassConstructor = x.RawMetadata.IsClassInitializer /// Indicates if the method has protected accessibility, - member x.IsProtectedAccessibility = - let md = x.RawMetadata + member x.IsProtectedAccessibility = + let md = x.RawMetadata not md.IsConstructor && not md.IsClassInitializer && (md.Access = ILMemberAccess.Family || md.Access = ILMemberAccess.FamilyOrAssembly) @@ -806,46 +798,46 @@ type ILMethInfo = member x.IsAbstract = x.RawMetadata.IsAbstract /// Does it appear to the user as a static method? - member x.IsStatic = + member x.IsStatic = not x.IsILExtensionMethod && // all C#-declared extension methods are instance x.RawMetadata.CallingConv.IsStatic /// Does it have the .NET IL 'newslot' flag set, and is also a virtual? member x.IsNewSlot = x.RawMetadata.IsNewSlot - + /// Does it appear to the user as an instance method? member x.IsInstance = not x.IsConstructor && not x.IsStatic - /// Get the argument types of the the IL method. 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. - member x.GetParamTypes(amap,m,minst) = - x.ParamMetadata |> List.map (fun p -> ImportParameterTypeFromMetadata amap m p.Type p.CustomAttrs x.MetadataScope x.DeclaringTypeInst minst) + member x.GetParamTypes(amap, m, minst) = + x.ParamMetadata |> List.map (fun p -> ImportParameterTypeFromMetadata amap m p.Type p.CustomAttrs x.MetadataScope x.DeclaringTypeInst minst) - /// Get all the argument types of the IL method. Include the object argument even if this is + /// Get all the argument types of the IL method. Include the object argument even if this is /// an C#-style extension method. - member x.GetRawArgTypes(amap,m,minst) = - x.RawMetadata.Parameters |> List.map (fun p -> ImportParameterTypeFromMetadata amap m p.Type p.CustomAttrs x.MetadataScope x.DeclaringTypeInst minst) + member x.GetRawArgTypes(amap, m, minst) = + x.RawMetadata.Parameters |> List.map (fun p -> ImportParameterTypeFromMetadata amap m p.Type p.CustomAttrs x.MetadataScope x.DeclaringTypeInst minst) - /// Get info about the arguments of the IL method. If this is an C#-style extension method then + /// 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. - member x.GetParamNamesAndTypes(amap,m,minst) = + member x.GetParamNamesAndTypes(amap, m, minst) = x.ParamMetadata |> List.map (fun p -> ParamNameAndType(Option.map (mkSynId m) p.Name, ImportParameterTypeFromMetadata amap m p.Type p.CustomAttrs x.MetadataScope x.DeclaringTypeInst minst) ) /// Get a reference to the method (dropping all generic instantiations), as an Abstract IL ILMethodRef. - member x.ILMethodRef = - let mref = mkRefToILMethod (x.DeclaringTyconRef.CompiledRepresentationForNamedType,x.RawMetadata) - rescopeILMethodRef x.MetadataScope mref + member x.ILMethodRef = + let mref = mkRefToILMethod (x.DeclaringTyconRef.CompiledRepresentationForNamedType, x.RawMetadata) + rescopeILMethodRef x.MetadataScope mref - /// Indicates if the method is marked as a DllImport (a PInvoke). This is done by looking at the IL custom attributes on + /// Indicates if the method is marked as a DllImport (a PInvoke). This is done by looking at the IL custom attributes on /// the method. - member x.IsDllImport (g: TcGlobals) = + member x.IsDllImport (g: TcGlobals) = match g.attrib_DllImportAttribute with | None -> false - | Some (AttribInfo(tref,_)) ->x.RawMetadata.CustomAttrs |> TryDecodeILAttribute g tref |> Option.isSome + | Some (AttribInfo(tref, _)) ->x.RawMetadata.CustomAttrs |> TryDecodeILAttribute g tref |> Option.isSome - /// Get the (zero or one) 'self'/'this'/'object' arguments associated with an IL method. + /// Get the (zero or one) 'self'/'this'/'object' arguments associated with an IL method. /// An instance extension method returns one object argument. member x.GetObjArgTypes(amap, m, minst) = // All C#-style extension methods are instance. We have to re-read the 'obj' type w.r.t. the @@ -853,17 +845,17 @@ type ILMethInfo = if x.IsILExtensionMethod then let p = x.RawMetadata.Parameters.Head [ ImportParameterTypeFromMetadata amap m p.Type p.CustomAttrs x.MetadataScope x.DeclaringTypeInst minst ] - else if x.IsInstance then + else if x.IsInstance then [ x.ApparentEnclosingType ] else [] /// Get the compiled return type of the method, where 'void' is None. member x.GetCompiledReturnTy (amap, m, minst) = - ImportReturnTypeFromMetadata amap m x.RawMetadata.Return.Type x.RawMetadata.Return.CustomAttrs x.MetadataScope x.DeclaringTypeInst minst + ImportReturnTypeFromMetadata amap m x.RawMetadata.Return.Type x.RawMetadata.Return.CustomAttrs x.MetadataScope x.DeclaringTypeInst minst /// Get the F# view of the return type of the method, where 'void' is 'unit'. - member x.GetFSharpReturnTy (amap, m, minst) = + member x.GetFSharpReturnTy (amap, m, minst) = x.GetCompiledReturnTy(amap, m, minst) |> GetFSharpViewOfReturnType amap.g @@ -876,7 +868,7 @@ type ILMethInfo = #endif /// Describes an F# use of a method [] -type MethInfo = +type MethInfo = /// FSMeth(tcGlobals, enclosingType, valRef, extensionMethodPriority). /// /// Describes a use of a method declared in F# code and backed by F# metadata. @@ -895,99 +887,99 @@ type MethInfo = | ProvidedMeth of Import.ImportMap * Tainted * ExtensionMethodPriority option * range #endif - /// Get the enclosing type of the method info. + /// 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. - member x.ApparentEnclosingType = + member x.ApparentEnclosingType = match x with - | ILMeth(_,ilminfo,_) -> ilminfo.ApparentEnclosingType - | FSMeth(_,ty,_,_) -> ty - | DefaultStructCtor(_,ty) -> ty + | ILMeth(_, ilminfo, _) -> ilminfo.ApparentEnclosingType + | FSMeth(_, ty, _, _) -> ty + | DefaultStructCtor(_, ty) -> ty #if !NO_EXTENSIONTYPING - | ProvidedMeth(amap,mi,_,m) -> - Import.ImportProvidedType amap m (mi.PApply((fun mi -> mi.DeclaringType),m)) + | ProvidedMeth(amap, mi, _, m) -> + Import.ImportProvidedType amap m (mi.PApply((fun mi -> mi.DeclaringType), m)) #endif /// Get the enclosing type of the method info, using a nominal type for tuple types - member x.ApparentEnclosingAppType = + member x.ApparentEnclosingAppType = convertToTypeWithMetadataIfPossible x.TcGlobals x.ApparentEnclosingType - member x.ApparentEnclosingTyconRef = + member x.ApparentEnclosingTyconRef = tcrefOfAppTy x.TcGlobals x.ApparentEnclosingAppType /// 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. - member x.DeclaringTyconRef = - match x with - | ILMeth(_,ilminfo,_) when x.IsExtensionMember -> ilminfo.DeclaringTyconRef - | FSMeth(_,_,vref,_) when x.IsExtensionMember && vref.HasDeclaringEntity -> vref.TopValDeclaringEntity - | _ -> x.ApparentEnclosingTyconRef + member x.DeclaringTyconRef = + match x with + | ILMeth(_, ilminfo, _) when x.IsExtensionMember -> ilminfo.DeclaringTyconRef + | FSMeth(_, _, vref, _) when x.IsExtensionMember && vref.HasDeclaringEntity -> vref.TopValDeclaringEntity + | _ -> x.ApparentEnclosingTyconRef - /// Get the information about provided static parameters, if any - member x.ProvidedStaticParameterInfo = + /// Get the information about provided static parameters, if any + member x.ProvidedStaticParameterInfo = match x with | ILMeth _ -> None | FSMeth _ -> None #if !NO_EXTENSIONTYPING - | ProvidedMeth (_, mb, _, m) -> - let staticParams = mb.PApplyWithProvider((fun (mb,provider) -> mb.GetStaticParametersForMethod(provider)), range=m) + | ProvidedMeth (_, mb, _, m) -> + let staticParams = mb.PApplyWithProvider((fun (mb, provider) -> mb.GetStaticParametersForMethod(provider)), range=m) let staticParams = staticParams.PApplyArray(id, "GetStaticParametersForMethod", m) - match staticParams with + match staticParams with | [| |] -> None - | _ -> Some (mb,staticParams) + | _ -> Some (mb, staticParams) #endif | DefaultStructCtor _ -> None /// Get the extension method priority of the method, if it has one. - member x.ExtensionMemberPriorityOption = + member x.ExtensionMemberPriorityOption = match x with - | ILMeth(_,_,pri) -> pri - | FSMeth(_,_,_,pri) -> pri + | ILMeth(_, _, pri) -> pri + | FSMeth(_, _, _, pri) -> pri #if !NO_EXTENSIONTYPING - | ProvidedMeth(_,_,pri,_) -> pri + | ProvidedMeth(_, _, pri, _) -> pri #endif | DefaultStructCtor _ -> None /// 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. - member x.ExtensionMemberPriority = defaultArg x.ExtensionMemberPriorityOption System.UInt64.MaxValue + member x.ExtensionMemberPriority = defaultArg x.ExtensionMemberPriorityOption System.UInt64.MaxValue #if DEBUG /// Get the method name in DebuggerDisplayForm - member x.DebuggerDisplayName = - match x with - | ILMeth(_,y,_) -> "ILMeth: " + y.ILName - | FSMeth(_,_,vref,_) -> "FSMeth: " + vref.LogicalName + member x.DebuggerDisplayName = + match x with + | ILMeth(_, y, _) -> "ILMeth: " + y.ILName + | FSMeth(_, _, vref, _) -> "FSMeth: " + vref.LogicalName #if !NO_EXTENSIONTYPING - | ProvidedMeth(_,mi,_,m) -> "ProvidedMeth: " + mi.PUntaint((fun mi -> mi.Name),m) + | ProvidedMeth(_, mi, _, m) -> "ProvidedMeth: " + mi.PUntaint((fun mi -> mi.Name), m) #endif | DefaultStructCtor _ -> ".ctor" #endif /// Get the method name in LogicalName form, i.e. the name as it would be stored in .NET metadata - member x.LogicalName = - match x with - | ILMeth(_,y,_) -> y.ILName - | FSMeth(_,_,vref,_) -> vref.LogicalName + member x.LogicalName = + match x with + | ILMeth(_, y, _) -> y.ILName + | FSMeth(_, _, vref, _) -> vref.LogicalName #if !NO_EXTENSIONTYPING - | ProvidedMeth(_,mi,_,m) -> mi.PUntaint((fun mi -> mi.Name),m) + | ProvidedMeth(_, mi, _, m) -> mi.PUntaint((fun mi -> mi.Name), m) #endif | DefaultStructCtor _ -> ".ctor" /// Get the method name in DisplayName form - member x.DisplayName = - match x with - | FSMeth(_,_,vref,_) -> vref.DisplayName + member x.DisplayName = + match x with + | FSMeth(_, _, vref, _) -> vref.DisplayName | _ -> x.LogicalName /// Indicates if this is a method defined in this assembly with an internal XML comment member x.HasDirectXmlComment = match x with - | FSMeth(g,_,vref,_) -> valRefInThisAssembly g.compilingFslib vref + | FSMeth(g, _, vref, _) -> valRefInThisAssembly g.compilingFslib vref #if !NO_EXTENSIONTYPING | ProvidedMeth _ -> true #endif @@ -996,80 +988,80 @@ type MethInfo = override x.ToString() = x.ApparentEnclosingType.ToString() + x.LogicalName /// 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). - member x.DeclaringTypeInst = + /// + /// For extension members this is empty (the instantiation of the declaring type). + member x.DeclaringTypeInst = if x.IsExtensionMember then [] else argsOfAppTy x.TcGlobals x.ApparentEnclosingAppType /// Get the TcGlobals value that governs the method declaration - member x.TcGlobals = - match x with - | ILMeth(g,_,_) -> g - | FSMeth(g,_,_,_) -> g - | DefaultStructCtor (g,_) -> g + member x.TcGlobals = + match x with + | ILMeth(g, _, _) -> g + | FSMeth(g, _, _, _) -> g + | DefaultStructCtor (g, _) -> g #if !NO_EXTENSIONTYPING - | ProvidedMeth(amap,_,_,_) -> amap.g + | ProvidedMeth(amap, _, _, _) -> amap.g #endif /// 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. - member x.FormalMethodTypars = - match x with - | ILMeth(_,ilmeth,_) -> ilmeth.FormalMethodTypars - | FSMeth(g,_,vref,_) -> + member x.FormalMethodTypars = + match x with + | ILMeth(_, ilmeth, _) -> ilmeth.FormalMethodTypars + | FSMeth(g, _, vref, _) -> let ty = x.ApparentEnclosingAppType - let _,memberMethodTypars,_,_ = AnalyzeTypeOfMemberVal x.IsCSharpStyleExtensionMember g (ty,vref) + let _, memberMethodTypars, _, _ = AnalyzeTypeOfMemberVal x.IsCSharpStyleExtensionMember g (ty, vref) memberMethodTypars | DefaultStructCtor _ -> [] #if !NO_EXTENSIONTYPING | ProvidedMeth _ -> [] // There will already have been an error if there are generic parameters here. #endif - + /// Get the formal generic method parameters for the method as a list of variable types. member x.FormalMethodInst = generalizeTypars x.FormalMethodTypars member x.FormalMethodTyparInst = mkTyparInst x.FormalMethodTypars x.FormalMethodInst /// Get the XML documentation associated with the method - member x.XmlDoc = - match x with - | ILMeth(_,_,_) -> XmlDoc.Empty - | FSMeth(_,_,vref,_) -> vref.XmlDoc + member x.XmlDoc = + match x with + | ILMeth(_, _, _) -> XmlDoc.Empty + | FSMeth(_, _, vref, _) -> vref.XmlDoc | DefaultStructCtor _ -> XmlDoc.Empty #if !NO_EXTENSIONTYPING - | ProvidedMeth(_,mi,_,m)-> - XmlDoc (mi.PUntaint((fun mix -> (mix :> IProvidedCustomAttributeProvider).GetXmlDocAttributes(mi.TypeProvider.PUntaintNoFailure(id))),m)) + | ProvidedMeth(_, mi, _, m)-> + XmlDoc (mi.PUntaint((fun mix -> (mix :> IProvidedCustomAttributeProvider).GetXmlDocAttributes(mi.TypeProvider.PUntaintNoFailure(id))), m)) #endif /// Try to get an arbitrary F# ValRef associated with the member. This is to determine if the member is virtual, amongst other things. - member x.ArbitraryValRef = - match x with - | FSMeth(_g,_,vref,_) -> Some vref + member x.ArbitraryValRef = + match x with + | FSMeth(_g, _, vref, _) -> Some vref | _ -> None /// Get a list of argument-number counts, one count for each set of curried arguments. /// /// For an extension member, drop the 'this' argument. - member x.NumArgs = - match x with - | ILMeth(_,ilminfo,_) -> [ilminfo.NumParams] - | FSMeth(g,_,vref,_) -> GetArgInfosOfMember x.IsCSharpStyleExtensionMember g vref |> List.map List.length + member x.NumArgs = + match x with + | ILMeth(_, ilminfo, _) -> [ilminfo.NumParams] + | FSMeth(g, _, vref, _) -> GetArgInfosOfMember x.IsCSharpStyleExtensionMember g vref |> List.map List.length | DefaultStructCtor _ -> [0] #if !NO_EXTENSIONTYPING - | ProvidedMeth(_,mi,_,m) -> [mi.PUntaint((fun mi -> mi.GetParameters().Length),m)] // Why is this a list? Answer: because the method might be curried + | ProvidedMeth(_, mi, _, m) -> [mi.PUntaint((fun mi -> mi.GetParameters().Length), m)] // Why is this a list? Answer: because the method might be curried #endif member x.IsCurried = x.NumArgs.Length > 1 /// Does the method appear to the user as an instance method? - member x.IsInstance = - match x with - | ILMeth(_,ilmeth,_) -> ilmeth.IsInstance - | FSMeth(_,_,vref,_) -> vref.IsInstanceMember || x.IsCSharpStyleExtensionMember + member x.IsInstance = + match x with + | ILMeth(_, ilmeth, _) -> ilmeth.IsInstance + | FSMeth(_, _, vref, _) -> vref.IsInstanceMember || x.IsCSharpStyleExtensionMember | DefaultStructCtor _ -> false #if !NO_EXTENSIONTYPING - | ProvidedMeth(_,mi,_,m) -> mi.PUntaint((fun mi -> not mi.IsConstructor && not mi.IsStatic),m) + | ProvidedMeth(_, mi, _, m) -> mi.PUntaint((fun mi -> not mi.IsConstructor && not mi.IsStatic), m) #endif @@ -1077,50 +1069,50 @@ type MethInfo = /// For an extension method this includes all type parameters, even if it is extending a generic type. member x.GenericArity = x.FormalMethodTypars.Length - member x.IsProtectedAccessiblity = - match x with - | ILMeth(_,ilmeth,_) -> ilmeth.IsProtectedAccessibility + member x.IsProtectedAccessiblity = + match x with + | ILMeth(_, ilmeth, _) -> ilmeth.IsProtectedAccessibility | FSMeth _ -> false | DefaultStructCtor _ -> false #if !NO_EXTENSIONTYPING - | ProvidedMeth(_,mi,_,m) -> mi.PUntaint((fun mi -> mi.IsFamily), m) + | ProvidedMeth(_, mi, _, m) -> mi.PUntaint((fun mi -> mi.IsFamily), m) #endif member x.IsVirtual = - match x with - | ILMeth(_,ilmeth,_) -> ilmeth.IsVirtual - | FSMeth(_,_,vref,_) -> vref.IsVirtualMember + match x with + | ILMeth(_, ilmeth, _) -> ilmeth.IsVirtual + | FSMeth(_, _, vref, _) -> vref.IsVirtualMember | DefaultStructCtor _ -> false #if !NO_EXTENSIONTYPING - | ProvidedMeth(_,mi,_,m) -> mi.PUntaint((fun mi -> mi.IsVirtual), m) + | ProvidedMeth(_, mi, _, m) -> mi.PUntaint((fun mi -> mi.IsVirtual), m) #endif - member x.IsConstructor = - match x with - | ILMeth(_,ilmeth,_) -> ilmeth.IsConstructor - | FSMeth(_g,_,vref,_) -> (vref.MemberInfo.Value.MemberFlags.MemberKind = MemberKind.Constructor) + member x.IsConstructor = + match x with + | ILMeth(_, ilmeth, _) -> ilmeth.IsConstructor + | FSMeth(_g, _, vref, _) -> (vref.MemberInfo.Value.MemberFlags.MemberKind = MemberKind.Constructor) | DefaultStructCtor _ -> true #if !NO_EXTENSIONTYPING - | ProvidedMeth(_,mi,_,m) -> mi.PUntaint((fun mi -> mi.IsConstructor), m) + | ProvidedMeth(_, mi, _, m) -> mi.PUntaint((fun mi -> mi.IsConstructor), m) #endif member x.IsClassConstructor = - match x with - | ILMeth(_,ilmeth,_) -> ilmeth.IsClassConstructor - | FSMeth(_,_,vref,_) -> + match x with + | ILMeth(_, ilmeth, _) -> ilmeth.IsClassConstructor + | FSMeth(_, _, vref, _) -> match vref.TryDeref with | ValueSome x -> x.IsClassConstructor | _ -> false | DefaultStructCtor _ -> false #if !NO_EXTENSIONTYPING - | ProvidedMeth(_,mi,_,m) -> mi.PUntaint((fun mi -> mi.IsConstructor && mi.IsStatic), m) // Note: these are never public anyway + | ProvidedMeth(_, mi, _, m) -> mi.PUntaint((fun mi -> mi.IsConstructor && mi.IsStatic), m) // Note: these are never public anyway #endif - member x.IsDispatchSlot = - match x with - | ILMeth(_g,ilmeth,_) -> ilmeth.IsVirtual - | FSMeth(g,_,vref,_) as x -> - isInterfaceTy g x.ApparentEnclosingType || + member x.IsDispatchSlot = + match x with + | ILMeth(_g, ilmeth, _) -> ilmeth.IsVirtual + | FSMeth(g, _, vref, _) as x -> + isInterfaceTy g x.ApparentEnclosingType || vref.MemberInfo.Value.MemberFlags.IsDispatchSlot | DefaultStructCtor _ -> false #if !NO_EXTENSIONTYPING @@ -1128,90 +1120,90 @@ type MethInfo = #endif - member x.IsFinal = - not x.IsVirtual || - match x with - | ILMeth(_,ilmeth,_) -> ilmeth.IsFinal - | FSMeth(_g,_,_vref,_) -> false + member x.IsFinal = + not x.IsVirtual || + match x with + | ILMeth(_, ilmeth, _) -> ilmeth.IsFinal + | FSMeth(_g, _, _vref, _) -> false | DefaultStructCtor _ -> true #if !NO_EXTENSIONTYPING - | ProvidedMeth(_,mi,_,m) -> mi.PUntaint((fun mi -> mi.IsFinal), m) + | ProvidedMeth(_, mi, _, m) -> mi.PUntaint((fun mi -> mi.IsFinal), m) #endif // This means 'is this particular MethInfo one that doesn't provide an implementation?'. - // For F# methods, this is 'true' for the MethInfos corresponding to 'abstract' declarations, + // For F# methods, this is 'true' for the MethInfos corresponding to 'abstract' declarations, // and false for the (potentially) matching 'default' implementation MethInfos that eventually // provide an implementation for the dispatch slot. // // For IL methods, this is 'true' for abstract methods, and 'false' for virtual methods - member minfo.IsAbstract = - match minfo with - | ILMeth(_,ilmeth,_) -> ilmeth.IsAbstract - | FSMeth(g,_,vref,_) -> isInterfaceTy g minfo.ApparentEnclosingType || vref.IsDispatchSlotMember + member minfo.IsAbstract = + match minfo with + | ILMeth(_, ilmeth, _) -> ilmeth.IsAbstract + | FSMeth(g, _, vref, _) -> isInterfaceTy g minfo.ApparentEnclosingType || vref.IsDispatchSlotMember | DefaultStructCtor _ -> false #if !NO_EXTENSIONTYPING - | ProvidedMeth(_,mi,_,m) -> mi.PUntaint((fun mi -> mi.IsAbstract), m) + | ProvidedMeth(_, mi, _, m) -> mi.PUntaint((fun mi -> mi.IsAbstract), m) #endif - member x.IsNewSlot = - isInterfaceTy x.TcGlobals x.ApparentEnclosingType || - (x.IsVirtual && - (match x with - | ILMeth(_,x,_) -> x.IsNewSlot - | FSMeth(_,_,vref,_) -> vref.IsDispatchSlotMember + member x.IsNewSlot = + isInterfaceTy x.TcGlobals x.ApparentEnclosingType || + (x.IsVirtual && + (match x with + | ILMeth(_, x, _) -> x.IsNewSlot + | FSMeth(_, _, vref, _) -> vref.IsDispatchSlotMember #if !NO_EXTENSIONTYPING - | ProvidedMeth(_,mi,_,m) -> mi.PUntaint((fun mi -> mi.IsHideBySig), m) // REVIEW: Check this is correct + | ProvidedMeth(_, mi, _, m) -> mi.PUntaint((fun mi -> mi.IsHideBySig), m) // REVIEW: Check this is correct #endif | DefaultStructCtor _ -> false)) /// Check if this method is an explicit implementation of an interface member - member x.IsFSharpExplicitInterfaceImplementation = - match x with + member x.IsFSharpExplicitInterfaceImplementation = + match x with | ILMeth _ -> false - | FSMeth(g,_,vref,_) -> vref.IsFSharpExplicitInterfaceImplementation g + | FSMeth(g, _, vref, _) -> vref.IsFSharpExplicitInterfaceImplementation g | DefaultStructCtor _ -> false #if !NO_EXTENSIONTYPING - | ProvidedMeth _ -> false + | ProvidedMeth _ -> false #endif /// Check if this method is marked 'override' and thus definitely overrides another method. - member x.IsDefiniteFSharpOverride = - match x with + member x.IsDefiniteFSharpOverride = + match x with | ILMeth _ -> false - | FSMeth(_,_,vref,_) -> vref.IsDefiniteFSharpOverrideMember + | FSMeth(_, _, vref, _) -> vref.IsDefiniteFSharpOverrideMember | DefaultStructCtor _ -> false #if !NO_EXTENSIONTYPING - | ProvidedMeth _ -> false + | ProvidedMeth _ -> false #endif member x.ImplementedSlotSignatures = - match x with - | FSMeth(_,_,vref,_) -> vref.ImplementedSlotSignatures + match x with + | FSMeth(_, _, vref, _) -> vref.ImplementedSlotSignatures | _ -> failwith "not supported" - /// Indicates if this is an extension member. + /// Indicates if this is an extension member. member x.IsExtensionMember = match x with - | FSMeth (_,_,vref,pri) -> pri.IsSome || vref.IsExtensionMember - | ILMeth (_,_,Some _) -> true + | FSMeth (_, _, vref, pri) -> pri.IsSome || vref.IsExtensionMember + | ILMeth (_, _, Some _) -> true | _ -> false /// Indicates if this is an extension member (e.g. on a struct) that takes a byref arg member x.ObjArgNeedsAddress (amap: Import.ImportMap, m) = (x.IsStruct && not x.IsExtensionMember) || - match x.GetObjArgTypes (amap, m, x.FormalMethodInst) with + match x.GetObjArgTypes (amap, m, x.FormalMethodInst) with | [h] -> isByrefTy amap.g h | _ -> false - /// Indicates if this is an F# extension member. - member x.IsFSharpStyleExtensionMember = - match x with FSMeth (_,_,vref,_) -> vref.IsExtensionMember | _ -> false + /// Indicates if this is an F# extension member. + member x.IsFSharpStyleExtensionMember = + match x with FSMeth (_, _, vref, _) -> vref.IsExtensionMember | _ -> false - /// Indicates if this is an C#-style extension member. - member x.IsCSharpStyleExtensionMember = + /// Indicates if this is an C#-style extension member. + member x.IsCSharpStyleExtensionMember = match x with - | FSMeth (_,_,vref,Some _) -> not vref.IsExtensionMember - | ILMeth (_,_,Some _) -> true + | FSMeth (_, _, vref, Some _) -> not vref.IsExtensionMember + | ILMeth (_, _, Some _) -> true | _ -> false /// Add the actual type instantiation of the apparent type of an F# extension method. @@ -1219,134 +1211,134 @@ type MethInfo = // When an explicit type instantiation is given for an F# extension members the type // arguments implied by the object type are not given in source code. This means we must // add them explicitly. For example - // type List<'T> with + // type List<'T> with // member xs.Map<'U>(f : 'T -> 'U) = .... // is called as // xs.Map // but is compiled as a generic methods with two type arguments - // Map<'T,'U>(this: List<'T>, f : 'T -> 'U) - member x.AdjustUserTypeInstForFSharpStyleIndexedExtensionMembers(tyargs) = - (if x.IsFSharpStyleExtensionMember then argsOfAppTy x.TcGlobals x.ApparentEnclosingAppType else []) @ tyargs + // Map<'T, 'U>(this: List<'T>, f : 'T -> 'U) + member x.AdjustUserTypeInstForFSharpStyleIndexedExtensionMembers(tyargs) = + (if x.IsFSharpStyleExtensionMember then argsOfAppTy x.TcGlobals x.ApparentEnclosingAppType else []) @ tyargs /// Indicates if this method is a generated method associated with an F# CLIEvent property compiled as a .NET event - member x.IsFSharpEventPropertyMethod = - match x with - | FSMeth(g,_,vref,_) -> vref.IsFSharpEventProperty(g) + member x.IsFSharpEventPropertyMethod = + match x with + | FSMeth(g, _, vref, _) -> vref.IsFSharpEventProperty(g) #if !NO_EXTENSIONTYPING - | ProvidedMeth _ -> false + | ProvidedMeth _ -> false #endif | _ -> false /// Indicates if this method takes no arguments member x.IsNullary = (x.NumArgs = [0]) - /// Indicates if the enclosing type for the method is a value type. + /// 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. - member x.IsStruct = + member x.IsStruct = isStructTy x.TcGlobals x.ApparentEnclosingType - /// Build IL method infos. - static member CreateILMeth (amap:Import.ImportMap, m, ty:TType, md: ILMethodDef) = + /// Build IL method infos. + static member CreateILMeth (amap: Import.ImportMap, m, ty: TType, md: ILMethodDef) = let tinfo = ILTypeInfo.FromType amap.g ty let mtps = Import.ImportILGenericParameters (fun () -> amap) m tinfo.ILScopeRef tinfo.TypeInstOfRawMetadata md.GenericParams - ILMeth (amap.g,ILMethInfo(amap.g, ty, None, md, mtps),None) + ILMeth (amap.g, ILMethInfo(amap.g, ty, None, md, mtps), None) /// Build IL method infos for a C#-style extension method - static member CreateILExtensionMeth (amap, m, apparentTy:TType, declaringTyconRef:TyconRef, extMethPri, md: ILMethodDef) = + static member CreateILExtensionMeth (amap, m, apparentTy: TType, declaringTyconRef: TyconRef, extMethPri, md: ILMethodDef) = let scoref = declaringTyconRef.CompiledRepresentationForNamedType.Scope let mtps = Import.ImportILGenericParameters (fun () -> amap) m scoref [] md.GenericParams - ILMeth (amap.g,ILMethInfo(amap.g,apparentTy,Some declaringTyconRef,md,mtps),extMethPri) + ILMeth (amap.g, ILMethInfo(amap.g, apparentTy, Some declaringTyconRef, md, mtps), extMethPri) /// Tests whether two method infos have the same underlying definition. /// Used to merge operator overloads collected from left and right of an operator constraint. /// Must be compatible with ItemsAreEffectivelyEqual relation. - static member MethInfosUseIdenticalDefinitions x1 x2 = - match x1,x2 with - | ILMeth(_,x1,_), ILMeth(_,x2,_) -> (x1.RawMetadata === x2.RawMetadata) - | FSMeth(g,_,vref1,_), FSMeth(_,_,vref2,_) -> valRefEq g vref1 vref2 - | DefaultStructCtor _, DefaultStructCtor _ -> tyconRefEq x1.TcGlobals x1.DeclaringTyconRef x2.DeclaringTyconRef + static member MethInfosUseIdenticalDefinitions x1 x2 = + match x1, x2 with + | ILMeth(_, x1, _), ILMeth(_, x2, _) -> (x1.RawMetadata === x2.RawMetadata) + | FSMeth(g, _, vref1, _), FSMeth(_, _, vref2, _) -> valRefEq g vref1 vref2 + | DefaultStructCtor _, DefaultStructCtor _ -> tyconRefEq x1.TcGlobals x1.DeclaringTyconRef x2.DeclaringTyconRef #if !NO_EXTENSIONTYPING - | ProvidedMeth(_,mi1,_,_),ProvidedMeth(_,mi2,_,_) -> ProvidedMethodBase.TaintedEquals (mi1, mi2) + | ProvidedMeth(_, mi1, _, _), ProvidedMeth(_, mi2, _, _) -> ProvidedMethodBase.TaintedEquals (mi1, mi2) #endif | _ -> false /// Calculates a hash code of method info. Must be compatible with ItemsAreEffectivelyEqual relation. - member x.ComputeHashCode() = - match x with - | ILMeth(_,x1,_) -> hash x1.RawMetadata.Name - | FSMeth(_,_,vref,_) -> hash vref.LogicalName - | DefaultStructCtor(_,_ty) -> 34892 // "ty" doesn't support hashing. We could use "hash (tcrefOfAppTy g ty).CompiledName" or + member x.ComputeHashCode() = + match x with + | ILMeth(_, x1, _) -> hash x1.RawMetadata.Name + | FSMeth(_, _, vref, _) -> hash vref.LogicalName + | DefaultStructCtor(_, _ty) -> 34892 // "ty" doesn't support hashing. We could use "hash (tcrefOfAppTy g ty).CompiledName" or // something but we don't have a "g" parameter here yet. But this hash need only be very approximate anyway #if !NO_EXTENSIONTYPING - | ProvidedMeth(_,mi,_,_) -> ProvidedMethodInfo.TaintedGetHashCode(mi) + | ProvidedMeth(_, mi, _, _) -> ProvidedMethodInfo.TaintedGetHashCode(mi) #endif - /// Apply a type instantiation to a method info, i.e. apply the instantiation to the enclosing type. - member x.Instantiate(amap, m, inst) = - match x with - | ILMeth(_g,ilminfo,pri) -> - match ilminfo with - | ILMethInfo(_,ty,None,md,_) -> MethInfo.CreateILMeth(amap, m, instType inst ty, md) - | ILMethInfo(_,ty,Some declaringTyconRef,md,_) -> MethInfo.CreateILExtensionMeth(amap, m, instType inst ty, declaringTyconRef, pri, md) - | FSMeth(g,ty,vref,pri) -> FSMeth(g,instType inst ty,vref,pri) - | DefaultStructCtor(g,ty) -> DefaultStructCtor(g,instType inst ty) -#if !NO_EXTENSIONTYPING - | ProvidedMeth _ -> - match inst with + /// Apply a type instantiation to a method info, i.e. apply the instantiation to the enclosing type. + member x.Instantiate(amap, m, inst) = + match x with + | ILMeth(_g, ilminfo, pri) -> + match ilminfo with + | ILMethInfo(_, ty, None, md, _) -> MethInfo.CreateILMeth(amap, m, instType inst ty, md) + | ILMethInfo(_, ty, Some declaringTyconRef, md, _) -> MethInfo.CreateILExtensionMeth(amap, m, instType inst ty, declaringTyconRef, pri, md) + | FSMeth(g, ty, vref, pri) -> FSMeth(g, instType inst ty, vref, pri) + | DefaultStructCtor(g, ty) -> DefaultStructCtor(g, instType inst ty) +#if !NO_EXTENSIONTYPING + | ProvidedMeth _ -> + match inst with | [] -> x - | _ -> assert false; failwith "Not supported" + | _ -> assert false; failwith "Not supported" #endif /// Get the return type of a method info, where 'void' is returned as 'None' - member x.GetCompiledReturnTy (amap, m, minst) = - match x with - | ILMeth(_g,ilminfo,_) -> + member x.GetCompiledReturnTy (amap, m, minst) = + match x with + | ILMeth(_g, ilminfo, _) -> ilminfo.GetCompiledReturnTy(amap, m, minst) - | FSMeth(g,_,vref,_) -> + | FSMeth(g, _, vref, _) -> let ty = x.ApparentEnclosingAppType - let inst = GetInstantiationForMemberVal g x.IsCSharpStyleExtensionMember (ty,vref,minst) - let _,_,retTy,_ = AnalyzeTypeOfMemberVal x.IsCSharpStyleExtensionMember g (ty,vref) + let inst = GetInstantiationForMemberVal g x.IsCSharpStyleExtensionMember (ty, vref, minst) + let _, _, retTy, _ = AnalyzeTypeOfMemberVal x.IsCSharpStyleExtensionMember g (ty, vref) retTy |> Option.map (instType inst) | DefaultStructCtor _ -> None #if !NO_EXTENSIONTYPING - | ProvidedMeth(amap,mi,_,m) -> + | ProvidedMeth(amap, mi, _, m) -> GetCompiledReturnTyOfProvidedMethodInfo amap m mi #endif /// Get the return type of a method info, where 'void' is returned as 'unit' member x.GetFSharpReturnTy(amap, m, minst) = x.GetCompiledReturnTy(amap, m, minst) |> GetFSharpViewOfReturnType amap.g - + /// Get the parameter types of a method info - member x.GetParamTypes(amap, m, minst) = - match x with - | ILMeth(_g,ilminfo,_) -> + member x.GetParamTypes(amap, m, minst) = + match x with + | ILMeth(_g, ilminfo, _) -> // A single group of tupled arguments - [ ilminfo.GetParamTypes(amap,m,minst) ] - | FSMeth(g,ty,vref,_) -> + [ ilminfo.GetParamTypes(amap, m, minst) ] + | FSMeth(g, ty, vref, _) -> let paramTypes = ParamNameAndType.FromMember x.IsCSharpStyleExtensionMember g vref - let inst = GetInstantiationForMemberVal g x.IsCSharpStyleExtensionMember (ty,vref,minst) - paramTypes |> List.mapSquared (fun (ParamNameAndType(_,ty)) -> instType inst ty) + let inst = GetInstantiationForMemberVal g x.IsCSharpStyleExtensionMember (ty, vref, minst) + paramTypes |> List.mapSquared (fun (ParamNameAndType(_, ty)) -> instType inst ty) | DefaultStructCtor _ -> [] #if !NO_EXTENSIONTYPING - | ProvidedMeth(amap,mi,_,m) -> + | ProvidedMeth(amap, mi, _, m) -> // A single group of tupled arguments - [ [ for p in mi.PApplyArray((fun mi -> mi.GetParameters()), "GetParameters",m) do - yield Import.ImportProvidedType amap m (p.PApply((fun p -> p.ParameterType),m)) ] ] + [ [ for p in mi.PApplyArray((fun mi -> mi.GetParameters()), "GetParameters", m) do + yield Import.ImportProvidedType amap m (p.PApply((fun p -> p.ParameterType), m)) ] ] #endif /// Get the (zero or one) 'self'/'this'/'object' arguments associated with a method. /// An instance method returns one object argument. - member x.GetObjArgTypes (amap, m, minst) = - match x with - | ILMeth(_,ilminfo,_) -> ilminfo.GetObjArgTypes(amap, m, minst) - | FSMeth(g,_,vref,_) -> - if x.IsInstance then + member x.GetObjArgTypes (amap, m, minst) = + match x with + | ILMeth(_, ilminfo, _) -> ilminfo.GetObjArgTypes(amap, m, minst) + | FSMeth(g, _, vref, _) -> + if x.IsInstance then let ty = x.ApparentEnclosingAppType // The 'this' pointer of an extension member can depend on the minst - if x.IsExtensionMember then - let inst = GetInstantiationForMemberVal g x.IsCSharpStyleExtensionMember (ty,vref,minst) + if x.IsExtensionMember then + let inst = GetInstantiationForMemberVal g x.IsCSharpStyleExtensionMember (ty, vref, minst) let rawObjTy = GetObjTypeOfInstanceExtensionMethod g vref [ rawObjTy |> instType inst ] else @@ -1354,25 +1346,25 @@ type MethInfo = else [] | DefaultStructCtor _ -> [] #if !NO_EXTENSIONTYPING - | ProvidedMeth(amap,mi,_,m) -> - if x.IsInstance then [ Import.ImportProvidedType amap m (mi.PApply((fun mi -> mi.DeclaringType),m)) ] // find the type of the 'this' argument + | ProvidedMeth(amap, mi, _, m) -> + if x.IsInstance then [ Import.ImportProvidedType amap m (mi.PApply((fun mi -> mi.DeclaringType), m)) ] // find the type of the 'this' argument else [] #endif /// Get the parameter attributes of a method info, which get combined with the parameter names and types - member x.GetParamAttribs(amap, m) = - match x with - | ILMeth(g,ilMethInfo,_) -> + member x.GetParamAttribs(amap, m) = + match x with + | ILMeth(g, ilMethInfo, _) -> [ [ for p in ilMethInfo.ParamMetadata do let isParamArrayArg = TryFindILAttribute g.attrib_ParamArrayAttribute p.CustomAttrs - let reflArgInfo = - match TryDecodeILAttribute g g.attrib_ReflectedDefinitionAttribute.TypeRef p.CustomAttrs with - | Some ([ILAttribElem.Bool b ],_) -> ReflectedArgInfo.Quote b + let reflArgInfo = + match TryDecodeILAttribute g g.attrib_ReflectedDefinitionAttribute.TypeRef p.CustomAttrs with + | Some ([ILAttribElem.Bool b ], _) -> ReflectedArgInfo.Quote b | Some _ -> ReflectedArgInfo.Quote false | _ -> ReflectedArgInfo.None let isOutArg = (p.IsOut && not p.IsIn) let isInArg = (p.IsIn && not p.IsOut) - // Note: we get default argument values from VB and other .NET language metadata + // Note: we get default argument values from VB and other .NET language metadata let optArgInfo = OptionalArgInfo.FromILParameter g amap m ilMethInfo.MetadataScope ilMethInfo.DeclaringTypeInst p let isCallerLineNumberArg = TryFindILAttribute g.attrib_CallerLineNumberAttribute p.CustomAttrs @@ -1393,43 +1385,43 @@ type MethInfo = yield (isParamArrayArg, isInArg, isOutArg, optArgInfo, callerInfo, reflArgInfo) ] ] - | FSMeth(g,_,vref,_) -> - GetArgInfosOfMember x.IsCSharpStyleExtensionMember g vref - |> List.mapSquared (fun (ty,argInfo) -> + | FSMeth(g, _, vref, _) -> + GetArgInfosOfMember x.IsCSharpStyleExtensionMember g vref + |> List.mapSquared (fun (ty, argInfo) -> let isParamArrayArg = HasFSharpAttribute g g.attrib_ParamArrayAttribute argInfo.Attribs - let reflArgInfo = - match TryFindFSharpBoolAttributeAssumeFalse g g.attrib_ReflectedDefinitionAttribute argInfo.Attribs with + let reflArgInfo = + match TryFindFSharpBoolAttributeAssumeFalse g g.attrib_ReflectedDefinitionAttribute argInfo.Attribs with | Some b -> ReflectedArgInfo.Quote b | None -> ReflectedArgInfo.None let isOutArg = (HasFSharpAttribute g g.attrib_OutAttribute argInfo.Attribs && isByrefTy g ty) || isOutByrefTy g ty let isInArg = (HasFSharpAttribute g g.attrib_InAttribute argInfo.Attribs && isByrefTy g ty) || isInByrefTy g ty let isCalleeSideOptArg = HasFSharpAttribute g g.attrib_OptionalArgumentAttribute argInfo.Attribs let isCallerSideOptArg = HasFSharpAttributeOpt g g.attrib_OptionalAttribute argInfo.Attribs - let optArgInfo = - if isCalleeSideOptArg then - CalleeSide + let optArgInfo = + if isCalleeSideOptArg then + CalleeSide elif isCallerSideOptArg then let defaultParameterValueAttribute = TryFindFSharpAttributeOpt g g.attrib_DefaultParameterValueAttribute argInfo.Attribs match defaultParameterValueAttribute with - | None -> + | None -> // Do a type-directed analysis of the type to determine the default value to pass. // Similar rules as OptionalArgInfo.FromILParameter are applied here, except for the COM and byref-related stuff. CallerSide (if isObjTy g ty then MissingValue else DefaultValue) - | Some attr -> + | Some attr -> let defaultValue = OptionalArgInfo.ValueOfDefaultParameterValueAttrib attr match defaultValue with - | Some (Expr.Const (_, m, ty2)) when not (typeEquiv g ty2 ty) -> + | Some (Expr.Const (_, m, ty2)) when not (typeEquiv g ty2 ty) -> // the type of the default value does not match the type of the argument. // Emit a warning, and ignore the DefaultParameterValue argument altogether. warning(Error(FSComp.SR.DefaultParameterValueNotAppropriateForArgument(), m)) NotOptional - | Some (Expr.Const((ConstToILFieldInit fi),_,_)) -> + | Some (Expr.Const((ConstToILFieldInit fi), _, _)) -> // Good case - all is well. CallerSide (Constant fi) - | _ -> + | _ -> // Default value is not appropriate, i.e. not a constant. // Compiler already gives an error in that case, so just ignore here. - NotOptional + NotOptional else NotOptional let isCallerLineNumberArg = HasFSharpAttribute g g.attrib_CallerLineNumberAttribute argInfo.Attribs @@ -1442,10 +1434,12 @@ type MethInfo = | true, false, false -> CallerLineNumber | false, true, false -> CallerFilePath | false, false, true -> CallerMemberName - | false, true, true -> match TryFindFSharpAttribute g g.attrib_CallerMemberNameAttribute argInfo.Attribs with - | Some(Attrib(_,_,_,_,_,_,callerMemberNameAttributeRange)) -> warning(Error(FSComp.SR.CallerMemberNameIsOverriden(argInfo.Name.Value.idText), callerMemberNameAttributeRange)) - CallerFilePath - | _ -> failwith "Impossible" + | false, true, true -> + match TryFindFSharpAttribute g g.attrib_CallerMemberNameAttribute argInfo.Attribs with + | Some(Attrib(_, _, _, _, _, _, callerMemberNameAttributeRange)) -> + warning(Error(FSComp.SR.CallerMemberNameIsOverriden(argInfo.Name.Value.idText), callerMemberNameAttributeRange)) + CallerFilePath + | _ -> failwith "Impossible" | _, _, _ -> // if multiple caller info attributes are specified, pick the "wrong" one here // so that we get an error later @@ -1455,17 +1449,17 @@ type MethInfo = (isParamArrayArg, isInArg, isOutArg, optArgInfo, callerInfo, reflArgInfo)) - | DefaultStructCtor _ -> + | DefaultStructCtor _ -> [[]] #if !NO_EXTENSIONTYPING - | ProvidedMeth(amap,mi,_,_) -> + | ProvidedMeth(amap, mi, _, _) -> // A single group of tupled arguments [ [for p in mi.PApplyArray((fun mi -> mi.GetParameters()), "GetParameters", m) do - let isParamArrayArg = p.PUntaint((fun px -> (px :> IProvidedCustomAttributeProvider).GetAttributeConstructorArgs(p.TypeProvider.PUntaintNoFailure(id), typeof.FullName).IsSome),m) - let optArgInfo = OptionalArgInfoOfProvidedParameter amap m p - let reflArgInfo = - match p.PUntaint((fun px -> (px :> IProvidedCustomAttributeProvider).GetAttributeConstructorArgs(p.TypeProvider.PUntaintNoFailure(id), typeof.FullName)),m) with + let isParamArrayArg = p.PUntaint((fun px -> (px :> IProvidedCustomAttributeProvider).GetAttributeConstructorArgs(p.TypeProvider.PUntaintNoFailure(id), typeof.FullName).IsSome), m) + let optArgInfo = OptionalArgInfoOfProvidedParameter amap m p + let reflArgInfo = + match p.PUntaint((fun px -> (px :> IProvidedCustomAttributeProvider).GetAttributeConstructorArgs(p.TypeProvider.PUntaintNoFailure(id), typeof.FullName)), m) with | Some ([ Some (:? bool as b) ], _) -> ReflectedArgInfo.Quote b | Some _ -> ReflectedArgInfo.Quote false | None -> ReflectedArgInfo.None @@ -1481,84 +1475,84 @@ type MethInfo = // This code has grown organically over time. We've managed to unify the ILMeth+ProvidedMeth paths. // The FSMeth, ILMeth+ProvidedMeth paths can probably be unified too. member x.GetSlotSig(amap, m) = - match x with - | FSMeth(g,_,vref,_) -> - match vref.RecursiveValInfo with - | ValInRecScope(false) -> error(Error((FSComp.SR.InvalidRecursiveReferenceToAbstractSlot()),m)) + match x with + | FSMeth(g, _, vref, _) -> + match vref.RecursiveValInfo with + | ValInRecScope(false) -> error(Error((FSComp.SR.InvalidRecursiveReferenceToAbstractSlot()), m)) | _ -> () - let allTyparsFromMethod,_,retTy,_ = GetTypeOfMemberInMemberForm g vref + let allTyparsFromMethod, _, retTy, _ = GetTypeOfMemberInMemberForm g vref // A slot signature is w.r.t. the type variables of the type it is associated with. // So we have to rename from the member type variables to the type variables of the type. let formalEnclosingTypars = x.ApparentEnclosingTyconRef.Typars(m) - let formalEnclosingTyparsFromMethod,formalMethTypars = List.splitAt formalEnclosingTypars.Length allTyparsFromMethod - let methodToParentRenaming,_ = mkTyparToTyparRenaming formalEnclosingTyparsFromMethod formalEnclosingTypars - let formalParams = - GetArgInfosOfMember x.IsCSharpStyleExtensionMember g vref + let formalEnclosingTyparsFromMethod, formalMethTypars = List.splitAt formalEnclosingTypars.Length allTyparsFromMethod + let methodToParentRenaming, _ = mkTyparToTyparRenaming formalEnclosingTyparsFromMethod formalEnclosingTypars + let formalParams = + GetArgInfosOfMember x.IsCSharpStyleExtensionMember g vref |> List.mapSquared (map1Of2 (instType methodToParentRenaming) >> MakeSlotParam ) let formalRetTy = Option.map (instType methodToParentRenaming) retTy MakeSlotSig(x.LogicalName, x.ApparentEnclosingType, formalEnclosingTypars, formalMethTypars, formalParams, formalRetTy) - | DefaultStructCtor _ -> error(InternalError("no slotsig for DefaultStructCtor",m)) - | _ -> + | DefaultStructCtor _ -> error(InternalError("no slotsig for DefaultStructCtor", m)) + | _ -> let g = x.TcGlobals - // slotsigs must contain the formal types for the arguments and return type - // a _formal_ 'void' return type is represented as a 'unit' type. - // slotsigs are independent of instantiation: if an instantiation - // happens to make the return type 'unit' (i.e. it was originally a variable type - // then that does not correspond to a slotsig compiled as a 'void' return type. - // REVIEW: should we copy down attributes to slot params? + // slotsigs must contain the formal types for the arguments and return type + // a _formal_ 'void' return type is represented as a 'unit' type. + // slotsigs are independent of instantiation: if an instantiation + // happens to make the return type 'unit' (i.e. it was originally a variable type + // then that does not correspond to a slotsig compiled as a 'void' return type. + // REVIEW: should we copy down attributes to slot params? let tcref = tcrefOfAppTy g x.ApparentEnclosingAppType let formalEnclosingTyparsOrig = tcref.Typars(m) let formalEnclosingTypars = copyTypars formalEnclosingTyparsOrig - let _,formalEnclosingTyparTys = FixupNewTypars m [] [] formalEnclosingTyparsOrig formalEnclosingTypars + let _, formalEnclosingTyparTys = FixupNewTypars m [] [] formalEnclosingTyparsOrig formalEnclosingTypars let formalMethTypars = copyTypars x.FormalMethodTypars - let _,formalMethTyparTys = FixupNewTypars m formalEnclosingTypars formalEnclosingTyparTys x.FormalMethodTypars formalMethTypars - let formalRetTy, formalParams = + let _, formalMethTyparTys = FixupNewTypars m formalEnclosingTypars formalEnclosingTyparTys x.FormalMethodTypars formalMethTypars + let formalRetTy, formalParams = match x with - | ILMeth(_,ilminfo,_) -> - let ftinfo = ILTypeInfo.FromType g (TType_app(tcref,formalEnclosingTyparTys)) + | ILMeth(_, ilminfo, _) -> + let ftinfo = ILTypeInfo.FromType g (TType_app(tcref, formalEnclosingTyparTys)) let formalRetTy = ImportReturnTypeFromMetadata amap m ilminfo.RawMetadata.Return.Type ilminfo.RawMetadata.Return.CustomAttrs ftinfo.ILScopeRef ftinfo.TypeInstOfRawMetadata formalMethTyparTys - let formalParams = - [ [ for p in ilminfo.RawMetadata.Parameters do + let formalParams = + [ [ for p in ilminfo.RawMetadata.Parameters do let paramType = ImportILTypeFromMetadata amap m ftinfo.ILScopeRef ftinfo.TypeInstOfRawMetadata formalMethTyparTys p.Type yield TSlotParam(p.Name, paramType, p.IsIn, p.IsOut, p.IsOptional, []) ] ] formalRetTy, formalParams #if !NO_EXTENSIONTYPING - | ProvidedMeth (_,mi,_,_) -> + | ProvidedMeth (_, mi, _, _) -> // GENERIC TYPE PROVIDERS: for generics, formal types should be generated here, not the actual types // For non-generic type providers there is no difference let formalRetTy = x.GetCompiledReturnTy(amap, m, formalMethTyparTys) // GENERIC TYPE PROVIDERS: formal types should be generated here, not the actual types // For non-generic type providers there is no difference - let formalParams = - [ [ for p in mi.PApplyArray((fun mi -> mi.GetParameters()), "GetParameters", m) do - let paramName = p.PUntaint((fun p -> match p.Name with null -> None | s -> Some s),m) - let paramType = Import.ImportProvidedType amap m (p.PApply((fun p -> p.ParameterType),m)) - let isIn, isOut,isOptional = p.PUntaint((fun p -> p.IsIn, p.IsOut, p.IsOptional),m) + let formalParams = + [ [ for p in mi.PApplyArray((fun mi -> mi.GetParameters()), "GetParameters", m) do + let paramName = p.PUntaint((fun p -> match p.Name with null -> None | s -> Some s), m) + let paramType = Import.ImportProvidedType amap m (p.PApply((fun p -> p.ParameterType), m)) + let isIn, isOut, isOptional = p.PUntaint((fun p -> p.IsIn, p.IsOut, p.IsOptional), m) yield TSlotParam(paramName, paramType, isIn, isOut, isOptional, []) ] ] formalRetTy, formalParams #endif | _ -> failwith "unreachable" - MakeSlotSig(x.LogicalName, x.ApparentEnclosingType, formalEnclosingTypars, formalMethTypars,formalParams, formalRetTy) - + MakeSlotSig(x.LogicalName, x.ApparentEnclosingType, formalEnclosingTypars, formalMethTypars, formalParams, formalRetTy) + /// Get the ParamData objects for the parameters of a MethInfo - member x.GetParamDatas(amap, m, minst) = - let paramNamesAndTypes = - match x with - | ILMeth(_g,ilminfo,_) -> - [ ilminfo.GetParamNamesAndTypes(amap,m,minst) ] - | FSMeth(g,_,vref,_) -> + member x.GetParamDatas(amap, m, minst) = + let paramNamesAndTypes = + match x with + | ILMeth(_g, ilminfo, _) -> + [ ilminfo.GetParamNamesAndTypes(amap, m, minst) ] + | FSMeth(g, _, vref, _) -> let ty = x.ApparentEnclosingAppType - let items = ParamNameAndType.FromMember x.IsCSharpStyleExtensionMember g vref - let inst = GetInstantiationForMemberVal g x.IsCSharpStyleExtensionMember (ty,vref,minst) - items |> ParamNameAndType.InstantiateCurried inst - | DefaultStructCtor _ -> + let items = ParamNameAndType.FromMember x.IsCSharpStyleExtensionMember g vref + let inst = GetInstantiationForMemberVal g x.IsCSharpStyleExtensionMember (ty, vref, minst) + items |> ParamNameAndType.InstantiateCurried inst + | DefaultStructCtor _ -> [[]] #if !NO_EXTENSIONTYPING - | ProvidedMeth(amap,mi,_,_) -> + | ProvidedMeth(amap, mi, _, _) -> // A single set of tupled parameters - [ [for p in mi.PApplyArray((fun mi -> mi.GetParameters()), "GetParameters", m) do - let pname = + [ [for p in mi.PApplyArray((fun mi -> mi.GetParameters()), "GetParameters", m) do + let pname = match p.PUntaint((fun p -> p.Name), m) with | null -> None | name -> Some (mkSynId m name) @@ -1566,33 +1560,33 @@ type MethInfo = match p.PApply((fun p -> p.ParameterType), m) with | Tainted.Null -> amap.g.unit_ty | parameterType -> Import.ImportProvidedType amap m parameterType - yield ParamNameAndType(pname,pty) ] ] + yield ParamNameAndType(pname, pty) ] ] #endif let paramAttribs = x.GetParamAttribs(amap, m) - (paramAttribs,paramNamesAndTypes) ||> List.map2 (List.map2 (fun (isParamArrayArg, isInArg, isOutArg, optArgInfo, callerInfo, reflArgInfo) (ParamNameAndType(nmOpt,pty)) -> + (paramAttribs, paramNamesAndTypes) ||> List.map2 (List.map2 (fun (isParamArrayArg, isInArg, isOutArg, optArgInfo, callerInfo, reflArgInfo) (ParamNameAndType(nmOpt, pty)) -> ParamData(isParamArrayArg, isInArg, isOutArg, optArgInfo, callerInfo, nmOpt, reflArgInfo, pty))) /// Get the ParamData objects for the parameters of a MethInfo - member x.HasParamArrayArg(amap, m, minst) = - x.GetParamDatas(amap, m, minst) |> List.existsSquared (fun (ParamData(isParamArrayArg,_,_,_,_,_,_,_)) -> isParamArrayArg) + member x.HasParamArrayArg(amap, m, minst) = + x.GetParamDatas(amap, m, minst) |> List.existsSquared (fun (ParamData(isParamArrayArg, _, _, _, _, _, _, _)) -> isParamArrayArg) - /// Select all the type parameters of the declaring type of a method. + /// 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 + /// 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. - member x.GetFormalTyparsOfDeclaringType m = - if x.IsExtensionMember then [] - else + member x.GetFormalTyparsOfDeclaringType m = + if x.IsExtensionMember then [] + else match x with - | FSMeth(g,_,vref,_) -> + | FSMeth(g, _, vref, _) -> let ty = x.ApparentEnclosingAppType - let memberParentTypars,_,_,_ = AnalyzeTypeOfMemberVal false g (ty,vref) + let memberParentTypars, _, _, _ = AnalyzeTypeOfMemberVal false g (ty, vref) memberParentTypars - | _ -> + | _ -> x.DeclaringTyconRef.Typars(m) /// Tries to get the object arg type if it's a byref type. @@ -1609,20 +1603,20 @@ type MethInfo = /// Represents a single use of a IL or provided field from one point in an F# program [] -type ILFieldInfo = +type ILFieldInfo = /// Represents a single use of a field backed by Abstract IL metadata - | ILFieldInfo of ILTypeInfo * ILFieldDef // .NET IL fields + | ILFieldInfo of ILTypeInfo * ILFieldDef // .NET IL fields #if !NO_EXTENSIONTYPING /// Represents a single use of a field backed by provided metadata | ProvidedField of Import.ImportMap * Tainted * range #endif - /// Get the enclosing ("parent"/"declaring") type of the field. - member x.ApparentEnclosingType = - match x with - | ILFieldInfo(tinfo,_) -> tinfo.ToType + /// Get the enclosing ("parent"/"declaring") type of the field. + member x.ApparentEnclosingType = + match x with + | ILFieldInfo(tinfo, _) -> tinfo.ToType #if !NO_EXTENSIONTYPING - | ProvidedField(amap,fi,m) -> (Import.ImportProvidedType amap m (fi.PApply((fun fi -> fi.DeclaringType),m))) + | ProvidedField(amap, fi, m) -> (Import.ImportProvidedType amap m (fi.PApply((fun fi -> fi.DeclaringType), m))) #endif member x.ApparentEnclosingAppType = x.ApparentEnclosingType @@ -1632,110 +1626,110 @@ type ILFieldInfo = member x.DeclaringTyconRef = x.ApparentEnclosingTyconRef member x.TcGlobals = - match x with - | ILFieldInfo(tinfo,_) -> tinfo.TcGlobals + match x with + | ILFieldInfo(tinfo, _) -> tinfo.TcGlobals #if !NO_EXTENSIONTYPING - | ProvidedField(amap,_,_) -> amap.g + | ProvidedField(amap, _, _) -> amap.g #endif /// Get a reference to the declaring type of the field as an ILTypeRef - member x.ILTypeRef = - match x with - | ILFieldInfo(tinfo,_) -> tinfo.ILTypeRef + member x.ILTypeRef = + match x with + | ILFieldInfo(tinfo, _) -> tinfo.ILTypeRef #if !NO_EXTENSIONTYPING - | ProvidedField(amap,fi,m) -> (Import.ImportProvidedTypeAsILType amap m (fi.PApply((fun fi -> fi.DeclaringType),m))).TypeRef + | ProvidedField(amap, fi, m) -> (Import.ImportProvidedTypeAsILType amap m (fi.PApply((fun fi -> fi.DeclaringType), m))).TypeRef #endif - + /// Get the scope used to interpret IL metadata member x.ScopeRef = x.ILTypeRef.Scope - /// Get the type instantiation of the declaring type of the field - member x.TypeInst = - match x with - | ILFieldInfo(tinfo,_) -> tinfo.TypeInstOfRawMetadata + /// Get the type instantiation of the declaring type of the field + member x.TypeInst = + match x with + | ILFieldInfo(tinfo, _) -> tinfo.TypeInstOfRawMetadata #if !NO_EXTENSIONTYPING | ProvidedField _ -> [] /// GENERIC TYPE PROVIDERS #endif /// Get the name of the field - member x.FieldName = - match x with - | ILFieldInfo(_,pd) -> pd.Name + member x.FieldName = + match x with + | ILFieldInfo(_, pd) -> pd.Name #if !NO_EXTENSIONTYPING - | ProvidedField(_,fi,m) -> fi.PUntaint((fun fi -> fi.Name),m) + | ProvidedField(_, fi, m) -> fi.PUntaint((fun fi -> fi.Name), m) #endif /// Indicates if the field is readonly (in the .NET/C# sense of readonly) - member x.IsInitOnly = - match x with - | ILFieldInfo(_,pd) -> pd.IsInitOnly + member x.IsInitOnly = + match x with + | ILFieldInfo(_, pd) -> pd.IsInitOnly #if !NO_EXTENSIONTYPING - | ProvidedField(_,fi,m) -> fi.PUntaint((fun fi -> fi.IsInitOnly),m) + | ProvidedField(_, fi, m) -> fi.PUntaint((fun fi -> fi.IsInitOnly), m) #endif /// Indicates if the field is a member of a struct or enum type - member x.IsValueType = - match x with - | ILFieldInfo(tinfo,_) -> tinfo.IsValueType + member x.IsValueType = + match x with + | ILFieldInfo(tinfo, _) -> tinfo.IsValueType #if !NO_EXTENSIONTYPING - | ProvidedField(amap,_,_) -> isStructTy amap.g x.ApparentEnclosingType + | ProvidedField(amap, _, _) -> isStructTy amap.g x.ApparentEnclosingType #endif /// Indicates if the field is static - member x.IsStatic = - match x with - | ILFieldInfo(_,pd) -> pd.IsStatic + member x.IsStatic = + match x with + | ILFieldInfo(_, pd) -> pd.IsStatic #if !NO_EXTENSIONTYPING - | ProvidedField(_,fi,m) -> fi.PUntaint((fun fi -> fi.IsStatic),m) + | ProvidedField(_, fi, m) -> fi.PUntaint((fun fi -> fi.IsStatic), m) #endif /// Indicates if the field has the 'specialname' property in the .NET IL - member x.IsSpecialName = - match x with - | ILFieldInfo(_,pd) -> pd.IsSpecialName + member x.IsSpecialName = + match x with + | ILFieldInfo(_, pd) -> pd.IsSpecialName #if !NO_EXTENSIONTYPING - | ProvidedField(_,fi,m) -> fi.PUntaint((fun fi -> fi.IsSpecialName),m) + | ProvidedField(_, fi, m) -> fi.PUntaint((fun fi -> fi.IsSpecialName), m) #endif - + /// Indicates if the field is a literal field with an associated literal value - member x.LiteralValue = - match x with - | ILFieldInfo(_,pd) -> if pd.IsLiteral then pd.LiteralValue else None + member x.LiteralValue = + match x with + | ILFieldInfo(_, pd) -> if pd.IsLiteral then pd.LiteralValue else None #if !NO_EXTENSIONTYPING - | ProvidedField(_,fi,m) -> - if fi.PUntaint((fun fi -> fi.IsLiteral),m) then - Some (ILFieldInit.FromProvidedObj m (fi.PUntaint((fun fi -> fi.GetRawConstantValue()),m))) + | ProvidedField(_, fi, m) -> + if fi.PUntaint((fun fi -> fi.IsLiteral), m) then + Some (ILFieldInit.FromProvidedObj m (fi.PUntaint((fun fi -> fi.GetRawConstantValue()), m))) else None #endif - + /// Get the type of the field as an IL type - member x.ILFieldType = - match x with - | ILFieldInfo (_,fdef) -> fdef.FieldType + member x.ILFieldType = + match x with + | ILFieldInfo (_, fdef) -> fdef.FieldType #if !NO_EXTENSIONTYPING - | ProvidedField(amap,fi,m) -> Import.ImportProvidedTypeAsILType amap m (fi.PApply((fun fi -> fi.FieldType),m)) + | ProvidedField(amap, fi, m) -> Import.ImportProvidedTypeAsILType amap m (fi.PApply((fun fi -> fi.FieldType), m)) #endif /// Get the type of the field as an F# type - member x.FieldType(amap,m) = - match x with - | ILFieldInfo (tinfo,fdef) -> ImportILTypeFromMetadata amap m tinfo.ILScopeRef tinfo.TypeInstOfRawMetadata [] fdef.FieldType + member x.FieldType(amap, m) = + match x with + | ILFieldInfo (tinfo, fdef) -> ImportILTypeFromMetadata amap m tinfo.ILScopeRef tinfo.TypeInstOfRawMetadata [] fdef.FieldType #if !NO_EXTENSIONTYPING - | ProvidedField(amap,fi,m) -> Import.ImportProvidedType amap m (fi.PApply((fun fi -> fi.FieldType),m)) + | ProvidedField(amap, fi, m) -> Import.ImportProvidedType amap m (fi.PApply((fun fi -> fi.FieldType), m)) #endif /// Tests whether two infos have the same underlying definition. /// Must be compatible with ItemsAreEffectivelyEqual relation. - static member ILFieldInfosUseIdenticalDefinitions x1 x2 = - match x1,x2 with + static member ILFieldInfosUseIdenticalDefinitions x1 x2 = + match x1, x2 with | ILFieldInfo(_, x1), ILFieldInfo(_, x2) -> (x1 === x2) #if !NO_EXTENSIONTYPING - | ProvidedField(_,fi1,_), ProvidedField(_,fi2,_)-> ProvidedFieldInfo.TaintedEquals (fi1, fi2) + | ProvidedField(_, fi1, _), ProvidedField(_, fi2, _)-> ProvidedFieldInfo.TaintedEquals (fi1, fi2) | _ -> false #endif /// Get an (uninstantiated) reference to the field as an Abstract IL ILFieldRef - member x.ILFieldRef = rescopeILFieldRef x.ScopeRef (mkILFieldRef(x.ILTypeRef,x.FieldName,x.ILFieldType)) + member x.ILFieldRef = rescopeILFieldRef x.ScopeRef (mkILFieldRef(x.ILTypeRef, x.FieldName, x.ILFieldType)) /// Calculates a hash code of field info. Must be compatible with ItemsAreEffectivelyEqual relation. member x.ComputeHashCode() = hash x.FieldName @@ -1743,53 +1737,53 @@ type ILFieldInfo = override x.ToString() = x.FieldName -/// Describes an F# use of a 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 [] -type RecdFieldInfo = - | RecdFieldInfo of TypeInst * Tast.RecdFieldRef +type RecdFieldInfo = + | RecdFieldInfo of TypeInst * Tast.RecdFieldRef /// Get the generic instantiation of the declaring type of the field - member x.TypeInst = let (RecdFieldInfo(tinst,_)) = x in tinst + member x.TypeInst = let (RecdFieldInfo(tinst, _)) = x in tinst /// Get a reference to the F# metadata for the uninstantiated field - member x.RecdFieldRef = let (RecdFieldInfo(_,rfref)) = x in rfref + member x.RecdFieldRef = let (RecdFieldInfo(_, rfref)) = x in rfref /// Get the F# metadata for the uninstantiated field member x.RecdField = x.RecdFieldRef.RecdField - /// Indicate if the field is a static 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 member x.IsStatic = x.RecdField.IsStatic - /// Indicate if the field is a literal 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 member x.LiteralValue = x.RecdField.LiteralValue - /// Get a reference to the F# metadata for the F#-declared record, class or struct type + /// Get a reference to the F# metadata for the F#-declared record, class or struct type member x.TyconRef = x.RecdFieldRef.TyconRef - /// Get 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 member x.Tycon = x.RecdFieldRef.Tycon - /// Get the name of the field in an F#-declared record, class or struct type + /// Get the name of the field in an F#-declared record, class or struct type member x.Name = x.RecdField.Name - /// Get the (instantiated) type of the 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 member x.FieldType = actualTyOfRecdFieldRef x.RecdFieldRef x.TypeInst - /// Get the enclosing (declaring) type of the field in an F#-declared record, class or struct type - member x.DeclaringType = TType_app (x.RecdFieldRef.TyconRef,x.TypeInst) + /// Get the enclosing (declaring) type of the field in an F#-declared record, class or struct type + member x.DeclaringType = TType_app (x.RecdFieldRef.TyconRef, x.TypeInst) override x.ToString() = x.TyconRef.ToString() + "::" + x.Name - + /// Describes an F# use of a union case [] -type UnionCaseInfo = - | UnionCaseInfo of TypeInst * Tast.UnionCaseRef +type UnionCaseInfo = + | UnionCaseInfo of TypeInst * Tast.UnionCaseRef /// Get the list of types for the instantiation of the type parameters of the declaring type of the union case - member x.TypeInst = let (UnionCaseInfo(tinst,_)) = x in tinst + member x.TypeInst = let (UnionCaseInfo(tinst, _)) = x in tinst /// Get a reference to the F# metadata for the uninstantiated union case - member x.UnionCaseRef = let (UnionCaseInfo(_,ucref)) = x in ucref + member x.UnionCaseRef = let (UnionCaseInfo(_, ucref)) = x in ucref /// Get the F# metadata for the uninstantiated union case member x.UnionCase = x.UnionCaseRef.UnionCase @@ -1811,88 +1805,88 @@ type UnionCaseInfo = /// Describes an F# use of a property backed by Abstract IL metadata [] -type ILPropInfo = - | ILPropInfo of ILTypeInfo * ILPropertyDef +type ILPropInfo = + | ILPropInfo of ILTypeInfo * ILPropertyDef /// Get the TcGlobals governing this value - member x.TcGlobals = match x with ILPropInfo(tinfo,_) -> tinfo.TcGlobals + member x.TcGlobals = match x with ILPropInfo(tinfo, _) -> tinfo.TcGlobals /// Get the declaring IL type of the IL property, including any generic instantiation - member x.ILTypeInfo = match x with ILPropInfo(tinfo,_) -> tinfo + member x.ILTypeInfo = match x with ILPropInfo(tinfo, _) -> tinfo - /// 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 + /// 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. - member x.ApparentEnclosingType = match x with ILPropInfo(tinfo,_) -> tinfo.ToType + member x.ApparentEnclosingType = match x with ILPropInfo(tinfo, _) -> tinfo.ToType /// Like ApparentEnclosingType but use the compiled nominal type if this is a method on a tuple type member x.ApparentEnclosingAppType = convertToTypeWithMetadataIfPossible x.TcGlobals x.ApparentEnclosingType /// Get the raw Abstract IL metadata for the IL property - member x.RawMetadata = match x with ILPropInfo(_,pd) -> pd + member x.RawMetadata = match x with ILPropInfo(_, pd) -> pd /// Get the name of the IL property member x.PropertyName = x.RawMetadata.Name /// Gets the ILMethInfo of the 'get' method for the IL property - member x.GetterMethod = + member x.GetterMethod = assert x.HasGetter let mdef = resolveILMethodRef x.ILTypeInfo.RawMetadata x.RawMetadata.GetMethod.Value - ILMethInfo(x.TcGlobals,x.ILTypeInfo.ToType,None,mdef,[]) + ILMethInfo(x.TcGlobals, x.ILTypeInfo.ToType, None, mdef, []) /// Gets the ILMethInfo of the 'set' method for the IL property - member x.SetterMethod = + member x.SetterMethod = assert x.HasSetter let mdef = resolveILMethodRef x.ILTypeInfo.RawMetadata x.RawMetadata.SetMethod.Value - ILMethInfo(x.TcGlobals,x.ILTypeInfo.ToType,None,mdef,[]) - + ILMethInfo(x.TcGlobals, x.ILTypeInfo.ToType, None, mdef, []) + /// Indicates if the IL property has a 'get' method - member x.HasGetter = Option.isSome x.RawMetadata.GetMethod + member x.HasGetter = Option.isSome x.RawMetadata.GetMethod /// Indicates if the IL property has a 'set' method - member x.HasSetter = Option.isSome x.RawMetadata.SetMethod + member x.HasSetter = Option.isSome x.RawMetadata.SetMethod /// Indicates if the IL property is static - member x.IsStatic = (x.RawMetadata.CallingConv = ILThisConvention.Static) + member x.IsStatic = (x.RawMetadata.CallingConv = ILThisConvention.Static) /// Indicates if the IL property is virtual - member x.IsVirtual = + member x.IsVirtual = (x.HasGetter && x.GetterMethod.IsVirtual) || - (x.HasSetter && x.SetterMethod.IsVirtual) + (x.HasSetter && x.SetterMethod.IsVirtual) /// Indicates if the IL property is logically a 'newslot', i.e. hides any previous slots of the same name. - member x.IsNewSlot = + member x.IsNewSlot = (x.HasGetter && x.GetterMethod.IsNewSlot) || - (x.HasSetter && x.SetterMethod.IsNewSlot) + (x.HasSetter && x.SetterMethod.IsNewSlot) /// 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. - member x.GetParamNamesAndTypes(amap,m) = - let (ILPropInfo (tinfo,pdef)) = x + member x.GetParamNamesAndTypes(amap, m) = + let (ILPropInfo (tinfo, pdef)) = x pdef.Args |> List.map (fun ty -> ParamNameAndType(None, ImportILTypeFromMetadata amap m tinfo.ILScopeRef tinfo.TypeInstOfRawMetadata [] ty) ) /// 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. - member x.GetParamTypes(amap,m) = - let (ILPropInfo (tinfo,pdef)) = x - pdef.Args |> List.map (fun ty -> ImportILTypeFromMetadata amap m tinfo.ILScopeRef tinfo.TypeInstOfRawMetadata [] ty) + member x.GetParamTypes(amap, m) = + let (ILPropInfo (tinfo, pdef)) = x + pdef.Args |> List.map (fun ty -> ImportILTypeFromMetadata amap m tinfo.ILScopeRef tinfo.TypeInstOfRawMetadata [] ty) /// Get the return type of the IL property. /// /// Any type parameters of the enclosing type are instantiated in the type returned. - member x.GetPropertyType (amap,m) = - let (ILPropInfo (tinfo,pdef)) = x + member x.GetPropertyType (amap, m) = + let (ILPropInfo (tinfo, pdef)) = x ImportILTypeFromMetadata amap m tinfo.ILScopeRef tinfo.TypeInstOfRawMetadata [] pdef.PropertyType override x.ToString() = x.ILTypeInfo.ToString() + "::" + x.PropertyName -/// Describes an F# use of a property +/// Describes an F# use of a property [] -type PropInfo = +type PropInfo = /// An F# use of a property backed by F#-declared metadata | FSProp of TcGlobals * TType * ValRef option * ValRef option /// An F# use of a property backed by Abstract IL metadata @@ -1902,112 +1896,112 @@ type PropInfo = | ProvidedProp of Import.ImportMap * Tainted * range #endif - /// Get the enclosing type of the property. + /// 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. - member x.ApparentEnclosingType = - match x with + member x.ApparentEnclosingType = + match x with | ILProp ilpinfo -> ilpinfo.ILTypeInfo.ToType - | FSProp(_,ty,_,_) -> ty + | FSProp(_, ty, _, _) -> ty #if !NO_EXTENSIONTYPING - | ProvidedProp(amap,pi,m) -> - Import.ImportProvidedType amap m (pi.PApply((fun pi -> pi.DeclaringType),m)) + | ProvidedProp(amap, pi, m) -> + Import.ImportProvidedType amap m (pi.PApply((fun pi -> pi.DeclaringType), m)) #endif /// Get the enclosing type of the method info, using a nominal type for tuple types - member x.ApparentEnclosingAppType = + member x.ApparentEnclosingAppType = match x with | ILProp ilpinfo -> ilpinfo.ApparentEnclosingAppType | _ -> x.ApparentEnclosingType member x.ApparentEnclosingTyconRef = tcrefOfAppTy x.TcGlobals x.ApparentEnclosingAppType - /// Get the declaring type or module holding the method. + /// 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. - member x.DeclaringTyconRef = - match x.ArbitraryValRef with + member x.DeclaringTyconRef = + match x.ArbitraryValRef with | Some vref when x.IsExtensionMember && vref.HasDeclaringEntity -> vref.TopValDeclaringEntity | _ -> x.ApparentEnclosingTyconRef /// Try to get an arbitrary F# ValRef associated with the member. This is to determine if the member is virtual, amongst other things. - member x.ArbitraryValRef : ValRef option = - match x with - | FSProp(_,_,Some vref,_) - | FSProp(_,_,_, Some vref) -> Some vref - | FSProp(_,_,None,None) -> failwith "unreachable" - | _ -> None + member x.ArbitraryValRef : ValRef option = + match x with + | FSProp(_, _, Some vref, _) + | FSProp(_, _, _, Some vref) -> Some vref + | FSProp(_, _, None, None) -> failwith "unreachable" + | _ -> None /// Indicates if this property has an associated XML comment authored in this assembly. member x.HasDirectXmlComment = match x with - | FSProp(g,_,Some vref,_) - | FSProp(g,_,_,Some vref) -> valRefInThisAssembly g.compilingFslib vref + | FSProp(g, _, Some vref, _) + | FSProp(g, _, _, Some vref) -> valRefInThisAssembly g.compilingFslib vref #if !NO_EXTENSIONTYPING | ProvidedProp _ -> true #endif | _ -> false /// Get the logical name of the property. - member x.PropertyName = - match x with + member x.PropertyName = + match x with | ILProp ilpinfo -> ilpinfo.PropertyName - | FSProp(_,_,Some vref,_) - | FSProp(_,_,_, Some vref) -> vref.PropertyName + | FSProp(_, _, Some vref, _) + | FSProp(_, _, _, Some vref) -> vref.PropertyName #if !NO_EXTENSIONTYPING - | ProvidedProp(_,pi,m) -> pi.PUntaint((fun pi -> pi.Name),m) + | ProvidedProp(_, pi, m) -> pi.PUntaint((fun pi -> pi.Name), m) #endif | FSProp _ -> failwith "unreachable" /// Indicates if this property has an associated getter method. - member x.HasGetter = + member x.HasGetter = match x with | ILProp ilpinfo-> ilpinfo.HasGetter - | FSProp(_,_,x,_) -> Option.isSome x + | FSProp(_, _, x, _) -> Option.isSome x #if !NO_EXTENSIONTYPING - | ProvidedProp(_,pi,m) -> pi.PUntaint((fun pi -> pi.CanRead),m) + | ProvidedProp(_, pi, m) -> pi.PUntaint((fun pi -> pi.CanRead), m) #endif /// Indicates if this property has an associated setter method. - member x.HasSetter = + member x.HasSetter = match x with | ILProp ilpinfo -> ilpinfo.HasSetter - | FSProp(_,_,_,x) -> Option.isSome x + | FSProp(_, _, _, x) -> Option.isSome x #if !NO_EXTENSIONTYPING - | ProvidedProp(_,pi,m) -> pi.PUntaint((fun pi -> pi.CanWrite),m) + | ProvidedProp(_, pi, m) -> pi.PUntaint((fun pi -> pi.CanWrite), m) #endif /// Indicates if this is an extension member - member x.IsExtensionMember = - match x.ArbitraryValRef with - | Some vref -> vref.IsExtensionMember + member x.IsExtensionMember = + match x.ArbitraryValRef with + | Some vref -> vref.IsExtensionMember | _ -> false /// True if the getter (or, if absent, the setter) is a virtual method // REVIEW: for IL properties this is getter OR setter. For F# properties it is getter ELSE setter - member x.IsVirtualProperty = - match x with + member x.IsVirtualProperty = + match x with | ILProp ilpinfo -> ilpinfo.IsVirtual - | FSProp(_,_,Some vref,_) - | FSProp(_,_,_, Some vref) -> vref.IsVirtualMember + | FSProp(_, _, Some vref, _) + | FSProp(_, _, _, Some vref) -> vref.IsVirtualMember | FSProp _-> failwith "unreachable" #if !NO_EXTENSIONTYPING - | ProvidedProp(_,pi,m) -> + | ProvidedProp(_, pi, m) -> let mi = ArbitraryMethodInfoOfPropertyInfo pi m mi.PUntaint((fun mi -> mi.IsVirtual), m) #endif - + /// Indicates if the property is logically a 'newslot', i.e. hides any previous slots of the same name. - member x.IsNewSlot = - match x with + member x.IsNewSlot = + match x with | ILProp ilpinfo -> ilpinfo.IsNewSlot - | FSProp(_,_,Some vref,_) - | FSProp(_,_,_, Some vref) -> vref.IsDispatchSlotMember - | FSProp(_,_,None,None) -> failwith "unreachable" + | FSProp(_, _, Some vref, _) + | FSProp(_, _, _, Some vref) -> vref.IsDispatchSlotMember + | FSProp(_, _, None, None) -> failwith "unreachable" #if !NO_EXTENSIONTYPING - | ProvidedProp(_,pi,m) -> + | ProvidedProp(_, pi, m) -> let mi = ArbitraryMethodInfoOfPropertyInfo pi m mi.PUntaint((fun mi -> mi.IsHideBySig), m) #endif @@ -2015,71 +2009,71 @@ type PropInfo = /// Indicates if the getter (or, if absent, the setter) for the property is a dispatch slot. // REVIEW: for IL properties this is getter OR setter. For F# properties it is getter ELSE setter - member x.IsDispatchSlot = - match x with + member x.IsDispatchSlot = + match x with | ILProp ilpinfo -> ilpinfo.IsVirtual - | FSProp(g,ty,Some vref,_) - | FSProp(g,ty,_, Some vref) -> + | FSProp(g, ty, Some vref, _) + | FSProp(g, ty, _, Some vref) -> isInterfaceTy g ty || (vref.MemberInfo.Value.MemberFlags.IsDispatchSlot) | FSProp _ -> failwith "unreachable" #if !NO_EXTENSIONTYPING - | ProvidedProp(_,pi,m) -> + | ProvidedProp(_, pi, m) -> let mi = ArbitraryMethodInfoOfPropertyInfo pi m mi.PUntaint((fun mi -> mi.IsVirtual), m) #endif /// Indicates if this property is static. member x.IsStatic = - match x with + match x with | ILProp ilpinfo -> ilpinfo.IsStatic - | FSProp(_,_,Some vref,_) - | FSProp(_,_,_, Some vref) -> not vref.IsInstanceMember - | FSProp(_,_,None,None) -> failwith "unreachable" + | FSProp(_, _, Some vref, _) + | FSProp(_, _, _, Some vref) -> not vref.IsInstanceMember + | FSProp(_, _, None, None) -> failwith "unreachable" #if !NO_EXTENSIONTYPING - | ProvidedProp(_,pi,m) -> + | ProvidedProp(_, pi, m) -> (ArbitraryMethodInfoOfPropertyInfo pi m).PUntaint((fun mi -> mi.IsStatic), m) #endif /// Indicates if this property is marked 'override' and thus definitely overrides another property. - member x.IsDefiniteFSharpOverride = - match x.ArbitraryValRef with + member x.IsDefiniteFSharpOverride = + match x.ArbitraryValRef with | Some vref -> vref.IsDefiniteFSharpOverrideMember | None -> false member x.ImplementedSlotSignatures = - x.ArbitraryValRef.Value.ImplementedSlotSignatures + x.ArbitraryValRef.Value.ImplementedSlotSignatures - member x.IsFSharpExplicitInterfaceImplementation = - match x.ArbitraryValRef with + member x.IsFSharpExplicitInterfaceImplementation = + match x.ArbitraryValRef with | Some vref -> vref.IsFSharpExplicitInterfaceImplementation x.TcGlobals | None -> false /// Indicates if this property is an indexer property, i.e. a property with arguments. - member x.IsIndexer = - match x with - | ILProp(ILPropInfo(_,pdef)) -> pdef.Args.Length <> 0 - | FSProp(g,_,Some vref,_) -> - // A getter has signature { OptionalObjectType } -> Unit -> PropertyType - // A getter indexer has signature { OptionalObjectType } -> TupledIndexerArguments -> PropertyType + member x.IsIndexer = + match x with + | ILProp(ILPropInfo(_, pdef)) -> pdef.Args.Length <> 0 + | FSProp(g, _, Some vref, _) -> + // A getter has signature { OptionalObjectType } -> Unit -> PropertyType + // A getter indexer has signature { OptionalObjectType } -> TupledIndexerArguments -> PropertyType let arginfos = ArgInfosOfMember g vref arginfos.Length = 1 && arginfos.Head.Length >= 1 - | FSProp(g,_,_, Some vref) -> - // A setter has signature { OptionalObjectType } -> PropertyType -> Void - // A setter indexer has signature { OptionalObjectType } -> TupledIndexerArguments -> PropertyType -> Void + | FSProp(g, _, _, Some vref) -> + // A setter has signature { OptionalObjectType } -> PropertyType -> Void + // A setter indexer has signature { OptionalObjectType } -> TupledIndexerArguments -> PropertyType -> Void let arginfos = ArgInfosOfMember g vref arginfos.Length = 1 && arginfos.Head.Length >= 2 - | FSProp(_,_,None,None) -> + | FSProp(_, _, None, None) -> failwith "unreachable" #if !NO_EXTENSIONTYPING - | ProvidedProp(_,pi,m) -> + | ProvidedProp(_, pi, m) -> pi.PUntaint((fun pi -> pi.GetIndexParameters().Length), m)>0 #endif /// Indicates if this is an F# property compiled as a CLI event, e.g. a [] property. - member x.IsFSharpEventProperty = - match x with - | FSProp(g,_,Some vref,None) -> vref.IsFSharpEventProperty(g) + member x.IsFSharpEventProperty = + match x with + | FSProp(g, _, Some vref, None) -> vref.IsFSharpEventProperty(g) #if !NO_EXTENSIONTYPING | ProvidedProp _ -> false #endif @@ -2089,97 +2083,97 @@ type PropInfo = /// /// 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 - member x.DropSetter = - match x with - | FSProp(g,ty,Some vref,_) -> FSProp(g,ty,Some vref,None) + member x.DropSetter = + match x with + | FSProp(g, ty, Some vref, _) -> FSProp(g, ty, Some vref, None) | _ -> x /// Return a new property info where there is no associated getter, only an associated setter. - member x.DropGetter = - match x with - | FSProp(g,ty,_,Some vref) -> FSProp(g,ty,None,Some vref) + member x.DropGetter = + match x with + | FSProp(g, ty, _, Some vref) -> FSProp(g, ty, None, Some vref) | _ -> x /// Get the intra-assembly XML documentation for the property. - member x.XmlDoc = - match x with + member x.XmlDoc = + match x with | ILProp _ -> XmlDoc.Empty - | FSProp(_,_,Some vref,_) - | FSProp(_,_,_, Some vref) -> vref.XmlDoc - | FSProp(_,_,None,None) -> failwith "unreachable" + | FSProp(_, _, Some vref, _) + | FSProp(_, _, _, Some vref) -> vref.XmlDoc + | FSProp(_, _, None, None) -> failwith "unreachable" #if !NO_EXTENSIONTYPING - | ProvidedProp(_,pi,m) -> + | ProvidedProp(_, pi, m) -> XmlDoc (pi.PUntaint((fun pix -> (pix :> IProvidedCustomAttributeProvider).GetXmlDocAttributes(pi.TypeProvider.PUntaintNoFailure(id))), m)) #endif /// Get the TcGlobals associated with the object - member x.TcGlobals = - match x with - | ILProp ilpinfo -> ilpinfo.TcGlobals - | FSProp(g,_,_,_) -> g + member x.TcGlobals = + match x with + | ILProp ilpinfo -> ilpinfo.TcGlobals + | FSProp(g, _, _, _) -> g #if !NO_EXTENSIONTYPING - | ProvidedProp(amap,_,_) -> amap.g + | ProvidedProp(amap, _, _) -> amap.g #endif - /// Indicates if the enclosing type for the property is a value type. + /// 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. member x.IsValueType = isStructTy x.TcGlobals x.ApparentEnclosingType /// Get the result type of the property - member x.GetPropertyType (amap,m) = + member x.GetPropertyType (amap, m) = match x with - | ILProp ilpinfo -> ilpinfo.GetPropertyType (amap,m) - | FSProp (g,_,Some vref,_) - | FSProp (g,_,_,Some vref) -> + | ILProp ilpinfo -> ilpinfo.GetPropertyType (amap, m) + | FSProp (g, _, Some vref, _) + | FSProp (g, _, _, Some vref) -> let ty = x.ApparentEnclosingAppType - let inst = GetInstantiationForPropertyVal g (ty,vref) + let inst = GetInstantiationForPropertyVal g (ty, vref) ReturnTypeOfPropertyVal g vref.Deref |> instType inst - + | FSProp _ -> failwith "unreachable" #if !NO_EXTENSIONTYPING - | ProvidedProp(_,pi,m) -> - Import.ImportProvidedType amap m (pi.PApply((fun pi -> pi.PropertyType),m)) + | ProvidedProp(_, pi, m) -> + Import.ImportProvidedType amap m (pi.PApply((fun pi -> pi.PropertyType), m)) #endif /// 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. - member x.GetParamNamesAndTypes(amap,m) = - match x with - | ILProp ilpinfo -> ilpinfo.GetParamNamesAndTypes(amap,m) - | FSProp (g,ty,Some vref,_) - | FSProp (g,ty,_,Some vref) -> - let inst = GetInstantiationForPropertyVal g (ty,vref) + member x.GetParamNamesAndTypes(amap, m) = + match x with + | ILProp ilpinfo -> ilpinfo.GetParamNamesAndTypes(amap, m) + | FSProp (g, ty, Some vref, _) + | FSProp (g, ty, _, Some vref) -> + let inst = GetInstantiationForPropertyVal g (ty, vref) ArgInfosOfPropertyVal g vref.Deref |> List.map (ParamNameAndType.FromArgInfo >> ParamNameAndType.Instantiate inst) | FSProp _ -> failwith "unreachable" #if !NO_EXTENSIONTYPING - | ProvidedProp (_,pi,m) -> + | ProvidedProp (_, pi, m) -> [ for p in pi.PApplyArray((fun pi -> pi.GetIndexParameters()), "GetIndexParameters", m) do let paramName = p.PUntaint((fun p -> match p.Name with null -> None | s -> Some (mkSynId m s)), m) let paramType = Import.ImportProvidedType amap m (p.PApply((fun p -> p.ParameterType), m)) yield ParamNameAndType(paramName, paramType) ] #endif - + /// Get the details of the indexer parameters associated with the property - member x.GetParamDatas(amap,m) = - x.GetParamNamesAndTypes(amap,m) - |> List.map (fun (ParamNameAndType(nmOpt,pty)) -> ParamData(false, false, false, NotOptional, NoCallerInfo, nmOpt, ReflectedArgInfo.None, pty)) + member x.GetParamDatas(amap, m) = + x.GetParamNamesAndTypes(amap, m) + |> List.map (fun (ParamNameAndType(nmOpt, pty)) -> ParamData(false, false, false, NotOptional, NoCallerInfo, nmOpt, ReflectedArgInfo.None, pty)) /// Get the types of the indexer parameters associated with the property - member x.GetParamTypes(amap,m) = - x.GetParamNamesAndTypes(amap,m) |> List.map (fun (ParamNameAndType(_,ty)) -> ty) + member x.GetParamTypes(amap, m) = + x.GetParamNamesAndTypes(amap, m) |> List.map (fun (ParamNameAndType(_, ty)) -> ty) /// Get a MethInfo for the 'getter' method associated with the property - member x.GetterMethod = + member x.GetterMethod = match x with | ILProp ilpinfo -> ILMeth(x.TcGlobals, ilpinfo.GetterMethod, None) - | FSProp(g,ty,Some vref,_) -> FSMeth(g,ty,vref,None) + | FSProp(g, ty, Some vref, _) -> FSMeth(g, ty, vref, None) #if !NO_EXTENSIONTYPING - | ProvidedProp(amap,pi,m) -> + | ProvidedProp(amap, pi, m) -> let meth = GetAndSanityCheckProviderMethod m pi (fun pi -> pi.GetGetMethod()) FSComp.SR.etPropertyCanReadButHasNoGetter ProvidedMeth(amap, meth, None, m) @@ -2187,12 +2181,12 @@ type PropInfo = | FSProp _ -> failwith "no getter method" /// Get a MethInfo for the 'setter' method associated with the property - member x.SetterMethod = + member x.SetterMethod = match x with | ILProp ilpinfo -> ILMeth(x.TcGlobals, ilpinfo.SetterMethod, None) - | FSProp(g,ty,_,Some vref) -> FSMeth(g,ty,vref,None) + | FSProp(g, ty, _, Some vref) -> FSMeth(g, ty, vref, None) #if !NO_EXTENSIONTYPING - | ProvidedProp(amap,pi,m) -> + | ProvidedProp(amap, pi, m) -> let meth = GetAndSanityCheckProviderMethod m pi (fun pi -> pi.GetSetMethod()) FSComp.SR.etPropertyCanWriteButHasNoSetter ProvidedMeth(amap, meth, None, m) #endif @@ -2201,30 +2195,30 @@ type PropInfo = /// Test whether two property infos have the same underlying definition. /// Uses the same techniques as 'MethInfosUseIdenticalDefinitions'. /// Must be compatible with ItemsAreEffectivelyEqual relation. - static member PropInfosUseIdenticalDefinitions x1 x2 = - let optVrefEq g = function + static member PropInfosUseIdenticalDefinitions x1 x2 = + let optVrefEq g = function | Some(v1), Some(v2) -> valRefEq g v1 v2 | None, None -> true - | _ -> false - match x1,x2 with + | _ -> false + match x1, x2 with | ILProp ilpinfo1, ILProp ilpinfo2 -> (ilpinfo1.RawMetadata === ilpinfo2.RawMetadata) | FSProp(g, _, vrefa1, vrefb1), FSProp(_, _, vrefa2, vrefb2) -> (optVrefEq g (vrefa1, vrefa2)) && (optVrefEq g (vrefb1, vrefb2)) #if !NO_EXTENSIONTYPING - | ProvidedProp(_,pi1,_), ProvidedProp(_,pi2,_) -> ProvidedPropertyInfo.TaintedEquals (pi1, pi2) + | ProvidedProp(_, pi1, _), ProvidedProp(_, pi2, _) -> ProvidedPropertyInfo.TaintedEquals (pi1, pi2) #endif | _ -> false /// Calculates a hash code of property info. Must be compatible with ItemsAreEffectivelyEqual relation. - member pi.ComputeHashCode() = - match pi with + member pi.ComputeHashCode() = + match pi with | ILProp ilpinfo -> hash ilpinfo.RawMetadata.Name - | FSProp(_,_,vrefOpt1, vrefOpt2) -> + | FSProp(_, _, vrefOpt1, vrefOpt2) -> // Hash on option*option let vth = (vrefOpt1 |> Option.map (fun vr -> vr.LogicalName), (vrefOpt2 |> Option.map (fun vr -> vr.LogicalName))) hash vth #if !NO_EXTENSIONTYPING - | ProvidedProp(_,pi,_) -> ProvidedPropertyInfo.TaintedGetHashCode(pi) + | ProvidedProp(_, pi, _) -> ProvidedPropertyInfo.TaintedGetHashCode(pi) #endif //------------------------------------------------------------------------- @@ -2233,11 +2227,11 @@ type PropInfo = /// Describes an F# use of an event backed by Abstract IL metadata [] -type ILEventInfo = +type ILEventInfo = | ILEventInfo of ILTypeInfo * ILEventDef - /// Get the enclosing ("parent"/"declaring") type of the field. - member x.ApparentEnclosingType = match x with ILEventInfo(tinfo,_) -> tinfo.ToType + /// Get the enclosing ("parent"/"declaring") type of the field. + member x.ApparentEnclosingType = match x with ILEventInfo(tinfo, _) -> tinfo.ToType // Note: events are always associated with nominal types member x.ApparentEnclosingAppType = x.ApparentEnclosingType @@ -2245,23 +2239,23 @@ type ILEventInfo = // Note: IL Events are never extension members as C# has no notion of extension events as yet member x.DeclaringTyconRef = tcrefOfAppTy x.TcGlobals x.ApparentEnclosingAppType - member x.TcGlobals = match x with ILEventInfo(tinfo,_) -> tinfo.TcGlobals + member x.TcGlobals = match x with ILEventInfo(tinfo, _) -> tinfo.TcGlobals /// Get the raw Abstract IL metadata for the event - member x.RawMetadata = match x with ILEventInfo(_,ed) -> ed + member x.RawMetadata = match x with ILEventInfo(_, ed) -> ed /// Get the declaring IL type of the event as an ILTypeInfo - member x.ILTypeInfo = match x with ILEventInfo(tinfo,_) -> tinfo + member x.ILTypeInfo = match x with ILEventInfo(tinfo, _) -> tinfo /// Get the ILMethInfo describing the 'add' method associated with the event member x.AddMethod = let mdef = resolveILMethodRef x.ILTypeInfo.RawMetadata x.RawMetadata.AddMethod - ILMethInfo(x.TcGlobals,x.ILTypeInfo.ToType,None,mdef,[]) + ILMethInfo(x.TcGlobals, x.ILTypeInfo.ToType, None, mdef, []) /// Get the ILMethInfo describing the 'remove' method associated with the event member x.RemoveMethod = let mdef = resolveILMethodRef x.ILTypeInfo.RawMetadata x.RawMetadata.RemoveMethod - ILMethInfo(x.TcGlobals,x.ILTypeInfo.ToType,None,mdef,[]) + ILMethInfo(x.TcGlobals, x.ILTypeInfo.ToType, None, mdef, []) /// Get the declaring type of the event as an ILTypeRef member x.TypeRef = x.ILTypeInfo.ILTypeRef @@ -2281,19 +2275,19 @@ type ILEventInfo = /// 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." exception BadEventTransformation of range -/// Properties compatible with type IDelegateEvent and attributed with CLIEvent are special: -/// we generate metadata and add/remove methods -/// to make them into a .NET event, and mangle the name of a property. -/// We don't handle static, indexer or abstract properties correctly. -/// Note the name mangling doesn't affect the name of the get/set methods for the property -/// and so doesn't affect how we compile F# accesses to the property. -let private tyConformsToIDelegateEvent g ty = - isIDelegateEventType g ty && isDelegateTy g (destIDelegateEventType g ty) - +/// Properties compatible with type IDelegateEvent and attributed with CLIEvent are special: +/// we generate metadata and add/remove methods +/// to make them into a .NET event, and mangle the name of a property. +/// We don't handle static, indexer or abstract properties correctly. +/// Note the name mangling doesn't affect the name of the get/set methods for the property +/// and so doesn't affect how we compile F# accesses to the property. +let private tyConformsToIDelegateEvent g ty = + isIDelegateEventType g ty && isDelegateTy g (destIDelegateEventType g ty) + -/// Create an error object to raise should an event not have the shape expected by the .NET idiom described further below -let nonStandardEventError nm m = - Error ((FSComp.SR.eventHasNonStandardType(nm,("add_"+nm),("remove_"+nm))),m) +/// Create an error object to raise should an event not have the shape expected by the .NET idiom described further below +let nonStandardEventError nm m = + Error ((FSComp.SR.eventHasNonStandardType(nm, ("add_"+nm), ("remove_"+nm))), m) /// 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. @@ -2302,13 +2296,13 @@ let FindDelegateTypeOfPropertyEvent g amap nm m ty = | None -> error(nonStandardEventError nm m) | Some ty -> destIDelegateEventType g ty - + //------------------------------------------------------------------------- // EventInfo /// Describes an F# use of an event [] -type EventInfo = +type EventInfo = /// An F# use of an event backed by F#-declared metadata | FSEvent of TcGlobals * PropInfo * ValRef * ValRef /// An F# use of an event backed by .NET metadata @@ -2318,137 +2312,137 @@ type EventInfo = | ProvidedEvent of Import.ImportMap * Tainted * range #endif - /// Get the enclosing type of the event. + /// 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. - member x.ApparentEnclosingType = - match x with - | ILEvent ileinfo -> ileinfo.ApparentEnclosingType - | FSEvent (_,p,_,_) -> p.ApparentEnclosingType + member x.ApparentEnclosingType = + match x with + | ILEvent ileinfo -> ileinfo.ApparentEnclosingType + | FSEvent (_, p, _, _) -> p.ApparentEnclosingType #if !NO_EXTENSIONTYPING - | ProvidedEvent (amap,ei,m) -> Import.ImportProvidedType amap m (ei.PApply((fun ei -> ei.DeclaringType),m)) + | ProvidedEvent (amap, ei, m) -> Import.ImportProvidedType amap m (ei.PApply((fun ei -> ei.DeclaringType), m)) #endif /// Get the enclosing type of the method info, using a nominal type for tuple types - member x.ApparentEnclosingAppType = + member x.ApparentEnclosingAppType = match x with | ILEvent ileinfo -> ileinfo.ApparentEnclosingAppType | _ -> x.ApparentEnclosingType member x.ApparentEnclosingTyconRef = tcrefOfAppTy x.TcGlobals x.ApparentEnclosingAppType - /// Get the declaring type or module holding the method. + /// 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. - member x.DeclaringTyconRef = - match x.ArbitraryValRef with + member x.DeclaringTyconRef = + match x.ArbitraryValRef with | Some vref when x.IsExtensionMember && vref.HasDeclaringEntity -> vref.TopValDeclaringEntity - | _ -> x.ApparentEnclosingTyconRef + | _ -> x.ApparentEnclosingTyconRef /// Indicates if this event has an associated XML comment authored in this assembly. member x.HasDirectXmlComment = match x with - | FSEvent (_,p,_,_) -> p.HasDirectXmlComment + | FSEvent (_, p, _, _) -> p.HasDirectXmlComment #if !NO_EXTENSIONTYPING | ProvidedEvent _ -> true #endif | _ -> false /// Get the intra-assembly XML documentation for the property. - member x.XmlDoc = - match x with + member x.XmlDoc = + match x with | ILEvent _ -> XmlDoc.Empty - | FSEvent (_,p,_,_) -> p.XmlDoc + | FSEvent (_, p, _, _) -> p.XmlDoc #if !NO_EXTENSIONTYPING - | ProvidedEvent (_,ei,m) -> + | ProvidedEvent (_, ei, m) -> XmlDoc (ei.PUntaint((fun eix -> (eix :> IProvidedCustomAttributeProvider).GetXmlDocAttributes(ei.TypeProvider.PUntaintNoFailure(id))), m)) #endif /// Get the logical name of the event. - member x.EventName = - match x with - | ILEvent ileinfo -> ileinfo.Name - | FSEvent (_,p,_,_) -> p.PropertyName + member x.EventName = + match x with + | ILEvent ileinfo -> ileinfo.Name + | FSEvent (_, p, _, _) -> p.PropertyName #if !NO_EXTENSIONTYPING - | ProvidedEvent (_,ei,m) -> ei.PUntaint((fun ei -> ei.Name), m) + | ProvidedEvent (_, ei, m) -> ei.PUntaint((fun ei -> ei.Name), m) #endif /// Indicates if this property is static. - member x.IsStatic = - match x with + member x.IsStatic = + match x with | ILEvent ileinfo -> ileinfo.IsStatic - | FSEvent (_,p,_,_) -> p.IsStatic + | FSEvent (_, p, _, _) -> p.IsStatic #if !NO_EXTENSIONTYPING - | ProvidedEvent (_,ei,m) -> + | ProvidedEvent (_, ei, m) -> let meth = GetAndSanityCheckProviderMethod m ei (fun ei -> ei.GetAddMethod()) FSComp.SR.etEventNoAdd meth.PUntaint((fun mi -> mi.IsStatic), m) #endif /// Indicates if this is an extension member - member x.IsExtensionMember = - match x with + member x.IsExtensionMember = + match x with | ILEvent _ -> false - | FSEvent (_,p,_,_) -> p.IsExtensionMember + | FSEvent (_, p, _, _) -> p.IsExtensionMember #if !NO_EXTENSIONTYPING | ProvidedEvent _ -> false #endif /// Get the TcGlobals associated with the object - member x.TcGlobals = - match x with + member x.TcGlobals = + match x with | ILEvent ileinfo -> ileinfo.TcGlobals - | FSEvent(g,_,_,_) -> g + | FSEvent(g, _, _, _) -> g #if !NO_EXTENSIONTYPING - | ProvidedEvent (amap,_,_) -> amap.g + | ProvidedEvent (amap, _, _) -> amap.g #endif - /// Indicates if the enclosing type for the event is a value type. + /// 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. member x.IsValueType = isStructTy x.TcGlobals x.ApparentEnclosingType /// Get the 'add' method associated with an event - member x.AddMethod = - match x with + member x.AddMethod = + match x with | ILEvent ileinfo -> ILMeth(ileinfo.TcGlobals, ileinfo.AddMethod, None) - | FSEvent(g,p,addValRef,_) -> FSMeth(g,p.ApparentEnclosingType,addValRef,None) + | FSEvent(g, p, addValRef, _) -> FSMeth(g, p.ApparentEnclosingType, addValRef, None) #if !NO_EXTENSIONTYPING - | ProvidedEvent (amap,ei,m) -> + | ProvidedEvent (amap, ei, m) -> let meth = GetAndSanityCheckProviderMethod m ei (fun ei -> ei.GetAddMethod()) FSComp.SR.etEventNoAdd ProvidedMeth(amap, meth, None, m) #endif /// Get the 'remove' method associated with an event - member x.RemoveMethod = - match x with + member x.RemoveMethod = + match x with | ILEvent ileinfo -> ILMeth(x.TcGlobals, ileinfo.RemoveMethod, None) - | FSEvent(g,p,_,removeValRef) -> FSMeth(g,p.ApparentEnclosingType,removeValRef,None) + | FSEvent(g, p, _, removeValRef) -> FSMeth(g, p.ApparentEnclosingType, removeValRef, None) #if !NO_EXTENSIONTYPING - | ProvidedEvent (amap,ei,m) -> + | ProvidedEvent (amap, ei, m) -> let meth = GetAndSanityCheckProviderMethod m ei (fun ei -> ei.GetRemoveMethod()) FSComp.SR.etEventNoRemove ProvidedMeth(amap, meth, None, m) #endif - + /// Try to get an arbitrary F# ValRef associated with the member. This is to determine if the member is virtual, amongst other things. - member x.ArbitraryValRef: ValRef option = - match x with - | FSEvent(_,_,addValRef,_) -> Some addValRef + member x.ArbitraryValRef: ValRef option = + match x with + | FSEvent(_, _, addValRef, _) -> Some addValRef | _ -> None - /// Get the delegate type associated with the event. - member x.GetDelegateType(amap,m) = - match x with - | ILEvent(ILEventInfo(tinfo,edef)) -> + /// Get the delegate type associated with the event. + member x.GetDelegateType(amap, m) = + match x with + | ILEvent(ILEventInfo(tinfo, edef)) -> // Get the delegate type associated with an IL event, taking into account the instantiation of the // declaring type. if Option.isNone edef.EventType then error (nonStandardEventError x.EventName m) ImportILTypeFromMetadata amap m tinfo.ILScopeRef tinfo.TypeInstOfRawMetadata [] edef.EventType.Value - | FSEvent(g,p,_,_) -> - FindDelegateTypeOfPropertyEvent g amap x.EventName m (p.GetPropertyType(amap,m)) + | FSEvent(g, p, _, _) -> + FindDelegateTypeOfPropertyEvent g amap x.EventName m (p.GetPropertyType(amap, m)) #if !NO_EXTENSIONTYPING - | ProvidedEvent (_,ei,_) -> + | ProvidedEvent (_, ei, _) -> Import.ImportProvidedType amap m (ei.PApply((fun ei -> ei.EventHandlerType), m)) #endif @@ -2461,18 +2455,18 @@ type EventInfo = PropInfo.PropInfosUseIdenticalDefinitions pi1 pi2 && valRefEq g vrefa1 vrefa2 && valRefEq g vrefb1 vrefb2 | ILEvent ileinfo1, ILEvent ileinfo2 -> (ileinfo1.RawMetadata === ileinfo2.RawMetadata) #if !NO_EXTENSIONTYPING - | ProvidedEvent (_,ei1,_), ProvidedEvent (_,ei2,_) -> ProvidedEventInfo.TaintedEquals (ei1, ei2) + | ProvidedEvent (_, ei1, _), ProvidedEvent (_, ei2, _) -> ProvidedEventInfo.TaintedEquals (ei1, ei2) #endif | _ -> false - + /// Calculates a hash code of event info (similar as previous) /// Must be compatible with ItemsAreEffectivelyEqual relation. - member ei.ComputeHashCode() = - match ei with + member ei.ComputeHashCode() = + match ei with | ILEvent ileinfo -> hash ileinfo.RawMetadata.Name | FSEvent(_, pi, vref1, vref2) -> hash ( pi.ComputeHashCode(), vref1.LogicalName, vref2.LogicalName) #if !NO_EXTENSIONTYPING - | ProvidedEvent (_,ei,_) -> ProvidedEventInfo.TaintedGetHashCode(ei) + | ProvidedEvent (_, ei, _) -> ProvidedEventInfo.TaintedGetHashCode(ei) #endif //------------------------------------------------------------------------- @@ -2485,29 +2479,29 @@ let stripByrefTy g ty = /// Represents the information about the compiled form of a method signature. Used when analyzing implementation /// relations between members and abstract slots. -type CompiledSig = CompiledSig of TType list list * TType option * Typars * TyparInst +type CompiledSig = CompiledSig of TType list list * TType option * Typars * TyparInst /// Get the information about the compiled form of a method signature. Used when analyzing implementation /// relations between members and abstract slots. -let CompiledSigOfMeth g amap m (minfo:MethInfo) = +let CompiledSigOfMeth g amap m (minfo: MethInfo) = let formalMethTypars = minfo.FormalMethodTypars let fminst = generalizeTypars formalMethTypars let vargtys = minfo.GetParamTypes(amap, m, fminst) let vrty = minfo.GetCompiledReturnTy(amap, m, fminst) - // The formal method typars returned are completely formal - they don't take into account the instantiation - // of the enclosing type. For example, they may have constraints involving the _formal_ type parameters - // of the enclosing type. This instantiations can be used to interpret those type parameters - let fmtpinst = + // The formal method typars returned are completely formal - they don't take into account the instantiation + // of the enclosing type. For example, they may have constraints involving the _formal_ type parameters + // of the enclosing type. This instantiations can be used to interpret those type parameters + let fmtpinst = let parentTyArgs = argsOfAppTy g minfo.ApparentEnclosingAppType - let memberParentTypars = minfo.GetFormalTyparsOfDeclaringType m + let memberParentTypars = minfo.GetFormalTyparsOfDeclaringType m mkTyparInst memberParentTypars parentTyArgs - - CompiledSig(vargtys,vrty,formalMethTypars,fmtpinst) + + CompiledSig(vargtys, vrty, formalMethTypars, fmtpinst) /// 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. -let MethInfosEquivByNameAndPartialSig erasureFlag ignoreFinal g amap m (minfo:MethInfo) (minfo2:MethInfo) = +let MethInfosEquivByNameAndPartialSig erasureFlag ignoreFinal g amap m (minfo: MethInfo) (minfo2: MethInfo) = (minfo.LogicalName = minfo2.LogicalName) && (minfo.GenericArity = minfo2.GenericArity) && (ignoreFinal || minfo.IsFinal = minfo2.IsFinal) && @@ -2517,33 +2511,33 @@ let MethInfosEquivByNameAndPartialSig erasureFlag ignoreFinal g amap m (minfo:Me let fminst2 = generalizeTypars formalMethTypars2 let argtys = minfo.GetParamTypes(amap, m, fminst) let argtys2 = minfo2.GetParamTypes(amap, m, fminst2) - (argtys,argtys2) ||> List.lengthsEqAndForall2 (List.lengthsEqAndForall2 (fun ty1 ty2 -> + (argtys, argtys2) ||> List.lengthsEqAndForall2 (List.lengthsEqAndForall2 (fun ty1 ty2 -> typeAEquivAux erasureFlag g (TypeEquivEnv.FromEquivTypars formalMethTypars formalMethTypars2) (stripByrefTy g ty1) (stripByrefTy g ty2))) -/// Used to hide/filter members from super classes based on signature -let PropInfosEquivByNameAndPartialSig erasureFlag g amap m (pinfo:PropInfo) (pinfo2:PropInfo) = +/// Used to hide/filter members from super classes based on signature +let PropInfosEquivByNameAndPartialSig erasureFlag g amap m (pinfo: PropInfo) (pinfo2: PropInfo) = pinfo.PropertyName = pinfo2.PropertyName && - let argtys = pinfo.GetParamTypes(amap,m) - let argtys2 = pinfo2.GetParamTypes(amap,m) - List.lengthsEqAndForall2 (typeEquivAux erasureFlag g) argtys argtys2 + let argtys = pinfo.GetParamTypes(amap, m) + let argtys2 = pinfo2.GetParamTypes(amap, m) + List.lengthsEqAndForall2 (typeEquivAux erasureFlag g) argtys argtys2 -/// Used to hide/filter members from super classes based on signature -let MethInfosEquivByNameAndSig erasureFlag ignoreFinal g amap m minfo minfo2 = +/// Used to hide/filter members from super classes based on signature +let MethInfosEquivByNameAndSig erasureFlag ignoreFinal g amap m minfo minfo2 = MethInfosEquivByNameAndPartialSig erasureFlag ignoreFinal g amap m minfo minfo2 && - let (CompiledSig(_,retTy,formalMethTypars,_)) = CompiledSigOfMeth g amap m minfo - let (CompiledSig(_,retTy2,formalMethTypars2,_)) = CompiledSigOfMeth g amap m minfo2 - match retTy,retTy2 with - | None,None -> true - | Some retTy,Some retTy2 -> typeAEquivAux erasureFlag g (TypeEquivEnv.FromEquivTypars formalMethTypars formalMethTypars2) retTy retTy2 + let (CompiledSig(_, retTy, formalMethTypars, _)) = CompiledSigOfMeth g amap m minfo + let (CompiledSig(_, retTy2, formalMethTypars2, _)) = CompiledSigOfMeth g amap m minfo2 + match retTy, retTy2 with + | None, None -> true + | Some retTy, Some retTy2 -> typeAEquivAux erasureFlag g (TypeEquivEnv.FromEquivTypars formalMethTypars formalMethTypars2) retTy retTy2 | _ -> false -/// Used to hide/filter members from super classes based on signature -let PropInfosEquivByNameAndSig erasureFlag g amap m (pinfo:PropInfo) (pinfo2:PropInfo) = +/// Used to hide/filter members from super classes based on signature +let PropInfosEquivByNameAndSig erasureFlag g amap m (pinfo: PropInfo) (pinfo2: PropInfo) = PropInfosEquivByNameAndPartialSig erasureFlag g amap m pinfo pinfo2 && - let retTy = pinfo.GetPropertyType(amap,m) - let retTy2 = pinfo2.GetPropertyType(amap,m) + let retTy = pinfo.GetPropertyType(amap, m) + let retTy2 = pinfo2.GetPropertyType(amap, m) typeEquivAux erasureFlag g retTy retTy2 -let SettersOfPropInfos (pinfos:PropInfo list) = pinfos |> List.choose (fun pinfo -> if pinfo.HasSetter then Some(pinfo.SetterMethod,Some pinfo) else None) -let GettersOfPropInfos (pinfos:PropInfo list) = pinfos |> List.choose (fun pinfo -> if pinfo.HasGetter then Some(pinfo.GetterMethod,Some pinfo) else None) +let SettersOfPropInfos (pinfos: PropInfo list) = pinfos |> List.choose (fun pinfo -> if pinfo.HasSetter then Some(pinfo.SetterMethod, Some pinfo) else None) +let GettersOfPropInfos (pinfos: PropInfo list) = pinfos |> List.choose (fun pinfo -> if pinfo.HasGetter then Some(pinfo.GetterMethod, Some pinfo) else None) diff --git a/src/fcs-fable/src/fsharp/layout.fs b/src/fcs-fable/src/fsharp/layout.fs index c3a1c90208..a28c84c695 100755 --- a/src/fcs-fable/src/fsharp/layout.fs +++ b/src/fcs-fable/src/fsharp/layout.fs @@ -21,7 +21,7 @@ type NavigableTaggedText(taggedText: TaggedText, range: Range.range) = member x.Text = taggedText.Text let mkNav r t = NavigableTaggedText(t, r) :> TaggedText -let spaces n = new String(' ',n) +let spaces n = new String(' ', n) //-------------------------------------------------------------------------- @@ -29,20 +29,20 @@ let spaces n = new String(' ',n) //-------------------------------------------------------------------------- let rec juxtLeft = function - | ObjLeaf (jl,_text,_jr) -> jl - | Leaf (jl,_text,_jr) -> jl - | Node (jl,_l,_jm,_r,_jr,_joint) -> jl - | Attr (_tag,_attrs,l) -> juxtLeft l + | ObjLeaf (jl, _text, _jr) -> jl + | Leaf (jl, _text, _jr) -> jl + | Node (jl, _l, _jm, _r, _jr, _joint) -> jl + | Attr (_tag, _attrs, l) -> juxtLeft l let rec juxtRight = function - | ObjLeaf (_jl,_text,jr) -> jr - | Leaf (_jl,_text,jr) -> jr - | Node (_jl,_l,_jm,_r,jr,_joint) -> jr - | Attr (_tag,_attrs,l) -> juxtRight l + | ObjLeaf (_jl, _text, jr) -> jr + | Leaf (_jl, _text, jr) -> jr + | Node (_jl, _l, _jm, _r, jr, _joint) -> jr + | Attr (_tag, _attrs, l) -> juxtRight l // NOTE: emptyL might be better represented as a constructor, so then (Sep"") would have true meaning -let emptyL = Leaf (true,Internal.Utilities.StructuredFormat.TaggedTextOps.tag LayoutTag.Text "",true) -let isEmptyL = function Leaf(true,tag,true) when tag.Text = "" -> true | _ -> false +let emptyL = Leaf (true, Internal.Utilities.StructuredFormat.TaggedTextOps.tag LayoutTag.Text "", true) +let isEmptyL = function Leaf(true, tag, true) when tag.Text = "" -> true | _ -> false let mkNode l r joint = if isEmptyL l then r else @@ -50,17 +50,17 @@ let mkNode l r joint = let jl = juxtLeft l let jm = juxtRight l || juxtLeft r let jr = juxtRight r - Node(jl,l,jm,r,jr,joint) + Node(jl, l, jm, r, jr, joint) //-------------------------------------------------------------------------- //INDEX: constructors //-------------------------------------------------------------------------- -let wordL (str:TaggedText) = Leaf (false,str,false) -let sepL (str:TaggedText) = Leaf (true ,str,true) -let rightL (str:TaggedText) = Leaf (true ,str,false) -let leftL (str:TaggedText) = Leaf (false,str,true) +let wordL (str:TaggedText) = Leaf (false, str, false) +let sepL (str:TaggedText) = Leaf (true, str, true) +let rightL (str:TaggedText) = Leaf (true, str, false) +let leftL (str:TaggedText) = Leaf (false, str, true) module TaggedTextOps = let tagActivePatternCase = Internal.Utilities.StructuredFormat.TaggedTextOps.tag LayoutTag.ActivePatternCase @@ -216,7 +216,7 @@ module RightL = let aboveL l r = mkNode l r (Broken 0) -let tagAttrL str attrs ly = Attr (str,attrs,ly) +let tagAttrL str attrs ly = Attr (str, attrs, ly) //-------------------------------------------------------------------------- //INDEX: constructors derived @@ -281,23 +281,23 @@ type breaks = Breaks of // - if all breaks forced, then outer=next. // - popping under these conditions needs to reduce outer and next. let chunkN = 400 -let breaks0 () = Breaks(0,0,Array.create chunkN 0) -let pushBreak saving (Breaks(next,outer,stack)) = +let breaks0 () = Breaks(0, 0, Array.create chunkN 0) +let pushBreak saving (Breaks(next, outer, stack)) = let stack = if next = stack.Length then Array.append stack (Array.create chunkN 0) (* expand if full *) else stack stack.[next] <- saving - Breaks(next+1,outer,stack) + Breaks(next+1, outer, stack) -let popBreak (Breaks(next,outer,stack)) = +let popBreak (Breaks(next, outer, stack)) = if next=0 then raise (Failure "popBreak: underflow") let topBroke = stack.[next-1] < 0 let outer = if outer=next then outer-1 else outer (* if all broken, unwind *) let next = next - 1 - Breaks(next,outer,stack),topBroke + Breaks(next, outer, stack), topBroke -let forceBreak (Breaks(next,outer,stack)) = +let forceBreak (Breaks(next, outer, stack)) = if outer=next then (* all broken *) None @@ -305,7 +305,7 @@ let forceBreak (Breaks(next,outer,stack)) = let saving = stack.[outer] stack.[outer] <- -stack.[outer] let outer = outer+1 - Some (Breaks(next,outer,stack),saving) + Some (Breaks(next, outer, stack), saving) let squashTo maxWidth layout = // breaks = break context, can force to get indentation savings. @@ -318,111 +318,111 @@ let squashTo maxWidth layout = // pos - current pos in line = rightmost position of last line of block. // offset - width of last line of block // NOTE: offset <= pos -- depending on tabbing of last block - let rec fit breaks (pos,layout) = + let rec fit breaks (pos, layout) = (*printf "\n\nCalling pos=%d layout=[%s]\n" pos (showL layout)*) - let breaks,layout,pos,offset = + let breaks, layout, pos, offset = match layout with | ObjLeaf _ -> failwith "ObjLeaf should not appear here" - | Attr (tag,attrs,l) -> - let breaks,layout,pos,offset = fit breaks (pos,l) - let layout = Attr (tag,attrs,layout) - breaks,layout,pos,offset - | Leaf (_jl,taggedText,_jr) -> + | Attr (tag, attrs, l) -> + let breaks, layout, pos, offset = fit breaks (pos, l) + let layout = Attr (tag, attrs, layout) + breaks, layout, pos, offset + | Leaf (_jl, taggedText, _jr) -> let textWidth = taggedText.Text.Length let rec fitLeaf breaks pos = if pos + textWidth <= maxWidth then - breaks,layout,pos + textWidth,textWidth (* great, it fits *) + breaks, layout, pos + textWidth, textWidth (* great, it fits *) else match forceBreak breaks with - None -> (breaks,layout,pos + textWidth,textWidth (* tough, no more breaks *)) - | Some (breaks,saving) -> (let pos = pos - saving in fitLeaf breaks pos) + None -> (breaks, layout, pos + textWidth, textWidth (* tough, no more breaks *)) + | Some (breaks, saving) -> (let pos = pos - saving in fitLeaf breaks pos) fitLeaf breaks pos - | Node (jl,l,jm,r,jr,joint) -> + | Node (jl, l, jm, r, jr, joint) -> let mid = if jm then 0 else 1 match joint with | Unbreakable -> - let breaks,l,pos,offsetl = fit breaks (pos,l) (* fit left *) + let breaks, l, pos, offsetl = fit breaks (pos, l) (* fit left *) let pos = pos + mid (* fit space if juxt says so *) - let breaks,r,pos,offsetr = fit breaks (pos,r) (* fit right *) - breaks,Node (jl,l,jm,r,jr,Unbreakable),pos,offsetl + mid + offsetr + let breaks, r, pos, offsetr = fit breaks (pos, r) (* fit right *) + breaks, Node (jl, l, jm, r, jr, Unbreakable), pos, offsetl + mid + offsetr | Broken indent -> - let breaks,l,pos,offsetl = fit breaks (pos,l) (* fit left *) + let breaks, l, pos, offsetl = fit breaks (pos, l) (* fit left *) let pos = pos - offsetl + indent (* broken so - offset left + indent *) - let breaks,r,pos,offsetr = fit breaks (pos,r) (* fit right *) - breaks,Node (jl,l,jm,r,jr,Broken indent),pos,indent + offsetr + let breaks, r, pos, offsetr = fit breaks (pos, r) (* fit right *) + breaks, Node (jl, l, jm, r, jr, Broken indent), pos, indent + offsetr | Breakable indent -> - let breaks,l,pos,offsetl = fit breaks (pos,l) (* fit left *) + let breaks, l, pos, offsetl = fit breaks (pos, l) (* fit left *) (* have a break possibility, with saving *) let saving = offsetl + mid - indent let pos = pos + mid if saving>0 then let breaks = pushBreak saving breaks - let breaks,r,pos,offsetr = fit breaks (pos,r) - let breaks,broken = popBreak breaks + let breaks, r, pos, offsetr = fit breaks (pos, r) + let breaks, broken = popBreak breaks if broken then - breaks,Node (jl,l,jm,r,jr,Broken indent) ,pos,indent + offsetr + breaks, Node (jl, l, jm, r, jr, Broken indent), pos, indent + offsetr else - breaks,Node (jl,l,jm,r,jr,Breakable indent),pos,offsetl + mid + offsetr + breaks, Node (jl, l, jm, r, jr, Breakable indent), pos, offsetl + mid + offsetr else (* actually no saving so no break *) - let breaks,r,pos,offsetr = fit breaks (pos,r) - breaks,Node (jl,l,jm,r,jr,Breakable indent) ,pos,offsetl + mid + offsetr + let breaks, r, pos, offsetr = fit breaks (pos, r) + breaks, Node (jl, l, jm, r, jr, Breakable indent), pos, offsetl + mid + offsetr (*printf "\nDone: pos=%d offset=%d" pos offset*) - breaks,layout,pos,offset + breaks, layout, pos, offset let breaks = breaks0 () let pos = 0 - let _breaks,layout,_pos,_offset = fit breaks (pos,layout) + let _breaks, layout, _pos, _offset = fit breaks (pos, layout) layout //-------------------------------------------------------------------------- //INDEX: LayoutRenderer //-------------------------------------------------------------------------- -type LayoutRenderer<'a,'b> = +type LayoutRenderer<'a, 'b> = abstract Start : unit -> 'b abstract AddText : 'b -> TaggedText -> 'b abstract AddBreak : 'b -> int -> 'b abstract AddTag : 'b -> string * (string * string) list * bool -> 'b abstract Finish : 'b -> 'a -let renderL (rr: LayoutRenderer<_,_>) layout = +let renderL (rr: LayoutRenderer<_, _>) layout = let rec addL z pos i layout k = match layout with | ObjLeaf _ -> failwith "ObjLeaf should never apper here" (* pos is tab level *) - | Leaf (_,text,_) -> - k(rr.AddText z text,i + text.Text.Length) - | Node (_,l,_,r,_,Broken indent) -> + | Leaf (_, text, _) -> + k(rr.AddText z text, i + text.Text.Length) + | Node (_, l, _, r, _, Broken indent) -> addL z pos i l <| - fun (z,_i) -> - let z,i = rr.AddBreak z (pos+indent),(pos+indent) + fun (z, _i) -> + let z, i = rr.AddBreak z (pos+indent), (pos+indent) addL z (pos+indent) i r k - | Node (_,l,jm,r,_,_) -> + | Node (_, l, jm, r, _, _) -> addL z pos i l <| fun (z, i) -> - let z,i = if jm then z,i else rr.AddText z Literals.space, i+1 + let z, i = if jm then z, i else rr.AddText z Literals.space, i+1 let pos = i addL z pos i r k - | Attr (tag,attrs,l) -> - let z = rr.AddTag z (tag,attrs,true) + | Attr (tag, attrs, l) -> + let z = rr.AddTag z (tag, attrs, true) addL z pos i l <| fun (z, i) -> - let z = rr.AddTag z (tag,attrs,false) - k(z,i) + let z = rr.AddTag z (tag, attrs, false) + k(z, i) let pos = 0 - let z,i = rr.Start(),0 - let z,_i = addL z pos i layout id + let z, i = rr.Start(), 0 + let z, _i = addL z pos i layout id rr.Finish z /// string render let stringR = - { new LayoutRenderer with + { new LayoutRenderer with member x.Start () = [] member x.AddText rstrs taggedText = taggedText.Text::rstrs member x.AddBreak rstrs n = (spaces n) :: "\n" :: rstrs - member x.AddTag z (_,_,_) = z - member x.Finish rstrs = String.Join("",Array.ofList (List.rev rstrs)) } + member x.AddTag z (_, _, _) = z + member x.Finish rstrs = String.Join("", Array.ofList (List.rev rstrs)) } type NoState = NoState type NoResult = NoResult @@ -433,28 +433,28 @@ let taggedTextListR collector = member x.Start () = NoState member x.AddText z text = collector text; z member x.AddBreak rstrs n = collector Literals.lineBreak; collector (tagSpace(spaces n)); rstrs - member x.AddTag z (_,_,_) = z + member x.AddTag z (_, _, _) = z member x.Finish rstrs = NoResult } #if !FABLE_COMPILER /// channel LayoutRenderer let channelR (chan:TextWriter) = - { new LayoutRenderer with + { new LayoutRenderer with member r.Start () = NoState member r.AddText z s = chan.Write s.Text; z member r.AddBreak z n = chan.WriteLine(); chan.Write (spaces n); z - member r.AddTag z (tag,attrs,start) = z + member r.AddTag z (tag, attrs, start) = z member r.Finish z = NoResult } #endif /// buffer render let bufferR os = - { new LayoutRenderer with + { new LayoutRenderer with member r.Start () = NoState member r.AddText z s = bprintf os "%s" s.Text; z member r.AddBreak z n = bprintf os "\n"; bprintf os "%s" (spaces n); z - member r.AddTag z (tag,attrs,start) = z + member r.AddTag z (tag, attrs, start) = z member r.Finish z = NoResult } //-------------------------------------------------------------------------- diff --git a/src/fcs-fable/src/fsharp/lexhelp.fs b/src/fcs-fable/src/fsharp/lexhelp.fs index e3c24e80eb..5e1f99f8b8 100755 --- a/src/fcs-fable/src/fsharp/lexhelp.fs +++ b/src/fcs-fable/src/fsharp/lexhelp.fs @@ -22,10 +22,8 @@ open FSharp.Compiler.AbstractIL.Diagnostics open FSharp.Compiler.Range open FSharp.Compiler.Parser - - -// The "mock" filename used by fsi.exe when reading from stdin. -// Has special treatment by the lexer, i.e. __SOURCE_DIRECTORY__ becomes GetCurrentDirectory() +/// The "mock" filename used by fsi.exe when reading from stdin. +/// Has special treatment by the lexer, i.e. __SOURCE_DIRECTORY__ becomes GetCurrentDirectory() let stdinMockFilename = "stdin" /// Lexer args: status of #light processing. Mutated when a #light @@ -293,10 +291,10 @@ module Keywords = ] (*------- reserved keywords which are ml-compatibility ids *) @ List.map (fun s -> (FSHARP,s,RESERVED)) - [ "break"; "checked"; "component"; "constraint"; "continue"; - "fori"; "include"; "mixin"; - "parallel"; "params"; "process"; "protected"; "pure"; - "sealed"; "trait"; "tailcall"; "virtual"; ] + [ "break"; "checked"; "component"; "constraint"; "continue" + "fori"; "include"; "mixin" + "parallel"; "params"; "process"; "protected"; "pure" + "sealed"; "trait"; "tailcall"; "virtual" ] let private unreserveWords = keywordList |> List.choose (function (mode, keyword, _) -> if mode = FSHARP then Some keyword else None) diff --git a/src/fcs-fable/src/fsharp/lib.fs b/src/fcs-fable/src/fsharp/lib.fs index d49fbfa1b6..6829dba9d4 100755 --- a/src/fcs-fable/src/fsharp/lib.fs +++ b/src/fcs-fable/src/fsharp/lib.fs @@ -59,7 +59,7 @@ module Bits = module Filename = let fullpath cwd nm = - let p = if FileSystem.IsPathRootedShim(nm) then nm else Path.Combine(cwd,nm) + let p = if FileSystem.IsPathRootedShim(nm) then nm else Path.Combine(cwd, nm) try FileSystem.GetFullPathShim(p) with | :? System.ArgumentException | :? System.ArgumentNullException @@ -88,7 +88,7 @@ module Int64 = module Pair = let order (compare1: IComparer<'T1>, compare2: IComparer<'T2>) = { new IComparer<'T1 * 'T2> with - member __.Compare((a1,a2),(aa1,aa2)) = + member __.Compare((a1, a2), (aa1, aa2)) = let res1 = compare1.Compare (a1, aa1) if res1 <> 0 then res1 else compare2.Compare (a2, aa2) } @@ -142,18 +142,18 @@ module Check = // Library //------------------------------------------------------------------------ -type IntMap<'T> = Zmap +type IntMap<'T> = Zmap module IntMap = let empty () = Zmap.empty Int32.order let add k v (t:IntMap<'T>) = Zmap.add k v t let find k (t:IntMap<'T>) = Zmap.find k t let tryFind k (t:IntMap<'T>) = Zmap.tryFind k t - let remove k (t:IntMap<'T>) = Zmap.remove k t - let mem k (t:IntMap<'T>) = Zmap.mem k t - let iter f (t:IntMap<'T>) = Zmap.iter f t - let map f (t:IntMap<'T>) = Zmap.map f t - let fold f (t:IntMap<'T>) z = Zmap.fold f t z + let remove k (t:IntMap<'T>) = Zmap.remove k t + let mem k (t:IntMap<'T>) = Zmap.mem k t + let iter f (t:IntMap<'T>) = Zmap.iter f t + let map f (t:IntMap<'T>) = Zmap.map f t + let fold f (t:IntMap<'T>) z = Zmap.fold f t z //------------------------------------------------------------------------- @@ -168,7 +168,7 @@ module ListAssoc = let rec find f x l = match l with | [] -> notFound() - | (x',y)::t -> if f x x' then y else find f x t + | (x2, y)::t -> if f x x2 then y else find f x t /// Treat a list of key-value pairs as a lookup collection. /// This function looks up a value based on a match from the supplied @@ -176,7 +176,7 @@ module ListAssoc = let rec tryFind (f:'key->'key->bool) (x:'key) (l:('key*'value) list) : 'value option = match l with | [] -> None - | (x',y)::t -> if f x x' then Some y else tryFind f x t + | (x2, y)::t -> if f x x2 then Some y else tryFind f x t //------------------------------------------------------------------------- // Library: lists as generalized sets @@ -210,18 +210,18 @@ module ListSet = (* NOTE: quadratic! *) let rec subtract f l1 l2 = match l2 with - | (h::t) -> subtract f (remove (fun y2 y1 -> f y1 y2) h l1) t + | (h::t) -> subtract f (remove (fun y2 y1 -> f y1 y2) h l1) t | [] -> l1 let isSubsetOf f l1 l2 = List.forall (fun x1 -> contains f x1 l2) l1 (* nb. preserve orders here: f must be applied to elements of l1 then elements of l2*) - let isSupersetOf f l1 l2 = List.forall (fun x2 -> contains (fun y2 y1 -> f y1 y2) x2 l1) l2 + let isSupersetOf f l1 l2 = List.forall (fun x2 -> contains (fun y2 y1 -> f y1 y2) x2 l1) l2 let equals f l1 l2 = isSubsetOf f l1 l2 && isSupersetOf f l1 l2 let unionFavourLeft f l1 l2 = - match l1,l2 with - | _,[] -> l1 - | [],_ -> l2 + match l1, l2 with + | _, [] -> l1 + | [], _ -> l2 | _ -> l1 @ (subtract f l2 l1) @@ -255,61 +255,61 @@ module ListSet = // Library: pairs //------------------------------------------------------------------------ -let mapFoldFst f s (x,y) = let x',s = f s x in (x',y),s -let mapFoldSnd f s (x,y) = let y',s = f s y in (x,y'),s -let pair a b = a,b - -let p13 (x,_y,_z) = x -let p23 (_x,y,_z) = y -let p33 (_x,_y,z) = z - -let map1Of2 f (a1,a2) = (f a1,a2) -let map2Of2 f (a1,a2) = (a1,f a2) -let map1Of3 f (a1,a2,a3) = (f a1,a2,a3) -let map2Of3 f (a1,a2,a3) = (a1,f a2,a3) -let map3Of3 f (a1,a2,a3) = (a1,a2,f a3) -let map3Of4 f (a1,a2,a3,a4) = (a1,a2,f a3,a4) -let map4Of4 f (a1,a2,a3,a4) = (a1,a2,a3,f a4) -let map5Of5 f (a1,a2,a3,a4,a5) = (a1,a2,a3,a4,f a5) -let map6Of6 f (a1,a2,a3,a4,a5,a6) = (a1,a2,a3,a4,a5,f a6) -let foldPair (f1,f2) acc (a1,a2) = f2 (f1 acc a1) a2 -let fold1Of2 f1 acc (a1,_a2) = f1 acc a1 -let foldTriple (f1,f2,f3) acc (a1,a2,a3) = f3 (f2 (f1 acc a1) a2) a3 -let foldQuadruple (f1,f2,f3,f4) acc (a1,a2,a3,a4) = f4 (f3 (f2 (f1 acc a1) a2) a3) a4 -let mapPair (f1,f2) (a1,a2) = (f1 a1, f2 a2) -let mapTriple (f1,f2,f3) (a1,a2,a3) = (f1 a1, f2 a2, f3 a3) -let mapQuadruple (f1,f2,f3,f4) (a1,a2,a3,a4) = (f1 a1, f2 a2, f3 a3, f4 a4) -let fmap2Of2 f z (a1,a2) = let z,a2 = f z a2 in z,(a1,a2) +let mapFoldFst f s (x, y) = let x2, s = f s x in (x2, y), s +let mapFoldSnd f s (x, y) = let y2, s = f s y in (x, y2), s +let pair a b = a, b + +let p13 (x, _y, _z) = x +let p23 (_x, y, _z) = y +let p33 (_x, _y, z) = z + +let map1Of2 f (a1, a2) = (f a1, a2) +let map2Of2 f (a1, a2) = (a1, f a2) +let map1Of3 f (a1, a2, a3) = (f a1, a2, a3) +let map2Of3 f (a1, a2, a3) = (a1, f a2, a3) +let map3Of3 f (a1, a2, a3) = (a1, a2, f a3) +let map3Of4 f (a1, a2, a3, a4) = (a1, a2, f a3, a4) +let map4Of4 f (a1, a2, a3, a4) = (a1, a2, a3, f a4) +let map5Of5 f (a1, a2, a3, a4, a5) = (a1, a2, a3, a4, f a5) +let map6Of6 f (a1, a2, a3, a4, a5, a6) = (a1, a2, a3, a4, a5, f a6) +let foldPair (f1, f2) acc (a1, a2) = f2 (f1 acc a1) a2 +let fold1Of2 f1 acc (a1, _a2) = f1 acc a1 +let foldTriple (f1, f2, f3) acc (a1, a2, a3) = f3 (f2 (f1 acc a1) a2) a3 +let foldQuadruple (f1, f2, f3, f4) acc (a1, a2, a3, a4) = f4 (f3 (f2 (f1 acc a1) a2) a3) a4 +let mapPair (f1, f2) (a1, a2) = (f1 a1, f2 a2) +let mapTriple (f1, f2, f3) (a1, a2, a3) = (f1 a1, f2 a2, f3 a3) +let mapQuadruple (f1, f2, f3, f4) (a1, a2, a3, a4) = (f1 a1, f2 a2, f3 a3, f4 a4) +let fmap2Of2 f z (a1, a2) = let z, a2 = f z a2 in z, (a1, a2) module List = let noRepeats xOrder xs = - let s = Zset.addList xs (Zset.empty xOrder) // build set - Zset.elements s // get elements... no repeats + let s = Zset.addList xs (Zset.empty xOrder) // build set + Zset.elements s // get elements... no repeats //--------------------------------------------------------------------------- // Zmap rebinds //------------------------------------------------------------------------- module Zmap = - let force k mp = match Zmap.tryFind k mp with Some x -> x | None -> failwith "Zmap.force: lookup failed" + let force k mp = match Zmap.tryFind k mp with Some x -> x | None -> failwith "Zmap.force: lookup failed" let mapKey key f mp = match f (Zmap.tryFind key mp) with - | Some fx -> Zmap.add key fx mp - | None -> Zmap.remove key mp + | Some fx -> Zmap.add key fx mp + | None -> Zmap.remove key mp //--------------------------------------------------------------------------- // Zset //------------------------------------------------------------------------- module Zset = - let ofList order xs = Zset.addList xs (Zset.empty order) + let ofList order xs = Zset.addList xs (Zset.empty order) // CLEANUP NOTE: move to Zset? let rec fixpoint f (s as s0) = let s = f s - if Zset.equal s s0 then s0 (* fixed *) - else fixpoint f s (* iterate *) + if Zset.equal s s0 then s0 (* fixed *) + else fixpoint f s (* iterate *) //--------------------------------------------------------------------------- // Misc @@ -338,7 +338,7 @@ let writeViaBufferWithEnvironmentNewLines (os: TextWriter) f x = let buf = System.Text.StringBuilder 100 f buf x let text = buf.ToString() - let text = text.Replace("\n",System.Environment.NewLine) + let text = text.Replace("\n", System.Environment.NewLine) os.Write text #endif @@ -353,12 +353,12 @@ type Graph<'Data, 'Id when 'Id : comparison and 'Id : equality> nodes: 'Data list, edges: ('Data * 'Data) list) = - let edges = edges |> List.map (fun (v1,v2) -> nodeIdentity v1, nodeIdentity v2) + let edges = edges |> List.map (fun (v1, v2) -> nodeIdentity v1, nodeIdentity v2) let nodes = nodes |> List.map (fun d -> nodeIdentity d, { nodeId = nodeIdentity d; nodeData=d; nodeNeighbours=[] }) let tab = Map.ofList nodes let nodes = List.map snd nodes do for node in nodes do - node.nodeNeighbours <- edges |> List.filter (fun (x,_y) -> x = node.nodeId) |> List.map (fun (_,nodeId) -> tab.[nodeId]) + node.nodeNeighbours <- edges |> List.filter (fun (x, _y) -> x = node.nodeId) |> List.map (fun (_, nodeId) -> tab.[nodeId]) member g.GetNodeData nodeId = tab.[nodeId].nodeData @@ -385,7 +385,7 @@ type Graph<'Data, 'Id when 'Id : comparison and 'Id : equality> type NonNullSlot<'T> = 'T let nullableSlotEmpty() = Unchecked.defaultof<'T> let nullableSlotFull x = x -//#endif +//#endif //--------------------------------------------------------------------------- // Caches, mainly for free variables @@ -430,13 +430,13 @@ module internal AsyncUtil = /// Represents the reified result of an asynchronous computation. [] - type AsyncResult<'T> = - | AsyncOk of 'T - | AsyncException of exn - | AsyncCanceled of OperationCanceledException + type AsyncResult<'T> = + | AsyncOk of 'T + | AsyncException of exn + | AsyncCanceled of OperationCanceledException static member Commit(res:AsyncResult<'T>) = - Async.FromContinuations (fun (cont,econt,ccont) -> + Async.FromContinuations (fun (cont, econt, ccont) -> match res with | AsyncOk v -> cont v | AsyncException exn -> econt exn @@ -458,15 +458,15 @@ module internal AsyncUtil = member x.RegisterResult (res:AsyncResult<'T>) = let grabbedConts = lock syncRoot (fun () -> - if result.IsSome then + if result.IsSome then [] else result <- Some res // Invoke continuations in FIFO order // Continuations that Async.FromContinuations provide do QUWI/SynchContext.Post, - // so the order is not overly relevant but still. + // so the order is not overly relevant but still. List.rev savedConts) - let postOrQueue (sc:SynchronizationContext,cont) = + let postOrQueue (sc:SynchronizationContext, cont) = match sc with | null -> ThreadPool.QueueUserWorkItem(fun _ -> cont res) |> ignore | sc -> sc.Post((fun _ -> cont res), state=null) @@ -474,7 +474,7 @@ module internal AsyncUtil = // Run continuations outside the lock match grabbedConts with | [] -> () - | [(sc,cont) as c] -> + | [(sc, cont) as c] -> if SynchronizationContext.Current = sc then cont res else @@ -484,7 +484,7 @@ module internal AsyncUtil = /// Get the reified result. member private x.AsyncPrimitiveResult = - Async.FromContinuations(fun (cont,_,_) -> + Async.FromContinuations(fun (cont, _, _) -> let grabbedResult = lock syncRoot (fun () -> match result with @@ -493,7 +493,7 @@ module internal AsyncUtil = | None -> // Otherwise save the continuation and call it in RegisterResult let sc = SynchronizationContext.Current - savedConts <- (sc,cont)::savedConts + savedConts <- (sc, cont)::savedConts None) // Run the action outside the lock match grabbedResult with @@ -521,9 +521,9 @@ module UnmanagedProcessExecutionOptions = [] extern bool private HeapSetInformation( - UIntPtr _HeapHandle, - UInt32 _HeapInformationClass, - UIntPtr _HeapInformation, + UIntPtr _HeapHandle, + UInt32 _HeapInformationClass, + UIntPtr _HeapInformation, UIntPtr _HeapInformationLength) [] @@ -531,14 +531,11 @@ module UnmanagedProcessExecutionOptions = // Translation of C# from http://swikb/v1/DisplayOnlineDoc.aspx?entryID=826 and copy in bug://5018 #if !FX_NO_SECURITY_PERMISSIONS - [] + [] #endif let EnableHeapTerminationOnCorruption() = -#if FX_NO_HEAPTERMINATION - () -#else if (System.Environment.OSVersion.Version.Major >= 6 && // If OS is Vista or higher - System.Environment.Version.Major < 3) then // and CLR not 3.0 or higher + System.Environment.Version.Major < 3) then // and CLR not 3.0 or higher // "The flag HeapSetInformation sets is available in Windows XP SP3 and later. // The data structure used for heap information is available on earlier versions of Windows. // The call will either return TRUE (found and set the flag) or false (flag not found). @@ -550,12 +547,11 @@ module UnmanagedProcessExecutionOptions = // See also: // http://blogs.msdn.com/michael_howard/archive/2008/02/18/faq-about-heapsetinformation-in-windows-vista-and-heap-based-buffer-overruns.aspx let HeapEnableTerminationOnCorruption = 1u : uint32 - if not (HeapSetInformation(GetProcessHeap(),HeapEnableTerminationOnCorruption,UIntPtr.Zero,UIntPtr.Zero)) then + if not (HeapSetInformation(GetProcessHeap(), HeapEnableTerminationOnCorruption, UIntPtr.Zero, UIntPtr.Zero)) then raise (System.Security.SecurityException( "Unable to enable unmanaged process execution option TerminationOnCorruption. " + "HeapSetInformation() returned FALSE; LastError = 0x" + - GetLastError().ToString("X").PadLeft(8,'0') + ".")) -#endif + GetLastError().ToString("X").PadLeft(8, '0') + ".")) #endif //!FABLE_COMPILER \ No newline at end of file diff --git a/src/fcs-fable/src/fsharp/pars.fsy b/src/fcs-fable/src/fsharp/pars.fsy index 83a405e6a8..d0201861ad 100644 --- a/src/fcs-fable/src/fsharp/pars.fsy +++ b/src/fcs-fable/src/fsharp/pars.fsy @@ -1218,7 +1218,7 @@ moduleDefn: /* 'type' definitions */ | opt_attributes opt_declVisibility typeKeyword tyconDefn tyconDefnList { if Option.isSome $2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(),rhs parseState 2)) - let (TypeDefn(ComponentInfo(cas ,a,cs,b,c,d,d2,d3),e,f,g)) = $4 + let (TypeDefn(ComponentInfo(cas,a,cs,b,c,d,d2,d3),e,f,g)) = $4 let tc = (TypeDefn(ComponentInfo($1@cas,a,cs,b,c,d,d2,d3),e,f,g)) let types = tc :: $5 [ SynModuleDecl.Types(types, (rhs parseState 3, types) ||> unionRangeWithListBy (fun t -> t.Range) ) ] } @@ -1288,7 +1288,7 @@ namedModuleDefnBlock: // System.DateTime.Now // module M2 = // Microsoft.FSharp.Core.List - // The second is a module abbreviation , the first a module containing a single expression. + // The second is a module abbreviation, the first a module containing a single expression. // The resolution is in favour of the module abbreviation, i.e. anything of the form // module M2 = ID.ID.ID.ID // will be taken as a module abbreviation, regardles of the identifiers themselves. @@ -2493,7 +2493,7 @@ cPrototype: let bindingId = SynPat.LongIdent (LongIdentWithDots([nm],[]), None, Some noInferredTypars, SynConstructorArgs.Pats [SynPat.Tuple(false,args,argsm)], vis, nmm) let binding = mkSynBinding (xmlDoc, bindingId) - (vis, false, false, mBindLhs, NoSequencePointAtInvisibleBinding, Some rty ,rhsExpr, mRhs, [], attrs, None) + (vis, false, false, mBindLhs, NoSequencePointAtInvisibleBinding, Some rty, rhsExpr, mRhs, [], attrs, None) [], [binding]) } /* A list of arguments in an 'extern' DllImport function definition */ @@ -3038,7 +3038,7 @@ declExpr: | hardwhiteLetBindings OBLOCKSEP typedSeqExprBlock %prec expr_let { let hwlb,m = $1 - mkLocalBindings (unionRanges m $3.Range ,hwlb,$3) } + mkLocalBindings (unionRanges m $3.Range, hwlb, $3) } | hardwhiteLetBindings OBLOCKSEP error %prec expr_let { let hwlb,m = $1 @@ -4727,7 +4727,7 @@ measureTypeExpr: typar: | QUOTE ident { let id = mkSynId (lhs parseState) ($2).idText - Typar(id ,NoStaticReq,false) } + Typar(id, NoStaticReq,false) } | staticallyKnownHeadTypar { $1 } diff --git a/src/fcs-fable/src/fsharp/range.fs b/src/fcs-fable/src/fsharp/range.fs index 9bc952523e..9375095f0c 100755 --- a/src/fcs-fable/src/fsharp/range.fs +++ b/src/fcs-fable/src/fsharp/range.fs @@ -333,7 +333,7 @@ let rangeCmdArgs = rangeN "commandLineArgs" 0 let trimRangeToLine (r:range) = let startL, startC = r.StartLine, r.StartColumn - let endL , _endC = r.EndLine, r.EndColumn + let endL, _endC = r.EndLine, r.EndColumn if endL <= startL then r else diff --git a/src/fcs-fable/src/fsharp/rational.fs b/src/fcs-fable/src/fsharp/rational.fs index b6c3588cdb..5b36a9e349 100644 --- a/src/fcs-fable/src/fsharp/rational.fs +++ b/src/fcs-fable/src/fsharp/rational.fs @@ -6,7 +6,7 @@ module internal FSharp.Compiler.Rational open System.Numerics type Rational = { - numerator: BigInteger; + numerator: BigInteger denominator: BigInteger } @@ -26,7 +26,7 @@ let mkRational p q = if q > BigInteger.Zero then p, q else -p, -q in - { numerator = p; + { numerator = p denominator = q } diff --git a/src/fcs-fable/src/fsharp/service/IncrementalBuild.fs b/src/fcs-fable/src/fsharp/service/IncrementalBuild.fs index d0c3713204..55e67bcd7c 100755 --- a/src/fcs-fable/src/fsharp/service/IncrementalBuild.fs +++ b/src/fcs-fable/src/fsharp/service/IncrementalBuild.fs @@ -157,8 +157,8 @@ module internal IncrementalBuild = type BuildRules = { RuleList: (string * BuildRuleExpr) list } /// Visit each task and call op with the given accumulator. - let FoldOverBuildRules(rules:BuildRules, op, acc)= - let rec visitVector (ve:VectorBuildRule) acc = + let FoldOverBuildRules(rules: BuildRules, op, acc)= + let rec visitVector (ve: VectorBuildRule) acc = match ve with | VectorInput _ -> op (VectorBuildRule ve) acc | VectorScanLeft(_, _, a, i, _) -> op (VectorBuildRule ve) (visitVector i (visitScalar a acc)) @@ -166,13 +166,13 @@ module internal IncrementalBuild = | VectorStamp (_, _, i, _) -> op (VectorBuildRule ve) (visitVector i acc) | VectorMultiplex(_, _, i, _) -> op (VectorBuildRule ve) (visitScalar i acc) - and visitScalar (se:ScalarBuildRule) acc = + and visitScalar (se: ScalarBuildRule) acc = match se with | ScalarInput _ -> op (ScalarBuildRule se) acc | ScalarDemultiplex(_, _, i, _) -> op (ScalarBuildRule se) (visitVector i acc) | ScalarMap(_, _, i, _) -> op (ScalarBuildRule se) (visitScalar i acc) - let visitRule (expr:BuildRuleExpr) acc = + let visitRule (expr: BuildRuleExpr) acc = match expr with | ScalarBuildRule se ->visitScalar se acc | VectorBuildRule ve ->visitVector ve acc @@ -180,7 +180,7 @@ module internal IncrementalBuild = List.foldBack visitRule (rules.RuleList |> List.map snd) acc /// Convert from interfaces into discriminated union. - let ToBuild (names:NamedOutput list): BuildRules = + let ToBuild (names: NamedOutput list): BuildRules = // Create the rules. let createRules() = @@ -188,7 +188,7 @@ module internal IncrementalBuild = | NamedScalarOutput(s) -> s.Name, ScalarBuildRule(s.Expr)) } // Ensure that all names are unique. - let ensureUniqueNames (expr:BuildRuleExpr) (acc:Map) = + let ensureUniqueNames (expr: BuildRuleExpr) (acc: Map) = let AddUniqueIdToNameMapping(id, name)= match acc.TryFind name with | Some priorId -> @@ -200,7 +200,7 @@ module internal IncrementalBuild = AddUniqueIdToNameMapping(id, name) // Validate the rule tree - let validateRules (rules:BuildRules) = + let validateRules (rules: BuildRules) = FoldOverBuildRules(rules, ensureUniqueNames, Map.empty) |> ignore // Convert and validate @@ -268,7 +268,7 @@ module internal IncrementalBuild = ResultVector(size, zeroElementTimestamp, Map.add slot value map) member rv.MaxTimestamp() = - let maximize (lasttimestamp:DateTime) (_, result:Result) = max lasttimestamp result.Timestamp + let maximize (lasttimestamp: DateTime) (_, result: Result) = max lasttimestamp result.Timestamp List.fold maximize zeroElementTimestamp (asList.Force()) member rv.Signature() = @@ -312,12 +312,12 @@ module internal IncrementalBuild = /// A set of build rules and the corresponding, possibly partial, results from building. [] - type PartialBuild(rules:BuildRules, results:Map) = + type PartialBuild(rules: BuildRules, results: Map) = member bt.Rules = rules member bt.Results = results /// Given an expression, find the expected width. - let rec GetVectorWidthByExpr(bt:PartialBuild, ve:VectorBuildRule) = + let rec GetVectorWidthByExpr(bt: PartialBuild, ve: VectorBuildRule) = let id = ve.Id let KnownValue() = match bt.Results.TryFind id with @@ -337,18 +337,18 @@ module internal IncrementalBuild = | VectorMultiplex _ -> KnownValue() /// Given an expression name, get the corresponding expression. - let GetTopLevelExprByName(bt:PartialBuild, seek:string) = + let GetTopLevelExprByName(bt: PartialBuild, seek: string) = bt.Rules.RuleList |> List.filter(fun(name, _) ->name=seek) |> List.map (fun(_, root) ->root) |> List.head /// Get an expression matching the given name. - let GetExprByName(bt:PartialBuild, node:INode): BuildRuleExpr = - let matchName (expr:BuildRuleExpr) (acc:BuildRuleExpr option): BuildRuleExpr option = + let GetExprByName(bt: PartialBuild, node: INode): BuildRuleExpr = + let matchName (expr: BuildRuleExpr) (acc: BuildRuleExpr option): BuildRuleExpr option = if expr.Name = node.Name then Some expr else acc let matchOption = FoldOverBuildRules(bt.Rules, matchName, None) Option.get matchOption // Given an Id, find the corresponding expression. - let GetExprById(bt:PartialBuild, seek:Id): BuildRuleExpr= + let GetExprById(bt: PartialBuild, seek: Id): BuildRuleExpr= let rec vectorExprOfId ve = match ve with | VectorInput(id, _) ->if seek=id then Some (VectorBuildRule ve) else None @@ -366,7 +366,7 @@ module internal IncrementalBuild = | ScalarDemultiplex(id, _, i, _) ->if seek=id then Some (ScalarBuildRule se) else vectorExprOfId i | ScalarMap(id, _, i, _) ->if seek=id then Some (ScalarBuildRule se) else scalarExprOfId i - let exprOfId(expr:BuildRuleExpr) = + let exprOfId(expr: BuildRuleExpr) = match expr with | ScalarBuildRule se ->scalarExprOfId se | VectorBuildRule ve ->vectorExprOfId ve @@ -376,12 +376,12 @@ module internal IncrementalBuild = | Some expr :: _ -> expr | _ -> failwith (sprintf "GetExprById did not find an expression for Id") - let GetVectorWidthById (bt:PartialBuild) seek = + let GetVectorWidthById (bt: PartialBuild) seek = match GetExprById(bt, seek) with | ScalarBuildRule _ ->failwith "Attempt to get width of scalar." | VectorBuildRule ve -> Option.get (GetVectorWidthByExpr(bt, ve)) - let GetScalarExprResult (bt:PartialBuild, se:ScalarBuildRule) = + let GetScalarExprResult (bt: PartialBuild, se: ScalarBuildRule) = match bt.Results.TryFind (se.Id) with | Some resultSet -> match se, resultSet with @@ -391,7 +391,7 @@ module internal IncrementalBuild = | _ ->failwith "GetScalarExprResult had no match" | None->NotAvailable - let GetVectorExprResultVector (bt:PartialBuild, ve:VectorBuildRule) = + let GetVectorExprResultVector (bt: PartialBuild, ve: VectorBuildRule) = match bt.Results.TryFind (ve.Id) with | Some resultSet -> match ve, resultSet with @@ -403,7 +403,7 @@ module internal IncrementalBuild = | _ -> failwith "GetVectorExprResultVector had no match" | None->None - let GetVectorExprResult (bt:PartialBuild, ve:VectorBuildRule, slot) = + let GetVectorExprResult (bt: PartialBuild, ve: VectorBuildRule, slot) = match bt.Results.TryFind ve.Id with | Some resultSet -> match ve, resultSet with @@ -416,7 +416,7 @@ module internal IncrementalBuild = | None->NotAvailable /// Get the maximum build stamp for an output. - let MaxTimestamp(bt:PartialBuild, id) = + let MaxTimestamp(bt: PartialBuild, id) = match bt.Results.TryFind id with | Some resultset -> match resultset with @@ -424,7 +424,7 @@ module internal IncrementalBuild = | VectorResult rv -> rv.MaxTimestamp() | None -> DateTime.MaxValue - let Signature(bt:PartialBuild, id) = + let Signature(bt: PartialBuild, id) = match bt.Results.TryFind id with | Some resultset -> match resultset with @@ -433,8 +433,8 @@ module internal IncrementalBuild = | None -> UnevaluatedInput /// Get all the results for the given expr. - let AllResultsOfExpr extractor (bt:PartialBuild) (expr: VectorBuildRule) = - let GetAvailable (rv:ResultVector) = + let AllResultsOfExpr extractor (bt: PartialBuild) (expr: VectorBuildRule) = + let GetAvailable (rv: ResultVector) = let Extract acc (_, result) = (extractor result)::acc List.rev (rv.FoldLeft Extract []) let GetVectorResultById id = @@ -455,8 +455,8 @@ module internal IncrementalBuild = | Scalar of INode * obj /// Declare a named scalar output. - static member ScalarInput (node:Scalar<'T>, value: 'T) = BuildInput.Scalar(node, box value) - static member VectorInput(node:Vector<'T>, values: 'T list) = BuildInput.Vector(node, List.map box values) + static member ScalarInput (node: Scalar<'T>, value: 'T) = BuildInput.Scalar(node, box value) + static member VectorInput(node: Vector<'T>, values: 'T list) = BuildInput.Vector(node, List.map box values) let AvailableAllResultsOfExpr bt expr = @@ -464,7 +464,7 @@ module internal IncrementalBuild = AllResultsOfExpr (function Available(o, _, _) -> o | _ -> failwith msg) bt expr /// Bind a set of build rules to a set of input values. - let ToBound(buildRules:BuildRules, inputs: BuildInput list) = + let ToBound(buildRules: BuildRules, inputs: BuildInput list) = let now = DateTime.UtcNow let rec applyScalarExpr(se, results) = match se with @@ -509,7 +509,7 @@ module internal IncrementalBuild = /// Visit each executable action necessary to evaluate the given output (with an optional slot in a /// vector output). Call actionFunc with the given accumulator. - let ForeachAction cache ctok (Target(output, optSlot)) bt (actionFunc:Action -> 'T -> 'T) (acc:'T) = + let ForeachAction cache ctok (Target(output, optSlot)) bt (actionFunc: Action -> 'T -> 'T) (acc:'T) = let seen = Dictionary() let isSeen id = if seen.ContainsKey id then true @@ -517,13 +517,13 @@ module internal IncrementalBuild = seen.[id] <- true false - let shouldEvaluate(bt, currentsig:InputSignature, id) = + let shouldEvaluate(bt, currentsig: InputSignature, id) = if currentsig.IsEvaluated then currentsig <> Signature(bt, id) else false /// Make sure the result vector saved matches the size of expr - let resizeVectorExpr(ve:VectorBuildRule, acc) = + let resizeVectorExpr(ve: VectorBuildRule, acc) = match GetVectorWidthByExpr(bt, ve) with | Some expectedWidth -> match bt.Results.TryFind ve.Id with @@ -531,7 +531,7 @@ module internal IncrementalBuild = match found with | VectorResult rv -> if rv.Size <> expectedWidth then - actionFunc (ResizeResultAction(ve.Id , expectedWidth)) acc + actionFunc (ResizeResultAction(ve.Id, expectedWidth)) acc else acc | _ -> acc | None -> acc @@ -653,7 +653,7 @@ module internal IncrementalBuild = | _ -> acc visitScalar inputExpr acc - and visitScalar (se:ScalarBuildRule) acc = + and visitScalar (se: ScalarBuildRule) acc = if isSeen se.Id then acc else match se with @@ -718,7 +718,7 @@ module internal IncrementalBuild = | _ -> failwith "expected a VectorStamp" /// Given the result of a single action, apply that action to the Build - let ApplyResult(actionResult:ActionResult, bt:PartialBuild) = + let ApplyResult(actionResult: ActionResult, bt: PartialBuild) = match actionResult with | ResizeResult(id, slotcount) -> match bt.Results.TryFind id with @@ -765,7 +765,7 @@ module internal IncrementalBuild = { new IDisposable with member __.Dispose() = injectCancellationFault <- false } /// Apply the result, and call the 'save' function to update the build. - let ExecuteApply (ctok: CompilationThreadToken) save (action:Action) bt = + let ExecuteApply (ctok: CompilationThreadToken) save (action: Action) bt = cancellable { let! actionResult = action.Execute(ctok) let newBt = ApplyResult(actionResult, bt) @@ -798,7 +798,7 @@ module internal IncrementalBuild = eval(bt, 0) /// Evaluate one step of the build. Call the 'save' function to save the intermediate result. - let Step cache ctok save target (bt:PartialBuild) = + let Step cache ctok save target (bt: PartialBuild) = cancellable { // REVIEW: we're building up the whole list of actions on the fringe of the work tree, // executing one thing and then throwing the list away. What about saving the list inside the Build instance? @@ -832,7 +832,7 @@ module internal IncrementalBuild = ComputeMaxTimeStamp cache ctok target bt DateTime.MinValue /// Get a scalar vector. Result must be available - let GetScalarResult<'T>(node:Scalar<'T>, bt): ('T*DateTime) option = + let GetScalarResult<'T>(node: Scalar<'T>, bt): ('T*DateTime) option = match GetTopLevelExprByName(bt, node.Name) with | ScalarBuildRule se -> match bt.Results.TryFind se.Id with @@ -847,13 +847,13 @@ module internal IncrementalBuild = | VectorBuildRule _ -> failwith "Expected scalar." /// Get a result vector. All results must be available or thrown an exception. - let GetVectorResult<'T>(node:Vector<'T>, bt): 'T[] = + let GetVectorResult<'T>(node: Vector<'T>, bt): 'T[] = match GetTopLevelExprByName(bt, node.Name) with | ScalarBuildRule _ -> failwith "Expected vector." | VectorBuildRule ve -> AvailableAllResultsOfExpr bt ve |> List.map unbox |> Array.ofList /// Get an element of vector result or None if there were no results. - let GetVectorResultBySlot<'T>(node:Vector<'T>, slot, bt): ('T*DateTime) option = + let GetVectorResultBySlot<'T>(node: Vector<'T>, slot, bt): ('T*DateTime) option = match GetTopLevelExprByName(bt, node.Name) with | ScalarBuildRule _ -> failwith "Expected vector expression" | VectorBuildRule ve -> @@ -862,7 +862,7 @@ module internal IncrementalBuild = | None->None /// Given an input value, find the corresponding slot. - let TryGetSlotByInput<'T>(node:Vector<'T>, build:PartialBuild, found:'T->bool): int option = + let TryGetSlotByInput<'T>(node: Vector<'T>, build: PartialBuild, found:'T->bool): int option = let expr = GetExprByName(build, node) let id = expr.Id match build.Results.TryFind id with @@ -905,7 +905,7 @@ module internal IncrementalBuild = module Vector = /// Maps one vector to another using the given function. - let Map (taskname:string) (task: CompilationThreadToken -> 'I -> 'O) (input:Vector<'I>): Vector<'O> = + let Map (taskname: string) (task: CompilationThreadToken -> 'I -> 'O) (input: Vector<'I>): Vector<'O> = let input = input.Expr let expr = VectorMap(NextId(), taskname, input, (fun ctok x -> box (task ctok (unbox x)))) { new Vector<'O> @@ -916,7 +916,7 @@ module internal IncrementalBuild = /// Apply a function to each element of the vector, threading an accumulator argument /// through the computation. Returns intermediate results in a vector. - let ScanLeft (taskname:string) (task: CompilationThreadToken -> 'A -> 'I -> Eventually<'A>) (acc:Scalar<'A>) (input:Vector<'I>): Vector<'A> = + let ScanLeft (taskname: string) (task: CompilationThreadToken -> 'A -> 'I -> Eventually<'A>) (acc: Scalar<'A>) (input: Vector<'I>): Vector<'A> = let BoxingScanLeft ctok a i = Eventually.box(task ctok (unbox a) (unbox i)) let acc = acc.Expr let input = input.Expr @@ -927,7 +927,7 @@ module internal IncrementalBuild = override pe.Expr = expr } /// Apply a function to a vector to get a scalar value. - let Demultiplex (taskname:string) (task: CompilationThreadToken -> 'I[] -> Cancellable<'O>) (input:Vector<'I>): Scalar<'O> = + let Demultiplex (taskname: string) (task: CompilationThreadToken -> 'I[] -> Cancellable<'O>) (input: Vector<'I>): Scalar<'O> = let BoxingDemultiplex ctok inps = cancellable { let! res = task ctok (Array.map unbox inps) @@ -942,7 +942,7 @@ module internal IncrementalBuild = /// Creates a new vector with the same items but with /// timestamp specified by the passed-in function. - let Stamp (taskname:string) (task: TimeStampCache -> CompilationThreadToken -> 'I -> DateTime) (input:Vector<'I>): Vector<'I> = + let Stamp (taskname: string) (task: TimeStampCache -> CompilationThreadToken -> 'I -> DateTime) (input: Vector<'I>): Vector<'I> = let input = input.Expr let expr = VectorStamp (NextId(), taskname, input, (fun cache ctok x -> task cache ctok (unbox x))) { new Vector<'I> @@ -950,25 +950,25 @@ module internal IncrementalBuild = override __.Name = taskname override pe.Expr = expr } - let AsScalar (taskname:string) (input:Vector<'I>): Scalar<'I array> = + let AsScalar (taskname: string) (input: Vector<'I>): Scalar<'I array> = Demultiplex taskname (fun _ctok x -> cancellable.Return x) input - let VectorInput(node:Vector<'T>, values: 'T list) = (node.Name, values.Length, List.map box values) + let VectorInput(node: Vector<'T>, values: 'T list) = (node.Name, values.Length, List.map box values) /// Declare build outputs and bind them to real values. type BuildDescriptionScope() = let mutable outputs = [] /// Declare a named scalar output. - member b.DeclareScalarOutput(output:Scalar<'T>)= + member b.DeclareScalarOutput(output: Scalar<'T>)= outputs <- NamedScalarOutput(output) :: outputs /// Declare a named vector output. - member b.DeclareVectorOutput(output:Vector<'T>)= + member b.DeclareVectorOutput(output: Vector<'T>)= outputs <- NamedVectorOutput(output) :: outputs /// Set the concrete inputs for this build - member b.GetInitialPartialBuild(inputs:BuildInput list) = + member b.GetInitialPartialBuild(inputs: BuildInput list) = ToBound(ToBuild outputs, inputs) #endif //!FABLE_COMPILER @@ -1005,7 +1005,7 @@ module IncrementalBuilderEventTesting = curIndex <- (curIndex + 1) % MAX member this.CurrentEventNum = numAdds // called by unit tests, returns 'n' most recent additions. - member this.MostRecentList(n:int) : list<'T> = + member this.MostRecentList(n: int) : list<'T> = if n < 0 || n > MAX then raise <| new System.ArgumentOutOfRangeException("n", sprintf "n must be between 0 and %d, inclusive, but got %d" MAX n) let mutable remaining = n @@ -1038,9 +1038,9 @@ module Tc = FSharp.Compiler.TypeChecker [] type TypeCheckAccumulator = { tcState: TcState - tcImports:TcImports - tcGlobals:TcGlobals - tcConfig:TcConfig + tcImports: TcImports + tcGlobals: TcGlobals + tcConfig: TcConfig tcEnvAtEndOfFile: TcEnv /// Accumulated resolutions, last file first @@ -1052,10 +1052,10 @@ type TypeCheckAccumulator = /// Accumulated 'open' declarations, last file first tcOpenDeclarationsRev: OpenDeclaration[] list - topAttribs:TopAttribs option + topAttribs: TopAttribs option /// Result of checking most recent file, if any - latestImplFile:TypedImplFile option + latestImplFile: TypedImplFile option latestCcuSigForFile: ModuleOrNamespaceType option @@ -1084,7 +1084,7 @@ type FrameworkImportsCache(keepStrongly) = member __.Clear(ctok) = frameworkTcImportsCache.Clear(ctok) /// This function strips the "System" assemblies from the tcConfig and returns a age-cached TcImports for them. - member __.Get(ctok, tcConfig:TcConfig) = + member __.Get(ctok, tcConfig: TcConfig) = cancellable { // Split into installed and not installed. let frameworkDLLs, nonFrameworkResolutions, unresolved = TcAssemblyResolutions.SplitNonFoundationalResolutions(ctok, tcConfig) @@ -1192,7 +1192,7 @@ module Utilities = /// Constructs the build data (IRawFSharpAssemblyData) representing the assembly when used /// as a cross-assembly reference. Note the assembly has not been generated on disk, so this is /// a virtualized view of the assembly contents as computed by background checking. -type RawFSharpAssemblyDataBackedByLanguageService (tcConfig, tcGlobals, tcState:TcState, outfile, topAttrs, assemblyName, ilAssemRef) = +type RawFSharpAssemblyDataBackedByLanguageService (tcConfig, tcGlobals, tcState: TcState, outfile, topAttrs, assemblyName, ilAssemRef) = let generatedCcu = tcState.Ccu let exportRemapping = MakeExportRemapping generatedCcu generatedCcu.Contents @@ -1286,14 +1286,14 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput /// This is a build task function that gets placed into the build rules as the computation for a VectorStamp /// /// Get the timestamp of the given file name. - let StampFileNameTask (cache: TimeStampCache) _ctok (_m:range, filename:string, _isLastCompiland) = + let StampFileNameTask (cache: TimeStampCache) _ctok (_m: range, filename: string, _isLastCompiland) = assertNotDisposed() cache.GetFileTimeStamp filename /// This is a build task function that gets placed into the build rules as the computation for a VectorMap /// /// Parse the given file and return the given input. - let ParseTask ctok (sourceRange:range, filename:string, isLastCompiland) = + let ParseTask ctok (sourceRange: range, filename: string, isLastCompiland) = assertNotDisposed() DoesNotRequireCompilerThreadTokenAndCouldPossiblyBeMadeConcurrent ctok @@ -1303,7 +1303,7 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput try IncrementalBuilderEventTesting.MRU.Add(IncrementalBuilderEventTesting.IBEParsed filename) - let input = ParseOneInputFile(tcConfig, lexResourceManager, [], filename , isLastCompiland, errorLogger, (*retryLocked*)true) + let input = ParseOneInputFile(tcConfig, lexResourceManager, [], filename, isLastCompiland, errorLogger, (*retryLocked*)true) fileParsed.Trigger (filename) input, sourceRange, filename, errorLogger.GetErrors () @@ -1390,7 +1390,7 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput /// This is a build task function that gets placed into the build rules as the computation for a Vector.ScanLeft /// /// Type check all files. - let TypeCheckTask ctok (tcAcc:TypeCheckAccumulator) input: Eventually = + let TypeCheckTask ctok (tcAcc: TypeCheckAccumulator) input: Eventually = assertNotDisposed() match input with | Some input, _sourceRange, filename, parseErrors-> @@ -1461,7 +1461,7 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput /// This is a build task function that gets placed into the build rules as the computation for a Vector.Demultiplex /// /// Finish up the typechecking to produce outputs for the rest of the compilation process - let FinalizeTypeCheckTask ctok (tcStates:TypeCheckAccumulator[]) = + let FinalizeTypeCheckTask ctok (tcStates: TypeCheckAccumulator[]) = cancellable { assertNotDisposed() DoesNotRequireCompilerThreadTokenAndCouldPossiblyBeMadeConcurrent ctok @@ -1581,7 +1581,7 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput RequireCompilationThread ctok // modifying state partialBuild <- b - let MaxTimeStampInDependencies cache (ctok: CompilationThreadToken) (output:INode) = + let MaxTimeStampInDependencies cache (ctok: CompilationThreadToken) (output: INode) = IncrementalBuild.MaxTimeStampInDependencies cache ctok output.Name partialBuild member this.IncrementUsageCount() = @@ -1708,7 +1708,7 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput let t2 = MaxTimeStampInDependencies cache ctok stampedReferencedAssembliesNode max t1 t2 - member __.GetSlotOfFileName(filename:string) = + member __.GetSlotOfFileName(filename: string) = // Get the slot of the given file and force it to build. let CompareFileNames (_, f2, _) = let result = @@ -1750,9 +1750,9 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput static member TryCreateBackgroundBuilderForProjectOptions (ctok, legacyReferenceResolver, defaultFSharpBinariesDir, frameworkTcImportsCache: FrameworkImportsCache, - loadClosureOpt:LoadClosure option, - sourceFiles:string list, - commandLineArgs:string list, + loadClosureOpt: LoadClosure option, + sourceFiles: string list, + commandLineArgs: string list, projectReferences, projectDirectory, useScriptResolutionRules, keepAssemblyContents, keepAllBackgroundResolutions, maxTimeShareMilliseconds, @@ -1783,7 +1783,7 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput | Some idx -> Some(commandLineArgs.[idx].Substring(switchstring.Length)) | _ -> None - // see also fsc.fs:runFromCommandLineToImportingAssemblies(), as there are many similarities to where the PS creates a tcConfigB + // see also fsc.fs: runFromCommandLineToImportingAssemblies(), as there are many similarities to where the PS creates a tcConfigB let tcConfigB = TcConfigBuilder.CreateNew(legacyReferenceResolver, defaultFSharpBinariesDir, diff --git a/src/fcs-fable/src/fsharp/service/ServiceDeclarationLists.fs b/src/fcs-fable/src/fsharp/service/ServiceDeclarationLists.fs index 3c2aa1e179..caac3ee8f8 100644 --- a/src/fcs-fable/src/fsharp/service/ServiceDeclarationLists.fs +++ b/src/fcs-fable/src/fsharp/service/ServiceDeclarationLists.fs @@ -56,7 +56,7 @@ type FSharpMethodGroupItemParameter(name: string, canonicalTypeTextForSorting: s module internal DescriptionListsImpl = let isFunction g ty = - let _,tau = tryDestForallTy g ty + let _, tau = tryDestForallTy g ty isFunTy g tau let printCanonicalizedTypeName g (denv:DisplayEnv) tau = @@ -86,8 +86,8 @@ module internal DescriptionListsImpl = // the union type containing this case. NicePrint.layoutOfParamData denv (ParamData(false, false, false, NotOptional, NoCallerInfo, Some f.Id, ReflectedArgInfo.None, f.FormalType)) FSharpMethodGroupItemParameter( - name=initial.ParameterName, - canonicalTypeTextForSorting=initial.CanonicalTypeTextForSorting, + name=initial.ParameterName, + canonicalTypeTextForSorting=initial.CanonicalTypeTextForSorting, display=display, isOptional=false) @@ -100,7 +100,7 @@ module internal DescriptionListsImpl = // TODO this code is similar to NicePrint.fs:formatParamDataToBuffer, refactor or figure out why different? let PrettyParamsOfParamDatas g denv typarInst (paramDatas:ParamData list) rty = - let paramInfo,paramTypes = + let paramInfo, paramTypes = paramDatas |> List.map (fun (ParamData(isParamArrayArg, _isInArg, _isOutArg, optArgInfo, _callerInfo, nmOpt, _reflArgInfo, pty)) -> let isOptArg = optArgInfo.IsOptional @@ -112,10 +112,10 @@ module internal DescriptionListsImpl = let pty = match ptyOpt with ValueSome x -> x | _ -> pty (nm, isOptArg, SepL.questionMark ^^ (wordL (TaggedTextOps.tagParameter nm))), pty // Layout an unnamed argument - | None, _,_ -> + | None, _, _ -> ("", isOptArg, emptyL), pty // Layout a named argument - | Some id,_,_ -> + | Some id, _, _ -> let nm = id.idText let prefix = if isParamArrayArg then @@ -127,7 +127,7 @@ module internal DescriptionListsImpl = wordL (TaggedTextOps.tagParameter nm) ^^ RightL.colon //sprintf "%s: " nm - (nm,isOptArg, prefix),pty) + (nm, isOptArg, prefix), pty) |> List.unzip // Prettify everything @@ -136,7 +136,7 @@ module internal DescriptionListsImpl = // Remake the params using the prettified versions let prettyParams = - (paramInfo,prettyParamTys,prettyParamTysL) |||> List.map3 (fun (nm,isOptArg,paramPrefix) tau tyL -> + (paramInfo, prettyParamTys, prettyParamTysL) |||> List.map3 (fun (nm, isOptArg, paramPrefix) tau tyL -> FSharpMethodGroupItemParameter( name = nm, canonicalTypeTextForSorting = printCanonicalizedTypeName g denv tau, @@ -154,7 +154,7 @@ module internal DescriptionListsImpl = // Remake the params using the prettified versions let parameters = - (prettyParamTys,prettyParamTysL) + (prettyParamTys, prettyParamTysL) ||> List.zip |> List.map (fun (tau, tyL) -> FSharpMethodGroupItemParameter( @@ -178,7 +178,7 @@ module internal DescriptionListsImpl = | SymbolHelpers.ItemIsWithStaticArguments m g staticParameters -> staticParameters |> Array.map (fun sp -> - let ty = Import.ImportProvidedType amap m (sp.PApply((fun x -> x.ParameterType),m)) + let ty = Import.ImportProvidedType amap m (sp.PApply((fun x -> x.ParameterType), m)) let spKind = NicePrint.prettyLayoutOfType denv ty let spName = sp.PUntaint((fun sp -> sp.Name), m) let spOpt = sp.PUntaint((fun sp -> sp.IsOptional), m) @@ -204,7 +204,7 @@ module internal DescriptionListsImpl = let getPrettyParamsOfTypes() = let tau = vref.TauType match tryDestFunTy denv.g tau with - | ValueSome(arg,rtau) -> + | ValueSome(arg, rtau) -> let args = tryDestRefTupleTy denv.g arg let _prettyTyparInst, prettyParams, prettyRetTyL, _prettyConstraintsL = PrettyParamsOfTypes g denv item.TyparInst args rtau // FUTURE: prettyTyparInst is the pretty version of the known instantiations of type parameters in the output. It could be returned @@ -241,7 +241,7 @@ module internal DescriptionListsImpl = // Adjust the return type so it only strips the first argument let curriedRetTy = match tryDestFunTy denv.g vref.TauType with - | ValueSome(_,rtau) -> rtau + | ValueSome(_, rtau) -> rtau | _ -> lastRetTy let _prettyTyparInst, prettyFirstCurriedParams, prettyCurriedRetTyL, prettyConstraintsL = PrettyParamsOfParamDatas g denv item.TyparInst firstCurriedParamDatas curriedRetTy @@ -250,7 +250,7 @@ module internal DescriptionListsImpl = prettyFirstCurriedParams, prettyCurriedRetTyL - | Item.UnionCase(ucinfo,_) -> + | Item.UnionCase(ucinfo, _) -> let prettyParams = match ucinfo.UnionCase.RecdFields with | [f] -> [PrettyParamOfUnionCaseField g denv NicePrint.isGeneratedUnionCaseField -1 f] @@ -283,29 +283,29 @@ module internal DescriptionListsImpl = let _prettyTyparInst, prettyRetTyL = NicePrint.prettyLayoutOfUncurriedSig denv item.TyparInst [] rfinfo.FieldType [], prettyRetTyL - | Item.AnonRecdField(_anonInfo,tys,i, _) -> + | Item.AnonRecdField(_anonInfo, tys, i, _) -> let _prettyTyparInst, prettyRetTyL = NicePrint.prettyLayoutOfUncurriedSig denv item.TyparInst [] tys.[i] [], prettyRetTyL | Item.ILField finfo -> - let _prettyTyparInst, prettyRetTyL = NicePrint.prettyLayoutOfUncurriedSig denv item.TyparInst [] (finfo.FieldType(amap,m)) + let _prettyTyparInst, prettyRetTyL = NicePrint.prettyLayoutOfUncurriedSig denv item.TyparInst [] (finfo.FieldType(amap, m)) [], prettyRetTyL | Item.Event einfo -> let _prettyTyparInst, prettyRetTyL = NicePrint.prettyLayoutOfUncurriedSig denv item.TyparInst [] (PropTypOfEventInfo infoReader m AccessibleFromSomewhere einfo) [], prettyRetTyL - | Item.Property(_,pinfo :: _) -> - let paramDatas = pinfo.GetParamDatas(amap,m) - let rty = pinfo.GetPropertyType(amap,m) + | Item.Property(_, pinfo :: _) -> + let paramDatas = pinfo.GetParamDatas(amap, m) + let rty = pinfo.GetPropertyType(amap, m) let _prettyTyparInst, prettyParams, prettyRetTyL, _prettyConstraintsL = PrettyParamsOfParamDatas g denv item.TyparInst paramDatas rty // FUTURE: prettyTyparInst is the pretty version of the known instantiations of type parameters in the output. It could be returned // for display as part of the method group prettyParams, prettyRetTyL - | Item.CtorGroup(_,(minfo :: _)) - | Item.MethodGroup(_,(minfo :: _),_) -> + | Item.CtorGroup(_, (minfo :: _)) + | Item.MethodGroup(_, (minfo :: _), _) -> let paramDatas = minfo.GetParamDatas(amap, m, minfo.FormalMethodInst) |> List.head let rty = minfo.GetFSharpReturnTy(amap, m, minfo.FormalMethodInst) let _prettyTyparInst, prettyParams, prettyRetTyL, _prettyConstraintsL = PrettyParamsOfParamDatas g denv item.TyparInst paramDatas rty @@ -313,18 +313,18 @@ module internal DescriptionListsImpl = // for display as part of the method group prettyParams, prettyRetTyL - | Item.CustomBuilder (_,vref) -> + | Item.CustomBuilder (_, vref) -> PrettyParamsAndReturnTypeOfItem infoReader m denv { item with Item = Item.Value vref } | Item.TypeVar _ -> [], emptyL - | Item.CustomOperation (_,usageText, Some minfo) -> + | Item.CustomOperation (_, usageText, Some minfo) -> match usageText() with | None -> let argNamesAndTys = SymbolHelpers.ParamNameAndTypesOfUnaryCustomOperation g minfo - let argTys, _ = PrettyTypes.PrettifyTypes g (argNamesAndTys |> List.map (fun (ParamNameAndType(_,ty)) -> ty)) - let paramDatas = (argNamesAndTys, argTys) ||> List.map2 (fun (ParamNameAndType(nmOpt, _)) argTy -> ParamData(false, false, false, NotOptional, NoCallerInfo, nmOpt, ReflectedArgInfo.None,argTy)) + let argTys, _ = PrettyTypes.PrettifyTypes g (argNamesAndTys |> List.map (fun (ParamNameAndType(_, ty)) -> ty)) + let paramDatas = (argNamesAndTys, argTys) ||> List.map2 (fun (ParamNameAndType(nmOpt, _)) argTy -> ParamData(false, false, false, NotOptional, NoCallerInfo, nmOpt, ReflectedArgInfo.None, argTy)) let rty = minfo.GetFSharpReturnTy(amap, m, minfo.FormalMethodInst) let _prettyTyparInst, prettyParams, prettyRetTyL, _prettyConstraintsL = PrettyParamsOfParamDatas g denv item.TyparInst paramDatas rty @@ -369,7 +369,7 @@ module internal DescriptionListsImpl = | TTyconEnum _ -> FSharpGlyph.Enum | TRecdRepr _ -> FSharpGlyph.Type | TUnionRepr _ -> FSharpGlyph.Union - | TILObjectRepr (TILObjectReprData (_,_,td)) -> + | TILObjectRepr (TILObjectReprData (_, _, td)) -> if td.IsClass then FSharpGlyph.Class elif td.IsStruct then FSharpGlyph.Struct elif td.IsInterface then FSharpGlyph.Interface @@ -399,11 +399,11 @@ module internal DescriptionListsImpl = // In this case just use GlyphMajor.Class. protectAssemblyExploration FSharpGlyph.Class (fun () -> match item with - | Item.Value(vref) | Item.CustomBuilder (_,vref) -> + | Item.Value(vref) | Item.CustomBuilder (_, vref) -> if isFunction denv.g vref.Type then FSharpGlyph.Method elif vref.LiteralValue.IsSome then FSharpGlyph.Constant else FSharpGlyph.Variable - | Item.Types(_,ty::_) -> typeToGlyph (stripTyEqns denv.g ty) + | Item.Types(_, ty::_) -> typeToGlyph (stripTyEqns denv.g ty) | Item.UnionCase _ | Item.ActivePatternCase _ -> FSharpGlyph.EnumMember | Item.ExnCase _ -> FSharpGlyph.Exception @@ -449,7 +449,7 @@ module internal DescriptionListsImpl = /// duplication could potentially be removed) let AnotherFlattenItems g _m item = match item with - | Item.CtorGroup(nm,cinfos) -> List.map (fun minfo -> Item.CtorGroup(nm,[minfo])) cinfos + | Item.CtorGroup(nm, cinfos) -> List.map (fun minfo -> Item.CtorGroup(nm, [minfo])) cinfos | Item.FakeInterfaceCtor _ | Item.DelegateCtor _ -> [item] | Item.NewDef _ @@ -459,11 +459,11 @@ module internal DescriptionListsImpl = if isFunction g rfinfo.FieldType then [item] else [] | Item.Value v -> if isFunction g v.Type then [item] else [] - | Item.UnionCase(ucr,_) -> + | Item.UnionCase(ucr, _) -> if not ucr.UnionCase.IsNullary then [item] else [] | Item.ExnCase(ecr) -> if isNil (recdFieldsOfExnDefRef ecr) then [] else [item] - | Item.Property(_,pinfos) -> + | Item.Property(_, pinfos) -> let pinfo = List.head pinfos if pinfo.IsIndexer then [item] else [] #if !NO_EXTENSIONTYPING @@ -471,7 +471,7 @@ module internal DescriptionListsImpl = // we pretend that provided-types-with-static-args are method-like in order to get ParamInfo for them [item] #endif - | Item.MethodGroup(nm,minfos,orig) -> minfos |> List.map (fun minfo -> Item.MethodGroup(nm,[minfo],orig)) + | Item.MethodGroup(nm, minfos, orig) -> minfos |> List.map (fun minfo -> Item.MethodGroup(nm, [minfo], orig)) | Item.CustomOperation(_name, _helpText, _minfo) -> [item] | Item.TypeVar _ -> [] | Item.CustomBuilder _ -> [] @@ -574,17 +574,17 @@ type FSharpDeclarationListInfo(declarations: FSharpDeclarationListItem[], isForT | Some tref1, tref2 -> tyconRefEq g tref1 tref2 | _ -> false - // Adjust items priority. Sort by name. For things with the same name, + // Adjust items priority. Sort by name. For things with the same name, // - show types with fewer generic parameters first // - show types before over other related items - they usually have very useful XmlDocs let _, _, items = items |> List.map (fun x -> match x.Item with - | Item.Types (_,(TType_app(tcref,_) :: _)) -> { x with MinorPriority = 1 + tcref.TyparsNoRange.Length } + | Item.Types (_, (TType_app(tcref, _) :: _)) -> { x with MinorPriority = 1 + tcref.TyparsNoRange.Length } // Put delegate ctors after types, sorted by #typars. RemoveDuplicateItems will remove FakeInterfaceCtor and DelegateCtor if an earlier type is also reported with this name - | Item.FakeInterfaceCtor (TType_app(tcref,_)) - | Item.DelegateCtor (TType_app(tcref,_)) -> { x with MinorPriority = 1000 + tcref.TyparsNoRange.Length } + | Item.FakeInterfaceCtor (TType_app(tcref, _)) + | Item.DelegateCtor (TType_app(tcref, _)) -> { x with MinorPriority = 1000 + tcref.TyparsNoRange.Length } // Put type ctors after types, sorted by #typars. RemoveDuplicateItems will remove DefaultStructCtors if a type is also reported with this name | Item.CtorGroup (_, (cinfo :: _)) -> { x with MinorPriority = 1000 + 10 * cinfo.DeclaringTyconRef.TyparsNoRange.Length } | Item.MethodGroup(_, minfo :: _, _) -> { x with IsOwnMember = tyconRefOptEq x.Type minfo.DeclaringTyconRef } @@ -661,7 +661,7 @@ type FSharpDeclarationListInfo(declarations: FSharpDeclarationListItem[], isForT let name, nameInCode = if displayName.StartsWithOrdinal("( ") && displayName.EndsWithOrdinal(" )") then let cleanName = displayName.[2..displayName.Length - 3] - cleanName, + cleanName, if IsOperatorName displayName then cleanName else "``" + cleanName + "``" else displayName, @@ -702,14 +702,14 @@ type FSharpDeclarationListInfo(declarations: FSharpDeclarationListItem[], isForT | ns -> Some (System.String.Join(".", ns))) FSharpDeclarationListItem( - name, nameInCode, fullName, glyph, Choice1Of2 (items, infoReader, m, denv, reactor, checkAlive), getAccessibility item.Item, + name, nameInCode, fullName, glyph, Choice1Of2 (items, infoReader, m, denv, reactor, checkAlive), getAccessibility item.Item, item.Kind, item.IsOwnMember, item.MinorPriority, item.Unresolved.IsNone, namespaceToOpen)) new FSharpDeclarationListInfo(Array.ofList decls, isForType, false) static member Error msg = new FSharpDeclarationListInfo( - [| FSharpDeclarationListItem("", "", "", FSharpGlyph.Error, Choice2Of2 (FSharpToolTipText [FSharpStructuredToolTipElement.CompositionError msg]), + [| FSharpDeclarationListItem("", "", "", FSharpGlyph.Error, Choice2Of2 (FSharpToolTipText [FSharpStructuredToolTipElement.CompositionError msg]), None, CompletionItemKind.Other, false, 0, false, None) |], false, true) static member Empty = FSharpDeclarationListInfo([| |], false, false) @@ -720,8 +720,8 @@ type FSharpDeclarationListInfo(declarations: FSharpDeclarationListItem[], isForT /// a single, non-overloaded item such as union case or a named function value. // Note: instances of this type do not hold any references to any compiler resources. [] -type FSharpMethodGroupItem(description: FSharpToolTipText, xmlDoc: FSharpXmlDoc, - returnType: layout, parameters: FSharpMethodGroupItemParameter[], +type FSharpMethodGroupItem(description: FSharpToolTipText, xmlDoc: FSharpXmlDoc, + returnType: layout, parameters: FSharpMethodGroupItemParameter[], hasParameters: bool, hasParamArrayArg: bool, staticParameters: FSharpMethodGroupItemParameter[]) = /// The structured description representation for the method (or other item) @@ -742,13 +742,13 @@ type FSharpMethodGroupItem(description: FSharpToolTipText, xmlDoc: FShar /// The parameters of the method in the overload set member __.Parameters = parameters - /// Does the method support an arguments list? This is always true except for static type instantiations like TP<42,"foo">. + /// Does the method support an arguments list? This is always true except for static type instantiations like TP<42, "foo">. member __.HasParameters = hasParameters /// Does the method support a params list arg? member __.HasParamArrayArg = hasParamArrayArg - /// Does the type name or method support a static arguments list, like TP<42,"foo"> or conn.CreateCommand<42, "foo">(arg1, arg2)? + /// Does the type name or method support a static arguments list, like TP<42, "foo"> or conn.CreateCommand<42, "foo">(arg1, arg2)? member __.StaticParameters = staticParameters @@ -807,8 +807,8 @@ type FSharpMethodGroup( name: string, unsortedMethods: FSharpMethodGroupItem[] ) let hasParamArrayArg = match flatItem with - | Item.CtorGroup(_,[meth]) - | Item.MethodGroup(_,[meth],_) -> meth.HasParamArrayArg(infoReader.amap, m, meth.FormalMethodInst) + | Item.CtorGroup(_, [meth]) + | Item.MethodGroup(_, [meth], _) -> meth.HasParamArrayArg(infoReader.amap, m, meth.FormalMethodInst) | _ -> false let hasStaticParameters = diff --git a/src/fcs-fable/src/fsharp/service/ServiceInterfaceStubGenerator.fs b/src/fcs-fable/src/fsharp/service/ServiceInterfaceStubGenerator.fs index d2ec593838..e4a2bc7e02 100644 --- a/src/fcs-fable/src/fsharp/service/ServiceInterfaceStubGenerator.fs +++ b/src/fcs-fable/src/fsharp/service/ServiceInterfaceStubGenerator.fs @@ -124,7 +124,7 @@ type internal InterfaceData = sprintf "- %s" s let rec (|TypeIdent|_|) = function - | SynType.Var(SynTypar.Typar(s, req , _), _) -> + | SynType.Var(SynTypar.Typar(s, req, _), _) -> match req with | NoStaticReq -> Some ("'" + s.idText) @@ -240,16 +240,18 @@ module internal InterfaceStubGenerator = name :: acc, allNames) ([], namesWithIndices) List.rev argsSoFar' :: argsSoFar, namesWithIndices) ([], Map.ofList [ ctx.ObjectIdent, Set.empty ]) - args - |> List.rev - |> List.map (function - | [] -> unit - | [arg] when arg = unit -> unit - | [arg] when not v.IsMember || isItemIndexer -> arg - | args when isItemIndexer -> String.concat tupSep args - | args -> bracket (String.concat tupSep args)) - |> String.concat argSep - , namesWithIndices + let argText = + args + |> List.rev + |> List.map (function + | [] -> unit + | [arg] when arg = unit -> unit + | [arg] when not v.IsMember || isItemIndexer -> arg + | args when isItemIndexer -> String.concat tupSep args + | args -> bracket (String.concat tupSep args)) + |> String.concat argSep + + argText, namesWithIndices [] type internal MemberInfo = @@ -307,11 +309,12 @@ module internal InterfaceStubGenerator = "", Map.ofList [ctx.ObjectIdent, Set.empty] | _ -> formatArgsUsage ctx verboseMode v argInfos - if String.IsNullOrWhiteSpace(args) then "" - elif args.StartsWithOrdinal("(") then args - elif v.CurriedParameterGroups.Count > 1 && (not verboseMode) then " " + args - else sprintf "(%s)" args - , namesWithIndices + let argText = + if String.IsNullOrWhiteSpace(args) then "" + elif args.StartsWithOrdinal("(") then args + elif v.CurriedParameterGroups.Count > 1 && (not verboseMode) then " " + args + else sprintf "(%s)" args + argText, namesWithIndices let preprocess (ctx: Context) (v: FSharpMemberOrFunctionOrValue) = let buildUsage argInfos = diff --git a/src/fcs-fable/src/fsharp/service/ServiceLexing.fs b/src/fcs-fable/src/fsharp/service/ServiceLexing.fs index f3a6e1bf79..93ebc981ad 100755 --- a/src/fcs-fable/src/fsharp/service/ServiceLexing.fs +++ b/src/fcs-fable/src/fsharp/service/ServiceLexing.fs @@ -140,13 +140,13 @@ type FSharpTokenCharKind = /// Information about a particular token from the tokenizer type FSharpTokenInfo = { - LeftColumn:int - RightColumn:int - ColorClass:FSharpTokenColorKind - CharClass:FSharpTokenCharKind - FSharpTokenTriggerClass:FSharpTokenTriggerClass - Tag:int - TokenName:string + LeftColumn: int + RightColumn: int + ColorClass: FSharpTokenColorKind + CharClass: FSharpTokenCharKind + FSharpTokenTriggerClass: FSharpTokenTriggerClass + Tag: int + TokenName: string FullMatchedLength: int } //---------------------------------------------------------------------------- @@ -164,31 +164,31 @@ module internal TokenClassifications = | IDENT s -> if s.Length <= 0 then - System.Diagnostics.Debug.Assert(false, "BUG:Received zero length IDENT token.") + System.Diagnostics.Debug.Assert(false, "BUG: Received zero length IDENT token.") // This is related to 4783. Recover by treating as lower case identifier. - (FSharpTokenColorKind.Identifier,FSharpTokenCharKind.Identifier,FSharpTokenTriggerClass.None) + (FSharpTokenColorKind.Identifier, FSharpTokenCharKind.Identifier, FSharpTokenTriggerClass.None) else if System.Char.ToUpperInvariant s.[0] = s.[0] then - (FSharpTokenColorKind.UpperIdentifier,FSharpTokenCharKind.Identifier,FSharpTokenTriggerClass.None) + (FSharpTokenColorKind.UpperIdentifier, FSharpTokenCharKind.Identifier, FSharpTokenTriggerClass.None) else - (FSharpTokenColorKind.Identifier,FSharpTokenCharKind.Identifier,FSharpTokenTriggerClass.None) + (FSharpTokenColorKind.Identifier, FSharpTokenCharKind.Identifier, FSharpTokenTriggerClass.None) // 'in' when used in a 'join' in a query expression | JOIN_IN -> - (FSharpTokenColorKind.Identifier,FSharpTokenCharKind.Identifier,FSharpTokenTriggerClass.None) + (FSharpTokenColorKind.Identifier, FSharpTokenCharKind.Identifier, FSharpTokenTriggerClass.None) | DECIMAL _ | BIGNUM _ | INT8 _ | UINT8 _ | INT16 _ | UINT16 _ | INT32 _ | UINT32 _ | INT64 _ | UINT64 _ | UNATIVEINT _ | NATIVEINT _ | IEEE32 _ | IEEE64 _ - -> (FSharpTokenColorKind.Number,FSharpTokenCharKind.Literal,FSharpTokenTriggerClass.None) + -> (FSharpTokenColorKind.Number, FSharpTokenCharKind.Literal, FSharpTokenTriggerClass.None) | INT32_DOT_DOT _ // This will color the whole "1.." expression in a 'number' color // (this isn't entirely correct, but it'll work for now - see bug 3727) - -> (FSharpTokenColorKind.Number,FSharpTokenCharKind.Operator,FSharpTokenTriggerClass.None) + -> (FSharpTokenColorKind.Number, FSharpTokenCharKind.Operator, FSharpTokenTriggerClass.None) | INFIX_STAR_DIV_MOD_OP ("mod" | "land" | "lor" | "lxor") | INFIX_STAR_STAR_OP ("lsl" | "lsr" | "asr") - -> (FSharpTokenColorKind.Keyword,FSharpTokenCharKind.Keyword,FSharpTokenTriggerClass.None) + -> (FSharpTokenColorKind.Keyword, FSharpTokenCharKind.Keyword, FSharpTokenTriggerClass.None) | LPAREN_STAR_RPAREN | DOLLAR | COLON_GREATER | COLON_COLON @@ -197,7 +197,7 @@ module internal TokenClassifications = | HIGH_PRECEDENCE_TYAPP | COLON_EQUALS | EQUALS | RQUOTE_DOT _ | MINUS | ADJACENT_PREFIX_OP _ - -> (FSharpTokenColorKind.Operator,FSharpTokenCharKind.Operator,FSharpTokenTriggerClass.None) + -> (FSharpTokenColorKind.Operator, FSharpTokenCharKind.Operator, FSharpTokenTriggerClass.None) | INFIX_COMPARE_OP _ // This is a whole family: .< .> .= .!= .$ | FUNKY_OPERATOR_NAME _ // This is another whole family, including: .[] and .() @@ -207,52 +207,52 @@ module internal TokenClassifications = | INFIX_BAR_OP _ | INFIX_STAR_DIV_MOD_OP _ | INFIX_AMP_OP _ -> - (FSharpTokenColorKind.Operator,FSharpTokenCharKind.Operator,FSharpTokenTriggerClass.None) + (FSharpTokenColorKind.Operator, FSharpTokenCharKind.Operator, FSharpTokenTriggerClass.None) | DOT_DOT -> - (FSharpTokenColorKind.Operator,FSharpTokenCharKind.Operator,FSharpTokenTriggerClass.MemberSelect) + (FSharpTokenColorKind.Operator, FSharpTokenCharKind.Operator, FSharpTokenTriggerClass.MemberSelect) | COMMA - -> (FSharpTokenColorKind.Punctuation,FSharpTokenCharKind.Delimiter,FSharpTokenTriggerClass.ParamNext) + -> (FSharpTokenColorKind.Punctuation, FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.ParamNext) | DOT - -> (FSharpTokenColorKind.Punctuation,FSharpTokenCharKind.Delimiter,FSharpTokenTriggerClass.MemberSelect) + -> (FSharpTokenColorKind.Punctuation, FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.MemberSelect) | BAR - -> (FSharpTokenColorKind.Punctuation,FSharpTokenCharKind.Delimiter,FSharpTokenTriggerClass.None (* FSharpTokenTriggerClass.ChoiceSelect *)) + -> (FSharpTokenColorKind.Punctuation, FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.None (* FSharpTokenTriggerClass.ChoiceSelect *)) | HASH | STAR | SEMICOLON | SEMICOLON_SEMICOLON | COLON - -> (FSharpTokenColorKind.Punctuation,FSharpTokenCharKind.Delimiter,FSharpTokenTriggerClass.None) + -> (FSharpTokenColorKind.Punctuation, FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.None) | QUOTE | UNDERSCORE | INFIX_AT_HAT_OP _ - -> (FSharpTokenColorKind.Identifier ,FSharpTokenCharKind.Identifier,FSharpTokenTriggerClass.None) + -> (FSharpTokenColorKind.Identifier, FSharpTokenCharKind.Identifier, FSharpTokenTriggerClass.None) | LESS _ - -> (FSharpTokenColorKind.Punctuation,FSharpTokenCharKind.Operator,FSharpTokenTriggerClass.ParamStart) // for type provider static arguments + -> (FSharpTokenColorKind.Punctuation, FSharpTokenCharKind.Operator, FSharpTokenTriggerClass.ParamStart) // for type provider static arguments | GREATER _ - -> (FSharpTokenColorKind.Punctuation,FSharpTokenCharKind.Operator,FSharpTokenTriggerClass.ParamEnd) // for type provider static arguments + -> (FSharpTokenColorKind.Punctuation, FSharpTokenCharKind.Operator, FSharpTokenTriggerClass.ParamEnd) // for type provider static arguments | LPAREN // We need 'ParamStart' to trigger the 'GetDeclarations' method to show param info automatically // this is needed even if we don't use MPF for determining information about params - -> (FSharpTokenColorKind.Punctuation,FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.ParamStart ||| FSharpTokenTriggerClass.MatchBraces) + -> (FSharpTokenColorKind.Punctuation, FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.ParamStart ||| FSharpTokenTriggerClass.MatchBraces) | RPAREN | RPAREN_COMING_SOON | RPAREN_IS_HERE - -> (FSharpTokenColorKind.Punctuation,FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.ParamEnd ||| FSharpTokenTriggerClass.MatchBraces) + -> (FSharpTokenColorKind.Punctuation, FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.ParamEnd ||| FSharpTokenTriggerClass.MatchBraces) | LBRACK_LESS - -> (FSharpTokenColorKind.Punctuation,FSharpTokenCharKind.Delimiter,FSharpTokenTriggerClass.None ) + -> (FSharpTokenColorKind.Punctuation, FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.None ) | LQUOTE _ | LBRACK | LBRACE | LBRACK_BAR | LBRACE_BAR - -> (FSharpTokenColorKind.Punctuation,FSharpTokenCharKind.Delimiter,FSharpTokenTriggerClass.MatchBraces ) + -> (FSharpTokenColorKind.Punctuation, FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.MatchBraces ) | GREATER_RBRACK | GREATER_BAR_RBRACK - -> (FSharpTokenColorKind.Punctuation,FSharpTokenCharKind.Delimiter,FSharpTokenTriggerClass.None ) + -> (FSharpTokenColorKind.Punctuation, FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.None ) | RQUOTE _ | RBRACK | RBRACE | RBRACE_COMING_SOON | RBRACE_IS_HERE | BAR_RBRACK | BAR_RBRACE - -> (FSharpTokenColorKind.Punctuation,FSharpTokenCharKind.Delimiter,FSharpTokenTriggerClass.MatchBraces ) + -> (FSharpTokenColorKind.Punctuation, FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.MatchBraces ) | PUBLIC | PRIVATE | INTERNAL | BASE | GLOBAL | CONSTRAINT | INSTANCE | DELEGATE | INHERIT|CONSTRUCTOR|DEFAULT|OVERRIDE|ABSTRACT|CLASS @@ -270,38 +270,38 @@ module internal TokenClassifications = | HIGH_PRECEDENCE_PAREN_APP | FIXED | HIGH_PRECEDENCE_BRACK_APP | TYPE_COMING_SOON | TYPE_IS_HERE | MODULE_COMING_SOON | MODULE_IS_HERE - -> (FSharpTokenColorKind.Keyword,FSharpTokenCharKind.Keyword,FSharpTokenTriggerClass.None) + -> (FSharpTokenColorKind.Keyword, FSharpTokenCharKind.Keyword, FSharpTokenTriggerClass.None) | BEGIN - -> (FSharpTokenColorKind.Keyword,FSharpTokenCharKind.Keyword,FSharpTokenTriggerClass.None) + -> (FSharpTokenColorKind.Keyword, FSharpTokenCharKind.Keyword, FSharpTokenTriggerClass.None) | END - -> (FSharpTokenColorKind.Keyword,FSharpTokenCharKind.Keyword,FSharpTokenTriggerClass.None) + -> (FSharpTokenColorKind.Keyword, FSharpTokenCharKind.Keyword, FSharpTokenTriggerClass.None) | HASH_LIGHT _ | HASH_LINE _ | HASH_IF _ | HASH_ELSE _ | HASH_ENDIF _ -> - (FSharpTokenColorKind.PreprocessorKeyword,FSharpTokenCharKind.WhiteSpace,FSharpTokenTriggerClass.None) + (FSharpTokenColorKind.PreprocessorKeyword, FSharpTokenCharKind.WhiteSpace, FSharpTokenTriggerClass.None) | INACTIVECODE _ -> - (FSharpTokenColorKind.InactiveCode,FSharpTokenCharKind.WhiteSpace,FSharpTokenTriggerClass.None) + (FSharpTokenColorKind.InactiveCode, FSharpTokenCharKind.WhiteSpace, FSharpTokenTriggerClass.None) | LEX_FAILURE _ | WHITESPACE _ -> - (FSharpTokenColorKind.Default,FSharpTokenCharKind.WhiteSpace,FSharpTokenTriggerClass.None) + (FSharpTokenColorKind.Default, FSharpTokenCharKind.WhiteSpace, FSharpTokenTriggerClass.None) | COMMENT _ -> - (FSharpTokenColorKind.Comment,FSharpTokenCharKind.Comment,FSharpTokenTriggerClass.None) + (FSharpTokenColorKind.Comment, FSharpTokenCharKind.Comment, FSharpTokenTriggerClass.None) | LINE_COMMENT _ -> - (FSharpTokenColorKind.Comment,FSharpTokenCharKind.LineComment,FSharpTokenTriggerClass.None) + (FSharpTokenColorKind.Comment, FSharpTokenCharKind.LineComment, FSharpTokenTriggerClass.None) | STRING_TEXT _ -> - (FSharpTokenColorKind.String,FSharpTokenCharKind.String,FSharpTokenTriggerClass.None) + (FSharpTokenColorKind.String, FSharpTokenCharKind.String, FSharpTokenTriggerClass.None) | KEYWORD_STRING _ -> - (FSharpTokenColorKind.Keyword,FSharpTokenCharKind.Keyword,FSharpTokenTriggerClass.None) + (FSharpTokenColorKind.Keyword, FSharpTokenCharKind.Keyword, FSharpTokenTriggerClass.None) | BYTEARRAY _ | STRING _ | CHAR _ (* bug://2863 asks to color 'char' as "string" *) - -> (FSharpTokenColorKind.String,FSharpTokenCharKind.String,FSharpTokenTriggerClass.None) + -> (FSharpTokenColorKind.String, FSharpTokenCharKind.String, FSharpTokenTriggerClass.None) | EOF _ -> failwith "tokenInfo" module internal TestExpose = @@ -338,7 +338,7 @@ type FSharpTokenizerColorState = module internal LexerStateEncoding = - let computeNextLexState token (prevLexcont:LexerWhitespaceContinuation) = + let computeNextLexState token (prevLexcont: LexerWhitespaceContinuation) = match token with | HASH_LINE s | HASH_LIGHT s @@ -389,13 +389,13 @@ module internal LexerStateEncoding = let inline lexStateOfColorState (state: FSharpTokenizerColorState) = (int64 state <<< lexstateStart) &&& lexstateMask - let encodeLexCont (colorState:FSharpTokenizerColorState) ncomments (b:pos) ifdefStack light = + let encodeLexCont (colorState: FSharpTokenizerColorState) ncomments (b: pos) ifdefStack light = let mutable ifdefStackCount = 0 let mutable ifdefStackBits = 0 for ifOrElse in ifdefStack do match ifOrElse with - | (IfDefIf,_) -> () - | (IfDefElse,_) -> + | (IfDefIf, _) -> () + | (IfDefElse, _) -> ifdefStackBits <- (ifdefStackBits ||| (1 <<< ifdefStackCount)) ifdefStackCount <- ifdefStackCount + 1 @@ -409,7 +409,7 @@ module internal LexerStateEncoding = OtherBits = bits } - let decodeLexCont (state:FSharpTokenizerLexState) = + let decodeLexCont (state: FSharpTokenizerLexState) = let mutable ifDefs = [] let bits = state.OtherBits let ifdefStackCount = (int32) ((bits &&& ifdefstackCountMask) >>> ifdefstackCountStart) @@ -419,51 +419,51 @@ module internal LexerStateEncoding = let bit = ifdefStackCount-i let mask = 1 <<< bit let ifDef = (if ifdefStack &&& mask = 0 then IfDefIf else IfDefElse) - ifDefs<-(ifDef,range0)::ifDefs + ifDefs<-(ifDef, range0)::ifDefs colorStateOfLexState state, int32 ((bits &&& ncommentsMask) >>> ncommentsStart), pos.Decode state.PosBits, ifDefs, boolOfBit ((bits &&& hardwhitePosMask) >>> hardwhitePosStart) - let encodeLexInt lightSyntaxStatus (lexcont:LexerWhitespaceContinuation) = - let tag,n1,p1,ifd = + let encodeLexInt lightSyntaxStatus (lexcont: LexerWhitespaceContinuation) = + let tag, n1, p1, ifd = match lexcont with - | LexCont.Token ifd -> FSharpTokenizerColorState.Token, 0L, pos0, ifd - | LexCont.IfDefSkip (ifd,n,m) -> FSharpTokenizerColorState.IfDefSkip, int64 n, m.Start, ifd - | LexCont.EndLine(LexerEndlineContinuation.Skip(ifd,n,m)) -> FSharpTokenizerColorState.EndLineThenSkip, int64 n, m.Start, ifd - | LexCont.EndLine(LexerEndlineContinuation.Token(ifd)) -> FSharpTokenizerColorState.EndLineThenToken, 0L, pos0, ifd - | LexCont.String (ifd,m) -> FSharpTokenizerColorState.String, 0L, m.Start, ifd - | LexCont.Comment (ifd,n,m) -> FSharpTokenizerColorState.Comment, int64 n, m.Start, ifd - | LexCont.SingleLineComment (ifd,n,m) -> FSharpTokenizerColorState.SingleLineComment, int64 n, m.Start, ifd - | LexCont.StringInComment (ifd,n,m) -> FSharpTokenizerColorState.StringInComment, int64 n, m.Start, ifd - | LexCont.VerbatimStringInComment (ifd,n,m) -> FSharpTokenizerColorState.VerbatimStringInComment, int64 n, m.Start, ifd - | LexCont.TripleQuoteStringInComment (ifd,n,m) -> FSharpTokenizerColorState.TripleQuoteStringInComment,int64 n, m.Start, ifd - | LexCont.MLOnly (ifd,m) -> FSharpTokenizerColorState.CamlOnly, 0L, m.Start, ifd - | LexCont.VerbatimString (ifd,m) -> FSharpTokenizerColorState.VerbatimString, 0L, m.Start, ifd - | LexCont.TripleQuoteString (ifd,m) -> FSharpTokenizerColorState.TripleQuoteString, 0L, m.Start, ifd + | LexCont.Token ifd -> FSharpTokenizerColorState.Token, 0L, pos0, ifd + | LexCont.IfDefSkip (ifd, n, m) -> FSharpTokenizerColorState.IfDefSkip, int64 n, m.Start, ifd + | LexCont.EndLine(LexerEndlineContinuation.Skip(ifd, n, m)) -> FSharpTokenizerColorState.EndLineThenSkip, int64 n, m.Start, ifd + | LexCont.EndLine(LexerEndlineContinuation.Token(ifd)) -> FSharpTokenizerColorState.EndLineThenToken, 0L, pos0, ifd + | LexCont.String (ifd, m) -> FSharpTokenizerColorState.String, 0L, m.Start, ifd + | LexCont.Comment (ifd, n, m) -> FSharpTokenizerColorState.Comment, int64 n, m.Start, ifd + | LexCont.SingleLineComment (ifd, n, m) -> FSharpTokenizerColorState.SingleLineComment, int64 n, m.Start, ifd + | LexCont.StringInComment (ifd, n, m) -> FSharpTokenizerColorState.StringInComment, int64 n, m.Start, ifd + | LexCont.VerbatimStringInComment (ifd, n, m) -> FSharpTokenizerColorState.VerbatimStringInComment, int64 n, m.Start, ifd + | LexCont.TripleQuoteStringInComment (ifd, n, m) -> FSharpTokenizerColorState.TripleQuoteStringInComment, int64 n, m.Start, ifd + | LexCont.MLOnly (ifd, m) -> FSharpTokenizerColorState.CamlOnly, 0L, m.Start, ifd + | LexCont.VerbatimString (ifd, m) -> FSharpTokenizerColorState.VerbatimString, 0L, m.Start, ifd + | LexCont.TripleQuoteString (ifd, m) -> FSharpTokenizerColorState.TripleQuoteString, 0L, m.Start, ifd encodeLexCont tag n1 p1 ifd lightSyntaxStatus - let decodeLexInt (state:FSharpTokenizerLexState) = - let tag,n1,p1,ifd,lightSyntaxStatusInital = decodeLexCont state + let decodeLexInt (state: FSharpTokenizerLexState) = + let tag, n1, p1, ifd, lightSyntaxStatusInital = decodeLexCont state let lexcont = match tag with | FSharpTokenizerColorState.Token -> LexCont.Token ifd - | FSharpTokenizerColorState.IfDefSkip -> LexCont.IfDefSkip (ifd,n1,mkRange "file" p1 p1) - | FSharpTokenizerColorState.String -> LexCont.String (ifd,mkRange "file" p1 p1) - | FSharpTokenizerColorState.Comment -> LexCont.Comment (ifd,n1,mkRange "file" p1 p1) - | FSharpTokenizerColorState.SingleLineComment -> LexCont.SingleLineComment (ifd,n1,mkRange "file" p1 p1) - | FSharpTokenizerColorState.StringInComment -> LexCont.StringInComment (ifd,n1,mkRange "file" p1 p1) - | FSharpTokenizerColorState.VerbatimStringInComment -> LexCont.VerbatimStringInComment (ifd,n1,mkRange "file" p1 p1) - | FSharpTokenizerColorState.TripleQuoteStringInComment -> LexCont.TripleQuoteStringInComment (ifd,n1,mkRange "file" p1 p1) - | FSharpTokenizerColorState.CamlOnly -> LexCont.MLOnly (ifd,mkRange "file" p1 p1) - | FSharpTokenizerColorState.VerbatimString -> LexCont.VerbatimString (ifd,mkRange "file" p1 p1) - | FSharpTokenizerColorState.TripleQuoteString -> LexCont.TripleQuoteString (ifd,mkRange "file" p1 p1) - | FSharpTokenizerColorState.EndLineThenSkip -> LexCont.EndLine(LexerEndlineContinuation.Skip(ifd,n1,mkRange "file" p1 p1)) + | FSharpTokenizerColorState.IfDefSkip -> LexCont.IfDefSkip (ifd, n1, mkRange "file" p1 p1) + | FSharpTokenizerColorState.String -> LexCont.String (ifd, mkRange "file" p1 p1) + | FSharpTokenizerColorState.Comment -> LexCont.Comment (ifd, n1, mkRange "file" p1 p1) + | FSharpTokenizerColorState.SingleLineComment -> LexCont.SingleLineComment (ifd, n1, mkRange "file" p1 p1) + | FSharpTokenizerColorState.StringInComment -> LexCont.StringInComment (ifd, n1, mkRange "file" p1 p1) + | FSharpTokenizerColorState.VerbatimStringInComment -> LexCont.VerbatimStringInComment (ifd, n1, mkRange "file" p1 p1) + | FSharpTokenizerColorState.TripleQuoteStringInComment -> LexCont.TripleQuoteStringInComment (ifd, n1, mkRange "file" p1 p1) + | FSharpTokenizerColorState.CamlOnly -> LexCont.MLOnly (ifd, mkRange "file" p1 p1) + | FSharpTokenizerColorState.VerbatimString -> LexCont.VerbatimString (ifd, mkRange "file" p1 p1) + | FSharpTokenizerColorState.TripleQuoteString -> LexCont.TripleQuoteString (ifd, mkRange "file" p1 p1) + | FSharpTokenizerColorState.EndLineThenSkip -> LexCont.EndLine(LexerEndlineContinuation.Skip(ifd, n1, mkRange "file" p1 p1)) | FSharpTokenizerColorState.EndLineThenToken -> LexCont.EndLine(LexerEndlineContinuation.Token(ifd)) | _ -> LexCont.Token [] - lightSyntaxStatusInital,lexcont + lightSyntaxStatusInital, lexcont let callLexCont lexcont args skip lexbuf = let argsWithIfDefs ifd = @@ -474,18 +474,18 @@ module internal LexerStateEncoding = match lexcont with | LexCont.EndLine cont -> Lexer.endline cont args skip lexbuf | LexCont.Token ifd -> Lexer.token (argsWithIfDefs ifd) skip lexbuf - | LexCont.IfDefSkip (ifd,n,m) -> Lexer.ifdefSkip n m (argsWithIfDefs ifd) skip lexbuf + | LexCont.IfDefSkip (ifd, n, m) -> Lexer.ifdefSkip n m (argsWithIfDefs ifd) skip lexbuf // Q: What's this magic 100 number for? Q: it's just an initial buffer size. - | LexCont.String (ifd,m) -> Lexer.string (ByteBuffer.Create 100,defaultStringFinisher,m,(argsWithIfDefs ifd)) skip lexbuf - | LexCont.Comment (ifd,n,m) -> Lexer.comment (n,m,(argsWithIfDefs ifd)) skip lexbuf + | LexCont.String (ifd, m) -> Lexer.string (ByteBuffer.Create 100, defaultStringFinisher, m, (argsWithIfDefs ifd)) skip lexbuf + | LexCont.Comment (ifd, n, m) -> Lexer.comment (n, m, (argsWithIfDefs ifd)) skip lexbuf // The first argument is 'None' because we don't need XML comments when called from VS - | LexCont.SingleLineComment (ifd,n,m) -> Lexer.singleLineComment (None,n,m,(argsWithIfDefs ifd)) skip lexbuf - | LexCont.StringInComment (ifd,n,m) -> Lexer.stringInComment n m (argsWithIfDefs ifd) skip lexbuf - | LexCont.VerbatimStringInComment (ifd,n,m) -> Lexer.verbatimStringInComment n m (argsWithIfDefs ifd) skip lexbuf - | LexCont.TripleQuoteStringInComment (ifd,n,m) -> Lexer.tripleQuoteStringInComment n m (argsWithIfDefs ifd) skip lexbuf - | LexCont.MLOnly (ifd,m) -> Lexer.mlOnly m (argsWithIfDefs ifd) skip lexbuf - | LexCont.VerbatimString (ifd,m) -> Lexer.verbatimString (ByteBuffer.Create 100,defaultStringFinisher,m,(argsWithIfDefs ifd)) skip lexbuf - | LexCont.TripleQuoteString (ifd,m) -> Lexer.tripleQuoteString (ByteBuffer.Create 100,defaultStringFinisher,m,(argsWithIfDefs ifd)) skip lexbuf + | LexCont.SingleLineComment (ifd, n, m) -> Lexer.singleLineComment (None, n, m, (argsWithIfDefs ifd)) skip lexbuf + | LexCont.StringInComment (ifd, n, m) -> Lexer.stringInComment n m (argsWithIfDefs ifd) skip lexbuf + | LexCont.VerbatimStringInComment (ifd, n, m) -> Lexer.verbatimStringInComment n m (argsWithIfDefs ifd) skip lexbuf + | LexCont.TripleQuoteStringInComment (ifd, n, m) -> Lexer.tripleQuoteStringInComment n m (argsWithIfDefs ifd) skip lexbuf + | LexCont.MLOnly (ifd, m) -> Lexer.mlOnly m (argsWithIfDefs ifd) skip lexbuf + | LexCont.VerbatimString (ifd, m) -> Lexer.verbatimString (ByteBuffer.Create 100, defaultStringFinisher, m, (argsWithIfDefs ifd)) skip lexbuf + | LexCont.TripleQuoteString (ifd, m) -> Lexer.tripleQuoteString (ByteBuffer.Create 100, defaultStringFinisher, m, (argsWithIfDefs ifd)) skip lexbuf //---------------------------------------------------------------------------- // Colorization @@ -500,9 +500,9 @@ type SingleLineTokenState = /// Split a line into tokens and attach information about the tokens. This information is used by Visual Studio. [] -type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, +type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, maxLength: int option, - filename : Option, + filename : Option, lexArgsLightOn : lexargs, lexArgsLightOff : lexargs ) = @@ -528,7 +528,7 @@ type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, let delayToken tok = tokenStack.Push(tok) // Process: anywhite* # - let processDirective (str:string) directiveLength delay cont = + let processDirective (str: string) directiveLength delay cont = #if FABLE_COMPILER let hashIdx = str.IndexOf("#") #else @@ -539,7 +539,7 @@ type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, hashIdx + directiveLength + 1 // Process: anywhite* ("//" [^'\n''\r']*)? - let processWhiteAndComment (str:string) offset delay cont = + let processWhiteAndComment (str: string) offset delay cont = let rest = str.Substring(offset, str.Length - offset) let comment = rest.IndexOf('/') let spaceLength = if comment = -1 then rest.Length else comment @@ -556,7 +556,7 @@ type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, // Split the following line: // anywhite* ("#else"|"#endif") anywhite* ("//" [^'\n''\r']*)? - let processHashEndElse ofs (str:string) length cont = + let processHashEndElse ofs (str: string) length cont = processDirectiveLine ofs (fun delay -> // Process: anywhite* "#else" / anywhite* "#endif" let offset = processDirective str length delay cont @@ -565,7 +565,7 @@ type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, // Split the following line: // anywhite* "#if" anywhite+ ident anywhite* ("//" [^'\n''\r']*)? - let processHashIfLine ofs (str:string) cont = + let processHashIfLine ofs (str: string) cont = let With n m = if (n < 0) then m else n processDirectiveLine ofs (fun delay -> // Process: anywhite* "#if" @@ -597,7 +597,7 @@ type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, use unwindEL = PushErrorLoggerPhaseUntilUnwind (fun _ -> DiscardErrorsLogger) let lightSyntaxStatusInital, lexcontInitial = LexerStateEncoding.decodeLexInt lexintInitial - let lightSyntaxStatus = LightSyntaxStatus(lightSyntaxStatusInital,false) + let lightSyntaxStatus = LightSyntaxStatus(lightSyntaxStatusInital, false) // Build the arguments to the lexer function let lexargs = if lightSyntaxStatusInital then lexArgsLightOn else lexArgsLightOff @@ -613,7 +613,7 @@ type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, | Some mx when rightp.Line > leftp.Line -> mx | _ -> rightp.Column let rightc = rightc - 1 - leftc,rightc + leftc, rightc // Get the token & position - either from a stack or from the lexer try @@ -634,10 +634,10 @@ type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, false, processHashEndElse m.StartColumn lineStr 4 cont | HASH_ENDIF(m, lineStr, cont) when lineStr <> "" -> false, processHashEndElse m.StartColumn lineStr 5 cont - | RQUOTE_DOT (s,raw) -> + | RQUOTE_DOT (s, raw) -> delayToken(DOT, rightc, rightc) - false, (RQUOTE (s,raw), leftc, rightc - 1) - | INFIX_COMPARE_OP (LexFilter.TyparsCloseOp(greaters,afterOp) as opstr) -> + false, (RQUOTE (s, raw), leftc, rightc - 1) + | INFIX_COMPARE_OP (LexFilter.TyparsCloseOp(greaters, afterOp) as opstr) -> match afterOp with | None -> () | Some tok -> delayToken(tok, leftc + greaters.Length, rightc) @@ -687,25 +687,26 @@ type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, match token with | EOF lexcont -> // End of text! No more tokens. - None,lexcont,0 + None, lexcont, 0 | LEX_FAILURE _ -> None, LexerStateEncoding.revertToDefaultLexCont, 0 | _ -> // Get the information about the token - let (colorClass,charClass,triggerClass) = TokenClassifications.tokenInfo token + let (colorClass, charClass, triggerClass) = TokenClassifications.tokenInfo token let lexcontFinal = // If we're using token from cache, we don't move forward with lexing if isCached then lexcontInitial else LexerStateEncoding.computeNextLexState token lexcontInitial let tokenTag = tagOfToken token let fullMatchedLength = lexbuf.EndPos.AbsoluteOffset - lexbuf.StartPos.AbsoluteOffset - let tokenData = { TokenName = token_to_string token; - LeftColumn=leftc; - RightColumn=rightc; - ColorClass=colorClass; - CharClass=charClass; - FSharpTokenTriggerClass=triggerClass; - Tag=tokenTag; - FullMatchedLength=fullMatchedLength} + let tokenData = + { TokenName = token_to_string token + LeftColumn=leftc + RightColumn=rightc + ColorClass=colorClass + CharClass=charClass + FSharpTokenTriggerClass=triggerClass + Tag=tokenTag + FullMatchedLength=fullMatchedLength} Some(tokenData), lexcontFinal, tokenTag // Get the final lex int and color state @@ -713,7 +714,7 @@ type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, LexerStateEncoding.encodeLexInt lightSyntaxStatus.Status lexcontFinal // Check for patterns like #-IDENT and see if they look like meta commands for .fsx files. If they do then merge them into a single token. - let tokenDataOption,lexintFinal = + let tokenDataOption, lexintFinal = let lexintFinal = FinalState(lexcontFinal) match tokenDataOption, singleLineTokenState, tokenTagToTokenId tokenTag with | Some(tokenData), SingleLineTokenState.BeforeHash, TOKEN_HASH -> @@ -723,40 +724,40 @@ type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, let isCached, (nextToken, _, rightc) = GetTokenWithPosition(lexcontInitial) match nextToken with | IDENT possibleMetacommand -> - match fsx,possibleMetacommand with + match fsx, possibleMetacommand with // These are for script (.fsx and .fsscript) files. - | true,"r" - | true,"reference" - | true,"I" - | true,"load" - | true,"time" - | true,"dbgbreak" - | true,"cd" + | true, "r" + | true, "reference" + | true, "I" + | true, "load" + | true, "time" + | true, "dbgbreak" + | true, "cd" #if DEBUG - | true,"terms" - | true,"types" - | true,"savedll" - | true,"nosavedll" + | true, "terms" + | true, "types" + | true, "savedll" + | true, "nosavedll" #endif - | true,"silentCd" - | true,"q" - | true,"quit" - | true,"help" + | true, "silentCd" + | true, "q" + | true, "quit" + | true, "help" // These are for script and non-script - | _,"nowarn" -> + | _, "nowarn" -> // Merge both tokens into one. let lexcontFinal = if (isCached) then lexcontInitial else LexerStateEncoding.computeNextLexState token lexcontInitial let tokenData = {tokenData with RightColumn=rightc;ColorClass=FSharpTokenColorKind.PreprocessorKeyword;CharClass=FSharpTokenCharKind.Keyword;FSharpTokenTriggerClass=FSharpTokenTriggerClass.None} let lexintFinal = FinalState(lexcontFinal) - Some(tokenData),lexintFinal - | _ -> tokenDataOption,lexintFinal - | _ -> tokenDataOption,lexintFinal + Some(tokenData), lexintFinal + | _ -> tokenDataOption, lexintFinal + | _ -> tokenDataOption, lexintFinal | _, SingleLineTokenState.BeforeHash, TOKEN_WHITESPACE -> // Allow leading whitespace. - tokenDataOption,lexintFinal + tokenDataOption, lexintFinal | _ -> singleLineTokenState <- SingleLineTokenState.NoFurtherMatchPossible - tokenDataOption,lexintFinal + tokenDataOption, lexintFinal tokenDataOption, lexintFinal @@ -770,8 +771,8 @@ type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, type FSharpSourceTokenizer(defineConstants : string list, filename : string option) = let lexResourceManager = new Lexhelp.LexResourceManager() - let lexArgsLightOn = mkLexargs(filename,defineConstants,LightSyntaxStatus(true,false),lexResourceManager, ref [],DiscardErrorsLogger) - let lexArgsLightOff = mkLexargs(filename,defineConstants,LightSyntaxStatus(false,false),lexResourceManager, ref [],DiscardErrorsLogger) + let lexArgsLightOn = mkLexargs(filename, defineConstants, LightSyntaxStatus(true, false), lexResourceManager, ref [], DiscardErrorsLogger) + let lexArgsLightOff = mkLexargs(filename, defineConstants, LightSyntaxStatus(false, false), lexResourceManager, ref [], DiscardErrorsLogger) member this.CreateLineTokenizer(lineText: string) = let lexbuf = UnicodeLexing.StringAsLexbuf lineText diff --git a/src/fcs-fable/src/fsharp/service/ServiceStructure.fs b/src/fcs-fable/src/fsharp/service/ServiceStructure.fs index 8c25bee2a1..e235b90a69 100644 --- a/src/fcs-fable/src/fsharp/service/ServiceStructure.fs +++ b/src/fcs-fable/src/fsharp/service/ServiceStructure.fs @@ -47,14 +47,14 @@ module Structure = | [] -> range0 | head::_ -> Range.startToEnd head.idRange (List.last longId).idRange - /// Caclulate the range of the provided type arguments (<'a,...,'z>) + /// Caclulate the range of the provided type arguments (<'a, ..., 'z>) /// or return the range `other` when `typeArgs` = [] let rangeOfTypeArgsElse other (typeArgs:SynTyparDecl list) = match typeArgs with | [] -> other | ls -> ls - |> List.map (fun (TyparDecl (_,typarg)) -> typarg.Range) + |> List.map (fun (TyparDecl (_, typarg)) -> typarg.Range) |> List.reduce unionRanges let rangeOfSynPatsElse other (synPats:SynSimplePat list) = @@ -218,34 +218,34 @@ module Structure = let rec parseExpr expression = match expression with - | SynExpr.Upcast (e,_,_) - | SynExpr.Downcast (e,_,_) - | SynExpr.AddressOf(_,e,_,_) - | SynExpr.InferredDowncast (e,_) - | SynExpr.InferredUpcast (e,_) - | SynExpr.DotGet (e,_,_,_) - | SynExpr.Do (e,_) - | SynExpr.Typed (e,_,_) - | SynExpr.DotIndexedGet (e,_,_,_) -> + | SynExpr.Upcast (e, _, _) + | SynExpr.Downcast (e, _, _) + | SynExpr.AddressOf(_, e, _, _) + | SynExpr.InferredDowncast (e, _) + | SynExpr.InferredUpcast (e, _) + | SynExpr.DotGet (e, _, _, _) + | SynExpr.Do (e, _) + | SynExpr.Typed (e, _, _) + | SynExpr.DotIndexedGet (e, _, _, _) -> parseExpr e - | SynExpr.Set (e1,e2,_) - | SynExpr.DotSet (e1,_,e2,_) - | SynExpr.DotIndexedSet (e1,_,e2,_,_,_) -> + | SynExpr.Set (e1, e2, _) + | SynExpr.DotSet (e1, _, e2, _) + | SynExpr.DotIndexedSet (e1, _, e2, _, _, _) -> parseExpr e1 parseExpr e2 - | SynExpr.New (_,_,expr,r) -> + | SynExpr.New (_, _, expr, r) -> rcheck Scope.New Collapse.Below r expr.Range parseExpr expr - | SynExpr.YieldOrReturn (_,e,r) -> + | SynExpr.YieldOrReturn (_, e, r) -> rcheck Scope.YieldOrReturn Collapse.Below r r parseExpr e - | SynExpr.YieldOrReturnFrom (_,e,r) -> + | SynExpr.YieldOrReturnFrom (_, e, r) -> rcheck Scope.YieldOrReturnBang Collapse.Below r r parseExpr e - | SynExpr.DoBang (e,r) -> + | SynExpr.DoBang (e, r) -> rcheck Scope.Do Collapse.Below r <| Range.modStart 3 r parseExpr e - | SynExpr.LetOrUseBang (_,_,_,pat,e1,e2,_) -> + | SynExpr.LetOrUseBang (_, _, _, pat, e1, e2, _) -> // for `let!` or `use!` the pattern begins at the end of the keyword so that // this scope can be used without adjustment if there is no `=` on the same line // if there is an `=` the range will be adjusted during the tooltip creation @@ -253,14 +253,14 @@ module Structure = rcheck Scope.LetOrUseBang Collapse.Below r r parseExpr e1 parseExpr e2 - | SynExpr.For (_,_,_,_,_,e,r) - | SynExpr.ForEach (_,_,_,_,_,e,r) -> + | SynExpr.For (_, _, _, _, _, e, r) + | SynExpr.ForEach (_, _, _, _, _, e, r) -> rcheck Scope.For Collapse.Below r r parseExpr e - | SynExpr.LetOrUse (_,_,bindings, body, _) -> + | SynExpr.LetOrUse (_, _, bindings, body, _) -> parseBindings bindings parseExpr body - | SynExpr.Match (seqPointAtBinding,_expr,clauses,r) + | SynExpr.Match (seqPointAtBinding, _expr, clauses, r) | SynExpr.MatchBang (seqPointAtBinding, _expr, clauses, r) -> match seqPointAtBinding with | SequencePointAtBinding sr -> @@ -268,7 +268,7 @@ module Structure = rcheck Scope.Match Collapse.Same r collapse | _ -> () List.iter parseMatchClause clauses - | SynExpr.MatchLambda (_,caseRange,clauses,matchSeqPoint,r) -> + | SynExpr.MatchLambda (_, caseRange, clauses, matchSeqPoint, r) -> let caseRange = match matchSeqPoint with | SequencePointAtBinding r -> r @@ -276,7 +276,7 @@ module Structure = let collapse = Range.endToEnd caseRange r rcheck Scope.MatchLambda Collapse.Same r collapse List.iter parseMatchClause clauses - | SynExpr.App (atomicFlag,isInfix,funcExpr,argExpr,r) -> + | SynExpr.App (atomicFlag, isInfix, funcExpr, argExpr, r) -> // seq exprs, custom operators, etc if ExprAtomicFlag.NonAtomic=atomicFlag && (not isInfix) && (function SynExpr.Ident _ -> true | _ -> false) funcExpr @@ -291,17 +291,17 @@ module Structure = rcheck Scope.CompExpr Collapse.Same r <| Range.modBoth 1 1 collapse parseExpr argExpr parseExpr funcExpr - | SynExpr.Sequential (_,_,e1,e2,_) -> + | SynExpr.Sequential (_, _, e1, e2, _) -> parseExpr e1 parseExpr e2 - | SynExpr.ArrayOrListOfSeqExpr (isArray,e,r) -> + | SynExpr.ArrayOrListOfSeqExpr (isArray, e, r) -> rcheck Scope.ArrayOrList Collapse.Same r <| Range.modBoth (if isArray then 2 else 1) (if isArray then 2 else 1) r parseExpr e - | SynExpr.CompExpr (_arrayOrList,_,e,_r) as _c -> + | SynExpr.CompExpr (_arrayOrList, _, e, _r) as _c -> parseExpr e - | SynExpr.ObjExpr (_,argOpt,bindings,extraImpls,newRange,wholeRange) as _objExpr -> + | SynExpr.ObjExpr (_, argOpt, bindings, extraImpls, newRange, wholeRange) as _objExpr -> match argOpt with - | Some (args,_) -> + | Some (args, _) -> let collapse = Range.endToEnd args.Range wholeRange rcheck Scope.ObjExpr Collapse.Below wholeRange collapse | None -> @@ -309,7 +309,7 @@ module Structure = rcheck Scope.ObjExpr Collapse.Below wholeRange collapse parseBindings bindings parseExprInterfaces extraImpls - | SynExpr.TryWith (e,_,matchClauses,_,wholeRange,tryPoint,withPoint) -> + | SynExpr.TryWith (e, _, matchClauses, _, wholeRange, tryPoint, withPoint) -> match tryPoint, withPoint with | SequencePointAtTry tryRange, SequencePointAtWith withRange -> let fullrange = Range.startToEnd tryRange wholeRange @@ -324,7 +324,7 @@ module Structure = | _ -> () parseExpr e List.iter parseMatchClause matchClauses - | SynExpr.TryFinally (tryExpr,finallyExpr,r,tryPoint,finallyPoint) -> + | SynExpr.TryFinally (tryExpr, finallyExpr, r, tryPoint, finallyPoint) -> match tryPoint, finallyPoint with | SequencePointAtTry tryRange, SequencePointAtFinally finallyRange -> let collapse = Range.endToEnd tryRange finallyExpr.Range @@ -336,7 +336,7 @@ module Structure = | _ -> () parseExpr tryExpr parseExpr finallyExpr - | SynExpr.IfThenElse (ifExpr,thenExpr,elseExprOpt,spIfToThen,_,ifToThenRange,r) -> + | SynExpr.IfThenElse (ifExpr, thenExpr, elseExprOpt, spIfToThen, _, ifToThenRange, r) -> match spIfToThen with | SequencePointAtBinding rt -> // Outline the entire IfThenElse @@ -362,40 +362,40 @@ module Structure = // a suitable approach is determined parseExpr elseExpr | None -> () - | SynExpr.While (_,_,e,r) -> + | SynExpr.While (_, _, e, r) -> rcheck Scope.While Collapse.Below r r parseExpr e - | SynExpr.Lambda (_,_,pats,e,r) -> + | SynExpr.Lambda (_, _, pats, e, r) -> match pats with - | SynSimplePats.SimplePats (_,pr) - | SynSimplePats.Typed (_,_,pr) -> + | SynSimplePats.SimplePats (_, pr) + | SynSimplePats.Typed (_, _, pr) -> rcheck Scope.Lambda Collapse.Below r (Range.endToEnd pr r) parseExpr e - | SynExpr.Lazy (e,r) -> + | SynExpr.Lazy (e, r) -> rcheck Scope.SpecialFunc Collapse.Below r r parseExpr e - | SynExpr.Quote (_,isRaw,e,_,r) -> + | SynExpr.Quote (_, isRaw, e, _, r) -> // subtract columns so the @@> or @> is not collapsed rcheck Scope.Quote Collapse.Same r (Range.modBoth (if isRaw then 3 else 2) (if isRaw then 3 else 2) r) parseExpr e | SynExpr.Tuple (_, es, _, r) -> rcheck Scope.Tuple Collapse.Same r r List.iter parseExpr es - | SynExpr.Paren (e,_,_,_) -> + | SynExpr.Paren (e, _, _, _) -> parseExpr e - | SynExpr.Record (recCtor,recCopy,recordFields,r) -> + | SynExpr.Record (recCtor, recCopy, recordFields, r) -> match recCtor with - | Some (_,ctorArgs,_,_,_) -> parseExpr ctorArgs + | Some (_, ctorArgs, _, _, _) -> parseExpr ctorArgs | _ -> () match recCopy with - | Some (e,_) -> parseExpr e + | Some (e, _) -> parseExpr e | _ -> () - recordFields |> List.choose (fun (_,e,_) -> e) |> List.iter parseExpr + recordFields |> List.choose (fun (_, e, _) -> e) |> List.iter parseExpr // exclude the opening `{` and closing `}` of the record from collapsing rcheck Scope.Record Collapse.Same r <| Range.modBoth 1 1 r | _ -> () - and parseMatchClause (SynMatchClause.Clause(synPat,_,e,_r,_) as clause) = + and parseMatchClause (SynMatchClause.Clause(synPat, _, e, _r, _) as clause) = let rec getLastPat = function | SynPat.Or(_, pat, _) -> getLastPat pat | x -> x @@ -426,7 +426,7 @@ module Structure = for attr in attrs do parseExpr attr.ArgExpr - and parseBinding (SynBinding.Binding (_,kind,_,_,attrs,_,SynValData(memberFlags,_,_),_,_,expr,br,_) as binding) = + and parseBinding (SynBinding.Binding (_, kind, _, _, attrs, _, SynValData(memberFlags, _, _), _, _, expr, br, _) as binding) = match kind with | NormalBinding -> let collapse = Range.endToEnd binding.RangeOfBindingSansRhs binding.RangeOfBindingAndRhs @@ -447,7 +447,7 @@ module Structure = and parseBindings sqs = for bind in sqs do parseBinding bind - and parseExprInterface (InterfaceImpl(synType,bindings,range)) = + and parseExprInterface (InterfaceImpl(synType, bindings, range)) = let collapse = Range.endToEnd synType.Range range |> Range.modEnd -1 rcheck Scope.Interface Collapse.Below range collapse parseBindings bindings @@ -456,12 +456,12 @@ module Structure = and parseSynMemberDefn (objectModelRange: range) d = match d with - | SynMemberDefn.Member(SynBinding.Binding (attrs=attrs; valData=valData; headPat=synPat; range=bindingRange) as binding,_) -> + | SynMemberDefn.Member(SynBinding.Binding (attrs=attrs; valData=valData; headPat=synPat; range=bindingRange) as binding, _) -> match valData with - | SynValData (Some { MemberKind=MemberKind.Constructor },_,_) -> + | SynValData (Some { MemberKind=MemberKind.Constructor }, _, _) -> let collapse = Range.endToEnd synPat.Range d.Range rcheck Scope.New Collapse.Below d.Range collapse - | SynValData (Some { MemberKind=MemberKind.PropertyGet | MemberKind.PropertySet },_,_) -> + | SynValData (Some { MemberKind=MemberKind.PropertyGet | MemberKind.PropertySet }, _, _) -> let range = mkRange d.Range.FileName @@ -480,7 +480,7 @@ module Structure = rcheck Scope.Member Collapse.Below d.Range collapse parseAttributes attrs parseBinding binding - | SynMemberDefn.LetBindings (bindings,_,_,_) -> + | SynMemberDefn.LetBindings (bindings, _, _, _) -> parseBindings bindings | SynMemberDefn.Interface (tp, iMembers, r) -> rcheck Scope.Interface Collapse.Below d.Range (Range.endToEnd tp.Range d.Range) @@ -508,23 +508,23 @@ module Structure = *) and parseSimpleRepr simple = match simple with - | SynTypeDefnSimpleRepr.Enum (cases,_er) -> + | SynTypeDefnSimpleRepr.Enum (cases, _er) -> for EnumCase (attrs, _, _, _, cr) in cases do rcheck Scope.EnumCase Collapse.Below cr cr parseAttributes attrs - | SynTypeDefnSimpleRepr.Record (_,fields,rr) -> + | SynTypeDefnSimpleRepr.Record (_, fields, rr) -> rcheck Scope.RecordDefn Collapse.Same rr rr - for Field (attrs,_,_,_,_,_,_,fr) in fields do + for Field (attrs, _, _, _, _, _, _, fr) in fields do rcheck Scope.RecordField Collapse.Below fr fr parseAttributes attrs - | SynTypeDefnSimpleRepr.Union (_,cases,ur) -> + | SynTypeDefnSimpleRepr.Union (_, cases, ur) -> rcheck Scope.UnionDefn Collapse.Same ur ur - for UnionCase (attrs,_,_,_,_,cr) in cases do + for UnionCase (attrs, _, _, _, _, cr) in cases do rcheck Scope.UnionCase Collapse.Below cr cr parseAttributes attrs | _ -> () - and parseTypeDefn (TypeDefn(ComponentInfo(_,typeArgs,_,_,_,_,_,r), objectModel, members, fullrange)) = + and parseTypeDefn (TypeDefn(ComponentInfo(_, typeArgs, _, _, _, _, _, r), objectModel, members, fullrange)) = let typeArgsRange = rangeOfTypeArgsElse r typeArgs let collapse = Range.endToEnd (Range.modEnd 1 typeArgsRange) fullrange match objectModel with @@ -580,23 +580,23 @@ module Structure = let collectHashDirectives = getConsecutiveModuleDecls( function - | SynModuleDecl.HashDirective (ParsedHashDirective (directive, _, _),r) -> + | SynModuleDecl.HashDirective (ParsedHashDirective (directive, _, _), r) -> let prefixLength = "#".Length + directive.Length + " ".Length Some (mkRange "" (mkPos r.StartLine prefixLength) r.End) | _ -> None) Scope.HashDirective let rec parseDeclaration (decl: SynModuleDecl) = match decl with - | SynModuleDecl.Let (_,bindings,r) -> + | SynModuleDecl.Let (_, bindings, r) -> for binding in bindings do let collapse = Range.endToEnd binding.RangeOfBindingSansRhs r rcheck Scope.LetOrUse Collapse.Below r collapse parseBindings bindings - | SynModuleDecl.Types (types,_r) -> + | SynModuleDecl.Types (types, _r) -> for t in types do parseTypeDefn t // Fold the attributes above a module - | SynModuleDecl.NestedModule (ComponentInfo (attrs,_,_,_,_,_,_,cmpRange),_, decls,_,_) -> + | SynModuleDecl.NestedModule (ComponentInfo (attrs, _, _, _, _, _, _, cmpRange), _, decls, _, _) -> // Outline the full scope of the module let r = Range.endToEnd cmpRange decl.Range rcheck Scope.Module Collapse.Below decl.Range r @@ -604,13 +604,13 @@ module Structure = parseAttributes attrs collectOpens decls List.iter parseDeclaration decls - | SynModuleDecl.DoExpr (_,e,_) -> + | SynModuleDecl.DoExpr (_, e, _) -> parseExpr e - | SynModuleDecl.Attributes (attrs,_) -> + | SynModuleDecl.Attributes (attrs, _) -> parseAttributes attrs | _ -> () - let parseModuleOrNamespace (SynModuleOrNamespace (longId,_,kind,decls,_,attribs,_,r)) = + let parseModuleOrNamespace (SynModuleOrNamespace (longId, _, kind, decls, _, attribs, _, r)) = parseAttributes attribs let idRange = longIdentRange longId let fullrange = Range.startToEnd idRange r @@ -708,7 +708,7 @@ module Structure = match typeSigs with | [] -> range | ls -> - let (TypeDefnSig(_,_,memberSigs,r)) = List.last ls + let (TypeDefnSig(_, _, memberSigs, r)) = List.last ls lastMemberSigRangeElse r memberSigs let lastModuleSigDeclRangeElse range (sigDecls:SynModuleSigDecls) = @@ -716,28 +716,28 @@ module Structure = | [] -> range | ls -> match List.last ls with - | SynModuleSigDecl.Types (typeSigs,r) -> lastTypeDefnSigRangeElse r typeSigs - | SynModuleSigDecl.Val (ValSpfn(range=r),_) -> r - | SynModuleSigDecl.Exception(_,r) -> r - | SynModuleSigDecl.Open(_,r) -> r - | SynModuleSigDecl.ModuleAbbrev(_,_,r) -> r + | SynModuleSigDecl.Types (typeSigs, r) -> lastTypeDefnSigRangeElse r typeSigs + | SynModuleSigDecl.Val (ValSpfn(range=r), _) -> r + | SynModuleSigDecl.Exception(_, r) -> r + | SynModuleSigDecl.Open(_, r) -> r + | SynModuleSigDecl.ModuleAbbrev(_, _, r) -> r | _ -> range let rec parseSynMemberDefnSig = function - | SynMemberSig.Member(valSigs,_,r) -> + | SynMemberSig.Member(valSigs, _, r) -> let collapse = Range.endToEnd valSigs.RangeOfId r rcheck Scope.Member Collapse.Below r collapse - | SynMemberSig.ValField(Field(attrs,_,_,_,_,_,_,fr),fullrange) -> + | SynMemberSig.ValField(Field(attrs, _, _, _, _, _, _, fr), fullrange) -> let collapse = Range.endToEnd fr fullrange rcheck Scope.Val Collapse.Below fullrange collapse parseAttributes attrs - | SynMemberSig.Interface(tp,r) -> + | SynMemberSig.Interface(tp, r) -> rcheck Scope.Interface Collapse.Below r (Range.endToEnd tp.Range r) | SynMemberSig.NestedType (typeDefSig, _r) -> parseTypeDefnSig typeDefSig | _ -> () - and parseTypeDefnSig (TypeDefnSig (ComponentInfo(attribs,typeArgs,_,longId,_,_,_,r) as __, objectModel, memberSigs, _)) = + and parseTypeDefnSig (TypeDefnSig (ComponentInfo(attribs, typeArgs, _, longId, _, _, _, r) as __, objectModel, memberSigs, _)) = parseAttributes attribs let makeRanges memberSigs = @@ -750,23 +750,23 @@ module Structure = List.iter parseSynMemberDefnSig memberSigs match objectModel with - // matches against a type declaration with <'T,...> and (args,...) + // matches against a type declaration with <'T, ...> and (args, ...) | SynTypeDefnSigRepr.ObjectModel (TyconUnspecified, objMembers, _) -> List.iter parseSynMemberDefnSig objMembers - let fullrange,collapse = makeRanges objMembers + let fullrange, collapse = makeRanges objMembers rcheck Scope.Type Collapse.Below fullrange collapse | SynTypeDefnSigRepr.ObjectModel (TyconAugmentation, objMembers, _) -> - let fullrange,collapse = makeRanges objMembers + let fullrange, collapse = makeRanges objMembers rcheck Scope.TypeExtension Collapse.Below fullrange collapse List.iter parseSynMemberDefnSig objMembers | SynTypeDefnSigRepr.ObjectModel (_, objMembers, _) -> - let fullrange,collapse = makeRanges objMembers + let fullrange, collapse = makeRanges objMembers rcheck Scope.Type Collapse.Below fullrange collapse List.iter parseSynMemberDefnSig objMembers // visit the members of a type extension | SynTypeDefnSigRepr.Simple (simpleRepr, _) -> - let fullrange,collapse = makeRanges memberSigs + let fullrange, collapse = makeRanges memberSigs rcheck Scope.Type Collapse.Below fullrange collapse parseSimpleRepr simpleRepr | SynTypeDefnSigRepr.Exception _ -> () @@ -810,18 +810,18 @@ module Structure = Some (mkRange "" (mkPos r.StartLine prefixLength) r.End) | _ -> None) Scope.HashDirective - let collectSigOpens = getConsecutiveSigModuleDecls (function SynModuleSigDecl.Open (_,r) -> Some r | _ -> None) Scope.Open + let collectSigOpens = getConsecutiveSigModuleDecls (function SynModuleSigDecl.Open (_, r) -> Some r | _ -> None) Scope.Open let rec parseModuleSigDeclaration (decl: SynModuleSigDecl) = match decl with - | SynModuleSigDecl.Val ((ValSpfn(attrs,ident,_,_,_,_,_,_,_,_,valrange)),r) -> + | SynModuleSigDecl.Val ((ValSpfn(attrs, ident, _, _, _, _, _, _, _, _, valrange)), r) -> let collapse = Range.endToEnd ident.idRange valrange rcheck Scope.Val Collapse.Below r collapse parseAttributes attrs - | SynModuleSigDecl.Types (typeSigs,_) -> + | SynModuleSigDecl.Types (typeSigs, _) -> List.iter parseTypeDefnSig typeSigs // Fold the attributes above a module - | SynModuleSigDecl.NestedModule (ComponentInfo (attrs,_,_,_,_,_,_,cmpRange),_,decls,moduleRange) -> + | SynModuleSigDecl.NestedModule (ComponentInfo (attrs, _, _, _, _, _, _, cmpRange), _, decls, moduleRange) -> let rangeEnd = lastModuleSigDeclRangeElse moduleRange decls // Outline the full scope of the module let collapse = Range.endToEnd cmpRange rangeEnd @@ -833,7 +833,7 @@ module Structure = List.iter parseModuleSigDeclaration decls | _ -> () - let parseModuleOrNamespaceSigs (SynModuleOrNamespaceSig(longId,_,kind,decls,_,attribs,_,r)) = + let parseModuleOrNamespaceSigs (SynModuleOrNamespaceSig(longId, _, kind, decls, _, attribs, _, r)) = parseAttributes attribs let rangeEnd = lastModuleSigDeclRangeElse r decls let idrange = longIdentRange longId diff --git a/src/fcs-fable/src/fsharp/service/ServiceUntypedParse.fs b/src/fcs-fable/src/fsharp/service/ServiceUntypedParse.fs index dc68ed8593..0bbdf9503d 100755 --- a/src/fcs-fable/src/fsharp/service/ServiceUntypedParse.fs +++ b/src/fcs-fable/src/fsharp/service/ServiceUntypedParse.fs @@ -29,16 +29,16 @@ module SourceFile = /// Whether or not this file is compilable let IsCompilable file = let ext = Path.GetExtension(file) - compilableExtensions |> List.exists(fun e->0 = String.Compare(e,ext,StringComparison.OrdinalIgnoreCase)) + compilableExtensions |> List.exists(fun e->0 = String.Compare(e, ext, StringComparison.OrdinalIgnoreCase)) /// Whether or not this file should be a single-file project let MustBeSingleFileProject file = let ext = Path.GetExtension(file) - singleFileProjectExtensions |> List.exists(fun e-> 0 = String.Compare(e,ext,StringComparison.OrdinalIgnoreCase)) + singleFileProjectExtensions |> List.exists(fun e-> 0 = String.Compare(e, ext, StringComparison.OrdinalIgnoreCase)) module SourceFileImpl = let IsInterfaceFile file = let ext = Path.GetExtension(file) - 0 = String.Compare(".fsi",ext,StringComparison.OrdinalIgnoreCase) + 0 = String.Compare(".fsi", ext, StringComparison.OrdinalIgnoreCase) /// Additional #defines that should be in place when editing a file in a file editor such as VS. let AdditionalDefinesForUseInEditor(isInteractive: bool) = @@ -97,7 +97,7 @@ type FSharpParseFileResults(errors: FSharpErrorInfo[], input: Ast.ParsedInput op member scope.FindNoteworthyParamInfoLocations(pos) = match input with - | Some(input) -> FSharpNoteworthyParamInfoLocations.Find(pos,input) + | Some(input) -> FSharpNoteworthyParamInfoLocations.Find(pos, input) | _ -> None /// Get declared items and the selected item at the specified location @@ -128,12 +128,12 @@ type FSharpParseFileResults(errors: FSharpErrorInfo[], input: Ast.ParsedInput op let walkWithSeqPt sp = [ match sp with SequencePointAtWith m -> yield! checkRange m | _ -> () ] let walkFinallySeqPt sp = [ match sp with SequencePointAtFinally m -> yield! checkRange m | _ -> () ] - let rec walkBind (Binding(_, _, _, _, _, _, SynValData(memFlagsOpt,_,_), synPat, _, synExpr, _, spInfo)) = + let rec walkBind (Binding(_, _, _, _, _, _, SynValData(memFlagsOpt, _, _), synPat, _, synExpr, _, spInfo)) = [ // Don't yield the binding sequence point if there are any arguments, i.e. we're defining a function or a method let isFunction = Option.isSome memFlagsOpt || match synPat with - | SynPat.LongIdent (_,_,_, SynConstructorArgs.Pats args,_,_) when not (List.isEmpty args) -> true + | SynPat.LongIdent (_, _, _, SynConstructorArgs.Pats args, _, _) when not (List.isEmpty args) -> true | _ -> false if not isFunction then yield! walkBindSeqPt spInfo @@ -143,13 +143,13 @@ type FSharpParseFileResults(errors: FSharpErrorInfo[], input: Ast.ParsedInput op and walkExprs es = List.collect (walkExpr false) es and walkBinds es = List.collect walkBind es and walkMatchClauses cl = - [ for (Clause(_,whenExpr,e,_,_)) in cl do + [ for (Clause(_, whenExpr, e, _, _)) in cl do match whenExpr with | Some e -> yield! walkExpr false e | _ -> () yield! walkExpr true e ] - and walkExprOpt (spAlways:bool) eOpt = [ match eOpt with Some e -> yield! walkExpr spAlways e | _ -> () ] + and walkExprOpt (spAlways: bool) eOpt = [ match eOpt with Some e -> yield! walkExpr spAlways e | _ -> () ] and IsBreakableExpression e = match e with @@ -162,7 +162,7 @@ type FSharpParseFileResults(errors: FSharpErrorInfo[], input: Ast.ParsedInput op // Determine the breakpoint locations for an expression. spAlways indicates we always // emit a breakpoint location for the expression unless it is a syntactic control flow construct - and walkExpr (spAlways:bool) e = + and walkExpr (spAlways: bool) e = let m = e.Range if not (isMatchRange m) then [] else [ if spAlways && IsBreakableExpression e then @@ -179,69 +179,69 @@ type FSharpParseFileResults(errors: FSharpErrorInfo[], input: Ast.ParsedInput op | SynExpr.Const _ -> () - | SynExpr.Quote(_,_,e,_,_) - | SynExpr.TypeTest (e,_,_) - | SynExpr.Upcast (e,_,_) - | SynExpr.AddressOf (_,e,_,_) - | SynExpr.CompExpr (_,_,e,_) - | SynExpr.ArrayOrListOfSeqExpr (_,e,_) - | SynExpr.Typed (e,_,_) - | SynExpr.FromParseError (e,_) - | SynExpr.DiscardAfterMissingQualificationAfterDot (e,_) - | SynExpr.Do (e,_) - | SynExpr.Assert (e,_) - | SynExpr.Fixed (e,_) - | SynExpr.DotGet (e,_,_,_) - | SynExpr.LongIdentSet (_,e,_) - | SynExpr.New (_,_,e,_) - | SynExpr.TypeApp (e,_,_,_,_,_,_) - | SynExpr.LibraryOnlyUnionCaseFieldGet (e,_,_,_) - | SynExpr.Downcast (e,_,_) - | SynExpr.InferredUpcast (e,_) - | SynExpr.InferredDowncast (e,_) + | SynExpr.Quote(_, _, e, _, _) + | SynExpr.TypeTest (e, _, _) + | SynExpr.Upcast (e, _, _) + | SynExpr.AddressOf (_, e, _, _) + | SynExpr.CompExpr (_, _, e, _) + | SynExpr.ArrayOrListOfSeqExpr (_, e, _) + | SynExpr.Typed (e, _, _) + | SynExpr.FromParseError (e, _) + | SynExpr.DiscardAfterMissingQualificationAfterDot (e, _) + | SynExpr.Do (e, _) + | SynExpr.Assert (e, _) + | SynExpr.Fixed (e, _) + | SynExpr.DotGet (e, _, _, _) + | SynExpr.LongIdentSet (_, e, _) + | SynExpr.New (_, _, e, _) + | SynExpr.TypeApp (e, _, _, _, _, _, _) + | SynExpr.LibraryOnlyUnionCaseFieldGet (e, _, _, _) + | SynExpr.Downcast (e, _, _) + | SynExpr.InferredUpcast (e, _) + | SynExpr.InferredDowncast (e, _) | SynExpr.Lazy (e, _) - | SynExpr.TraitCall(_,_,e,_) - | SynExpr.Paren(e,_,_,_) -> + | SynExpr.TraitCall(_, _, e, _) + | SynExpr.Paren(e, _, _, _) -> yield! walkExpr false e - | SynExpr.YieldOrReturn (_,e,_) - | SynExpr.YieldOrReturnFrom (_,e,_) - | SynExpr.DoBang (e,_) -> + | SynExpr.YieldOrReturn (_, e, _) + | SynExpr.YieldOrReturnFrom (_, e, _) + | SynExpr.DoBang (e, _) -> yield! checkRange e.Range yield! walkExpr false e - | SynExpr.NamedIndexedPropertySet (_,e1,e2,_) - | SynExpr.DotSet (e1,_,e2,_) - | SynExpr.Set (e1,e2,_) - | SynExpr.LibraryOnlyUnionCaseFieldSet (e1,_,_,e2,_) - | SynExpr.App (_,_,e1,e2,_) -> + | SynExpr.NamedIndexedPropertySet (_, e1, e2, _) + | SynExpr.DotSet (e1, _, e2, _) + | SynExpr.Set (e1, e2, _) + | SynExpr.LibraryOnlyUnionCaseFieldSet (e1, _, _, e2, _) + | SynExpr.App (_, _, e1, e2, _) -> yield! walkExpr false e1 yield! walkExpr false e2 - | SynExpr.ArrayOrList (_,es,_) - | SynExpr.Tuple (_,es,_,_) -> + | SynExpr.ArrayOrList (_, es, _) + | SynExpr.Tuple (_, es, _, _) -> yield! walkExprs es - | SynExpr.Record (_,copyExprOpt,fs,_) -> + | SynExpr.Record (_, copyExprOpt, fs, _) -> match copyExprOpt with - | Some (e,_) -> yield! walkExpr true e + | Some (e, _) -> yield! walkExpr true e | None -> () yield! walkExprs (fs |> List.choose p23) | SynExpr.AnonRecd (_isStruct, copyExprOpt, fs, _) -> match copyExprOpt with - | Some (e,_) -> yield! walkExpr true e + | Some (e, _) -> yield! walkExpr true e | None -> () yield! walkExprs (fs |> List.map snd) - | SynExpr.ObjExpr (_,args,bs,is,_,_) -> + | SynExpr.ObjExpr (_, args, bs, is, _, _) -> match args with | None -> () - | Some (arg,_) -> yield! walkExpr false arg + | Some (arg, _) -> yield! walkExpr false arg yield! walkBinds bs - for (InterfaceImpl(_,bs,_)) in is do yield! walkBinds bs + for (InterfaceImpl(_, bs, _)) in is do yield! walkBinds bs - | SynExpr.While (spWhile,e1,e2,_) -> + | SynExpr.While (spWhile, e1, e2, _) -> yield! walkWhileSeqPt spWhile yield! walkExpr false e1 yield! walkExpr true e2 @@ -250,82 +250,82 @@ type FSharpParseFileResults(errors: FSharpErrorInfo[], input: Ast.ParsedInput op yield! walkExpr false e1 yield! walkExpr false e2 - | SynExpr.For (spFor,_,e1,_,e2,e3,_) -> + | SynExpr.For (spFor, _, e1, _, e2, e3, _) -> yield! walkForSeqPt spFor yield! walkExpr false e1 yield! walkExpr true e2 yield! walkExpr true e3 - | SynExpr.ForEach (spFor,_,_,_,e1,e2,_) -> + | SynExpr.ForEach (spFor, _, _, _, e1, e2, _) -> yield! walkForSeqPt spFor yield! walkExpr false e1 yield! walkExpr true e2 - | SynExpr.MatchLambda(_isExnMatch,_argm,cl,spBind,_wholem) -> + | SynExpr.MatchLambda(_isExnMatch, _argm, cl, spBind, _wholem) -> yield! walkBindSeqPt spBind - for (Clause(_,whenExpr,e,_,_)) in cl do + for (Clause(_, whenExpr, e, _, _)) in cl do yield! walkExprOpt false whenExpr yield! walkExpr true e - | SynExpr.Lambda (_,_,_,e,_) -> + | SynExpr.Lambda (_, _, _, e, _) -> yield! walkExpr true e - | SynExpr.Match (spBind,e,cl,_) -> + | SynExpr.Match (spBind, e, cl, _) -> yield! walkBindSeqPt spBind yield! walkExpr false e - for (Clause(_,whenExpr,e,_,_)) in cl do + for (Clause(_, whenExpr, e, _, _)) in cl do yield! walkExprOpt false whenExpr yield! walkExpr true e - | SynExpr.LetOrUse (_,_,bs,e,_) -> + | SynExpr.LetOrUse (_, _, bs, e, _) -> yield! walkBinds bs yield! walkExpr true e - | SynExpr.TryWith (e,_,cl,_,_,spTry,spWith) -> + | SynExpr.TryWith (e, _, cl, _, _, spTry, spWith) -> yield! walkTrySeqPt spTry yield! walkWithSeqPt spWith yield! walkExpr true e yield! walkMatchClauses cl - | SynExpr.TryFinally (e1,e2,_,spTry,spFinally) -> + | SynExpr.TryFinally (e1, e2, _, spTry, spFinally) -> yield! walkExpr true e1 yield! walkExpr true e2 yield! walkTrySeqPt spTry yield! walkFinallySeqPt spFinally - | SynExpr.Sequential (spSeq,_,e1,e2,_) -> + | SynExpr.Sequential (spSeq, _, e1, e2, _) -> yield! walkExpr (match spSeq with SuppressSequencePointOnStmtOfSequential -> false | _ -> true) e1 yield! walkExpr (match spSeq with SuppressSequencePointOnExprOfSequential -> false | _ -> true) e2 - | SynExpr.IfThenElse (e1,e2,e3opt,spBind,_,_,_) -> + | SynExpr.IfThenElse (e1, e2, e3opt, spBind, _, _, _) -> yield! walkBindSeqPt spBind yield! walkExpr false e1 yield! walkExpr true e2 yield! walkExprOpt true e3opt - | SynExpr.DotIndexedGet (e1,es,_,_) -> + | SynExpr.DotIndexedGet (e1, es, _, _) -> yield! walkExpr false e1 yield! walkExprs [ for e in es do yield! e.Exprs ] - | SynExpr.DotIndexedSet (e1,es,e2,_,_,_) -> + | SynExpr.DotIndexedSet (e1, es, e2, _, _, _) -> yield! walkExpr false e1 yield! walkExprs [ for e in es do yield! e.Exprs ] yield! walkExpr false e2 - | SynExpr.DotNamedIndexedPropertySet (e1,_,e2,e3,_) -> + | SynExpr.DotNamedIndexedPropertySet (e1, _, e2, e3, _) -> yield! walkExpr false e1 yield! walkExpr false e2 yield! walkExpr false e3 - | SynExpr.LetOrUseBang (spBind,_,_,_,e1,e2,_) -> + | SynExpr.LetOrUseBang (spBind, _, _, _, e1, e2, _) -> yield! walkBindSeqPt spBind yield! walkExpr true e1 yield! walkExpr true e2 - | SynExpr.MatchBang (spBind,e,cl,_) -> + | SynExpr.MatchBang (spBind, e, cl, _) -> yield! walkBindSeqPt spBind yield! walkExpr false e - for (Clause(_,whenExpr,e,_,_)) in cl do + for (Clause(_, whenExpr, e, _, _)) in cl do yield! walkExprOpt false whenExpr yield! walkExpr true e ] @@ -344,7 +344,7 @@ type FSharpParseFileResults(errors: FSharpErrorInfo[], input: Ast.ParsedInput op [ match memb with | SynMemberDefn.LetBindings(binds, _, _, _) -> yield! walkBinds binds | SynMemberDefn.AutoProperty(_attribs, _isStatic, _id, _tyOpt, _propKind, _, _xmlDoc, _access, synExpr, _, _) -> yield! walkExpr true synExpr - | SynMemberDefn.ImplicitCtor(_,_,_,_,m) -> yield! checkRange m + | SynMemberDefn.ImplicitCtor(_, _, _, _, m) -> yield! checkRange m | SynMemberDefn.Member(bind, _) -> yield! walkBind bind | SynMemberDefn.Interface(_synty, Some(membs), _) -> for m in membs do yield! walkMember m | SynMemberDefn.Inherit(_, _, m) -> @@ -362,7 +362,7 @@ type FSharpParseFileResults(errors: FSharpErrorInfo[], input: Ast.ParsedInput op [ match decl with | SynModuleDecl.Let(_, binds, m) when isMatchRange m -> yield! walkBinds binds - | SynModuleDecl.DoExpr(spExpr,expr, m) when isMatchRange m -> + | SynModuleDecl.DoExpr(spExpr, expr, m) when isMatchRange m -> yield! walkBindSeqPt spExpr yield! walkExpr false expr | SynModuleDecl.ModuleAbbrev _ -> () @@ -376,14 +376,14 @@ type FSharpParseFileResults(errors: FSharpErrorInfo[], input: Ast.ParsedInput op | _ -> () ] // Collect all the items in a module - let walkModule (SynModuleOrNamespace(_,_,_,decls,_,_,_,m)) = + let walkModule (SynModuleOrNamespace(_, _, _, decls, _, _, _, m)) = if isMatchRange m then List.collect walkDecl decls else [] /// Get information for implementation file - let walkImplFile (modules:SynModuleOrNamespace list) = List.collect walkModule modules + let walkImplFile (modules: SynModuleOrNamespace list) = List.collect walkModule modules match input with | Some(ParsedInput.ImplFile(ParsedImplFileInput(modules = modules))) -> walkImplFile modules @@ -439,7 +439,7 @@ type ModuleKind = { IsAutoOpen: bool; HasModuleSuffix: bool } type EntityKind = | Attribute | Type - | FunctionOrValue of isActivePattern:bool + | FunctionOrValue of isActivePattern: bool | Module of ModuleKind override x.ToString() = sprintf "%A" x @@ -449,11 +449,11 @@ module UntypedParseImpl = let emptyStringSet = HashSet() - let GetRangeOfExprLeftOfDot(pos:pos,parseTreeOpt) = + let GetRangeOfExprLeftOfDot(pos: pos, parseTreeOpt) = match parseTreeOpt with | None -> None | Some(parseTree) -> - let CheckLongIdent(longIdent:LongIdent) = + let CheckLongIdent(longIdent: LongIdent) = // find the longest prefix before the "pos" dot let mutable r = (List.head longIdent).idRange let mutable couldBeBeforeFront = true @@ -463,24 +463,24 @@ module UntypedParseImpl = couldBeBeforeFront <- false couldBeBeforeFront, r - AstTraversal.Traverse(pos,parseTree, { new AstTraversal.AstVisitorBase<_>() with + AstTraversal.Traverse(pos, parseTree, { new AstTraversal.AstVisitorBase<_>() with member this.VisitExpr(_path, traverseSynExpr, defaultTraverse, expr) = let expr = expr // fix debugger locals match expr with - | SynExpr.LongIdent(_, LongIdentWithDots(longIdent,_), _altNameRefCell, _range) -> - let _,r = CheckLongIdent(longIdent) + | SynExpr.LongIdent(_, LongIdentWithDots(longIdent, _), _altNameRefCell, _range) -> + let _, r = CheckLongIdent(longIdent) Some(r) - | SynExpr.LongIdentSet(LongIdentWithDots(longIdent,_), synExpr, _range) -> + | SynExpr.LongIdentSet(LongIdentWithDots(longIdent, _), synExpr, _range) -> if AstTraversal.rangeContainsPosLeftEdgeInclusive synExpr.Range pos then traverseSynExpr synExpr else - let _,r = CheckLongIdent(longIdent) + let _, r = CheckLongIdent(longIdent) Some(r) - | SynExpr.DotGet(synExpr, _dotm, LongIdentWithDots(longIdent,_), _range) -> + | SynExpr.DotGet(synExpr, _dotm, LongIdentWithDots(longIdent, _), _range) -> if AstTraversal.rangeContainsPosLeftEdgeInclusive synExpr.Range pos then traverseSynExpr synExpr else - let inFront,r = CheckLongIdent(longIdent) + let inFront, r = CheckLongIdent(longIdent) if inFront then Some(synExpr.Range) else @@ -493,13 +493,13 @@ module UntypedParseImpl = traverseSynExpr synExpr2 else Some(range) - | SynExpr.DotSet(synExpr, LongIdentWithDots(longIdent,_), synExpr2, _range) -> + | SynExpr.DotSet(synExpr, LongIdentWithDots(longIdent, _), synExpr2, _range) -> if AstTraversal.rangeContainsPosLeftEdgeInclusive synExpr.Range pos then traverseSynExpr synExpr elif AstTraversal.rangeContainsPosLeftEdgeInclusive synExpr2.Range pos then traverseSynExpr synExpr2 else - let inFront,r = CheckLongIdent(longIdent) + let inFront, r = CheckLongIdent(longIdent) if inFront then Some(synExpr.Range) else @@ -509,7 +509,7 @@ module UntypedParseImpl = // ---- synExpr.Range has this value // ------ we want this value Some((unionRanges synExpr.Range r)) - | SynExpr.DotNamedIndexedPropertySet(synExpr, LongIdentWithDots(longIdent,_), synExpr2, synExpr3, _range) -> + | SynExpr.DotNamedIndexedPropertySet(synExpr, LongIdentWithDots(longIdent, _), synExpr2, synExpr3, _range) -> if AstTraversal.rangeContainsPosLeftEdgeInclusive synExpr.Range pos then traverseSynExpr synExpr elif AstTraversal.rangeContainsPosLeftEdgeInclusive synExpr2.Range pos then @@ -517,7 +517,7 @@ module UntypedParseImpl = elif AstTraversal.rangeContainsPosLeftEdgeInclusive synExpr3.Range pos then traverseSynExpr synExpr3 else - let inFront,r = CheckLongIdent(longIdent) + let inFront, r = CheckLongIdent(longIdent) if inFront then Some(synExpr.Range) else @@ -546,7 +546,7 @@ module UntypedParseImpl = }) /// searches for the expression island suitable for the evaluation by the debugger - let TryFindExpressionIslandInPosition(pos:pos,parseTreeOpt) = + let TryFindExpressionIslandInPosition(pos: pos, parseTreeOpt) = match parseTreeOpt with | None -> None | Some(parseTree) -> @@ -563,9 +563,9 @@ module UntypedParseImpl = match expr with | SynExpr.Paren(e, _, _, _) when foundCandidate -> TryGetExpression foundCandidate e - | SynExpr.LongIdent(_isOptional, LongIdentWithDots(lid,_), _altNameRefCell, _m) -> + | SynExpr.LongIdent(_isOptional, LongIdentWithDots(lid, _), _altNameRefCell, _m) -> getLidParts lid |> Some - | SynExpr.DotGet(leftPart, _, LongIdentWithDots(lid,_), _) when (rangeContainsPos (rangeOfLid lid) pos) || foundCandidate -> + | SynExpr.DotGet(leftPart, _, LongIdentWithDots(lid, _), _) when (rangeContainsPos (rangeOfLid lid) pos) || foundCandidate -> // requested position is at the lid part of the DotGet // process left part and append result to the result of processing lid let leftPartResult = TryGetExpression true leftPart @@ -602,7 +602,7 @@ module UntypedParseImpl = // ^ // would return None // TODO would be great to unify this with GetRangeOfExprLeftOfDot above, if possible, as they are similar - let TryFindExpressionASTLeftOfDotLeftOfCursor(pos,parseTreeOpt) = + let TryFindExpressionASTLeftOfDotLeftOfCursor(pos, parseTreeOpt) = match parseTreeOpt with | None -> None | Some(parseTree) -> @@ -615,7 +615,7 @@ module UntypedParseImpl = let traverseSynExpr, defaultTraverse, expr = traverseSynExpr, defaultTraverse, expr // for debugging: debugger does not get object expression params as local vars if not(rangeContainsPos expr.Range pos) then match expr with - | SynExpr.DiscardAfterMissingQualificationAfterDot(e,_m) -> + | SynExpr.DiscardAfterMissingQualificationAfterDot(e, _m) -> // This happens with e.g. "f(x) . $" when you bring up a completion list a few spaces after a dot. The cursor is not 'in the parse tree', // but the dive algorithm will dive down into this node, and this is the one case where we do want to give a result despite the cursor // not properly being in a node. @@ -628,14 +628,14 @@ module UntypedParseImpl = // the cursor location. None else - let rec traverseLidOrElse (optExprIfLeftOfLongId : SynExpr option) (LongIdentWithDots(lid,dots) as lidwd) = + let rec traverseLidOrElse (optExprIfLeftOfLongId : SynExpr option) (LongIdentWithDots(lid, dots) as lidwd) = let resultIfLeftOfLongId = match optExprIfLeftOfLongId with | None -> None | Some e -> Some(e.Range.End, posGeq lidwd.Range.Start pos) - match dots |> List.mapi (fun i x -> i,x) |> List.rev |> List.tryFind (fun (_,m) -> posGt pos m.Start) with + match dots |> List.mapi (fun i x -> i, x) |> List.rev |> List.tryFind (fun (_, m) -> posGt pos m.Start) with | None -> resultIfLeftOfLongId - | Some(n,_) -> Some((List.item n lid).idRange.End, (List.length lid = n+1) // foo.$ + | Some(n, _) -> Some((List.item n lid).idRange.End, (List.length lid = n+1) // foo.$ || (posGeq (List.item (n+1) lid).idRange.Start pos)) // foo.$bar match expr with | SynExpr.LongIdent(_isOptional, lidwd, _altNameRefCell, _m) -> @@ -677,7 +677,7 @@ module UntypedParseImpl = else // the cursor is left of the dot None - | SynExpr.DiscardAfterMissingQualificationAfterDot(e,m) -> + | SynExpr.DiscardAfterMissingQualificationAfterDot(e, m) -> match traverseSynExpr(e) with | None -> if posEq m.End pos then @@ -763,7 +763,7 @@ module UntypedParseImpl = List.tryPick walkTyparDecl typars |> Option.orElse (List.tryPick walkTypeConstraint constraints))) |> Option.orElse (List.tryPick walkPat pats) - | SynPat.Tuple(_,pats, _) -> List.tryPick walkPat pats + | SynPat.Tuple(_, pats, _) -> List.tryPick walkPat pats | SynPat.Paren(pat, _) -> walkPat pat | SynPat.ArrayOrList(_, pats, _) -> List.tryPick walkPat pats | SynPat.IsInst(t, _) -> walkType t @@ -791,12 +791,12 @@ module UntypedParseImpl = and walkType = function | SynType.LongIdent ident -> // we protect it with try..with because System.Exception : rangeOfLidwd may raise - // at FSharp.Compiler.Ast.LongIdentWithDots.get_Range() in D:\j\workspace\release_ci_pa---3f142ccc\src\fsharp\ast.fs:line 156 + // at FSharp.Compiler.Ast.LongIdentWithDots.get_Range() in D:\j\workspace\release_ci_pa---3f142ccc\src\fsharp\ast.fs: line 156 try ifPosInRange ident.Range (fun _ -> Some EntityKind.Type) with _ -> None | SynType.App(ty, _, types, _, _, _, _) -> walkType ty |> Option.orElse (List.tryPick walkType types) | SynType.LongIdentApp(_, _, _, types, _, _, _) -> List.tryPick walkType types - | SynType.Tuple(_,ts, _) -> ts |> List.tryPick (fun (_, t) -> walkType t) + | SynType.Tuple(_, ts, _) -> ts |> List.tryPick (fun (_, t) -> walkType t) | SynType.Array(_, t, _) -> walkType t | SynType.Fun(t1, t2, _) -> walkType t1 |> Option.orElse (walkType t2) | SynType.WithGlobalConstraints(t, _, _) -> walkType t @@ -1010,7 +1010,7 @@ module UntypedParseImpl = let parseLid (LongIdentWithDots(lid, dots)) = let rec collect plid (parts : Ident list) (dots : range list) = match parts, dots with - | [],_ -> Some (plid, None) + | [], _ -> Some (plid, None) | x::xs, ds -> if rangeContainsPos x.idRange pos then // pos lies with the range of current identifier @@ -1062,7 +1062,7 @@ module UntypedParseImpl = | false, false, true -> Struct | _ -> Invalid - let GetCompletionContextForInheritSynMember ((ComponentInfo(synAttributes, _, _, _,_, _, _, _)), typeDefnKind : SynTypeDefnKind, completionPath) = + let GetCompletionContextForInheritSynMember ((ComponentInfo(synAttributes, _, _, _, _, _, _, _)), typeDefnKind : SynTypeDefnKind, completionPath) = let success k = Some (CompletionContext.Inherit (k, completionPath)) @@ -1149,7 +1149,7 @@ module UntypedParseImpl = Some (id.idRange.End, findSetters arg) | (SynExpr.App (_, false, SynExpr.TypeApp(SynExpr.Ident id, _, _, _, mGreaterThan, _, _), arg, _)) -> // A<_>() - Some (endOfClosingTokenOrIdent mGreaterThan id , findSetters arg) + Some (endOfClosingTokenOrIdent mGreaterThan id, findSetters arg) | (SynExpr.App (_, false, SynExpr.LongIdent(_, lid, _, _), arg, _)) -> // A.B() Some (endOfLastIdent lid, findSetters arg) @@ -1213,7 +1213,7 @@ module UntypedParseImpl = | _ -> defaultTraverse expr // new (A$ = 1) - // new (A = 1,$) + // new (A = 1, $) | Setter id when id.idRange.End = pos || rangeBeforePos expr.Range pos -> let precedingArgument = if id.idRange.End = pos then None else Some expr match path with @@ -1272,7 +1272,7 @@ module UntypedParseImpl = | SynPat.LongIdent(longDotId = lidwd) when rangeContainsPos lidwd.Range pos -> // let fo|o x = () Some CompletionContext.Invalid - | SynPat.LongIdent(_,_,_,ctorArgs,_,_) -> + | SynPat.LongIdent(_, _, _, ctorArgs, _, _) -> match ctorArgs with | SynConstructorArgs.Pats(pats) -> pats |> List.tryPick (fun pat -> @@ -1319,7 +1319,7 @@ module UntypedParseImpl = pats |> List.tryPick (fun pat -> match pat with | SynSimplePat.Id(range = range) - | SynSimplePat.Typed(SynSimplePat.Id(range = range),_,_) when rangeContainsPos range pos -> + | SynSimplePat.Typed(SynSimplePat.Id(range = range), _, _) when rangeContainsPos range pos -> Some CompletionContext.Invalid | _ -> None) @@ -1356,7 +1356,7 @@ module UntypedParseImpl = | idx when idx < str.Length -> str.[idx + 1..].TrimStart() | _ -> "" - let isLongIdent = Seq.forall (fun c -> IsIdentifierPartCharacter c || c = '.' || c = ':') // ':' may occur in "[]" + let isLongIdent = Seq.forall (fun c -> IsIdentifierPartCharacter c || c = '.' || c = ':') // ':' may occur in "[]" #if FABLE_COMPILER // match the most nested paired [< and >] first diff --git a/src/fcs-fable/src/fsharp/service/service.fs b/src/fcs-fable/src/fsharp/service/service.fs index 5c897230cf..2c0a4057fb 100755 --- a/src/fcs-fable/src/fsharp/service/service.fs +++ b/src/fcs-fable/src/fsharp/service/service.fs @@ -49,10 +49,6 @@ open Internal.Utilities open Internal.Utilities.Collections open FSharp.Compiler.Layout.TaggedTextOps -#if FX_RESHAPED_REFLECTION -open Microsoft.FSharp.Core.ReflectionAdapters -#endif - type internal Layout = StructuredFormat.Layout [] diff --git a/src/fcs-fable/src/fsharp/sr.fs b/src/fcs-fable/src/fsharp/sr.fs index 7eab19223f..a59c2419ea 100755 --- a/src/fcs-fable/src/fsharp/sr.fs +++ b/src/fcs-fable/src/fsharp/sr.fs @@ -11,13 +11,7 @@ namespace FSharp.Compiler open System.Reflection module internal SR = -#if FX_RESHAPED_REFLECTION - open System.Reflection - type private TypeInThisAssembly = class end - let private resources = lazy (new System.Resources.ResourceManager("fsstrings", typeof.GetTypeInfo().Assembly)) -#else let private resources = lazy (new System.Resources.ResourceManager("fsstrings", System.Reflection.Assembly.GetExecutingAssembly())) -#endif let GetString(name:string) = let s = resources.Force().GetString(name, System.Globalization.CultureInfo.CurrentUICulture) @@ -34,11 +28,6 @@ namespace FSharp.Compiler open System.Reflection open Internal.Utilities.StructuredFormat -#if FX_RESHAPED_REFLECTION - open PrimReflectionAdapters - open ReflectionAdapters -#endif - let mkFunctionValue (tys: System.Type[]) (impl:obj->obj) = FSharpValue.MakeFunction(FSharpType.MakeFunctionType(tys.[0],tys.[1]), impl) diff --git a/src/fcs-fable/src/fsharp/symbols/Exprs.fs b/src/fcs-fable/src/fsharp/symbols/Exprs.fs index f5d166bd24..d7480cb07a 100644 --- a/src/fcs-fable/src/fsharp/symbols/Exprs.fs +++ b/src/fcs-fable/src/fsharp/symbols/Exprs.fs @@ -20,9 +20,9 @@ module ExprTranslationImpl = type ExprTranslationEnv = { //Map from Val to binding index - vs: ValMap; + vs: ValMap //Map from typar stamps to binding index - tyvs: StampMap; + tyvs: StampMap // Map for values bound by the // 'let v = isinst e in .... if nonnull v then ...v .... ' // construct arising out the compilation of pattern matching. We decode these back to the form @@ -31,12 +31,12 @@ module ExprTranslationImpl = substVals: ValMap } static member Empty = - { vs=ValMap<_>.Empty; + { vs=ValMap<_>.Empty tyvs = Map.empty ; isinstVals = ValMap<_>.Empty substVals = ValMap<_>.Empty } - member env.BindTypar (v:Typar, gp) = + member env.BindTypar (v: Typar, gp) = { env with tyvs = env.tyvs.Add(v.Stamp, gp ) } member env.BindTypars vs = @@ -59,7 +59,7 @@ module ExprTranslationImpl = exception IgnoringPartOfQuotedTermWarning of string * Range.range - let wfail (msg, m:range) = failwith (msg + sprintf " at %s" (m.ToString())) + let wfail (msg, m: range) = failwith (msg + sprintf " at %s" (m.ToString())) /// The core tree of data produced by converting F# compiler TAST expressions into the form which we make available through the compiler API @@ -113,14 +113,14 @@ type E = | ILAsm of string * FSharpType list * FSharpExpr list /// Used to represent the information at an object expression member -and [] FSharpObjectExprOverride(sgn: FSharpAbstractSignature, gps: FSharpGenericParameter list, args:FSharpMemberOrFunctionOrValue list list, body: FSharpExpr) = +and [] FSharpObjectExprOverride(sgn: FSharpAbstractSignature, gps: FSharpGenericParameter list, args: FSharpMemberOrFunctionOrValue list list, body: FSharpExpr) = member __.Signature = sgn member __.GenericParameters = gps member __.CurriedParameterGroups = args member __.Body = body /// The type of expressions provided through the compiler API. -and [] FSharpExpr (cenv, f: (unit -> FSharpExpr) option, e: E, m:range, ty) = +and [] FSharpExpr (cenv, f: (unit -> FSharpExpr) option, e: E, m: range, ty) = member x.Range = m member x.Type = FSharpType(cenv, ty) @@ -171,11 +171,11 @@ and [] FSharpExpr (cenv, f: (unit -> FSharpExpr) option, e: E, m:range, | E.ILFieldGet (objOpt, _ty, _fieldName) -> (match objOpt with None -> [] | Some x -> [x]) | E.ILFieldSet (objOpt, _ty, _fieldName, d) -> (match objOpt with None -> [d] | Some x -> [x;d]) | E.ObjectExpr (_ty, basecall, overrides, interfaceImpls) -> - [ yield basecall; + [ yield basecall for m in overrides do yield m.Body for (_, ms) in interfaceImpls do for m in ms do yield m.Body ] | E.DecisionTree (inputExpr, targetCases) -> - [ yield inputExpr; + [ yield inputExpr for (_targetVars, targetExpr) in targetCases do yield targetExpr ] | E.DecisionTreeSuccess (_targetNumber, targetArgs) -> targetArgs | E.UnionCaseSet (obj, _unionType, _unionCase, _unionField, valueExpr) -> [ yield obj; yield valueExpr ] @@ -275,7 +275,7 @@ module FSharpExprConvert = | DT_REF -> None | _ -> None - let (|TTypeConvOp|_|) (cenv:SymbolEnv) ty = + let (|TTypeConvOp|_|) (cenv: SymbolEnv) ty = let g = cenv.g match ty with | TType_app (tcref,_) -> @@ -298,14 +298,14 @@ module FSharpExprConvert = let ConvType cenv ty = FSharpType(cenv, ty) let ConvTypes cenv tys = List.map (ConvType cenv) tys - let ConvILTypeRefApp (cenv:SymbolEnv) m tref tyargs = + let ConvILTypeRefApp (cenv: SymbolEnv) m tref tyargs = let tcref = Import.ImportILTypeRef cenv.amap m tref ConvType cenv (mkAppTy tcref tyargs) - let ConvUnionCaseRef cenv (ucref:UnionCaseRef) = FSharpUnionCase(cenv, ucref) - let ConvRecdFieldRef cenv (rfref:RecdFieldRef) = FSharpField(cenv, rfref ) + let ConvUnionCaseRef cenv (ucref: UnionCaseRef) = FSharpUnionCase(cenv, ucref) + let ConvRecdFieldRef cenv (rfref: RecdFieldRef) = FSharpField(cenv, rfref ) - let rec exprOfExprAddr (cenv:SymbolEnv) expr = + let rec exprOfExprAddr (cenv: SymbolEnv) expr = match expr with | Expr.Op(op, tyargs, args, m) -> match op, args, tyargs with @@ -328,9 +328,9 @@ module FSharpExprConvert = let Mk cenv m ty e = FSharpExpr(cenv, None, e, m, ty) - let Mk2 cenv (orig:Expr) e = FSharpExpr(cenv, None, e, orig.Range, tyOfExpr cenv.g orig) + let Mk2 cenv (orig: Expr) e = FSharpExpr(cenv, None, e, orig.Range, tyOfExpr cenv.g orig) - let rec ConvLValueExpr (cenv:SymbolEnv) env expr = ConvExpr cenv env (exprOfExprAddr cenv expr) + let rec ConvLValueExpr (cenv: SymbolEnv) env expr = ConvExpr cenv env (exprOfExprAddr cenv expr) and ConvExpr cenv env expr = Mk2 cenv expr (ConvExprPrim cenv env expr) @@ -385,7 +385,7 @@ module FSharpExprConvert = let dtreeR = ConvDecisionTree cenv env retTy dtree m // tailcall ConvTargetsLinear cenv env (List.ofArray tgs) (contf << fun (targetsR: _ list) -> - let (|E|) (x:FSharpExpr) = x.E + let (|E|) (x: FSharpExpr) = x.E // If the match is really an "if-then-else" then return it as such. match dtreeR with @@ -398,7 +398,7 @@ module FSharpExprConvert = /// A nasty function copied from creflect.fs. Made nastier by taking a continuation to process the /// arguments to the call in a tail-recursive fashion. - and ConvModuleValueOrMemberUseLinear (cenv:SymbolEnv) env (expr:Expr, vref, vFlags, tyargs, curriedArgs) contf = + and ConvModuleValueOrMemberUseLinear (cenv: SymbolEnv) env (expr: Expr, vref, vFlags, tyargs, curriedArgs) contf = let m = expr.Range let (numEnclTypeArgs, _, isNewObj, _valUseFlags, _isSelfInit, takesInstanceArg, _isPropGet, _isPropSet) = @@ -469,7 +469,7 @@ module FSharpExprConvert = // tailcall ConvObjectModelCallLinear cenv env (false, v, [], tyargs, List.concat untupledCurriedArgs) contf2 - and ConvExprPrim (cenv:SymbolEnv) (env:ExprTranslationEnv) expr = + and ConvExprPrim (cenv: SymbolEnv) (env: ExprTranslationEnv) expr = // Eliminate integer 'for' loops let expr = DetectAndOptimizeForExpression cenv.g OptimizeIntRangesOnly expr @@ -870,7 +870,7 @@ module FSharpExprConvert = let envinner = env.BindVal v Some(vR, rhsR), envinner - and ConvILCall (cenv:SymbolEnv) env (isNewObj, valUseFlags, ilMethRef, enclTypeArgs, methTypeArgs, callArgs, m) = + and ConvILCall (cenv: SymbolEnv) env (isNewObj, valUseFlags, ilMethRef, enclTypeArgs, methTypeArgs, callArgs, m) = let isNewObj = (isNewObj || (match valUseFlags with CtorValUsedAsSuperInit | CtorValUsedAsSelfInit -> true | _ -> false)) let methName = ilMethRef.Name let isPropGet = methName.StartsWithOrdinal("get_") @@ -1074,7 +1074,7 @@ module FSharpExprConvert = with e -> failwithf "An IL call to '%s' could not be resolved: %s" (ilMethRef.ToString()) e.Message - and ConvObjectModelCallLinear cenv env (isNewObj, v:FSharpMemberOrFunctionOrValue, enclTyArgs, methTyArgs, callArgs) contf = + and ConvObjectModelCallLinear cenv env (isNewObj, v: FSharpMemberOrFunctionOrValue, enclTyArgs, methTyArgs, callArgs) contf = let enclTyArgsR = ConvTypes cenv enclTyArgs let methTyArgsR = ConvTypes cenv methTyArgs let obj, callArgs = @@ -1111,7 +1111,7 @@ module FSharpExprConvert = ConvTargetsLinear cenv env rest (fun restR -> contf ((varsR, targetR) :: restR))) - and ConvValRef cenv env m (vref:ValRef) = + and ConvValRef cenv env m (vref: ValRef) = let v = vref.Deref if env.isinstVals.ContainsVal v then let (ty, e) = env.isinstVals.[v] @@ -1126,7 +1126,7 @@ module FSharpExprConvert = else E.Value(FSharpMemberOrFunctionOrValue(cenv, vref)) - and ConvVal cenv (v:Val) = + and ConvVal cenv (v: Val) = let vref = mkLocalValRef v FSharpMemberOrFunctionOrValue(cenv, vref) @@ -1289,49 +1289,49 @@ and FSharpImplementationFileContents(cenv, mimpl) = module BasicPatterns = - let (|Value|_|) (e:FSharpExpr) = match e.E with E.Value (v) -> Some (v) | _ -> None - let (|Const|_|) (e:FSharpExpr) = match e.E with E.Const (v, ty) -> Some (v, ty) | _ -> None - let (|TypeLambda|_|) (e:FSharpExpr) = match e.E with E.TypeLambda (v, e) -> Some (v, e) | _ -> None - let (|Lambda|_|) (e:FSharpExpr) = match e.E with E.Lambda (v, e) -> Some (v, e) | _ -> None - let (|Application|_|) (e:FSharpExpr) = match e.E with E.Application (f, tys, e) -> Some (f, tys, e) | _ -> None - let (|IfThenElse|_|) (e:FSharpExpr) = match e.E with E.IfThenElse (e1, e2, e3) -> Some (e1, e2, e3) | _ -> None - let (|Let|_|) (e:FSharpExpr) = match e.E with E.Let ((v, e), b) -> Some ((v, e), b) | _ -> None - let (|LetRec|_|) (e:FSharpExpr) = match e.E with E.LetRec (ves, b) -> Some (ves, b) | _ -> None - let (|NewRecord|_|) (e:FSharpExpr) = match e.E with E.NewRecord (ty, es) -> Some (ty, es) | _ -> None - let (|NewAnonRecord|_|) (e:FSharpExpr) = match e.E with E.NewAnonRecord (ty, es) -> Some (ty, es) | _ -> None - let (|NewUnionCase|_|) (e:FSharpExpr) = match e.E with E.NewUnionCase (e, tys, es) -> Some (e, tys, es) | _ -> None - let (|NewTuple|_|) (e:FSharpExpr) = match e.E with E.NewTuple (ty, es) -> Some (ty, es) | _ -> None - let (|TupleGet|_|) (e:FSharpExpr) = match e.E with E.TupleGet (ty, n, es) -> Some (ty, n, es) | _ -> None - let (|Call|_|) (e:FSharpExpr) = match e.E with E.Call (a, b, c, d, e) -> Some (a, b, c, d, e) | _ -> None - let (|NewObject|_|) (e:FSharpExpr) = match e.E with E.NewObject (a, b, c) -> Some (a, b, c) | _ -> None - let (|FSharpFieldGet|_|) (e:FSharpExpr) = match e.E with E.FSharpFieldGet (a, b, c) -> Some (a, b, c) | _ -> None - let (|AnonRecordGet|_|) (e:FSharpExpr) = match e.E with E.AnonRecordGet (a, b, c) -> Some (a, b, c) | _ -> None - let (|FSharpFieldSet|_|) (e:FSharpExpr) = match e.E with E.FSharpFieldSet (a, b, c, d) -> Some (a, b, c, d) | _ -> None - let (|UnionCaseGet|_|) (e:FSharpExpr) = match e.E with E.UnionCaseGet (a, b, c, d) -> Some (a, b, c, d) | _ -> None - let (|UnionCaseTag|_|) (e:FSharpExpr) = match e.E with E.UnionCaseTag (a, b) -> Some (a, b) | _ -> None - let (|UnionCaseTest|_|) (e:FSharpExpr) = match e.E with E.UnionCaseTest (a, b, c) -> Some (a, b, c) | _ -> None - let (|NewArray|_|) (e:FSharpExpr) = match e.E with E.NewArray (a, b) -> Some (a, b) | _ -> None - let (|Coerce|_|) (e:FSharpExpr) = match e.E with E.Coerce (a, b) -> Some (a, b) | _ -> None - let (|Quote|_|) (e:FSharpExpr) = match e.E with E.Quote (a) -> Some (a) | _ -> None - let (|TypeTest|_|) (e:FSharpExpr) = match e.E with E.TypeTest (a, b) -> Some (a, b) | _ -> None - let (|Sequential|_|) (e:FSharpExpr) = match e.E with E.Sequential (a, b) -> Some (a, b) | _ -> None - let (|FastIntegerForLoop|_|) (e:FSharpExpr) = match e.E with E.FastIntegerForLoop (a, b, c, d) -> Some (a, b, c, d) | _ -> None - let (|WhileLoop|_|) (e:FSharpExpr) = match e.E with E.WhileLoop (a, b) -> Some (a, b) | _ -> None - let (|TryFinally|_|) (e:FSharpExpr) = match e.E with E.TryFinally (a, b) -> Some (a, b) | _ -> None - let (|TryWith|_|) (e:FSharpExpr) = match e.E with E.TryWith (a, b, c, d, e) -> Some (a, b, c, d, e) | _ -> None - let (|NewDelegate|_|) (e:FSharpExpr) = match e.E with E.NewDelegate (ty, e) -> Some (ty, e) | _ -> None - let (|DefaultValue|_|) (e:FSharpExpr) = match e.E with E.DefaultValue (ty) -> Some (ty) | _ -> None - let (|AddressSet|_|) (e:FSharpExpr) = match e.E with E.AddressSet (a, b) -> Some (a, b) | _ -> None - let (|ValueSet|_|) (e:FSharpExpr) = match e.E with E.ValueSet (a, b) -> Some (a, b) | _ -> None - let (|AddressOf|_|) (e:FSharpExpr) = match e.E with E.AddressOf (a) -> Some (a) | _ -> None - let (|ThisValue|_|) (e:FSharpExpr) = match e.E with E.ThisValue (a) -> Some (a) | _ -> None - let (|BaseValue|_|) (e:FSharpExpr) = match e.E with E.BaseValue (a) -> Some (a) | _ -> None - let (|ILAsm|_|) (e:FSharpExpr) = match e.E with E.ILAsm (a, b, c) -> Some (a, b, c) | _ -> None - let (|ILFieldGet|_|) (e:FSharpExpr) = match e.E with E.ILFieldGet (a, b, c) -> Some (a, b, c) | _ -> None - let (|ILFieldSet|_|) (e:FSharpExpr) = match e.E with E.ILFieldSet (a, b, c, d) -> Some (a, b, c, d) | _ -> None - let (|ObjectExpr|_|) (e:FSharpExpr) = match e.E with E.ObjectExpr (a, b, c, d) -> Some (a, b, c, d) | _ -> None - let (|DecisionTree|_|) (e:FSharpExpr) = match e.E with E.DecisionTree (a, b) -> Some (a, b) | _ -> None - let (|DecisionTreeSuccess|_|) (e:FSharpExpr) = match e.E with E.DecisionTreeSuccess (a, b) -> Some (a, b) | _ -> None - let (|UnionCaseSet|_|) (e:FSharpExpr) = match e.E with E.UnionCaseSet (a, b, c, d, e) -> Some (a, b, c, d, e) | _ -> None - let (|TraitCall|_|) (e:FSharpExpr) = match e.E with E.TraitCall (a, b, c, d, e, f) -> Some (a, b, c, d, e, f) | _ -> None + let (|Value|_|) (e: FSharpExpr) = match e.E with E.Value (v) -> Some (v) | _ -> None + let (|Const|_|) (e: FSharpExpr) = match e.E with E.Const (v, ty) -> Some (v, ty) | _ -> None + let (|TypeLambda|_|) (e: FSharpExpr) = match e.E with E.TypeLambda (v, e) -> Some (v, e) | _ -> None + let (|Lambda|_|) (e: FSharpExpr) = match e.E with E.Lambda (v, e) -> Some (v, e) | _ -> None + let (|Application|_|) (e: FSharpExpr) = match e.E with E.Application (f, tys, e) -> Some (f, tys, e) | _ -> None + let (|IfThenElse|_|) (e: FSharpExpr) = match e.E with E.IfThenElse (e1, e2, e3) -> Some (e1, e2, e3) | _ -> None + let (|Let|_|) (e: FSharpExpr) = match e.E with E.Let ((v, e), b) -> Some ((v, e), b) | _ -> None + let (|LetRec|_|) (e: FSharpExpr) = match e.E with E.LetRec (ves, b) -> Some (ves, b) | _ -> None + let (|NewRecord|_|) (e: FSharpExpr) = match e.E with E.NewRecord (ty, es) -> Some (ty, es) | _ -> None + let (|NewAnonRecord|_|) (e: FSharpExpr) = match e.E with E.NewAnonRecord (ty, es) -> Some (ty, es) | _ -> None + let (|NewUnionCase|_|) (e: FSharpExpr) = match e.E with E.NewUnionCase (e, tys, es) -> Some (e, tys, es) | _ -> None + let (|NewTuple|_|) (e: FSharpExpr) = match e.E with E.NewTuple (ty, es) -> Some (ty, es) | _ -> None + let (|TupleGet|_|) (e: FSharpExpr) = match e.E with E.TupleGet (ty, n, es) -> Some (ty, n, es) | _ -> None + let (|Call|_|) (e: FSharpExpr) = match e.E with E.Call (a, b, c, d, e) -> Some (a, b, c, d, e) | _ -> None + let (|NewObject|_|) (e: FSharpExpr) = match e.E with E.NewObject (a, b, c) -> Some (a, b, c) | _ -> None + let (|FSharpFieldGet|_|) (e: FSharpExpr) = match e.E with E.FSharpFieldGet (a, b, c) -> Some (a, b, c) | _ -> None + let (|AnonRecordGet|_|) (e: FSharpExpr) = match e.E with E.AnonRecordGet (a, b, c) -> Some (a, b, c) | _ -> None + let (|FSharpFieldSet|_|) (e: FSharpExpr) = match e.E with E.FSharpFieldSet (a, b, c, d) -> Some (a, b, c, d) | _ -> None + let (|UnionCaseGet|_|) (e: FSharpExpr) = match e.E with E.UnionCaseGet (a, b, c, d) -> Some (a, b, c, d) | _ -> None + let (|UnionCaseTag|_|) (e: FSharpExpr) = match e.E with E.UnionCaseTag (a, b) -> Some (a, b) | _ -> None + let (|UnionCaseTest|_|) (e: FSharpExpr) = match e.E with E.UnionCaseTest (a, b, c) -> Some (a, b, c) | _ -> None + let (|NewArray|_|) (e: FSharpExpr) = match e.E with E.NewArray (a, b) -> Some (a, b) | _ -> None + let (|Coerce|_|) (e: FSharpExpr) = match e.E with E.Coerce (a, b) -> Some (a, b) | _ -> None + let (|Quote|_|) (e: FSharpExpr) = match e.E with E.Quote (a) -> Some (a) | _ -> None + let (|TypeTest|_|) (e: FSharpExpr) = match e.E with E.TypeTest (a, b) -> Some (a, b) | _ -> None + let (|Sequential|_|) (e: FSharpExpr) = match e.E with E.Sequential (a, b) -> Some (a, b) | _ -> None + let (|FastIntegerForLoop|_|) (e: FSharpExpr) = match e.E with E.FastIntegerForLoop (a, b, c, d) -> Some (a, b, c, d) | _ -> None + let (|WhileLoop|_|) (e: FSharpExpr) = match e.E with E.WhileLoop (a, b) -> Some (a, b) | _ -> None + let (|TryFinally|_|) (e: FSharpExpr) = match e.E with E.TryFinally (a, b) -> Some (a, b) | _ -> None + let (|TryWith|_|) (e: FSharpExpr) = match e.E with E.TryWith (a, b, c, d, e) -> Some (a, b, c, d, e) | _ -> None + let (|NewDelegate|_|) (e: FSharpExpr) = match e.E with E.NewDelegate (ty, e) -> Some (ty, e) | _ -> None + let (|DefaultValue|_|) (e: FSharpExpr) = match e.E with E.DefaultValue (ty) -> Some (ty) | _ -> None + let (|AddressSet|_|) (e: FSharpExpr) = match e.E with E.AddressSet (a, b) -> Some (a, b) | _ -> None + let (|ValueSet|_|) (e: FSharpExpr) = match e.E with E.ValueSet (a, b) -> Some (a, b) | _ -> None + let (|AddressOf|_|) (e: FSharpExpr) = match e.E with E.AddressOf (a) -> Some (a) | _ -> None + let (|ThisValue|_|) (e: FSharpExpr) = match e.E with E.ThisValue (a) -> Some (a) | _ -> None + let (|BaseValue|_|) (e: FSharpExpr) = match e.E with E.BaseValue (a) -> Some (a) | _ -> None + let (|ILAsm|_|) (e: FSharpExpr) = match e.E with E.ILAsm (a, b, c) -> Some (a, b, c) | _ -> None + let (|ILFieldGet|_|) (e: FSharpExpr) = match e.E with E.ILFieldGet (a, b, c) -> Some (a, b, c) | _ -> None + let (|ILFieldSet|_|) (e: FSharpExpr) = match e.E with E.ILFieldSet (a, b, c, d) -> Some (a, b, c, d) | _ -> None + let (|ObjectExpr|_|) (e: FSharpExpr) = match e.E with E.ObjectExpr (a, b, c, d) -> Some (a, b, c, d) | _ -> None + let (|DecisionTree|_|) (e: FSharpExpr) = match e.E with E.DecisionTree (a, b) -> Some (a, b) | _ -> None + let (|DecisionTreeSuccess|_|) (e: FSharpExpr) = match e.E with E.DecisionTreeSuccess (a, b) -> Some (a, b) | _ -> None + let (|UnionCaseSet|_|) (e: FSharpExpr) = match e.E with E.UnionCaseSet (a, b, c, d, e) -> Some (a, b, c, d, e) | _ -> None + let (|TraitCall|_|) (e: FSharpExpr) = match e.E with E.TraitCall (a, b, c, d, e, f) -> Some (a, b, c, d, e, f) | _ -> None diff --git a/src/fcs-fable/src/fsharp/symbols/SymbolHelpers.fs b/src/fcs-fable/src/fsharp/symbols/SymbolHelpers.fs index bb96a648a5..bac181cf3f 100644 --- a/src/fcs-fable/src/fsharp/symbols/SymbolHelpers.fs +++ b/src/fcs-fable/src/fsharp/symbols/SymbolHelpers.fs @@ -60,14 +60,14 @@ type FSharpErrorInfo(fileName, s: pos, e: pos, severity: FSharpErrorSeverity, me override __.ToString()= sprintf "%s (%d,%d)-(%d,%d) %s %s %s" fileName (int s.Line) (s.Column + 1) (int e.Line) (e.Column + 1) subcategory (if severity=FSharpErrorSeverity.Warning then "warning" else "error") message /// Decompose a warning or error into parts: position, severity, message, error number - static member CreateFromException(exn, isError, fallbackRange:range) = + static member CreateFromException(exn, isError, fallbackRange: range) = let m = match GetRangeOfDiagnostic exn with Some m -> m | None -> fallbackRange let msg = bufs (fun buf -> OutputPhasedDiagnostic buf exn false) let errorNum = GetDiagnosticNumber exn FSharpErrorInfo(m.FileName, m.Start, m.End, (if isError then FSharpErrorSeverity.Error else FSharpErrorSeverity.Warning), msg, exn.Subcategory(), errorNum) /// Decompose a warning or error into parts: position, severity, message, error number - static member CreateFromExceptionAndAdjustEof(exn, isError, fallbackRange:range, (linesCount:int, lastLength:int)) = + static member CreateFromExceptionAndAdjustEof(exn, isError, fallbackRange: range, (linesCount: int, lastLength: int)) = let r = FSharpErrorInfo.CreateFromException(exn, isError, fallbackRange) // Adjust to make sure that errors reported at Eof are shown at the linesCount @@ -120,7 +120,7 @@ type ErrorScope() = /// if there is a "msising assembly" error while formatting the text of the description of an /// autocomplete, then the error message is shown in replacement of the text (rather than crashing Visual /// Studio, or swallowing the exception completely) - static member Protect<'a> (m:range) (f:unit->'a) (err:string->'a): 'a = + static member Protect<'a> (m: range) (f: unit->'a) (err: string->'a): 'a = use errorScope = new ErrorScope() let res = try @@ -163,7 +163,7 @@ type internal CompilationErrorLogger (debugName: string, options: FSharpErrorSev /// This represents the global state established as each task function runs as part of the build. /// /// Use to reset error and warning handlers. -type CompilationGlobalsScope(errorLogger:ErrorLogger, phase: BuildPhase) = +type CompilationGlobalsScope(errorLogger: ErrorLogger, phase: BuildPhase) = let unwindEL = PushErrorLoggerPhaseUntilUnwind(fun _ -> errorLogger) let unwindBP = PushThreadBuildPhaseUntilUnwind phase // Return the disposable object that cleans up @@ -308,27 +308,27 @@ module internal SymbolHelpers = | Some _ -> wordL (tagText (FSComp.SR.typeInfoFullName())) ^^ RightL.colon ^^ (fnF r) else emptyL - let rangeOfValRef preferFlag (vref:ValRef) = + let rangeOfValRef preferFlag (vref: ValRef) = match preferFlag with | None -> vref.Range | Some false -> vref.DefinitionRange | Some true -> vref.SigRange - let rangeOfEntityRef preferFlag (eref:EntityRef) = + let rangeOfEntityRef preferFlag (eref: EntityRef) = match preferFlag with | None -> eref.Range | Some false -> eref.DefinitionRange | Some true -> eref.SigRange - let rangeOfPropInfo preferFlag (pinfo:PropInfo) = + let rangeOfPropInfo preferFlag (pinfo: PropInfo) = match pinfo with #if !NO_EXTENSIONTYPING | ProvidedProp(_, pi, _) -> ComputeDefinitionLocationOfProvidedItem pi #endif | _ -> pinfo.ArbitraryValRef |> Option.map (rangeOfValRef preferFlag) - let rangeOfMethInfo (g:TcGlobals) preferFlag (minfo:MethInfo) = + let rangeOfMethInfo (g: TcGlobals) preferFlag (minfo: MethInfo) = match minfo with #if !NO_EXTENSIONTYPING | ProvidedMeth(_, mi, _, _) -> ComputeDefinitionLocationOfProvidedItem mi @@ -336,26 +336,26 @@ module internal SymbolHelpers = | DefaultStructCtor(_, AppTy g (tcref, _)) -> Some(rangeOfEntityRef preferFlag tcref) | _ -> minfo.ArbitraryValRef |> Option.map (rangeOfValRef preferFlag) - let rangeOfEventInfo preferFlag (einfo:EventInfo) = + let rangeOfEventInfo preferFlag (einfo: EventInfo) = match einfo with #if !NO_EXTENSIONTYPING | ProvidedEvent (_, ei, _) -> ComputeDefinitionLocationOfProvidedItem ei #endif | _ -> einfo.ArbitraryValRef |> Option.map (rangeOfValRef preferFlag) - let rangeOfUnionCaseInfo preferFlag (ucinfo:UnionCaseInfo) = + let rangeOfUnionCaseInfo preferFlag (ucinfo: UnionCaseInfo) = match preferFlag with | None -> ucinfo.UnionCase.Range | Some false -> ucinfo.UnionCase.DefinitionRange | Some true -> ucinfo.UnionCase.SigRange - let rangeOfRecdFieldInfo preferFlag (rfinfo:RecdFieldInfo) = + let rangeOfRecdFieldInfo preferFlag (rfinfo: RecdFieldInfo) = match preferFlag with | None -> rfinfo.RecdField.Range | Some false -> rfinfo.RecdField.DefinitionRange | Some true -> rfinfo.RecdField.SigRange - let rec rangeOfItem (g:TcGlobals) preferFlag d = + let rec rangeOfItem (g: TcGlobals) preferFlag d = match d with | Item.Value vref | Item.CustomBuilder (_, vref) -> Some (rangeOfValRef preferFlag vref) | Item.UnionCase(ucinfo, _) -> Some (rangeOfUnionCaseInfo preferFlag ucinfo) @@ -384,13 +384,13 @@ module internal SymbolHelpers = | Item.NewDef _ -> None // Provided type definitions do not have a useful F# CCU for the purposes of goto-definition. - let computeCcuOfTyconRef (tcref:TyconRef) = + let computeCcuOfTyconRef (tcref: TyconRef) = #if !NO_EXTENSIONTYPING if tcref.IsProvided then None else #endif ccuOfTyconRef tcref - let ccuOfMethInfo (g:TcGlobals) (minfo:MethInfo) = + let ccuOfMethInfo (g: TcGlobals) (minfo: MethInfo) = match minfo with | DefaultStructCtor(_, AppTy g (tcref, _)) -> computeCcuOfTyconRef tcref | _ -> @@ -399,7 +399,7 @@ module internal SymbolHelpers = |> Option.orElseWith (fun () -> minfo.DeclaringTyconRef |> computeCcuOfTyconRef) - let rec ccuOfItem (g:TcGlobals) d = + let rec ccuOfItem (g: TcGlobals) d = match d with | Item.Value vref | Item.CustomBuilder (_, vref) -> ccuOfValRef vref | Item.UnionCase(ucinfo, _) -> computeCcuOfTyconRef ucinfo.TyconRef @@ -433,7 +433,7 @@ module internal SymbolHelpers = | _ -> None /// Work out the source file for an item and fix it up relative to the CCU if it is relative. - let fileNameOfItem (g:TcGlobals) (qualProjectDir: string option) (m:range) (h:Item) = + let fileNameOfItem (g: TcGlobals) (qualProjectDir: string option) (m:range) (h:Item) = let file = m.FileName if verbose then dprintf "file stored in metadata is '%s'\n" file #if FABLE_COMPILER @@ -473,7 +473,7 @@ module internal SymbolHelpers = | _ -> [] // Find the name of the metadata file for this external definition - let metaInfoOfEntityRef (infoReader:InfoReader) m tcref = + let metaInfoOfEntityRef (infoReader: InfoReader) m tcref = let g = infoReader.g match tcref with | ERefLocal _ -> None @@ -492,7 +492,7 @@ module internal SymbolHelpers = | Some (Some(fileName), xmlDocSig) -> FSharpXmlDoc.XmlDocFileSignature(fileName, xmlDocSig) | _ -> FSharpXmlDoc.None - let GetXmlDocSigOfEntityRef infoReader m (eref:EntityRef) = + let GetXmlDocSigOfEntityRef infoReader m (eref: EntityRef) = if eref.IsILTycon then match metaInfoOfEntityRef infoReader m eref with | None -> None @@ -504,7 +504,7 @@ module internal SymbolHelpers = m.XmlDocSig <- XmlDocSigOfEntity eref Some (ccuFileName, m.XmlDocSig) - let GetXmlDocSigOfScopedValRef g (tcref:TyconRef) (vref:ValRef) = + let GetXmlDocSigOfScopedValRef g (tcref: TyconRef) (vref: ValRef) = let ccuFileName = libFileOfEntityRef tcref let v = vref.Deref if v.XmlDocSig = "" && v.HasDeclaringEntity then @@ -518,21 +518,21 @@ module internal SymbolHelpers = v.XmlDocSig <- XmlDocSigOfVal g path v Some (ccuFileName, v.XmlDocSig) - let GetXmlDocSigOfRecdFieldInfo (rfinfo:RecdFieldInfo) = + let GetXmlDocSigOfRecdFieldInfo (rfinfo: RecdFieldInfo) = let tcref = rfinfo.TyconRef let ccuFileName = libFileOfEntityRef tcref if rfinfo.RecdField.XmlDocSig = "" then rfinfo.RecdField.XmlDocSig <- XmlDocSigOfProperty [tcref.CompiledRepresentationForNamedType.FullName; rfinfo.Name] Some (ccuFileName, rfinfo.RecdField.XmlDocSig) - let GetXmlDocSigOfUnionCaseInfo (ucinfo:UnionCaseInfo) = + let GetXmlDocSigOfUnionCaseInfo (ucinfo: UnionCaseInfo) = let tcref = ucinfo.TyconRef let ccuFileName = libFileOfEntityRef tcref if ucinfo.UnionCase.XmlDocSig = "" then ucinfo.UnionCase.XmlDocSig <- XmlDocSigOfUnionCase [tcref.CompiledRepresentationForNamedType.FullName; ucinfo.Name] Some (ccuFileName, ucinfo.UnionCase.XmlDocSig) - let GetXmlDocSigOfMethInfo (infoReader:InfoReader) m (minfo:MethInfo) = + let GetXmlDocSigOfMethInfo (infoReader: InfoReader) m (minfo: MethInfo) = let amap = infoReader.amap match minfo with | FSMeth (g, _, vref, _) -> @@ -563,7 +563,7 @@ module internal SymbolHelpers = | ProvidedMeth _ -> None #endif - let GetXmlDocSigOfValRef g (vref:ValRef) = + let GetXmlDocSigOfValRef g (vref: ValRef) = if not vref.IsLocalRef then let ccuFileName = vref.nlr.Ccu.FileName let v = vref.Deref @@ -590,7 +590,7 @@ module internal SymbolHelpers = Some (ccuFileName, "P:"+formalTypeInfo.ILTypeRef.FullName+"."+pdef.Name+XmlDocArgsEnc g (formalTypars, []) (filpinfo.GetParamTypes(infoReader.amap, m))) | _ -> None - let GetXmlDocSigOfEvent infoReader m (einfo:EventInfo) = + let GetXmlDocSigOfEvent infoReader m (einfo: EventInfo) = match einfo with | ILEvent _ -> match metaInfoOfEntityRef infoReader m einfo.DeclaringTyconRef with @@ -599,14 +599,14 @@ module internal SymbolHelpers = | _ -> None | _ -> None - let GetXmlDocSigOfILFieldInfo infoReader m (finfo:ILFieldInfo) = + let GetXmlDocSigOfILFieldInfo infoReader m (finfo: ILFieldInfo) = match metaInfoOfEntityRef infoReader m finfo.DeclaringTyconRef with | Some (ccuFileName, _, formalTypeInfo) -> Some(ccuFileName, "F:"+formalTypeInfo.ILTypeRef.FullName+"."+finfo.FieldName) | _ -> None /// This function gets the signature to pass to Visual Studio to use its lookup functions for .NET stuff. - let GetXmlDocHelpSigOfItemForLookup (infoReader:InfoReader) m d = + let GetXmlDocHelpSigOfItemForLookup (infoReader: InfoReader) m d = let g = infoReader.g match d with @@ -636,14 +636,14 @@ module internal SymbolHelpers = | _ -> FSharpXmlDoc.None /// Produce an XmlComment with a signature or raw text, given the F# comment and the item - let GetXmlCommentForItemAux (xmlDoc:XmlDoc option) (infoReader:InfoReader) m d = + let GetXmlCommentForItemAux (xmlDoc: XmlDoc option) (infoReader: InfoReader) m d = let result = match xmlDoc with | None | Some (XmlDoc [| |]) -> "" | Some (XmlDoc l) -> bufs (fun os -> - bprintf os "\n"; - l |> Array.iter (fun (s:string) -> + bprintf os "\n" + l |> Array.iter (fun (s: string) -> // Note: this code runs for local/within-project xmldoc tooltips, but not for cross-project or .XML bprintf os "\n%s" s)) @@ -655,14 +655,17 @@ module internal SymbolHelpers = let mutable ToolTipFault = None let GetXmlCommentForMethInfoItem infoReader m d (minfo: MethInfo) = - GetXmlCommentForItemAux (if minfo.HasDirectXmlComment || minfo.XmlDoc.NonEmpty then Some minfo.XmlDoc else None) infoReader m d + if minfo.HasDirectXmlComment || minfo.XmlDoc.NonEmpty then + GetXmlCommentForItemAux (Some minfo.XmlDoc) infoReader m d + else + mkXmlComment (GetXmlDocSigOfMethInfo infoReader m minfo) let FormatTyparMapping denv (prettyTyparInst: TyparInst) = [ for (tp, ty) in prettyTyparInst -> wordL (tagTypeParameter ("'" + tp.DisplayName)) ^^ wordL (tagText (FSComp.SR.descriptionWordIs())) ^^ NicePrint.layoutType denv ty ] /// Generate the structured tooltip for a method info - let FormatOverloadsToList (infoReader:InfoReader) m denv (item: ItemWithInst) minfos : FSharpStructuredToolTipElement = + let FormatOverloadsToList (infoReader: InfoReader) m denv (item: ItemWithInst) minfos : FSharpStructuredToolTipElement = ToolTipFault |> Option.iter (fun msg -> let exn = Error((0, msg), range.Zero) let ph = PhasedDiagnostic.Create(exn, BuildPhase.TypeCheck) @@ -678,8 +681,8 @@ module internal SymbolHelpers = FSharpStructuredToolTipElement.Group(layouts) - let pubpathOfValRef (v:ValRef) = v.PublicPath - let pubpathOfTyconRef (x:TyconRef) = x.PublicPath + let pubpathOfValRef (v: ValRef) = v.PublicPath + let pubpathOfTyconRef (x: TyconRef) = x.PublicPath let (|ItemWhereTypIsPreferred|_|) item = @@ -869,11 +872,11 @@ module internal SymbolHelpers = items |> List.filter (fun item -> not (IsExplicitlySuppressed g item.Item)) let SimplerDisplayEnv denv = - { denv with suppressInlineKeyword=true; - shortConstraints=true; - showConstraintTyparAnnotations=false; - abbreviateAdditionalConstraints=false; - suppressNestedTypes=true; + { denv with suppressInlineKeyword=true + shortConstraints=true + showConstraintTyparAnnotations=false + abbreviateAdditionalConstraints=false + suppressNestedTypes=true maxMembers=Some EnvMisc2.maxMembers } let rec FullNameOfItem g item = @@ -918,7 +921,7 @@ module internal SymbolHelpers = | Item.Property(_, []) -> "" /// Output a the description of a language item - let rec GetXmlCommentForItem (infoReader:InfoReader) m item = + let rec GetXmlCommentForItem (infoReader: InfoReader) m item = let g = infoReader.g match item with | Item.ImplicitOp(_, { contents = Some(TraitConstraintSln.FSMethSln(_, vref, _)) }) -> @@ -998,7 +1001,7 @@ module internal SymbolHelpers = with _ -> false /// Output the quick info information of a language item - let rec FormatItemDescriptionToToolTipElement isListItem (infoReader:InfoReader) m denv (item: ItemWithInst) = + let rec FormatItemDescriptionToToolTipElement isListItem (infoReader: InfoReader) m denv (item: ItemWithInst) = let g = infoReader.g let amap = infoReader.amap let denv = SimplerDisplayEnv denv diff --git a/src/fcs-fable/src/fsharp/symbols/Symbols.fs b/src/fcs-fable/src/fsharp/symbols/Symbols.fs index 5111f4bb6f..5c1b19378a 100755 --- a/src/fcs-fable/src/fsharp/symbols/Symbols.fs +++ b/src/fcs-fable/src/fsharp/symbols/Symbols.fs @@ -90,7 +90,7 @@ module Impl = let entityIsUnresolved(entity:EntityRef) = match entity with | ERefNonLocal(NonLocalEntityRef(ccu, _)) -> - ccu.IsUnresolvedReference && ValueOptionInternal.isNone entity.TryDeref + ccu.IsUnresolvedReference && entity.TryDeref.IsNone | _ -> false let checkEntityIsResolved(entity:EntityRef) = @@ -294,6 +294,9 @@ type FSharpSymbol(cenv: SymbolEnv, item: (unit -> Item), access: (FSharpSymbol - | Item.ArgName(id, ty, _) -> FSharpParameter(cenv, ty, {Attribs=[]; Name=Some id}, Some id.idRange, isParamArrayArg=false, isInArg=false, isOutArg=false, isOptionalArg=false) :> _ + | Item.ImplicitOp(_, { contents = Some(TraitConstraintSln.FSMethSln(_, vref, _)) }) -> + FSharpMemberOrFunctionOrValue(cenv, V vref, item) :> _ + // TODO: the following don't currently return any interesting subtype | Item.ImplicitOp _ | Item.ILField _ @@ -321,7 +324,7 @@ type FSharpSymbol(cenv: SymbolEnv, item: (unit -> Item), access: (FSharpSymbol - and FSharpEntity(cenv: SymbolEnv, entity:EntityRef) = inherit FSharpSymbol(cenv, (fun () -> - checkEntityIsResolved(entity); + checkEntityIsResolved(entity) if entity.IsModuleOrNamespace then Item.ModuleOrNamespaces [entity] else Item.UnqualifiedType [entity]), (fun _this thisCcu2 ad -> @@ -762,11 +765,11 @@ and FSharpUnionCase(cenv, v: UnionCaseRef) = let isUnresolved() = - entityIsUnresolved v.TyconRef || ValueOptionInternal.isNone v.TryUnionCase + entityIsUnresolved v.TyconRef || v.TryUnionCase.IsNone let checkIsResolved() = checkEntityIsResolved v.TyconRef - if ValueOptionInternal.isNone v.TryUnionCase then + if v.TryUnionCase.IsNone then invalidOp (sprintf "The union case '%s' could not be found in the target type" v.CaseName) member __.IsUnresolved = @@ -881,8 +884,8 @@ and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = d.TryDeclaringTyconRef |> Option.exists entityIsUnresolved || match d with | AnonField _ -> false - | RecdOrClass v -> ValueOptionInternal.isNone v.TryRecdField - | Union (v, _) -> ValueOptionInternal.isNone v.TryUnionCase + | RecdOrClass v -> v.TryRecdField.IsNone + | Union (v, _) -> v.TryUnionCase.IsNone | ILField _ -> false let checkIsResolved() = @@ -890,10 +893,10 @@ and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = match d with | AnonField _ -> () | RecdOrClass v -> - if ValueOptionInternal.isNone v.TryRecdField then + if v.TryRecdField.IsNone then invalidOp (sprintf "The record field '%s' could not be found in the target type" v.FieldName) | Union (v, _) -> - if ValueOptionInternal.isNone v.TryUnionCase then + if v.TryUnionCase.IsNone then invalidOp (sprintf "The union case '%s' could not be found in the target type" v.CaseName) | ILField _ -> () @@ -1058,7 +1061,7 @@ and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = match d, uc.V with | RecdOrClass r1, RecdOrClass r2 -> recdFieldRefOrder.Compare(r1, r2) = 0 | Union (u1, n1), Union (u2, n2) -> cenv.g.unionCaseRefEq u1 u2 && n1 = n2 - | AnonField (anonInfo1, _, _, _) , AnonField (anonInfo2, _, _, _) -> x.Name = uc.Name && anonInfoEquiv anonInfo1 anonInfo2 + | AnonField (anonInfo1, _, _, _), AnonField (anonInfo2, _, _, _) -> x.Name = uc.Name && anonInfoEquiv anonInfo1 anonInfo2 | _ -> false | _ -> false @@ -1389,7 +1392,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item2) = let isUnresolved() = match fsharpInfo() with | None -> false - | Some v -> ValueOptionInternal.isNone v.TryDeref + | Some v -> v.TryDeref.IsNone let checkIsResolved() = if isUnresolved() then @@ -1991,7 +1994,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item2) = member x.IsValCompiledAsMethod = match d with #if !FABLE_COMPILER - | V valRef -> IlxGen.IsValCompiledAsMethod cenv.g valRef.Deref + | V valRef -> IlxGen.IsFSharpValCompiledAsMethod cenv.g valRef.Deref #endif | _ -> false diff --git a/src/fcs-fable/src/fsharp/tast.fs b/src/fcs-fable/src/fsharp/tast.fs index 0c8a2643de..f195a7a94a 100644 --- a/src/fcs-fable/src/fsharp/tast.fs +++ b/src/fcs-fable/src/fsharp/tast.fs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. //------------------------------------------------------------------------- // Defines the typed abstract syntax trees used throughout the F# compiler. @@ -53,14 +53,14 @@ let newStamp = let i = ref 0L in fun () -> System.Threading.Interlocked.Incremen #endif /// A global generator of compiler generated names -// ++GLOBAL MUTABLE STATE (concurrency safe by locking inside NiceNameGenerator) +// ++GLOBAL MUTABLE STATE (concurrency safe by locking inside NiceNameGenerator) let globalNng = NiceNameGenerator() /// A global generator of stable compiler generated names // ++GLOBAL MUTABLE STATE (concurrency safe by locking inside StableNiceNameGenerator) let globalStableNameGenerator = StableNiceNameGenerator () -type StampMap<'T> = Map +type StampMap<'T> = Map //------------------------------------------------------------------------- // Flags @@ -96,7 +96,7 @@ type ValRecursiveScopeInfo = /// The normal value for this flag when the value is not within its recursive scope | ValNotInRecScope -type ValMutability = +type ValMutability = | Immutable | Mutable @@ -127,7 +127,7 @@ type ValBaseOrThisInfo = [] /// Flags on values -type ValFlags(flags:int64) = +type ValFlags(flags: int64) = new (recValInfo, baseOrThis, isCompGen, inlineInfo, isMutable, isModuleOrMemberBinding, isExtensionMember, isIncrClassSpecialMember, isTyFunc, allowTypeInst, isGeneratedEventVal) = let flags = @@ -319,9 +319,9 @@ type TyparRigidity = /// Encode typar flags into a bit field [] -type TyparFlags(flags:int32) = +type TyparFlags(flags: int32) = - new (kind:TyparKind, rigidity:TyparRigidity, isFromError:bool, isCompGen:bool, staticReq:TyparStaticReq, dynamicReq:TyparDynamicReq, equalityDependsOn: bool, comparisonDependsOn: bool) = + new (kind: TyparKind, rigidity: TyparRigidity, isFromError: bool, isCompGen: bool, staticReq: TyparStaticReq, dynamicReq: TyparDynamicReq, equalityDependsOn: bool, comparisonDependsOn: bool) = TyparFlags((if isFromError then 0b00000000000000010 else 0) ||| (if isCompGen then 0b00000000000000100 else 0) ||| (match staticReq with @@ -351,7 +351,7 @@ type TyparFlags(flags:int32) = member x.IsCompilerGenerated = (flags &&& 0b00000000000000100) <> 0x0 /// Indicates if the type variable has a static "head type" requirement, i.e. ^a variables used in FSharp.Core and member constraints. - member x.StaticReq = + member x.StaticReq = match (flags &&& 0b00000000000001000) with | 0b00000000000000000 -> NoStaticReq | 0b00000000000001000 -> HeadTypeStaticReq @@ -369,7 +369,7 @@ type TyparFlags(flags:int32) = | _ -> failwith "unreachable" /// Indicates whether a type variable can be instantiated by types or units-of-measure. - member x.Kind = + member x.Kind = match (flags &&& 0b00001000100000000) with | 0b00000000000000000 -> TyparKind.Type | 0b00000000100000000 -> TyparKind.Measure @@ -381,7 +381,7 @@ type TyparFlags(flags:int32) = (flags &&& 0b00000001000000000) <> 0x0 /// Indicates if a type parameter is needed at runtime and may not be eliminated - member x.DynamicReq = + member x.DynamicReq = match (flags &&& 0b00000010000000000) with | 0b00000000000000000 -> TyparDynamicReq.No | 0b00000010000000000 -> TyparDynamicReq.Yes @@ -402,11 +402,11 @@ type TyparFlags(flags:int32) = TyparFlags(flags &&& ~~~0b00010000000000000) /// Get the flags as included in the F# binary metadata. We pickle this as int64 to allow for future expansion - member x.PickledBits = flags + member x.PickledBits = flags /// Encode entity flags into a bit field. We leave lots of space to allow for future expansion. [] -type EntityFlags(flags:int64) = +type EntityFlags(flags: int64) = new (usesPrefixDisplay, isModuleOrNamespace, preEstablishedHasDefaultCtor, hasSelfReferentialCtor, isStructRecordOrUnionType) = EntityFlags((if isModuleOrNamespace then 0b000000000000001L else 0L) ||| @@ -418,7 +418,7 @@ type EntityFlags(flags:int64) = /// Indicates the Entity is actually a module or namespace, not a type definition member x.IsModuleOrNamespace = (flags &&& 0b000000000000001L) <> 0x0L - /// Indicates the type prefers the "tycon" syntax for display etc. + /// Indicates the type prefers the "tycon" syntax for display etc. member x.IsPrefixDisplay = (flags &&& 0b000000000000010L) <> 0x0L // This bit is not pickled, only used while establishing a type constructor. It is needed because the type constructor @@ -491,9 +491,9 @@ let KeyTyconByAccessNames nm x = match TryDemangleGenericNameAndPos nm with | ValueSome pos -> let dnm = DemangleGenericTypeNameWithPos pos nm - [| KeyValuePair(nm,x); KeyValuePair(dnm,x) |] + [| KeyValuePair(nm, x); KeyValuePair(dnm, x) |] | _ -> - [| KeyValuePair(nm,x) |] + [| KeyValuePair(nm, x) |] type ModuleOrNamespaceKind = @@ -513,7 +513,7 @@ let getNameOfScopeRef sref = | ILScopeRef.Assembly aref -> aref.Name #if !NO_EXTENSIONTYPING -let ComputeDefinitionLocationOfProvidedItem (p : Tainted<#IProvidedCustomAttributeProvider>) = +let ComputeDefinitionLocationOfProvidedItem (p: Tainted<#IProvidedCustomAttributeProvider>) = let attrs = p.PUntaintNoFailure(fun x -> x.GetDefinitionLocationAttribute(p.TypeProvider.PUntaintNoFailure(id))) match attrs with | None | Some (null, _, _) -> None @@ -521,13 +521,13 @@ let ComputeDefinitionLocationOfProvidedItem (p : Tainted<#IProvidedCustomAttribu // Coordinates from type provider are 1-based for lines and columns // Coordinates internally in the F# compiler are 1-based for lines and 0-based for columns let pos = Range.mkPos line (max 0 (column - 1)) - Range.mkRange filePath pos pos |> Some + Range.mkRange filePath pos pos |> Some #endif /// A public path records where a construct lives within the global namespace /// of a CCU. -type PublicPath = +type PublicPath = | PubPath of string[] member x.EnclosingPath = let (PubPath(pp)) = x @@ -539,22 +539,22 @@ type PublicPath = type CompilationPath = | CompPath of ILScopeRef * (string * ModuleOrNamespaceKind) list - member x.ILScopeRef = (let (CompPath(scoref,_)) = x in scoref) + member x.ILScopeRef = (let (CompPath(scoref, _)) = x in scoref) - member x.AccessPath = (let (CompPath(_,p)) = x in p) + member x.AccessPath = (let (CompPath(_, p)) = x in p) member x.MangledPath = List.map fst x.AccessPath - member x.NestedPublicPath (id:Ident) = PubPath(Array.append (Array.ofList x.MangledPath) [| id.idText |]) + member x.NestedPublicPath (id: Ident) = PubPath(Array.append (Array.ofList x.MangledPath) [| id.idText |]) member x.ParentCompPath = - let a,_ = List.frontAndBack x.AccessPath - CompPath(x.ILScopeRef,a) + let a, _ = List.frontAndBack x.AccessPath + CompPath(x.ILScopeRef, a) - member x.NestedCompPath n modKind = CompPath(x.ILScopeRef,x.AccessPath@[(n,modKind)]) + member x.NestedCompPath n modKind = CompPath(x.ILScopeRef, x.AccessPath@[(n, modKind)]) member x.DemangledPath = - x.AccessPath |> List.map (fun (nm,k) -> CompilationPath.DemangleEntityName nm k) + x.AccessPath |> List.map (fun (nm, k) -> CompilationPath.DemangleEntityName nm k) /// String 'Module' off an F# module name, if FSharpModuleWithSuffix is used static member DemangleEntityName nm k = @@ -577,14 +577,14 @@ type EntityOptionalData = mutable entity_other_range: (range * bool) option // MUTABILITY; used only when establishing tycons. - mutable entity_kind : TyparKind + mutable entity_kind: TyparKind /// The declared documentation for the type or module // MUTABILITY: only for unpickle linkage - mutable entity_xmldoc : XmlDoc + mutable entity_xmldoc: XmlDoc /// The XML document signature for this entity - mutable entity_xmldocsig : string + mutable entity_xmldocsig: string /// If non-None, indicates the type is an abbreviation for another type. // @@ -605,7 +605,7 @@ type EntityOptionalData = } [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = "EntityOptionalData(...)" @@ -613,10 +613,10 @@ and /// Represents a type definition, exception definition, module definition or [] Entity = { /// The declared type parameters of the type - // MUTABILITY; used only during creation and remapping of tycons + // MUTABILITY; used only during creation and remapping of tycons mutable entity_typars: LazyWithContext - mutable entity_flags : EntityFlags + mutable entity_flags: EntityFlags /// The unique stamp of the "tycon blob". Note the same tycon in signature and implementation get different stamps // MUTABILITY: only for unpickle linkage @@ -646,24 +646,24 @@ and /// Represents a type definition, exception definition, module definition or /// This field is used when the 'tycon' is really a module definition. It holds statically nested type definitions and nested modules // - // MUTABILITY: only used during creation and remapping of tycons and + // MUTABILITY: only used during creation and remapping of tycons and // when compiling fslib to fixup compiler forward references to internal items mutable entity_modul_contents: MaybeLazy /// The stable path to the type, e.g. Microsoft.FSharp.Core.FSharpFunc`2 // REVIEW: it looks like entity_cpath subsumes this // MUTABILITY: only for unpickle linkage - mutable entity_pubpath : PublicPath option + mutable entity_pubpath: PublicPath option /// The stable path to the type, e.g. Microsoft.FSharp.Core.FSharpFunc`2 // MUTABILITY: only for unpickle linkage - mutable entity_cpath : CompilationPath option + mutable entity_cpath: CompilationPath option /// Used during codegen to hold the ILX representation indicating how to access the type // MUTABILITY: only for unpickle linkage and caching - mutable entity_il_repr_cache : CompiledTypeRepr cache + mutable entity_il_repr_cache: CompiledTypeRepr cache - mutable entity_opt_data : EntityOptionalData option + mutable entity_opt_data: EntityOptionalData option } static member NewEmptyEntityOptData() = @@ -699,7 +699,7 @@ and /// Represents a type definition, exception definition, module definition or /// The display name of the namespace, module or type, e.g. List instead of List`1, and no static parameters member x.DisplayName = x.GetDisplayName(false, false) - /// The display name of the namespace, module or type with <_,_,_> added for generic types, plus static parameters if any + /// The display name of the namespace, module or type with <_, _, _> added for generic types, plus static parameters if any member x.DisplayNameWithStaticParametersAndUnderscoreTypars = x.GetDisplayName(true, true) /// The display name of the namespace, module or type, e.g. List instead of List`1, including static parameters if any @@ -708,7 +708,7 @@ and /// Represents a type definition, exception definition, module definition or #if !NO_EXTENSIONTYPING member x.IsStaticInstantiationTycon = x.IsProvidedErasedTycon && - let _nm,args = PrettyNaming.demangleProvidedTypeName x.LogicalName + let _nm, args = PrettyNaming.demangleProvidedTypeName x.LogicalName args.Length > 0 #endif @@ -726,7 +726,7 @@ and /// Represents a type definition, exception definition, module definition or #if !NO_EXTENSIONTYPING if x.IsProvidedErasedTycon then - let nm,args = PrettyNaming.demangleProvidedTypeName nm + let nm, args = PrettyNaming.demangleProvidedTypeName nm if withStaticParameters && args.Length > 0 then nm + "<" + String.concat "," (Array.map snd args) + ">" else @@ -745,8 +745,8 @@ and /// Represents a type definition, exception definition, module definition or match x.TypeReprInfo with | TProvidedTypeExtensionPoint info -> match ComputeDefinitionLocationOfProvidedItem info.ProvidedType with - | Some range -> range - | None -> x.entity_range + | Some range -> range + | None -> x.entity_range | _ -> #endif x.entity_range @@ -762,7 +762,7 @@ and /// Represents a type definition, exception definition, module definition or | Some { entity_other_range = Some (r, false) } -> r | _ -> x.Range - member x.SetOtherRange m = + member x.SetOtherRange m = match x.entity_opt_data with | Some optData -> optData.entity_other_range <- Some m | _ -> x.entity_opt_data <- Some { Entity.NewEmptyEntityOptData() with entity_other_range = Some m } @@ -883,7 +883,7 @@ and /// Represents a type definition, exception definition, module definition or | Some optData -> optData.entity_accessiblity | _ -> TAccess [] - /// Indicates the type prefers the "tycon" syntax for display etc. + /// Indicates the type prefers the "tycon" syntax for display etc. member x.IsPrefixDisplay = x.entity_flags.IsPrefixDisplay /// Indicates the Entity is actually a module or namespace, not a type definition @@ -936,14 +936,14 @@ and /// Represents a type definition, exception definition, module definition or member x.CompilationPath = match x.CompilationPathOpt with | Some cpath -> cpath - | None -> error(Error(FSComp.SR.tastTypeOrModuleNotConcrete(x.LogicalName),x.Range)) + | None -> error(Error(FSComp.SR.tastTypeOrModuleNotConcrete(x.LogicalName), x.Range)) /// Get a table of fields for all the F#-defined record, struct and class fields in this type definition, including /// static fields, 'val' declarations and hidden fields from the compilation of implicit class constructions. member x.AllFieldTable = match x.TypeReprInfo with | TRecdRepr x | TFSharpObjectRepr {fsobjmodel_rfields=x} -> x - | _ -> + | _ -> match x.ExceptionInfo with | TExnFresh x -> x | _ -> @@ -978,13 +978,13 @@ and /// Represents a type definition, exception definition, module definition or member x.GetFieldByName n = x.AllFieldTable.FieldByName n /// Indicate if this is a type whose r.h.s. is known to be a union type definition. - member x.IsUnionTycon = match x.TypeReprInfo with | TUnionRepr _ -> true | _ -> false + member x.IsUnionTycon = match x.TypeReprInfo with | TUnionRepr _ -> true | _ -> false /// Get the union cases and other union-type information for a type, if any member x.UnionTypeInfo = match x.TypeReprInfo with | TUnionRepr x -> ValueSome x - | _ -> ValueNone + | _ -> ValueNone /// Get the union cases for a type, if any member x.UnionCasesArray = @@ -998,7 +998,7 @@ and /// Represents a type definition, exception definition, module definition or /// Get a union case of a type by name member x.GetUnionCaseByName n = match x.UnionTypeInfo with - | ValueSome x -> NameMap.tryFind n x.CasesTable.CasesByName + | ValueSome x -> NameMap.tryFind n x.CasesTable.CasesByName | ValueNone -> None @@ -1019,22 +1019,22 @@ and /// Represents a type definition, exception definition, module definition or entity_opt_data = Unchecked.defaultof<_>} /// Create a new entity with the given backing data. Only used during unpickling of F# metadata. - static member New _reason (data: Entity) : Entity = data + static member New _reason (data: Entity) : Entity = data /// Link an entity based on empty, unlinked data to the given data. Only used during unpickling of F# metadata. member x.Link (tg: EntityData) = - x.entity_typars <- tg.entity_typars - x.entity_flags <- tg.entity_flags - x.entity_stamp <- tg.entity_stamp - x.entity_logical_name <- tg.entity_logical_name - x.entity_range <- tg.entity_range - x.entity_attribs <- tg.entity_attribs - x.entity_tycon_repr <- tg.entity_tycon_repr - x.entity_tycon_tcaug <- tg.entity_tycon_tcaug - x.entity_modul_contents <- tg.entity_modul_contents - x.entity_pubpath <- tg.entity_pubpath - x.entity_cpath <- tg.entity_cpath - x.entity_il_repr_cache <- tg.entity_il_repr_cache + x.entity_typars <- tg.entity_typars + x.entity_flags <- tg.entity_flags + x.entity_stamp <- tg.entity_stamp + x.entity_logical_name <- tg.entity_logical_name + x.entity_range <- tg.entity_range + x.entity_attribs <- tg.entity_attribs + x.entity_tycon_repr <- tg.entity_tycon_repr + x.entity_tycon_tcaug <- tg.entity_tycon_tcaug + x.entity_modul_contents <- tg.entity_modul_contents + x.entity_pubpath <- tg.entity_pubpath + x.entity_cpath <- tg.entity_cpath + x.entity_il_repr_cache <- tg.entity_il_repr_cache match tg.entity_opt_data with | Some tg -> x.entity_opt_data <- @@ -1057,68 +1057,68 @@ and /// Represents a type definition, exception definition, module definition or member x.FSharpObjectModelTypeInfo = match x.TypeReprInfo with | TFSharpObjectRepr x -> x - | _ -> failwith "not an F# object model type definition" + | _ -> failwith "not an F# object model type definition" /// Indicate if this is a type definition backed by Abstract IL metadata. - member x.IsILTycon = match x.TypeReprInfo with | TILObjectRepr _ -> true | _ -> false + member x.IsILTycon = match x.TypeReprInfo with | TILObjectRepr _ -> true | _ -> false /// Get the Abstract IL scope, nesting and metadata for this /// type definition, assuming it is backed by Abstract IL metadata. - member x.ILTyconInfo = match x.TypeReprInfo with | TILObjectRepr data -> data | _ -> failwith "not a .NET type definition" + member x.ILTyconInfo = match x.TypeReprInfo with | TILObjectRepr data -> data | _ -> failwith "not a .NET type definition" /// Get the Abstract IL metadata for this type definition, assuming it is backed by Abstract IL metadata. - member x.ILTyconRawMetadata = let (TILObjectReprData(_,_,td)) = x.ILTyconInfo in td + member x.ILTyconRawMetadata = let (TILObjectReprData(_, _, td)) = x.ILTyconInfo in td /// Indicates if this is an F# type definition whose r.h.s. is known to be a record type definition. - member x.IsRecordTycon = match x.TypeReprInfo with | TRecdRepr _ -> true | _ -> false + member x.IsRecordTycon = match x.TypeReprInfo with | TRecdRepr _ -> true | _ -> false /// 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. member x.IsStructRecordOrUnionTycon = match x.TypeReprInfo with TRecdRepr _ | TUnionRepr _ -> x.entity_flags.IsStructRecordOrUnionType | _ -> false /// The on-demand analysis about whether the entity has the IsByRefLike attribute - member x.TryIsByRefLike = x.entity_flags.TryIsByRefLike + member x.TryIsByRefLike = x.entity_flags.TryIsByRefLike /// Set the on-demand analysis about whether the entity has the IsByRefLike attribute - member x.SetIsByRefLike b = x.entity_flags <- x.entity_flags.WithIsByRefLike b + member x.SetIsByRefLike b = x.entity_flags <- x.entity_flags.WithIsByRefLike b /// These two bits represents the on-demand analysis about whether the entity has the IsReadOnly attribute or is otherwise determined to be a readonly struct - member x.TryIsReadOnly = x.entity_flags.TryIsReadOnly + member x.TryIsReadOnly = x.entity_flags.TryIsReadOnly /// Set the on-demand analysis about whether the entity has the IsReadOnly attribute or is otherwise determined to be a readonly struct - member x.SetIsReadOnly b = x.entity_flags <- x.entity_flags.WithIsReadOnly b + member x.SetIsReadOnly b = x.entity_flags <- x.entity_flags.WithIsReadOnly b /// Indicates if this is an F# type definition whose r.h.s. is known to be some kind of F# object model definition - member x.IsFSharpObjectModelTycon = match x.TypeReprInfo with | TFSharpObjectRepr _ -> true | _ -> false + member x.IsFSharpObjectModelTycon = match x.TypeReprInfo with | TFSharpObjectRepr _ -> true | _ -> false /// 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. - member x.IsAsmReprTycon = match x.TypeReprInfo with | TAsmRepr _ -> true | _ -> false + member x.IsAsmReprTycon = match x.TypeReprInfo with | TAsmRepr _ -> true | _ -> false /// 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. - member x.IsMeasureableReprTycon = match x.TypeReprInfo with | TMeasureableRepr _ -> true | _ -> false + member x.IsMeasureableReprTycon = match x.TypeReprInfo with | TMeasureableRepr _ -> true | _ -> false /// 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). - member x.IsHiddenReprTycon = match x.TypeAbbrev,x.TypeReprInfo with | None,TNoRepr -> true | _ -> false + member x.IsHiddenReprTycon = match x.TypeAbbrev, x.TypeReprInfo with | None, TNoRepr -> true | _ -> false /// Indicates if this is an F#-defined interface type definition member x.IsFSharpInterfaceTycon = x.IsFSharpObjectModelTycon && match x.FSharpObjectModelTypeInfo.fsobjmodel_kind with TTyconInterface -> true | _ -> false /// Indicates if this is an F#-defined delegate type definition - member x.IsFSharpDelegateTycon = x.IsFSharpObjectModelTycon && match x.FSharpObjectModelTypeInfo.fsobjmodel_kind with TTyconDelegate _ -> true | _ -> false + member x.IsFSharpDelegateTycon = x.IsFSharpObjectModelTycon && match x.FSharpObjectModelTypeInfo.fsobjmodel_kind with TTyconDelegate _ -> true | _ -> false /// Indicates if this is an F#-defined enum type definition - member x.IsFSharpEnumTycon = x.IsFSharpObjectModelTycon && match x.FSharpObjectModelTypeInfo.fsobjmodel_kind with TTyconEnum -> true | _ -> false + member x.IsFSharpEnumTycon = x.IsFSharpObjectModelTycon && match x.FSharpObjectModelTypeInfo.fsobjmodel_kind with TTyconEnum -> true | _ -> false /// Indicates if this is an F#-defined class type definition - member x.IsFSharpClassTycon = x.IsFSharpObjectModelTycon && match x.FSharpObjectModelTypeInfo.fsobjmodel_kind with TTyconClass -> true | _ -> false + member x.IsFSharpClassTycon = x.IsFSharpObjectModelTycon && match x.FSharpObjectModelTypeInfo.fsobjmodel_kind with TTyconClass -> true | _ -> false /// Indicates if this is a .NET-defined enum type definition - member x.IsILEnumTycon = x.IsILTycon && x.ILTyconRawMetadata.IsEnum + member x.IsILEnumTycon = x.IsILTycon && x.ILTyconRawMetadata.IsEnum /// Indicates if this is an enum type definition - member x.IsEnumTycon = + member x.IsEnumTycon = #if !NO_EXTENSIONTYPING match x.TypeReprInfo with | TProvidedTypeExtensionPoint info -> info.IsEnum @@ -1128,23 +1128,23 @@ and /// Represents a type definition, exception definition, module definition or x.IsILEnumTycon || x.IsFSharpEnumTycon - /// Indicates if this is an F#-defined struct or enum type definition , i.e. a value type definition + /// Indicates if this is an F#-defined struct or enum type definition, i.e. a value type definition member x.IsFSharpStructOrEnumTycon = match x.TypeReprInfo with | TRecdRepr _ -> x.IsStructRecordOrUnionTycon | TUnionRepr _ -> x.IsStructRecordOrUnionTycon | TFSharpObjectRepr info -> match info.fsobjmodel_kind with - | TTyconClass | TTyconInterface | TTyconDelegate _ -> false + | TTyconClass | TTyconInterface | TTyconDelegate _ -> false | TTyconStruct | TTyconEnum -> true | _ -> false - /// 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 struct or enum type definition, i.e. a value type definition member x.IsILStructOrEnumTycon = x.IsILTycon && x.ILTyconRawMetadata.IsStructOrEnum - /// Indicates if this is a struct or enum type definition , i.e. a value type definition + /// Indicates if this is a struct or enum type definition, i.e. a value type definition member x.IsStructOrEnumTycon = #if !NO_EXTENSIONTYPING match x.TypeReprInfo with @@ -1160,7 +1160,7 @@ and /// Represents a type definition, exception definition, module definition or /// Gets the immediate interface types of an F# type definition. Further interfaces may be supported through class and interface inheritance. member x.ImmediateInterfaceTypesOfFSharpTycon = - x.ImmediateInterfacesOfFSharpTycon |> List.map (fun (x,_,_) -> x) + x.ImmediateInterfacesOfFSharpTycon |> List.map (fun (x, _, _) -> x) /// 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 @@ -1190,16 +1190,16 @@ and /// Represents a type definition, exception definition, module definition or member x.AllGeneratedValues = [ match x.GeneratedCompareToValues with | None -> () - | Some (v1,v2) -> yield v1; yield v2 + | Some (v1, v2) -> yield v1; yield v2 match x.GeneratedCompareToWithComparerValues with | None -> () | Some v -> yield v match x.GeneratedHashAndEqualsValues with | None -> () - | Some (v1,v2) -> yield v1; yield v2 + | Some (v1, v2) -> yield v1; yield v2 match x.GeneratedHashAndEqualsWithComparerValues with | None -> () - | Some (v1,v2,v3) -> yield v1; yield v2; yield v3 ] + | Some (v1, v2, v3) -> yield v1; yield v2; yield v3 ] /// Gets the data indicating the compiled representation of a type or module in terms of Abstract IL data structures. @@ -1221,15 +1221,15 @@ and /// Represents a type definition, exception definition, module definition or | TProvidedNamespaceExtensionPoint _ -> failwith "No compiled representation for provided namespace" | _ -> #endif - let ilTypeRefForCompilationPath (CompPath(sref,p)) item = - let rec top racc p = + let ilTypeRefForCompilationPath (CompPath(sref, p)) item = + let rec top racc p = match p with - | [] -> ILTypeRef.Create(sref,[],textOfPath (List.rev (item::racc))) - | (h,istype)::t -> + | [] -> ILTypeRef.Create(sref, [], textOfPath (List.rev (item::racc))) + | (h, istype)::t -> match istype with | FSharpModuleWithSuffix | ModuleOrType -> let outerTypeName = (textOfPath (List.rev (h::racc))) - ILTypeRef.Create(sref, (outerTypeName :: List.map (fun (nm,_) -> nm) t),item) + ILTypeRef.Create(sref, (outerTypeName :: List.map (fun (nm, _) -> nm) t), item) | _ -> top (h::racc) t top [] p @@ -1238,7 +1238,7 @@ and /// Represents a type definition, exception definition, module definition or cached x.CompiledReprCache (fun () -> match x.ExceptionInfo with | TExnAbbrevRepr ecref2 -> ecref2.CompiledRepresentation - | TExnAsmRepr tref -> CompiledTypeRepr.ILAsmNamed(tref, AsObject, Some (mkILTy AsObject (mkILTySpec (tref,[])))) + | TExnAsmRepr tref -> CompiledTypeRepr.ILAsmNamed(tref, AsObject, Some (mkILTy AsObject (mkILTySpec (tref, [])))) | _ -> match x.TypeReprInfo with | TAsmRepr ty -> CompiledTypeRepr.ILAsmOpen ty @@ -1246,13 +1246,13 @@ and /// Represents a type definition, exception definition, module definition or let boxity = if x.IsStructOrEnumTycon then AsValue else AsObject let ilTypeRef = match x.TypeReprInfo with - | TILObjectRepr (TILObjectReprData(ilScopeRef,ilEnclosingTypeDefs,ilTypeDef)) -> IL.mkRefForNestedILTypeDef ilScopeRef (ilEnclosingTypeDefs, ilTypeDef) + | TILObjectRepr (TILObjectReprData(ilScopeRef, ilEnclosingTypeDefs, ilTypeDef)) -> IL.mkRefForNestedILTypeDef ilScopeRef (ilEnclosingTypeDefs, ilTypeDef) | _ -> ilTypeRefForCompilationPath x.CompilationPath x.CompiledName // Pre-allocate a ILType for monomorphic types, to reduce memory usage from Abstract IL nodes let ilTypeOpt = match x.TyparsNoRange with - | [] -> Some (mkILTy boxity (mkILTySpec (ilTypeRef,[]))) - | _ -> None + | [] -> Some (mkILTy boxity (mkILTySpec (ilTypeRef, []))) + | _ -> None CompiledTypeRepr.ILAsmNamed (ilTypeRef, boxity, ilTypeOpt)) /// Gets the data indicating the compiled representation of a named type or module in terms of Abstract IL data structures. @@ -1272,10 +1272,10 @@ and /// Represents a type definition, exception definition, module definition or member x.SetAttribs attribs = x.entity_attribs <- attribs /// Sets the structness of a record or union type definition - member x.SetIsStructRecordOrUnion b = let flags = x.entity_flags in x.entity_flags <- EntityFlags(flags.IsPrefixDisplay, flags.IsModuleOrNamespace, flags.PreEstablishedHasDefaultConstructor, flags.HasSelfReferentialConstructor, b) + member x.SetIsStructRecordOrUnion b = let flags = x.entity_flags in x.entity_flags <- EntityFlags(flags.IsPrefixDisplay, flags.IsModuleOrNamespace, flags.PreEstablishedHasDefaultConstructor, flags.HasSelfReferentialConstructor, b) [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = x.LogicalName @@ -1283,7 +1283,7 @@ and [] MaybeLazy<'T> = | Strict of 'T | Lazy of Lazy<'T> - member this.Value : 'T = + member this.Value: 'T = match this with | Strict x -> x | Lazy x -> x.Value @@ -1305,55 +1305,55 @@ and { /// This is the value implementing the auto-generated comparison /// semantics if any. It is not present if the type defines its own implementation /// of IComparable or if the type doesn't implement IComparable implicitly. - mutable tcaug_compare : (ValRef * ValRef) option + mutable tcaug_compare: (ValRef * ValRef) option /// This is the value implementing the auto-generated comparison /// semantics if any. It is not present if the type defines its own implementation /// of IStructuralComparable or if the type doesn't implement IComparable implicitly. - mutable tcaug_compare_withc : ValRef option + mutable tcaug_compare_withc: ValRef option /// This is the value implementing the auto-generated equality /// semantics if any. It is not present if the type defines its own implementation /// of Object.Equals or if the type doesn't override Object.Equals implicitly. - mutable tcaug_equals : (ValRef * ValRef) option + mutable tcaug_equals: (ValRef * ValRef) option /// This is the value implementing the auto-generated comparison /// semantics if any. It is not present if the type defines its own implementation /// of IStructuralEquatable or if the type doesn't implement IComparable implicitly. - mutable tcaug_hash_and_equals_withc : (ValRef * ValRef * ValRef) option + mutable tcaug_hash_and_equals_withc: (ValRef * ValRef * ValRef) option /// True if the type defined an Object.GetHashCode method. In this /// case we give a warning if we auto-generate a hash method since the semantics may not match up - mutable tcaug_hasObjectGetHashCode : bool + mutable tcaug_hasObjectGetHashCode: bool /// 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. - tcaug_adhoc_list : ResizeArray + tcaug_adhoc_list: ResizeArray /// Properties, methods etc. as lookup table - mutable tcaug_adhoc : NameMultiMap + mutable tcaug_adhoc: NameMultiMap /// Interface implementations - boolean indicates compiler-generated - mutable tcaug_interfaces : (TType * bool * range) list + mutable tcaug_interfaces: (TType * bool * range) list /// Super type, if any - mutable tcaug_super : TType option + mutable tcaug_super: TType option /// Set to true at the end of the scope where proper augmentations are allowed - mutable tcaug_closed : bool + mutable tcaug_closed: bool /// Set to true if the type is determined to be abstract - mutable tcaug_abstract : bool + mutable tcaug_abstract: bool } - member tcaug.SetCompare x = tcaug.tcaug_compare <- Some x + member tcaug.SetCompare x = tcaug.tcaug_compare <- Some x - member tcaug.SetCompareWith x = tcaug.tcaug_compare_withc <- Some x + member tcaug.SetCompareWith x = tcaug.tcaug_compare_withc <- Some x - member tcaug.SetEquals x = tcaug.tcaug_equals <- Some x + member tcaug.SetEquals x = tcaug.tcaug_equals <- Some x - member tcaug.SetHashAndEqualsWith x = tcaug.tcaug_hash_and_equals_withc <- Some x + member tcaug.SetHashAndEqualsWith x = tcaug.tcaug_hash_and_equals_withc <- Some x member tcaug.SetHasObjectGetHashCode b = tcaug.tcaug_hasObjectGetHashCode <- b @@ -1371,7 +1371,7 @@ and tcaug_abstract=false } [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = "TyconAugmentation(...)" @@ -1381,22 +1381,22 @@ and TyconRepresentation = /// Indicates the type is a class, struct, enum, delegate or interface - | TFSharpObjectRepr of TyconObjModelData + | TFSharpObjectRepr of TyconObjModelData /// Indicates the type is a record - | TRecdRepr of TyconRecdFields + | TRecdRepr of TyconRecdFields /// Indicates the type is a discriminated union - | TUnionRepr of TyconUnionData + | TUnionRepr of TyconUnionData /// Indicates the type is a type from a .NET assembly without F# metadata. - | TILObjectRepr of TILObjectReprData + | TILObjectRepr of TILObjectReprData /// Indicates the type is implemented as IL assembly code using the given closed Abstract IL type - | TAsmRepr of ILType + | TAsmRepr of ILType /// Indicates the type is parameterized on a measure (e.g. float<_>) but erases to some other type (e.g. float) - | TMeasureableRepr of TType + | TMeasureableRepr of TType #if !NO_EXTENSIONTYPING /// TProvidedTypeExtensionPoint @@ -1421,7 +1421,7 @@ and | TNoRepr //[] - //member x.DebugText = x.ToString() + //member x.DebugText = x.ToString() override x.ToString() = sprintf "%+A" x @@ -1432,7 +1432,7 @@ and | TILObjectReprData of ILScopeRef * ILTypeDef list * ILTypeDef [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = "TILObjectReprData(...)" @@ -1444,25 +1444,25 @@ and /// The information kept about a provided type TProvidedTypeInfo = { /// The parameters given to the provider that provided to this type. - ResolutionEnvironment : ExtensionTyping.ResolutionEnvironment + ResolutionEnvironment: ExtensionTyping.ResolutionEnvironment /// The underlying System.Type (wrapped as a ProvidedType to make sure we don't call random things on /// System.Type, and wrapped as Tainted to make sure we track which provider this came from, for reporting /// error messages) - ProvidedType: Tainted + ProvidedType: Tainted /// 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 LazyBaseType: LazyWithContext /// A flag read eagerly from the provided type and used to compute basic properties of the type definition. - IsClass: bool + IsClass: bool /// A flag read eagerly from the provided type and used to compute basic properties of the type definition. - IsSealed: bool + IsSealed: bool /// A flag read eagerly from the provided type and used to compute basic properties of the type definition. - IsInterface: bool + IsInterface: bool /// A flag read eagerly from the provided type and used to compute basic properties of the type definition. IsStructOrEnum: bool @@ -1482,16 +1482,16 @@ and IsErased: bool /// Indicates the type is generated, but type-relocation is suppressed - IsSuppressRelocate : bool } + IsSuppressRelocate: bool } member info.IsGenerated = not info.IsErased - member info.BaseTypeForErased (m,objTy) = - if info.IsErased then info.LazyBaseType.Force (m,objTy) + member info.BaseTypeForErased (m, objTy) = + if info.IsErased then info.LazyBaseType.Force (m, objTy) else failwith "expect erased type" [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = "TProvidedTypeInfo(...)" @@ -1516,7 +1516,7 @@ and member x.IsValueType = match x with - | TTyconClass | TTyconInterface | TTyconDelegate _ -> false + | TTyconClass | TTyconInterface | TTyconDelegate _ -> false | TTyconStruct | TTyconEnum -> true and @@ -1532,7 +1532,7 @@ and fsobjmodel_rfields: TyconRecdFields } [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = "TyconObjModelData(...)" @@ -1543,7 +1543,7 @@ and FieldsByIndex: RecdField[] /// The fields of the record, indexed by name. - FieldsByName : NameMap } + FieldsByName: NameMap } member x.FieldByIndex n = if n >= 0 && n < x.FieldsByIndex.Length then x.FieldsByIndex.[n] @@ -1558,7 +1558,7 @@ and member x.TrueInstanceFieldsAsList = x.AllFieldsAsList |> List.filter (fun f -> not f.IsStatic && not f.IsCompilerGenerated) [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = "TyconRecdFields(...)" @@ -1568,7 +1568,7 @@ and { /// The cases of the discriminated union, in declaration order. CasesByIndex: UnionCase[] /// The cases of the discriminated union, indexed by name. - CasesByName : NameMap + CasesByName: NameMap } member x.GetUnionCaseByIndex n = if n >= 0 && n < x.CasesByIndex.Length then x.CasesByIndex.[n] @@ -1577,7 +1577,7 @@ and member x.UnionCasesAsList = x.CasesByIndex |> Array.toList [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = "TyconUnionCases(...)" @@ -1593,7 +1593,7 @@ and member x.UnionCasesAsList = x.CasesTable.CasesByIndex |> Array.toList [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = "TyconUnionData(...)" @@ -1606,14 +1606,11 @@ and /// Return type constructed by the case. Normally exactly the type of the enclosing type, sometimes an abbreviation of it ReturnType: TType - /// Name of the case in generated IL code - CompiledName: string - /// Documentation for the case - XmlDoc : XmlDoc + XmlDoc: XmlDoc /// XML documentation signature for the case - mutable XmlDocSig : string + mutable XmlDocSig: string /// Name/range of the case Id: Ident @@ -1621,7 +1618,7 @@ and /// 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: used when propagating signature attributes into the implementation. - mutable OtherRangeOpt : (range * bool) option + mutable OtherRangeOpt: (range * bool) option /// Indicates the declared visibility of the union constructor, not taking signatures into account Accessibility: Accessibility @@ -1634,16 +1631,23 @@ and member uc.DefinitionRange = match uc.OtherRangeOpt with - | Some (m,true) -> m + | Some (m, true) -> m | _ -> uc.Range member uc.SigRange = match uc.OtherRangeOpt with - | Some (m,false) -> m + | Some (m, false) -> m | _ -> uc.Range member uc.DisplayName = uc.Id.idText + /// Name of the case in generated IL code. + member uc.CompiledName = + let idText = uc.Id.idText + if idText = opNameCons then "Cons" + elif idText = opNameNil then "Empty" + else idText + member uc.RecdFieldsArray = uc.FieldTable.FieldsByIndex member uc.RecdFields = uc.FieldTable.FieldsByIndex |> Array.toList @@ -1653,7 +1657,7 @@ and member uc.IsNullary = (uc.FieldTable.FieldsByIndex.Length = 0) [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = "UnionCase(" + x.DisplayName + ")" @@ -1666,10 +1670,10 @@ and rfield_mutable: bool /// Documentation for the field - rfield_xmldoc : XmlDoc + rfield_xmldoc: XmlDoc /// XML Documentation signature for the field - mutable rfield_xmldocsig : string + mutable rfield_xmldocsig: string /// The type of the field, w.r.t. the generic parameters of the enclosing type constructor rfield_type: TType @@ -1760,20 +1764,20 @@ and /// The default initialization info, for static literals member v.LiteralValue = - match v.rfield_const with + match v.rfield_const with | None -> None | Some Const.Zero -> None | Some k -> Some k /// Indicates if the field is zero-initialized member v.IsZeroInit = - match v.rfield_const with + match v.rfield_const with | None -> false | Some Const.Zero -> true | _ -> false [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = x.Name @@ -1794,7 +1798,7 @@ and // %+A formatting is used, so this is not needed //[] - //member x.DebugText = x.ToString() + //member x.DebugText = x.ToString() override x.ToString() = sprintf "%+A" x @@ -1811,15 +1815,23 @@ and [] // We should probably change to 'mutable'. // // We do not need to lock this mutable state this it is only ever accessed from the compiler thread. - let activePatternElemRefCache : NameMap option ref = ref None - let modulesByDemangledNameCache : NameMap option ref = ref None - let exconsByDemangledNameCache : NameMap option ref = ref None - let tyconsByDemangledNameAndArityCache: LayeredMap option ref = ref None - let tyconsByAccessNamesCache : LayeredMultiMap option ref = ref None - let tyconsByMangledNameCache : NameMap option ref = ref None - let allEntitiesByMangledNameCache : NameMap option ref = ref None - let allValsAndMembersByPartialLinkageKeyCache : MultiMap option ref = ref None - let allValsByLogicalNameCache : NameMap option ref = ref None + let activePatternElemRefCache: NameMap option ref = ref None + + let modulesByDemangledNameCache: NameMap option ref = ref None + + let exconsByDemangledNameCache: NameMap option ref = ref None + + let tyconsByDemangledNameAndArityCache: LayeredMap option ref = ref None + + let tyconsByAccessNamesCache: LayeredMultiMap option ref = ref None + + let tyconsByMangledNameCache: NameMap option ref = ref None + + let allEntitiesByMangledNameCache: NameMap option ref = ref None + + let allValsAndMembersByPartialLinkageKeyCache: MultiMap option ref = ref None + + let allValsByLogicalNameCache: NameMap option ref = ref None /// Namespace or module-compiled-as-type? member mtyp.ModuleOrNamespaceKind = kind @@ -1834,14 +1846,14 @@ and [] member mtyp.AllEntities = entities /// Mutation used during compilation of FSharp.Core.dll - member mtyp.AddModuleOrNamespaceByMutation(modul:ModuleOrNamespace) = + member mtyp.AddModuleOrNamespaceByMutation(modul: ModuleOrNamespace) = entities <- QueueList.appendOne entities modul modulesByDemangledNameCache := None allEntitiesByMangledNameCache := None #if !NO_EXTENSIONTYPING /// Mutation used in hosting scenarios to hold the hosted types in this module or namespace - member mtyp.AddProvidedTypeEntity(entity:Entity) = + member mtyp.AddProvidedTypeEntity(entity: Entity) = entities <- QueueList.appendOne entities entity tyconsByMangledNameCache := None tyconsByDemangledNameAndArityCache := None @@ -1850,50 +1862,50 @@ and [] #endif /// Return a new module or namespace type with an entity added. - member mtyp.AddEntity(tycon:Tycon) = + member mtyp.AddEntity(tycon: Tycon) = ModuleOrNamespaceType(kind, vals, entities.AppendOne tycon) /// Return a new module or namespace type with a value added. - member mtyp.AddVal(vspec:Val) = + member mtyp.AddVal(vspec: Val) = ModuleOrNamespaceType(kind, vals.AppendOne vspec, entities) /// Get a table of the active patterns defined in this module. member mtyp.ActivePatternElemRefLookupTable = activePatternElemRefCache /// Get a list of types defined within this module, namespace or type. - member mtyp.TypeDefinitions = entities |> Seq.filter (fun x -> not x.IsExceptionDecl && not x.IsModuleOrNamespace) |> Seq.toList + member mtyp.TypeDefinitions = entities |> Seq.filter (fun x -> not x.IsExceptionDecl && not x.IsModuleOrNamespace) |> Seq.toList /// Get a list of F# exception definitions defined within this module, namespace or type. - member mtyp.ExceptionDefinitions = entities |> Seq.filter (fun x -> x.IsExceptionDecl) |> Seq.toList + member mtyp.ExceptionDefinitions = entities |> Seq.filter (fun x -> x.IsExceptionDecl) |> Seq.toList /// Get a list of module and namespace definitions defined within this module, namespace or type. member mtyp.ModuleAndNamespaceDefinitions = entities |> Seq.filter (fun x -> x.IsModuleOrNamespace) |> Seq.toList /// Get a list of type and exception definitions defined within this module, namespace or type. - member mtyp.TypeAndExceptionDefinitions = entities |> Seq.filter (fun x -> not x.IsModuleOrNamespace) |> Seq.toList + member mtyp.TypeAndExceptionDefinitions = entities |> Seq.filter (fun x -> not x.IsModuleOrNamespace) |> Seq.toList /// Get a table of types defined within this module, namespace or type. The /// table is indexed by both name and generic arity. This means that for generic - /// types "List`1", the entry (List,1) will be present. + /// types "List`1", the entry (List, 1) will be present. member mtyp.TypesByDemangledNameAndArity m = cacheOptRef tyconsByDemangledNameAndArityCache (fun () -> - LayeredMap.Empty.AddAndMarkAsCollapsible( mtyp.TypeAndExceptionDefinitions |> List.map (fun (tc:Tycon) -> KeyTyconByDemangledNameAndArity tc.LogicalName (tc.Typars m) tc) |> List.toArray)) + LayeredMap.Empty.AddAndMarkAsCollapsible( mtyp.TypeAndExceptionDefinitions |> List.map (fun (tc: Tycon) -> KeyTyconByDemangledNameAndArity tc.LogicalName (tc.Typars m) tc) |> List.toArray)) /// 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. member mtyp.TypesByAccessNames = cacheOptRef tyconsByAccessNamesCache (fun () -> - LayeredMultiMap.Empty.AddAndMarkAsCollapsible (mtyp.TypeAndExceptionDefinitions |> List.toArray |> Array.collect (fun (tc:Tycon) -> KeyTyconByAccessNames tc.LogicalName tc))) + LayeredMultiMap.Empty.AddAndMarkAsCollapsible (mtyp.TypeAndExceptionDefinitions |> List.toArray |> Array.collect (fun (tc: Tycon) -> KeyTyconByAccessNames tc.LogicalName tc))) // REVIEW: we can remove this lookup and use AllEntitiedByMangledName instead? member mtyp.TypesByMangledName = - let addTyconByMangledName (x:Tycon) tab = NameMap.add x.LogicalName x tab + let addTyconByMangledName (x: Tycon) tab = NameMap.add x.LogicalName x tab cacheOptRef tyconsByMangledNameCache (fun () -> - List.foldBack addTyconByMangledName mtyp.TypeAndExceptionDefinitions Map.empty) + List.foldBack addTyconByMangledName mtyp.TypeAndExceptionDefinitions Map.empty) /// Get a table of entities indexed by both logical and compiled names - member mtyp.AllEntitiesByCompiledAndLogicalMangledNames : NameMap = - let addEntityByMangledName (x:Entity) tab = + member mtyp.AllEntitiesByCompiledAndLogicalMangledNames: NameMap = + let addEntityByMangledName (x: Entity) tab = let name1 = x.LogicalName let name2 = x.CompiledName let tab = NameMap.add name1 x tab @@ -1901,17 +1913,17 @@ and [] else NameMap.add name2 x tab cacheOptRef allEntitiesByMangledNameCache (fun () -> - QueueList.foldBack addEntityByMangledName entities Map.empty) + QueueList.foldBack addEntityByMangledName entities Map.empty) /// Get a table of entities indexed by both logical name - member mtyp.AllEntitiesByLogicalMangledName : NameMap = - let addEntityByMangledName (x:Entity) tab = NameMap.add x.LogicalName x tab - QueueList.foldBack addEntityByMangledName entities Map.empty + member mtyp.AllEntitiesByLogicalMangledName: NameMap = + let addEntityByMangledName (x: Entity) tab = NameMap.add x.LogicalName x tab + QueueList.foldBack addEntityByMangledName entities Map.empty - /// Get a table of values and members indexed by partial linkage key, which includes name, the mangled name of the parent type (if any), + /// Get a table of values and members indexed by partial linkage key, which includes name, the mangled name of the parent type (if any), /// and the method argument count (if any). member mtyp.AllValsAndMembersByPartialLinkageKey = - let addValByMangledName (x:Val) tab = + let addValByMangledName (x: Val) tab = if x.IsCompiledAsTopLevel then let key = x.GetLinkagePartialKey() MultiMap.add key x tab @@ -1921,17 +1933,17 @@ and [] QueueList.foldBack addValByMangledName vals MultiMap.empty) /// Try to find the member with the given linkage key in the given module. - member mtyp.TryLinkVal(ccu:CcuThunk,key:ValLinkageFullKey) = + member mtyp.TryLinkVal(ccu: CcuThunk, key: ValLinkageFullKey) = mtyp.AllValsAndMembersByPartialLinkageKey |> MultiMap.find key.PartialKey |> List.tryFind (fun v -> match key.TypeForLinkage with | None -> true - | Some keyTy -> ccu.MemberSignatureEquality(keyTy,v.Type)) + | Some keyTy -> ccu.MemberSignatureEquality(keyTy, v.Type)) |> ValueOptionInternal.ofOption /// Get a table of values indexed by logical name member mtyp.AllValsByLogicalName = - let addValByName (x:Val) tab = + let addValByName (x: Val) tab = // Note: names may occur twice prior to raising errors about this in PostTypeCheckSemanticChecks // Earlier ones take precedence since we report errors about the later ones if not x.IsMember && not x.IsCompilerGenerated then @@ -1943,7 +1955,7 @@ and [] /// Compute a table of values and members indexed by logical name. member mtyp.AllValsAndMembersByLogicalNameUncached = - let addValByName (x:Val) tab = + let addValByName (x: Val) tab = if not x.IsCompilerGenerated then MultiMap.add x.LogicalName x tab else @@ -1952,21 +1964,21 @@ and [] /// Get a table of F# exception definitions indexed by demangled name, so 'FailureException' is indexed by 'Failure' member mtyp.ExceptionDefinitionsByDemangledName = - let add (tycon:Tycon) acc = NameMap.add tycon.LogicalName tycon acc + let add (tycon: Tycon) acc = NameMap.add tycon.LogicalName tycon acc cacheOptRef exconsByDemangledNameCache (fun () -> - List.foldBack add mtyp.ExceptionDefinitions Map.empty) + List.foldBack add mtyp.ExceptionDefinitions Map.empty) /// Get a table of nested module and namespace fragments indexed by demangled name (so 'ListModule' becomes 'List') member mtyp.ModulesAndNamespacesByDemangledName = - let add (entity:Entity) acc = + let add (entity: Entity) acc = if entity.IsModuleOrNamespace then NameMap.add entity.DemangledModuleOrNamespaceName entity acc else acc cacheOptRef modulesByDemangledNameCache (fun () -> - QueueList.foldBack add entities Map.empty) + QueueList.foldBack add entities Map.empty) [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = "ModuleOrNamespaceType(...)" @@ -1984,24 +1996,24 @@ and Construct = #if !NO_EXTENSIONTYPING - static member NewProvidedTyconRepr(resolutionEnvironment,st:Tainted,importProvidedType,isSuppressRelocate,m) = + static member NewProvidedTyconRepr(resolutionEnvironment, st: Tainted, importProvidedType, isSuppressRelocate, m) = - let isErased = st.PUntaint((fun st -> st.IsErased),m) + let isErased = st.PUntaint((fun st -> st.IsErased), m) let lazyBaseTy = LazyWithContext.Create - ((fun (m,objTy) -> + ((fun (m, objTy) -> let baseSystemTy = st.PApplyOption((fun st -> match st.BaseType with null -> None | ty -> Some ty), m) match baseSystemTy with | None -> objTy - | Some t -> importProvidedType t), + | Some t -> importProvidedType t), ErrorLogger.findOriginalException) TProvidedTypeExtensionPoint { ResolutionEnvironment=resolutionEnvironment ProvidedType=st LazyBaseType=lazyBaseTy - UnderlyingTypeOfEnum = (fun () -> importProvidedType (st.PApply((fun st -> st.GetEnumUnderlyingType()),m))) + UnderlyingTypeOfEnum = (fun () -> importProvidedType (st.PApply((fun st -> st.GetEnumUnderlyingType()), m))) IsDelegate = (fun () -> st.PUntaint((fun st -> let baseType = st.BaseType match baseType with @@ -2017,24 +2029,17 @@ and Construct = IsErased = isErased IsSuppressRelocate = isSuppressRelocate } - static member NewProvidedTycon(resolutionEnvironment, st:Tainted, importProvidedType, isSuppressRelocate, m, ?access, ?cpath) = + static member NewProvidedTycon(resolutionEnvironment, st: Tainted, importProvidedType, isSuppressRelocate, m, ?access, ?cpath) = let stamp = newStamp() let name = st.PUntaint((fun st -> st.Name), m) - let id = ident (name,m) + let id = ident (name, m) let kind = let isMeasure = - st.PApplyWithProvider((fun (st,provider) -> - let findAttrib (ty:System.Type) (a:CustomAttributeData) = (a.Constructor.DeclaringType.FullName = ty.FullName) + st.PApplyWithProvider((fun (st, provider) -> + let findAttrib (ty: System.Type) (a: CustomAttributeData) = (a.Constructor.DeclaringType.FullName = ty.FullName) let ty = st.RawSystemType -#if FX_RESHAPED_REFLECTION - let ty = ty.GetTypeInfo() -#endif -#if FX_NO_CUSTOMATTRIBUTEDATA - provider.GetMemberCustomAttributesData(ty) -#else ignore provider ty.CustomAttributes -#endif |> Seq.exists (findAttrib typeof)), m) .PUntaintNoFailure(fun x -> x) if isMeasure then TyparKind.Measure else TyparKind.Type @@ -2047,8 +2052,8 @@ and Construct = match cpath with | None -> let ilScopeRef = st.TypeProviderAssemblyRef - let enclosingName = ExtensionTyping.GetFSharpPathToProvidedType(st,m) - CompPath(ilScopeRef,enclosingName |> List.map(fun id->id,ModuleOrNamespaceKind.Namespace)) + let enclosingName = ExtensionTyping.GetFSharpPathToProvidedType(st, m) + CompPath(ilScopeRef, enclosingName |> List.map(fun id->id, ModuleOrNamespaceKind.Namespace)) | Some p -> p let pubpath = cpath.NestedPublicPath id @@ -2058,7 +2063,7 @@ and Construct = { entity_stamp=stamp entity_logical_name=name entity_range=m - entity_flags=EntityFlags(usesPrefixDisplay=false, isModuleOrNamespace=false,preEstablishedHasDefaultCtor=false, hasSelfReferentialCtor=false, isStructRecordOrUnionType=false) + entity_flags=EntityFlags(usesPrefixDisplay=false, isModuleOrNamespace=false, preEstablishedHasDefaultCtor=false, hasSelfReferentialCtor=false, isStructRecordOrUnionType=false) entity_attribs=[] // fetched on demand via est.fs API entity_typars= LazyWithContext.NotLazy [] entity_tycon_repr = repr @@ -2074,7 +2079,7 @@ and Construct = | _ -> Some { Entity.NewEmptyEntityOptData() with entity_kind = kind; entity_accessiblity = access } } #endif - static member NewModuleOrNamespace cpath access (id:Ident) xml attribs mtype = + static member NewModuleOrNamespace cpath access (id: Ident) xml attribs mtype = let stamp = newStamp() // Put the module suffix on if needed Tycon.New "mspec" @@ -2082,11 +2087,11 @@ and Construct = entity_range = id.idRange entity_stamp=stamp entity_modul_contents = mtype - entity_flags=EntityFlags(usesPrefixDisplay=false, isModuleOrNamespace=true, preEstablishedHasDefaultCtor=false, hasSelfReferentialCtor=false,isStructRecordOrUnionType=false) + entity_flags=EntityFlags(usesPrefixDisplay=false, isModuleOrNamespace=true, preEstablishedHasDefaultCtor=false, hasSelfReferentialCtor=false, isStructRecordOrUnionType=false) entity_typars=LazyWithContext.NotLazy [] entity_tycon_repr = TNoRepr entity_tycon_tcaug=TyconAugmentation.Create() - entity_pubpath=cpath |> Option.map (fun (cp:CompilationPath) -> cp.NestedPublicPath id) + entity_pubpath=cpath |> Option.map (fun (cp: CompilationPath) -> cp.NestedPublicPath id) entity_cpath=cpath entity_attribs=attribs entity_il_repr_cache = newCache() @@ -2102,7 +2107,7 @@ and | TAccess of CompilationPath list [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = "Accessibility(...)" @@ -2115,7 +2120,7 @@ and /// The documentation for the type parameter. Empty for type inference variables. /// MUTABILITY: for linking when unpickling - mutable typar_xmldoc : XmlDoc + mutable typar_xmldoc: XmlDoc /// The inferred constraints for the type inference variable mutable typar_constraints: TyparConstraint list @@ -2125,7 +2130,7 @@ and } [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override __.ToString() = sprintf "TyparOptionalData(...)" @@ -2159,22 +2164,22 @@ and mutable typar_opt_data: TyparOptionalData option } /// The name of the type parameter - member x.Name = x.typar_id.idText + member x.Name = x.typar_id.idText /// The range of the identifier for the type parameter definition - member x.Range = x.typar_id.idRange + member x.Range = x.typar_id.idRange /// The identifier for a type parameter definition - member x.Id = x.typar_id + member x.Id = x.typar_id /// The unique stamp of the type parameter - member x.Stamp = x.typar_stamp + member x.Stamp = x.typar_stamp /// The inferred equivalence for the type inference variable, if any. - member x.Solution = x.typar_solution + member x.Solution = x.typar_solution /// The inferred constraints for the type inference variable, if any - member x.Constraints = + member x.Constraints = match x.typar_opt_data with | Some optData -> optData.typar_constraints | _ -> [] @@ -2184,10 +2189,10 @@ and /// 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. - member x.Rigidity = x.typar_flags.Rigidity + member x.Rigidity = x.typar_flags.Rigidity /// Indicates if a type parameter is needed at runtime and may not be eliminated - member x.DynamicReq = x.typar_flags.DynamicReq + member x.DynamicReq = x.typar_flags.DynamicReq /// Indicates that whether or not a generic type definition satisfies the equality constraint is dependent on whether this type variable satisfies the equality constraint. member x.EqualityConditionalOn = x.typar_flags.EqualityConditionalOn @@ -2196,30 +2201,30 @@ and member x.ComparisonConditionalOn = x.typar_flags.ComparisonConditionalOn /// Indicates if the type variable has a static "head type" requirement, i.e. ^a variables used in FSharp.Core and member constraints. - member x.StaticReq = x.typar_flags.StaticReq + member x.StaticReq = x.typar_flags.StaticReq /// Indicates if the type inference variable was generated after an error when type checking expressions or patterns - member x.IsFromError = x.typar_flags.IsFromError + member x.IsFromError = x.typar_flags.IsFromError /// Indicates that whether this type parameter is a compat-flex type parameter (i.e. where "expr :> tp" only emits an optional warning) - member x.IsCompatFlex = x.typar_flags.IsCompatFlex + member x.IsCompatFlex = x.typar_flags.IsCompatFlex /// Set whether this type parameter is a compat-flex type parameter (i.e. where "expr :> tp" only emits an optional warning) - member x.SetIsCompatFlex(b) = x.typar_flags <- x.typar_flags.WithCompatFlex(b) + member x.SetIsCompatFlex(b) = x.typar_flags <- x.typar_flags.WithCompatFlex(b) /// Indicates whether a type variable can be instantiated by types or units-of-measure. - member x.Kind = x.typar_flags.Kind + member x.Kind = x.typar_flags.Kind /// Indicates whether a type variable is erased in compiled .NET IL code, i.e. whether it is a unit-of-measure variable - member x.IsErased = match x.Kind with TyparKind.Type -> false | _ -> true + member x.IsErased = match x.Kind with TyparKind.Type -> false | _ -> true /// The declared attributes of the type parameter. Empty for type inference variables and parameters from .NET - member x.Attribs = + member x.Attribs = match x.typar_opt_data with | Some optData -> optData.typar_attribs | _ -> [] - member x.SetAttribs attribs = + member x.SetAttribs attribs = match attribs, x.typar_opt_data with | [], None -> () | [], Some { typar_il_name = None; typar_xmldoc = XmlDoc [||]; typar_constraints = [] } -> @@ -2227,17 +2232,17 @@ and | _, Some optData -> optData.typar_attribs <- attribs | _ -> x.typar_opt_data <- Some { typar_il_name = None; typar_xmldoc = XmlDoc.Empty; typar_constraints = []; typar_attribs = attribs } - member x.XmlDoc = + member x.XmlDoc = match x.typar_opt_data with | Some optData -> optData.typar_xmldoc | _ -> XmlDoc.Empty - member x.ILName = + member x.ILName = match x.typar_opt_data with | Some optData -> optData.typar_il_name | _ -> None - member x.SetILName il_name = + member x.SetILName il_name = match x.typar_opt_data with | Some optData -> optData.typar_il_name <- il_name | _ -> x.typar_opt_data <- Some { typar_il_name = il_name; typar_xmldoc = XmlDoc.Empty; typar_constraints = []; typar_attribs = [] } @@ -2256,7 +2261,7 @@ and /// Creates a type variable that contains empty data, and is not yet linked. Only used during unpickling of F# metadata. - static member NewUnlinked() : Typar = + static member NewUnlinked() : Typar = { typar_id = Unchecked.defaultof<_> typar_flags = Unchecked.defaultof<_> typar_stamp = -1L @@ -2302,25 +2307,25 @@ and member x.SetIdent id = x.typar_id <- id /// Sets the rigidity of a type variable - member x.SetRigidity b = let flags = x.typar_flags in x.typar_flags <- TyparFlags(flags.Kind, b, flags.IsFromError, flags.IsCompilerGenerated, flags.StaticReq, flags.DynamicReq, flags.EqualityConditionalOn, flags.ComparisonConditionalOn) + member x.SetRigidity b = let flags = x.typar_flags in x.typar_flags <- TyparFlags(flags.Kind, b, flags.IsFromError, flags.IsCompilerGenerated, flags.StaticReq, flags.DynamicReq, flags.EqualityConditionalOn, flags.ComparisonConditionalOn) /// Sets whether a type variable is compiler generated - member x.SetCompilerGenerated b = let flags = x.typar_flags in x.typar_flags <- TyparFlags(flags.Kind, flags.Rigidity, flags.IsFromError, b, flags.StaticReq, flags.DynamicReq, flags.EqualityConditionalOn, flags.ComparisonConditionalOn) + member x.SetCompilerGenerated b = let flags = x.typar_flags in x.typar_flags <- TyparFlags(flags.Kind, flags.Rigidity, flags.IsFromError, b, flags.StaticReq, flags.DynamicReq, flags.EqualityConditionalOn, flags.ComparisonConditionalOn) /// Sets whether a type variable has a static requirement - member x.SetStaticReq b = let flags = x.typar_flags in x.typar_flags <- TyparFlags(flags.Kind, flags.Rigidity, flags.IsFromError, flags.IsCompilerGenerated, b, flags.DynamicReq, flags.EqualityConditionalOn, flags.ComparisonConditionalOn) + member x.SetStaticReq b = let flags = x.typar_flags in x.typar_flags <- TyparFlags(flags.Kind, flags.Rigidity, flags.IsFromError, flags.IsCompilerGenerated, b, flags.DynamicReq, flags.EqualityConditionalOn, flags.ComparisonConditionalOn) /// Sets whether a type variable is required at runtime - member x.SetDynamicReq b = let flags = x.typar_flags in x.typar_flags <- TyparFlags(flags.Kind, flags.Rigidity, flags.IsFromError, flags.IsCompilerGenerated, flags.StaticReq, b , flags.EqualityConditionalOn, flags.ComparisonConditionalOn) + member x.SetDynamicReq b = let flags = x.typar_flags in x.typar_flags <- TyparFlags(flags.Kind, flags.Rigidity, flags.IsFromError, flags.IsCompilerGenerated, flags.StaticReq, b, flags.EqualityConditionalOn, flags.ComparisonConditionalOn) /// Sets whether the equality constraint of a type definition depends on this type variable - member x.SetEqualityDependsOn b = let flags = x.typar_flags in x.typar_flags <- TyparFlags(flags.Kind, flags.Rigidity, flags.IsFromError, flags.IsCompilerGenerated, flags.StaticReq, flags.DynamicReq, b , flags.ComparisonConditionalOn) + member x.SetEqualityDependsOn b = let flags = x.typar_flags in x.typar_flags <- TyparFlags(flags.Kind, flags.Rigidity, flags.IsFromError, flags.IsCompilerGenerated, flags.StaticReq, flags.DynamicReq, b, flags.ComparisonConditionalOn) /// Sets whether the comparison constraint of a type definition depends on this type variable member x.SetComparisonDependsOn b = let flags = x.typar_flags in x.typar_flags <- TyparFlags(flags.Kind, flags.Rigidity, flags.IsFromError, flags.IsCompilerGenerated, flags.StaticReq, flags.DynamicReq, flags.EqualityConditionalOn, b) [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = x.Name @@ -2328,13 +2333,13 @@ and [] TyparConstraint = /// Indicates a constraint that a type is a subtype of the given type - | CoercesTo of TType * range + | CoercesTo of TType * range /// Indicates a default value for an inference type variable should it be neither generalized nor solved - | DefaultsTo of int * TType * range + | DefaultsTo of int * TType * range /// Indicates a constraint that a type has a 'null' value - | SupportsNull of range + | SupportsNull of range /// Indicates a constraint that a type has a member with the given signature | MayResolveMember of TraitConstraintInfo * range @@ -2342,35 +2347,35 @@ and /// Indicates a constraint that a type is a non-Nullable value type /// These are part of .NET's model of generic constraints, and in order to /// generate verifiable code we must attach them to F# generalized type variables as well. - | IsNonNullableStruct of range + | IsNonNullableStruct of range /// Indicates a constraint that a type is a reference type - | IsReferenceType of range + | IsReferenceType of range /// Indicates 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 - | SimpleChoice of TTypes * range + | SimpleChoice of TTypes * range /// Indicates a constraint that a type has a parameterless constructor | RequiresDefaultConstructor of range /// Indicates a constraint that a type is an enum with the given underlying - | IsEnum of TType * range + | IsEnum of TType * range /// Indicates a constraint that a type implements IComparable, with special rules for some known structural container types - | SupportsComparison of range + | SupportsComparison of range /// Indicates 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 - | SupportsEquality of range + | SupportsEquality of range /// Indicates a constraint that a type is a delegate from the given tuple of args to the given return type - | IsDelegate of TType * TType * range + | IsDelegate of TType * TType * range /// Indicates a constraint that a type is .NET unmanaged type - | IsUnmanaged of range + | IsUnmanaged of range // %+A formatting is used, so this is not needed //[] - //member x.DebugText = x.ToString() + //member x.DebugText = x.ToString() override x.ToString() = sprintf "%+A" x @@ -2379,25 +2384,25 @@ and [] TraitConstraintInfo = - /// TTrait(tys,nm,memFlags,argtys,rty,colution) + /// TTrait(tys, nm, memFlags, argtys, rty, colution) /// /// Indicates the signature of a member constraint. Contains a mutable solution cell /// to store the inferred solution of the constraint. | TTrait of TTypes * string * MemberFlags * TTypes * TType option * TraitConstraintSln option ref /// Get the member name associated with the member constraint. - member x.MemberName = (let (TTrait(_,nm,_,_,_,_)) = x in nm) + member x.MemberName = (let (TTrait(_, nm, _, _, _, _)) = x in nm) /// Get the return type recorded in the member constraint. - member x.ReturnType = (let (TTrait(_,_,_,_,ty,_)) = x in ty) + member x.ReturnType = (let (TTrait(_, _, _, _, ty, _)) = x in ty) /// Get or set the solution of the member constraint during inference member x.Solution - with get() = (let (TTrait(_,_,_,_,_,sln)) = x in sln.Value) - and set v = (let (TTrait(_,_,_,_,_,sln)) = x in sln.Value <- v) + with get() = (let (TTrait(_, _, _, _, _, sln)) = x in sln.Value) + and set v = (let (TTrait(_, _, _, _, _, sln)) = x in sln.Value <- v) [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = "TTrait(" + x.MemberName + ")" @@ -2409,16 +2414,16 @@ and /// FSMethSln(ty, vref, minst) /// /// Indicates a trait is solved by an F# method. - /// ty -- the type and its instantiation - /// vref -- the method that solves the trait constraint + /// ty -- the type and its instantiation + /// vref -- the method that solves the trait constraint /// minst -- the generic method instantiation | FSMethSln of TType * ValRef * TypeInst /// 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 + /// 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 | FSRecdFieldSln of TypeInst * RecdFieldRef * bool @@ -2428,10 +2433,10 @@ and /// ILMethSln(ty, extOpt, ilMethodRef, minst) /// /// Indicates a trait is solved by a .NET method. - /// ty -- the type and its instantiation - /// extOpt -- information about an extension member, if any + /// ty -- the type and its instantiation + /// extOpt -- information about an extension member, if any /// ilMethodRef -- the method that solves the trait constraint - /// minst -- the generic method instantiation + /// minst -- the generic method instantiation | ILMethSln of TType * ILTypeRef option * ILMethodRef * TypeInst /// ClosedExprSln(expr) @@ -2444,7 +2449,7 @@ and // %+A formatting is used, so this is not needed //[] - //member x.DebugText = x.ToString() + //member x.DebugText = x.ToString() override x.ToString() = sprintf "%+A" x @@ -2452,7 +2457,7 @@ and and [] ValLinkagePartialKey = { /// The name of the type with which the member is associated. None for non-member values. - MemberParentMangledName : string option + MemberParentMangledName: string option /// Indicates if the member is an override. MemberIsOverride: bool @@ -2464,7 +2469,7 @@ and [] TotalArgCount: int } [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = "ValLinkagePartialKey(" + x.LogicalName + ")" @@ -2472,7 +2477,7 @@ and [] /// amongst all those in a ModuleOrNamespace. and [< (* NoEquality; NoComparison; *) StructuredFormatDisplay("{DebugText}")>] - ValLinkageFullKey(partialKey: ValLinkagePartialKey, typeForLinkage:TType option) = + ValLinkageFullKey(partialKey: ValLinkagePartialKey, typeForLinkage: TType option) = /// The partial information used to index the value in a ModuleOrNamespace. member x.PartialKey = partialKey @@ -2481,7 +2486,7 @@ and member x.TypeForLinkage = typeForLinkage [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = "ValLinkageFullKey(" + partialKey.LogicalName + ")" @@ -2517,7 +2522,7 @@ and /// XML documentation attached to a value. /// MUTABILITY: for unpickle linkage - mutable val_xmldoc : XmlDoc + mutable val_xmldoc: XmlDoc /// Is the value actually an instance method/property/event that augments /// a type, and if so what name does it take in the IL? @@ -2531,7 +2536,7 @@ and mutable val_declaring_entity: ParentRef /// XML documentation signature for the value - mutable val_xmldocsig : string + mutable val_xmldocsig: string /// 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. @@ -2539,7 +2544,7 @@ and } [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = "ValOptionalData(...)" @@ -2561,7 +2566,7 @@ and [] /// See vflags section further below for encoding/decodings here mutable val_flags: ValFlags - mutable val_opt_data : ValOptionalData option } + mutable val_opt_data: ValOptionalData option } static member NewEmptyValOptData() = { val_compiled_name = None @@ -2577,15 +2582,15 @@ and [] val_attribs = [] } /// Range of the definition (implementation) of the value, used by Visual Studio - member x.DefinitionRange = + member x.DefinitionRange = match x.val_opt_data with - | Some { val_other_range = Some(m,true) } -> m + | Some { val_other_range = Some(m, true) } -> m | _ -> x.val_range /// Range of the definition (signature) of the value, used by Visual Studio - member x.SigRange = + member x.SigRange = match x.val_opt_data with - | Some { val_other_range = Some(m,false) } -> m + | Some { val_other_range = Some(m, false) } -> m | _ -> x.val_range /// The place where the value was defined. @@ -2599,19 +2604,19 @@ and [] /// May be a type variable or type containing type variables during type inference. // // Note: this data is mutated during inference by adjustAllUsesOfRecValue when we replace the inferred type with a schema. - member x.Type = x.val_type + member x.Type = x.val_type /// How visible is this value, function or member? - member x.Accessibility = + member x.Accessibility = match x.val_opt_data with | Some optData -> optData.val_access - | _ -> TAccess [] + | _ -> TAccess [] /// The value of a value or member marked with [] - member x.LiteralValue = + member x.LiteralValue = match x.val_opt_data with | Some optData -> optData.val_const - | _ -> None + | _ -> None /// Records the "extra information" for a value compiled as a method. /// @@ -2628,12 +2633,12 @@ and [] /// /// TLR also sets this for inner bindings that it wants to /// represent as "top level" bindings. - member x.ValReprInfo : ValReprInfo option = + member x.ValReprInfo: ValReprInfo option = match x.val_opt_data with | Some optData -> optData.val_repr_info - | _ -> None + | _ -> None - member x.Id = ident(x.LogicalName,x.Range) + member x.Id = ident(x.LogicalName, x.Range) /// Is this represented as a "top level" static binding (i.e. a static field, static member, /// instance member), rather than an "inner" binding that may result in a closure. @@ -2643,7 +2648,7 @@ and [] /// binding to be IsCompiledAsTopLevel. Second, even immediately after type checking we expect /// some non-module, non-member bindings to be marked IsCompiledAsTopLevel, e.g. 'y' in /// 'let x = let y = 1 in y + y' (NOTE: check this, don't take it as gospel) - member x.IsCompiledAsTopLevel = x.ValReprInfo.IsSome + member x.IsCompiledAsTopLevel = x.ValReprInfo.IsSome /// The partial information used to index the methods of all those in a ModuleOrNamespace. member x.GetLinkagePartialKey() : ValLinkagePartialKey = @@ -2660,37 +2665,37 @@ and [] ValLinkageFullKey(key, (if x.IsMember then Some x.Type else None)) /// Is this a member definition or module definition? - member x.IsMemberOrModuleBinding = x.val_flags.IsMemberOrModuleBinding + member x.IsMemberOrModuleBinding = x.val_flags.IsMemberOrModuleBinding /// Indicates if this is an F#-defined extension member - member x.IsExtensionMember = x.val_flags.IsExtensionMember + member x.IsExtensionMember = x.val_flags.IsExtensionMember /// The quotation expression associated with a value given the [] tag - member x.ReflectedDefinition = + member x.ReflectedDefinition = match x.val_opt_data with | Some optData -> optData.val_defn - | _ -> None + | _ -> None /// Is this a member, if so some more data about the member. /// /// Note, the value may still be (a) an extension member or (b) and abstract slot without /// a true body. These cases are often causes of bugs in the compiler. - member x.MemberInfo = + member x.MemberInfo = match x.val_opt_data with | Some optData -> optData.val_member_info - | _ -> None + | _ -> None /// Indicates if this is a member - member x.IsMember = x.MemberInfo.IsSome + member x.IsMember = x.MemberInfo.IsSome /// Indicates if this is a member, excluding extension members - member x.IsIntrinsicMember = x.IsMember && not x.IsExtensionMember + member x.IsIntrinsicMember = x.IsMember && not x.IsExtensionMember /// Indicates if this is an F#-defined value in a module, or an extension member, but excluding compiler generated bindings from optimizations - member x.IsModuleBinding = x.IsMemberOrModuleBinding && not x.IsMember + member x.IsModuleBinding = x.IsMemberOrModuleBinding && not x.IsMember /// Indicates if this is something compiled into a module, i.e. a user-defined value, an extension member or a compiler-generated value - member x.IsCompiledIntoModule = x.IsExtensionMember || x.IsModuleBinding + member x.IsCompiledIntoModule = x.IsExtensionMember || x.IsModuleBinding /// Indicates if this is an F#-defined instance member. /// @@ -2699,25 +2704,25 @@ and [] member x.IsInstanceMember = x.IsMember && x.MemberInfo.Value.MemberFlags.IsInstance /// Indicates if this is an F#-defined 'new' constructor member - member x.IsConstructor = + member x.IsConstructor = match x.MemberInfo with | Some(memberInfo) when not x.IsExtensionMember && (memberInfo.MemberFlags.MemberKind = MemberKind.Constructor) -> true | _ -> false /// Indicates if this is a compiler-generated class constructor member - member x.IsClassConstructor = + member x.IsClassConstructor = match x.MemberInfo with | Some(memberInfo) when not x.IsExtensionMember && (memberInfo.MemberFlags.MemberKind = MemberKind.ClassConstructor) -> true | _ -> false /// Indicates if this value was a member declared 'override' or an implementation of an interface slot - member x.IsOverrideOrExplicitImpl = + member x.IsOverrideOrExplicitImpl = match x.MemberInfo with | Some(memberInfo) when memberInfo.MemberFlags.IsOverrideOrExplicitImpl -> true | _ -> false /// Indicates if this is declared 'mutable' - member x.IsMutable = (match x.val_flags.MutabilityInfo with Immutable -> false | Mutable -> true) + member x.IsMutable = (match x.val_flags.MutabilityInfo with Immutable -> false | Mutable -> true) /// Indicates if this is inferred to be a method or function that definitely makes no critical tailcalls? member x.MakesNoCriticalTailcalls = x.val_flags.MakesNoCriticalTailcalls @@ -2727,7 +2732,7 @@ and [] /// Indicates if the backing field for a static value is suppressed. member x.IsCompiledAsStaticPropertyWithoutField = - let hasValueAsStaticProperty = x.Attribs |> List.exists(fun (Attrib(tc,_,_,_,_,_,_)) -> tc.CompiledName = "ValueAsStaticPropertyAttribute") + let hasValueAsStaticProperty = x.Attribs |> List.exists(fun (Attrib(tc, _, _, _, _, _, _)) -> tc.CompiledName = "ValueAsStaticPropertyAttribute") x.val_flags.IsCompiledAsStaticPropertyWithoutField || hasValueAsStaticProperty /// Indicates if the value is pinned/fixed @@ -2738,78 +2743,78 @@ and [] member x.PermitsExplicitTypeInstantiation = x.val_flags.PermitsExplicitTypeInstantiation /// Indicates if this is a member generated from the de-sugaring of 'let' function bindings in the implicit class syntax? - member x.IsIncrClassGeneratedMember = x.IsCompilerGenerated && x.val_flags.IsIncrClassSpecialMember + member x.IsIncrClassGeneratedMember = x.IsCompilerGenerated && x.val_flags.IsIncrClassSpecialMember /// Indicates if this is a constructor member generated from the de-sugaring of implicit constructor for a class type? member x.IsIncrClassConstructor = x.IsConstructor && x.val_flags.IsIncrClassSpecialMember /// Get the information about the value used during type inference - member x.RecursiveValInfo = x.val_flags.RecursiveValInfo + member x.RecursiveValInfo = x.val_flags.RecursiveValInfo /// Indicates if this is a 'base' or 'this' value? - member x.BaseOrThisInfo = x.val_flags.BaseOrThisInfo + member x.BaseOrThisInfo = x.val_flags.BaseOrThisInfo // Indicates if this value was declared to be a type function, e.g. "let f<'a> = typeof<'a>" - member x.IsTypeFunction = x.val_flags.IsTypeFunction + member x.IsTypeFunction = x.val_flags.IsTypeFunction /// Get the inline declaration on the value - member x.InlineInfo = x.val_flags.InlineInfo + member x.InlineInfo = x.val_flags.InlineInfo /// Indicates whether the inline declaration for the value indicate that the value must be inlined? - member x.MustInline = x.InlineInfo.MustInline + member x.MustInline = x.InlineInfo.MustInline /// Indicates whether this value was generated by the compiler. /// /// Note: this is true for the overrides generated by hash/compare augmentations - member x.IsCompilerGenerated = x.val_flags.IsCompilerGenerated + member x.IsCompilerGenerated = x.val_flags.IsCompilerGenerated /// Get the declared attributes for the value - member x.Attribs = + member x.Attribs = match x.val_opt_data with | Some optData -> optData.val_attribs - | _ -> [] + | _ -> [] /// Get the declared documentation for the value - member x.XmlDoc = + member x.XmlDoc = match x.val_opt_data with | Some optData -> optData.val_xmldoc - | _ -> XmlDoc.Empty + | _ -> XmlDoc.Empty ///Get the signature for the value's XML documentation member x.XmlDocSig with get() = match x.val_opt_data with | Some optData -> optData.val_xmldocsig - | _ -> String.Empty + | _ -> String.Empty and set(v) = match x.val_opt_data with | Some optData -> optData.val_xmldocsig <- v - | _ -> x.val_opt_data <- Some { Val.NewEmptyValOptData() with val_xmldocsig = v } + | _ -> x.val_opt_data <- Some { Val.NewEmptyValOptData() with val_xmldocsig = v } /// The parent type or module, if any (None for expression bindings and parameters) - member x.DeclaringEntity = + member x.DeclaringEntity = match x.val_opt_data with | Some optData -> optData.val_declaring_entity - | _ -> ParentNone + | _ -> ParentNone /// 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. member x.TopValDeclaringEntity = - match x.DeclaringEntity with + match x.DeclaringEntity with | Parent tcref -> tcref - | ParentNone -> error(InternalError("TopValDeclaringEntity: does not have a parent",x.Range)) + | ParentNone -> error(InternalError("TopValDeclaringEntity: does not have a parent", x.Range)) member x.HasDeclaringEntity = - match x.DeclaringEntity with + match x.DeclaringEntity with | Parent _ -> true | ParentNone -> false /// Get the apparent parent entity for a member - member x.MemberApparentEntity : TyconRef = + member x.MemberApparentEntity: TyconRef = match x.MemberInfo with | Some membInfo -> membInfo.ApparentEnclosingEntity - | None -> error(InternalError("MemberApparentEntity",x.Range)) + | None -> error(InternalError("MemberApparentEntity", x.Range)) /// Get the number of 'this'/'self' object arguments for the member. Instance extension members return '1'. member v.NumObjArgs = @@ -2829,19 +2834,19 @@ and [] /// IsMemberOrModuleBinding is set. // // We use it here: - // - in opt.fs : when compiling fslib, we bind an entry for the value in a global table (see bind_escaping_local_vspec) + // - in opt.fs: when compiling fslib, we bind an entry for the value in a global table (see bind_escaping_local_vspec) // - in ilxgen.fs: when compiling fslib, we bind an entry for the value in a global table (see bind_escaping_local_vspec) - // - in opt.fs : (fullDebugTextOfValRef) for error reporting of non-inlinable values + // - in opt.fs: (fullDebugTextOfValRef) for error reporting of non-inlinable values // - in service.fs (boutput_item_description): to display the full text of a value's binding location // - in check.fs: as a boolean to detect public values for saving quotations // - in ilxgen.fs: as a boolean to detect public values for saving quotations // - in MakeExportRemapping, to build non-local references for values - member x.PublicPath = - match x.DeclaringEntity with + member x.PublicPath = + match x.DeclaringEntity with | Parent eref -> match eref.PublicPath with | None -> None - | Some p -> Some(ValPubPath(p,x.GetLinkageFullKey())) + | Some p -> Some(ValPubPath(p, x.GetLinkageFullKey())) | ParentNone -> None @@ -2854,19 +2859,19 @@ and [] /// Get the type of the value including any generic type parameters member x.TypeScheme = match x.Type with - | TType_forall(tps,tau) -> tps,tau - | ty -> [],ty + | TType_forall(tps, tau) -> tps, tau + | ty -> [], ty /// Get the type of the value after removing any generic type parameters member x.TauType = match x.Type with - | TType_forall(_,tau) -> tau + | TType_forall(_, tau) -> tau | ty -> ty /// Get the generic type parameters for the value member x.Typars = match x.Type with - | TType_forall(tps,_) -> tps + | TType_forall(tps, _) -> tps | _ -> [] /// The name of the method. @@ -2884,7 +2889,7 @@ and [] member x.ValCompiledName = match x.val_opt_data with | Some optData -> optData.val_compiled_name - | _ -> None + | _ -> None /// 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' @@ -2910,8 +2915,8 @@ and [] // let dt = System.DateTime.Now - System.DateTime.Now // IsMemberOrModuleBinding = false, IsCompiledAsTopLevel = true, IsMember = false, CompilerGenerated=true // // However we don't need this for CompilerGenerated members such as the implementations of IComparable - if x.IsCompiledAsTopLevel && not x.IsMember && (x.IsCompilerGenerated || not x.IsMemberOrModuleBinding) then - globalStableNameGenerator.GetUniqueCompilerGeneratedName(givenName,x.Range,x.Stamp) + if x.IsCompiledAsTopLevel && not x.IsMember && (x.IsCompilerGenerated || not x.IsMemberOrModuleBinding) then + globalStableNameGenerator.GetUniqueCompilerGeneratedName(givenName, x.Range, x.Stamp) else givenName @@ -2919,7 +2924,7 @@ and [] /// - 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 member x.PropertyName = - let logicalName = x.LogicalName + let logicalName = x.LogicalName ChopPropertyName logicalName /// The name of the method. @@ -2944,73 +2949,73 @@ and [] member x.DisplayName = DemangleOperatorName x.CoreDisplayName - member x.SetValRec b = x.val_flags <- x.val_flags.WithRecursiveValInfo b + member x.SetValRec b = x.val_flags <- x.val_flags.WithRecursiveValInfo b - member x.SetIsMemberOrModuleBinding() = x.val_flags <- x.val_flags.WithIsMemberOrModuleBinding + member x.SetIsMemberOrModuleBinding() = x.val_flags <- x.val_flags.WithIsMemberOrModuleBinding - member x.SetMakesNoCriticalTailcalls() = x.val_flags <- x.val_flags.WithMakesNoCriticalTailcalls + member x.SetMakesNoCriticalTailcalls() = x.val_flags <- x.val_flags.WithMakesNoCriticalTailcalls - member x.SetHasBeenReferenced() = x.val_flags <- x.val_flags.WithHasBeenReferenced + member x.SetHasBeenReferenced() = x.val_flags <- x.val_flags.WithHasBeenReferenced member x.SetIsCompiledAsStaticPropertyWithoutField() = x.val_flags <- x.val_flags.WithIsCompiledAsStaticPropertyWithoutField - member x.SetIsFixed() = x.val_flags <- x.val_flags.WithIsFixed + member x.SetIsFixed() = x.val_flags <- x.val_flags.WithIsFixed - member x.SetValReprInfo info = + member x.SetValReprInfo info = match x.val_opt_data with | Some optData -> optData.val_repr_info <- info - | _ -> x.val_opt_data <- Some { Val.NewEmptyValOptData() with val_repr_info = info } + | _ -> x.val_opt_data <- Some { Val.NewEmptyValOptData() with val_repr_info = info } - member x.SetType ty = x.val_type <- ty + member x.SetType ty = x.val_type <- ty - member x.SetOtherRange m = + member x.SetOtherRange m = match x.val_opt_data with | Some optData -> optData.val_other_range <- Some m - | _ -> x.val_opt_data <- Some { Val.NewEmptyValOptData() with val_other_range = Some m } + | _ -> x.val_opt_data <- Some { Val.NewEmptyValOptData() with val_other_range = Some m } - member x.SetDeclaringEntity parent = + member x.SetDeclaringEntity parent = match x.val_opt_data with | Some optData -> optData.val_declaring_entity <- parent - | _ -> x.val_opt_data <- Some { Val.NewEmptyValOptData() with val_declaring_entity = parent } + | _ -> x.val_opt_data <- Some { Val.NewEmptyValOptData() with val_declaring_entity = parent } - member x.SetAttribs attribs = + member x.SetAttribs attribs = match x.val_opt_data with | Some optData -> optData.val_attribs <- attribs - | _ -> x.val_opt_data <- Some { Val.NewEmptyValOptData() with val_attribs = attribs } + | _ -> x.val_opt_data <- Some { Val.NewEmptyValOptData() with val_attribs = attribs } - member x.SetMemberInfo member_info = + member x.SetMemberInfo member_info = match x.val_opt_data with | Some optData -> optData.val_member_info <- Some member_info - | _ -> x.val_opt_data <- Some { Val.NewEmptyValOptData() with val_member_info = Some member_info } + | _ -> x.val_opt_data <- Some { Val.NewEmptyValOptData() with val_member_info = Some member_info } - member x.SetValDefn val_defn = + member x.SetValDefn val_defn = match x.val_opt_data with | Some optData -> optData.val_defn <- Some val_defn - | _ -> x.val_opt_data <- Some { Val.NewEmptyValOptData() with val_defn = Some val_defn } + | _ -> x.val_opt_data <- Some { Val.NewEmptyValOptData() with val_defn = Some val_defn } /// Create a new value with empty, unlinked data. Only used during unpickling of F# metadata. - static member NewUnlinked() : Val = - { val_logical_name = Unchecked.defaultof<_> - val_range = Unchecked.defaultof<_> - val_type = Unchecked.defaultof<_> - val_stamp = Unchecked.defaultof<_> - val_flags = Unchecked.defaultof<_> - val_opt_data = Unchecked.defaultof<_> } + static member NewUnlinked() : Val = + { val_logical_name = Unchecked.defaultof<_> + val_range = Unchecked.defaultof<_> + val_type = Unchecked.defaultof<_> + val_stamp = Unchecked.defaultof<_> + val_flags = Unchecked.defaultof<_> + val_opt_data = Unchecked.defaultof<_> } /// Create a new value with the given backing data. Only used during unpickling of F# metadata. - static member New data : Val = data + static member New data: Val = data /// Link a value based on empty, unlinked data to the given data. Only used during unpickling of F# metadata. member x.Link (tg: ValData) = x.SetData tg /// Set all the data on a value member x.SetData (tg: ValData) = - x.val_logical_name <- tg.val_logical_name - x.val_range <- tg.val_range - x.val_type <- tg.val_type - x.val_stamp <- tg.val_stamp - x.val_flags <- tg.val_flags + x.val_logical_name <- tg.val_logical_name + x.val_range <- tg.val_range + x.val_type <- tg.val_type + x.val_stamp <- tg.val_stamp + x.val_flags <- tg.val_flags match tg.val_opt_data with | Some tg -> x.val_opt_data <- @@ -3031,7 +3036,7 @@ and [] member x.IsLinked = match box x.val_logical_name with null -> false | _ -> true [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = x.LogicalName @@ -3046,13 +3051,13 @@ and /// Updated with the full implemented slotsig after interface implementation relation is checked mutable ImplementedSlotSigs: SlotSig list - /// Gets updated with 'true' if an abstract slot is implemented in the file being typechecked. Internal only. + /// Gets updated with 'true' if an abstract slot is implemented in the file being typechecked. Internal only. mutable IsImplemented: bool MemberFlags: MemberFlags } [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = "ValMemberInfo(...)" @@ -3060,7 +3065,7 @@ and [] NonLocalValOrMemberRef = { /// A reference to the entity containing the value or member. This will always be a non-local reference - EnclosingEntity : EntityRef + EnclosingEntity: EntityRef /// The name of the value, or the full signature of the member ItemKey: ValLinkageFullKey } @@ -3080,22 +3085,22 @@ and and [] - ValPublicPath = + ValPublicPath = | ValPubPath of PublicPath * ValLinkageFullKey [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override __.ToString() = sprintf "ValPubPath(...)" /// Index into the namespace/module structure of a particular CCU and [] - NonLocalEntityRef = + NonLocalEntityRef = | NonLocalEntityRef of CcuThunk * string[] /// Try to find the entity corresponding to the given path in the given CCU - static member TryDerefEntityPath(ccu: CcuThunk, path:string[], i:int, entity:Entity) = + static member TryDerefEntityPath(ccu: CcuThunk, path: string[], i: int, entity: Entity) = if i >= path.Length then ValueSome entity else match entity.ModuleOrNamespaceType.AllEntitiesByCompiledAndLogicalMangledNames.TryGetValue path.[i] with @@ -3108,7 +3113,7 @@ and #if !NO_EXTENSIONTYPING /// Try to find the entity corresponding to the given path, using type-providers to link the data - static member TryDerefEntityPathViaProvidedType(ccu: CcuThunk, path:string[], i:int, entity:Entity) = + static member TryDerefEntityPathViaProvidedType(ccu: CcuThunk, path: string[], i: int, entity: Entity) = // Errors during linking are not necessarily given good ranges. This has always been the case in F# 2.0, but also applies to // type provider type linking errors in F# 3.0. let m = range0 @@ -3119,18 +3124,18 @@ and // In this case, we're safely in the realm of types. Just iterate through the nested // types until i = path.Length-1. Create the Tycon's as needed - let rec tryResolveNestedTypeOf(parentEntity:Entity,resolutionEnvironment,st:Tainted,i) = - match st.PApply((fun st -> st.GetNestedType path.[i]),m) with + let rec tryResolveNestedTypeOf(parentEntity: Entity, resolutionEnvironment, st: Tainted, i) = + match st.PApply((fun st -> st.GetNestedType path.[i]), m) with | Tainted.Null -> ValueNone | st -> let newEntity = Construct.NewProvidedTycon(resolutionEnvironment, st, ccu.ImportProvidedType, false, m) parentEntity.ModuleOrNamespaceType.AddProvidedTypeEntity(newEntity) if i = path.Length-1 then ValueSome(newEntity) - else tryResolveNestedTypeOf(newEntity,resolutionEnvironment,st,i+1) + else tryResolveNestedTypeOf(newEntity, resolutionEnvironment, st, i+1) - tryResolveNestedTypeOf(entity,resolutionEnvironment,st,i) + tryResolveNestedTypeOf(entity, resolutionEnvironment, st, i) - | TProvidedNamespaceExtensionPoint(resolutionEnvironment,resolvers) -> + | TProvidedNamespaceExtensionPoint(resolutionEnvironment, resolvers) -> // In this case, we're still in the realm of extensible namespaces. // <----entity--> @@ -3152,20 +3157,20 @@ and assert (j >= 0) assert (j <= path.Length - 1) let matched = - [ for resolver in resolvers do + [ for resolver in resolvers do let moduleOrNamespace = if j = 0 then null else path.[0..j-1] let typename = path.[j] - let resolution = ExtensionTyping.TryLinkProvidedType(resolver,moduleOrNamespace,typename,m) + let resolution = ExtensionTyping.TryLinkProvidedType(resolver, moduleOrNamespace, typename, m) match resolution with | None | Some (Tainted.Null) -> () - | Some st -> yield (resolver,st) ] + | Some st -> yield (resolver, st) ] match matched with - | [(_,st)] -> + | [(_, st)] -> // 'entity' is at position i in the dereference chain. We resolved to position 'j'. // Inject namespaces until we're an position j, and then inject the type. // Note: this is similar to code in CompileOps.fs let rec injectNamespacesFromIToJ (entity: Entity) k = - if k = j then + if k = j then let newEntity = Construct.NewProvidedTycon(resolutionEnvironment, st, ccu.ImportProvidedType, false, m) entity.ModuleOrNamespaceType.AddProvidedTypeEntity(newEntity) newEntity @@ -3174,7 +3179,7 @@ and let newEntity = Construct.NewModuleOrNamespace (Some cpath) - (TAccess []) (ident(path.[k],m)) XmlDoc.Empty [] + (TAccess []) (ident(path.[k], m)) XmlDoc.Empty [] (MaybeLazy.Strict (Construct.NewEmptyModuleOrNamespaceType Namespace)) entity.ModuleOrNamespaceType.AddModuleOrNamespaceByMutation(newEntity) injectNamespacesFromIToJ newEntity (k+1) @@ -3199,20 +3204,20 @@ and /// Try to link a non-local entity reference to an actual entity member nleref.TryDeref(canError) = - let (NonLocalEntityRef(ccu,path)) = nleref + let (NonLocalEntityRef(ccu, path)) = nleref if canError then ccu.EnsureDerefable(path) if ccu.IsUnresolvedReference then ValueNone else - match NonLocalEntityRef.TryDerefEntityPath(ccu, path, 0, ccu.Contents) with + match NonLocalEntityRef.TryDerefEntityPath(ccu, path, 0, ccu.Contents) with | ValueSome _ as r -> r | ValueNone -> // OK, the lookup failed. Check if we can redirect through a type forwarder on this assembly. // Look for a forwarder for each prefix-path let rec tryForwardPrefixPath i = if i < path.Length then - match ccu.TryForward(path.[0..i-1],path.[i]) with + match ccu.TryForward(path.[0..i-1], path.[i]) with // OK, found a forwarder, now continue with the lookup to find the nested type | Some tcref -> NonLocalEntityRef.TryDerefEntityPath(ccu, path, (i+1), tcref.Deref) | None -> tryForwardPrefixPath (i+1) @@ -3222,12 +3227,12 @@ and /// Get the CCU referenced by the nonlocal reference. member nleref.Ccu = - let (NonLocalEntityRef(ccu,_)) = nleref + let (NonLocalEntityRef(ccu, _)) = nleref ccu /// Get the path into the CCU referenced by the nonlocal reference. member nleref.Path = - let (NonLocalEntityRef(_,p)) = nleref + let (NonLocalEntityRef(_, p)) = nleref p member nleref.DisplayName = @@ -3259,7 +3264,7 @@ and nleref.Deref.ModuleOrNamespaceType [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = x.DisplayName @@ -3312,7 +3317,7 @@ and ValueSome tcr.binding /// Is the destination assembly available? - member tcr.CanDeref = ValueOptionInternal.isSome tcr.TryDeref + member tcr.CanDeref = tcr.TryDeref.IsSome /// Gets the data indicating the compiled representation of a type or module in terms of Abstract IL data structures. member x.CompiledRepresentation = x.Deref.CompiledRepresentation @@ -3335,7 +3340,7 @@ and /// The display name of the namespace, module or type, e.g. List instead of List`1, not including static parameters member x.DisplayName = x.Deref.DisplayName - /// The display name of the namespace, module or type with <_,_,_> added for generic types, including static parameters + /// The display name of the namespace, module or type with <_, _, _> added for generic types, including static parameters member x.DisplayNameWithStaticParametersAndUnderscoreTypars = x.Deref.DisplayNameWithStaticParametersAndUnderscoreTypars /// The display name of the namespace, module or type, e.g. List instead of List`1, including static parameters @@ -3382,79 +3387,79 @@ and member x.TypeReprInfo = x.Deref.TypeReprInfo /// The information about the r.h.s. of an F# exception definition, if any. - member x.ExceptionInfo = x.Deref.ExceptionInfo + member x.ExceptionInfo = x.Deref.ExceptionInfo /// Indicates if the entity represents an F# exception declaration. - member x.IsExceptionDecl = x.Deref.IsExceptionDecl + member x.IsExceptionDecl = x.Deref.IsExceptionDecl /// 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. - member x.Typars m = x.Deref.Typars m + member x.Typars m = x.Deref.Typars m /// Get the type parameters for an entity that is a type declaration, otherwise return the empty list. - member x.TyparsNoRange = x.Deref.TyparsNoRange + member x.TyparsNoRange = x.Deref.TyparsNoRange /// Indicates if this entity is an F# type abbreviation definition - member x.TypeAbbrev = x.Deref.TypeAbbrev + member x.TypeAbbrev = x.Deref.TypeAbbrev /// Indicates if this entity is an F# type abbreviation definition - member x.IsTypeAbbrev = x.Deref.IsTypeAbbrev + member x.IsTypeAbbrev = x.Deref.IsTypeAbbrev /// Get the value representing the accessibility of the r.h.s. of an F# type definition. member x.TypeReprAccessibility = x.Deref.TypeReprAccessibility /// Get the cache of the compiled ILTypeRef representation of this module or type. - member x.CompiledReprCache = x.Deref.CompiledReprCache + member x.CompiledReprCache = x.Deref.CompiledReprCache /// Get a blob of data indicating how this type is nested in other namespaces, modules or types. - member x.PublicPath : PublicPath option = x.Deref.PublicPath + member x.PublicPath: PublicPath option = x.Deref.PublicPath /// Get the value representing the accessibility of an F# type definition or module. - member x.Accessibility = x.Deref.Accessibility + member x.Accessibility = x.Deref.Accessibility - /// Indicates the type prefers the "tycon" syntax for display etc. - member x.IsPrefixDisplay = x.Deref.IsPrefixDisplay + /// Indicates the type prefers the "tycon" syntax for display etc. + member x.IsPrefixDisplay = x.Deref.IsPrefixDisplay /// Indicates the "tycon blob" is actually a module - member x.IsModuleOrNamespace = x.Deref.IsModuleOrNamespace + member x.IsModuleOrNamespace = x.Deref.IsModuleOrNamespace /// Indicates if the entity is a namespace - member x.IsNamespace = x.Deref.IsNamespace + member x.IsNamespace = x.Deref.IsNamespace /// Indicates if the entity is an F# module definition - member x.IsModule = x.Deref.IsModule + member x.IsModule = x.Deref.IsModule /// Get a blob of data indicating how this type is nested inside other namespaces, modules and types. - member x.CompilationPathOpt = x.Deref.CompilationPathOpt + member x.CompilationPathOpt = x.Deref.CompilationPathOpt #if !NO_EXTENSIONTYPING /// Indicates if the entity is a provided namespace fragment - member x.IsProvided = x.Deref.IsProvided + member x.IsProvided = x.Deref.IsProvided /// Indicates if the entity is a provided namespace fragment - member x.IsProvidedNamespace = x.Deref.IsProvidedNamespace + member x.IsProvidedNamespace = x.Deref.IsProvidedNamespace /// Indicates if the entity is an erased provided type definition - member x.IsProvidedErasedTycon = x.Deref.IsProvidedErasedTycon + member x.IsProvidedErasedTycon = x.Deref.IsProvidedErasedTycon /// Indicates if the entity is an erased provided type definition that incorporates a static instantiation (and therefore in some sense compiler generated) - member x.IsStaticInstantiationTycon = x.Deref.IsStaticInstantiationTycon + member x.IsStaticInstantiationTycon = x.Deref.IsStaticInstantiationTycon /// Indicates if the entity is a generated provided type definition, i.e. not erased. member x.IsProvidedGeneratedTycon = x.Deref.IsProvidedGeneratedTycon #endif /// Get a blob of data indicating how this type is nested inside other namespaces, modules and types. - member x.CompilationPath = x.Deref.CompilationPath + member x.CompilationPath = x.Deref.CompilationPath /// Get a table of fields for all the F#-defined record, struct and class fields in this type definition, including /// static fields, 'val' declarations and hidden fields from the compilation of implicit class constructions. - member x.AllFieldTable = x.Deref.AllFieldTable + member x.AllFieldTable = x.Deref.AllFieldTable /// Get an array of fields for all the F#-defined record, struct and class fields in this type definition, including /// static fields, 'val' declarations and hidden fields from the compilation of implicit class constructions. - member x.AllFieldsArray = x.Deref.AllFieldsArray + member x.AllFieldsArray = x.Deref.AllFieldsArray /// Get a list of fields for all the F#-defined record, struct and class fields in this type definition, including /// static fields, 'val' declarations and hidden fields from the compilation of implicit class constructions. @@ -3474,28 +3479,28 @@ and member x.AllInstanceFieldsAsList = x.Deref.AllInstanceFieldsAsList /// Get a field by index in definition order - member x.GetFieldByIndex n = x.Deref.GetFieldByIndex n + member x.GetFieldByIndex n = x.Deref.GetFieldByIndex n /// Get a field by name. - member x.GetFieldByName n = x.Deref.GetFieldByName n + member x.GetFieldByName n = x.Deref.GetFieldByName n /// Get the union cases and other union-type information for a type, if any - member x.UnionTypeInfo = x.Deref.UnionTypeInfo + member x.UnionTypeInfo = x.Deref.UnionTypeInfo /// Get the union cases for a type, if any - member x.UnionCasesArray = x.Deref.UnionCasesArray + member x.UnionCasesArray = x.Deref.UnionCasesArray /// Get the union cases for a type, if any, as a list - member x.UnionCasesAsList = x.Deref.UnionCasesAsList + member x.UnionCasesAsList = x.Deref.UnionCasesAsList /// Get a union case of a type by name - member x.GetUnionCaseByName n = x.Deref.GetUnionCaseByName n + member x.GetUnionCaseByName n = x.Deref.GetUnionCaseByName n /// Get the blob of information associated with an F# object-model type definition, i.e. class, interface, struct etc. member x.FSharpObjectModelTypeInfo = x.Deref.FSharpObjectModelTypeInfo /// Gets the immediate interface definitions of an F# type definition. Further interfaces may be supported through class and interface inheritance. - member x.ImmediateInterfacesOfFSharpTycon = x.Deref.ImmediateInterfacesOfFSharpTycon + member x.ImmediateInterfacesOfFSharpTycon = x.Deref.ImmediateInterfacesOfFSharpTycon /// Gets the immediate interface types of an F# type definition. Further interfaces may be supported through class and interface inheritance. member x.ImmediateInterfaceTypesOfFSharpTycon = x.Deref.ImmediateInterfaceTypesOfFSharpTycon @@ -3508,19 +3513,19 @@ and /// Note: result is a indexed table, and for each name the results are in reverse declaration order member x.MembersOfFSharpTyconByName = x.Deref.MembersOfFSharpTyconByName - /// Indicates if this is a struct or enum type definition , i.e. a value type definition - member x.IsStructOrEnumTycon = x.Deref.IsStructOrEnumTycon + /// Indicates if this is a struct or enum type definition, i.e. a value type definition + member x.IsStructOrEnumTycon = x.Deref.IsStructOrEnumTycon /// 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. - member x.IsAsmReprTycon = x.Deref.IsAsmReprTycon + member x.IsAsmReprTycon = x.Deref.IsAsmReprTycon /// 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. - member x.IsMeasureableReprTycon = x.Deref.IsMeasureableReprTycon + member x.IsMeasureableReprTycon = x.Deref.IsMeasureableReprTycon /// Indicates if the entity is erased, either a measure definition, or an erased provided type definition - member x.IsErased = x.Deref.IsErased + member x.IsErased = x.Deref.IsErased /// Gets any implicit hash/equals (with comparer argument) methods added to an F# record, union or struct type definition. member x.GeneratedHashAndEqualsWithComparerValues = x.Deref.GeneratedHashAndEqualsWithComparerValues @@ -3535,60 +3540,60 @@ and member x.GeneratedHashAndEqualsValues = x.Deref.GeneratedHashAndEqualsValues /// Indicate if this is a type definition backed by Abstract IL metadata. - member x.IsILTycon = x.Deref.IsILTycon + member x.IsILTycon = x.Deref.IsILTycon /// Get the Abstract IL scope, nesting and metadata for this /// type definition, assuming it is backed by Abstract IL metadata. - member x.ILTyconInfo = x.Deref.ILTyconInfo + member x.ILTyconInfo = x.Deref.ILTyconInfo /// Get the Abstract IL metadata for this type definition, assuming it is backed by Abstract IL metadata. - member x.ILTyconRawMetadata = x.Deref.ILTyconRawMetadata + member x.ILTyconRawMetadata = x.Deref.ILTyconRawMetadata /// Indicate if this is a type whose r.h.s. is known to be a union type definition. - member x.IsUnionTycon = x.Deref.IsUnionTycon + member x.IsUnionTycon = x.Deref.IsUnionTycon /// Indicates if this is an F# type definition whose r.h.s. is known to be a record type definition. - member x.IsRecordTycon = x.Deref.IsRecordTycon + member x.IsRecordTycon = x.Deref.IsRecordTycon /// Indicates if this is an F# type definition whose r.h.s. is known to be some kind of F# object model definition member x.IsFSharpObjectModelTycon = x.Deref.IsFSharpObjectModelTycon /// The on-demand analysis about whether the entity has the IsByRefLike attribute - member x.TryIsByRefLike = x.Deref.TryIsByRefLike + member x.TryIsByRefLike = x.Deref.TryIsByRefLike /// Set the on-demand analysis about whether the entity has the IsByRefLike attribute - member x.SetIsByRefLike b = x.Deref.SetIsByRefLike b + member x.SetIsByRefLike b = x.Deref.SetIsByRefLike b /// The on-demand analysis about whether the entity has the IsByRefLike attribute - member x.TryIsReadOnly = x.Deref.TryIsReadOnly + member x.TryIsReadOnly = x.Deref.TryIsReadOnly /// Set the on-demand analysis about whether the entity has the IsReadOnly attribute or is otherwise determined to be a readonly struct - member x.SetIsReadOnly b = x.Deref.SetIsReadOnly b + member x.SetIsReadOnly b = x.Deref.SetIsReadOnly b /// 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). - member x.IsHiddenReprTycon = x.Deref.IsHiddenReprTycon + member x.IsHiddenReprTycon = x.Deref.IsHiddenReprTycon /// Indicates if this is an F#-defined interface type definition - member x.IsFSharpInterfaceTycon = x.Deref.IsFSharpInterfaceTycon + member x.IsFSharpInterfaceTycon = x.Deref.IsFSharpInterfaceTycon /// Indicates if this is an F#-defined delegate type definition - member x.IsFSharpDelegateTycon = x.Deref.IsFSharpDelegateTycon + member x.IsFSharpDelegateTycon = x.Deref.IsFSharpDelegateTycon /// Indicates if this is an F#-defined enum type definition - member x.IsFSharpEnumTycon = x.Deref.IsFSharpEnumTycon + member x.IsFSharpEnumTycon = x.Deref.IsFSharpEnumTycon /// Indicates if this is a .NET-defined enum type definition - member x.IsILEnumTycon = x.Deref.IsILEnumTycon + member x.IsILEnumTycon = x.Deref.IsILEnumTycon /// Indicates if this is an enum type definition - member x.IsEnumTycon = x.Deref.IsEnumTycon + member x.IsEnumTycon = x.Deref.IsEnumTycon - /// Indicates if this is an F#-defined struct or enum type definition , i.e. a value type definition - member x.IsFSharpStructOrEnumTycon = x.Deref.IsFSharpStructOrEnumTycon + /// Indicates if this is an F#-defined struct or enum type definition, i.e. a value type definition + member x.IsFSharpStructOrEnumTycon = x.Deref.IsFSharpStructOrEnumTycon - /// Indicates if this is a .NET-defined struct or enum type definition , i.e. a value type definition - member x.IsILStructOrEnumTycon = x.Deref.IsILStructOrEnumTycon + /// Indicates if this is a .NET-defined struct or enum type definition, i.e. a value type definition + member x.IsILStructOrEnumTycon = x.Deref.IsILStructOrEnumTycon /// Indicates if we have pre-determined that a type definition has a default constructor. member x.PreEstablishedHasDefaultConstructor = x.Deref.PreEstablishedHasDefaultConstructor @@ -3596,18 +3601,18 @@ and /// Indicates if we have pre-determined that a type definition has a self-referential constructor using 'as x' member x.HasSelfReferentialConstructor = x.Deref.HasSelfReferentialConstructor - member x.UnionCasesAsRefList = x.UnionCasesAsList |> List.map x.MakeNestedUnionCaseRef + member x.UnionCasesAsRefList = x.UnionCasesAsList |> List.map x.MakeNestedUnionCaseRef member x.TrueInstanceFieldsAsRefList = x.TrueInstanceFieldsAsList |> List.map x.MakeNestedRecdFieldRef - member x.AllFieldAsRefList = x.AllFieldsAsList |> List.map x.MakeNestedRecdFieldRef + member x.AllFieldAsRefList = x.AllFieldsAsList |> List.map x.MakeNestedRecdFieldRef - member x.MakeNestedRecdFieldRef (rf: RecdField) = RFRef (x, rf.Name) + member x.MakeNestedRecdFieldRef (rf: RecdField) = RFRef (x, rf.Name) - member x.MakeNestedUnionCaseRef (uc: UnionCase) = UCRef (x, uc.Id.idText) + member x.MakeNestedUnionCaseRef (uc: UnionCase) = UCRef (x, uc.Id.idText) [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = if x.IsLocalRef then @@ -3617,9 +3622,9 @@ and /// note: ModuleOrNamespaceRef and TyconRef are type equivalent -and ModuleOrNamespaceRef = EntityRef +and ModuleOrNamespaceRef = EntityRef -and TyconRef = EntityRef +and TyconRef = EntityRef /// References are either local or nonlocal and @@ -3643,7 +3648,7 @@ and if obj.ReferenceEquals(vr.binding, null) then let res = let nlr = vr.nlr - let e = nlr.EnclosingEntity.Deref + let e = nlr.EnclosingEntity.Deref let possible = e.ModuleOrNamespaceType.TryLinkVal(nlr.EnclosingEntity.nlr.Ccu, nlr.ItemKey) match possible with | ValueNone -> error (InternalUndefinedItemRef (FSComp.SR.tastUndefinedItemRefVal, e.DisplayNameWithStaticParameters, nlr.AssemblyName, sprintf "%+A" nlr.ItemKey.PartialKey)) @@ -3668,117 +3673,117 @@ and /// 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. - member x.Type = x.Deref.Type + member x.Type = x.Deref.Type /// Get the type of the value including any generic type parameters - member x.TypeScheme = x.Deref.TypeScheme + member x.TypeScheme = x.Deref.TypeScheme /// Get the type of the value after removing any generic type parameters - member x.TauType = x.Deref.TauType + member x.TauType = x.Deref.TauType - member x.Typars = x.Deref.Typars + member x.Typars = x.Deref.Typars - member x.LogicalName = x.Deref.LogicalName + member x.LogicalName = x.Deref.LogicalName - member x.DisplayName = x.Deref.DisplayName + member x.DisplayName = x.Deref.DisplayName - member x.CoreDisplayName = x.Deref.CoreDisplayName + member x.CoreDisplayName = x.Deref.CoreDisplayName - member x.Range = x.Deref.Range + member x.Range = x.Deref.Range /// Get the value representing the accessibility of an F# type definition or module. - member x.Accessibility = x.Deref.Accessibility + member x.Accessibility = x.Deref.Accessibility /// The parent type or module, if any (None for expression bindings and parameters) - member x.DeclaringEntity = x.Deref.DeclaringEntity + member x.DeclaringEntity = x.Deref.DeclaringEntity /// 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. - member x.ApparentEnclosingEntity = x.Deref.ApparentEnclosingEntity + member x.ApparentEnclosingEntity = x.Deref.ApparentEnclosingEntity - member x.DefinitionRange = x.Deref.DefinitionRange + member x.DefinitionRange = x.Deref.DefinitionRange - member x.SigRange = x.Deref.SigRange + member x.SigRange = x.Deref.SigRange /// The value of a value or member marked with [] - member x.LiteralValue = x.Deref.LiteralValue + member x.LiteralValue = x.Deref.LiteralValue - member x.Id = x.Deref.Id + member x.Id = x.Deref.Id /// 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 - member x.PropertyName = x.Deref.PropertyName + member x.PropertyName = x.Deref.PropertyName /// Indicates whether this value represents a property getter. member x.IsPropertyGetterMethod = match x.MemberInfo with | None -> false - | Some (memInfo:ValMemberInfo) -> memInfo.MemberFlags.MemberKind = MemberKind.PropertyGet || memInfo.MemberFlags.MemberKind = MemberKind.PropertyGetSet + | Some (memInfo: ValMemberInfo) -> memInfo.MemberFlags.MemberKind = MemberKind.PropertyGet || memInfo.MemberFlags.MemberKind = MemberKind.PropertyGetSet /// Indicates whether this value represents a property setter. member x.IsPropertySetterMethod = match x.MemberInfo with | None -> false - | Some (memInfo:ValMemberInfo) -> memInfo.MemberFlags.MemberKind = MemberKind.PropertySet || memInfo.MemberFlags.MemberKind = MemberKind.PropertyGetSet + | Some (memInfo: ValMemberInfo) -> memInfo.MemberFlags.MemberKind = MemberKind.PropertySet || memInfo.MemberFlags.MemberKind = MemberKind.PropertyGetSet /// A unique stamp within the context of this invocation of the compiler process - member x.Stamp = x.Deref.Stamp + member x.Stamp = x.Deref.Stamp /// 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. - member x.IsCompiledAsTopLevel = x.Deref.IsCompiledAsTopLevel + member x.IsCompiledAsTopLevel = x.Deref.IsCompiledAsTopLevel /// Indicates if this member is an F#-defined dispatch slot. - member x.IsDispatchSlot = x.Deref.IsDispatchSlot + member x.IsDispatchSlot = x.Deref.IsDispatchSlot /// The name of the method in compiled code (with some exceptions where ilxgen.fs decides not to use a method impl) - member x.CompiledName = x.Deref.CompiledName + member x.CompiledName = x.Deref.CompiledName /// Get the public path to the value, if any? Should be set if and only if /// IsMemberOrModuleBinding is set. - member x.PublicPath = x.Deref.PublicPath + member x.PublicPath = x.Deref.PublicPath /// The quotation expression associated with a value given the [] tag - member x.ReflectedDefinition = x.Deref.ReflectedDefinition + member x.ReflectedDefinition = x.Deref.ReflectedDefinition /// Indicates if this is an F#-defined 'new' constructor member - member x.IsConstructor = x.Deref.IsConstructor + member x.IsConstructor = x.Deref.IsConstructor /// Indicates if this value was a member declared 'override' or an implementation of an interface slot - member x.IsOverrideOrExplicitImpl = x.Deref.IsOverrideOrExplicitImpl + member x.IsOverrideOrExplicitImpl = x.Deref.IsOverrideOrExplicitImpl /// Is this a member, if so some more data about the member. - member x.MemberInfo = x.Deref.MemberInfo + member x.MemberInfo = x.Deref.MemberInfo /// Indicates if this is a member - member x.IsMember = x.Deref.IsMember + member x.IsMember = x.Deref.IsMember /// Indicates if this is an F#-defined value in a module, or an extension member, but excluding compiler generated bindings from optimizations - member x.IsModuleBinding = x.Deref.IsModuleBinding + member x.IsModuleBinding = x.Deref.IsModuleBinding /// Indicates if this is an F#-defined instance member. /// /// Note, the value may still be (a) an extension member or (b) and abstract slot without /// a true body. These cases are often causes of bugs in the compiler. - member x.IsInstanceMember = x.Deref.IsInstanceMember + member x.IsInstanceMember = x.Deref.IsInstanceMember /// Indicates if this value is declared 'mutable' - member x.IsMutable = x.Deref.IsMutable + member x.IsMutable = x.Deref.IsMutable /// 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?) - member x.PermitsExplicitTypeInstantiation = x.Deref.PermitsExplicitTypeInstantiation + member x.PermitsExplicitTypeInstantiation = x.Deref.PermitsExplicitTypeInstantiation /// Indicates if this is inferred to be a method or function that definitely makes no critical tailcalls? - member x.MakesNoCriticalTailcalls = x.Deref.MakesNoCriticalTailcalls + member x.MakesNoCriticalTailcalls = x.Deref.MakesNoCriticalTailcalls /// Is this a member definition or module definition? - member x.IsMemberOrModuleBinding = x.Deref.IsMemberOrModuleBinding + member x.IsMemberOrModuleBinding = x.Deref.IsMemberOrModuleBinding /// Indicates if this is an F#-defined extension member - member x.IsExtensionMember = x.Deref.IsExtensionMember + member x.IsExtensionMember = x.Deref.IsExtensionMember /// Indicates if this is a constructor member generated from the de-sugaring of implicit constructor for a class type? member x.IsIncrClassConstructor = x.Deref.IsIncrClassConstructor @@ -3787,55 +3792,55 @@ and member x.IsIncrClassGeneratedMember = x.Deref.IsIncrClassGeneratedMember /// Get the information about a recursive value used during type inference - member x.RecursiveValInfo = x.Deref.RecursiveValInfo + member x.RecursiveValInfo = x.Deref.RecursiveValInfo /// Indicates if this is a 'base' or 'this' value? - member x.BaseOrThisInfo = x.Deref.BaseOrThisInfo + member x.BaseOrThisInfo = x.Deref.BaseOrThisInfo // Indicates if this value was declared to be a type function, e.g. "let f<'a> = typeof<'a>" - member x.IsTypeFunction = x.Deref.IsTypeFunction + member x.IsTypeFunction = x.Deref.IsTypeFunction /// Records the "extra information" for a value compiled as a method. /// /// This indicates the number of arguments in each position for a curried function. - member x.ValReprInfo = x.Deref.ValReprInfo + member x.ValReprInfo = x.Deref.ValReprInfo /// Get the inline declaration on the value - member x.InlineInfo = x.Deref.InlineInfo + member x.InlineInfo = x.Deref.InlineInfo /// Indicates whether the inline declaration for the value indicate that the value must be inlined? - member x.MustInline = x.Deref.MustInline + member x.MustInline = x.Deref.MustInline /// Indicates whether this value was generated by the compiler. /// /// Note: this is true for the overrides generated by hash/compare augmentations - member x.IsCompilerGenerated = x.Deref.IsCompilerGenerated + member x.IsCompilerGenerated = x.Deref.IsCompilerGenerated /// Get the declared attributes for the value - member x.Attribs = x.Deref.Attribs + member x.Attribs = x.Deref.Attribs /// Get the declared documentation for the value - member x.XmlDoc = x.Deref.XmlDoc + member x.XmlDoc = x.Deref.XmlDoc /// Get or set the signature for the value's XML documentation - member x.XmlDocSig = x.Deref.XmlDocSig + member x.XmlDocSig = x.Deref.XmlDocSig /// 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. - member x.TopValDeclaringEntity = x.Deref.TopValDeclaringEntity + member x.TopValDeclaringEntity = x.Deref.TopValDeclaringEntity // Can be false for members after error recovery - member x.HasDeclaringEntity = x.Deref.HasDeclaringEntity + member x.HasDeclaringEntity = x.Deref.HasDeclaringEntity /// Get the apparent parent entity for a member - member x.MemberApparentEntity = x.Deref.MemberApparentEntity + member x.MemberApparentEntity = x.Deref.MemberApparentEntity /// Get the number of 'this'/'self' object arguments for the member. Instance extension members return '1'. - member x.NumObjArgs = x.Deref.NumObjArgs + member x.NumObjArgs = x.Deref.NumObjArgs [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = if x.IsLocalRef then x.ResolvedTarget.DisplayName @@ -3848,10 +3853,10 @@ and | UCRef of TyconRef * string /// Get a reference to the type containing this union case - member x.TyconRef = let (UCRef(tcref,_)) = x in tcref + member x.TyconRef = let (UCRef(tcref, _)) = x in tcref /// Get the name of this union case - member x.CaseName = let (UCRef(_,nm)) = x in nm + member x.CaseName = let (UCRef(_, nm)) = x in nm /// Get the Entity for the type containing this union case member x.Tycon = x.TyconRef.Deref @@ -3863,7 +3868,9 @@ and | None -> error(InternalError(sprintf "union case %s not found in type %s" x.CaseName x.TyconRef.LogicalName, x.TyconRef.Range)) /// Try to dereference the reference - member x.TryUnionCase = x.TyconRef.TryDeref |> ValueOptionInternal.bind (fun tcref -> tcref.GetUnionCaseByName x.CaseName |> ValueOptionInternal.ofOption) + member x.TryUnionCase = + x.TyconRef.TryDeref + |> ValueOptionInternal.bind (fun tcref -> tcref.GetUnionCaseByName x.CaseName |> ValueOptionInternal.ofOption) /// Get the attributes associated with the union case member x.Attribs = x.UnionCase.Attribs @@ -3895,7 +3902,7 @@ and member x.FieldByIndex n = x.UnionCase.FieldTable.FieldByIndex n [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = x.CaseName @@ -3906,23 +3913,25 @@ and | RFRef of TyconRef * string /// Get a reference to the type containing this union case - member x.TyconRef = let (RFRef(tcref,_)) = x in tcref + member x.TyconRef = let (RFRef(tcref, _)) = x in tcref /// Get the name off the field - member x.FieldName = let (RFRef(_,id)) = x in id + member x.FieldName = let (RFRef(_, id)) = x in id /// Get the Entity for the type containing this union case member x.Tycon = x.TyconRef.Deref /// Dereference the reference member x.RecdField = - let (RFRef(tcref,id)) = x + let (RFRef(tcref, id)) = x match tcref.GetFieldByName id with | Some res -> res | None -> error(InternalError(sprintf "field %s not found in type %s" id tcref.LogicalName, tcref.Range)) /// Try to dereference the reference - member x.TryRecdField = x.TyconRef.TryDeref |> ValueOptionInternal.bind (fun tcref -> tcref.GetFieldByName x.FieldName |> ValueOptionInternal.ofOption) + member x.TryRecdField = + x.TyconRef.TryDeref + |> ValueOptionInternal.bind (fun tcref -> tcref.GetFieldByName x.FieldName |> ValueOptionInternal.ofOption) /// Get the attributes associated with the compiled property of the record field member x.PropertyAttribs = x.RecdField.PropertyAttribs @@ -3937,7 +3946,7 @@ and member x.SigRange = x.RecdField.SigRange member x.Index = - let (RFRef(tcref,id)) = x + let (RFRef(tcref, id)) = x try // REVIEW: this could be faster, e.g. by storing the index in the NameMap tcref.AllFieldsArray |> Array.findIndex (fun rfspec -> rfspec.Name = id) @@ -3945,7 +3954,7 @@ and error(InternalError(sprintf "field %s not found in type %s" id tcref.LogicalName, tcref.Range)) [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = x.FieldName @@ -3974,17 +3983,17 @@ and /// Indicates the type is a tuple type. elementTypes must be of length 2 or greater. | TType_tuple of TupInfo * TTypes - /// TType_fun(domainType,rangeType). + /// TType_fun(domainType, rangeType). /// /// Indicates the type is a function type - | TType_fun of TType * TType + | TType_fun of TType * TType /// TType_ucase(unionCaseRef, typeInstantiation) /// /// Indicates the type is a non-F#-visible type representing a "proof" that a union value belongs to a particular union case /// These types are not user-visible and will never appear as an inferred type. They are the types given to /// the temporaries arising out of pattern matching on union values. - | TType_ucase of UnionCaseRef * TypeInst + | TType_ucase of UnionCaseRef * TypeInst /// Indicates the type is a variable type, whether declared, generalized or an inference type parameter | TType_var of Typar @@ -3996,23 +4005,23 @@ and /// See https://github.com/Microsoft/visualfsharp/issues/2561 member x.GetAssemblyName() = match x with - | TType_forall (_tps, ty) -> ty.GetAssemblyName() - | TType_app (tcref, _tinst) -> tcref.CompilationPath.ILScopeRef.QualifiedName + | TType_forall (_tps, ty) -> ty.GetAssemblyName() + | TType_app (tcref, _tinst) -> tcref.CompilationPath.ILScopeRef.QualifiedName | TType_tuple (_tupInfo, _tinst) -> "" | TType_anon (anonInfo, _tinst) -> defaultArg anonInfo.Assembly.QualifiedName "" - | TType_fun (_d,_r) -> "" - | TType_measure _ms -> "" - | TType_var tp -> tp.Solution |> function Some sln -> sln.GetAssemblyName() | None -> "" - | TType_ucase (_uc,_tinst) -> - let (TILObjectReprData(scope,_nesting,_definition)) = _uc.Tycon.ILTyconInfo + | TType_fun (_d, _r) -> "" + | TType_measure _ms -> "" + | TType_var tp -> tp.Solution |> function Some sln -> sln.GetAssemblyName() | None -> "" + | TType_ucase (_uc, _tinst) -> + let (TILObjectReprData(scope, _nesting, _definition)) = _uc.Tycon.ILTyconInfo scope.QualifiedName [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = match x with - | TType_forall (_tps,ty) -> "forall ... " + ty.ToString() + | TType_forall (_tps, ty) -> "forall ... " + ty.ToString() | TType_app (tcref, tinst) -> tcref.DisplayName + (match tinst with [] -> "" | tys -> "<" + String.concat "," (List.map string tys) + ">") | TType_tuple (tupInfo, tinst) -> (match tupInfo with @@ -4024,8 +4033,8 @@ and | TupInfo.Const false -> "" | TupInfo.Const true -> "struct ") + "{|" + String.concat "," (Seq.map2 (fun nm ty -> nm + " " + string ty + ";") anonInfo.SortedNames tinst) + ")" + "|}" - | TType_fun (d,r) -> "(" + string d + " -> " + string r + ")" - | TType_ucase (uc,tinst) -> "ucase " + uc.CaseName + (match tinst with [] -> "" | tys -> "<" + String.concat "," (List.map string tys) + ">") + | TType_fun (d, r) -> "(" + string d + " -> " + string r + ")" + | TType_ucase (uc, tinst) -> "ucase " + uc.CaseName + (match tinst with [] -> "" | tys -> "<" + String.concat "," (List.map string tys) + ">") | TType_var tp -> match tp.Solution with | None -> tp.DisplayName @@ -4039,7 +4048,7 @@ and [] AnonRecdTypeInfo = // Mutability for pickling/unpickling only { mutable Assembly: CcuThunk mutable TupInfo: TupInfo - mutable SortedIds: Ident[] + mutable SortedIds: Ident[] mutable Stamp: Stamp mutable SortedNames: string[] } @@ -4047,11 +4056,11 @@ and [] AnonRecdTypeInfo = static member Create(ccu: CcuThunk, tupInfo, ids: Ident[]) = let sortedIds = ids |> Array.sortBy (fun id -> id.idText) // Hash all the data to form a unique stamp - let stamp = + let stamp = sha1HashInt64 - [| for c in ccu.AssemblyName do yield byte c; yield byte (int32 c >>> 8); + [| for c in ccu.AssemblyName do yield byte c; yield byte (int32 c >>> 8) match tupInfo with - | TupInfo.Const b -> yield (if b then 0uy else 1uy) + | TupInfo.Const b -> yield (if b then 0uy else 1uy) for id in sortedIds do for c in id.idText do yield byte c; yield byte (int32 c >>> 8) |] let sortedNames = Array.map textOfId sortedIds @@ -4059,15 +4068,15 @@ and [] AnonRecdTypeInfo = /// Get the ILTypeRef for the generated type implied by the anonymous type member x.ILTypeRef = - let ilTypeName = sprintf "<>f__AnonymousType%s%u`%d'" (match x.TupInfo with TupInfo.Const b -> if b then "1000" else "") (uint32 x.Stamp) x.SortedIds.Length - mkILTyRef(x.Assembly.ILScopeRef,ilTypeName) + let ilTypeName = sprintf "<>f__AnonymousType%s%u`%d'" (match x.TupInfo with TupInfo.Const b -> if b then "1000" else "") (uint32 x.Stamp) x.SortedIds.Length + mkILTyRef(x.Assembly.ILScopeRef, ilTypeName) static member NewUnlinked() : AnonRecdTypeInfo = { Assembly = Unchecked.defaultof<_> TupInfo = Unchecked.defaultof<_> SortedIds = Unchecked.defaultof<_> Stamp = Unchecked.defaultof<_> - SortedNames = Unchecked.defaultof<_> } + SortedNames = Unchecked.defaultof<_> } member x.Link d = let sortedNames = Array.map textOfId d.SortedIds @@ -4106,7 +4115,7 @@ and // %+A formatting is used, so this is not needed //[] - //member x.DebugText = x.ToString() + //member x.DebugText = x.ToString() override x.ToString() = sprintf "%+A" x @@ -4136,15 +4145,15 @@ and IsProviderGenerated: bool /// Triggered when the contents of the CCU are invalidated - InvalidateEvent : IEvent + InvalidateEvent: IEvent /// 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 - ImportProvidedType : Tainted -> TType + ImportProvidedType: Tainted -> TType #endif /// Indicates that this DLL uses pre-F#-4.0 quotation literals somewhere. This is used to implement a restriction on static linking - mutable UsesFSharp20PlusQuotations : bool + mutable UsesFSharp20PlusQuotations: bool /// A handle to the full specification of the contents of the module contained in this ccu // NOTE: may contain transient state during typechecking @@ -4156,38 +4165,38 @@ and /// 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 - MemberSignatureEquality : (TType -> TType -> bool) + MemberSignatureEquality: (TType -> TType -> bool) /// The table of .NET CLI type forwarders for this assembly - TypeForwarders : CcuTypeForwarderTable } + TypeForwarders: CcuTypeForwarderTable } [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = sprintf "CcuData(%A)" x.FileName /// Represents a table of .NET CLI type forwarders for an assembly and CcuTypeForwarderTable = Map> -and CcuReference = string // ILAssemblyRef +and CcuReference = string // ILAssemblyRef /// A relinkable handle to the contents of a compilation unit. Relinking is performed by mutation. // /// A compilation unit is, more or less, the new material created in one -/// invocation of the compiler. Due to static linking assemblies may hold more +/// invocation of the compiler. Due to static linking assemblies may hold more /// than one compilation unit (i.e. when two assemblies are merged into a compilation -/// the resulting assembly will contain 3 CUs). Compilation units are also created for referenced +/// the resulting assembly will contain 3 CUs). Compilation units are also created for referenced /// .NET assemblies. /// /// References to items such as type constructors are via /// cross-compilation-unit thunks, which directly reference the data structures that define -/// these modules. Thus, when saving out values to disk we only wish -/// to save out the "current" part of the term graph. When reading values +/// these modules. Thus, when saving out values to disk we only wish +/// to save out the "current" part of the term graph. When reading values /// back in we "fixup" the links to previously referenced modules. /// /// All non-local accesses to the data structures are mediated -/// by ccu-thunks. Ultimately, a ccu-thunk is either a (named) element of +/// by ccu-thunks. Ultimately, a ccu-thunk is either a (named) element of /// the data structure, or it is a delayed fixup, i.e. an invalid dangling /// reference that has not had an appropriate fixup applied. and @@ -4200,9 +4209,9 @@ and /// used in the F# metadata-deserializer or the .NET metadata reader returns a failing value (e.g. None). /// Note: When used from Visual Studio, the loader will not automatically chase down transitively referenced DLLs - they /// must be in the explicit references in the project. - mutable orphanfixup : bool + mutable orphanfixup: bool - name: CcuReference } + name: CcuReference } member ccu.Deref = if isNull (ccu.target :> obj) || ccu.orphanfixup then @@ -4212,54 +4221,54 @@ and member ccu.IsUnresolvedReference = isNull (ccu.target :> obj) || ccu.orphanfixup /// Ensure the ccu is derefable in advance. Supply a path to attach to any resulting error message. - member ccu.EnsureDerefable(requiringPath:string[]) = + member ccu.EnsureDerefable(requiringPath: string[]) = if ccu.IsUnresolvedReference then let path = System.String.Join(".", requiringPath) - raise(UnresolvedPathReferenceNoRange(ccu.name,path)) + raise(UnresolvedPathReferenceNoRange(ccu.name, path)) /// Indicates that this DLL uses F# 2.0+ quotation literals somewhere. This is used to implement a restriction on static linking. member ccu.UsesFSharp20PlusQuotations with get() = ccu.Deref.UsesFSharp20PlusQuotations and set v = ccu.Deref.UsesFSharp20PlusQuotations <- v - member ccu.AssemblyName = ccu.name + member ccu.AssemblyName = ccu.name /// Holds the data indicating how this assembly/module is referenced from the code being compiled. - member ccu.ILScopeRef = ccu.Deref.ILScopeRef + member ccu.ILScopeRef = ccu.Deref.ILScopeRef /// A unique stamp for this DLL - member ccu.Stamp = ccu.Deref.Stamp + member ccu.Stamp = ccu.Deref.Stamp /// Holds the filename for the DLL, if any - member ccu.FileName = ccu.Deref.FileName + member ccu.FileName = ccu.Deref.FileName - /// Try to get the .NET Assembly, if known. May not be present for `IsFSharp` for in-memory cross-project references - member ccu.TryGetILModuleDef() = ccu.Deref.TryGetILModuleDef() + /// Try to get the .NET Assembly, if known. May not be present for `IsFSharp` for in-memory cross-project references + member ccu.TryGetILModuleDef() = ccu.Deref.TryGetILModuleDef() #if !NO_EXTENSIONTYPING /// Is the CCu an EST injected assembly - member ccu.IsProviderGenerated = ccu.Deref.IsProviderGenerated + member ccu.IsProviderGenerated = ccu.Deref.IsProviderGenerated /// Used to make 'forward' calls into the loader during linking - member ccu.ImportProvidedType ty : TType = ccu.Deref.ImportProvidedType ty + member ccu.ImportProvidedType ty: TType = ccu.Deref.ImportProvidedType ty #endif /// The fully qualified assembly reference string to refer to this assembly. This is persisted in quotations - member ccu.QualifiedName = ccu.Deref.QualifiedName + member ccu.QualifiedName = ccu.Deref.QualifiedName /// A hint as to where does the code for the CCU live (e.g what was the tcConfig.implicitIncludeDir at compilation time for this DLL?) member ccu.SourceCodeDirectory = ccu.Deref.SourceCodeDirectory /// Indicates that this DLL was compiled using the F# compiler and has F# metadata - member ccu.IsFSharp = ccu.Deref.IsFSharp + member ccu.IsFSharp = ccu.Deref.IsFSharp /// A handle to the full specification of the contents of the module contained in this ccu // NOTE: may contain transient state during typechecking - member ccu.Contents = ccu.Deref.Contents + member ccu.Contents = ccu.Deref.Contents /// The table of type forwarders for this assembly - member ccu.TypeForwarders : Map> = ccu.Deref.TypeForwarders + member ccu.TypeForwarders: Map> = ccu.Deref.TypeForwarders /// The table of modules and namespaces at the "root" of the assembly member ccu.RootModulesAndNamespaces = ccu.Contents.ModuleOrNamespaceType.ModuleAndNamespaceDefinitions @@ -4268,25 +4277,25 @@ and member ccu.RootTypeAndExceptionDefinitions = ccu.Contents.ModuleOrNamespaceType.TypeAndExceptionDefinitions /// Create a CCU with the given name and contents - static member Create(nm,x) = + static member Create(nm, x) = { target = x orphanfixup = false - name = nm } + name = nm } /// Create a CCU with the given name but where the contents have not yet been specified static member CreateDelayed(nm) = { target = Unchecked.defaultof<_> orphanfixup = false - name = nm } + name = nm } /// Fixup a CCU to have the given contents - member x.Fixup(avail:CcuThunk) = + member x.Fixup(avail: CcuThunk) = match box x.target with | null -> () | _ -> - // In the IDE we tolerate a double-fixup of FSHarp.Core when editing the FSharp.Core project itself - if x.AssemblyName <> "FSharp.Core" then + // In the IDE we tolerate a double-fixup of FSHarp.Core when editing the FSharp.Core project itself + if x.AssemblyName <> "FSharp.Core" then errorR(Failure("internal error: Fixup: the ccu thunk for assembly "+x.AssemblyName+" not delayed!")) assert (avail.AssemblyName = x.AssemblyName) @@ -4302,20 +4311,20 @@ and | _ -> errorR(Failure("internal error: FixupOrphaned: the ccu thunk for assembly "+x.AssemblyName+" not delayed!")) /// Try to resolve a path into the CCU by referencing the .NET/CLI type forwarder table of the CCU - member ccu.TryForward(nlpath:string[],item:string) : EntityRef option = + member ccu.TryForward(nlpath: string[], item: string) : EntityRef option = ccu.EnsureDerefable(nlpath) - let key = nlpath,item + let key = nlpath, item match ccu.TypeForwarders.TryGetValue key with | true, entity -> Some(entity.Force()) | _ -> None //printfn "trying to forward %A::%s from ccu '%s', res = '%A'" p n ccu.AssemblyName res.IsSome /// Used to make forward calls into the type/assembly loader when comparing member signatures during linking - member ccu.MemberSignatureEquality(ty1:TType, ty2:TType) = + member ccu.MemberSignatureEquality(ty1: TType, ty2: TType) = ccu.Deref.MemberSignatureEquality ty1 ty2 [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override ccu.ToString() = ccu.AssemblyName @@ -4330,7 +4339,7 @@ and | UnresolvedCcu of string [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = match x with ResolvedCcu ccu -> ccu.ToString() | UnresolvedCcu s -> "unresolved " + s @@ -4342,10 +4351,10 @@ and compileTimeWorkingDir: string - usesQuotations : bool } + usesQuotations: bool } [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override __.ToString() = "PickledCcuInfo(...)" @@ -4369,11 +4378,11 @@ and // %+A formatting is used, so this is not needed //[] - //member x.DebugText = x.ToString() + //member x.DebugText = x.ToString() override x.ToString() = sprintf "%+A" x -/// Attrib(kind,unnamedArgs,propVal,appliedToAGetterOrSetter,targetsOpt,range) +/// Attrib(kind, unnamedArgs, propVal, appliedToAGetterOrSetter, targetsOpt, range) and [] Attrib = @@ -4381,7 +4390,7 @@ and | Attrib of TyconRef * AttribKind * AttribExpr list * AttribNamedArg list * bool * AttributeTargets option * range [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() member x.TyconRef = (let (Attrib(tcref, _, _, _, _, _, _)) = x in tcref) @@ -4396,46 +4405,46 @@ and | AttribExpr of Expr * Expr [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = sprintf "AttribExpr(...)" -/// AttribNamedArg(name,type,isField,value) +/// AttribNamedArg(name, type, isField, value) and [] AttribNamedArg = | AttribNamedArg of (string*TType*bool*AttribExpr) [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = sprintf "AttribNamedArg(...)" /// Constants in expressions and [] Const = - | Bool of bool - | SByte of sbyte - | Byte of byte - | Int16 of int16 - | UInt16 of uint16 - | Int32 of int32 - | UInt32 of uint32 - | Int64 of int64 - | UInt64 of uint64 - | IntPtr of int64 - | UIntPtr of uint64 - | Single of single - | Double of double - | Char of char - | String of string - | Decimal of Decimal + | Bool of bool + | SByte of sbyte + | Byte of byte + | Int16 of int16 + | UInt16 of uint16 + | Int32 of int32 + | UInt32 of uint32 + | Int64 of int64 + | UInt64 of uint64 + | IntPtr of int64 + | UIntPtr of uint64 + | Single of single + | Double of double + | Char of char + | String of string + | Decimal of Decimal | Unit | Zero // null/zero-bit-pattern /// Decision trees. Pattern matching has been compiled down to -/// a decision tree by this point. The right-hand-sides (actions) of -/// a decision tree by this point. The right-hand-sides (actions) of +/// 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. and @@ -4449,8 +4458,8 @@ and /// must be the address of the expression being tested. /// cases -- The list of tests and their subsequent decision trees /// default -- The default decision tree, if any - /// range -- (precise documentation needed) - | TDSwitch of Expr * DecisionTreeCase list * DecisionTree option * range + /// range -- (precise documentation needed) + | TDSwitch of Expr * DecisionTreeCase list * DecisionTree option * range /// TDSuccess(results, targets) /// @@ -4470,7 +4479,7 @@ and // %+A formatting is used, so this is not needed //[] - //member x.DebugText = x.ToString() + //member x.DebugText = x.ToString() override x.ToString() = sprintf "%+A" x @@ -4481,13 +4490,13 @@ and | TCase of DecisionTreeTest * DecisionTree /// Get the discriminator associated with the case - member x.Discriminator = let (TCase(d,_)) = x in d + member x.Discriminator = let (TCase(d, _)) = x in d /// Get the decision tree or a successful test - member x.CaseTree = let (TCase(_,d)) = x in d + member x.CaseTree = let (TCase(_, d)) = x in d [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = sprintf "DecisionTreeCase(...)" @@ -4515,16 +4524,16 @@ and /// /// Run the active pattern and 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. + /// activePatExpr -- The active pattern function being called, perhaps applied to some active pattern parameters. + /// activePatResTys -- The result types (case types) of the active pattern. /// activePatIdentity -- The value and 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. + /// idx -- The case number of the active pattern which the test relates to. /// activePatternInfo -- The extracted info for the active pattern. | ActivePatternCase of Expr * TTypes * (ValRef * TypeInst) option * int * ActivePatternInfo // %+A formatting is used, so this is not needed //[] - //member x.DebugText = x.ToString() + //member x.DebugText = x.ToString() override x.ToString() = sprintf "%+A" x @@ -4535,7 +4544,7 @@ and | TTarget of Vals * Expr * SequencePointInfoForTarget [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = sprintf "DecisionTreeTarget(...)" @@ -4549,16 +4558,16 @@ and | TBind of Val * Expr * SequencePointInfoForBinding /// The value being bound - member x.Var = (let (TBind(v,_,_)) = x in v) + member x.Var = (let (TBind(v, _, _)) = x in v) /// The expression the value is being bound to - member x.Expr = (let (TBind(_,e,_)) = x in e) + member x.Expr = (let (TBind(_, e, _)) = x in e) /// The information about whether to emit a sequence point for the binding - member x.SequencePointInfo = (let (TBind(_,_,sp)) = x in sp) + member x.SequencePointInfo = (let (TBind(_, _, sp)) = x in sp) [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = sprintf "TBind(%s, ...)" x.Var.CompiledName @@ -4570,16 +4579,16 @@ and | APElemRef of ActivePatternInfo * ValRef * int /// Get the full information about the active pattern being referred to - member x.ActivePatternInfo = (let (APElemRef(info,_,_)) = x in info) + member x.ActivePatternInfo = (let (APElemRef(info, _, _)) = x in info) /// Get a reference to the value for the active pattern being referred to - member x.ActivePatternVal = (let (APElemRef(_,vref,_)) = x in vref) + member x.ActivePatternVal = (let (APElemRef(_, vref, _)) = x in vref) /// Get the index of the active pattern element within the overall active pattern - member x.CaseIndex = (let (APElemRef(_,_,n)) = x in n) + member x.CaseIndex = (let (APElemRef(_, _, n)) = x in n) [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override __.ToString() = "ActivePatternElemRef(...)" @@ -4587,34 +4596,34 @@ and /// than a closure or a local), including argument names, attributes etc. and [] - ValReprInfo = + ValReprInfo = /// ValReprInfo (numTypars, args, result) - | ValReprInfo of TyparReprInfo list * ArgReprInfo list list * ArgReprInfo + | ValReprInfo of TyparReprInfo list * ArgReprInfo list list * ArgReprInfo /// Get the extra information about the arguments for the value - member x.ArgInfos = (let (ValReprInfo(_,args,_)) = x in args) + member x.ArgInfos = (let (ValReprInfo(_, args, _)) = x in args) /// Get the number of curried arguments of the value - member x.NumCurriedArgs = (let (ValReprInfo(_,args,_)) = x in args.Length) + member x.NumCurriedArgs = (let (ValReprInfo(_, args, _)) = x in args.Length) /// Get the number of type parameters of the value - member x.NumTypars = (let (ValReprInfo(n,_,_)) = x in n.Length) + member x.NumTypars = (let (ValReprInfo(n, _, _)) = x in n.Length) /// Indicates if the value has no arguments - neither type parameters nor value arguments - member x.HasNoArgs = (let (ValReprInfo(n,args,_)) = x in n.IsEmpty && args.IsEmpty) + member x.HasNoArgs = (let (ValReprInfo(n, args, _)) = x in n.IsEmpty && args.IsEmpty) /// Get the number of tupled arguments in each curried argument position - member x.AritiesOfArgs = (let (ValReprInfo(_,args,_)) = x in List.map List.length args) + member x.AritiesOfArgs = (let (ValReprInfo(_, args, _)) = x in List.map List.length args) /// Get the kind of each type parameter - member x.KindsOfTypars = (let (ValReprInfo(n,_,_)) = x in n |> List.map (fun (TyparReprInfo(_,k)) -> k)) + member x.KindsOfTypars = (let (ValReprInfo(n, _, _)) = x in n |> List.map (fun (TyparReprInfo(_, k)) -> k)) /// Get the total number of arguments member x.TotalArgCount = - let (ValReprInfo(_,args,_)) = x + let (ValReprInfo(_, args, _)) = x // This is List.sumBy List.length args // We write this by hand as it can be a performance bottleneck in LinkagePartialKey - let rec loop (args:ArgReprInfo list list) acc = + let rec loop (args: ArgReprInfo list list) acc = match args with | [] -> acc | []::t -> loop t acc @@ -4623,7 +4632,7 @@ and loop args 0 [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override __.ToString() = "ValReprInfo(...)" @@ -4634,13 +4643,13 @@ and ArgReprInfo = { // MUTABILITY: used when propagating signature attributes into the implementation. - mutable Attribs : Attribs + mutable Attribs: Attribs // MUTABILITY: used when propagating names of parameters from signature into the implementation. - mutable Name : Ident option } + mutable Name: Ident option } [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override __.ToString() = "ArgReprInfo(...)" @@ -4677,7 +4686,7 @@ and /// arguments, e.g. if compiled as a toplevel static method. | Lambda of Unique * Val option * Val option * Val list * Expr * range * TType - /// Type lambdas. These are used for the r.h.s. of polymorphic 'let' bindings and + /// Type lambdas. These are used for the r.h.s. of polymorphic 'let' bindings and /// for expressions that implement first-class polymorphic values. | TyLambda of Unique * Typars * Expr * range * TType @@ -4697,13 +4706,13 @@ and // Object expressions: A closure that implements an interface or a base type. // The base object type might be a delegate type. | Obj of - (* unique *) Unique * - (* object type *) TType * (* <-- NOTE: specifies type parameters for base type *) - (* base val *) Val option * - (* ctor call *) Expr * - (* overrides *) ObjExprMethod list * - (* extra interfaces *) (TType * ObjExprMethod list) list * - range + unique: Unique * + objTy: TType * (* <-- NOTE: specifies type parameters for base type *) + baseVal: Val option * + ctorCall: Expr * + overrides: ObjExprMethod list * + interfaceImpls: (TType * ObjExprMethod list) list * + range: range /// Matches are a more complicated form of "let" with multiple possible destinations /// and possibly multiple ways to get to each destination. @@ -4728,7 +4737,7 @@ and | Quote of Expr * (ILTypeRef list * TTypes * Exprs * ExprData) option ref * bool * range * TType /// Typechecking residue: Indicates a free choice of typars that arises due to - /// minimization of polymorphism at let-rec bindings. These are + /// minimization of polymorphism at let-rec bindings. These are /// resolved to a concrete instantiation on subsequent rewrites. | TyChoose of Typars * Expr * range @@ -4740,7 +4749,7 @@ and // Prefer to use the default formatting of this union type //[] - //member x.DebugText = x.ToString() + //member x.DebugText = x.ToString() // //override __.ToString() = "Expr(...)" @@ -4813,7 +4822,7 @@ and | UnionCaseFieldGetAddr of UnionCaseRef * int * readonly: bool /// 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. - | UnionCaseFieldSet of UnionCaseRef * int + | UnionCaseFieldSet of UnionCaseRef * int /// An operation representing a field-get from an F# exception value. | ExnFieldGet of TyconRef * int @@ -4851,7 +4860,7 @@ and /// Operation nodes representing C-style operations on byrefs and mutable vals (l-values) | LValueOp of LValueOperation * ValRef - /// ILCall(useCallvirt,isProtected,valu,newobj,valUseFlags,isProp,noTailCall,mref,actualTypeInst,actualMethInst, retTy) + /// ILCall(useCallvirt, isProtected, valu, newobj, valUseFlags, isProp, noTailCall, mref, actualTypeInst, actualMethInst, retTy) /// /// IL method calls. /// value -- is the object a value type? @@ -4864,7 +4873,7 @@ and // Prefer to use the default formatting of this union type //[] - //member x.DebugText = x.ToString() + //member x.DebugText = x.ToString() // //override __.ToString() = "TOp(...)" @@ -4908,7 +4917,7 @@ and LValueOperation = /// In C syntax this is: *localv_ptr | LByrefGet - /// In C syntax this is: localv = e , note == *(&localv) = e == LAddrOf; LByrefSet + /// In C syntax this is: localv = e, note == *(&localv) = e == LAddrOf; LByrefSet | LSet /// In C syntax this is: *localv_ptr = e @@ -4951,58 +4960,58 @@ and StaticOptimization = /// A representation of a method in an object expression. /// -/// TObjExprMethod(slotsig,attribs,methTyparsOfOverridingMethod,methodParams,methodBodyExpr,m) +/// TObjExprMethod(slotsig, attribs, methTyparsOfOverridingMethod, methodParams, methodBodyExpr, m) and [] ObjExprMethod = | TObjExprMethod of SlotSig * Attribs * Typars * Val list list * Expr * range - member x.Id = let (TObjExprMethod(slotsig,_,_,_,_,m)) = x in mkSynId m slotsig.Name + member x.Id = let (TObjExprMethod(slotsig, _, _, _, _, m)) = x in mkSynId m slotsig.Name [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = sprintf "TObjExprMethod(%s, ...)" x.Id.idText /// Represents an abstract method slot, or delegate signature. /// -/// TSlotSig(methodName,declaringType,declaringTypeParameters,methodTypeParameters,slotParameters,returnTy) +/// TSlotSig(methodName, declaringType, declaringTypeParameters, methodTypeParameters, slotParameters, returnTy) and [] SlotSig = | TSlotSig of string * TType * Typars * Typars * SlotParam list list * TType option - member ss.Name = let (TSlotSig(nm,_,_,_,_,_)) = ss in nm + member ss.Name = let (TSlotSig(nm, _, _, _, _, _)) = ss in nm - member ss.ImplementedType = let (TSlotSig(_,ty,_,_,_,_)) = ss in ty + member ss.ImplementedType = let (TSlotSig(_, ty, _, _, _, _)) = ss in ty - member ss.ClassTypars = let (TSlotSig(_,_,ctps,_,_,_)) = ss in ctps + member ss.ClassTypars = let (TSlotSig(_, _, ctps, _, _, _)) = ss in ctps - member ss.MethodTypars = let (TSlotSig(_,_,_,mtps,_,_)) = ss in mtps + member ss.MethodTypars = let (TSlotSig(_, _, _, mtps, _, _)) = ss in mtps - member ss.FormalParams = let (TSlotSig(_,_,_,_,ps,_)) = ss in ps + member ss.FormalParams = let (TSlotSig(_, _, _, _, ps, _)) = ss in ps - member ss.FormalReturnType = let (TSlotSig(_,_,_,_,_,rt)) = ss in rt + member ss.FormalReturnType = let (TSlotSig(_, _, _, _, _, rt)) = ss in rt [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override ss.ToString() = sprintf "TSlotSig(%s, ...)" ss.Name /// Represents a parameter to an abstract method slot. /// -/// TSlotParam(nm,ty,inFlag,outFlag,optionalFlag,attribs) +/// TSlotParam(nm, ty, inFlag, outFlag, optionalFlag, attribs) and [] SlotParam = - | TSlotParam of string option * TType * bool (* in *) * bool (* out *) * bool (* optional *) * Attribs + | TSlotParam of string option * TType * bool (* in *) * bool (* out *) * bool (* optional *) * Attribs - member x.Type = let (TSlotParam(_,ty,_,_,_,_)) = x in ty + member x.Type = let (TSlotParam(_, ty, _, _, _, _)) = x in ty [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = "TSlotParam(...)" @@ -5017,10 +5026,10 @@ and * ModuleOrNamespaceExpr * range - member x.Type = let (ModuleOrNamespaceExprWithSig(mtyp,_,_)) = x in mtyp + member x.Type = let (ModuleOrNamespaceExprWithSig(mtyp, _, _)) = x in mtyp [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = "ModuleOrNamespaceExprWithSig(...)" @@ -5032,20 +5041,20 @@ and | TMAbstract of ModuleOrNamespaceExprWithSig /// Indicates the module fragment is made of several module fragments in succession - | TMDefs of ModuleOrNamespaceExpr list + | TMDefs of ModuleOrNamespaceExpr list /// Indicates the module fragment is a 'let' definition - | TMDefLet of Binding * range + | TMDefLet of Binding * range /// Indicates the module fragment is an evaluation of expression for side-effects - | TMDefDo of Expr * range + | TMDefDo of Expr * range /// Indicates the module fragment is a 'rec' or 'non-rec' definition of types and modules - | TMDefRec of isRec:bool * Tycon list * ModuleOrNamespaceBinding list * range + | TMDefRec of isRec: bool * Tycon list * ModuleOrNamespaceBinding list * range // %+A formatting is used, so this is not needed //[] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = sprintf "%+A" x @@ -5064,20 +5073,20 @@ and ModuleOrNamespaceExpr [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override __.ToString() = "ModuleOrNamespaceBinding(...)" /// Represents a complete typechecked implementation file, including its typechecked signature if any. /// -/// TImplFile(qualifiedNameOfFile,pragmas,implementationExpressionWithSignature,hasExplicitEntryPoint,isScript) +/// TImplFile(qualifiedNameOfFile, pragmas, implementationExpressionWithSignature, hasExplicitEntryPoint, isScript) and [] TypedImplFile = | TImplFile of QualifiedNameOfFile * ScopedPragma list * ModuleOrNamespaceExprWithSig * bool * bool * StampMap [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = "TImplFile(...)" @@ -5089,12 +5098,12 @@ and | TypedAssemblyAfterOptimization of (TypedImplFile * (* optimizeDuringCodeGen: *) (Expr -> Expr)) list [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = "TypedAssemblyAfterOptimization(...)" //--------------------------------------------------------------------------- -// Freevars. Computed and cached by later phases (never computed type checking). Cached in terms. Not pickled. +// Freevars. Computed and cached by later phases (never computed type checking). Cached in terms. Not pickled. //--------------------------------------------------------------------------- /// Represents a set of free local values. @@ -5131,7 +5140,7 @@ and FreeTypars: FreeTypars } [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = "FreeTyvars(...)" @@ -5170,12 +5179,12 @@ and FreeTyvars: FreeTyvars } [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = "FreeVars(...)" -/// Specifies the compiled representations of type and exception definitions. Basically -/// just an ILTypeRef. Computed and cached by later phases. Stored in +/// Specifies the compiled representations of type and exception definitions. Basically +/// just an ILTypeRef. Computed and cached by later phases. Stored in /// type and exception definitions. Not pickled. Store an optional ILType object for /// non-generic types. and @@ -5196,15 +5205,15 @@ and /// An AbstractIL type representation that may include type variables // This case is only used for types defined in the F# library by their translation to ILASM types, e.g. // type ``[]``<'T> = (# "!0[]" #) - // type ``[,]``<'T> = (# "!0[0 ...,0 ...]" #) - // type ``[,,]``<'T> = (# "!0[0 ...,0 ...,0 ...]" #) + // type ``[, ]``<'T> = (# "!0[0 ..., 0 ...]" #) + // type ``[, , ]``<'T> = (# "!0[0 ..., 0 ..., 0 ...]" #) // type byref<'T> = (# "!0&" #) - // type nativeptr<'T when 'T : unmanaged> = (# "native int" #) + // type nativeptr<'T when 'T: unmanaged> = (# "native int" #) // type ilsigptr<'T> = (# "!0*" #) | ILAsmOpen of ILType [] - member x.DebugText = x.ToString() + member x.DebugText = x.ToString() override x.ToString() = "CompiledTypeRepr(...)" @@ -5217,34 +5226,34 @@ and [] module ValReprInfo = - let unnamedTopArg1 : ArgReprInfo = { Attribs=[]; Name=None } + let unnamedTopArg1: ArgReprInfo = { Attribs=[]; Name=None } let unnamedTopArg = [unnamedTopArg1] - let unitArgData : ArgReprInfo list list = [[]] + let unitArgData: ArgReprInfo list list = [[]] - let unnamedRetVal : ArgReprInfo = { Attribs = []; Name=None } + let unnamedRetVal: ArgReprInfo = { Attribs = []; Name=None } let selfMetadata = unnamedTopArg - let emptyValData = ValReprInfo([],[],unnamedRetVal) + let emptyValData = ValReprInfo([], [], unnamedRetVal) - let InferTyparInfo (tps:Typar list) = tps |> List.map (fun tp -> TyparReprInfo(tp.Id, tp.Kind)) + let InferTyparInfo (tps: Typar list) = tps |> List.map (fun tp -> TyparReprInfo(tp.Id, tp.Kind)) - let InferArgReprInfo (v:Val) : ArgReprInfo = { Attribs = []; Name= Some v.Id } + let InferArgReprInfo (v: Val) : ArgReprInfo = { Attribs = []; Name= Some v.Id } - let InferArgReprInfos (vs:Val list list) = ValReprInfo([],List.mapSquared InferArgReprInfo vs,unnamedRetVal) + let InferArgReprInfos (vs: Val list list) = ValReprInfo([], List.mapSquared InferArgReprInfo vs, unnamedRetVal) - let HasNoArgs (ValReprInfo(n,args,_)) = n.IsEmpty && args.IsEmpty + let HasNoArgs (ValReprInfo(n, args, _)) = n.IsEmpty && args.IsEmpty //--------------------------------------------------------------------------- // Basic properties via functions (old style) //--------------------------------------------------------------------------- -let typeOfVal (v:Val) = v.Type -let typesOfVals (v:Val list) = v |> List.map (fun v -> v.Type) -let nameOfVal (v:Val) = v.LogicalName -let arityOfVal (v:Val) = (match v.ValReprInfo with None -> ValReprInfo.emptyValData | Some arities -> arities) +let typeOfVal (v: Val) = v.Type +let typesOfVals (v: Val list) = v |> List.map (fun v -> v.Type) +let nameOfVal (v: Val) = v.LogicalName +let arityOfVal (v: Val) = (match v.ValReprInfo with None -> ValReprInfo.emptyValData | Some arities -> arities) let tupInfoRef = TupInfo.Const false let tupInfoStruct = TupInfo.Const true @@ -5258,15 +5267,15 @@ let mkRawStructTupleTy tys = TType_tuple (tupInfoStruct, tys) // make up the entire compilation unit //--------------------------------------------------------------------------- -let mapTImplFile f (TImplFile(fragName,pragmas,moduleExpr,hasExplicitEntryPoint,isScript,anonRecdTypes)) = TImplFile(fragName, pragmas,f moduleExpr,hasExplicitEntryPoint,isScript,anonRecdTypes) -let mapAccImplFile f z (TImplFile(fragName,pragmas,moduleExpr,hasExplicitEntryPoint,isScript,anonRecdTypes)) = let moduleExpr,z = f z moduleExpr in TImplFile(fragName,pragmas,moduleExpr,hasExplicitEntryPoint,isScript,anonRecdTypes), z -let foldTImplFile f z (TImplFile(_,_,moduleExpr,_,_,_)) = f z moduleExpr +let mapTImplFile f (TImplFile(fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes)) = TImplFile(fragName, pragmas, f moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes) +let mapAccImplFile f z (TImplFile(fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes)) = let moduleExpr, z = f z moduleExpr in TImplFile(fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes), z +let foldTImplFile f z (TImplFile(_, _, moduleExpr, _, _, _)) = f z moduleExpr //--------------------------------------------------------------------------- // Equality relations on locally defined things //--------------------------------------------------------------------------- -let typarEq (lv1:Typar) (lv2:Typar) = (lv1.Stamp = lv2.Stamp) +let typarEq (lv1: Typar) (lv2: Typar) = (lv1.Stamp = lv2.Stamp) /// Equality on type variables, implemented as reference equality. This should be equivalent to using typarEq. let typarRefEq (tp1: Typar) (tp2: Typar) = (tp1 === tp2) @@ -5284,7 +5293,7 @@ let ccuEq (mv1: CcuThunk) (mv2: CcuThunk) = mv1.Contents === mv2.Contents) /// For dereferencing in the middle of a pattern -let (|ValDeref|) (vr :ValRef) = vr.Deref +let (|ValDeref|) (vr: ValRef) = vr.Deref //-------------------------------------------------------------------------- @@ -5295,9 +5304,9 @@ let mkRecdFieldRef tcref f = RFRef(tcref, f) let mkUnionCaseRef tcref c = UCRef(tcref, c) -let ERefLocal x : EntityRef = { binding=x; nlr=Unchecked.defaultof<_> } -let ERefNonLocal x : EntityRef = { binding=Unchecked.defaultof<_>; nlr=x } -let ERefNonLocalPreResolved x xref : EntityRef = { binding=x; nlr=xref } +let ERefLocal x: EntityRef = { binding=x; nlr=Unchecked.defaultof<_> } +let ERefNonLocal x: EntityRef = { binding=Unchecked.defaultof<_>; nlr=x } +let ERefNonLocalPreResolved x xref: EntityRef = { binding=x; nlr=xref } let (|ERefLocal|ERefNonLocal|) (x: EntityRef) = match box x.nlr with | null -> ERefLocal x.binding @@ -5309,29 +5318,29 @@ let (|ERefLocal|ERefNonLocal|) (x: EntityRef) = let mkLocalTyconRef x = ERefLocal x -let mkNonLocalEntityRef ccu mp = NonLocalEntityRef(ccu,mp) -let mkNestedNonLocalEntityRef (nleref:NonLocalEntityRef) id = mkNonLocalEntityRef nleref.Ccu (Array.append nleref.Path [| id |]) +let mkNonLocalEntityRef ccu mp = NonLocalEntityRef(ccu, mp) +let mkNestedNonLocalEntityRef (nleref: NonLocalEntityRef) id = mkNonLocalEntityRef nleref.Ccu (Array.append nleref.Path [| id |]) let mkNonLocalTyconRef nleref id = ERefNonLocal (mkNestedNonLocalEntityRef nleref id) let mkNonLocalTyconRefPreResolved x nleref id = ERefNonLocalPreResolved x (mkNestedNonLocalEntityRef nleref id) type EntityRef with - member tcref.NestedTyconRef (x:Entity) = + member tcref.NestedTyconRef (x: Entity) = match tcref with | ERefLocal _ -> mkLocalTyconRef x | ERefNonLocal nlr -> mkNonLocalTyconRefPreResolved x nlr x.LogicalName - member tcref.RecdFieldRefInNestedTycon tycon (id:Ident) = RFRef (tcref.NestedTyconRef tycon, id.idText) + member tcref.RecdFieldRefInNestedTycon tycon (id: Ident) = RFRef (tcref.NestedTyconRef tycon, id.idText) /// Make a reference to a union case for type in a module or namespace -let mkModuleUnionCaseRef (modref:ModuleOrNamespaceRef) tycon uc = +let mkModuleUnionCaseRef (modref: ModuleOrNamespaceRef) tycon uc = (modref.NestedTyconRef tycon).MakeNestedUnionCaseRef uc -let VRefLocal x : ValRef = { binding=x; nlr=Unchecked.defaultof<_> } +let VRefLocal x: ValRef = { binding=x; nlr=Unchecked.defaultof<_> } -let VRefNonLocal x : ValRef = { binding=Unchecked.defaultof<_>; nlr=x } +let VRefNonLocal x: ValRef = { binding=Unchecked.defaultof<_>; nlr=x } -let VRefNonLocalPreResolved x xref : ValRef = { binding=x; nlr=xref } +let VRefNonLocalPreResolved x xref: ValRef = { binding=x; nlr=xref } let (|VRefLocal|VRefNonLocal|) (x: ValRef) = match box x.nlr with @@ -5355,18 +5364,18 @@ let ccuOfTyconRef eref = // Type parameters and inference unknowns //------------------------------------------------------------------------- -let mkTyparTy (tp:Typar) = +let mkTyparTy (tp: Typar) = match tp.Kind with | TyparKind.Type -> tp.AsType | TyparKind.Measure -> TType_measure (Measure.Var tp) let copyTypar (tp: Typar) = let optData = tp.typar_opt_data |> Option.map (fun tg -> { typar_il_name = tg.typar_il_name; typar_xmldoc = tg.typar_xmldoc; typar_constraints = tg.typar_constraints; typar_attribs = tg.typar_attribs }) - Typar.New { typar_id = tp.typar_id - typar_flags = tp.typar_flags - typar_stamp = newStamp() + Typar.New { typar_id = tp.typar_id + typar_flags = tp.typar_flags + typar_stamp = newStamp() typar_solution = tp.typar_solution - typar_astype = Unchecked.defaultof<_> + typar_astype = Unchecked.defaultof<_> // Be careful to clone the mutable optional data too typar_opt_data = optData } @@ -5376,7 +5385,7 @@ let copyTypars tps = List.map copyTypar tps // Inference variables //-------------------------------------------------------------------------- -let tryShortcutSolvedUnitPar canShortcut (r:Typar) = +let tryShortcutSolvedUnitPar canShortcut (r: Typar) = if r.Kind = TyparKind.Type then failwith "tryShortcutSolvedUnitPar: kind=type" match r.Solution with | Some (TType_measure unt) -> @@ -5429,13 +5438,13 @@ let stripUnitEqns unt = stripUnitEqnsAux false unt // the item is globally stable ("published") or not. //--------------------------------------------------------------------------- -let mkLocalValRef (v:Val) = VRefLocal v -let mkLocalModRef (v:ModuleOrNamespace) = ERefLocal v -let mkLocalEntityRef (v:Entity) = ERefLocal v +let mkLocalValRef (v: Val) = VRefLocal v +let mkLocalModRef (v: ModuleOrNamespace) = ERefLocal v +let mkLocalEntityRef (v: Entity) = ERefLocal v -let mkNonLocalCcuRootEntityRef ccu (x:Entity) = mkNonLocalTyconRefPreResolved x (mkNonLocalEntityRef ccu [| |]) x.LogicalName +let mkNonLocalCcuRootEntityRef ccu (x: Entity) = mkNonLocalTyconRefPreResolved x (mkNonLocalEntityRef ccu [| |]) x.LogicalName -let mkNestedValRef (cref:EntityRef) (v:Val) : ValRef = +let mkNestedValRef (cref: EntityRef) (v: Val) : ValRef = match cref with | ERefLocal _ -> mkLocalValRef v | ERefNonLocal nlr -> @@ -5446,7 +5455,7 @@ let mkNestedValRef (cref:EntityRef) (v:Val) : ValRef = let rescopePubPathToParent viewedCcu (PubPath(p)) = NonLocalEntityRef(viewedCcu, p.[0..p.Length-2]) /// From Ref_private to Ref_nonlocal when exporting data. -let rescopePubPath viewedCcu (PubPath(p)) = NonLocalEntityRef(viewedCcu,p) +let rescopePubPath viewedCcu (PubPath(p)) = NonLocalEntityRef(viewedCcu, p) //--------------------------------------------------------------------------- // Equality between TAST items. @@ -5473,14 +5482,14 @@ let entityRefInThisAssembly compilingFslib (x: EntityRef) = | ERefLocal _ -> true | ERefNonLocal _ -> compilingFslib -let arrayPathEq (y1:string[]) (y2:string[]) = +let arrayPathEq (y1: string[]) (y2: string[]) = let len1 = y1.Length let len2 = y2.Length (len1 = len2) && (let rec loop i = (i >= len1) || (y1.[i] = y2.[i] && loop (i+1)) loop 0) -let nonLocalRefEq (NonLocalEntityRef(x1,y1) as smr1) (NonLocalEntityRef(x2,y2) as smr2) = +let nonLocalRefEq (NonLocalEntityRef(x1, y1) as smr1) (NonLocalEntityRef(x2, y2) as smr2) = smr1 === smr2 || (ccuEq x1 x2 && arrayPathEq y1 y2) /// This predicate tests if non-local resolution paths are definitely known to resolve @@ -5488,12 +5497,12 @@ let nonLocalRefEq (NonLocalEntityRef(x1,y1) as smr1) (NonLocalEntityRef(x2,y2) a /// different entities. Two references with the same named paths may resolve to the same /// entities even if they reference through different CCUs, because one reference /// may be forwarded to another via a .NET TypeForwarder. -let nonLocalRefDefinitelyNotEq (NonLocalEntityRef(_,y1)) (NonLocalEntityRef(_,y2)) = +let nonLocalRefDefinitelyNotEq (NonLocalEntityRef(_, y1)) (NonLocalEntityRef(_, y2)) = not (arrayPathEq y1 y2) let pubPathEq (PubPath path1) (PubPath path2) = arrayPathEq path1 path2 -let fslibRefEq (nlr1:NonLocalEntityRef) (PubPath(path2)) = +let fslibRefEq (nlr1: NonLocalEntityRef) (PubPath(path2)) = arrayPathEq nlr1.Path path2 // Compare two EntityRef's for equality when compiling fslib (FSharp.Core.dll) @@ -5502,8 +5511,8 @@ let fslibRefEq (nlr1:NonLocalEntityRef) (PubPath(path2)) = // This breaks certain invariants that hold elsewhere, because they dereference to point to // Entity's from signatures rather than Entity's from implementations. This means backup, alternative // equality comparison techniques are needed when compiling fslib itself. -let fslibEntityRefEq fslibCcu (eref1:EntityRef) (eref2:EntityRef) = - match eref1,eref2 with +let fslibEntityRefEq fslibCcu (eref1: EntityRef) (eref2: EntityRef) = + match eref1, eref2 with | (ERefNonLocal nlr1, ERefLocal x2) | (ERefLocal x2, ERefNonLocal nlr1) -> ccuEq nlr1.Ccu fslibCcu && @@ -5511,7 +5520,7 @@ let fslibEntityRefEq fslibCcu (eref1:EntityRef) (eref2:EntityRef) = | Some pp2 -> fslibRefEq nlr1 pp2 | None -> false | (ERefLocal e1, ERefLocal e2) -> - match e1.PublicPath , e2.PublicPath with + match e1.PublicPath, e2.PublicPath with | Some pp1, Some pp2 -> pubPathEq pp1 pp2 | _ -> false | _ -> false @@ -5529,19 +5538,19 @@ let fslibValRefEq fslibCcu vref1 vref2 = | (VRefLocal x2, VRefNonLocal nlr1) -> ccuEq nlr1.Ccu fslibCcu && match x2.PublicPath with - | Some (ValPubPath(pp2,nm2)) -> + | Some (ValPubPath(pp2, nm2)) -> // Note: this next line is just comparing the values by name, and not even the partial linkage data // This relies on the fact that the compiler doesn't use any references to // entities in fslib that are overloaded, or, if they are overloaded, then value identity // is not significant - nlr1.ItemKey.PartialKey = nm2.PartialKey && + nlr1.ItemKey.PartialKey = nm2.PartialKey && fslibRefEq nlr1.EnclosingEntity.nlr pp2 | _ -> false // Note: I suspect this private-to-private reference comparison is not needed | (VRefLocal e1, VRefLocal e2) -> match e1.PublicPath, e2.PublicPath with - | Some (ValPubPath(pp1,nm1)), Some (ValPubPath(pp2,nm2)) -> + | Some (ValPubPath(pp1, nm1)), Some (ValPubPath(pp2, nm2)) -> pubPathEq pp1 pp2 && (nm1 = nm2) | _ -> false @@ -5549,7 +5558,7 @@ let fslibValRefEq fslibCcu vref1 vref2 = /// Primitive routine to compare two EntityRef's for equality /// This takes into account the possibility that they may have type forwarders -let primEntityRefEq compilingFslib fslibCcu (x : EntityRef) (y : EntityRef) = +let primEntityRefEq compilingFslib fslibCcu (x: EntityRef) (y: EntityRef) = x === y || if x.IsResolved && y.IsResolved && not compilingFslib then @@ -5568,17 +5577,17 @@ let primEntityRefEq compilingFslib fslibCcu (x : EntityRef) (y : EntityRef) = compilingFslib && fslibEntityRefEq fslibCcu x y /// Primitive routine to compare two UnionCaseRef's for equality -let primUnionCaseRefEq compilingFslib fslibCcu (UCRef(tcr1,c1) as uc1) (UCRef(tcr2,c2) as uc2) = +let primUnionCaseRefEq compilingFslib fslibCcu (UCRef(tcr1, c1) as uc1) (UCRef(tcr2, c2) as uc2) = uc1 === uc2 || (primEntityRefEq compilingFslib fslibCcu tcr1 tcr2 && c1 = c2) -/// Primitive routine to compare two ValRef's for equality. On the whole value identity is not particularly +/// 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 -let primValRefEq compilingFslib fslibCcu (x : ValRef) (y : ValRef) = +let primValRefEq compilingFslib fslibCcu (x: ValRef) (y: ValRef) = x === y || if (x.IsResolved && y.IsResolved && x.ResolvedTarget === y.ResolvedTarget) || (x.IsLocalRef && y.IsLocalRef && valEq x.PrivateTarget y.PrivateTarget) then @@ -5595,16 +5604,16 @@ let primValRefEq compilingFslib fslibCcu (x : ValRef) (y : ValRef) = // pubpath/cpath mess //--------------------------------------------------------------------------- -let fullCompPathOfModuleOrNamespace (m:ModuleOrNamespace) = - let (CompPath(scoref,cpath)) = m.CompilationPath - CompPath(scoref,cpath@[(m.LogicalName, m.ModuleOrNamespaceType.ModuleOrNamespaceKind)]) +let fullCompPathOfModuleOrNamespace (m: ModuleOrNamespace) = + let (CompPath(scoref, cpath)) = m.CompilationPath + CompPath(scoref, cpath@[(m.LogicalName, m.ModuleOrNamespaceType.ModuleOrNamespaceKind)]) // Can cpath2 be accessed given a right to access cpath1. That is, is cpath2 a nested type or namespace of cpath1. Note order of arguments. -let inline canAccessCompPathFrom (CompPath(scoref1,cpath1)) (CompPath(scoref2,cpath2)) = - let rec loop p1 p2 = - match p1,p2 with - | (a1,k1)::rest1, (a2,k2)::rest2 -> (a1=a2) && (k1=k2) && loop rest1 rest2 - | [],_ -> true +let inline canAccessCompPathFrom (CompPath(scoref1, cpath1)) (CompPath(scoref2, cpath2)) = + let rec loop p1 p2 = + match p1, p2 with + | (a1, k1)::rest1, (a2, k2)::rest2 -> (a1=a2) && (k1=k2) && loop rest1 rest2 + | [], _ -> true | _ -> false // cpath1 is longer loop cpath1 cpath2 && (scoref1 = scoref2) @@ -5617,18 +5626,18 @@ let canAccessFrom (TAccess x) cpath = let canAccessFromEverywhere (TAccess x) = x.IsEmpty let canAccessFromSomewhere (TAccess _) = true -let isLessAccessible (TAccess aa) (TAccess bb) = +let isLessAccessible (TAccess aa) (TAccess bb) = not (aa |> List.forall(fun a -> bb |> List.exists (fun b -> canAccessCompPathFrom a b))) -/// Given (newPath,oldPath) replace oldPath by newPath in the TAccess. -let accessSubstPaths (newPath,oldPath) (TAccess paths) = +/// Given (newPath, oldPath) replace oldPath by newPath in the TAccess. +let accessSubstPaths (newPath, oldPath) (TAccess paths) = let subst cpath = if cpath=oldPath then newPath else cpath TAccess (List.map subst paths) -let compPathOfCcu (ccu:CcuThunk) = CompPath(ccu.ILScopeRef,[]) +let compPathOfCcu (ccu: CcuThunk) = CompPath(ccu.ILScopeRef, []) let taccessPublic = TAccess [] let taccessPrivate accessPath = TAccess [accessPath] -let compPathInternal = CompPath(ILScopeRef.Local,[]) +let compPathInternal = CompPath(ILScopeRef.Local, []) let taccessInternal = TAccess [compPathInternal] let combineAccess (TAccess a1) (TAccess a2) = TAccess(a1@a2) @@ -5638,26 +5647,26 @@ let combineAccess (TAccess a1) (TAccess a2) = TAccess(a1@a2) let NewFreeVarsCache() = newCache () -let MakeUnionCasesTable ucs : TyconUnionCases = +let MakeUnionCasesTable ucs: TyconUnionCases = { CasesByIndex = Array.ofList ucs CasesByName = NameMap.ofKeyedList (fun uc -> uc.DisplayName) ucs } -let MakeRecdFieldsTable ucs : TyconRecdFields = +let MakeRecdFieldsTable ucs: TyconRecdFields = { FieldsByIndex = Array.ofList ucs - FieldsByName = ucs |> NameMap.ofKeyedList (fun rfld -> rfld.Name) } + FieldsByName = ucs |> NameMap.ofKeyedList (fun rfld -> rfld.Name) } -let MakeUnionCases ucs : TyconUnionData = +let MakeUnionCases ucs: TyconUnionData = { CasesTable=MakeUnionCasesTable ucs CompiledRepresentation=newCache() } let MakeUnionRepr ucs = TUnionRepr (MakeUnionCases ucs) -let NewTypar (kind,rigid,Typar(id,staticReq,isCompGen),isFromError,dynamicReq,attribs,eqDep,compDep) = +let NewTypar (kind, rigid, Typar(id, staticReq, isCompGen), isFromError, dynamicReq, attribs, eqDep, compDep) = Typar.New { typar_id = id typar_stamp = newStamp() - typar_flags= TyparFlags(kind,rigid,isFromError,isCompGen,staticReq,dynamicReq,eqDep,compDep) + typar_flags= TyparFlags(kind, rigid, isFromError, isCompGen, staticReq, dynamicReq, eqDep, compDep) typar_solution = None typar_astype = Unchecked.defaultof<_> typar_opt_data = @@ -5665,11 +5674,10 @@ let NewTypar (kind,rigid,Typar(id,staticReq,isCompGen),isFromError,dynamicReq,at | [] -> None | _ -> Some { typar_il_name = None; typar_xmldoc = XmlDoc.Empty; typar_constraints = []; typar_attribs = attribs } } -let NewRigidTypar nm m = NewTypar (TyparKind.Type,TyparRigidity.Rigid,Typar(mkSynId m nm,NoStaticReq,true),false,TyparDynamicReq.Yes,[],false,false) +let NewRigidTypar nm m = NewTypar (TyparKind.Type, TyparRigidity.Rigid, Typar(mkSynId m nm, NoStaticReq, true), false, TyparDynamicReq.Yes, [], false, false) -let NewUnionCase id nm tys rty attribs docOption access : UnionCase = +let NewUnionCase id tys rty attribs docOption access: UnionCase = { Id=id - CompiledName=nm XmlDoc=docOption XmlDocSig="" Accessibility=access @@ -5684,14 +5692,14 @@ let NewModuleOrNamespaceType mkind tycons vals = let NewEmptyModuleOrNamespaceType mkind = NewModuleOrNamespaceType mkind [] [] /// Create a new TAST Entity node for an F# exception definition -let NewExn cpath (id:Ident) access repr attribs doc = +let NewExn cpath (id: Ident) access repr attribs doc = Tycon.New "exnc" { entity_stamp=newStamp() entity_attribs=attribs entity_logical_name=id.idText entity_range=id.idRange entity_tycon_tcaug=TyconAugmentation.Create() - entity_pubpath=cpath |> Option.map (fun (cp:CompilationPath) -> cp.NestedPublicPath id) + entity_pubpath=cpath |> Option.map (fun (cp: CompilationPath) -> cp.NestedPublicPath id) entity_modul_contents = MaybeLazy.Strict (NewEmptyModuleOrNamespaceType ModuleOrType) entity_cpath= cpath entity_typars=LazyWithContext.NotLazy [] @@ -5704,7 +5712,7 @@ let NewExn cpath (id:Ident) access repr attribs doc = | _ -> Some { Entity.NewEmptyEntityOptData() with entity_xmldoc = doc; entity_accessiblity = access; entity_tycon_repr_accessibility = access; entity_exn_info = repr } } /// Create a new TAST RecdField node for an F# class, struct or record field -let NewRecdField stat konst id nameGenerated ty isMutable isVolatile pattribs fattribs docOption access secret = +let NewRecdField stat konst id nameGenerated ty isMutable isVolatile pattribs fattribs docOption access secret = { rfield_mutable=isMutable rfield_pattribs=pattribs rfield_fattribs=fattribs @@ -5727,13 +5735,13 @@ let NewTycon (cpath, nm, m, access, reprAccess, kind, typars, docOption, usesPre { entity_stamp=stamp entity_logical_name=nm entity_range=m - entity_flags=EntityFlags(usesPrefixDisplay=usesPrefixDisplay, isModuleOrNamespace=false,preEstablishedHasDefaultCtor=preEstablishedHasDefaultCtor, hasSelfReferentialCtor=hasSelfReferentialCtor, isStructRecordOrUnionType=false) + entity_flags=EntityFlags(usesPrefixDisplay=usesPrefixDisplay, isModuleOrNamespace=false, preEstablishedHasDefaultCtor=preEstablishedHasDefaultCtor, hasSelfReferentialCtor=hasSelfReferentialCtor, isStructRecordOrUnionType=false) entity_attribs=[] // fixed up after entity_typars=typars entity_tycon_repr = TNoRepr entity_tycon_tcaug=TyconAugmentation.Create() entity_modul_contents = mtyp - entity_pubpath=cpath |> Option.map (fun (cp:CompilationPath) -> cp.NestedPublicPath (mkSynId m nm)) + entity_pubpath=cpath |> Option.map (fun (cp: CompilationPath) -> cp.NestedPublicPath (mkSynId m nm)) entity_cpath = cpath entity_il_repr_cache = newCache() entity_opt_data = @@ -5742,13 +5750,13 @@ let NewTycon (cpath, nm, m, access, reprAccess, kind, typars, docOption, usesPre | _ -> Some { Entity.NewEmptyEntityOptData() with entity_kind = kind; entity_xmldoc = docOption; entity_tycon_repr_accessibility = reprAccess; entity_accessiblity=access } } -let NewILTycon nlpath (nm,m) tps (scoref:ILScopeRef, enc, tdef:ILTypeDef) mtyp = +let NewILTycon nlpath (nm, m) tps (scoref: ILScopeRef, enc, tdef: ILTypeDef) mtyp = // NOTE: hasSelfReferentialCtor=false is an assumption about mscorlib let hasSelfReferentialCtor = tdef.IsClass && (not scoref.IsAssemblyRef && scoref.AssemblyRef.Name = "mscorlib") let tycon = NewTycon(nlpath, nm, m, taccessPublic, taccessPublic, TyparKind.Type, tps, XmlDoc.Empty, true, false, hasSelfReferentialCtor, mtyp) - tycon.entity_tycon_repr <- TILObjectRepr (TILObjectReprData (scoref,enc,tdef)) + tycon.entity_tycon_repr <- TILObjectRepr (TILObjectReprData (scoref, enc, tdef)) tycon.TypeContents.tcaug_closed <- true tycon @@ -5756,42 +5764,42 @@ exception Duplicate of string * string * range exception NameClash of string * string * string * range * string * string * range exception FullAbstraction of string * range -let NewModuleOrNamespace cpath access (id:Ident) xml attribs mtype = +let NewModuleOrNamespace cpath access (id: Ident) xml attribs mtype = Construct.NewModuleOrNamespace cpath access id xml attribs mtype /// Create a new Val object let NewVal - (logicalName:string, m:range, compiledName, ty, isMutable, isCompGen, arity, access, + (logicalName: string, m: range, compiledName, ty, isMutable, isCompGen, arity, access, recValInfo, specialRepr, baseOrThis, attribs, inlineInfo, doc, isModuleOrMemberBinding, isExtensionMember, isIncrClassSpecialMember, isTyFunc, allowTypeInst, isGeneratedEventVal, konst, actualParent) : Val = let stamp = newStamp() Val.New - { val_stamp = stamp + { val_stamp = stamp val_logical_name = logicalName - val_range = m - val_flags = ValFlags(recValInfo,baseOrThis,isCompGen,inlineInfo,isMutable,isModuleOrMemberBinding,isExtensionMember,isIncrClassSpecialMember,isTyFunc,allowTypeInst,isGeneratedEventVal) - val_type = ty - val_opt_data = + val_range = m + val_flags = ValFlags(recValInfo, baseOrThis, isCompGen, inlineInfo, isMutable, isModuleOrMemberBinding, isExtensionMember, isIncrClassSpecialMember, isTyFunc, allowTypeInst, isGeneratedEventVal) + val_type = ty + val_opt_data = match compiledName, arity, konst, access, doc, specialRepr, actualParent, attribs with | None, None, None, TAccess [], XmlDoc [||], None, ParentNone, [] -> None | _ -> Some { Val.NewEmptyValOptData() with - val_compiled_name = (match compiledName with Some v when v <> logicalName -> compiledName | _ -> None) - val_repr_info = arity - val_const = konst - val_access = access - val_xmldoc = doc - val_member_info = specialRepr + val_compiled_name = (match compiledName with Some v when v <> logicalName -> compiledName | _ -> None) + val_repr_info = arity + val_const = konst + val_access = access + val_xmldoc = doc + val_member_info = specialRepr val_declaring_entity = actualParent - val_attribs = attribs } + val_attribs = attribs } } /// Create the new contents of an overall assembly let NewCcuContents sref m nm mty = - NewModuleOrNamespace (Some(CompPath(sref,[]))) taccessPublic (ident(nm,m)) XmlDoc.Empty [] (MaybeLazy.Strict mty) + NewModuleOrNamespace (Some(CompPath(sref, []))) taccessPublic (ident(nm, m)) XmlDoc.Empty [] (MaybeLazy.Strict mty) //-------------------------------------------------------------------------- @@ -5802,8 +5810,8 @@ let NewCcuContents sref m nm mty = /// We require that we be given the new parent for the new tycon. /// We pass the new tycon to 'f' in case it needs to reparent the /// contents of the tycon. -let NewModifiedTycon f (orig:Tycon) = - let data = { orig with entity_stamp = newStamp() } +let NewModifiedTycon f (orig: Tycon) = + let data = { orig with entity_stamp = newStamp() } Tycon.New "NewModifiedTycon" (f data) /// Create a module Tycon based on an existing one using the function 'f'. @@ -5816,13 +5824,13 @@ let NewModifiedModuleOrNamespace f orig = /// Create a Val based on an existing one using the function 'f'. /// We require that we be given the parent for the new Val. -let NewModifiedVal f (orig:Val) = +let NewModifiedVal f (orig: Val) = let stamp = newStamp() let data' = f { orig with val_stamp=stamp } Val.New data' -let NewClonedModuleOrNamespace orig = NewModifiedModuleOrNamespace (fun mty -> mty) orig -let NewClonedTycon orig = NewModifiedTycon (fun d -> d) orig +let NewClonedModuleOrNamespace orig = NewModifiedModuleOrNamespace (fun mty -> mty) orig +let NewClonedTycon orig = NewModifiedTycon (fun d -> d) orig //------------------------------------------------------------------------------ @@ -5832,9 +5840,9 @@ let CombineCcuContentFragments m l = /// Combine module types when multiple namespace fragments contribute to the /// same namespace, making new module specs as we go. - let rec CombineModuleOrNamespaceTypes path m (mty1:ModuleOrNamespaceType) (mty2:ModuleOrNamespaceType) = - match mty1.ModuleOrNamespaceKind,mty2.ModuleOrNamespaceKind with - | Namespace,Namespace -> + let rec CombineModuleOrNamespaceTypes path m (mty1: ModuleOrNamespaceType) (mty2: ModuleOrNamespaceType) = + match mty1.ModuleOrNamespaceKind, mty2.ModuleOrNamespaceKind with + | Namespace, Namespace -> let kind = mty1.ModuleOrNamespaceKind let tab1 = mty1.AllEntitiesByLogicalMangledName let tab2 = mty2.AllEntitiesByLogicalMangledName @@ -5852,16 +5860,16 @@ let CombineCcuContentFragments m l = ModuleOrNamespaceType(kind, vals, QueueList.ofList entities) - | Namespace, _ | _,Namespace -> - error(Error(FSComp.SR.tastNamespaceAndModuleWithSameNameInAssembly(textOfPath path),m)) + | Namespace, _ | _, Namespace -> + error(Error(FSComp.SR.tastNamespaceAndModuleWithSameNameInAssembly(textOfPath path), m)) | _-> - error(Error(FSComp.SR.tastTwoModulesWithSameNameInAssembly(textOfPath path),m)) + error(Error(FSComp.SR.tastTwoModulesWithSameNameInAssembly(textOfPath path), m)) - and CombineEntites path (entity1:Entity) (entity2:Entity) = + and CombineEntites path (entity1: Entity) (entity2: Entity) = match entity1.IsModuleOrNamespace, entity2.IsModuleOrNamespace with - | true,true -> + | true, true -> entity1 |> NewModifiedTycon (fun data1 -> let xml = XmlDoc.Merge entity1.XmlDoc entity2.XmlDoc { data1 with @@ -5871,10 +5879,10 @@ let CombineCcuContentFragments m l = match data1.entity_opt_data with | Some optData -> Some { optData with entity_xmldoc = xml } | _ -> Some { Entity.NewEmptyEntityOptData() with entity_xmldoc = xml } }) - | false,false -> - error(Error(FSComp.SR.tastDuplicateTypeDefinitionInAssembly(entity2.LogicalName, textOfPath path),entity2.Range)) - | _,_ -> - error(Error(FSComp.SR.tastConflictingModuleAndTypeDefinitionInAssembly(entity2.LogicalName, textOfPath path),entity2.Range)) + | false, false -> + error(Error(FSComp.SR.tastDuplicateTypeDefinitionInAssembly(entity2.LogicalName, textOfPath path), entity2.Range)) + | _, _ -> + error(Error(FSComp.SR.tastConflictingModuleAndTypeDefinitionInAssembly(entity2.LogicalName, textOfPath path), entity2.Range)) and CombineModuleOrNamespaceTypeList path m l = match l with diff --git a/src/fcs-fable/src/utils/prim-lexing.fs b/src/fcs-fable/src/utils/prim-lexing.fs index c74d4ef46a..25e1b0a7dd 100755 --- a/src/fcs-fable/src/utils/prim-lexing.fs +++ b/src/fcs-fable/src/utils/prim-lexing.fs @@ -190,7 +190,7 @@ namespace Internal.Utilities.Text.Lexing module GenericImplFragments = - let startInterpret(lexBuffer:LexBuffer)= + let startInterpret(lexBuffer:LexBuffer) = lexBuffer.BufferScanStart <- lexBuffer.BufferScanStart + lexBuffer.LexemeLength; lexBuffer.BufferMaxScanLength <- lexBuffer.BufferMaxScanLength - lexBuffer.LexemeLength; lexBuffer.BufferScanLength <- 0; diff --git a/src/fcs-fable/src/utils/sformat.fs b/src/fcs-fable/src/utils/sformat.fs index a64d6e2f13..fbcc6ecc7c 100755 --- a/src/fcs-fable/src/utils/sformat.fs +++ b/src/fcs-fable/src/utils/sformat.fs @@ -1198,7 +1198,7 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl // massively reign in deep printing of properties let nDepth = depthLim/10 -#if NETSTANDARD1_6 || NETSTANDARD2_0 +#if NETSTANDARD Array.Sort((propsAndFields),{ new IComparer with member this.Compare(p1,p2) = compare (p1.Name) (p2.Name) } ); #else Array.Sort((propsAndFields :> Array),{ new System.Collections.IComparer with member this.Compare(p1,p2) = compare ((p1 :?> MemberInfo).Name) ((p2 :?> MemberInfo).Name) } ); diff --git a/src/fcs-fable/test/fcs-fable-test.fsproj b/src/fcs-fable/test/fcs-fable-test.fsproj index b723c7bd24..17c63ac134 100644 --- a/src/fcs-fable/test/fcs-fable-test.fsproj +++ b/src/fcs-fable/test/fcs-fable-test.fsproj @@ -2,8 +2,9 @@ Exe - netcoreapp2.1 + netcoreapp2.2 $(DefineConstants);DOTNET_FILE_SYSTEM + true @@ -17,8 +18,8 @@ + - diff --git a/src/fcs-fable/test/package.json b/src/fcs-fable/test/package.json index 80fe507ccb..cb72ec2c1e 100644 --- a/src/fcs-fable/test/package.json +++ b/src/fcs-fable/test/package.json @@ -5,7 +5,7 @@ "splitter": "node ./node_modules/fable-splitter/dist/cli --commonjs", "test-node": "node out-test/test", "test-dotnet": "dotnet run -c Release -p fcs-fable-test.fsproj", - "bench-dotnet": "dotnet run -c Release -p fcs-fable-bench.fsproj ../fcs-fable.fsproj" + "bench-dotnet": "dotnet run -c Release -p bench/fcs-fable-bench.fsproj ../fcs-fable.fsproj" }, "devDependencies": { "@babel/core": "^7.4.0",