1 --!!! Testing top level printer (note that this doesn't necessarily test show)
3 -- Test things of type String
5 test1, test2, test3 :: String
10 test4 = "abc" ++ error "def" ++ "hij"
11 test5 = "abc" ++ [error "def"] ++ "hij"
12 test6 = 'a' : 'b' : 'c' : error "foo"
13 test7 = 'a' : 'b' : 'c' : error "foo" : []
14 test8 = show (error "foo"::String)
16 test11, test12 :: String
17 test11 = case (error "foo") of _ -> "abcd"
18 test12 = case (error "foo") of [] -> "abcd"
20 test13, test14 :: String
21 test13 = error (error "foo")
26 -- Test things of type IO ()
28 {- can't include this in backwards compatability tests
32 test101, test102, test103 :: IO ()
33 test101 = putStr "abcd"
39 test111, test112, test113, test114 :: IO ()
41 test112 = putStr (error "foo")
42 test113 = putStr "abcd" >> putStr (error "foo") >> putStr "efgh"
43 test114 = putStr "abcd" >> error "foo" >> putStr "efgh"
45 test123, test124, test125 :: IO ()
46 test123 = error (error "foo")
47 test124 = error x where x = error x
48 test125 = error x where x = 'a' : error x
52 -- Test things of type a
56 test241, test242 :: ()
62 test251, test252 :: Int
66 test253, test254 :: Int
67 test253 = 42 + error "foo"
68 test254 = error "foo" + 42
72 test261, test262 :: Integer
78 test271, test272 :: Float
84 test281, test282 :: Double
90 test291, test292, test293 :: Char
97 test301, test302 :: [Int]
109 test322 = ('a','b','c')
111 test323 :: (Int,Int, Int)
112 test323 = (1, error "foo", 3)
116 data E a b = L a | R b
124 -- No dialogue tests in this file