This commit is contained in:
swrup 2025-11-11 02:07:51 +01:00
parent aa2ff7b2f0
commit 2f3113f55d
11742 changed files with 1223940 additions and 0 deletions

View file

@ -0,0 +1,14 @@
open Ppxlib
let rules =
[
Extension.V3.declare "raise" Extension.Context.expression
Ast_pattern.(pstr nil)
(fun ~ctxt ->
let loc = Expansion_context.Extension.extension_point_loc ctxt in
Location.raise_errorf ~loc "An exception, raise be!")
|> Context_free.Rule.extension;
]
let () = Driver.V2.register_transformation ~rules "raise"
let () = Driver.standalone ()