GHC-Paketkonflikte
Ich versuche, den folgenden Code mit GHC zu kompilieren:
<code>module Test where import Maybe import Prelude hiding (null) import System.IO null = () main :: IO () main = putStrLn "Hello, world!" </code>
Wenn ich nur renneghc Test.hs
, Ich bekomme:
<code>Could not find module `Maybe' It is a member of the hidden package `haskell98-2.0.0.1'. </code>
Also versuche ich esghc -package haskell98 Test.hs
:
<code>Ambiguous module name `Prelude': it was found in multiple packages: base haskell98-2.0.0.1 </code>
Es scheint nicht richtig, aber ich versuche esghc -package haskell98 -hide-package base Test.hs
:
<code>Could not find module `System.IO' It is a member of the hidden package `base'. It is a member of the hidden package `haskell2010-1.1.0.1'. </code>
Also versuche ich esghc -package haskell98 -hide-package base -package haskell2010 Test.hs
:
<code>Ambiguous module name `Prelude': it was found in multiple packages: haskell2010-1.1.0.1 haskell98-2.0.0.1 </code>
Wie kompiliere ich diesen Code? Ich benutze GHC 7.4.1.