Witchcraft.Internal (Witchcraft v1.0.4) View Source

A module for handling use Witchcraft and other modules

Provides support for overriding Kernel functions and for auto dependencies using via __using__/1 macro.

Link to this section Summary

Functions

Generates Kernel import and __using__/1 macro in module where used.

Link to this section Functions

Link to this macro

__using__(opts \\ [])

View Source (macro)

Generates Kernel import and __using__/1 macro in module where used.

Options

  • :overrides – List of overrides in module where used
  • :deps – List of modules that will be used in generated __using__/1 macro

Generated __using__(opts \\ []) macro supports the following options:

  • :override_kernel – If true, overrides function from Kernel in module where used. Defaults to true
  • :except and :only – Keyword of functions (Like in import). Example: [fun: <arity>] where <arity> is function fun arity