Skip to content

Commit

Permalink
Change focus in require explanation (elixir-lang#6041)
Browse files Browse the repository at this point in the history
  • Loading branch information
fxn authored and josevalim committed Apr 27, 2017
1 parent 8b472cd commit 3e56f6d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/elixir/lib/kernel/special_forms.ex
Original file line number Diff line number Diff line change
Expand Up @@ -507,13 +507,12 @@ defmodule Kernel.SpecialForms do
defmacro alias(module, opts), do: error!([module, opts])

@doc """
Requires a given module to be compiled and loaded.
Requires a module in order to use its macros.
## Examples
Notice that usually modules should not be required before usage,
the only exception is if you want to use the macros from a module.
In such cases, you need to explicitly require them.
Public functions in modules are globally available, but in order to use
macros, you need to opt-in by requiring the module they are defined in.
Let's suppose you created your own `if/2` implementation in the module
`MyMacros`. If you want to invoke it, you need to first explicitly
Expand Down

0 comments on commit 3e56f6d

Please sign in to comment.