Skip to content

Commit eb09af3

Browse files
committed
Fix definition
1 parent e93a458 commit eb09af3

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

dune-project

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
(description "PPX syntax for untyped effects in OCaml 5.0")
1414
(documentation "https://craigfe.github.io/ppx-effects")
1515
(depends
16-
(ocaml-variants (= 4.12.0+domains))
17-
(ppxlib (and (>= 0.12.0)))))
16+
(ocaml-variants (>= 5.0))
17+
(ppxlib (and (>= 0.12.0)))))

ppx_effects.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ doc: "https://craigfe.github.io/ppx-effects"
1010
bug-reports: "https://github.com/CraigFe/ppx_effects/issues"
1111
depends: [
1212
"dune" {>= "2.9"}
13-
"ocaml-variants" {= "4.12.0+domains"}
13+
"ocaml-variants" {>= "5.0"}
1414
"ppxlib" {>= "0.12.0"}
1515
"odoc" {with-doc}
1616
]

src/ppx_effects.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ module Cases = struct
8080
ppat_desc =
8181
Ppat_construct
8282
( effect,
83-
Some ([], { ppat_desc = Ppat_var { txt = "k"; _ }; _ }) );
83+
Some { ppat_desc = Ppat_var { txt = "k"; _ }; _ } );
8484
_;
8585
} ->
8686
raise_errorf ~loc "%s.@,Hint: did you mean %a?" error_prefix
@@ -284,21 +284,21 @@ let impl : structure -> structure =
284284
let effect_decl_of_exn_decl ~loc (exn : type_exception) : type_extension =
285285
let name = exn.ptyexn_constructor.pext_name in
286286
let eff_type = Located.lident ~loc "Stdlib.Effect.t" in
287-
let constrs, v, args =
287+
let constrs, args =
288288
match exn.ptyexn_constructor.pext_kind with
289-
| Pext_decl (constrs, v, body) ->
289+
| Pext_decl (constrs, body) ->
290290
let body =
291291
Option.map (fun typ -> ptyp_constr ~loc eff_type [ typ ]) body
292292
in
293-
(constrs, body, v)
293+
(constrs, body)
294294
| Pext_rebind _ ->
295295
raise_errorf ~loc "cannot process effect defined as an alias of %a."
296296
pp_quoted name.txt
297297
in
298298
let params = [ (ptyp_any ~loc, (NoVariance, NoInjectivity)) ] in
299299
type_extension ~loc ~path:eff_type ~params
300300
~constructors:
301-
[ extension_constructor ~loc ~name ~kind:(Pext_decl (constrs, args, v)) ]
301+
[ extension_constructor ~loc ~name ~kind:(Pext_decl (constrs, args)) ]
302302
~private_:Public
303303

304304
let str_effect_decl =

0 commit comments

Comments
 (0)