package ppx_deriving_hardcaml
PPX deriving plugin for HardCaml
Install
Dune Dependency
Authors
Maintainers
Sources
v1.2.0.tar.gz
sha256=27bb057803fbbffdce48524bdfc7cbdff6899cf6d1d40ec9ecdb0be40a229e0a
md5=78a0fb13194676046b26ab9e8503b6be
Description
README
ppx_deriving
Plugin for HardCaml
This module implements a plugin for the ppx_deriving
rewriter that supports the HardCaml syntax:
Provide a
record
annotation to generate helper functionsProvide an optional
bits
attribute for signalsProvide a required
width
attribute forlist
andarray
Module interface
Original syntax:
module S : interface
signal
signal_list{ }
signal_array{| |}
end
New syntax:
module S : sig
type 'a t = {
signal : 'a;
signal_list : 'a list;
signal_array : 'a array;
} [@@deriving hardcaml]
end
Module implementation
Original syntax:
module S = interface
signal[2]
signal_list{2}[4]
signal_array{|2|}[4]
end
New syntax:
module S = struct
type 'a t = {
signal : 'a [@bits 2];
signal_list : 'a list [@length 2][@bits 4];
signal_array : 'a array [@length 2][@bits 4];
} [@@deriving hardcaml]
end
Options
rtlprefix
: prependrtlprefix
to the generated RTL name (string)rtlsuffix
: appendrtlsuffix
to the generated RTL name (string)rtlmangle
: when using interfaces, mangle the name of the interface and its signals (boolean)extends
: list of interfaces to extend (list)
Dependencies (4)
-
ppx_deriving
>= "4.0" & < "4.3"
-
ocamlfind
build
-
hardcaml
>= "1.1.0" & < "2.0.0"
-
ocaml
>= "4.03"
Dev Dependencies (1)
-
ounit
with-test
Used by
None
Conflicts
None
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page