<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>This is related to a <a moz-do-not-send="true"
href="https://github.com/diku-dk/futhark/issues/550">feature in
the futhark compiler</a>, which is a language with a similar
module system.</p>
<p>I am trying to create a tool to detect unused top-level functions
in Futhark, and I have been looking in the ghc codebase to find
out how it does so. So far I have found these areas:</p>
<ol>
<li><a moz-do-not-send="true"
href="https://gitlab.haskell.org/ghc/ghc/-/blob/master/compiler/GHC/Driver/Flags.hs#L556-557">warning
flag</a></li>
<li><a moz-do-not-send="true"
href="https://gitlab.haskell.org/ghc/ghc/-/blob/master/compiler/GHC/Rename/Utils.hs#L355">WarnUnusedTopBinds</a></li>
</ol>
<p>The project is a bit too big for my machine to take, so HLS is
not helping me with finding where the computation of unused
bindings (specifically functions) is done.<br>
I would like some help with finding where ghc does this
computation, and maybe some help with the naming conventions of
the code.</p>
<p>Thanks in advance.<br>
</p>
</body>
</html>