aboutsummaryrefslogtreecommitdiff
path: root/ppx_hash
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2022-02-07 15:38:37 +0100
committerSébastien Dailly <sebastien@dailly.me>2022-02-07 16:01:12 +0100
commit77544bdfad2af41514ec1435f706fee87ea2969e (patch)
tree4de23870e08711da25ff92e9670370fc0a74e459 /ppx_hash
parentad526111f0dd619ae9e0e98ef2253146b58a068f (diff)
Added viz.js code
Diffstat (limited to 'ppx_hash')
-rwxr-xr-xppx_hash/dune6
-rwxr-xr-xppx_hash/ppx_hash.ml32
2 files changed, 0 insertions, 38 deletions
diff --git a/ppx_hash/dune b/ppx_hash/dune
deleted file mode 100755
index 7cb4bc8..0000000
--- a/ppx_hash/dune
+++ /dev/null
@@ -1,6 +0,0 @@
-(library
- (name ppx_hash)
- (kind ppx_deriver)
- (libraries ppxlib )
- (preprocess (pps ppxlib.metaquot))
- )
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