How about (in Haskell98)
module Data.List ( foldr, ...)
import qualified Data.Foldable
foldr :: (a - b - b) - b - [a] - b
foldr = Data.Foldable.foldr
Simon
| -Original Message-
| From: glasgow-haskell-users-boun...@haskell.org [mailto:glasgow-haskell-
|
On May 24, 2013, at 9:28 AM, Simon Peyton-Jones wrote:
How about (in Haskell98)
module Data.List ( foldr, ...)
import qualified Data.Foldable
foldr :: (a - b - b) - b - [a] - b
foldr = Data.Foldable.foldr
It would not be the same! Using your example one will get
Oh my! Now it's getting complicated.
* I suppose that if Data.List re-exports foldr, it would go with the more
specific type.
* In your example, can I also use the more-polymorphic foldr, perhaps by saying
Data.Foldable.foldr?
* I wonder what would happen if Data.Foo specialised foldr in a