hsass-0.7.0: Integrating Sass into Haskell applications.

Safe HaskellNone
LanguageHaskell2010

Text.Sass.Marshal.Internal

Description

Helper functions used by Compilation module.

Synopsis

Documentation

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 (ie, 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.