package OCanren-ppx
Implementation of miniKanren relational (logic) EDSL: PPX extensions
Install
Dune Dependency
Authors
Maintainers
Sources
0.3.0.tar.gz
sha256=eaf9624bbdbae8050eb43a48c0e79e97160b83b6f65a543ee1beca4c9f4ff4b2
sha512=e55dd7a3026b1dedcd37f55181059dfa44ad6976d241a1199246ee3c1684dcfdf1ae0c1da32165b5b2eb5748cfc57c906a0f0ebab56d03035a5bb87187a63cf7
doc/src/ppx_distrib/ppx_distrib.ml.html
Source file ppx_distrib.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
(* * OCanren PPX * Copyright (C) 2016-2021 * Dmitrii Kosarev aka Kakadu * St.Petersburg State University, JetBrains Research *) open Base open Ppxlib let name = "distrib" let () = let extensions = let pattern = let open Ast_pattern in pstr (pstr_type nonrecursive ((type_declaration_attributes __ @@ type_declaration ~name:(string "t") ~params:__ ~cstrs:nil ~kind:__ ~private_:__ ~manifest:__) ^:: nil) ^:: pstr_type __ (type_declaration ~name:(string "ground") ~params:__ ~cstrs:nil ~kind:__ ~private_:__ ~manifest:(some __) ^:: nil) ^:: __) in [ Extension.declare name Extension.Context.Structure_item pattern (fun ~loc ~path attributes1 params1 kind1 private1 manifest1 rec_2 params2 kind2 private2 manifest2 other_decls -> let open Ppxlib.Ast_builder.Default in let base_tdecl = let td = type_declaration ~loc ~name:(Located.mk ~loc "t") ~params:params1 ~cstrs:[] ~private_:private1 ~kind:kind1 ~manifest:manifest1 in { td with ptype_attributes = attributes1 } in let items = List.concat [ Ppx_distrib_expander.process_main ~loc base_tdecl ( rec_2 , type_declaration ~loc ~params:params2 ~cstrs:[] ~name:(Located.mk ~loc "ground") ~kind:kind2 ~private_:private2 ~manifest:(Some manifest2) ) ; Ppx_distrib_expander.process_composable other_decls ] in pstr_include ~loc (include_infos ~loc (pmod_structure ~loc items))) ] in Ppxlib.Driver.register_transformation ~extensions name ;;
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>