[Haskell-cafe] Hide internal modules but expose them for testing

Vanessa McHale vanessa.mchale at iohk.io
Mon Jan 7 14:25:40 UTC 2019


As of recently you can have private libraries in a package. See e.g. my
htoml-megaparsec package for an example:
http://hackage.haskell.org/package/htoml-megaparsec where I use it to do
exactly what you wanted.

On 1/7/19 2:08 AM, Georgi Lyubenov wrote:
> Greetings,
>
> I want to have internal modules which I do not expose at all. I also
> want to be able to test them.
>
> This however also hides these modules from my tests.
>
> The best way I have found to work around this is to include my entire
> source directory in the test suite (source-dirs). This however means
> that I can't reuse builds that didn't include the tests.
>
> Is there some obvious and "best" solution that I am missing here? For
> reference I use Stack.
>
> Thanks in advance!
>
> =======
> Georgi
>
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20190107/3f988865/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20190107/3f988865/attachment.sig>


More information about the Haskell-Cafe mailing list