Skip to content
  • Pietro Abate's avatar
    New syntax for parametric types · f1235de1
    Pietro Abate authored
    now we can write types as
    type t( 'a) = <a>'a
    
    and patterns can contain type instantiations
    let f = fun (t('a) -> [ t('a)* ]) x -> [ x ];;
    let id = fun (t(Int) -> [ t(Int)* ]) x -> [ x ];;
    
    Note: parametric types must be written as "IDENT(" without space.
    f1235de1