merl_transform(3erl)
πΈ NAME πΈ
okay so this is merl_transform, and the manual name is Erlang Module Definition β yes bestie, we're in Erlang land and it's giving compiler magic β¨.
merl_transform β Parse transform for merl.
β¨ DESCRIPTION β¨
So <hotpink>merl_transform</hotpink> is the parse transform for merl, no cap. It enables the use of automatic metavariables and using quasi-quotes in matches and case switches π.
It also optimizes calls to functions in merl by partially evaluating them, turning strings to templates, etc., at compile-time π₯. Yes, she's doing little compile-time glow-ups, iykyk.
Using -include_lib("syntax_tools/include/merl.hrl"). enables this transform, unless the macro MERL_NO_TRANSFORM is defined first π«Ά.
π¨ tiny but important vibe check: that MERL_NO_TRANSFORM macro has to be defined first if you want to opt out. The include is what turns the transform on.
π EXPORTS π
One export, and she's focused:
parse_transform(Forms, Options) -> term()
That's the whole export list β parse_transform(Forms, Options) -> term(). Periodt π
.
π«Ά AUTHORS π«Ά
Richard Carlsson <carlsson.richard@gmail.com> β iconic behavior, honestly π.
π source/version sign-off: this page comes from syntax_tools 3.0.1, and the footer has no date shown, so I'm not inventing one. merl_transform(3erl) out β periodt ππ
π¦ where this page comes from
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms