Skip to content

Commit a83190e

Browse files
committed
Merge pull request #261 from dungpa/docs
Proofread design notes
2 parents 19fc3ec + 39dba72 commit a83190e

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

docs/content/corelib.fsx

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Binding redirects for your application
2222
The FSharp.Compiler.Service.dll component depends on FSharp.Core 4.3.0.0. Normally your application will target
2323
a later version of FSharp.Core, and you will need a [binding redirect](http://msdn.microsoft.com/en-us/library/7wd6ex19(v=vs.110).aspx) to ensure
2424
that FSharp.Core 4.3.0.0 forwards to which the final version of FSharp.Core.dll your application uses.
25-
Binding redirect files are normally generated automatically by build tooling. If not, you can use one like this
25+
Binding redirect files are normally generated automatically by build tools. If not, you can use one like this
2626
(if your tool is called ``HostedCompiler.exe``, the binding redirect file is called ``HostedCompiler.exe.config``)
2727
2828
<?xml version="1.0" encoding="utf-8" ?>
@@ -47,10 +47,18 @@ assemblies in the command line arguments (different to the FSharp.Core and a .NE
4747
To target a specific FSharp.Core and/or .NET Framework assemblies, use the ``--noframework`` argument
4848
and the appropriate command-line arguments:
4949
50+
[<Literal>]
51+
let fsharpCorePath =
52+
@"C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.1.0\FSharp.Core.dll"
5053
let errors2, exitCode2 =
51-
scs.Compile([| "fsc.exe"; "--noframework"; "-r"; @"C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.1.0\FSharp.Core.dll"; "-r"; @"C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll"; "-o"; fn3; "-a"; fn2 |])
52-
53-
You will need to determine the location of these assemblies. The easiest ways to locate these DLLs in a cross-platform way and
54+
scs.Compile(
55+
[| "fsc.exe"; "--noframework";
56+
"-r"; fsharpCorePath;
57+
"-r"; @"C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll";
58+
"-o"; fn3;
59+
"-a"; fn2 |])
60+
61+
You will need to determine the location of these assemblies. The easiest way to locate these DLLs in a cross-platform way and
5462
convert them to command-line arguments is to [crack an F# project file](http://fsharp.github.io/FSharp.Compiler.Service/project.html).
5563
Alternatively you can compute SDK paths yourself, and some helpers to do this are in [the tests for FSharp.Compiler.Service.dll](https://github.com/fsharp/FSharp.Compiler.Service/blob/8a943dd3b545648690cb3bed652a469bdb6dd869/tests/service/Common.fs#L54).
5664
@@ -66,8 +74,8 @@ arguments are always making an explicit reference, then you should _not_ include
6674
If you do _not_ explicitly reference an FSharp.Core.dll from an SDK location, then an implicit reference will be made
6775
to which ever version of FSharp.Core.dll your tool is running. This means your tool will almost certainly implicitly reference the FSharp.Core.dll
6876
that is part of your application. In this case, you may either get an error that FSharp.Core.optdata and FSharp.Core.sigdata are not
69-
found alongside FSharp.Core.dll. If you want to implicitly reference the FSharp.Core.dll you are including in your application,
70-
then also add FSharp.Core.sigdata and FSharp.Core.optdata as two additional files to your application. When using CompileToDynamicAssembly, this problem
77+
found alongside FSharp.Core.dll. **If you want to implicitly reference the FSharp.Core.dll you are including in your application,
78+
then also add FSharp.Core.sigdata and FSharp.Core.optdata as two additional files to your application**. When using ``CompileToDynamicAssembly``, this problem
7179
can also manifest itself as [a stack overflow during assembly resolution](https://github.com/fsharp/FSharp.Compiler.Service/issues/258).
7280
7381
Tools that dynamically compile and execute code (e.g. a ``HostedExecution.exe``) often make an implicit
@@ -76,10 +84,10 @@ reference to FSharp.Core.dll, which means they normally also include FSharp.Core
7684
Summary
7785
-------
7886
79-
In this design note we've discussed three things
87+
In this design note we have discussed three things:
8088
81-
- which FSharp.Core.dll is used to run your compilation tool
82-
- how to configure binding redirects for the FSharp.Core.dll used to run your compilation tool
83-
- which FSharp.Core.dll and/or framework assemblies are referenced during the checking and compilations performed by your tool.
89+
- which FSharp.Core.dll is used to run your compilation tools
90+
- how to configure binding redirects for the FSharp.Core.dll used to run your compilation tools
91+
- which FSharp.Core.dll and/or framework assemblies are referenced during the checking and compilations performed by your tools.
8492
8593
*)

docs/tools/templates/ja/template.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
<li><a href="@Root/filesystem.html">ファイルシステムの仮想化</a></li>
6868

6969
<li class="nav-header">リファレンス</li>
70-
<li><a href="@Root/../reference/index.html">API リファレンス</a> (暫定版)</li>
70+
<li><a href="@Root/../reference/index.html">API リファレンス</a></li>
7171
</ul>
7272
</div>
7373
</div>

docs/tools/templates/template.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
<li><a href="@Root/corelib.html">Notes on FSharp.Core.dll</a></li>
7474

7575
<li class="nav-header">Documentation</li>
76-
<li><a href="@Root/reference/index.html">API Reference</a> (Preliminary)
76+
<li><a href="@Root/reference/index.html">API Reference</a>
7777
</li>
7878
</ul>
7979
</div>

0 commit comments

Comments
 (0)