ByteArr# - nullByteArr# anyone?

John Meacham john at repetae.net
Tue Jan 23 22:16:33 EST 2007


I would like to create a datatype that contains some memory managed by
the GHC runtime, the natural fit is ByteArr#, however, in the common
case, the ByteArr# won't actually have anything in it. would it be
possible to have a single constant 'nullByteArr#'? I can't define a top
level value of type ByteArr# and creating these values is in very
performance critical code so I am not quite sure what to do. It would
also be nice if byteArrContents# returned 'nullAddr#' for such byte
arrays, but it is not a strict requirement. 

        John


-- 
John Meacham - ⑆repetae.net⑆john⑈


More information about the Glasgow-haskell-users mailing list