   # Finally compile the module and emit its bytecode.
   defp compile(protocol, code, {compile_info, docs}) do
     opts = Keyword.take(compile_info, [:source])
-    opts = if Code.compiler_options[:debug_info], do: [:debug_info | opts], else: opts
+    opts = if Code.compiler_options()[:debug_info], do: [:debug_info | opts], else: opts
     {:ok, ^protocol, binary, _warnings} = :compile.forms(code, [:return | opts])
-    {:ok,
+
+    {
+      :ok,
       case docs do
         :missing_chunk -> binary
         _ -> :elixir_erl.add_beam_chunks(binary, [{"ExDc", docs}])
-      end}
+      end
+    }
   end
 
   ## Definition callbacks
 
   @doc false
-  def __protocol__(name, [do: block]) do
+  def __protocol__(name, do: block) do
     quote do
       defmodule unquote(name) do
         # We don't allow function definition inside protocols
-        import Kernel, except: [
-          defmacrop: 1, defmacrop: 2, defmacro: 1, defmacro: 2,
-          defp: 1, defp: 2, def: 1, def: 2
-        ]
+        import Kernel,
+          except: [
+            defmacrop: 1,
+            defmacrop: 2,
+            defmacro: 1,
+            defmacro: 2,
+            defp: 1,
+            defp: 2,
+            def: 1,
+            def: 2
+          ]
 
         # Import the new dsl that holds the new def
         import Protocol, only: [def: 1]


      # Internal handler for Any
      if @fallback_to_any do
        Kernel.defp any_impl_for(), do: __MODULE__.Any.__impl__(:target)
      else
        Kernel.defp any_impl_for(), do: nil
      end

      # Internal handler for Structs
      Kernel.defp struct_impl_for(struct) do
        target = Module.concat(__MODULE__, struct)
        case impl_for?(target) do
          true  -> target.__impl__(:target)
          false -> any_impl_for()
        end
      end

      # Check if compilation is available internally
      Kernel.defp impl_for?(target) do
        Code.ensure_compiled?(target) and
          function_exported?(target, :__impl__, 1)
      end

      # Inline any and struct implementations

    signature = {name, arity}

    specs = Module.get_attribute(module, :spec)

    found =
      :lists.map(
        fn {:spec, expr, pos} ->
          if Kernel.Typespec.spec_to_signature(expr) == signature do
            Module.store_typespec(module, :callback, {:callback, expr, pos})
            true
          end
        end,
        specs
      )

    :lists.any(&(&1 == true), found)
  end

  ## Helpers

  @doc false
  def __builtin__ do
    [
      is_tuple: Tuple,
      is_atom: Atom,
      is_list: List,
      is_map: Map,
      is_bitstring: BitString,
      is_integer: Integer,
      is_float: Float,
      is_function: Function,
      is_pid: PID,
      is_port: Port,
      is_reference: Reference
    ]
  end
end
