This file contains 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
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | |
64 38 3A 61 6E 6E 6F 75 6E 63 65 33 37 3A 68 74 | |
74 70 3A 2F 2F 65 68 74 72 61 63 6B 65 72 2E 6F | |
72 67 2F 31 32 31 34 37 37 38 2F 61 6E 6E 6F 75 | |
6E 63 65 37 3A 63 6F 6D 6D 65 6E 74 37 33 3A 20 | |
3A 3A 20 54 6F 72 72 65 6E 74 20 64 6F 77 6E 6C | |
6F 61 64 65 64 20 66 72 6F 6D 20 45 2D 48 65 6E | |
74 61 69 20 47 61 6C 6C 65 72 69 65 73 20 2D 20 | |
68 74 74 70 73 3A 2F 2F 65 2D 68 65 6E 74 61 69 | |
2E 6F 72 67 2F 20 3A 3A 31 30 3A 63 72 65 61 74 |
This file contains 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
using System.Collections; | |
using System.Collections.Generic; | |
namespace CompilerExercise | |
{ | |
public static class Collections | |
{ | |
public static int IntArrayHash(this int[] array) | |
{ | |
return StructuralComparisons.StructuralEqualityComparer.GetHashCode(array); |
This file contains 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
package ink.sora.ioc | |
import java.io.Closeable | |
import java.lang.IllegalArgumentException | |
import kotlin.random.Random | |
import kotlin.reflect.* | |
import kotlin.reflect.full.declaredMemberProperties | |
import kotlin.reflect.full.hasAnnotation | |
import kotlin.reflect.full.isSubclassOf | |
import kotlin.reflect.full.primaryConstructor |
This file contains 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
/** | |
* The implementation of unification-based type inference algorithm in simply typed lambda calculus with Let-Polymorphism | |
* | |
* The unification-based type inference algorithm is widely used in a huge variety of programming languages, where the most | |
* famous one is the Hindley-Milner Type System (a.k.a Damas-Milner Type System) of the ML-Family which permits the programmer | |
* to omit almost all of the type annotations, the algorithm is based on two concepts: Constraint Set and Unifier. | |
* | |
* A constraint set consist of several constraints, a constraints is basically a type equation, e.g., X = T, where both X and | |
* T are types | |
* A unifier is a set of type substitutions [X -> T1, Y -> T2, ...], it replaces all the type variables in its domain to the |
This file contains 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
type SystemFType = | |
| TVariable of name : string | |
| TArrow of domain : SystemFType * result : SystemFType | |
| TUniversal of binder : string * body : SystemFType | |
override this.ToString() = | |
let rec aux = function | |
| TVariable name -> name | |
| TArrow (domain, result) -> | |
match domain with |
This file contains 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
// ReSharper disable MemberCanBePrivate.Global | |
// ReSharper disable UnusedType.Global | |
// ReSharper disable ClassNeverInstantiated.Global | |
// ReSharper disable ParameterTypeCanBeEnumerable.Local | |
// ReSharper disable ReturnTypeCanBeEnumerable.Local | |
using System.Diagnostics; | |
using System.Text; | |
namespace SystemFSub; |