Skip to content

Commit fecbc15

Browse files
committed
README
1 parent 0fc195f commit fecbc15

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,24 @@
33
- `algo_w` - Algorithm W extended with "Extensible Records with Scoped Labels"
44
and Multi Parameter Typeclasses.
55

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][].
724

825
# Development
926

@@ -22,3 +39,8 @@ make test
2239
- https://github.com/tomprimozic/type-systems
2340
- https://gitlab.inria.fr/fpottier/inferno/
2441
- 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

0 commit comments

Comments
 (0)