title: .NET's "InternalsVisibleTo" equivalent in Haskell
body: <p>In .NET I can decorate my assembly with the following attribute:</p>
  <pre class="lang-ml prettyprint-override"><code>[&lt;assembly: InternalsVisibleTo(&quot;MyProject.Test&quot;)&gt;]
  </code></pre>
  <p>Thanks to this, all the modules marked as &quot;internal&quot; are accessible from &quot;MyProject.Test&quot;. I can use it e.g. for unit testing the functionality I don't want to expose in my library.</p>
  <p>I'm wondering if there's something similar in the Haskell's world. Let's say I have a library with the following .cabal file:</p>
  <pre><code>library
    exposed-modules:  MyLibrary.API
    other-modules:    MyLibrary.Utils
    -- ...
  
  test-suite mylib-test
    -- ...
    build-depends:  base,
                    hspec,
                    my-library
  </code></pre>
  <p>Is there a way to refer to &quot;MyLibrary.Utils&quot; from mylib-test test-suite?</p>