hsass-0.8.0: Integrating Sass into Haskell applications.

Safe HaskellNone



Helper functions used by Compilation module.



peekUTF8CString :: CString -> IO String Source #

Marshal a NUL terminated C string (UTF-8 encoded) into Haskell string. It is equivalent to peekCString but with different encoding.

newUTF8CString :: String -> IO CString Source #

Marshal a Haskell string into a NUL terminated C string (UTF-8 encoded). It is equivalent to newCString but with different encoding.

withUTF8CString :: String -> (CString -> IO a) -> IO a Source #

Marshal a Haskell string into a C string (i.e., character array) in temporary storage, with explicit length information. It is equivalent to withCString but with different encoding.

newCStringFromBS :: ByteString -> IO CString Source #

Copies ByteString to newly allocated CString. The result must be explicitly freed using free or finalizerFree.