Skip to content

Commit

Permalink
chamelon
Browse files Browse the repository at this point in the history
  • Loading branch information
ccasin committed Nov 14, 2024
1 parent caec0ef commit 94102ee
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions chamelon/compat.jst.ml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,21 @@ let mkTexp_ident ?id:(ident_kind, uu = (Id_value, aliased_many_use))
type nonrec apply_arg = apply_arg

type texp_apply_identifier =
apply_position * Locality.l * Builtin_attributes.zero_alloc_assume option
apply_position
* Locality.l
* Jkind.Sort.t
* Builtin_attributes.zero_alloc_assume option

let mkTexp_apply
?id:(pos, mode, za =
(Default, Locality.disallow_right Locality.legacy, None)) (exp, args) =
?id:(pos, mode, sort, za =
( Default,
Locality.disallow_right Locality.legacy,
Jkind.Sort.value,
None )) (exp, args) =
let args =
List.map (fun (label, x) -> (Typetexp.transl_label label None, x)) args
in
Texp_apply (exp, args, pos, mode, za)
Texp_apply (exp, args, pos, mode, sort, za)

type texp_tuple_identifier = string option list * alloc_mode

Expand Down Expand Up @@ -218,9 +224,9 @@ let view_texp (e : expression_desc) =
match e with
| Texp_ident (path, longident, vd, ident_kind, uu) ->
Texp_ident (path, longident, vd, (ident_kind, uu))
| Texp_apply (exp, args, pos, mode, za) ->
| Texp_apply (exp, args, pos, mode, sort, za) ->
let args = List.map (fun (label, x) -> (untype_label label, x)) args in
Texp_apply (exp, args, (pos, mode, za))
Texp_apply (exp, args, (pos, mode, sort, za))
| Texp_construct (name, desc, args, mode) ->
Texp_construct (name, desc, args, mode)
| Texp_tuple (args, mode) ->
Expand Down

0 comments on commit 94102ee

Please sign in to comment.