packages feed

ghc-trace-events 0.0.0 → 0.0.0.1

raw patch · 5 files changed

+60/−3 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,10 @@ # Revision history for ghc-trace-events +## v0.0.0.1 - 2018-08-07++* Test with GHC 8.4.3 and HEAD+* Update docs+ ## v0.0.0 - 2018-05-21  * First version
ghc-trace-events.cabal view
@@ -1,6 +1,6 @@ name: ghc-trace-events-version: 0.0.0-synopsis: Faster replacements for traceEvent and traceEventMarker+version: 0.0.0.1+synopsis: Faster replacements for traceEvent and traceMarker description: This library provies 3 modules:   .   ["Debug.Trace.String"] Drop-in replacements for the event tracing functions in@@ -9,6 +9,10 @@   tracing functions in "Debug.Trace".   ["Debug.Trace.Text"] 'Data.Text.Text' variants of the event tracing functions   in "Debug.Trace".+  .+  Unlike the tracing functions in base, all the tracing functions in this+  package don't evaluate the input if user event logging (the @-lu@ option) is+  disabled. homepage: https://github.com/maoe/ghc-trace-events license: BSD3 license-file: LICENSE@@ -24,7 +28,7 @@ tested-with: GHC == 7.10.3   || == 8.0.2   || == 8.2.2-  || == 8.4.2+  || == 8.4.3  library   exposed-modules:
src/Debug/Trace/ByteString.hs view
@@ -34,6 +34,9 @@ -- -- Note that this function doesn't evaluate the 'B.ByteString' if user tracing -- in eventlog is disabled.+--+-- The input should be shorter than \(2^{16}\) bytes. Otherwise the RTS generates a+-- broken evnetlog. traceEvent :: B.ByteString -> a -> a traceEvent message a   | userTracingEnabled = Unsafe.unsafeDupablePerformIO $ do@@ -49,6 +52,9 @@ -- -- Note that this function doesn't evaluate the 'B.ByteString' if user tracing -- in eventlog is disabled.+--+-- The input should be shorter than \(2^{16}\) bytes. Otherwise the RTS generates a+-- broken evnetlog. traceEventIO :: B.ByteString -> IO () traceEventIO message = when userTracingEnabled $   B.useAsCString message $ \(Ptr p) -> IO $ \s ->@@ -62,6 +68,9 @@ -- -- Note that this function doesn't evaluate the 'B.ByteString' if user tracing -- in eventlog is disabled.+--+-- The input should be shorter than \(2^{16}\) bytes. Otherwise the RTS generates a+-- broken evnetlog. traceMarker :: B.ByteString -> a -> a traceMarker message a   | userTracingEnabled = unsafeDupablePerformIO $ do@@ -77,6 +86,9 @@ -- -- Note that this function doesn't evaluate the 'B.ByteString' if user tracing -- in eventlog is disabled.+--+-- The input should be shorter than \(2^{16}\) bytes. Otherwise the RTS generates a+-- broken evnetlog. traceMarkerIO :: B.ByteString -> IO () traceMarkerIO message = when userTracingEnabled $   B.useAsCString message $ \(Ptr p) -> IO $ \s ->@@ -91,6 +103,9 @@ -- -- Note that this function doesn't evaluate the 'B.ByteString' if user tracing -- in eventlog is disabled.+--+-- The input should be shorter than \(2^{16}\) bytes. Otherwise the RTS generates a+-- broken evnetlog. unsafeTraceEvent :: B.ByteString -> a -> a unsafeTraceEvent message a   | userTracingEnabled = Unsafe.unsafeDupablePerformIO $ do@@ -107,6 +122,9 @@ -- -- Note that this function doesn't evaluate the 'B.ByteString' if user tracing -- in eventlog is disabled.+--+-- The input should be shorter than \(2^{16}\) bytes. Otherwise the RTS generates a+-- broken evnetlog. unsafeTraceEventIO :: B.ByteString -> IO () unsafeTraceEventIO message = when userTracingEnabled $   BU.unsafeUseAsCString message $ \(Ptr p) -> IO $ \s ->@@ -121,6 +139,9 @@ -- -- Note that this function doesn't evaluate the 'B.ByteString' if user tracing -- in eventlog is disabled.+--+-- The input should be shorter than \(2^{16}\) bytes. Otherwise the RTS generates a+-- broken evnetlog. unsafeTraceMarker :: B.ByteString -> a -> a unsafeTraceMarker message a   | userTracingEnabled = Unsafe.unsafeDupablePerformIO $ do@@ -137,6 +158,9 @@ -- -- Note that this function doesn't evaluate the 'B.ByteString' if user tracing -- in eventlog is disabled.+--+-- The input should be shorter than \(2^{16}\) bytes. Otherwise the RTS generates a+-- broken evnetlog. unsafeTraceMarkerIO :: B.ByteString -> IO () unsafeTraceMarkerIO message = when userTracingEnabled $   BU.unsafeUseAsCString message $ \(Ptr p) -> IO $ \s ->
src/Debug/Trace/String.hs view
@@ -19,6 +19,9 @@ -- -- Note that this function doesn't evaluate the 'String' if user tracing -- in eventlog is disabled.+--+-- The input should be shorter than \(2^{16}\) bytes. Otherwise the RTS generates a+-- broken evnetlog. traceEvent :: String -> a -> a traceEvent message a   | userTracingEnabled = Base.traceEvent message a@@ -29,6 +32,9 @@ -- -- Note that this function doesn't evaluate the 'String' if user tracing -- in eventlog is disabled.+--+-- The input should be shorter than \(2^{16}\) bytes. Otherwise the RTS generates a+-- broken evnetlog. traceEventIO :: String -> IO () traceEventIO message = when userTracingEnabled $ Base.traceEventIO message @@ -37,6 +43,9 @@ -- -- Note that this function doesn't evaluate the 'String' if user tracing -- in eventlog is disabled.+--+-- The input should be shorter than \(2^{16}\) bytes. Otherwise the RTS generates a+-- broken evnetlog. traceMarker :: String -> a -> a traceMarker message a   | userTracingEnabled = Base.traceMarker message a@@ -47,5 +56,8 @@ -- -- Note that this function doesn't evaluate the 'String' if user tracing -- in eventlog is disabled.+--+-- The input should be shorter than \(2^{16}\) bytes. Otherwise the RTS generates a+-- broken evnetlog. traceMarkerIO :: String -> IO () traceMarkerIO message = when userTracingEnabled $ Base.traceMarkerIO message
src/Debug/Trace/Text.hs view
@@ -30,6 +30,9 @@ -- -- Note that this function doesn't evaluate the 'T.Text' if user tracing -- in eventlog is disabled.+--+-- The input should be shorter than \(2^{16}\) bytes. Otherwise the RTS generates a+-- broken evnetlog. traceEvent :: T.Text -> a -> a traceEvent message a   | userTracingEnabled = Unsafe.unsafeDupablePerformIO $ do@@ -45,6 +48,9 @@ -- -- Note that this function doesn't evaluate the 'T.Text' if user tracing -- in eventlog is disabled.+--+-- The input should be shorter than \(2^{16}\) bytes. Otherwise the RTS generates a+-- broken evnetlog. traceEventIO :: T.Text -> IO () traceEventIO message = when userTracingEnabled $   withCString message $ \(Ptr p) -> IO $ \s ->@@ -58,6 +64,9 @@ -- -- Note that this function doesn't evaluate the 'T.Text' if user tracing -- in eventlog is disabled.+--+-- The input should be shorter than \(2^{16}\) bytes. Otherwise the RTS generates a+-- broken evnetlog. traceMarker :: T.Text -> a -> a traceMarker message a   | userTracingEnabled = unsafeDupablePerformIO $ do@@ -73,6 +82,9 @@ -- -- Note that this function doesn't evaluate the 'T.Text' if user tracing -- in eventlog is disabled.+--+-- The input should be shorter than \(2^{16}\) bytes. Otherwise the RTS generates a+-- broken evnetlog. traceMarkerIO :: T.Text -> IO () traceMarkerIO message = when userTracingEnabled $   withCString message $ \(Ptr p) -> IO $ \s ->