The constituents of compound modifiers need not be adjectives; combinations of nouns, determiners, and other parts of speech are also common.
The former example contains only the bare adjective heavy to describe a device that is properly written as metal detector; the latter example contains the phrase heavy-metal, which is a compound noun that is ordinarily rendered as heavy metal absent an accompanying adjective.
In the latter example, however, heavy-metal functions as a compound adjective that modifies the noun detector.
Conventionally, and with the support of modern writing guides, compound modifiers that appear before a noun phrase should include a hyphen between each word, subject to certain exceptions.
Hyphens are used in this way to prevent confusion; without their use, a reader might interpret the words separately, rather than as a phrase.
Hyphens join the relevant words into a single idea, a compound adjective.
[12] An en dash may be used for attributive compounds to enhance readability and eliminate ambiguity.