▁of ▁the ▁interface ▁type — the ▁exist ential ▁type — are ▁isolated ▁from ▁these ▁choices . ▁ ▁In ▁general ▁it ' s ▁impossible ▁for ▁the ▁type check er ▁to ▁infer ▁which ▁exist ential ▁type ▁a ▁given ▁module ▁belongs ▁to . ▁In ▁the ▁above ▁example ▁int T ▁{ ▁a : ▁int ; ▁f : ▁( int ▁→ ▁int ); ▁} ▁could ▁also ▁have ▁the ▁type ▁ ∃ X ▁{ ▁a : ▁X ; ▁f : ▁( int ▁→ ▁int ); ▁} . ▁The ▁simplest ▁solution ▁is ▁to ▁annot ate ▁every ▁module ▁with ▁its ▁intended ▁type , ▁e . g .: ▁▁ ▁int T ▁= ▁{ ▁a : ▁int ; ▁f : ▁( int ▁→ ▁int ); ▁} ▁as ▁ ∃ X ▁{ ▁a : ▁X ; ▁f : ▁( X ▁→ ▁int ); ▁} ▁ ▁Although ▁abstract ▁data ▁types ▁and ▁modules ▁had ▁been ▁implemented ▁in ▁programming ▁languages ▁for ▁quite ▁some ▁time , ▁it ▁wasn ' t ▁until ▁ 1 9 8 8 ▁that ▁John ▁C . ▁Mitchell ▁and ▁Gordon ▁Plot kin ▁established ▁the ▁formal ▁theory ▁under ▁the ▁s log an : ▁" Abstract ▁[ data ] ▁types ▁have ▁exist ential ▁type ". ▁The ▁theory ▁is ▁a ▁second - order ▁typed ▁lambda ▁calculus ▁similar ▁to ▁System ▁F , ▁but ▁with ▁exist ential ▁instead ▁of ▁universal ▁quant ification . ▁ ▁Grad ual ▁typing ▁▁ ▁Grad ual ▁typing ▁is ▁a ▁type ▁system ▁in ▁which ▁variables ▁may ▁be ▁assigned ▁a ▁type ▁either ▁at ▁compile - time ▁( which ▁is ▁static ▁typing ) ▁or ▁at ▁run - time ▁(