summaryrefslogtreecommitdiff
path: root/testsuite/tests/parser/should_run/ParserMultiWayIf.hs
blob: 83bd2e94a799a59213160e334b5db1db972baf98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-# 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

main = print $ x5 == 2