ocaml GADT:为什么"键入a".需要?

Pie*_* G. 3 ocaml gadt locally-abstract-type

ocaml手册第 7.20节的GADT基本示例中,'type a'的含义是什么??为什么宣称"eval:一个术语 - > a"是不够的?

type _ term =
          | Int : int -> int term
          | Add : (int -> int -> int) term
          | App : ('b -> 'a) term * 'b term -> 'a term

        let rec eval : type a. a term -> a = function
          | Int n    -> n                 (* a = int *)
          | Add      -> (fun x y -> x+y)  (* a = int -> int -> int *)
          | App(f,x) -> (eval f) (eval x)
Run Code Online (Sandbox Code Playgroud)

obj*_*gic 5

Jacque 在ML'2011研讨会上的幻灯片有一个很好的介绍.使用本地抽象类型的语法来引入通用表达式范围变量的想法.