Bugs item #1183840, was opened at 2005-04-15 15:37 Message generated for change (Settings changed) made by simonpj You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1183840&group_id=8032
Category: Compiler Group: 6.4 >Status: Closed >Resolution: Invalid Priority: 5 Submitted By: No one of consequence (laboratoryman) Assigned to: Nobody/Anonymous (nobody) Summary: (OS X) Can't link MonadCont, but ghci works Initial Comment: The following test case prints [0,1,2] with ghci-6.4 on OS X, but ghc can't link it. The error is $ ghc-6.4 -o y yield-cont-fails.hs ld: Undefined symbols: _ControlziMonadziCont_zdfMonadCont_closure ___stginit_ControlziMonadziCont_ The test case: import Control.Monad.Cont yield :: a -> Cont [a] () yield x = Cont (\c -> x : c ()) asGenerator :: Cont [a] v -> [a] asGenerator (Cont f) = f (const []) test = asGenerator (yield 0 >> yield 1 >> yield 2) main = do print test I have also attached it as a file to this bug. I do not have other versions of ghc installed. I installed GHC from http://www.haskell.org/ghc/dist/6.4/MacOSX/GHC-6.4.pkg.zip ---------------------------------------------------------------------- Comment By: No one of consequence (laboratoryman) Date: 2005-04-15 15:59 Message: Logged In: YES user_id=202433 Nevermind, "ghc --make" works. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2005-04-15 15:54 Message: Logged In: NO The module Control.Monad.Cont is located in the mtl package. GHCi load the package automatically when needed but you have to name it explicitly when linking with GHC, or use the '--make' option. ~Lemmih ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1183840&group_id=8032 _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs