summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/T9400.hs
blob: 85aad5156417c000d800ac209742c2fb936080d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module T9400 (main) where
import GHC.Base

str = "defg"

main :: IO ()
main = do
    case "abc" of
        (x:y:xs) -> putStrLn xs
    case "" of
        [] -> putStrLn "x"
    case "ab" of
        [] -> putStrLn "y"
        (x:y:[]) -> putStrLn "z"
    case str of
        (x:xs) -> putStrLn xs
    case "ab" of
        "" -> putStrLn "fail"
    case "\0abc" of
        (x:xs) -> putStrLn xs
    case "zażółćz" of
        (x:xs) -> putStrLn xs