Ticket #1103: UniTest.hs

File UniTest.hs, 0.7 KB (added by humasect, 5 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"