id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
353,"(OS X) Can't link MonadCont, but ghci works",laboratoryman,nobody,"{{{
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

}}}",bug,closed,normal,,Compiler,6.4,Invalid,,,,,,,,,,
