Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Clean source of the F# compiler r54075, based on the contents of the

compiler/2.0/Nov2010 folder on http://fsharppowerpack.codeplex.com
  • Loading branch information...
commit 49330d707a83a4d9fa64cabe01fedab474f6d09c 0 parents
@shana shana authored
Showing with 42,714 additions and 0 deletions.
  1. +56 −0 LICENSE
  2. +651 −0 README.html
  3. +371 −0 src/ChangeLog
  4. +37 −0 src/FSharpSource.Settings.targets
  5. +211 −0 src/FSharpSource.targets
  6. +142 −0 src/absil/bytes.fs
  7. +62 −0 src/absil/bytes.fsi
  8. +4,617 −0 src/absil/il.fs
  9. +2,192 −0 src/absil/il.fsi
  10. +306 −0 src/absil/ilascii.fs
  11. +67 −0 src/absil/ilascii.fsi
  12. +1,018 −0 src/absil/ilbinary.fs
  13. +533 −0 src/absil/ilbinary.fsi
  14. +33 −0 src/absil/ildiag.fs
  15. +30 −0 src/absil/ildiag.fsi
  16. +192 −0 src/absil/illex.fsl
  17. +785 −0 src/absil/illib.fs
  18. +484 −0 src/absil/ilmorph.fs
  19. +49 −0 src/absil/ilmorph.fsi
  20. +449 −0 src/absil/ilpars.fsy
  21. +1,288 −0 src/absil/ilprint.fs
  22. +24 −0 src/absil/ilprint.fsi
  23. +4,060 −0 src/absil/ilread.fs
  24. +73 −0 src/absil/ilread.fsi
  25. +1,993 −0 src/absil/ilreflect.fs
  26. +1,566 −0 src/absil/ilsupp.fs
  27. +157 −0 src/absil/ilsupp.fsi
  28. +4,512 −0 src/absil/ilwrite.fs
  29. +45 −0 src/absil/ilwrite.fsi
  30. +205 −0 src/absil/ilx.fs
  31. +173 −0 src/absil/ilx.fsi
  32. +61 −0 src/absil/zmap.fs
  33. +56 −0 src/absil/zmap.fsi
  34. +54 −0 src/absil/zset.fs
  35. +53 −0 src/absil/zset.fsi
  36. +76 −0 src/all-vs2010.sln
  37. +19 −0 src/assemblyinfo/assemblyinfo.FSharp.Build.dll.fs
  38. +15 −0 src/assemblyinfo/assemblyinfo.FSharp.Compiler.Interactive.Settings.dll.fs
  39. +18 −0 src/assemblyinfo/assemblyinfo.FSharp.Compiler.Server.Shared.dll.fs
  40. +49 −0 src/assemblyinfo/assemblyinfo.FSharp.Compiler.dll.fs
  41. +9 −0 src/assemblyinfo/assemblyinfo.FSharp.Core.dll.fs
  42. +20 −0 src/assemblyinfo/assemblyinfo.FSharp.LanguageService.Base.dll.cs
  43. +22 −0 src/assemblyinfo/assemblyinfo.FSharp.LanguageService.dll.fs
  44. +14 −0 src/assemblyinfo/assemblyinfo.FSharp.ProjectSystem.Base.dll.cs
  45. +22 −0 src/assemblyinfo/assemblyinfo.FSharp.ProjectSystem.FSharp.dll.fs
  46. +16 −0 src/assemblyinfo/assemblyinfo.FSharp.VS.FSI.dll.fs
  47. +11 −0 src/assemblyinfo/assemblyinfo.fsc.exe.fs
  48. +9 −0 src/assemblyinfo/assemblyinfo.fsi.exe.fs
  49. +34 −0 src/fsharp-compiler-build.proj
  50. +29 −0 src/fsharp-compiler-unittests-build.proj
  51. +29 −0 src/fsharp-library-build.proj
  52. +28 −0 src/fsharp-library-unittests-build.proj
  53. +31 −0 src/fsharp-proto-build.proj
  54. +441 −0 src/fsharp/ErrorLogger.fs
  55. +58 −0 src/fsharp/ExtensibleDumper.fs
  56. +18 −0 src/fsharp/ExtensibleDumper.fsi
  57. +1,139 −0 src/fsharp/FSComp.txt
  58. +34 −0 src/fsharp/FSCstrings.txt
  59. +13 −0 src/fsharp/FSInteractiveSettings.txt
  60. +1,077 −0 src/fsharp/FSStrings.resx
  61. +164 −0 src/fsharp/FSharp.Build-proto/FSharp.Build-proto.fsi
  62. +63 −0 src/fsharp/FSharp.Build-proto/FSharp.Build-proto.fsproj
  63. +38 −0 src/fsharp/FSharp.Build/CreateFSharpManifestResourceName.fs
  64. +7 −0 src/fsharp/FSharp.Build/CreateFSharpManifestResourceName.fsi
  65. +14 −0 src/fsharp/FSharp.Build/FSBuild.txt
  66. +166 −0 src/fsharp/FSharp.Build/FSharp.Build.fsi
  67. +61 −0 src/fsharp/FSharp.Build/FSharp.Build.fsproj
  68. +485 −0 src/fsharp/FSharp.Build/Fsc.fs
  69. +57 −0 src/fsharp/FSharp.Build/Fsc.fsi
  70. +193 −0 src/fsharp/FSharp.Build/Microsoft.FSharp.targets
  71. BIN  src/fsharp/FSharp.Build/subst.exe
  72. +14 −0 src/fsharp/FSharp.Build/subst.fsx
  73. +431 −0 src/fsharp/FSharp.Compiler-proto/FSharp.Compiler-proto.fsproj
  74. +51 −0 src/fsharp/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj
  75. +46 −0 src/fsharp/FSharp.Compiler.Server.Shared/FSharp.Compiler.Server.Shared.fsproj
  76. +457 −0 src/fsharp/FSharp.Compiler/FSharp.Compiler.fsproj
  77. +8 −0 src/fsharp/FSharp.Core.Unittests/App.xaml
  78. +106 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj
  79. +171 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Lazy.fs
  80. +601 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/Array2Module.fs
  81. +331 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/Array3Module.fs
  82. +245 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/Array4Module.fs
  83. +1,120 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ArrayModule.fs
  84. +809 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ArrayModule2.fs
  85. +59 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ComparisonIdentityModule.fs
  86. +83 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/HashIdentityModule.fs
  87. +608 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListModule.fs
  88. +679 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListModule2.fs
  89. +212 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListType.fs
  90. +612 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/MapModule.fs
  91. +297 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/MapType.fs
  92. +763 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/SeqModule.fs
  93. +1,155 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/SeqModule2.fs
  94. +641 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/SetModule.fs
  95. +323 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/SetType.fs
  96. +170 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/StringModule.fs
  97. +57 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/AsyncModule.fs
  98. +189 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/AsyncType.fs
  99. +253 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/Cancellation.fs
  100. +232 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/EventModule.fs
  101. +130 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/LazyType.fs
  102. +82 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/MailboxProcessorType.fs
  103. +288 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/ObservableModule.fs
  104. +384 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Core/BigIntType.fs
  105. +23 −0 src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Core/IntConversions.fs
