def mk_typelist(types): """ Parameters types : list of Spec.Type """ t = Spec.TypeList() t.types.extend(types) return t
def mk_type_ntuple(sz): """ Parameters sz : integer """ t = Spec.Type() t.type = Spec.NTUPLE t.ntuple_size = sz return t
def mk_type_list(tp): """ Parameters t : Spec.Type """ t = Spec.Type() t.type = Spec.LIST t.inner_type.CopyFrom(tp) return t
def mk_type_cons(): t = Spec.Type() t.type = Spec.CONS return t
def mk_type_tuple(): t = Spec.Type() t.type = Spec.TUPLE return t
def mk_type_any(): t = Spec.Type() t.type = Spec.ANY return t