View Source Patch.Macro (patch v0.14.0)

Link to this section Summary

Functions

Utility function that acts like inspect/1 but prints out the Macro as code.

Performs an non-hygienic match.

Performs a match, return true if match matches, false otherwise.

Link to this section Functions

@spec debug(ast :: Macro.t()) :: Macro.t()

Utility function that acts like inspect/1 but prints out the Macro as code.

Link to this macro

match(pattern, expression)

View Source (macro)
@spec match(pattern :: Macro.t(), expression :: Macro.t()) :: Macro.t()

Performs an non-hygienic match.

If the match succeeds true is returned, otherwise a MatchError is raised.

Since the match is non-hygienic pins can be used from the user-scope and binds will effect user-scope.

Link to this macro

match?(pattern, expression)

View Source (macro)
@spec match?(pattern :: Macro.t(), expression :: Macro.t()) :: Macro.t()

Performs a match, return true if match matches, false otherwise.