I was trying to compile a Haskell code using ghc (v7.0.3).
I had compiled a library code:
> ghc -c MyLib.hs
And then tried to link with my application:
> ghc Main.hs MyLib.o
It seems that ghc already includes the object files for dependencies, so this would explain the duplicate. Thus, it suffices to compile it using:
> ghc Main.hs