[Haskell-cafe] Functions from Data.Hashtable

Peter Verswyvelen bugfact at gmail.com
Tue Apr 7 18:23:44 EDT 2009


These functions have their arguments reversed when compare to e.g. Map
For example

Data.HashTable.lookup<http://haskell.org/ghc/docs/latest/html/libraries/base/Data-HashTable.html#v%3Alookup>
 :: HashTable<http://haskell.org/ghc/docs/latest/html/libraries/base/Data-HashTable.html#t%3AHashTable>
key
val -> key -> IO<http://haskell.org/ghc/docs/latest/html/libraries/base/System-IO.html#t%3AIO>
 (Maybe<http://haskell.org/ghc/docs/latest/html/libraries/base/Data-Maybe.html#t%3AMaybe>
 val)

Data.Map.lookup<http://hackage.haskell.org/packages/archive/containers/0.2.0.0/doc/html/Data-Map.html#v%3Alookup>
 :: Ord<http://hackage.haskell.org/packages/archive/base/4.0.0.0/doc/html/Data-Ord.html#t%3AOrd>
key
=> key -> Map<http://hackage.haskell.org/packages/archive/containers/0.2.0.0/doc/html/Data-Map.html#t%3AMap>
key
val -> Maybe<http://hackage.haskell.org/packages/archive/base/4.0.0.0/doc/html/Data-Maybe.html#t%3AMaybe>
 val

I find this a bit odd. Is this by design?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090408/a6aea57f/attachment.htm


More information about the Haskell-Cafe mailing list