Skip to content

Commit

Permalink
refactor(Modifier): use the new API internally
Browse files Browse the repository at this point in the history
  • Loading branch information
favonia committed Sep 21, 2023
1 parent e94564b commit e1c84aa
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Modifier.ml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ struct
| Shadow : {context : context option; path : Trie.bwd_path; former : data * tag; latter : data * tag} -> (data * tag) Effect.t
| Hook : {context : context option; prefix : Trie.bwd_path; hook : hook; input : (data, tag) Trie.t} -> (data, tag) Trie.t Effect.t

let () =
Printexc.register_printer @@
function
| Effect.Unhandled (NotFound _ | Shadow _ | Hook _) -> Some "Unhandled yuujinchou effect; use Yuujinchou.Modifier.run"
| _ -> None

module type Perform = Perform with module Param := Param

module Perform : Perform =
Expand Down Expand Up @@ -90,4 +84,6 @@ struct
| Effect.Unhandled (Shadow {context; path; former; latter}) -> f (`Shadow (context, path, former, latter))
| Effect.Unhandled (Hook {context; prefix; hook; input}) -> f (`Hook (context, prefix, hook, input))
| _ -> None

let () = register_printer @@ fun _ -> Some "Unhandled yuujinchou effect; use Yuujinchou.Modifier.run"
end

0 comments on commit e1c84aa

Please sign in to comment.