   defp app_mod(base, name), do: Module.concat([base, name])
 
   defp web_mod(base, name), do: Module.concat(["#{base}Web", name])
+
+  defp get_file_path(module_name) do
+    [compile_infos] = Keyword.get_values(module_name.module_info(), :compile)
+    [source] = Keyword.get_values(compile_infos, :source)
+    source
+  end
+
+  defp get_line_number(_, nil), do: nil
+
+  defp get_line_number(module, function_name) do
+    {_, _, _, _, _, _, functions_list} = Code.fetch_docs(module)
+
+    function_infos =
+      functions_list
+      |> Enum.find(fn {{type, name, _}, _, _, _, _} ->
+        type == :function and name == function_name
+      end)
+
+    case function_infos do
+      {_, line, _, _, _} -> line
+      nil -> nil
+    end
+  end
 end

          # aliases...
        ]

  """

  @doc false


  @moduledoc """
  Prints all routes for the default or a given router.
  Can also locate the controller function behind a specified url.

      $ mix phx.routes [ROUTER] [--info URL]

  The default router is inflected from the application
  name unless a configuration named `:namespace`
