I have a file test.hs
with the following code:
Mp1.gcd a =a
When I compile it, there is this error:
"Qualified name in binding position:Mp1.gcd Failed, modules loaded:none"
I use Mp1.gcd because the official API has "gcd".
Is this problem about my naming conventions? How can I fix it?
You can define it without qualifying it at all:
gcd a = {- ... -}
Then qualify it in your export list:
module MyModule (MyModule.gcd) where
Alternatively, remove the possibility for conflict altogether by excluding Prelude
's gcd
:
import Prelude hiding (gcd)
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