Simple Type Inference for Structural Polymorphism. Jacques Garrigue Type Refinements Seminar. Motivation. HM (X) used to explain structural polymorphism Assume subtyping absent HM(X) is not a simple extension to previous algorithms Constraints occur in all types
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Type Refinements Seminar
| K, :: (C,9.R)
| 8.K .
( is admissible between K and K’)
If for all ::(C,9.R) 2 K, () is ’
K,K0` : K Dom ()½ B
K;,x:8 B.Ko. ` x:()
K;` fun x ! e : !’
K;` e1:!’ K;` e2:
K;` e1 e2 : ’
K;` e1 : K;, x:` e2 :
K;` let x = e1 in e2 :
K; ` e : B = FVK() \ FVK ()
K|B; ` e : 8 B.K|B.
K;` e : B = (FV () [ FV(KB) ) FV ()
9 B.K;` e : 8 B.KB.
KBµ K containing all kinds related to B
Generalizes over tyvars not “relevant”
solving K Æ1 = 2 does not give us more information about