Sorry, we could not display the entire diff because it was too big.
56 LICENSE
@@ -0,0 +1,56 @@
+Apache License
+Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+ 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+ 2. You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+ 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+ 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+See FAQ for answers to frequently asked questions about this license.
+
651 README.html
@@ -0,0 +1,651 @@
+<html>
+
+<head>
+ <Attribute>
+<title>F# Compiler Source Drop, April 2010</title>
+
+
+ <style type="text/css">
+ TT { font-weight: bold; color: blue; font-size: 10pt; }
+ PRE { font-weight: bold; color: blue; font-size: 10pt; }
+
+.title_2ndLvl
+{
+ font-family: tahoma;
+ font-size: 120%;
+ color: #FFFFFF;
+ padding-left: 5px;
+}
+.BODY
+{
+ font-family:verdana;
+}
+A
+{
+ color: #003399;
+}
+.VR
+{
+ background-color: #cccccc;
+ width: 1px;
+}
+.HR
+{
+ background-color: #cccccc;
+ height: 1px;
+}
+.link1
+{
+ font-size:70%;
+ font-family: verdana;
+}
+.link2
+{
+ font-size: 70%;
+ font-family:Verdana;
+ font-style:italic;
+}
+.link3
+{
+ font-style: italic;
+ font-family: Verdana;
+ color: #000000;
+ font-weight: bold;
+}
+.link4
+{
+ font: italic 70% Verdana;
+ color: #000000;
+ text-decoration: none;
+}
+.link5
+{
+ font: 70% Verdana;
+ color: #003399;
+ text-decoration: none;
+}
+.link6
+{
+ font: 70% verdana;
+ color: #003399;
+}
+.text1
+{
+ font: 70% Verdana;
+}
+.text2
+{
+ padding-bottom: 10px;
+ font: 70% Verdana;
+}
+.text3
+{
+ font-size: 120%;
+ font-family:Verdana;
+ color: #000000;
+}
+.text3_w_padding
+{
+ font: 120% Verdana;
+ color: #000000;
+ padding-left:20px;
+}
+.text4
+{
+ font-weight: bold;
+ font-size: 70%;
+ font-family: Verdana;
+ color: #000000;
+}
+.text5
+{
+ padding-left: 5px;
+ font-weight: bold;
+ font-size: 70%;
+ font-family: Verdana;
+ color: #ffffff;
+}
+.text6
+{
+ font: 70%;
+ font-family: verdana;
+}
+.newsTitle
+{
+ font-family: tahoma;
+ font-size: 120%;
+ color: #CCCCCC;
+}
+.areaTitle
+{
+ font-family: tahoma;
+ font-size: 120%;
+ color: #FFFFFF;
+}
+.newsContentTitle
+{
+ font-family: tahoma;
+ font-size: 120%;
+ color: #FFFFFF;
+}
+.areaContentTitle
+{
+ font-family: verdana;
+ font-size: 140%;
+ color: #000000;
+}
+.areaContentTitle_w_pad
+{
+ font-family: verdana;
+ font-size: 140%;
+ color: #000000;
+ padding-left: 20px;
+ padding-top: 20px;
+}
+
+.newsArchiveTitle
+{
+ font-family: verdana;
+ font-size: 150%;
+ color: #000000;
+}
+.FeatureStoryTitle
+{
+ font-family: verdana;
+ font-size: 130%;
+ color: #000000;
+}
+.FeatureStoryByLine
+{
+ font-family: verdana;
+ font-size: 80%;
+ color: #000000;
+}
+.SideBarLink
+{
+ font-family: verdana;
+ font-size: 80%;
+ color: #000000;
+}
+.newsArchiveSubTitle
+{
+ font-family: verdana;
+ font-size: 118%;
+ color: #666666;
+}
+.newsArchiveYear
+{
+ font: bold 80% Verdana;
+ color: #000000;
+ border-bottom: #cccccc 1px solid;
+ border-top: #cccccc 1px solid;
+}
+
+.newsHeadlineTitle
+{
+ font-family: verdana;
+ font-size: 140%;
+ color: #000000;
+}
+
+.newsPublicationDate
+{
+ font-family: Verdana;
+ font-size: 60%;
+ color: #000000;
+ font-weight: bold;
+}
+.newsPublicationSource
+{
+ font-family: Verdana;
+ font-size: 60%;
+ color: #000000;
+ font-weight: bold;
+}
+H1
+{
+ font-family: tahoma;
+ font-weight: bold;
+ font-size: 120%;
+ color: #000000;
+}
+H3
+{
+ font-family: tahoma;
+ font-weight: bold;
+ font-size: 110%;
+ color: #000000;
+}
+P
+{
+ font-family: verdana;
+ font-size: 70%;
+ color: #000000;
+}
+P P
+{
+ font-size: 100%;
+}
+HR
+{
+ color: #cccccc;
+ height: 1px;
+}
+
+
+.groupheading
+{
+ padding-left: 20px;
+ padding-top: 40px;
+ padding-bottom: 10px;
+ font-size: 1.4em;
+ color: #0065CF;
+ font-family:verdana;
+}
+.GroupTitle
+{
+ padding-left: 20px;
+ padding-top: 20px;
+ padding-bottom: 10px;
+ font-size: 1.4em;
+ color: #0065CF;
+}
+LI
+{
+ font-size: 70%;
+ font-family: Verdana;
+}
+LI LI
+{
+ font-size: 100%;
+}
+LI A
+{
+ font-size: 100%;
+}
+.linkbox
+{
+ margin-left: 20px;
+ margin-right: 30px;
+ margin-bottom: 20px;
+ padding-bottom: 10px;
+ width: 175px;
+ float: right;
+ border-right: #0066CC 1px solid;
+ background: #f1f1f1;
+ border-left: #0066CC 1px solid;
+ border-bottom: #0066CC 1px solid;
+}
+.outlineDivTitle
+{
+ background-color: #0066CC;
+ color: #FFFFFF;
+ padding-left: 15px;
+ padding-bottom: 2px;
+ padding-top: 2px;
+ font: bold 70% Verdana;
+ color: #ffffff;
+}
+.outlineDiv
+{
+ padding-left: 20px;
+ background-image: URL(/images/blueTriangle.gif);
+ background-repeat: no-repeat;
+ background-position: 6 8;
+ font: 70% verdana;
+ color: #003399;
+ line-height: 200%;
+} </style>
+</head>
+
+<body>
+
+<h1>F# 2.0 Compiler + Library Source Code Drop, matching April 2010 binary releases</h1>
+
+<p>This directory contains a drop of the source code for an F# 2.0 compiler and core
+ library.
+The code has been cleaned up &quot;a little" to try to help ensure better stability as
+more development is done on the codebase. </p>
+
+<p><b>Before we start, are sure you&#39;re in the right place?</b></p>
+<ul>
+ <li>To get an F# compiler, go to <a href="http://fsharp.net">fsharp.net</a> or
+ <a href="http://tryfsharp.org">tryfsharp.org</a>&nbsp;&nbsp; </li>
+ <li>To learn F#, go to <a href="http://fsharp.net">fsharp.net</a> or
+ <a href="http://tryfsharp.org">tryfsharp.org</a>&nbsp;&nbsp; </li>
+ <li>To learn what F# is and why it&#39;s interesting, go to <a href="http://fsharp.net">fsharp.net</a>
+ or <a href="http://tryfsharp.org">tryfsharp.org</a>&nbsp;&nbsp; </li>
+ <li>To download and install an F# compiler, go to <a href="http://fsharp.net">fsharp.net</a>
+ or <a href="http://tryfsharp.org">tryfsharp.org</a>&nbsp;&nbsp; </li>
+ <li>If you want to to use F# in Visual Studio 2008 (R) or Visual Studio 2010 (R), go to <a href="http://fsharp.net">fsharp.net</a>.</li>
+ <li>Looking for F# coding samples? Go to <a href="http://fsharp.net">fsharp.net</a>
+ or search elsewhere. This code is not a model F# codebase and should not be used
+ as guidance for F# coding style - there are plenty of things we would change if
+ we had all the time in the world.</li>
+</ul>
+<p>
+ To emphasize, this distribution should not be seen as a way to &quot;get&quot; an F#
+ compiler for immediate use. For that you&#39;re better going to <a href="http://fsharp.net">fsharp.net</a> or
+ <a href="http://tryfsharp.org">tryfsharp.org</a>&nbsp;&nbsp;</p>
+<p>
+ <b>Copyright:</b> Copyright 2002-2010 (c) Microsoft Corporation.</p>
+
+<p>
+<b>License:</b> subject to terms and conditions of the Apache License, Version 2.0. A
+copy of the license can be found in the <a href="license.html">License.html</a> file at the root of this distribution.
+By using this source code in any fashion, you are agreeing to be bound
+by the terms of the Apache License, Version 2.0.</p>
+<p>
+You must not remove this notice, or any other, from this software.</p>
+<p><b>Questions?</b> If you have questions about the source code, please ask on a
+ forum, or start a forum for community discussions, or post to the forum on
+ fsharppowerpack.codeplex.com. Please do not ask the F# team at Microsoft for
+ help with this source code: they like to be friendly, but they are very busy
+ working on improving F# and need to focus on that.</p>
+<p><b>Updates?</b> The F# team do not do active development in this repository,
+ though some changes such as cleanup or additional tools may be submitted. They
+ aspire to update the tree as and when future versions of F# compilers are
+ released from Microsoft.</p>
+
+<h3>What do I get when I compile?</h3>
+
+<p>When you compile, you get <tt>fsc.exe</tt>, <tt>fsi.exe</tt>, <tt>FSharp.Core.dll</tt> and some related DLLs.</p>
+
+<h3>How do I compile?</h3>
+
+<p>The prerequisites and build command line for compiling the source (on Windows) are shown
+ later in this README. Here's the
+logic of the build:</p>
+<ul>
+<li>We first need an existing F# compiler, usually the one available from <a href="http://fsharp.net">fsharp.net</a>,
+although it could also be another. Let's assume this compiler has an FSharp.Core.dll with version X.</li>
+<li>We use this compiler to compile the source in this distribution, to produce a "proto" compiler, in the Proto
+directory. When run, this compiler still relies on the FSharp.Core.dll with version X.</li>
+<li>We use the proto compiler to compile the source for FSharp.Core.dll in this distribution, producing
+an FSharp.Core.dll with the version identified in src\source-build-version, usually 1.9.999.</li>
+<li>We use the proto compiler to compile the source for FSharp.Compiler.dll, fsc.exe, fsi.exe and other
+binaries found in this distribution. When run, these binaries will rely on the FSharp.Core.dll with version
+1.9.999. This is good, since it means the 1.9.999 binaries now form a consistent, bootstrapped compiler. If
+you like you should now be able to throw away the compiler with version X.</li>
+</ul>
+<p>Some additional tools are required to build the compiler, notably fslex.exe, fsyacc.exe,
+FSharp.PowerPack.Build.Tasks.dll, FsSrGen.exe, FSharp.SRGen.Build.Tasks.dll and the other
+tools found in the lkg directory. These are "Last Known Good" binaries created from a version of the F# Power Pack
+on CodePlex. If you like you can throw away these binaries and use your own compiled versions of these.
+tools.</p>
+
+<h3>Strong names and versions</h3>
+
+<p>When you build the compiler using the instructions below, the compiler and
+ library binaries produced are not strong-named or signed,
+and use CLI assembly version nunmber 1.9.9.999. Without a strong-name you will not be able to add FSharp.Core.dll to the GAC, though
+that is not a problem for most purposes since the FSharp.Core.dll you compile can be copied as part of your
+application.</p>
+<p>Once you have an F# compiler, you will normally be able to reference another or
+ an existing FSharp.Core.dll and matching mscorlib.dll explicitly to target that
+ profile.</p>
+
+<p>To add strong names you would need to adjust the build settings. Our recommendation is not to use the
+version number 2.0 on your binaries, since that can get confusing if you already have an installation of
+an F# 2.0 compiler.</p>
+
+<h3>Building on Windows using MSBuild from the Command Linees</h3>
+
+<ul>
+ <li>Both .NET 2.0 and .NET 4.0</li>
+ <li>Visual Studio 2010 Shell (Integrated Edition, with F# CTP MSI added), OR Visual Studio Professional 2010, OR
+ another non-Express version of Visual Studio 2010 OR the F# CTP MSI installed as a standlone compiler.</li>
+</ul>
+
+<h3>Steps - Cleaning (if needed)</h3>
+
+<pre>
+cd src
+rmdir /s /q ..\Proto
+rmdir /s /q ..\Debug
+rmdir /s /q ..\Release
+</pre>
+<h3>Steps - Building a Proto Compiler for Mono or .NET 2.0 using .NET 2.0/4.0 tools</h3>
+<pre>
+ cd src
+ msbuild fsharp-proto-build.proj /p:TargetFramework=cli\2.0
+</pre>
+<p>Note: Make sure you run the .NET 4.0 msbuild.exe, e.g. <tt>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</tt>.</p>
+
+<h3>Steps - NGEN the Proto Compiler for faster future startup (optional)</h3>
+<pre>
+ngen install ..\Proto\cli\2.0\bin\fsi.exe
+</pre>
+
+<h3>Steps - Building the F# core library and unittests for running on Mono or .NET 2.0-4.0, using the Proto compiler</h3>
+<pre>
+msbuild fsharp-library-build.proj /p:TargetFramework=cli\2.0
+</pre>
+<p>Note: Make sure you run the .NET 4.0 msbuild.exe, e.g. <tt>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</tt>.</p>
+
+<h3>Steps - Building a bootstrapped F# Compiler for running on Mono or .NET 2.0-4.0, using the Proto Compiler</h3>
+<pre>
+msbuild fsharp-compiler-build.proj /p:TargetFramework=cli\2.0
+</pre>
+<p>Note: Make sure you run the .NET 4.0 msbuild.exe, e.g. <tt>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</tt>.</p>
+
+
+<h3>Steps - Building a F# Compiler unit tests for NUnit for running on Mono or .NET 2.0-4.0, using the Proto Compiler</h3>
+<pre>
+msbuild fsharp-library-unittests-build.proj /p:TargetFramework=cli\2.0
+msbuild fsharp-compiler-unittests-build.proj /p:TargetFramework=cli\2.0
+</pre>
+<p>Note: You must have NUnit installed.</p>
+
+<h3>Validation and Use</h3>
+
+<pre>
+ngen install ..\Debug\cli\2.0\bin\fsi.exe
+..\Debug\cli\2.0\bin\fsi.exe
+1 + 1;;
+#q;;
+..\Debug\cli\2.0\bin\fsi.exe /help
+..\Debug\cli\2.0\bin\fsc.exe /help
+echo printfn "hello world" > hello.fs
+..\Debug\cli\2.0\bin\fsc.exe hello.fs
+copy ..\Debug\cli\2.0\bin\FSharp.Core.dll .
+hello.exe
+del /q FSharp.Core.dll
+
+
+
+</pre>
+
+
+
+<h3>Some alternative Steps - Building the F# core library and unittests for alternative CLI/.NET/CIL implementations, using the Proto compiler</h3>
+<pre>
+msbuild fsharp-library-build.proj /p:TargetFramework=Silverlight\3.0
+msbuild fsharp-library-build.proj /p:TargetFramework=Silverlight\4.0
+msbuild fsharp-library-build.proj /p:TargetFramework=WindowsPhone7\Silverlight\4.0
+msbuild fsharp-library-build.proj /p:TargetFramework=CompactFramework\2.0
+msbuild fsharp-library-build.proj /p:TargetFramework=CompactFramework\3.5
+</pre>
+
+
+<h3>Some alternative Steps - Building for .NET 4.0 profile</h3>
+<pre>
+cd src
+msbuild fsharp-proto-build.proj /p:TargetFramework=cli\4.0
+msbuild fsharp-library-build.proj /p:TargetFramework=cli\4.0
+msbuild fsharp-compiler-build.proj /p:TargetFramework=cli\4.0
+msbuild fsharp-library-unittests-build.proj /p:TargetFramework=cli\4.0
+msbuild fsharp-compiler-unittests-build.proj /p:TargetFramework=cli\4.0
+
+ngen install ..\Debug\cli\4.0\bin\fsi.exe
+..\Debug\cli\4.0\bin\fsi.exe
+1 + 1;;
+#q;;
+..\Debug\cli\4.0\bin\fsi.exe /help
+..\Debug\cli\4.0\bin\fsc.exe /help
+echo printfn "hello world" > hello.fs
+..\Debug\cli\4.0\bin\fsc.exe hello.fs
+copy ..\Debug\cli\4.0\bin\FSharp.Core.dll .
+hello.exe
+del /q FSharp.Core.dll
+
+msbuild fsharp-compiler-build.proj /p:TargetFramework=cli\4.0 /p:Configuration=Release
+
+ngen install ..\Release\cli\4.0\bin\fsi.exe
+..\Release\cli\4.0\bin\fsi.exe
+1 + 1;;
+#q;;
+..\Release\cli\4.0\bin\fsi.exe /help
+..\Release\cli\4.0\bin\fsc.exe /help
+echo printfn "hello world" > hello.fs
+..\Release\cli\4.0\bin\fsc.exe hello.fs
+copy ..\Release\cli\4.0\bin\FSharp.Core.dll .
+hello.exe
+del /q FSharp.Core.dll
+</pre>
+
+<h3>Some alternative Steps - Building Release mode (choose some of these as you need)</h3>
+<pre>
+
+msbuild fsharp-library-build.proj /p:Configuration=Release
+msbuild fsharp-library-build.proj /p:TargetFramework=cli\2.0 /p:Configuration=Release
+msbuild fsharp-library-build.proj /p:TargetFramework=cli\4.0 /p:Configuration=Release
+msbuild fsharp-library-build.proj /p:TargetFramework=Silverlight\3.0 /p:Configuration=Release
+msbuild fsharp-library-build.proj /p:TargetFramework=Silverlight\4.0 /p:Configuration=Release
+msbuild fsharp-library-build.proj /p:TargetFramework=WindowsPhone7\Silverlight\4.0 /p:Configuration=Release
+msbuild fsharp-library-build.proj /p:TargetFramework=CompactFramework\2.0 /p:Configuration=Release
+msbuild fsharp-library-build.proj /p:TargetFramework=CompactFramework\3.5 /p:Configuration=Release
+
+msbuild fsharp-compiler-build.proj /p:TargetFramework=cli\2.0 /p:Configuration=Release
+
+ngen install ..\Release\cli\2.0\bin\fsi.exe
+..\Release\cli\2.0\bin\fsi.exe
+1 + 1;;
+#q;;
+..\Release\cli\2.0\bin\fsi.exe /help
+..\Release\cli\2.0\bin\fsc.exe /help
+echo printfn "hello world" > hello.fs
+..\Release\cli\2.0\bin\fsc.exe hello.fs
+copy ..\Release\cli\2.0\bin\FSharp.Core.dll .
+hello.exe
+del /q FSharp.Core.dll
+"c:\Program Files\Mono-2.8\bin\mono.exe" ..\Release\cli\2.0\bin\Fsi.exe /help
+"c:\Program Files\Mono-2.8\bin\mono.exe" ..\Release\cli\2.0\bin\Fsc.exe /help
+"c:\Program Files\Mono-2.8\bin\mono.exe" ..\Release\cli\2.0\bin\Fsi.exe < hello.fs
+"c:\Program Files\Mono-2.8\bin\mono.exe" ..\Release\cli\2.0\bin\Fsc.exe hello.fs
+
+</pre>
+
+<h3>Editing and Building on Windows using Visual Studio 2010</h3>
+
+
+<h3>Prerequisites</h3>
+
+<ul>
+ <li>Visual Studio Shell 2010 (with F# CTP MSI added), Visual Studio Professional 2010 or another non-Express version of Visual Studio 2010.</li>
+</ul>
+
+<h3>Editing and Building</h3>
+
+
+
+<p>Open all-vs2010.sln, and edit in modes Debug or Release. The compiler takes a long time to compile and
+that can be a bit invasive to the work flow, so it's normally better to do the actual compilation from the command line,
+see above.</p>
+
+
+
+
+
+
+<h3>Building where a Proto compiler is run on Mono 2.8, Windows</h3>
+
+<p>This can be useful if you want to prove to yourself that it's possible to build without running the
+base compiler using .NET CLR. At the moment however the steps below still use MSBuild and compile against
+the .NET 2.0 reference assemblies. It would need more work to get the build going against the Mono libraries.</p>
+
+<h3>Prerequisites</h3>
+
+<ul>
+ <li>An existing F# compiler to start the bootstrap. You can start with the Microsoft F# release, then
+ build a new compiler using that, then throw away the former and just use the compiler(s) you've built
+ from then on.
+ <li>Mono 2.8 for Windows
+</ul>
+
+<h3>Building</h3>
+
+<p>See below for some of the sample steps. On Windows it is best to use fsc-mono.bat files to act as a "compiler that
+just happens to run using Mono".</p>
+
+<h3>Steps - Building a Proto Compiler for Mono or .NET 2.0 (either one)</h3>
+<pre>
+cd src
+REM Prepare driver batch files that run the corresponding exe using Mono
+copy /y setups\run-as-mono.bat ..\lkg\bin\fsc-mono.bat
+copy /y setups\run-as-mono.bat ..\lkg\FSharp-2.0.50726.900\bin\fslex-mono.bat
+copy /y setups\run-as-mono.bat ..\lkg\FSharp-2.0.50726.900\bin\fsyacc-mono.bat
+msbuild fsharp-proto-build.proj /p:TargetFramework=mono\2.0
+</pre>
+
+<h3>Steps - Prepare proto compiler for execution on Mono by registering FSharp.Core.dll for the base compiler</h3>
+<pre>
+
+copy /y "C:\Program Files\Reference Assemblies\Microsoft\FSharp\2.0\Runtime\v2.0\FSharp.Core.dll" setups\FSharp.Core.dll
+"C:\Program Files\Mono-2.8\bin\sn" -R setups\FSharp.Core.dll setups\mono.snk
+"C:\Program Files\Mono-2.8\bin\gacutil" /i setups\FSharp.Core.dll
+del setups\FSharp.Core.dll
+</pre>
+
+<h3>Steps - Prepare driver batch files that run the corresponding exe with mono</h3>
+<pre>
+
+copy /y setups\run-as-mono.bat ..\Proto\cli\2.0\bin\fsc-proto-mono.bat
+copy /y setups\run-as-mono.bat ..\lkg\FSharp-2.0.50726.900\bin\fslex-mono.bat
+copy /y setups\run-as-mono.bat ..\lkg\FSharp-2.0.50726.900\bin\fsyacc-mono.bat
+
+</pre>
+
+<h3>Steps - Build the core library using the proto compiler, running the proto with Mono on Windows</h3>
+<pre>
+
+
+msbuild fsharp-library-build.proj /p:TargetFramework=mono\2.0
+
+</pre>
+
+<h3>Steps - Bootstrap the compiler using the proto compiler, running the proto with Mono on Windows</h3>
+<pre>
+
+msbuild fsharp-compiler-build.proj /p:TargetFramework=mono\2.0
+
+</pre>
+
+<h3>Validation and Use</h3>
+<pre>
+"c:\Program Files\Mono-2.8\bin\mono.exe" ..\Debug\mono\2.0\bin\fsi.exe
+1 + 1;;
+#q;;
+"c:\Program Files\Mono-2.8\bin\mono.exe" ..\Debug\mono\2.0\bin\fsi.exe /help
+"c:\Program Files\Mono-2.8\bin\mono.exe" ..\Debug\mono\2.0\bin\fsc.exe /help
+echo printfn "hello world" > hello.fs
+"c:\Program Files\Mono-2.8\bin\mono.exe" ..\Debug\mono\2.0\bin\fsc.exe hello.fs
+copy ..\Debug\mono\2.0\bin\FSharp.Core.dll .
+"c:\Program Files\Mono-2.8\bin\mono.exe" hello.exe
+del /q FSharp.Core.dll
+
+
+</pre>
+
+<h3>Building on Unix with Mono</h3>
+
+<p>Because of some issues with xbuild, some shell scripts are provided
+to build the compiler on Unix. You may need to adapt the paths in config.sh first.</p>
+
+<pre>
+./make_proto.sh
+./make_library.sh
+./make_compiler.sh
+</pre>
+
+</body>
371 src/ChangeLog
@@ -0,0 +1,371 @@
+2010-11-26 vtomasp <vtomasp>
+
+ * License.html: Remove invalid FAQ link from License
+ file
+
+2010-11-17 LLB <LLB>
+
+ * src/config.sh,
+ src/make_compiler.sh,
+ src/make_proto.sh: Fix the Unix build scripts (thanks
+ Tomas!)
+
+2010-11-17 dsyme <dsyme>
+
+ * src/fsharp/ilxgen.fs: One more missing change related
+ to previous checkin.
+
+ * src/fsharp/FSharp.Core/event.fs,
+ src/fsharp/FSharp.Core/seq.fs: Integrate two code fixes
+ (one Windows Phone-related), that were not present in the OSS release code
+ branch
+
+ * src/fsharp/fsc.fs: Transfer missing code diff for
+ setting permissions for /resident pipe
+
+2010-11-16 LLB <LLB>
+
+ * README.html, src/config.sh:
+ Update README with compilation instructions on Unix
+
+ * src/config.sh,
+ src/make_compiler.sh,
+ src/make_library.sh,
+ src/make_proto.sh: Quick shell scripts for building the
+ compiler on Linux (without xbuild).
+
+ * src/fsharp/fsi/Fsi.fsproj: Remove useless references
+ in Fsi.fsproj
+
+ * src/absil/ilsupp.fs, FSharp.Compiler-proto.fsproj,
+ fsharp/FSharp.Compiler/FSharp.Compiler.fsproj: Remove static dependancy
+ on ISymWrapper.dll which is not available on Linux.
+
+ * assemblyinfo.FSharp.Compiler.dll.fs: Fix case for InternalsVisibleTo.
+ That was a problem on Mono/Linux.
+
+2010-11-15 dsyme <dsyme>
+
+ * src/fsharp/FSharp.Core/FSharp.Core.fsproj: Remove delay signing for
+ FSharp.Core on .NET 2.0 (it is inconsistent with the no-signing described in
+ the README)
+
+ * src/FSharpSource.targets: Use simple resolution when
+ compiling for .NET 2.0/3.5. This worksaround a build problem when compiling
+ proto to target .NTE 2./3.5, found by Laurent.
+
+ * README.html: Describe how to build unittests in README
+
+ * README.html,
+ src/FSharpSource.targets,
+ fsharp/FSharp.Build/Microsoft.FSharp.targets: Changes to compile the
+ proto correctly when targeting .NET 2.0
+
+2010-11-04 vtomasp <vtomasp>
+
+ * src/fsharp-compiler-build.proj,
+ src/fsharp-compiler-unittests-build.proj,
+ src/fsharp-library-build.proj,
+ src/fsharp-library-unittests-build.proj,
+ FSharp.Core.Unittests.fsproj: Create separate projects for unit tests
+
+2010-11-04 dsyme <dsyme>
+
+ * compiler/2.0/Apr2010/License.html, License.html,
+ lkg/FSharp-2.0.50726.900/bin/FSharp.Core.dll,
+ bin/FSharp.PowerPack.Build.Tasks.dll, bin/FSharp.PowerPack.targets,
+ bin/FSharp.SRGen.Build.Tasks.dll,
+ FSharp-2.0.50726.900/bin/FSharp.SRGen.targets,
+ bin/FindUnusedResources.exe,
+ lkg/FSharp-2.0.50726.900/bin/FsLex.exe,
+ lkg/FSharp-2.0.50726.900/bin/FsSrGen.exe,
+ lkg/FSharp-2.0.50726.900/bin/FsYacc.exe,
+ lkg/FSharp-2.0.50726.900/bin/Fsi.exe,
+ lkg/sentinel, run.bat,
+ src/FSharpSource.Settings.targets,
+ src/FSharpSource.targets,
+ src/absil/bytes.fs,
+ src/absil/bytes.fsi,
+ src/absil/il.fs, src/absil/il.fsi,
+ src/absil/ilascii.fs,
+ src/absil/ilascii.fsi,
+ src/absil/ilbinary.fs,
+ src/absil/ilbinary.fsi,
+ src/absil/ildiag.fs,
+ src/absil/ildiag.fsi,
+ src/absil/illex.fsl,
+ src/absil/illib.fs,
+ src/absil/ilmorph.fs,
+ src/absil/ilmorph.fsi,
+ src/absil/ilpars.fsy,
+ src/absil/ilprint.fs,
+ src/absil/ilprint.fsi,
+ src/absil/ilread.fs,
+ src/absil/ilread.fsi,
+ src/absil/ilreflect.fs,
+ src/absil/ilsupp.fs,
+ src/absil/ilsupp.fsi,
+ src/absil/ilwrite.fs,
+ src/absil/ilwrite.fsi,
+ src/absil/ilx.fs,
+ src/absil/ilx.fsi,
+ src/absil/zmap.fs,
+ src/absil/zmap.fsi,
+ src/absil/zset.fs,
+ src/absil/zset.fsi,
+ src/all-vs2010.sln,
+ assemblyinfo/assemblyinfo.FSharp.Build.dll.fs,
+ ...nfo.FSharp.Compiler.Interactive.Settings.dll.fs,
+ ...semblyinfo.FSharp.Compiler.Server.Shared.dll.fs,
+ assemblyinfo.FSharp.Compiler.dll.fs,
+ assemblyinfo/assemblyinfo.FSharp.Core.dll.fs,
+ ...assemblyinfo.FSharp.LanguageService.Base.dll.cs,
+ assemblyinfo.FSharp.LanguageService.dll.fs,
+ assemblyinfo.FSharp.ProjectSystem.Base.dll.cs,
+ ...assemblyinfo.FSharp.ProjectSystem.FSharp.dll.fs,
+ assemblyinfo/assemblyinfo.FSharp.VS.FSI.dll.fs,
+ src/assemblyinfo/assemblyinfo.fsc.exe.fs,
+ src/assemblyinfo/assemblyinfo.fsi.exe.fs,
+ src/fsharp-compiler-build.proj,
+ src/fsharp-library-build.proj,
+ src/fsharp-proto-build.proj,
+ src/fsharp/ErrorLogger.fs,
+ src/fsharp/ExtensibleDumper.fs,
+ src/fsharp/ExtensibleDumper.fsi,
+ src/fsharp/FSComp.txt,
+ src/fsharp/FSCstrings.txt,
+ src/fsharp/FSInteractiveSettings.txt,
+ src/fsharp/FSStrings.resx,
+ FSharp.Build-proto/FSharp.Build-proto.fsi,
+ FSharp.Build-proto/FSharp.Build-proto.fsproj,
+ CreateFSharpManifestResourceName.fs,
+ CreateFSharpManifestResourceName.fsi,
+ src/fsharp/FSharp.Build/FSBuild.txt,
+ src/fsharp/FSharp.Build/FSharp.Build.fsi,
+ src/fsharp/FSharp.Build/FSharp.Build.fsproj,
+ src/fsharp/FSharp.Build/Fsc.fs,
+ src/fsharp/FSharp.Build/Fsc.fsi,
+ fsharp/FSharp.Build/Microsoft.FSharp.targets,
+ src/fsharp/FSharp.Build/subst.exe,
+ src/fsharp/FSharp.Build/subst.fsx,
+ FSharp.Compiler-proto.fsproj,
+ FSharp.Compiler.Interactive.Settings.fsproj,
+ FSharp.Compiler.Server.Shared.fsproj,
+ fsharp/FSharp.Compiler/FSharp.Compiler.fsproj,
+ src/fsharp/FSharp.Core.Unittests/App.xaml,
+ FSharp.Core.Unittests.fsproj,
+ FSharp.Core.Unittests/FSharp.Core/Lazy.fs,
+ Microsoft.FSharp.Collections/Array2Module.fs,
+ Microsoft.FSharp.Collections/Array3Module.fs,
+ Microsoft.FSharp.Collections/Array4Module.fs,
+ Microsoft.FSharp.Collections/ArrayModule.fs,
+ Microsoft.FSharp.Collections/ArrayModule2.fs,
+ ComparisonIdentityModule.fs, HashIdentityModule.fs,
+ Microsoft.FSharp.Collections/ListModule.fs,
+ Microsoft.FSharp.Collections/ListModule2.fs,
+ Microsoft.FSharp.Collections/ListType.fs,
+ Microsoft.FSharp.Collections/MapModule.fs,
+ Microsoft.FSharp.Collections/MapType.fs,
+ Microsoft.FSharp.Collections/SeqModule.fs,
+ Microsoft.FSharp.Collections/SeqModule2.fs,
+ Microsoft.FSharp.Collections/SetModule.fs,
+ Microsoft.FSharp.Collections/SetType.fs,
+ Microsoft.FSharp.Collections/StringModule.fs,
+ Microsoft.FSharp.Control/AsyncModule.fs,
+ Microsoft.FSharp.Control/AsyncType.fs,
+ Microsoft.FSharp.Control/Cancellation.fs,
+ Microsoft.FSharp.Control/EventModule.fs,
+ Microsoft.FSharp.Control/LazyType.fs, MailboxProcessorType.fs,
+ Microsoft.FSharp.Control/ObservableModule.fs,
+ Microsoft.FSharp.Core/BigIntType.fs,
+ Microsoft.FSharp.Core/IntConversions.fs, IntConversionsGenerated.fs,
+ IntConversionsTestGenerator.fsx,
+ Microsoft.FSharp.Math/BigIntStruct.fs,
+ FSharp.Core/Microsoft.FSharp.Math/BigNum.fs, FSharpQuotations.fs,
+ FSharpReflection.fs, FSharp.Core/OperatorsModule1.fs,
+ FSharp.Core/OperatorsModule2.fs,
+ FSharp.Core.Unittests/FSharp.Core/PrimTypes.fs,
+ fsharp/FSharp.Core.Unittests/LibraryTestFx.fs,
+ Properties/AppManifest.xml, Properties/AssemblyInfo.cs,
+ FSharp.Core.Unittests/SurfaceArea.2.0.fs,
+ FSharp.Core.Unittests/SurfaceArea.4.0.fs,
+ SurfaceArea.Silverlight.2.0.fs,
+ fsharp/FSharp.Core.Unittests/TypeForwarding.fs,
+ src/fsharp/FSharp.Core/FSCore.resx,
+ src/fsharp/FSharp.Core/FSharp.Core.fsproj,
+ src/fsharp/FSharp.Core/SR.fs,
+ src/fsharp/FSharp.Core/array.fs,
+ src/fsharp/FSharp.Core/array.fsi,
+ src/fsharp/FSharp.Core/array2.fs,
+ src/fsharp/FSharp.Core/array2.fsi,
+ src/fsharp/FSharp.Core/array3.fs,
+ src/fsharp/FSharp.Core/array3.fsi,
+ src/fsharp/FSharp.Core/collections.fs,
+ src/fsharp/FSharp.Core/collections.fsi,
+ src/fsharp/FSharp.Core/control.fs,
+ src/fsharp/FSharp.Core/control.fsi,
+ src/fsharp/FSharp.Core/event.fs,
+ src/fsharp/FSharp.Core/event.fsi,
+ fsharp/FSharp.Core/fslib-extra-pervasives.fs,
+ fsharp/FSharp.Core/fslib-extra-pervasives.fsi,
+ src/fsharp/FSharp.Core/list.fs,
+ src/fsharp/FSharp.Core/list.fsi,
+ src/fsharp/FSharp.Core/local.fs,
+ src/fsharp/FSharp.Core/local.fsi,
+ src/fsharp/FSharp.Core/map.fs,
+ src/fsharp/FSharp.Core/map.fsi,
+ src/fsharp/FSharp.Core/math/n.fs,
+ src/fsharp/FSharp.Core/math/n.fsi,
+ src/fsharp/FSharp.Core/math/z.fs,
+ src/fsharp/FSharp.Core/math/z.fsi,
+ src/fsharp/FSharp.Core/nativeptr.fs,
+ src/fsharp/FSharp.Core/nativeptr.fsi,
+ src/fsharp/FSharp.Core/option.fs,
+ src/fsharp/FSharp.Core/option.fsi,
+ src/fsharp/FSharp.Core/prim-types-prelude.fs,
+ src/fsharp/FSharp.Core/prim-types-prelude.fsi,
+ src/fsharp/FSharp.Core/prim-types.fs,
+ src/fsharp/FSharp.Core/prim-types.fsi,
+ src/fsharp/FSharp.Core/printf.fs,
+ src/fsharp/FSharp.Core/printf.fsi,
+ src/fsharp/FSharp.Core/quotations.fs,
+ src/fsharp/FSharp.Core/quotations.fsi,
+ src/fsharp/FSharp.Core/reflect.fs,
+ src/fsharp/FSharp.Core/reflect.fsi,
+ src/fsharp/FSharp.Core/seq.fs,
+ src/fsharp/FSharp.Core/seq.fsi,
+ src/fsharp/FSharp.Core/set.fs,
+ src/fsharp/FSharp.Core/set.fsi,
+ src/fsharp/FSharp.Core/string.fs,
+ src/fsharp/FSharp.Core/string.fsi,
+ src/fsharp/FlatList.fs,
+ src/fsharp/Fsc-proto/Fsc-proto.fsproj,
+ src/fsharp/Fsc-proto/Fsc.fsi,
+ src/fsharp/Fsc/Fsc.fsi,
+ src/fsharp/Fsc/Fsc.fsproj,
+ src/fsharp/InternalCollections.fs,
+ src/fsharp/InternalCollections.fsi,
+ src/fsharp/InternalFileSystemUtils.fs,
+ src/fsharp/InternalFileSystemUtils.fsi,
+ src/fsharp/PrettyNaming.fs,
+ src/fsharp/QueueList.fs,
+ src/fsharp/ReferenceResolution.fs,
+ src/fsharp/ReferenceResolution.fsi,
+ Microsoft.FSharp.Control/AsyncType.fs,
+ src/fsharp/TraceCall.fs,
+ src/fsharp/ast.fs,
+ src/fsharp/augment.fs,
+ src/fsharp/augment.fsi,
+ src/fsharp/build.fs,
+ src/fsharp/build.fsi,
+ src/fsharp/ccuthunk.fs,
+ src/fsharp/check.fs,
+ src/fsharp/check.fsi,
+ src/fsharp/creflect.fs,
+ src/fsharp/creflect.fsi,
+ src/fsharp/csolve.fs,
+ src/fsharp/csolve.fsi,
+ src/fsharp/detuple.fs,
+ src/fsharp/detuple.fsi,
+ src/fsharp/env.fs,
+ src/fsharp/formats.fs,
+ src/fsharp/formats.fsi,
+ src/fsharp/fs.pubkey,
+ src/fsharp/fs.snk,
+ src/fsharp/fsSilverlight.pubkey,
+ src/fsharp/fsSilverlight.snk,
+ src/fsharp/fsc.fs,
+ src/fsharp/fsclib.fsi,
+ src/fsharp/fscmain.fs,
+ src/fsharp/fscopts.fs,
+ src/fsharp/fscopts.fsi,
+ src/fsharp/fsharp.fsharpp,
+ src/fsharp/fsi/FSIstrings.txt,
+ src/fsharp/fsi/Fsi.fsproj,
+ src/fsharp/fsi/console.fs,
+ src/fsharp/fsi/fsi.exe.config,
+ src/fsharp/fsi/fsi.fs,
+ src/fsharp/fsiattrs.fs,
+ src/fsharp/fsiaux.fs,
+ src/fsharp/fsiaux.fsi,
+ src/fsharp/fsiserver/FSServerShared.txt,
+ src/fsharp/fsiserver/fsiserver.fs,
+ src/fsharp/ilxgen.fs,
+ src/fsharp/ilxgen.fsi,
+ src/fsharp/import.fs,
+ src/fsharp/import.fsi,
+ src/fsharp/infos.fs,
+ src/fsharp/layout.fs,
+ src/fsharp/layout.fsi,
+ src/fsharp/lex.fsl,
+ src/fsharp/lexfilter.fs,
+ src/fsharp/lexhelp.fs,
+ src/fsharp/lexhelp.fsi,
+ src/fsharp/lib.fs,
+ src/fsharp/lowertop.fs,
+ src/fsharp/msft.pubkey,
+ src/fsharp/nameres.fs,
+ src/fsharp/nameres.fsi,
+ src/fsharp/opt.fs,
+ src/fsharp/opt.fsi,
+ src/fsharp/outcome.fs,
+ src/fsharp/outcome.fsi,
+ src/fsharp/pars.fsy,
+ src/fsharp/patcompile.fs,
+ src/fsharp/patcompile.fsi,
+ src/fsharp/pickle.fs,
+ src/fsharp/pickle.fsi,
+ src/fsharp/range.fs,
+ src/fsharp/range.fsi,
+ src/fsharp/sr.fs,
+ src/fsharp/sr.fsi,
+ src/fsharp/sreflect.fs,
+ src/fsharp/sreflect.fsi,
+ src/fsharp/tast.fs,
+ src/fsharp/tastops.fs,
+ src/fsharp/tastops.fsi,
+ src/fsharp/tc.fsi,
+ src/fsharp/tlr.fs,
+ src/fsharp/tlr.fsi,
+ src/fsharp/typrelns.fs,
+ src/fsharp/unilex.fs,
+ src/fsharp/unilex.fsi,
+ src/fsharp/unittests/Build.Unittests.fs,
+ src/fsharp/unittests/General.Unittests.fs,
+ src/fsharp/unittests/PowerPack.Unittests.fs,
+ src/fsharp/unittests/TestLib.fs,
+ src/fsharp/unittests/UnitTestUtils.fs,
+ src/fsharp/unittests/Unittests.dll.config,
+ src/fsharp/unittests/Unittests.fsproj,
+ src/fsharp/unsolved.fs,
+ src/fsharp/vs/IncrementalBuild.fs,
+ src/fsharp/vs/IncrementalBuild.fsi,
+ src/fsharp/vs/Reactor.fs,
+ src/fsharp/vs/Reactor.fsi,
+ src/fsharp/vs/service.fs,
+ src/fsharp/vs/service.fsi,
+ src/ilx/cu_erase.fs,
+ src/ilx/cu_erase.fsi,
+ src/ilx/ilxsettings.fs,
+ src/ilx/pubclo.fs,
+ src/ilx/pubclo.fsi,
+ src/root.traversal.targets,
+ src/setups/install-mono.sh,
+ src/setups/run-as-mono.bat,
+ src/source-build-version,
+ src/utils/CompilerLocationUtils.fs,
+ src/utils/HashMultiMap.fs,
+ src/utils/HashMultiMap.fsi,
+ src/utils/TaggedCollections.fs,
+ src/utils/TaggedCollections.fsi,
+ src/utils/filename.fs,
+ src/utils/filename.fsi,
+ src/utils/prim-lexing.fs,
+ src/utils/prim-lexing.fsi,
+ src/utils/prim-parsing.fs,
+ src/utils/prim-parsing.fsi,
+ src/utils/resizearray.fs,
+ src/utils/resizearray.fsi,
+ src/utils/sformat.fs,
+ src/utils/sformat.fsi: initial population
+
37 src/FSharpSource.Settings.targets
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+# Copyright (c) 2002-2010 Microsoft Corporation.
+#
+# This source code is subject to terms and conditions of the Apache License, Version 2.0. A
+# copy of the license can be found in the License.html file at the root of this distribution.
+# By using this source code in any fashion, you are agreeing to be bound
+# by the terms of the Apache License, Version 2.0.
+#
+# You must not remove this notice, or any other, from this software.
+-->
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+ <PropertyGroup>
+ <!-- Standard defaults for configuration and platform -->
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ </PropertyGroup>
+ <PropertyGroup>
+ <!-- Standard defaults for output path and warning level -->
+ <OutputPath Condition="'$(OutputPath)' == ''">bin\$(Configuration)</OutputPath>
+ <WarningLevel Condition=" '$(WarningLevel)' == '' ">3</WarningLevel>
+ </PropertyGroup>
+ <!-- Standard interpretations of Debug and Release configurations -->
+ <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
+ <DebugType Condition=" '$(DebugType)' == '' ">full</DebugType>
+ <Optimize Condition=" '$(Optimize)' == '' ">false</Optimize>
+ <DefineConstants Condition=" '$(DefineConstants)' == '' ">DEBUG;TRACE</DefineConstants>
+ <ErrorReport Condition=" '$(ErrorReport)' == '' ">prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
+ <DebugType Condition=" '$(DebugType)' == '' ">pdbonly</DebugType>
+ <Optimize Condition=" '$(Optimize)' == '' ">true</Optimize>
+ <DefineConstants Condition=" '$(DefineConstants)' == '' ">TRACE</DefineConstants>
+ <ErrorReport Condition=" '$(ErrorReport)' == '' ">prompt</ErrorReport>
+ </PropertyGroup>
+</Project>
211 src/FSharpSource.targets
@@ -0,0 +1,211 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+# Copyright (c) 2002-2010 Microsoft Corporation.
+#
+# This source code is subject to terms and conditions of the Apache License, Version 2.0. A
+# copy of the license can be found in the License.html file at the root of this distribution.
+# By using this source code in any fashion, you are agreeing to be bound
+# by the terms of the Apache License, Version 2.0.
+#
+# You must not remove this notice, or any other, from this software.
+-->
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <!-- Tail calls on, even in debug -->
+ <Tailcalls>true</Tailcalls>
+ <TargetFramework Condition="'$(TargetFramework)'==''">cli\4.0</TargetFramework>
+ <!-- For .NET 4.0 use a 4.0 proto compiler, otherwise use a 2.0 proto compiler -->
+ <protoCLIDir Condition="'$(protoCLIDir)' == '' AND '$(TargetFramework)' == 'cli\4.0'">cli\4.0</protoCLIDir>
+ <protoCLIDir Condition="'$(protoCLIDir)' == ''">cli\2.0</protoCLIDir>
+ <LkgVersion>2.0.50726.900</LkgVersion>
+ <VersionFile>$(FSharpSourcesRoot)\source-build-version</VersionFile>
+ <DefineConstants>NO_STRONG_NAMES;$(DefineConstants)</DefineConstants>
+ <FsLexUnicode>true</FsLexUnicode>
+ <ProjectLanguage>FSharp</ProjectLanguage>
+ <OtherFlags>$(OtherFlags) --times</OtherFlags>
+ <NoWarn>$(NoWarn);69;65;54;61;75</NoWarn>
+ <DebugSymbols>true</DebugSymbols>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(Configuration)'=='Debug'">
+ <DefineConstants>DEBUG; $(DefineConstants)</DefineConstants>
+ <Optimize>false</Optimize>
+ <!-- These flags provide a better debugging experience. Locals should be visible. -->
+ <OtherFlags>$(OtherFlags) --no-jit-optimize --jit-tracking</OtherFlags>
+ <DefineConstants>CODE_ANALYSIS; $(DefineConstants)</DefineConstants>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(Configuration)'=='Release'">
+ <Optimize>true</Optimize>
+ </PropertyGroup>
+
+ <!-- Flags used to build the bootstrap compiler.
+ -->
+ <PropertyGroup Condition="'$(Configuration)'=='Proto'">
+ <Optimize>true</Optimize>
+ <DefineConstants>$(DefineConstants);FX_FSLIB_STRUCTURAL_EQUALITY;FX_FSLIB_IOBSERVABLE;FX_FSLIB_LAZY;FX_FSLIB_TUPLE</DefineConstants>
+ <DefineConstants>DEBUG; $(DefineConstants)</DefineConstants>
+ </PropertyGroup>
+
+ <!-- Always qualify the IntermediateOutputPath by the TargetFramework if any exists -->
+ <PropertyGroup>
+ <IntermediateOutputPath>obj\$(Configuration)\$(TargetFramework)\</IntermediateOutputPath>
+ </PropertyGroup>
+
+ <!-- v2.0-specific flags -->
+ <PropertyGroup Condition="'$(TargetFramework)'=='cli\2.0'">
+ <!-- If 3.5 is not configured explicitly, use 2.0 -->
+ <TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)'==''">v2.0</TargetFrameworkVersion>
+ <DefineConstants>$(DefineConstants);FX_FSLIB_STRUCTURAL_EQUALITY;FX_FSLIB_IOBSERVABLE;FX_FSLIB_LAZY;FX_FSLIB_TUPLE</DefineConstants>
+ <OtherFlags>$(OtherFlags) --simpleresolution</OtherFlags>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(TargetFramework)'=='mono\2.0'">
+ <!-- If 3.5 is not configured explicitly, use 2.0 -->
+ <TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)'==''">v2.0</TargetFrameworkVersion>
+ <DefineConstants>$(DefineConstants);FX_FSLIB_STRUCTURAL_EQUALITY;FX_FSLIB_IOBSERVABLE;FX_FSLIB_LAZY;FX_FSLIB_TUPLE</DefineConstants>
+ <!-- msbuild gets confused if we set DebugSymbols, because it thinks the compile should produce .pdb, but it produces .dll.mdb -->
+ <!-- Hence just use 'OtherFlags' for now -->
+ <DebugSymbols>false</DebugSymbols>
+ <DebugType>none</DebugType>
+ <OtherFlags>$(OtherFlags) /debug</OtherFlags>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(TargetFramework)'=='cli\4.0'">
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <DefineConstants>$(DefineConstants);FX_ATLEAST_40;FX_ATLEAST_35</DefineConstants>
+ <TargetFrameworkProfile></TargetFrameworkProfile>
+ <!-- MSbuild works out the assembly references -->
+ </PropertyGroup>
+
+ <!-- Target Silverlight 3.0 -->
+ <PropertyGroup Condition="'$(TargetFramework)'=='Silverlight\3.0'">
+ <TargetFrameworkVersion>v3.0</TargetFrameworkVersion>
+ <DefineConstants>$(DefineConstants);SILVERLIGHT;FX_NO_ARRAY_LONG_LENGTH;FX_NO_DEBUG_PROXIES;FX_NO_EXIT;FX_NO_CHAR_PARSE;FX_NO_DEFAULT_DEPENDENCY_TYPE;FX_SIMPLE_SECURITY_PERMISSIONS;FX_NO_TRUNCATE;FX_NO_CULTURE_INFO_ARGS;FX_NO_REFLECTION_MODULE_HANDLES;FX_NO_OPERATION_CANCELLED;FX_NO_TO_LOWER_INVARIANT;FX_NO_EXIT_CONTEXT_FLAGS;FX_NO_BASED_ARRAYS;FX_NO_DOUBLE_BIT_CONVERTER;FX_NO_BINARY_SERIALIZATION;FX_NO_ASCII_ENCODING;FX_NO_DEFAULT_ENCODING;FX_NO_FILE_OPTIONS;FX_NO_NONBLOCK_IO;FX_NO_COMMAND_LINE_ARGS;FX_NO_ENVIRONMENT;FX_NO_PROCESS_START;FX_NO_APP_DOMAINS;FX_NO_PROCESS_DIAGNOSTICS;FX_FSLIB_STRUCTURAL_EQUALITY;FX_FSLIB_IOBSERVABLE;FX_FSLIB_LAZY;FX_FSLIB_TUPLE</DefineConstants>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <SilverlightApplication>false</SilverlightApplication>
+ <SilverlightVersion>v3.0</SilverlightVersion>
+ </PropertyGroup>
+
+ <!-- Target Silverlight 4.0 -->
+ <PropertyGroup Condition="'$(TargetFramework)'=='Silverlight\4.0'">
+ <DefineConstants>$(DefineConstants);SILVERLIGHT;FX_NO_ARRAY_LONG_LENGTH;FX_NO_DEBUG_PROXIES;FX_NO_EXIT;FX_NO_CHAR_PARSE;FX_NO_DEFAULT_DEPENDENCY_TYPE;FX_SIMPLE_SECURITY_PERMISSIONS;FX_NO_TRUNCATE;FX_NO_CULTURE_INFO_ARGS;FX_NO_REFLECTION_MODULE_HANDLES;FX_NO_OPERATION_CANCELLED;FX_NO_TO_LOWER_INVARIANT;FX_NO_EXIT_CONTEXT_FLAGS;FX_NO_BASED_ARRAYS;FX_NO_DOUBLE_BIT_CONVERTER;FX_NO_BINARY_SERIALIZATION;FX_NO_ASCII_ENCODING;FX_NO_DEFAULT_ENCODING;FX_NO_FILE_OPTIONS;FX_NO_NONBLOCK_IO;FX_NO_COMMAND_LINE_ARGS;FX_NO_ENVIRONMENT;FX_NO_PROCESS_START;FX_NO_APP_DOMAINS;FX_NO_PROCESS_DIAGNOSTICS;FX_FSLIB_STRUCTURAL_EQUALITY;FX_FSLIB_IOBSERVABLE;FX_FSLIB_TUPLE</DefineConstants>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <SilverlightVersion>v4.0</SilverlightVersion>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(TargetFramework)'=='WindowsPhone7\Silverlight\4.0'">
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <TargetFrameworkProfile>WindowsPhone</TargetFrameworkProfile>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <DefineConstants>$(DefineConstants);SILVERLIGHT;FX_NO_ARRAY_LONG_LENGTH;FX_NO_DEBUG_PROXIES;FX_NO_EXIT;FX_NO_CHAR_PARSE;FX_NO_DEFAULT_DEPENDENCY_TYPE;FX_SIMPLE_SECURITY_PERMISSIONS;FX_NO_TRUNCATE;FX_NO_CULTURE_INFO_ARGS;FX_NO_REFLECTION_MODULE_HANDLES;FX_NO_OPERATION_CANCELLED;FX_NO_TO_LOWER_INVARIANT;FX_NO_EXIT_CONTEXT_FLAGS;FX_NO_BASED_ARRAYS;FX_NO_DOUBLE_BIT_CONVERTER;FX_NO_BINARY_SERIALIZATION;FX_NO_ASCII_ENCODING;FX_NO_DEFAULT_ENCODING;FX_NO_FILE_OPTIONS;FX_NO_NONBLOCK_IO;FX_NO_COMMAND_LINE_ARGS;FX_NO_ENVIRONMENT;FX_NO_PROCESS_START;FX_NO_APP_DOMAINS;FX_NO_PROCESS_DIAGNOSTICS;FX_FSLIB_STRUCTURAL_EQUALITY;FX_FSLIB_LAZY;FX_FSLIB_TUPLE;FX_NO_REFLECTION_EMIT</DefineConstants>
+ <Tailcalls>false</Tailcalls>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <!-- It would be better to use MSBuild resolution here, but the TargetFrameworkIdentifier etc. aren't set up quite correctly as yet -->
+ <OtherFlags>$(OtherFlags) --simpleresolution -r:"C:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone\mscorlib.dll" -r:"C:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone\System.Observable.dll"</OtherFlags>
+ </PropertyGroup>
+
+ <!-- Target CompactFramework 2.0 -->
+ <PropertyGroup Condition="'$(TargetFramework)'=='CompactFramework\2.0'">
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <TargetFrameworkIdentifier>CompactFramework</TargetFrameworkIdentifier>
+ <DefineConstants>$(DefineConstants);FX_ATLEAST_COMPACT_FRAMEWORK_20;COMPACT_FRAMEWORK;FX_NO_ARRAY_LONG_LENGTH;FX_NO_DEBUG_PROXIES;FX_NO_DEBUG_DISPLAYS;FX_NO_EXIT;FX_NO_CHAR_PARSE;FX_NO_DEFAULT_DEPENDENCY_TYPE;FX_NO_SECURITY_PERMISSIONS;FX_NO_TRUNCATE;FX_NO_CULTURE_INFO_ARGS;FX_NO_DELEGATE_DYNAMIC_INVOKE;FX_NO_DELEGATE_DYNAMIC_METHOD;FX_MINIMAL_REFLECTION;FX_NO_OPERATION_CANCELLED;FX_NO_SYNC_CONTEXT;FX_NO_BASED_ARRAYS;FX_NO_TO_LOWER_INVARIANT;FX_NO_REGISTERED_WAIT_HANDLES;FX_NO_THREAD_STATIC;FX_NO_GET_HASH_CODE_HELPER;FX_NO_FILE_OPTIONS;FX_NO_LOGN;FX_NO_DOUBLE_BIT_CONVERTER;FX_NO_BINARY_SERIALIZATION;FX_NO_COMMAND_LINE_ARGS;FX_NO_ENVIRONMENT;FX_NO_PROCESS_DIAGNOSTICS;FX_NO_STRING_SPLIT_OPTIONS;FX_NO_APP_DOMAINS;FX_NO_CREATE_DELEGATE;FX_NO_WEB_REQUESTS;FX_NO_WEB_CLIENT;FX_NO_PARAMETERIZED_THREAD_START;FX_FSLIB_STRUCTURAL_EQUALITY;FX_FSLIB_IOBSERVABLE;FX_FSLIB_LAZY;FX_FSLIB_TUPLE;FX_NO_DELEGATE_CREATE_DELEGATE_FROM_STATIC_METHOD</DefineConstants>
+ <!-- It would be better to use MSBuild resolution here, but the TargetFrameworkIdentifier etc. aren't set up quite correctly as yet -->
+ <OtherFlags>$(OtherFlags) --simpleresolution -r:"C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\mscorlib.dll" -r:"C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\System.dll"</OtherFlags>
+ </PropertyGroup>
+
+ <!-- Target CompactFramework 3.5 -->
+ <PropertyGroup Condition="'$(TargetFramework)'=='CompactFramework\3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <TargetFrameworkIdentifier>CompactFramework</TargetFrameworkIdentifier>
+ <DefineConstants>$(DefineConstants);FX_ATLEAST_COMPACT_FRAMEWORK_35;COMPACT_FRAMEWORK;FX_NO_ARRAY_LONG_LENGTH;FX_NO_DEBUG_PROXIES;FX_NO_DEBUG_DISPLAYS;FX_NO_EXIT;FX_NO_CHAR_PARSE;FX_NO_DEFAULT_DEPENDENCY_TYPE;FX_NO_SECURITY_PERMISSIONS;FX_NO_TRUNCATE;FX_NO_CULTURE_INFO_ARGS;FX_NO_DELEGATE_DYNAMIC_INVOKE;FX_MINIMAL_REFLECTION;FX_NO_OPERATION_CANCELLED;FX_NO_SYNC_CONTEXT;FX_NO_BASED_ARRAYS;FX_NO_TO_LOWER_INVARIANT;FX_NO_REGISTERED_WAIT_HANDLES;FX_NO_THREAD_STATIC;FX_NO_GET_HASH_CODE_HELPER;FX_NO_FILE_OPTIONS;FX_NO_LOGN;FX_NO_DOUBLE_BIT_CONVERTER;FX_NO_BINARY_SERIALIZATION;FX_NO_COMMAND_LINE_ARGS;FX_NO_ENVIRONMENT;FX_NO_PROCESS_DIAGNOSTICS;FX_NO_STRING_SPLIT_OPTIONS;FX_NO_APP_DOMAINS;FX_NO_CREATE_DELEGATE;FX_NO_WEB_REQUESTS;FX_NO_WEB_CLIENT;FX_NO_PARAMETERIZED_THREAD_START;FX_FSLIB_STRUCTURAL_EQUALITY;FX_FSLIB_IOBSERVABLE;FX_FSLIB_LAZY;FX_FSLIB_TUPLE;FX_NO_DELEGATE_CREATE_DELEGATE_FROM_STATIC_METHOD</DefineConstants>
+ <!-- Turn off MSbuild resolution for the compiler, since it runs as a .NET 2.0 process and .NET 2.0 MSBuild resolution think then can't load CompactFramework 3.5 assemblies -->
+ <OtherFlags>$(OtherFlags) --simpleresolution -r:"C:\Program Files\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\mscorlib.dll" -r:"C:\Program Files\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\System.dll"</OtherFlags>
+ </PropertyGroup>
+
+
+
+ <!-- Build with LKG compiler (location is determined by Microsoft.FSharp.targets). The output compiler has suffix "-proto" -->
+ <PropertyGroup Condition=" '$(BuildWith)' == 'LKG' And '$(ProjectLanguage)' == 'FSharp' ">
+ <FsBuildSuffix>-proto</FsBuildSuffix>
+ <OutputPath>$(FSharpSourcesRoot)\..\$(Configuration)\$(protoCLIDir)\bin</OutputPath>
+ </PropertyGroup>
+
+ <!-- Build with prototype compiler (location is given by settings below). The output is the final bootstrapped compiler -->
+ <PropertyGroup Condition=" '$(BuildWith)' == ''">
+ <FSharpTargetsDir>$(FSharpSourcesRoot)\..\Proto\$(protoCLIDir)\bin</FSharpTargetsDir>
+
+ <FscToolPath>$(FSharpSourcesRoot)\..\Proto\$(protoCLIDir)\bin</FscToolPath>
+ <FscToolExe>fsc-proto.exe</FscToolExe>
+ <OutputPath>$(FSharpSourcesRoot)\..\$(Configuration)\$(TargetFramework)\bin</OutputPath>
+ </PropertyGroup>
+
+
+
+ <Import Project="..\Proto\$(protoCLIDir)\bin\Microsoft.FSharp-proto.Targets" Condition="'$(BuildWith)' == '' And '$(ProjectLanguage)' == 'FSharp' "/>
+ <Import Project="$(MSBuildExtensionsPath32)\FSharp\1.0\Microsoft.FSharp.Targets" Condition="'$(BuildWith)' == 'LKG' And '$(ProjectLanguage)' == 'FSharp' AND !Exists('$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll') " />
+ <Import Project="$(MSBuildExtensionsPath32)\..\Microsoft F#\v4.0\Microsoft.FSharp.Targets" Condition="'$(BuildWith)' == 'LKG' And '$(ProjectLanguage)' == 'FSharp' AND Exists('$(MSBuildBinPath)\Microsoft.Build.Tasks.v4.0.dll')" />
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.Common.targets" Condition="'$(TargetFramework)'=='Silverlight\3.0' or '$(TargetFramework)'=='Silverlight\4.0'"/>
+
+
+ <!-- Reference an existing FSI.EXE for use from within MSBuild -->
+ <PropertyGroup>
+ <FsSrGenToolPath>$(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin</FsSrGenToolPath>
+ <FsLexToolPath>$(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin</FsLexToolPath>
+ <FsYaccToolPath>$(FSharpSourcesRoot)\..\lkg\FSharp-$(LkgVersion)\bin</FsYaccToolPath>
+ <FsLexToolExe>fslex.exe</FsLexToolExe>
+ <FsYaccToolExe>fsyacc.exe</FsYaccToolExe>
+ </PropertyGroup>
+
+
+ <!-- Build with proto compiler, but running with mono -->
+ <PropertyGroup Condition=" '$(BuildWith)' == '' and ('$(TargetFramework)'=='mono\2.0' or '$(TargetFramework)'=='mono\4.0')">
+ <!-- <OtherFlags>$(OtherFlags) /resident</OtherFlags> -->
+ <FscToolExe>fsc-proto-mono.bat</FscToolExe>
+ <FsLexToolExe>fslex-mono.bat</FsLexToolExe>
+ <FsYaccToolExe>fsyacc-mono.bat</FsYaccToolExe>
+ </PropertyGroup>
+
+ <!-- Build with LKG compiler, but running with mono -->
+ <PropertyGroup Condition=" '$(BuildWith)' == 'LKG' and ('$(TargetFramework)'=='mono\2.0' or '$(TargetFramework)'=='mono\4.0')">
+ <FscToolExe>fsc-mono.bat</FscToolExe>
+ <FsLexToolExe>fslex-mono.bat</FsLexToolExe>
+ <FsYaccToolExe>fsyacc-mono.bat</FsYaccToolExe>
+ </PropertyGroup>
+
+
+
+ <PropertyGroup>
+ <!-- Hook compilation phase to do custom work -->
+ <CompileDependsOn>$(CompileDependsOn);ValidateConfiguration;CustomCopyLocalFiles</CompileDependsOn>
+ <RootNamespace></RootNamespace>
+ <DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
+ <EnsureThereAreNoUnusedFsSrGenResources>false</EnsureThereAreNoUnusedFsSrGenResources>
+ </PropertyGroup>
+
+ <Target Name="ValidateConfiguration">
+ <Error
+ Text="Configuration '$(Configuration)' is not one of the supported configurations: Debug, Release, Proto"
+ Condition="'$(Configuration)'!='Release' and '$(Configuration)'!='Debug' and '$(Configuration)'!='Proto'"/>
+ <Error
+ Text="TargetFramework '$(TargetFramework)' is not one of the supported configurations: 'empty', cli\2.0, cli\4.0, Silverlight/3.0, CompactFramework/3.5, WindowsPhone7\Silverlight\4.0"
+ Condition="! ('$(TargetFramework)' == 'cli\4.0' or '$(TargetFramework)' == 'cli\2.0' or '$(TargetFramework)' == 'mono\4.0' or '$(TargetFramework)' == 'mono\2.0' or '$(TargetFramework)' == 'Silverlight\3.0' or '$(TargetFramework)' == 'Silverlight\4.0' or '$(TargetFramework)' == 'CompactFramework\2.0' or '$(TargetFramework)' == 'CompactFramework\3.5' or '$(TargetFramework)' == 'WindowsPhone7\Silverlight\4.0')"/>
+ </Target>
+
+ <!-- This build step copies files to the output folder while replacing build variables in the text of
+ those file. -->
+ <Target
+ Name="CustomCopyLocalFiles"
+ Inputs="@(CustomCopyLocal)"
+ Outputs="@(CustomCopyLocal->'$(OutDir)%(TargetFilename)')"
+ >
+ <Exec Command="$(FSharpSourcesRoot)\fsharp\FSharp.Build\subst.exe {LkgVersion} $(LkgVersion) {BuildSuffix} &quot;$(FsBuildSuffix)&quot; {FSharpTargetsDir} unused &quot;%(CustomCopyLocal.FullPath)&quot; &gt; $(OutDir)%(CustomCopyLocal.TargetFilename) "/>
+ <!-- Make sure it will get cleaned -->
+ <CreateItem Include="$(OutDir)%(CustomCopyLocal.TargetFilename)">
+ <Output TaskParameter="Include" ItemName="FileWrites"/>
+ </CreateItem>
+ </Target>
+
+ <Import Project="..\lkg\FSharp-$(LkgVersion)\bin\FSharp.SRGen.targets" />
+</Project>
142 src/absil/bytes.fs
@@ -0,0 +1,142 @@
+//----------------------------------------------------------------------------
+//
+// Copyright (c) 2002-2010 Microsoft Corporation.
+//
+// This source code is subject to terms and conditions of the Apache License, Version 2.0. A
+// copy of the license can be found in the License.html file at the root of this distribution.
+// By using this source code in any fashion, you are agreeing to be bound
+// by the terms of the Apache License, Version 2.0.
+//
+// You must not remove this notice, or any other, from this software.
+//----------------------------------------------------------------------------
+
+/// Byte arrays
+namespace Microsoft.FSharp.Compiler.AbstractIL.Internal
+
+open System.IO
+open Internal.Utilities
+
+open Microsoft.FSharp.Compiler.AbstractIL
+open Microsoft.FSharp.Compiler.AbstractIL.Internal
+
+module internal Bytes =
+ let b0 n = (n &&& 0xFF)
+ let b1 n = ((n >>> 8) &&& 0xFF)
+ let b2 n = ((n >>> 16) &&& 0xFF)
+ let b3 n = ((n >>> 24) &&& 0xFF)
+
+ let dWw1 n = int32 ((n >>> 32) &&& 0xFFFFFFFFL)
+ let dWw0 n = int32 (n &&& 0xFFFFFFFFL)
+
+ let get (b:byte[]) n = int32 (Array.get b n)
+ let zeroCreate n : byte[] = Array.zeroCreate n
+
+ let sub ( b:byte[]) s l = Array.sub b s l
+ let blit (a:byte[]) b c d e = Array.blit a b c d e
+
+ let ofInt32Array (arr:int[]) = Array.init arr.Length (fun i -> byte arr.[i])
+
+ let stringAsUtf8NullTerminated (s:string) =
+ Array.append (System.Text.Encoding.UTF8.GetBytes s) (ofInt32Array [| 0x0 |])
+
+ let stringAsUnicodeNullTerminated (s:string) =
+ Array.append (System.Text.Encoding.Unicode.GetBytes s) (ofInt32Array [| 0x0;0x0 |])
+
+type internal ByteStream =
+ { bytes: byte[];
+ mutable pos: int;
+ max: int }
+ member b.ReadByte() =
+ if b.pos >= b.max then failwith "end of stream";
+ let res = b.bytes.[b.pos]
+ b.pos <- b.pos + 1;
+ res
+ member b.ReadUtf8String n =
+ let res = System.Text.Encoding.UTF8.GetString(b.bytes,b.pos,n)
+ b.pos <- b.pos + n; res
+
+ static member FromBytes (b:byte[],n,len) =
+ if n < 0 || (n+len) > b.Length then failwith "FromBytes";
+ { bytes = b; pos = n; max = n+len }
+
+ member b.ReadBytes n =
+ if b.pos + n > b.max then failwith "ReadBytes: end of stream";
+ let res = Bytes.sub b.bytes b.pos n
+ b.pos <- b.pos + n;
+ res
+
+ member b.Position = b.pos
+
+
+type internal ByteBuffer =
+ { mutable bbArray: byte[];
+ mutable bbCurrent: int }
+
+ member buf.Ensure newSize =
+ let oldBufSize = buf.bbArray.Length
+ if newSize > oldBufSize then
+ let old = buf.bbArray
+ buf.bbArray <- Bytes.zeroCreate (max newSize (oldBufSize * 2));
+ Bytes.blit old 0 buf.bbArray 0 buf.bbCurrent;
+
+ member buf.Close () = Bytes.sub buf.bbArray 0 buf.bbCurrent
+
+ member buf.EmitIntAsByte (i:int) =
+ let newSize = buf.bbCurrent + 1
+ buf.Ensure newSize;
+ buf.bbArray.[buf.bbCurrent] <- byte i
+ buf.bbCurrent <- newSize
+
+ member buf.EmitByte (b:byte) = buf.EmitIntAsByte (int b)
+
+ member buf.EmitIntsAsBytes (arr:int[]) =
+ let n = arr.Length
+ let newSize = buf.bbCurrent + n
+ buf.Ensure newSize;
+ let bbarr = buf.bbArray
+ let bbbase = buf.bbCurrent
+ for i = 0 to n - 1 do
+ bbarr.[bbbase + i] <- byte arr.[i]
+ buf.bbCurrent <- newSize
+
+ member bb.FixupInt32 pos n =
+ bb.bbArray.[pos] <- (Bytes.b0 n |> byte);
+ bb.bbArray.[pos + 1] <- (Bytes.b1 n |> byte);
+ bb.bbArray.[pos + 2] <- (Bytes.b2 n |> byte);
+ bb.bbArray.[pos + 3] <- (Bytes.b3 n |> byte);
+
+ member buf.EmitInt32 n =
+ let newSize = buf.bbCurrent + 4
+ buf.Ensure newSize;
+ buf.FixupInt32 buf.bbCurrent n;
+ buf.bbCurrent <- newSize
+
+ member buf.EmitBytes (i:byte[]) =
+ let n = i.Length
+ let newSize = buf.bbCurrent + n
+ buf.Ensure newSize;
+ Bytes.blit i 0 buf.bbArray buf.bbCurrent n;
+ buf.bbCurrent <- newSize
+
+ member buf.EmitInt32AsUInt16 n =
+ let newSize = buf.bbCurrent + 2
+ buf.Ensure newSize;
+ buf.bbArray.[buf.bbCurrent] <- (Bytes.b0 n |> byte);
+ buf.bbArray.[buf.bbCurrent + 1] <- (Bytes.b1 n |> byte);
+ buf.bbCurrent <- newSize
+
+ member buf.EmitBoolAsByte (b:bool) = buf.EmitIntAsByte (if b then 1 else 0)
+
+ member buf.EmitUInt16 (x:uint16) = buf.EmitInt32AsUInt16 (int32 x)
+
+ member buf.EmitInt64 x =
+ buf.EmitInt32 (Bytes.dWw0 x);
+ buf.EmitInt32 (Bytes.dWw1 x)
+
+ member buf.Position = buf.bbCurrent
+
+ static member Create sz =
+ { bbArray=Bytes.zeroCreate sz;
+ bbCurrent = 0; }
+
+
62 src/absil/bytes.fsi
@@ -0,0 +1,62 @@
+//----------------------------------------------------------------------------
+//
+// Copyright (c) 2002-2010 Microsoft Corporation.
+//
+// This source code is subject to terms and conditions of the Apache License, Version 2.0. A
+// copy of the license can be found in the License.html file at the root of this distribution.
+// By using this source code in any fashion, you are agreeing to be bound
+// by the terms of the Apache License, Version 2.0.
+//
+// You must not remove this notice, or any other, from this software.
+//----------------------------------------------------------------------------
+
+
+/// Blobs of bytes, cross-compiling
+namespace Microsoft.FSharp.Compiler.AbstractIL.Internal
+
+open Internal.Utilities
+
+open Microsoft.FSharp.Compiler.AbstractIL
+open Microsoft.FSharp.Compiler.AbstractIL.Internal
+
+
+module internal Bytes =
+ /// returned int will be 0 <= x <= 255
+ val get: byte[] -> int -> int
+ val zeroCreate: int -> byte[]
+ /// each int must be 0 <= x <= 255
+ val ofInt32Array: int[] -> byte[]
+ /// each int will be 0 <= x <= 255
+
+ val blit: byte[] -> int -> byte[] -> int -> int -> unit
+
+ val stringAsUnicodeNullTerminated: string -> byte[]
+ val stringAsUtf8NullTerminated: string -> byte[]
+
+
+/// Imperative buffers and streams of byte[]
+[<Sealed>]
+type internal ByteBuffer =
+ member Close : unit -> byte[]
+ member EmitIntAsByte : int -> unit
+ member EmitIntsAsBytes : int[] -> unit
+ member EmitByte : byte -> unit
+ member EmitBytes : byte[] -> unit
+ member EmitInt32 : int32 -> unit
+ member EmitInt64 : int64 -> unit
+ member FixupInt32 : pos: int -> value: int32 -> unit
+ member EmitInt32AsUInt16 : int32 -> unit
+ member EmitBoolAsByte : bool -> unit
+ member EmitUInt16 : uint16 -> unit
+ member Position : int
+ static member Create : int -> ByteBuffer
+
+
+[<Sealed>]
+type internal ByteStream =
+ member ReadByte : unit -> byte
+ member ReadBytes : int -> byte[]
+ member ReadUtf8String : int -> string
+ member Position : int
+ static member FromBytes : byte[] * start:int * length:int -> ByteStream
+
4,617 src/absil/il.fs
4,617 additions, 0 deletions not shown
2,192 src/absil/il.fsi
@@ -0,0 +1,2192 @@
+//----------------------------------------------------------------------------
+//
+// Copyright (c) 2002-2010 Microsoft Corporation.
+//
+// This source code is subject to terms and conditions of the Apache License, Version 2.0. A
+// copy of the license can be found in the License.html file at the root of this distribution.
+// By using this source code in any fashion, you are agreeing to be bound
+// by the terms of the Apache License, Version 2.0.
+//
+// You must not remove this notice, or any other, from this software.
+//----------------------------------------------------------------------------
+
+/// The "unlinked" view of .NET metadata and code. Central to
+/// to Abstract IL library
+module internal Microsoft.FSharp.Compiler.AbstractIL.IL
+
+open Internal.Utilities
+open System.Collections.Generic
+
+
+// ====================================================================
+// .NET binaries can be converted to the data structures below by using
+// the functions in the "Ilread" module.
+//
+// Constituent types are listed in ascending order of complexity,
+// all the way up to the type ILModuleDef, representing the read of an IL
+// assembly (.dll or .exe), or part of a multi-module assembly. Types are
+// often specified via a concrete representation for the type (e.g. a record),
+// though some types are abstract.
+//
+// The second part of the file (after the definition of all the types)
+// specifies a large set of utilities for building objects belonging to
+// the types. You will only need to become familiar with these if you
+// are transforming code or writing a code-generating compiler.
+//
+// Several other utilities are also defined in this file:
+// 1. A code builder for turning linear sequences of instructions
+// augmented with exception tables into the more structured
+// format used for code.
+//
+// 2. The "typ_XYZ", "tspec_XYZ" and "mspec_XYZ" values which
+// can be used to reference types in the "mscorlib" assembly.
+//
+// 3. The "rescopeXYZ" functions which can be used to lift a piece of
+// metadata from one assembly and transform it to a piece of metadata
+// suitable for use from another assembly. The transformation adjusts
+// references in the metadata to take into account the assembly
+// where the metadata will now be located.
+//
+// 4. The "instantiateXYZ" utilities to replace type variables
+// by types. These are associated with generics.
+//
+// 5. The "intern_XYZ" tables for reducing the memory used by
+// generated constructs.
+//
+// 6. The "refs_of_XYZ" utilities for finding all the assemblies
+// referenced by a module.
+//
+// 7. A somewhat obscure facility to allow new instructions and types
+// to be added to the This is only used by ILX.
+// ====================================================================
+
+// Guids (Note: consider adjusting these to the System.Guid type)
+type Guid = byte[]
+
+[<StructuralEquality; StructuralComparison>]
+type ILPlatform =
+ | X86
+ | AMD64
+ | IA64
+
+/// Debug info. Values of type "source" can be attached at sequence
+/// points and some other locations.
+[<Sealed>]
+type ILSourceDocument =
+ static member Create : language: Guid option * vendor: Guid option * documentType: Guid option * file: string -> ILSourceDocument
+ member Language: Guid option
+ member Vendor: Guid option
+ member DocumentType: Guid option
+ member File: string
+
+
+[<Sealed>]
+type ILSourceMarker =
+ static member Create : document: ILSourceDocument * line: int * column: int * endLine:int * endColumn: int-> ILSourceMarker
+ member Document: ILSourceDocument
+ member Line: int
+ member Column: int
+ member EndLine: int
+ member EndColumn: int
+
+/// Extensibility: ignore these unless you are generating ILX
+/// structures directly.
+[<Sealed>]
+type IlxExtensionType =
+ interface System.IComparable
+
+/// Represents an extension to the algebra of type kinds
+type IlxExtensionTypeKind
+
+/// Represents an extension to the algebra of instructions
+type IlxExtensionInstr
+
+[<StructuralEquality; StructuralComparison>]
+type PublicKey =
+ | PublicKey of byte[]
+ | PublicKeyToken of byte[]
+ member IsKey: bool
+ member IsKeyToken: bool
+ member Key: byte[]
+ member KeyToken: byte[]
+
+type ILVersionInfo = uint16 * uint16 * uint16 * uint16
+
+[<Sealed>]
+type ILAssemblyRef =
+ static member Create : name: string * hash: byte[] option * publicKey: PublicKey option * retargetable: bool * version: ILVersionInfo option * locale: string option -> ILAssemblyRef
+
+ static member FromAssembly : System.Reflection.Assembly -> ILAssemblyRef
+
+ member Name: string;
+ /// The fully qualified name of the assembly reference, e.g. mscorlib, Version=1.0.3705 etc.
+ member QualifiedName: string;
+ member Hash: byte[] option;
+ member PublicKey: PublicKey option;
+ /// CLI says this indicates if the assembly can be retargeted (at runtime) to be from a different publisher.
+ member Retargetable: bool;
+ member Version: ILVersionInfo option;
+ member Locale: string option
+ interface System.IComparable
+
+[<Sealed>]
+type ILModuleRef =
+ static member Create : name: string * hasMetadata: bool * hash: byte[] option -> ILModuleRef
+ member Name: string
+ member HasMetadata: bool
+ member Hash: byte[] option
+ interface System.IComparable
+
+// Scope references
+//
+// Scope references are the bits of metadata attached to type names
+// that indicate where a type can be found. CIL has three
+// kinds: local, module and assembly references:
+// o Local: the type must reside in the same module as the scope reference
+// o Module: the type must reside in the indicated module in the same
+// assembly as the scope reference
+// o Assembly: The type must reside in the indicated assembly.
+// These have no implicit context. Assembly references can end up
+// binding to the assembly containing the reference, i.e.
+// may be self or mutually referential.
+//
+// Assembly reference may also resolve to type in an
+// auxiliary module of an assembly when the assembly
+// has an "exported types" (here called "classes elsewhere") table.
+//
+// We represent these references by values embedded within type
+// references. These values are usually "shared" across the data
+// structures for a module, i.e. one such value is created for each
+// assembly or module reference, and this value is reused within each
+// type object.
+//
+// Note that as with method references the term structure is not
+// _linked_, i.e. a "ILScopeRef" is still a _reference_ to a scope,
+// not the scope itself. Because the structure is not linked,
+// the Abstract IL toolset does not require
+// strongly connected inputs: you can manipulate an assembly
+// without loading all its dependent assemblies. This is the primary
+// difference between Abstract IL and Reflection, and it can be both
+// a blessing and a curse depending on the kind of manipulation you
+// wish to perform.
+//
+// Similarly, you can manipulate individual modules within
+// an assembly without having the whole assembly loaded. (But note that
+// most assemblies are single-module in any case).
+//
+// [ILScopeRef]'s _cannot_ be compared for equality in the way that
+// might be expected, in these sense that two ILScopeRef's may
+// resolve to the same assembly/module even though they are not equal.
+//
+// Aside: People have suggested normalizing all scope references
+// so that this would be possible, and early versions of this
+// toolkit did this. However, this meant that in order to load
+// each module you had to tell the toolkit which assembly it belonged to.
+// Furthermore, you had to know the exact resolved details of
+// each assembly the module refers to. This is
+// effectively like having a "fully-linked" view of the graph
+// of assemblies, like that provided in the Ilbind module. This is really problematic for compile-time tools,
+// as, for example, the policy for linking at the runtime-machine
+// may actually alter the results of linking. If such compile-time
+// assumptions are to be made then the tool built on top
+// of the toolkit rather than the toolkit itself should
+// make them.
+//
+// Scope references, type references, field references and method references
+// can be "bound" to particular assemblies using the functions in "Ilbind".
+// This simulates the resolution/binding process performed by a Common Language
+// Runtime during execution. Various tests and derived operations
+// can then be performed on the results of binding.
+[<StructuralEquality; StructuralComparison>]
+[<RequireQualifiedAccess>]
+type ILScopeRef =
+ /// A reference to the type in the current module
+ | Local
+ /// A reference to a type in a module in the same assembly
+ | Module of ILModuleRef
+ /// A reference to a type in another assembly
+ | Assembly of ILAssemblyRef
+ member IsLocalRef: bool
+ member IsModuleRef: bool
+ member IsAssemblyRef: bool
+ member ModuleRef: ILModuleRef
+ member AssemblyRef: ILAssemblyRef
+ member QualifiedName: string
+
+// Calling conventions.
+//
+// For nearly all purposes you simply want to use ILArgConvention.Default combined
+// with ILThisConvention.Instance or ILThisConvention.Static, i.e.
+// ILCallingConv.Instance == Callconv(ILThisConvention.Instance, ILArgConvention.Default): for an instance method
+// ILCallingConv.Static == Callconv(ILThisConvention.Static, ILArgConvention.Default): for a static method
+//
+// ILThisConvention.InstanceExplicit is only used by Managed C++, and indicates
+// that the 'this' pointer is actually explicit in the signature.
+[<StructuralEquality; StructuralComparison; RequireQualifiedAccess>]
+type ILArgConvention =
+ | Default
+ | CDecl
+ | StdCall
+ | ThisCall
+ | FastCall
+ | VarArg
+
+[<StructuralEquality; StructuralComparison; RequireQualifiedAccess>]
+type ILThisConvention =
+ /// accepts an implicit 'this' pointer
+ | Instance
+ /// accepts an explicit 'this' pointer
+ | InstanceExplicit
+ /// no 'this' pointer is passed
+ | Static
+
+[<StructuralEquality; StructuralComparison>]
+type ILCallingConv =
+ | Callconv of ILThisConvention * ILArgConvention
+ member IsInstance : bool
+ member IsInstanceExplicit : bool
+ member IsStatic : bool
+ member ThisConv : ILThisConvention
+ member BasicConv : ILArgConvention
+ static member Instance : ILCallingConv
+ static member Static : ILCallingConv
+
+/// Array shapes. For most purposes, including verification, the
+/// rank is the only thing that matters.
+
+type ILArrayBound = int32 option
+type ILArrayBounds = ILArrayBound * ILArrayBound
+
+[<StructuralEquality; StructuralComparison>]
+type ILArrayShape =
+ | ILArrayShape of ILArrayBounds list (* lobound/size pairs *)
+ member Rank : int
+ /// Bounds for a single dimensional, zero based array
+ static member SingleDimensional: ILArrayShape
+ static member FromRank : int -> ILArrayShape
+
+[<StructuralEquality; StructuralComparison>]
+type ILBoxity =
+ | AsObject
+ | AsValue
+
+type ILGenericVariance =
+ | NonVariant
+ | CoVariant
+ | ContraVariant
+
+/// Type refs, i.e. references to types in some .NET assembly
+[<Sealed>]
+type ILTypeRef =
+ /// Create a ILTypeRef
+ static member Create : scope: ILScopeRef * enclosing: string list * name: string -> ILTypeRef
+
+ /// Where is the type, i.e. is it in this module, in another module in this assembly or in another assembly?
+ member Scope: ILScopeRef
+ /// The list of enclosing type names for a nested type. If non-nil then the first of these also contains the namespace.
+ member Enclosing: string list
+ /// The name of the type. This also contains the namespace if Enclosing is empty
+ member Name: string
+ /// The name of the type in the assembly using the '.' notation for nested types
+ member FullName: string
+ /// The name of the type in the assembly using the '+' notation for nested types
+ member BasicQualifiedName : string
+ member QualifiedName: string
+ interface System.IComparable
+
+/// Type specs and types.
+///
+/// These are the types that appear syntactically in .NET binaries.
+///
+/// Generic type definitions must be combined with
+/// an instantiation to form a type. Throughout this file,
+/// a "ref" refers to something that is uninstantiated, and
+/// a "spec" to a ref that is combined with the relevant instantiations.
+
+[<Sealed>]
+type ILTypeSpec =
+ static member Create : typeRef:ILTypeRef * instantiation:ILGenericArgs -> ILTypeSpec
+
+ /// Which type is being referred to?
+ member TypeRef: ILTypeRef
+ /// The type instantiation if the type is generic, otherwise empty
+ member GenericArgs: ILGenericArgs
+ member Scope: ILScopeRef
+ member Enclosing: string list
+ member Name: string
+ member FullName: string
+ interface System.IComparable
+
+and
+ [<RequireQualifiedAccess; StructuralEquality; StructuralComparison>]
+ ILType =
+ /// Used only in return and pointer types.
+ | Void
+ /// Array types
+ | Array of ILArrayShape * ILType
+ /// Unboxed types, including builtin types.
+ | Value of ILTypeSpec
+ /// Reference types. Also may be used for parents of members even if for members in value types.
+ | Boxed of ILTypeSpec
+ /// Unmanaged pointers. Nb. the type is used by tools and for binding only, not by the verifier.
+ | Ptr of ILType
+ /// Managed pointers.
+ | Byref of ILType
+ /// ILCode pointers.
+ | FunctionPointer of ILCallingSignature
+ /// Reference a generic arg.
+ | TypeVar of uint16
+ /// Custom modifiers.
+ | Modified of
+ /// True if modifier is "required"
+ bool *
+ /// The class of the custom modifier.
+ ILTypeRef *
+ /// The type being modified.
+ ILType
+ member TypeSpec : ILTypeSpec
+ member Boxity : ILBoxity
+ member TypeRef : ILTypeRef
+ member IsNominal : bool
+ member GenericArgs : ILGenericArgs
+ member IsTyvar : bool
+ member BasicQualifiedName : string
+ member QualifiedNameWithNoShortMscorlib : string
+
+and [<StructuralEquality; StructuralComparison>]
+ ILCallingSignature =
+ { CallingConv: ILCallingConv;
+ ArgTypes: ILType list;
+ ReturnType: ILType }
+
+/// Actual generic parameters are always types.
+and ILGenericArgs = ILType list
+
+/// Formal identities of methods. Method refs refer to methods on
+/// named types. In general you should work with ILMethodSpec objects
+/// rather than MethodRef objects, because ILMethodSpec objects carry
+/// information about how generic methods are instantiated. MethodRef
+/// objects are only used at a few places in the Abstract IL syntax
+/// and if analyzing or generating IL you will be unlikely to come across
+/// these.
+
+[<Sealed>]
+type ILMethodRef =
+ static member Create : enclosingTypeRef: ILTypeRef * callingConv: ILCallingConv * name: string * genericArity: int * argTypes: ILType list * returnType: ILType -> ILMethodRef
+ member EnclosingTypeRef: ILTypeRef
+ member CallingConv: ILCallingConv
+ member Name: string
+ member GenericArity: int
+ member ArgCount: int
+ member ArgTypes: ILType list
+ member ReturnType: ILType
+ member CallingSignature: ILCallingSignature
+ interface System.IComparable
+
+/// Formal identities of fields.
+
+[<StructuralEquality; StructuralComparison>]
+type ILFieldRef =
+ { EnclosingTypeRef: ILTypeRef;
+ Name: string;
+ Type: ILType }
+
+/// The information at the callsite of a method
+//
+// A ILMethodSpec is everything given at the callsite (apart from whether the call is a tailcall and whether it is passing
+// varargs - see the instruction set below). It is made up of
+// 1) a (possibly generic) ILMethodRef
+// 2) a "usage type" that indicates the how the type containing the declaration is being used (as
+// a value class, a boxed value class, an instantiated generic class or whatever - see below)
+// 3) an instantiation in the case where the method is generic.
+//
+// In this unbound form of the metadata, the enclosing type may be ILType.Boxed even when the member is a member of a value type or
+// enumeration. This is because the binary format of the metadata does not carry enough information in a MemberRefParent to determine
+// from the binary alone whether the enclosing type is a value type or not.
+
+[<Sealed>]
+type ILMethodSpec =
+ static member Create : ILType * ILMethodRef * ILGenericArgs -> ILMethodSpec
+ member MethodRef: ILMethodRef
+ member EnclosingType: ILType
+ member GenericArgs: ILGenericArgs
+ member CallingConv: ILCallingConv
+ member GenericArity: int
+ member Name: string
+ member FormalArgTypes: ILType list
+ member FormalReturnType: ILType
+ interface System.IComparable
+
+
+/// Field specs. The data given for a ldfld, stfld etc. instruction.
+[<StructuralEquality; StructuralComparison>]
+type ILFieldSpec =
+ { FieldRef: ILFieldRef;
+ EnclosingType: ILType }
+ member EnclosingTypeRef: ILTypeRef
+ member Name: string
+ member FormalType: ILType
+ member ActualType : ILType
+
+/// ILCode labels. In structured code each code label
+/// refers to a basic block somewhere in the code of the method.
+
+type ILCodeLabel = int
+
+[<StructuralEquality; StructuralComparison>]
+type ILBasicType =
+ | DT_R
+ | DT_I1
+ | DT_U1
+ | DT_I2
+ | DT_U2
+ | DT_I4
+ | DT_U4
+ | DT_I8
+ | DT_U8
+ | DT_R4
+ | DT_R8
+ | DT_I
+ | DT_U
+ | DT_REF
+
+[<StructuralEquality; StructuralComparison; RequireQualifiedAccess>]
+type ILToken =
+ | ILType of ILType
+ | ILMethod of ILMethodSpec
+ | ILField of ILFieldSpec
+
+[<StructuralEquality; StructuralComparison; RequireQualifiedAccess>]
+type ILConst =
+ | I4 of int32
+ | I8 of int64
+ | R4 of single
+ | R8 of double
+
+type ILTailcall =
+ | Tailcall
+ | Normalcall
+
+type ILAlignment =
+ | Aligned
+ | Unaligned1
+ | Unaligned2
+ | Unaligned4
+
+type ILVolatility =
+ | Volatile
+ | Nonvolatile
+
+type ILReadonly =
+ | ReadonlyAddress
+ | NormalAddress
+
+type ILVarArgs = ILType list option
+
+[<StructuralEquality; StructuralComparison>]
+type ILComparisonInstr =
+ | BI_beq
+ | BI_bge
+ | BI_bge_un
+ | BI_bgt
+ | BI_bgt_un
+ | BI_ble
+ | BI_ble_un
+ | BI_blt
+ | BI_blt_un
+ | BI_bne_un
+ | BI_brfalse
+ | BI_brtrue
+
+/// The instruction set.
+///
+/// In general we don't categorize instructions, as different
+/// instruction groups are relevant for different types of operations.
+/// However we do collect the branch and compare instructions together
+/// because they all take an address, and the ILArithInstr ones because
+/// none of them take any direct arguments.
+[<StructuralEquality; NoComparison>]
+type ILInstr =
+ // Basic
+ | AI_add
+ | AI_add_ovf
+ | AI_add_ovf_un
+ | AI_and
+ | AI_div
+ | AI_div_un
+ | AI_ceq
+ | AI_cgt
+ | AI_cgt_un
+ | AI_clt
+ | AI_clt_un
+ | AI_conv of ILBasicType
+ | AI_conv_ovf of ILBasicType
+ | AI_conv_ovf_un of ILBasicType
+ | AI_mul
+ | AI_mul_ovf
+ | AI_mul_ovf_un
+ | AI_rem
+ | AI_rem_un
+ | AI_shl
+ | AI_shr
+ | AI_shr_un
+ | AI_sub
+ | AI_sub_ovf
+ | AI_sub_ovf_un
+ | AI_xor
+ | AI_or
+ | AI_neg
+ | AI_not
+ | AI_ldnull
+ | AI_dup
+ | AI_pop
+ | AI_ckfinite
+ | AI_nop
+ | AI_ldc of ILBasicType * 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
+
+ // Control transfer
+ | I_br of ILCodeLabel
+ | I_jmp of ILMethodSpec
+ | I_brcmp of ILComparisonInstr * ILCodeLabel * ILCodeLabel (* second label is fall-through *)
+ | I_switch of (ILCodeLabel list * ILCodeLabel) (* last label is fallthrough *)
+ | I_ret
+
+ // Method call
+ | I_call of 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
+
+ // Exceptions
+ | I_throw
+ | I_endfinally
+ | I_endfilter
+ | I_leave of ILCodeLabel
+ | I_rethrow
+
+ // Object instructions
+ | 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
+
+ // Value type instructions
+ | 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
+
+ // Generalized array instructions. In AbsIL these instructions include
+ // both the single-dimensional variants (with ILArrayShape == ILArrayShape.SingleDimensional)
+ // and calls to the "special" multi-dimensional "methods" such as
+ // newobj void string[,]::.ctor(int32, int32)
+ // call string string[,]::Get(int32, int32)
+ // call string& string[,]::Address(int32, int32)
+ // call void string[,]::Set(int32, int32,string)
+ // The IL reader transforms calls of this form to the corresponding
+ // generalized instruction with the corresponding ILArrayShape
+ // argument. This is done to simplify the IL and make it more uniform.
+ // The IL writer then reverses this when emitting the binary.
+ | I_ldelem of ILBasicType
+ | I_stelem of ILBasicType
+ | I_ldelema of ILReadonly * ILArrayShape * ILType (* ILArrayShape = ILArrayShape.SingleDimensional for single dimensional arrays *)
+ | I_ldelem_any of ILArrayShape * ILType (* ILArrayShape = ILArrayShape.SingleDimensional for single dimensional arrays *)
+ | I_stelem_any of ILArrayShape * ILType (* ILArrayShape = ILArrayShape.SingleDimensional for single dimensional arrays *)
+ | I_newarr of ILArrayShape * ILType (* ILArrayShape = ILArrayShape.SingleDimensional for single dimensional arrays *)
+ | I_ldlen
+
+ // "System.TypedReference" related instructions: almost
+ // no languages produce these, though they do occur in mscorlib.dll
+ // System.TypedReference represents a pair of a type and a byref-pointer
+ // to a value of that type.
+ | I_mkrefany of ILType
+ | I_refanytype
+ | I_refanyval of ILType
+
+ // Debug-specific
+ // I_seqpoint is a fake instruction to represent a sequence point:
+ // the next instruction starts the execution of the
+ // statement covered by the given range - this is a
+ // dummy instruction and is not emitted
+ | I_break
+ | I_seqpoint of ILSourceMarker
+
+ // Varargs - C++ only
+ | I_arglist
+
+ // Local aggregates, i.e. stack allocated data (alloca) : C++ only
+ | I_localloc
+ | I_cpblk of ILAlignment * ILVolatility
+ | I_initblk of ILAlignment * ILVolatility
+
+ // EXTENSIONS, e.g. MS-ILX
+ | EI_ilzero of ILType
+ | EI_ldlen_multi of int32 * int32
+ | I_other of IlxExtensionInstr
+
+// We could remove this open-ended way of extending the IL and just combine with ILX
+type ILInstrSetExtension<'Extension> =
+ { instrExtDests: ('Extension -> ILCodeLabel list);
+ instrExtFallthrough: ('Extension -> ILCodeLabel option);
+ instrExtIsTailcall: ('Extension -> bool);
+ instrExtRelabel: (ILCodeLabel -> ILCodeLabel) -> 'Extension -> 'Extension; }
+
+val RegisterInstructionSetExtension: ILInstrSetExtension<'Extension> -> ('Extension -> IlxExtensionInstr) * (IlxExtensionInstr -> bool) * (IlxExtensionInstr -> 'Extension)
+
+/// A list of instructions ending in an unconditionally
+/// branching instruction. A basic block has a label which must be unique
+/// within the method it is located in. Only the first instruction of
+/// a basic block can be the target of a branch.
+//
+// Details: The last instruction is always a control flow instruction,
+// i.e. branch, tailcall, throw etc.
+//
+// For example
+// B1: ldarg 1
+// pop
+// ret
+//
+// will be one basic block:
+// ILBasicBlock("B1", [| I_ldarg(1); I_arith(AI_pop); I_ret |])
+
+type ILBasicBlock =
+ { Label: ILCodeLabel;
+ Instructions: ILInstr[] }
+ member Fallthrough: ILCodeLabel option
+
+
+/// Indicates that a particular local variable has a particular source
+/// language name within a GroupBlock. This does not effect local
+/// variable numbering, which is global over the whole method.
+type ILDebugMapping =
+ { LocalIndex: int;
+ LocalName: string; }
+
+/// ILCode
+///
+/// The code for a method is made up of a "code" object. Each "code"
+/// object gives the contents of the method in a "semi-structured" form, i.e.
+/// 1. The structure implicit in the IL exception handling tables
+/// has been made explicit
+/// 2. No relative offsets are used in the code: all branches and
+/// switch targets are made explicit as labels.
+/// 3. All "fallthroughs" from one basic block to the next have
+/// been made explicit, by adding extra "branch" instructions to
+/// the end of basic blocks which simply fallthrough to another basic
+/// block.
+///
+/// You can convert a straight-line sequence of instructions to structured
+/// code by using buildILCode and
+/// Most of the interesting code is contained in BasicBlocks. If you're
+/// just interested in getting started with the format then begin
+/// by simply considering methods which do not contain any branch
+/// instructions, or methods which do not contain any exception handling
+/// constructs.
+///
+/// The above format has the great advantage that you can insert and
+/// delete new code blocks without needing to fixup relative offsets
+/// or exception tables.
+///
+/// ILBasicBlock(bblock)
+/// See above
+///
+/// GroupBlock(localDebugInfo, blocks)
+/// A set of blocks, with interior branching between the blocks. For example
+/// B1: ldarg 1
+/// br B2
+///
+/// B2: pop
+/// ret
+///
+/// will be two basic blocks
+/// let b1 = ILBasicBlock("B1", [| I_ldarg(1); I_br("B2") |])
+/// let b2 = ILBasicBlock("B2", [| I_arith(AI_pop); I_ret |])
+/// GroupBlock([], [b1; b2])
+///
+/// A GroupBlock can include a list of debug info records for locally
+/// scoped local variables. These indicate that within the given blocks
+/// the given local variables are used for the given Debug info
+/// will only be recorded for local variables
+/// declared in these nodes, and the local variable will only appear live
+/// in the debugger for the instructions covered by this node. So if you
+/// omit or erase these nodes then no debug info will be emitted for local
+/// variables. If necessary you can have one outer ScopeBlock which specifies
+/// the information for all the local variables
+///
+/// Not all the destination labels used within a group of blocks need
+/// be satisfied by that group alone. For example, the interior "try" code
+/// of "try"-"catch" construct may be:
+/// B1: ldarg 1
+/// br B2
+///
+/// B2: pop
+/// leave B3
+///
+/// Again there will be two basic blocks grouped together:
+/// let b1 = ILBasicBlock("B1", [| I_ldarg(1); I_br("B2") |])
+/// let b2 = ILBasicBlock("B2", [| I_arith(AI_pop); I_leave("B3") |])
+/// GroupBlock([], [b1; b2])
+/// Here the code must be embedded in a method where "B3" is a label
+/// somewhere in the method.
+///
+/// RestrictBlock(labels,code)
+/// This block hides labels, i.e. the given set of labels represent
+/// wiring which is purely internal to the given code block, and may not
+/// be used as the target of a branch by any blocks which this block
+/// is placed alongside.
+///
+/// For example, if a method is made up of:
+/// B1: ldarg 1
+/// br B2
+///
+/// B2: ret
+///
+/// then the label "B2" is internal. The overall code will
+/// be two basic blocks grouped together, surrounded by a RestrictBlock.
+/// The label "B1" is then the only remaining visible entry to the method
+/// and execution will begin at that label.
+///
+/// let b1 = ILBasicBlock("B1", [| I_ldarg(1); I_br("B2") |])
+/// let b2 = ILBasicBlock("B2", [| I_arith(AI_pop); I_leave("B3") |])
+/// let gb1 = GroupBlock([], [b1; b2])
+/// RestrictBlock(["B2"], gb1)
+///
+/// RestrictBlock is necessary to build well-formed code.
+///
+/// TryBlock(trycode,seh)
+///
+/// A try-catch, try-finally or try-fault block.
+/// If an exception is raised while executing
+/// an instruction in 'trycode' then the exception handler given by
+/// 'seh' is executed.
+///
+/// Well-formedness conditions for code:
+///
+/// Well-formed code includes nodes which explicitly "hide" interior labels.
+/// For example, the code object for a method may have only one entry
+/// label which is not hidden, and this label will be the label where
+/// execution begins.
+///
+/// Both filter and catch blocks must have one
+/// and only one entry. These entry labels are not visible
+/// outside the filter and catch blocks. Filter has no
+/// exits (it always uses endfilter), catch may have exits.
+/// The "try" block can have multiple entries, i.e. you can branch
+/// into a try from outside. They can have multiple exits, each of
+/// which will be a "leave".
+///
+type ILCode =
+ | ILBasicBlock of ILBasicBlock
+ | GroupBlock of ILDebugMapping list * ILCode list
+ | RestrictBlock of ILCodeLabel list * ILCode
+ | TryBlock of ILCode * ILExceptionBlock
+
+/// The 'seh' specification can have several forms:
+///
+/// FilterCatchBlock
+/// A multi-try-filter-catch block. Execute the
+/// filters in order to determine which 'catch' block to catch the
+/// exception with. There are two kinds of filters - one for
+/// filtering exceptions by type and one by an instruction sequence.
+/// Note that filter blocks can't contain any exception blocks.
+///
+and ILExceptionBlock =
+ | FaultBlock of ILCode
+ | FinallyBlock of ILCode
+ | FilterCatchBlock of (ILFilterBlock * ILCode) list
+
+and ILFilterBlock =
+ | TypeFilter of ILType
+ | CodeFilter of ILCode
+
+val labelsOfCode: ILCode -> ILCodeLabel list
+val uniqueEntryOfCode: ILCode -> ILCodeLabel
+
+/// Field Init
+
+[<RequireQualifiedAccess; StructuralEquality; StructuralComparison>]
+type ILFieldInit =
+ | String of string
+ | Bool of bool
+ | Char of uint16
+ | Int8 of sbyte
+ | Int16 of int16
+ | Int32 of int32
+ | Int64 of int64
+ | UInt8 of byte
+ | UInt16 of uint16
+ | UInt32 of uint32
+ | UInt64 of uint64
+ | Single of single
+ | Double of double
+ | Null
+
+[<RequireQualifiedAccess>]
+type ILNativeVariant =
+ | Empty
+ | Null
+ | Variant
+ | Currency
+ | Decimal
+ | Date
+ | BSTR
+ | LPSTR
+ | LPWSTR
+ | IUnknown
+ | IDispatch
+ | SafeArray
+ | Error
+ | HRESULT
+ | CArray
+ | UserDefined
+ | Record
+ | FileTime
+ | Blob
+ | Stream
+ | Storage
+ | StreamedObject
+ | StoredObject
+ | BlobObject
+ | CF
+ | CLSID
+ | Void
+ | Bool
+ | Int8
+ | Int16
+ | Int32
+ | Int64
+ | Single
+ | Double
+ | UInt8
+ | UInt16
+ | UInt32
+ | UInt64
+ | PTR
+ | Array of ILNativeVariant
+ | Vector of ILNativeVariant
+ | Byref of ILNativeVariant
+ | Int
+ | UInt
+
+/// Native Types, for marshalling to the native C interface.
+/// These are taken directly from the ILASM syntax, see ECMA Spec (Partition II, 7.4).
+
+[<RequireQualifiedAccess; StructuralEquality; StructuralComparison>]
+type ILNativeType =
+ | Empty
+ | Custom of Guid * string * string * byte[] (* guid,nativeTypeName,custMarshallerName,cookieString *)