package p5scm
Scheme via camlp5
Install
Dune Dependency
Authors
Maintainers
Sources
0.4.0.tar.gz
md5=eb4ee666fd862f7c8057cca4a73daf44
sha512=d28ee892b8fc3241c42f531f9d372b1b007abbef128c3f3862fa5ad943a3eae1d655b34daac19940e1f9fad1ecfca1419a89c7507b6cbd40d9c0490c6aa6761e
doc/src/p5scm.lib/trans.ml.html
Source file trans.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
(* The MIT License Copyright (c) 2021 Jason D. Nielsen <drjdnielsen@gmail.com> *) let add_nl str = str ^ "\n" let scm_to_mlast str = let mlast, _ = Pa_scheme.pa_sch str in List.map fst mlast let scm_to_tp str = Ast2pt.phrase (List.hd (scm_to_mlast str)) let scm_to_tp_lst str = List.map Ast2pt.phrase (scm_to_mlast str) let scm_to_struct str = Ast2pt.implem "-" (scm_to_mlast str) let scm_to_ml str = let mlast, _ = Pa_scheme.pa_sch str in let strml = List.map Pr_o.pr_o (List.map fst mlast) in let out = String.concat "" (List.map add_nl strml) in out ^ ";;\n" let scm_to_struct_to_ml str = let stast = scm_to_struct str in let out = Pprintast.string_of_structure stast in out ^ ";;\n" let scm_to_bin str = let mlast, status = Pa_scheme.pa_sch str in let phr = match status with | None -> failwith "No location provied!" | Some loc -> mlast, loc in Pr_dump.pr_dump phr let scm_to_bin_file str fname = let mlast, status = Pa_scheme.pa_sch str in let phr = match status with | None -> failwith "No location provied!" | Some loc -> mlast, loc in Pcaml.output_file := Some fname; Pr_dump.pr_dump phr
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>