
#10060: The Traversable instance for Array looks unlikely to be good -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: dfeuer Type: bug | Status: new Priority: normal | Milestone: Component: Core | Version: 7.11 Libraries | Operating System: Unknown/Multiple Keywords: | Type of failure: Runtime Architecture: | performance bug Unknown/Multiple | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Currently, {{{#!hs instance Ix i => Traversable (Array i) where traverse f arr = listArray (bounds arr) `fmap` traverse f (elems arr) }}} Since `traverse` is (inherently) not a good producer for list fusion, this looks suspicious. I think we almost certainly want to walk the array by hand instead. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10060 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler