[Haskell-cafe] IntMap documentation error
Louis Wasserman
wasserman.louis at gmail.com
Mon Feb 23 18:22:31 EST 2009
In the documentation for Data.IntMap updateMin, a piece of example
code both communicates incorrect intuition, and fails to even compile.
updateMin :: (a -> a) -> IntMap a -> IntMap a
updateMin (\ _ -> Nothing) (fromList [(5,"a"), (3,"b")]) -- code
straight from the docs
<interactive>:1:49:
Couldn't match expected type `Maybe a'
against inferred type `[Char]'
In the expression: "a"
In the expression: (5, "a")
In the first argument of `fromList', namely `[(5, "a"), (3, "b")]'
As a side note, the sort of operation implied by the example code was
really what I was looking for in the documentation -- but such a
method no longer exists in IntMap. ::sad::
Who do I tell this to / how do I ask to get it fixed?
Louis Wasserman
wasserman.louis at gmail.com
More information about the Haskell-Cafe
mailing list