packages feed

MicroHs-0.17.4.0 / tests / Unicode.hs

module Unicode(main) whereimport Data.Charmain :: IO ()main = do  putStrLn "abc"  putStrLn "\xe5\&bc"  putStrLn "\x402\xa88"  writeFile "unicode.tmp" "\xe5\&bc"  ustr <- readFile "unicode.tmp"  print $ ustr == "\xe5\&bc"  let a = "å ä ö"  putStrLn a  print $ map isLower a  print $ map isUpper a  putStrLn $ map toUpper a  print $ map (isUpper . toUpper) a  let printCases c = putStrLn $ toLower c : toTitle c : toUpper c : ""  printCases '\x01C4' -- upper  printCases '\x01C5' -- title  printCases '\x01C6' -- lower  printCases '\x2168' -- IX  printCases '\x2178' -- ixdata Option a where  Some ∷ a ⇒ Option a  None ∷ Option afoo ∷ ∀ α . Eq α ⇒ α → αfoo x = if  | x == x → x  | otherwise → undefinedbar ∷ ∀ α → (→) α αbar _ = idpattern Sings ∷ a → [a] → [a]pattern Sings a as ← as@[a]