merl_transform(3)
π merl_transform β the parse transform for merl (yes bestie, that's the whole NAME)
okay so this is the manual page for merl_transform(3) β an Erlang module definition, and she's kind of a backstage queen. Let's get into it.
β¨ DESCRIPTION β¨
She's the parse transform for merl, and she does a LOT at compile-time so you don't have to.
Here's the tea, in list form because we're organized:
- She enables the use of automatic metavariables π
- She lets you use quasi-quotes in matches and
caseswitches β¨ - She also optimizes calls to functions in
merlby partially evaluating them, turning strings into templates, and so on β all of that happening at compile-time π§
Now, how do you even turn her on? Bestie, it's one line:
-include_lib("syntax_tools/include/merl.hrl").
Including -include_lib("syntax_tools/include/merl.hrl"). is what enables this transform π
β οΈ BUT. Unless the macro MERL_NO_TRANSFORM is defined first. Define that macro first and she simply does not show up, no cap. π
π₯ FUNCTIONS π₯
This section is in the original page, and ngl it's just sitting there with nothing under it β no functions listed here. The real star of this page is the transform behavior described above. Periodt. π
~ cute sign-off ~
This iconic little page comes to you courtesy of Ericsson AB, from syntax_tools 4.1 πΈ. That's the source and version energy right there, bestie β merl_transform(3), by Ericsson AB, syntax_tools 4.1. Slay. ππ¦
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms