Typo
[packages/base.git] / tests / show001.hs
1 -- !!! Testing Show on Maybes and Eithers
2 module Main(main) where
3
4 x :: Maybe ()
5 x = Nothing
6
7 main :: IO ()
8 main = do
9 print x
10 print (Just ())
11 print ((Just (Just ())) :: Maybe (Maybe ()))
12 print (Just x)
13 print ((Left 'a') :: Either Char Int)
14 print ((Right 'b') :: Either Int Char)
15 print ((Right x) :: Either Int (Maybe ()))
16 print ((Right (Just 'c')) :: Either Int (Maybe Char))
17 print ((Right (Right 'd')) :: Either Int (Either Char Char))
18 print ((Right (Left 'e')) :: Either Int (Either Char Int))
19 print ((Left 'f') :: Either Char Int)
20 print ((Left x) :: Either (Maybe ()) Char)
21 print ((Left (Just 'g')) :: Either (Maybe Char) ())
22 print ((Left (Right 'h')) :: Either (Either Int Char) Char)
23 print ((Left (Right 'i')) :: Either (Either Int Char) ())
24