[Haskell-cafe] Why can I run (runghc) some Haskell scripts but I cannot seem to compile them?

Casey Hawthorne caseyh at istar.ca
Thu Nov 12 15:12:06 EST 2009


Why can I run (runghc) some Haskell scripts but I cannot seem to
compile them?

e.g. http://www.haskell.org/all_about_monads/examples/example25.hs

I've changed the import listing to the following:

import IO
import System
import Monad
import Data.Maybe
import Data.List
import Data.Char (toLower)
import Control.Monad.State
import Control.Monad.Writer

The compiler errors are like the following:
N-Queens.o:fake:(.text+0x2fe): undefined reference to
`mtlzm1zi1zi0zi2_Controlzi
MonadziStateziLazzy_zdf9_closure'
N-Queens.o:fake:(.text+0x422): undefined reference to
`mtlzm1zi1zi0zi2_Controlzi
MonadziStateziLazzy_zdf7_closure'
N-Queens.o:fake:(.text+0x66f6): undefined reference to
`mtlzm1zi1zi0zi2_Controlz
iMonadziWriterziLazzy_zdf1_closure'

--
Regards,
Casey


More information about the Haskell-Cafe mailing list