    {-# OPTIONS_HADDOCK hide #-}
    -- Copyright 2009 Corey O'Connor
    module Codec.Binary.UTF8.Debug where

    import Codec.Binary.UTF8.String ( encode )

    import Data.Word

    import Numeric

    -- | Converts an array of ISO-10646 characters (Char type) to an array
    -- of Word8 bytes that is the corresponding UTF8 byte sequence
    utf8FromIso :: [Int] -> [Word8]
    utf8FromIso :: [Int] -> [Word8]
    utf8FromIso = String -> [Word8]
    encode (String -> [Word8]) -> ([Int] -> String) -> [Int] -> [Word8]
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Int -> Char) -> [Int] -> String
    forall a b. (a -> b) -> [a] -> [b]
    map Int -> Char
    forall a. Enum a => Int -> a
    toEnum

    ppUtf8 :: [Int] -> IO ()
    ppUtf8 :: [Int] -> IO ()
    ppUtf8 = [String] -> IO ()
    forall a. Show a => a -> IO ()
    print ([String] -> IO ()) -> ([Int] -> [String]) -> [Int] -> IO ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . ((String -> String) -> String) -> [String -> String] -> [String]
    forall a b. (a -> b) -> [a] -> [b]
    map (\f :: String -> String
    f -> String -> String
    f "") ([String -> String] -> [String])
    -> ([Int] -> [String -> String]) -> [Int] -> [String]
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Word8 -> String -> String) -> [Word8] -> [String -> String]
    forall a b. (a -> b) -> [a] -> [b]
    map Word8 -> String -> String
    forall a. (Integral a, Show a) => a -> String -> String
    showHex ([Word8] -> [String -> String])
    -> ([Int] -> [Word8]) -> [Int] -> [String -> String]
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . [Int] -> [Word8]
    utf8FromIso