Last active
July 15, 2021 04:49
-
-
Save Kakadu/5b2a4cb0a7ed3e641997c76ecef12771 to your computer and use it in GitHub Desktop.
Piece of code for https://meta.stackexchange.com/questions/72877
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ exiftool ./FSharp.Core.dll | |
ExifTool Version Number : 12.16 | |
File Name : FSharp.Core.dll | |
Directory : . | |
File Size : 4.5 MiB | |
File Modification Date/Time : 2021:07:14 22:36:15+03:00 | |
File Access Date/Time : 2021:07:14 22:37:15+03:00 | |
File Inode Change Date/Time : 2021:07:14 22:36:15+03:00 | |
File Permissions : rw-r--r-- | |
Warning : Invalid file size in DOS header | |
File Type : Win32 DLL | |
File Type Extension : dll | |
MIME Type : application/octet-stream | |
Machine Type : Unknown (0xfd1d) | |
Time Stamp : 2067:09:11 14:55:44+03:00 | |
Image File Characteristics : Executable, Large address aware, DLL | |
PE Type : PE32+ | |
Linker Version : 11.0 | |
Code Size : 0 | |
Initialized Data Size : 0 | |
Uninitialized Data Size : 0 | |
Entry Point : 0x0000 | |
OS Version : 5.2 | |
Image Version : 0.0 | |
Subsystem Version : 5.2 | |
Subsystem : Windows command line | |
File Version Number : 5.0.221.26207 | |
Product Version Number : 5.0.0.21262 | |
File Flags Mask : 0x003f | |
File Flags : (none) | |
File OS : Win32 | |
Object File Type : Executable application | |
File Subtype : 0 | |
Language Code : Neutral | |
Character Set : Unicode | |
Assembly Version : 5.0.0.0 | |
File Version : 5.0.221.26207 | |
Product Version : 5.0.2-beta.21262.7+1b23bbeda88ea3cb9be9af777f4c99fa8663df81 | |
Original File Name : FSharp.Core.dll | |
File Description : FSharp.Core | |
Product Name : FSharp.Core | |
Company Name : Microsoft Corporation | |
Legal Copyright : © Microsoft Corporation. All rights reserved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Hack1 | |
let app f x = f x | |
let rec hack n : int -> int = | |
if n>0 then hack (n-1) | |
else (fun x -> x) | |
[<EntryPoint>] | |
let main _ : int = | |
System.Console.WriteLine(hack 10 42) | |
0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"runtimeTarget": { | |
"name": ".NETCoreApp,Version=v5.0", | |
"signature": "" | |
}, | |
"compilationOptions": {}, | |
"targets": { | |
".NETCoreApp,Version=v5.0": { | |
"main/1.0.0": { | |
"runtime": { | |
"FSharp.Core.dll": {} | |
} | |
} | |
} | |
}, | |
"libraries": { | |
"myApp/1.0.0": { | |
"type": "project", | |
"serviceable": false, | |
"sha512": "" | |
} | |
} | |
}% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.assembly extern mscorlib {} | |
// .assembly extern FSharp.Core | |
// { | |
// .ver 5:0:0:0 | |
// // .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: | |
// } | |
.assembly MyTestAssembly {} | |
.class public auto ansi abstract sealed Hack1 | |
extends [System.Runtime]System.Object | |
{ | |
.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( | |
01 00 07 00 00 00 00 00 | |
) | |
// Nested Types | |
.class nested assembly auto ansi sealed serializable beforefieldinit hack@8 | |
extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<valuetype [System.Private.CoreLib]System.Int32, valuetype [System.Private.CoreLib]System.Int32> | |
{ | |
// Fields | |
.field assembly static initonly class Hack1/hack@8 @_instance | |
// Methods | |
.method assembly specialname rtspecialname | |
instance void .ctor () cil managed | |
{ | |
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( | |
01 00 00 00 | |
) | |
.custom instance void [System.Private.CoreLib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( | |
01 00 00 00 | |
) | |
// Method begins at RVA 0x2088 | |
// Code size 7 (0x7) | |
.maxstack 8 | |
IL_0000: ldarg.0 | |
IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<valuetype [System.Private.CoreLib]System.Int32, valuetype [System.Private.CoreLib]System.Int32>::.ctor() | |
IL_0006: ret | |
} // end of method hack@8::.ctor | |
.method public strict virtual | |
instance valuetype [System.Private.CoreLib]System.Int32 Invoke ( | |
valuetype [System.Private.CoreLib]System.Int32 x | |
) cil managed | |
{ | |
// Method begins at RVA 0x2090 | |
// Code size 2 (0x2) | |
.maxstack 8 | |
IL_0000: ldarg.1 | |
IL_0001: ret | |
} // end of method hack@8::Invoke | |
.method private specialname rtspecialname static | |
void .cctor () cil managed | |
{ | |
// Method begins at RVA 0x2094 | |
// Code size 11 (0xb) | |
.maxstack 10 | |
IL_0000: newobj instance void Hack1/hack@8::.ctor() | |
IL_0005: stsfld class Hack1/hack@8 Hack1/hack@8::@_instance | |
IL_000a: ret | |
} // end of method hack@8::.cctor | |
} // end of class hack@8 | |
// Methods | |
.method public static | |
!!b app<a, b> ( | |
class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<!!a, !!b> f, | |
!!a x | |
) cil managed | |
{ | |
.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( | |
01 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 | |
) | |
// Method begins at RVA 0x2050 | |
// Code size 10 (0xa) | |
.maxstack 8 | |
IL_0000: ldarg.0 | |
IL_0001: ldarg.1 | |
IL_0002: tail. | |
IL_0004: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<!!a, !!b>::Invoke(!0) | |
IL_0009: ret | |
} // end of method Hack1::app | |
.method public static | |
class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<valuetype [System.Private.CoreLib]System.Int32, valuetype [System.Private.CoreLib]System.Int32> hack ( | |
valuetype [System.Private.CoreLib]System.Int32 n | |
) cil managed | |
{ | |
// Method begins at RVA 0x205c | |
// Code size 17 (0x11) | |
.maxstack 8 | |
// loop start | |
IL_0000: ldarg.0 | |
IL_0001: ldc.i4.0 | |
IL_0002: ble.s IL_000b | |
IL_0004: ldarg.0 | |
IL_0005: ldc.i4.1 | |
IL_0006: sub | |
IL_0007: starg.s n | |
IL_0009: br.s IL_0000 | |
// end loop | |
IL_000b: ldsfld class Hack1/hack@8 Hack1/hack@8::@_instance | |
IL_0010: ret | |
} // end of method Hack1::hack | |
.method public static | |
valuetype [System.Private.CoreLib]System.Int32 main ( | |
class [System.Private.CoreLib]System.String[] _arg1 | |
) cil managed | |
{ | |
.custom instance void [FSharp.Core]Microsoft.FSharp.Core.EntryPointAttribute::.ctor() = ( | |
01 00 00 00 | |
) | |
// Method begins at RVA 0x2070 | |
// Code size 21 (0x15) | |
.maxstack 8 | |
IL_0000: ldc.i4.s 10 | |
IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<valuetype [System.Private.CoreLib]System.Int32, valuetype [System.Private.CoreLib]System.Int32> Hack1::hack(valuetype [System.Private.CoreLib]System.Int32) | |
IL_0007: ldc.i4.s 42 | |
IL_0009: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<valuetype [System.Private.CoreLib]System.Int32, valuetype [System.Private.CoreLib]System.Int32>::Invoke(!0) | |
IL_000e: call void [System.Console]System.Console::WriteLine(int32) | |
IL_0013: ldc.i4.0 | |
IL_0014: ret | |
} // end of method Hack1::main | |
} // end of class Hack1 | |
.method static void main() | |
{ | |
.entrypoint | |
.maxstack 8 | |
IL_0000: ldc.i4.s 10 | |
IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<valuetype [System.Private.CoreLib]System.Int32, valuetype [System.Private.CoreLib]System.Int32> Hack1::hack(valuetype [System.Private.CoreLib]System.Int32) | |
// IL_0007: ldc.i4.s 42 | |
// IL_0009: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<valuetype [System.Private.CoreLib]System.Int32, valuetype [System.Private.CoreLib]System.Int32>::Invoke(!0) | |
IL_000e: call void [System.Console]System.Console::WriteLine(int32) | |
IL_0013: ldc.i4.0 | |
IL_0014: ret | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"runtimeOptions": { | |
"framework": { | |
"name": "Microsoft.NETCore.App", | |
"version": "5.0.7" | |
}, | |
"additionalProbingPaths": [ | |
"/home/kakadu/.dotnet/store/|arch|/|tfm|", | |
"/home/kakadu/.nuget/packages", | |
"." | |
] | |
} | |
}% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment