logo       

[ ghc-Bugs-1183840 ] (OS X) Can't link MonadCont, but ghci works: msg#00070

lang.haskell.glasgow.bugs

Subject: [ ghc-Bugs-1183840 ] (OS X) Can't link MonadCont, but ghci works

Bugs item #1183840, was opened at 2005-04-15 11:37
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1183840&group_id=8032

Category: Compiler
Group: 6.4
Status: Open
Resolution: None
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


----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1183840&group_id=8032


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise