---
source: test-package-compiler/src/generated_tests.rs
expression: "./cases/empty_module_warning"
---
//// /out/lib/the_package/_gleam_artefacts/empty.cache
<.cache binary>

//// /out/lib/the_package/_gleam_artefacts/empty.cache_meta
<65 byte binary>

//// /out/lib/the_package/_gleam_artefacts/empty.erl
-module(empty).
-compile([no_auto_import, nowarn_ignored, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).



//// /out/lib/the_package/_gleam_artefacts/internal.cache
<.cache binary>

//// /out/lib/the_package/_gleam_artefacts/internal.cache_meta
<81 byte binary>

//// /out/lib/the_package/_gleam_artefacts/internal.erl
-module(internal).
-compile([no_auto_import, nowarn_ignored, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).
-export([private_function/0]).

-file("src/internal.gleam", 5).
-spec private_function() -> nil.
-doc(false).
private_function() ->
    nil.



//// /out/lib/the_package/_gleam_artefacts/private.cache
<.cache binary>

//// /out/lib/the_package/_gleam_artefacts/private.cache_meta
<77 byte binary>

//// /out/lib/the_package/_gleam_artefacts/private.erl
-module(private).
-compile([no_auto_import, nowarn_ignored, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).



//// /out/lib/the_package/_gleam_artefacts/public.cache
<.cache binary>

//// /out/lib/the_package/_gleam_artefacts/public.cache_meta
<77 byte binary>

//// /out/lib/the_package/_gleam_artefacts/public.erl
-module(public).
-compile([no_auto_import, nowarn_ignored, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).
-export([main/0]).

-file("src/public.gleam", 4).
-spec main() -> binary().
main() ->
    ~"This module has public definitions".



//// /out/lib/the_package/ebin/empty_module_warning.app
{application, empty_module_warning, [
    {vsn, "1.0.0"},
    {applications, [gleam_stdlib]},
    {description, "Test package with empty modules"},
    {modules, [empty,
               internal,
               private,
               public]},
    {registered, []}
]}.


//// Warning
warning: Empty module

Module 'empty' contains no public definitions.

Hint: You can safely remove this module.



//// Warning
warning: Unused private function
  ┌─ src/private.gleam:4:1
  │
4 │ fn private_function() -> Nil {
  │ ^ This private function is never used

Hint: You can safely remove it.
