From 77544bdfad2af41514ec1435f706fee87ea2969e Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Mon, 7 Feb 2022 15:38:37 +0100 Subject: Added viz.js code --- ppx_hash/ppx_hash.ml | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100755 ppx_hash/ppx_hash.ml (limited to 'ppx_hash/ppx_hash.ml') diff --git a/ppx_hash/ppx_hash.ml b/ppx_hash/ppx_hash.ml deleted file mode 100755 index 59584d5..0000000 --- a/ppx_hash/ppx_hash.ml +++ /dev/null @@ -1,32 +0,0 @@ -open Ppxlib - -(** - - This is a simple ppx which evaluate hash for string at compilation time. - - [%static_hash "deadbeef"] is equivalent to [Hashtbl.hash "deadbeef"] - - the ppx only evaluate strings. -*) - -let name = "static_hash" - -let expand ~loc ~path:_ (value : string) = - let h = Hashtbl.hash value in - Ast_builder.Default.eint ~loc h - -let extension = - Extension.declare - name - Extension.Context.expression - Ast_pattern.(single_expr_payload (estring __)) - expand - - - -let rule = Ppxlib.Context_free.Rule.extension extension - -let () = - Driver.register_transformation - ~rules:[rule] - name -- cgit v1.2.3