merl_transform(3)

πŸ“¦
version 29.0.6 Β· 3 versions
, in ubuntu stonking

πŸ’… 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 case switches ✨
  • She also optimizes calls to functions in merl by 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