-liftAscii a = [| A.unsafeFromByteString
- $ unsafePerformIO
- $ Strict.unsafePackAddressLen $len $ptr
- |]
- where
- bs ∷ Strict.ByteString
- bs = A.toByteString a
-
- len, ptr ∷ Q Exp
- len = lift $ Strict.length bs
- ptr = litE $ stringPrimL $ Strict.unpack bs