I have an haskell file named A.hs. I have many helper functions, but I only want to export two of them, for example foo1 and foo2. Is this syntax corect?
module A (foo1,foo2) where
foo1 a b = a * b
foo2 a b = a + b
Since there are other helper functions in my file, I'm not supposed to reach them from prelude after doing this, right? But I can reach them. I'm not sure what to do. How can I solve this problem?
Thanks in advance.
The syntax is correct. However, for interpreted files, GHCi always makes all toplevel functions available.
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