File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change 3
3
- ` algo_w ` - Algorithm W extended with "Extensible Records with Scoped Labels"
4
4
and Multi Parameter Typeclasses.
5
5
6
- - ` hmx ` - HM(X) with X being =
6
+ This follows closely [ tomprimozic/type-systems] and then [ THIH] [ ] (Typing
7
+ Haskell in Haskell).
8
+
9
+ - ` hmx ` - [ HM(X)] [ ] style implementation of Hindley Minler type inference.
10
+
11
+ The main idea is to introduce constraint language and split the algo into two
12
+ phases — first generate constraints from expression terms, then solve those
13
+ constraints.
14
+
15
+ This implementation also does elaboration, the ` infer ` function has the
16
+ following signature:
17
+ ```
18
+ val infer : env:Env.t -> expr -> (expr, Error.t) result
19
+ ```
20
+ That means that ` infer ` returns return not the type of the expression but an
21
+ elaborated expression (an original expression annotated with types).
22
+
23
+ The elaboration mechanism is shamelessly stolen from [ inferno] [ ] .
7
24
8
25
# Development
9
26
@@ -22,3 +39,8 @@ make test
22
39
- https://github.com/tomprimozic/type-systems
23
40
- https://gitlab.inria.fr/fpottier/inferno/
24
41
- https://github.com/naominitel/hmx
42
+
43
+ [ HM(X) ] : https://www.cs.tufts.edu/~nr/cs257/archive/martin-odersky/hmx.pdf
44
+ [ inferno ] : https://gitlab.inria.fr/fpottier/inferno/
45
+ [ THIH ] : https://web.cecs.pdx.edu/~mpj/thih/thih.pdf
46
+ [ tomprimozic/type-systems ] : https://github.com/tomprimozic/type-systems
You can’t perform that action at this time.
0 commit comments