 
   defp print_callback_doc({{fun, _}, _line, kind, doc}, spec) do
     definition =
-      Kernel.Typespec.spec_to_ast(fun, spec)
+      Typespec.spec_to_ast(fun, spec)
       |> Macro.to_string
 
     print_doc("#{kind}callback #{definition}", doc || "")

  end

  defp get_behaviour_docs(mod) do
    callbacks = Kernel.Typespec.beam_callbacks(mod)
    docs = Code.get_docs(mod, :behaviour_docs)
    cond do
      is_nil(callbacks) -> :no_beam

  end

  defp beam_specs(module) do
    specs = beam_specs_tag(Typespec.beam_specs(module), :spec)
    callbacks = beam_specs_tag(Typespec.beam_callbacks(module), :callback)
    specs && callbacks && Enum.concat(specs, callbacks)
  end

