Bikeshedding the cstringLength name?

Viktor Dukhovni ietf-dane at
Sat Jan 23 03:07:28 UTC 2021

An equivalent function of course already exists outside base:

    $ hoogle 'CString -> IO CSize'
    Data.ByteString.Internal c_strlen :: CString -> IO CSize

unsurprisingly defined as:

    foreign import ccall unsafe "string.h strlen" c_strlen
        :: CString -> IO CSize

Would it make sense to give the proposed new Foreign.C.Types function
the same "c_strlen" name?  And then at some point in the future,
Data.ByteString.Internal can just re-export it?

Would using `cstringLength`, as proposed, be too confusable with the
`cstringLength#` primop?


More information about the Libraries mailing list