Macros

Metaprogramming utilities and macro libraries for code generation. Packages among the 3,000 most downloaded in the past 90 days.

32 packages
  • Parse transform library

    234
    4.0m last 90 days
  • Function decorators for Elixir

    401
    1.1m last 90 days
  • horus 0.3.1

    Creates standalone modules from anonymous functions

    29
    528.5k last 90 days
  • ExConstructor generates constructor functions for your structs, handling map-vs-keyword-list, string-vs-atom-keys, and camelCase-vs-under_score issues automatically.

    290
    199.8k last 90 days
  • A library for defining structs with a type without writing boilerplate code.

    45
    42.9k last 90 days
  • Library to easily intercept function calls

    43
    20.5k last 90 days
  • Mix in public functions from external modules

    19
    15.7k last 90 days
  • pipe 0.0.2

    An Elixir extension that extends the pipe (|>) operator through macros.

    324
    14.8k last 90 days
  • decorator_pt 1.0.3-alertlogic

    Chain of decorators allowed in parse transforms

    1
    14.5k last 90 days
  • Function decorators for Erlang.

    7
    12.9k last 90 days
  • Delegate macros or all functions and macros to another module

    2
    11.7k last 90 days
  • Protobuf code generation as a mix task

    15
    10.1k last 90 days
  • helper module for match specs

    22
    7.3k last 90 days
  • expat 1.0.5

    Re-usable composable patterns with guards

    175
    6.6k last 90 days
  • bottle 1.0.1

    Provides a set of useful guards to reduce boilerplate code

    2
    6.0k last 90 days
  • JSON Schema macro generator

    122
    5.4k last 90 days
  • Allows the use of `when` clauses on assignment statements as an alternative to using `if`, avoiding the need for boilerplate `else` clauses which return the original variables when the condition is `false`. For instance: ```elixir x = 1 when x == nil ```

    1
    5.1k last 90 days
  • croma 0.12.0

    Elixir macro utilities to make type-based programming easier

    -
    4.8k last 90 days
  • matcha 0.1.10

    First-class match specification and match patterns for Elixir

    91
    4.5k last 90 days
  • cut 1.0.3

    Syntax extensions that adds support for cuts Erlang

    8
    3.6k last 90 days
  • Parse transform library for Erlang

    13
    3.6k last 90 days
  • bristow 0.2.2

    Create function's alias

    0
    3.5k last 90 days
  • Convenience macros to eliminate laborious typing. Provides macros for short map, string keyed map, keyword lists, and structs (ES6 like style)

    21
    3.4k last 90 days
  • arrows 0.2.1

    A handful of (mostly) arrow macros

    12
    3.1k last 90 days
  • compile-time named arguments for Elixir functions and macro

    19
    3.0k last 90 days
  • Javascript-style destructuring for Elixir

    110
    3.0k last 90 days
  • while 0.2.4

    Provides a general functional `reduce_while(acc, fun)` for use without an Enum. Additionally provides syntax sugar to simulate a non-functional `while` as proof of concept on what can be done with macros.

    1
    2.5k last 90 days
  • This library implements macros to define contants and enums that can be used in guards

    4
    2.3k last 90 days
  • deco 0.1.2

    Minimalist Function Decorators

    23
    2.2k last 90 days
  • pipe_to 0.2.1

    PipeTo operator `~>` is the enhanced pipe operator which can specify the target position.

    85
    2.1k last 90 days
  • Elixir for-comprehension that goes beyond the lists

    3
    1.9k last 90 days
  • A collection of handy Elixir macros for CQRS applications.

    26
    1.6k last 90 days