summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T7856.hs
blob: 21bd41701d518aa54c70590a68b652a34a61fd6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module T7856 where

tmp :: String -> IO ()
tmp = sequence_ lst
  where lst = [putStrLn "hi"]

-- sequence_ :: Monad m => [m a] -> m ()

{-    m () ~ (->) String (IO ())    -- From result of sequence_
      m a  ~ IO ()                  -- From argument of sequence_

Depends which one gets treated first.
  m := IO 
is better than
  m := (->) String
It's a bit random which is chosen.

I'll put it in regression suite so we see if it wobbles around.
-}