Skip to content
Snippets Groups Projects

Reworking parametric types in CameLIGO and JsLIGO (concrete syntax, CST, pretty-printing)

Merged Christian Rinderknecht requested to merge rinderknecht@parametric_types into dev
4 files
+ 35
19
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -440,6 +440,12 @@ and ty_expr : CST.type_expr AST.ty_expr_ -> CST.type_expr =
so we'll just drop the quantifiers here *)
| T_abstraction Ligo_prim.Abstraction.{ ty_binder = _; kind = _; type_ }
| T_for_all Ligo_prim.Abstraction.{ ty_binder = _; kind = _; type_ } -> type_
| T_for_alls Ligo_prim.Abstractions.{ ty_binders = _; kind = _; type_ } -> type_
| T_for_alls Ligo_prim.Abstractions.{ ty_binders = []; kind = _; type_ } -> type_
| T_for_alls Ligo_prim.Abstractions.{ ty_binders; kind = _; type_ } ->
let ty_binders =
List.map ~f:(fun v -> w @@ (None, decompile_tvar_into_var v)) ty_binders
in
let ty_binders : CST.type_var Utils.nseq = List.Ne.of_list ty_binders in
T_ForAll (w @@ (ty_binders, ghost_dot, type_))
| T_module_app _ | T_constant _ ->
Helpers.failwith_not_initial_node_decompiler @@ `Ty_expr te
Loading