X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Debug%2FTrace.hs;h=ebacb6c3d7fa28d37e385a2d240c97b2bd4d8d78;hb=41e8fba828acbae1751628af50849f5352b27873;hp=c30c8111d15be3e989de602f74c1856b2a189684;hpb=6ec0a71d8daa9728a9c93bcbfa443d9310423d98;p=ghc-base.git diff --git a/Debug/Trace.hs b/Debug/Trace.hs index c30c811..ebacb6c 100644 --- a/Debug/Trace.hs +++ b/Debug/Trace.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP, ForeignFunctionInterface #-} + ----------------------------------------------------------------------------- -- | -- Module : Debug.Trace @@ -41,7 +43,9 @@ putTraceMsg msg = do withCString msg $ \cmsg -> debugBelch cfmt cmsg -foreign import ccall unsafe "RtsMessages.h debugBelch" +-- don't use debugBelch() directly, because we cannot call varargs functions +-- using the FFI. +foreign import ccall unsafe "HsBase.h debugBelch2" debugBelch :: CString -> CString -> IO () #endif