summaryrefslogtreecommitdiff
path: root/testsuite/tests/parser/should_compile/read011.hs
blob: 7e20d468f0be8e2081434c72331dc5f83d5a4b29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-- !!! do & where interaction
module ShouldCompile where

f1 :: IO a -> IO [a]
f1 x = do
  v <- x
  return [v]
 where
  g x = [x,x]

f2 :: IO a -> IO [a]
f2 x = do
  v <- x
  return (g v)
   where
    g x = [x,x]

f3 :: IO a -> IO [a]
f3 x = do
  v <- x
  return (g v)
  where
   g x = [x,x]