Ticket #1103: UniTest.hs

File UniTest.hs, 720 bytes (added by humasect, 7 years ago)

1 working out of 3 unicode tests

Line 
1{-# OPTIONS -fglasgow-exts #-}
2
3{-
4        Three kinds of Unicode tests for our purposes.
5
6        Note that GHC_OPTIONS instead of OPTIONS above does not work.
7-}
8
9module UniTest where
10
11-- Working Unicode test.
12
13() a b = a ++ b
14
15aaa  Num a  a  String
16aaa x = (show x)  ".test"
17
18test1  IO ()
19test1 = do
20        putStrLn $ aaa 123456789
21
22-- Non working lambda Unicode test. We notice the page http://hackage.haskell.org/trac/haskell-prime/wiki/UnicodeInHaskellSource
23-- has removed this feature.
24
25test2  IO ()
26test2 = do
27        putStrLn (show $ map (λx  x + 1.223 + (-x)) [123, 456, 789])
28
29-- Non working Japanese Unicode test.
30
31てすと3  IO ()
32てすと3 = do
33        putStrLn $ show 人間虫 where
34        人間虫 = "humasect"