summaryrefslogtreecommitdiff
path: root/testsuite/tests/effects/test1.ml
blob: 5d05359f8aea0f84c26259ba1318384d1129cbbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
(* TEST
 *)

open Effect
open Effect.Deep

type _ t += E : unit t

let () =
  Printf.printf "%d\n%!" @@
    try_with (fun x -> x) 10
    { effc = (fun (type a) (e : a t) ->
        match e with
        | E -> Some (fun k -> 11)
        | e -> None) }