#5756: Specialize sequence into sequence_ automatically -------------------------------+-------------------------------------------- Reporter: EyalLotem | Owner: Type: feature request | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.2.1 Resolution: wontfix | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Difficulty: Unknown Testcase: | Blockedby: Blocking: | Related: -------------------------------+-------------------------------------------- Changes (by igloo):
* status: new => closed * difficulty: => Unknown * resolution: => wontfix Comment: Note that with `-Wall` you get a warning if you ignore a non-`()` result: {{{ module Q where f :: IO () f = do sequence [putStr "A", putStr "B"] putStr "C" }}} {{{ $ ghc -c -O q.hs -fforce-recomp -Wall q.hs:5:8: Warning: A do-notation statement discarded a result of type [()]. Suppress this warning by saying "_ <- sequence [putStr "A", putStr "B"]", }}} Thanks for the suggestion, but I'm not sure it's worth adding a special case to the compiler to do the rewrite - especially as it's not a type- preserving transformation. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5756#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs