I forgot to mention that I have prototype implementation: * https://github.com/maoe/ghc/tree/traceEventBinary * https://github.com/maoe/ghc-trace-events/blob/feature/traceEventBinary/src/Debug/Trace/ByteString.hs#L46-L58
Some details still need to be sorted out though. Regards, Mitsutoshi 2018年5月28日(月) 16:23 Mitsutoshi Aoe <[email protected]>: > Hi devs, > > I'm thinking to add a primop in GHC but not sure how I should proceed. The > primop I have in mind is something like: > > traceEventBinary# :: Addr# -> Int# -> State# s -> State# s > > This function is similar to the existing traceEvent# but it takes a chunk > of bytes rather than a null-terminated string. It is useful to trace custom > user events (e.g. network packet arrival timestamps in an network > application) in eventlogs. At library level, it is supposed to be used like > the tracing functions in Debug.Trace but with ByteString argument: > > traceEventBinary :: ByteString -> a -> a > traceEventBinaryIO :: ByteString -> IO () > > Note that this can't live in base because of the dependency on bytestring. > > So how should I proceed from here? Am I supposed to submit a GHC proposal > or should I ask on the libraries list? This is not a prominently visible > change in GHC. It rather affects only ghc-prim and no effects in base. > > Thanks, > Mitsutoshi > > >
_______________________________________________ ghc-devs mailing list [email protected] http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
