phst_transform v0.9.0 PhStTransform.Potion
This module provides some helper methods for creating maps that
work with the PhStTransform
Protocol.
The methods in this module that are public are not intended to
be used outside of writing a implementation of the PhStTransform
Protocol.
Summary
Functions
brew validates and prepares a map to be used with the PhStTransform
Protocol
concoct is the version of brew used in transmogrify, it expects functions of either arity 2 or 3 and use a similar wrap function. It also checks for whether any functions need wrapping at every level
distill extracts the function for a given data type from a potion
Functions
brew validates and prepares a map to be used with the PhStTransform
Protocol.
Every key in the map that is an Atom
and that starts with Elixir.
must
have a function as a value. That function must have either arity 1 or 2
and if it is arity 1, it must be wrapped with arity 2 closure.
This validation only occurs at the top of the transformation tree when the depth list is empty.
concoct is the version of brew used in transmogrify, it expects functions of either arity 2 or 3 and use a similar wrap function. It also checks for whether any functions need wrapping at every level.