package OCanren-ppx
Implementation of miniKanren relational (logic) EDSL: PPX extensions
Install
Dune Dependency
Authors
Maintainers
Sources
OCanren-ppx-0.2.0.tbz
sha256=77dd4b9d2b41f908ee4871612e78f455f9f0200a8c70321fcc82ebb53c86b4f0
sha512=c5dab91f59060f5dd5aecef5665e9235d8317cf071603070b0eef84ba6dc3a6ac027a8cf8aa37262109edb309b83c05f355a53c6718e43438164740c6b8715d4
doc/src/ppx_repr/ppx_repr.ml.html
Source file ppx_repr.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
(* * OCanren. PPX suntax extensions. * Copyright (C) 2015-2020 * Dmitri Boulytchev, Dmitry Kosarev, Alexey Syomin, Evgeny Moiseenko * St.Petersburg State University, JetBrains Research * * This software is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License version 2, as published by the Free Software Foundation. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * See the GNU Library General Public License version 2 for more details * (enclosed in the file COPYING). *) open Ppxlib let string_of_expression e = Format.set_margin 1000; Format.set_max_indent 2000; let ans = Format.asprintf "%a" Pprintast.expression e in ans let mapper = object inherit Ast_traverse.map as super method! expression e = match e with | { pexp_desc=Pexp_construct ({txt=Lident "REPR";_}, Some e); _} as expr -> let text = string_of_expression e in { expr with pexp_desc = Pexp_tuple [Ast_helper.Exp.constant (Pconst_string (text, e.pexp_loc, None)); e] } | e -> super#expression e end let () = Ppxlib.Driver.register_transformation ~impl:(fun s -> mapper#structure s) "repr"
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>