package ppxlib
Standard infrastructure for ppx rewriters
Install
dune-project
Dependency
Authors
Maintainers
Sources
ppxlib-0.34.0.tbz
sha256=d77d97165a158d7ae56b7c0387cd04e9927d7e7e797ca1039ffb5bb17a6661a7
sha512=84954f375b0c3ed063c874c47cc2597cceea338de0f567f64f340bd4e3569ef88421369b92bd5830701216bcdb88d78f50f3896c8edeb13250f0e7337c106b7d
doc/ppxlib/Ppxlib/Expansion_context/Deriver/index.html
Module Expansion_context.Deriver
Source
Type of expansion contexts for derivers
Return the location of the item to which the deriver is being applied
Return the code path for the given context In Driver, Deriving and Extension, the context is initialized so that the file_path
component of the code_path
is determined from the first location found in the input AST. That means that:
- It's the empty string in empty structures or signatures
- It can be altered by line directives
Return the input name for the given context. In Driver, Deriving and Extension, the context argument is initialized so that the input_name
matches the input filename passed to the driver on the command line. That means that:
- It has a value even for empty files
- It is not affected by line directives
- It is
"_none_"
when usingDriver.map_structure
orDriver.map_signature
Can be used within a ppx preprocessor to know which tool is calling it "ocamlc"
, "ocamlopt"
, "ocamldep"
, "ocaml"
, ... .
Wrap a fun ~loc ~path
into a fun ~ctxt
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>