-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Unicode
--   
--   Lightweight UTF8 handling
@package utf8-light
@version 0.4.4.0


-- | Lightweight UTF8 handling.
module Codec.Binary.UTF8.Light

-- | Instances: <tt>ByteString</tt>, <tt>String</tt> , <tt>[Word32]</tt>,
--   <tt>[Word]</tt> , <tt>[Int32]</tt>, <tt>[Int]</tt>
class UTF8 a
encode :: UTF8 a => a -> ByteString
decode :: UTF8 a => ByteString -> a

-- | Length in Word8s
lenUTF8 :: Word8 -> Int

-- | Length in Word16s
lenUTF16 :: Word16 -> Int

-- | Lengths in Word8s
countUTF8 :: ByteString -> [Int]
decodeUTF8 :: ByteString -> [Word32]
encodeUTF8 :: [Word32] -> ByteString

-- | Word32s not representing valid UTF8 chars are <i>dropped</i>.
encodeUTF8' :: [Word32] -> [[Word8]]
withUTF8 :: UTF8 a => a -> (ByteString -> b) -> b
putUTF8 :: UTF8 a => a -> IO ()
putUTF8Ln :: UTF8 a => a -> IO ()
hPutUTF8 :: UTF8 a => Handle -> a -> IO ()
hPutUTF8Ln :: UTF8 a => Handle -> a -> IO ()
readUTF8File :: UTF8 a => FilePath -> IO a
writeUTF8File :: UTF8 a => FilePath -> a -> IO ()
appendUTF8File :: UTF8 a => FilePath -> a -> IO ()
hGetUTF8Line :: UTF8 a => Handle -> IO a
hGetUTF8Contents :: UTF8 a => Handle -> IO a

-- | Be careful that you're sure you're not chopping a UTF8 char in two!
hGetUTF8 :: UTF8 a => Handle -> Int -> IO a

-- | Same warning as for <tt>hGetUTF8</tt>
hGetUTF8NonBlocking :: UTF8 a => Handle -> Int -> IO a

-- | <pre>
--   ghci&gt; putUTF8Ln $ flipUTF8 "[?np_bs!]"
--   [¡sq‾bu¿]
--   </pre>
flipUTF8 :: UTF8 a => a -> a

-- | <pre>
--   ghci&gt; putUTF8Ln $ (unflipUTF8 . flipUTF8) "[?np_bs!]"
--   [?np_bs!]
--   </pre>
unflipUTF8 :: UTF8 a => a -> a
flipTab :: [(Int, Int)]
unflipTab :: [(Int, Int)]
showHex :: Int -> String
toBits :: Word8 -> [Word8]
fromBits :: [Word8] -> Word8

-- | 8-bit signed integer type
data Int8

-- | 16-bit signed integer type
data Int16

-- | 32-bit signed integer type
data Int32

-- | A <a>Word</a> is an unsigned integral type, with the same size as
--   <a>Int</a>.
data Word

-- | 8-bit unsigned integer type
data Word8

-- | 16-bit unsigned integer type
data Word16

-- | 32-bit unsigned integer type
data Word32
c2w :: Char -> Word32
w2c :: Word32 -> Char
instance Codec.Binary.UTF8.Light.UTF8 Data.ByteString.Internal.Type.ByteString
instance Codec.Binary.UTF8.Light.UTF8 [GHC.Internal.Word.Word32]
instance Codec.Binary.UTF8.Light.UTF8 [GHC.Types.Word]
instance Codec.Binary.UTF8.Light.UTF8 [GHC.Internal.Int.Int32]
instance Codec.Binary.UTF8.Light.UTF8 [GHC.Types.Int]
instance Codec.Binary.UTF8.Light.UTF8 GHC.Internal.Base.String
