#2644: type of IntMap.intersection[WithKey] is incorrect
---------------------------------+------------------------------------------
Reporter: sedillard | Owner:
Type: bug | Status: new
Priority: normal | Component: libraries (other)
Version: 6.8.3 | Severity: normal
Keywords: containers | Testcase:
Architecture: Unknown/Multiple | Os: Unknown/Multiple
---------------------------------+------------------------------------------
`IntMap.intersectionWith` has declared type `(a -> b -> a) -> IntMap a ->
IntMap b -> IntMap a` but the true type, correctly inferred by the
compiler, is `(a -> b -> c) -> IntMap a -> IntMap b -> IntMap c`. This is
also the type of the analogous function in the Data.Map library. This
broader type signature is necessary for "zipping" maps, i.e.
`intersectionWith (,)`.
See list post :
http://www.haskell.org/pipermail/libraries/2008-May/009677.html
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2644>
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