76: # 300 "./lpsrc/flx_types.ipk" 77: (** type of a type *) 78: and typecode_t = 79: [ 80: | `AST_void of range_srcref (** void type *) 81: | `AST_name of range_srcref * string * typecode_t list 82: | `AST_case_tag of range_srcref * int 83: | `AST_typed_case of range_srcref * int * typecode_t 84: | `AST_lookup of range_srcref * (expr_t * string * typecode_t list) 85: | `AST_the of range_srcref * qualified_name_t 86: | `AST_index of range_srcref * string * int 87: | `AST_callback of range_srcref * qualified_name_t 88: | `AST_suffix of range_srcref * (qualified_name_t * typecode_t) 89: | `TYP_tuple of typecode_t list (** product type *) 90: | `TYP_unitsum of int (** sum of units *) 91: | `TYP_sum of typecode_t list (** numbered sum type *) 92: | `TYP_intersect of typecode_t list (** intersection type *) 93: | `TYP_record of (string * typecode_t) list (** anon product *) 94: | `TYP_variant of (string * typecode_t) list (** anon sum *) 95: | `TYP_function of typecode_t * typecode_t (** function type *) 96: | `TYP_cfunction of typecode_t * typecode_t (** C function type *) 97: | `TYP_pointer of typecode_t (** pointer type *) 98: | `TYP_array of typecode_t * typecode_t (** array type base ^ index *) 99: | `TYP_as of typecode_t * string (** fixpoint *) 100: | `TYP_typeof of expr_t (** typeof *) 101: | `TYP_var of int (** unknown type *) 102: | `TYP_none (** unspecified *) 103: | `TYP_ellipsis (** ... for varargs *) 104: | `TYP_lvalue of typecode_t (** ... lvalue annotation *) 105: | `TYP_isin of typecode_t * typecode_t (** typeset membership *) 106: 107: (* sets of types *) 108: | `TYP_typeset of typecode_t list (** discrete set of types *) 109: | `TYP_setunion of typecode_t list (** union of typesets *) 110: | `TYP_setintersection of typecode_t list (** intersection of typesets *) 111: 112: (* dualizer *) 113: | `TYP_dual of typecode_t (** dual *) 114: 115: (* destructors *) 116: | `TYP_dom of typecode_t (** function domain extractor *) 117: | `TYP_cod of typecode_t (** function codomain extractor *) 118: | `TYP_proj of int * typecode_t (** tuple projection *) 119: | `TYP_case_arg of int * typecode_t (** argument of n'th variant *) 120: 121: | `TYP_apply of typecode_t * typecode_t (** type function application *) 122: | `TYP_typefun of parameter_t list * typecode_t * typecode_t 123: (** type lambda *) 124: | `TYP_type (** meta type of a type *) 125: | `TYP_type_tuple of typecode_t list (** meta type product *) 126: 127: | `TYP_type_match of typecode_t * (tpattern_t * typecode_t) list 128: 129: | `TYP_glr_attr_type of qualified_name_t 130: ] 131: 132: and tpattern_t = 133: [ 134: | `TPAT_function of tpattern_t * tpattern_t 135: | `TPAT_sum of tpattern_t list 136: | `TPAT_tuple of tpattern_t list 137: | `TPAT_pointer of tpattern_t 138: | `TPAT_void 139: | `TPAT_var of string 140: | `TPAT_name of string * tpattern_t list 141: | `TPAT_as of tpattern_t * string 142: | `TPAT_any 143: | `TPAT_unitsum of int 144: | `TPAT_type_tuple of tpattern_t list 145: ] 146: 147: and vs_list_t = (id_t * tpattern_t) list 148: and ivs_list_t = (id_t * int * tpattern_t) list 149: