on d82d607 help sign in
ormolu/data/examples/declaration/value/function/case-multi-line-out.hs
37 lines 456 B history raw
1foo :: Int -> Int
2foo x = case x of
3 5 -> 10
4 _ -> 12
6bar :: Int -> Int
7bar x =
8 case x of
9 5 ->
10 if x > 5
11 then 10
12 else 12
13 _ -> 12
15baz :: Int -> Int
16baz x = case x of
17 5 -> 10
18 _ -> 12
20quux :: Int -> Int
21quux x = case x of
22 x -> x
24withGuards :: Int -> Int
25withGuards x =
26 case x of
27 x
28 | x > 10 ->
29 foo +
30 bar
31 x | x > 5 -> 10
32 _ -> 20
34funnyComment =
35 -- comment
36 case () of
37 () -> ()