summaryrefslogtreecommitdiff
path: root/testsuite/tests/parser/should_run/ParserMultiWayIf.hs
blob: 9e69a8ff815abb975669093dd994b508bb34e631 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{-# LANGUAGE MultiWayIf #-}

module Main where

x  = 10
x1 = if | x < 10 -> "< 10" | otherwise -> ""
x2 = if | x < 10 -> "< 10"
        | otherwise -> ""
x3 = if | x < 10 -> "< 10"
        | otherwise -> ""
x4 = if | True -> "yes"
x5 = if | True -> if | False -> 1 | True -> 2

x6 = if | x < 10 -> if | True -> "yes"
                       | False -> "no"
        | otherwise -> "maybe"

x7 = (if | True -> 0)

main = print $ x5 == 2 && x6 == "maybe" && x7 == 0