summaryrefslogtreecommitdiff
path: root/testsuite/tests/parser/should_fail/T8501a.hs
blob: e8b06415e41a98b9145561d1aa595774465e63d4 (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
25
26
27
module Test where

foo :: IO ()
foo = do
  rec str <- return "foo"
  putStrLn str

-- Should fail
-- foo' :: IO ()
-- foo' = do
--   rec {str <- return "foo" ;
--   putStrLn str}
--   return ()

-- Should fail
-- foo'' :: IO ()
-- foo'' = do
--   rec putStrLn "test"
--   str <- return "foo"
--   putStrLn str
--   return ()

-- Should compile
-- foo'''' :: IO ()
-- foo'''' = do
--   rec <- return "foo"
--   putStrLn "test"