Haskell Namespaces Colliding

haskell

Solution

If you need to use both operators in the same module, you can use qualified imports:

import qualified Numeric.LinearAlgebra as N
import qualified HLearn.Algebra as H

Then you can use `L.<>` or `N.<>` where you need.

If you won't use one of the functions, just hide it:

import Numeric.LinearAlgebra hiding ((<>))

Problem

I have problems grasping Haskell's module system. It seems that the `import` statement does import a module's symbols into the local namespace. Right now I have the problem of two modules defining the operator `(<>)` (`Numeric.LinearAlgebra.<>` and `HLearn.Algebra.<>`) which are in turn defined in other Haskell namespaces. - How would you handle this problem? I have not yet seen other code than `import ...` to import a module in haskell

Original source