title: Can GHCI's :add command accept a path that is relative to one's home directory?
body: <p>This is the GHC manual documentation for <a href="https://downloads.haskell.org/%7Eghc/latest/docs/html/users_guide/ghci.html#ghci-cmd-:add" rel="nofollow noreferrer"><code>:add</code></a>:</p>
  <blockquote>
  <h3><code>:add[*] ⟨module⟩</code></h3>
  <p>Add ⟨module⟩(s) to the current target set, and perform a reload. Normally pre-compiled code for the module will be loaded if available, or otherwise the module will be compiled to byte-code. Using the * prefix forces the module to be loaded as byte-code.</p>
  </blockquote>
  <p>I can tell from experimentation that <code>⟨module⟩</code> doesn't actually have to be the name of a module; it can also be a file path. And if it is not an absolute path, it seems to be resolved relative to the current directory from which the REPL was launched.</p>
  <p>Is it possible to refer <code>:add</code> a path that is relative to one's home directory?</p>
  <p>For example, I'd like to include <code>$HOME/.ghci/imports.hs</code> from my global GHCI config. (For the motivation behind this, see <a href="https://stackoverflow.com/a/42310341/402884"><em>Can a GHCI config file use CPP macros?</em></a>)</p>
  <p>I've tried the obvious</p>
  <pre><code>:add $HOME/.ghc/imports.hs
  </code></pre>
  <p>but it doesn't work:</p>
  <pre><code>&lt;no location info&gt;: error: can't find file: $HOME/.ghc/imports.hs
  Failed, modules loaded: none.
  </code></pre>