Im writing app in haskell and I would like to export some functions and datatypes to other files and then be able to use them in my main file.
How to do this ?
thanks for help
You could lay out your source code like so:
Main.hs
A/Module.hs
You need to specify in A/Module.hs which module it actually is; it has to be:
module A.Module where
...
In Main.hs, you import A.Module; all names are exported by default.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With