File: do-block.test

package info (click to toggle)
hlint 3.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 980 kB
  • sloc: haskell: 7,035; lisp: 86; makefile: 5
file content (17 lines) | stat: -rw-r--r-- 364 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
---------------------------------------------------------------------
RUN tests/do-block.hs --hint=data/do-block.yaml
FILE tests/do-block.hs
h x = case f x of
  Just n -> g n
  Nothing -> Nothing
OUTPUT
tests/do-block.hs:(1,7)-(3,20): Warning: Redundant Nothing
Found:
  case f x of
    Just n -> g n
    Nothing -> Nothing
Perhaps:
  do n <- f x
     g n

1 hint