Skip to content
0:00 / 0:00

#mlsub#subtyping#typeinference

Polymorphism, subtyping and type inference in MLsub -- Stephen Dolan - Alan Mycroft

POPL PARIS 2017

106 subscribers • 2 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Stephen Dolan

Advanced. Deep dive for people who know the field.

815 views9 years ago2 recommendations

Programming languagesComputer scienceLanguage design and type systemsCompilers and interpretersComputation and complexity

Stephen Dolan presents MLsub, a system that merges subtyping with Hindley-Milner type inference.

Polymorphism, subtyping and type inference in MLsub -- Stephen Dolan - Alan Mycroft

Why it's here

2 people recommend this

What people say. Recommended for its approach to combining subtyping and type inference in functional languages.

u/AshleyYakeleyin r/haskell • Recommends

On “Lattice and calculation of Least Upper Bounds”

Slightly off-topic, but if you're looking at lattices of types, are you familiar with Stephen Dolan's work adding subtyping to Hindley-Milner? Rough idea: given any two types `a` and `b`, rather than consulting the type hierarchy, we simply say that their meet and join are `a & b` and `a | b`. For example: select p v d = if p v then v else d Hindley-Milner would type this as select :: (a -> Bool) -> a -> a -> a But Dolan gives a more general type: select :: (a -> Bool) -> a -> b -> a | b Note that `|` is not the same as `Either`, rather, it means "an `a` or a `b`, but I'm not telling you which". But if your subtype hierarchy happens to have `a ≤ c` and `b ≤ c`, then you hav…

u/gelisamin r/haskell • Recommends

On “Why has row polymorphism not made it into Haskell?”

> Does anyone know if there are any implementations anywhere Yes, the type-checker used in the presentation is available online and on github. > any research into how they interact with type classes? Since the research is fairly new (there's also a POPL 2017 presentation), is presented using an OCaml-like language, and is implemented in OCaml, I'd guess not, at least not yet. What kind of extra difficulties are you worrying about, though? Isn't type-inference on an expression of type `C a => b` practically the same as if it had type `C a -> b` instead? Plus some extra work once a concrete `a` has been picked and instance search discovers new constraints, but that only occurs after `a`…