#4976: zipWith static argument transformation
---------------------------------+------------------------------------------
Reporter: aristidb | Owner:
Type: feature request | Status: new
Priority: normal | Component: libraries/base
Version: 7.0.1 | Keywords:
Testcase: | Blockedby:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Currently, zipWith cannot be inlined (I think), because it is implemented
as such:
{{{
zipWith :: (a->b->c) -> [a]->[b]->[c]
zipWith f (a:as) (b:bs) = f a b : zipWith f as bs
zipWith _ _ _ = []
}}}
So why not apply this SAT:
{{{
zipWith f = go
where go (a:as) (b:bs) = f a b : go as bs
go _ _ = []
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4976>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs