23b37098540199a04dd03f148f14d4adcf486e1d
[ghc.git] / testsuite / tests / deSugar / should_compile / ds014.hs
1 -- !!! ds014 -- character and string literals
2 -- !!! really should add ALL weird forms...
3
4 module ShouldCompile where
5
6 a = 'a'
7 b = "b"
8 c = a:b
9 d = b ++ b
10
11 b1 = "" -- examples from the Haskell report
12 b2 = "\&" -- the same thing
13 b3 = "\SO\&H" ++ "\137\&9"
14
15 a000 = '\NUL'
16 a001 = '\SOH'
17 a002 = '\STX'
18 a003 = '\ETX'
19 a004 = '\EOT'
20 a005 = '\ENQ'
21 a006 = '\ACK'
22 a007 = '\BEL'
23 a010 = '\BS'
24 a011 = '\HT'
25 a012 = '\LF'
26 a013 = '\VT'
27 a014 = '\FF'
28 a015 = '\CR'
29 a016 = '\SO'
30 a017 = '\SI'
31 a020 = '\DLE'
32 a021 = '\DC1'
33 a022 = '\DC2'
34 a023 = '\DC3'
35 a024 = '\DC4'
36 a025 = '\NAK'
37 a026 = '\SYN'
38 a027 = '\ETB'
39 a030 = '\CAN'
40 a031 = '\EM'
41 a032 = '\SUB'
42 a033 = '\ESC'
43 a034 = '\FS'
44 a035 = '\GS'
45 a036 = '\RS'
46 a037 = '\US'
47 a040 = '\SP'
48 a042 = '"'
49 a047 = '\''
50 a134 = '\\'
51 a177 = '\DEL'
52
53 ascii = "\NUL\SOH\STX\ETX\EOT\ENQ\ACK\BEL\
54 \\BS\HT\LF\VT\FF\CR\SO\SI\
55 \\DLE\DC1\DC2\DC3\DC4\NAK\SYN\ETB\
56 \\CAN\EM\SUB\ESC\FS\GS\RS\US\
57 \\SP!\"#$%&'\
58 \()*+,-./\
59 \01234567\
60 \89:;<=>?\
61 \@ABCDEFG\
62 \HIJKLMNO\
63 \PQRSTUVW\
64 \XYZ[\\]^_\
65 \`abcdefg\
66 \hijklmno\
67 \pqrstuvw\
68 \xyz{|}~\DEL"
69
70 na200 = '\o200'
71 na250 = '\o250'
72 na300 = '\o300'
73 na350 = '\o350'
74 na377 = '\o377'
75
76 eightbit = "\o200\o250\o300\o350\o377"