byteslice-0.2.5.1: src-no-unlifted-newtypes/UnliftedBytes.hs
{-# language MagicHash #-}
{-# language TypeFamilies #-}
{-# language TypeInType #-}
{-# language UndecidableInstances #-}
{-# language UnliftedFFITypes #-}
module UnliftedBytes
( Bytes#
, cstringLength#
) where
import GHC.TypeLits
import GHC.Exts (Addr#,Int#,RuntimeRep(..),TYPE)
type family Bytes# :: TYPE ('TupleRep '[ 'UnliftedRep,'IntRep,'IntRep]) where
Bytes# = TypeError ('Text "Bytes# not available before GHC 8.10")
foreign import ccall unsafe "strlen" c_strlen :: Addr# -> Int#
cstringLength# :: Addr# -> Int#
cstringLength# = c_strlen