alt-ergo
alt-ergo copied to clipboard
Simplify type variables
This PR changes three thing:
- We do not need a value field in the type variable of Alt-Ergo. These values were only used by the unification of the types in the legacy typechecker.
- Add a proper type of the substitution of types in
Ty. I add two different functions in the new moduleSubstto update a substitution. The functionSubst.updateupdates a substitution without checking if it is compatible with a previous bind in the map. The functionSubst.try_bindupdates a substitution too but raisesTypeClashif a previous bind in the map is incompatible with the new value. - Use directly type variables from Dolmen. Notice that I didn't remove some caches in
Translatefor type variables but I think we can simplify this part too. I prefer doing it in a separate PR.