File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,15 @@ no = \(x -> y) -> z
2222yes = (`foo` (bar baz)) -- @Suggestion (`foo` bar baz)
2323yes = f ((x)) -- @Warning x
2424main = do f; (print x) -- @Suggestion do f print x
25+ yes = f (x) y -- @Warning x
26+ no = f (+x) y
27+ no = f ($x) y
28+ no = ($x)
29+ yes = (($x)) -- @Warning ($x)
30+ no = ($1)
31+ yes = (($1)) -- @Warning ($1)
32+ no = (+5)
33+ yes = ((+5)) -- @Warning (+5)
2534
2635-- type bracket reduction
2736foo :: (Int -> Int) -> Int
Original file line number Diff line number Diff line change 1+ ---------------------------------------------------------------------
2+ RUN tests/bracket-slice.hs
3+ FILE tests/bracket-slice.hs
4+
5+ fAnd :: [a -> Bool] -> a -> Bool
6+ fAnd fs x = all ($x) fs
7+
8+ OUTPUT
9+ No hints
10+
11+ ---------------------------------------------------------------------
12+ RUN tests/bracket-slice-spaced.hs
13+ FILE tests/bracket-slice-spaced.hs
14+
15+ fAnd :: [a -> Bool] -> a -> Bool
16+ fAnd fs x = all ($ x) fs
17+
18+ OUTPUT
19+ No hints
20+
21+ ---------------------------------------------------------------------
22+ RUN tests/bracket-slice-plus.hs
23+ FILE tests/bracket-slice-plus.hs
24+
25+ incAll :: [Int] -> Int -> [Int]
26+ incAll ys x = map (+x) fs
27+
28+ OUTPUT
29+ No hints
You can’t perform that action at this time.
0 commit comments