shithub: MicroHs

ref: c5052bb7882174ed1fe11da99dbbe9facb45bcb3
dir: /tests/StringTest.hs/

View raw version
module StringTest(module StringTest) where
import Prelude

main :: IO ()
main = do
  putStrLn $ if eqString "abc" "abc" then "yes" else "no"
  putStrLn $ if eqString "abc" "adc" then "yes" else "no"
  putStrLn $ showInt 1234
  putStrLn $ showInt 0
  putStrLn $ showInt (negate 567)
  putStrLn $ showChar 'x'
  putStrLn $ showChar '\n'
  putStrLn $ showBool False
--  putStrLn $ showUnit ()
  putStrLn $ showList showInt [1,20,3]
  putStrLn $ showList showInt [1]
  putStrLn $ showList showInt []
  putStrLn $ showPair showInt showChar (123, 'a')
  putStrLn $ showMaybe showInt Nothing
  putStrLn $ showMaybe showInt (Just 890)
  putStrLn $ showEither showInt showBool (Left 678)
  putStrLn $ showEither showInt showBool (Right True)