[Haskell-beginners] Export two modules from one.hs file?

Leonhard Applis Leonhard.Applis at protonmail.com
Mon Nov 18 20:42:22 UTC 2019


Hey  All,

I currently want to make a module, which "truly" exposes 3 functions. However, there are more functions which I want to test.
I would like to export two modules from the same file, "ModuleToUse" and "ModuleOpen".
Then I can use ModuleToUse everywhere else, and ModuleOpen in the UnitTests.

I know I can declare ModuleOpen, and export only certain functions with ModuleToUse.
But I am not sure, if that is a smart / normal thing to do. In my case this would double my modules, and ... hence files?

What is the "real world" approach for this?

Thanks
Leonhard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20191118/6f8bf15d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: publickey - Leonhard.Applis at protonmail.com - 0x807FDDF3.asc
Type: application/pgp-keys
Size: 1843 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20191118/6f8bf15d/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 477 bytes
Desc: OpenPGP digital signature
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20191118/6f8bf15d/attachment.sig>


More information about the Beginners mailing list