
#9949: zipWith too strict in second argument in GHC-7.10.0 -------------------------------------+------------------------------------- Reporter: Lemming | Owner: ekmett Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 7.10.1-rc1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by Lemming): I found the difference because my `mapAdjacent` function uses `tail` in the second argument of `zipWith`: {{{ mapAdjacent :: (a -> a -> b) -> [a] -> [b] mapAdjacent f xs = zipWith f xs (tail xs) }}} I get: {{{ $ ghci-7.10.0.20141227 *Prelude> Data.List.HT.mapAdjacent (==) ([] :: [Int]) *** Exception: Prelude.tail: empty list }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9949#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler