type ty_id = string type ty = TVar of string | Arr of ty * ty | And of ty * ty | Or of ty * ty | Bot type gam = (ty_id * ty) list