Hi Ian, On Apr 1, 2007, at 3:57 PM, Ian Lynagh wrote:
Hi Gregory,
Is there a version of "print" I can use for debugging these libraries? Just adding "print" causes a cycle in module dependencies.
Ah, remove the #if/#endif around the definition of "puts", its export, and the GHC.Pack import in libraries/base/GHC/Handle.hs
No such luck. I even copied "puts" into libraries/base/GHC/
ForeignPtr.hs
but I still get I cycle because I need withCString to define "puts":
Module imports form a cycle for modules:
GHC.ForeignPtr
imports: GHC.Show GHC.Err GHC.Ptr GHC.IOBase GHC.Base GHC.List
Foreign.Storable Foreign.Ptr Foreign.C Control.Monad
Foreign.C imports: Foreign.C.Error Foreign.C.String Foreign.C.Types
Foreign.C.Error
imports: GHC.Base GHC.Num GHC.IOBase Data.Maybe
Foreign.Marshal.Error Foreign.C.String Foreign.C.Types
Foreign.Ptr
Foreign.Storable GHC.IOBase
Foreign.C.String
imports: GHC.Base GHC.IOBase GHC.Num GHC.Real GHC.List Data.Word
Foreign.Storable Foreign.Ptr Foreign.C.Types
Foreign.Marshal.Array
Foreign.C.Types
Data.Typeable
imports: GHC.Arr GHC.Stable GHC.ForeignPtr GHC.Ptr GHC.STRef GHC.ST
GHC.IOBase GHC.IOBase GHC.Real GHC.Float GHC.Num
GHC.Err GHC.Show
GHC.Base Data.List Data.Word Data.Int Data.Either
Data.Maybe
Data.HashTable
Foreign.Marshal.Array
imports: GHC.Base GHC.Err GHC.List GHC.Num GHC.IOBase
Foreign.Marshal.Utils Foreign.Marshal.Alloc
Foreign.Storable
Foreign.Ptr Control.Monad
Foreign.Marshal.Utils
imports: GHC.Base GHC.Num GHC.Real GHC.IOBase Foreign.Marshal.Alloc
Foreign.C.Types Foreign.Storable Foreign.Ptr Data.Maybe
Foreign.Marshal.Alloc
imports: GHC.Num GHC.Base GHC.Err GHC.Ptr GHC.Real GHC.IOBase
Foreign.ForeignPtr Foreign.Storable Foreign.C.Types
Foreign.Ptr
Data.Maybe
Foreign.ForeignPtr
imports: GHC.ForeignPtr GHC.Err GHC.Num GHC.IOBase GHC.Base
Foreign.Storable Foreign.Ptr
<