I'm using the Data.Enumerator library. I'm trying to write a map
function that converts an Enumerator of one type to another.
Something like:
mapEnum :: Monad m =
(a - b) -
Enumerator a m r -
Enumerator b m r
Any hints?
(My exact use case is that I have a
On Wed, Dec 21, 2011 at 12:35 PM, Kannan Goundan kan...@cakoose.com wrote:
I'm using the Data.Enumerator library. I'm trying to write a map
function that converts an Enumerator of one type to another.
Something like:
mapEnum :: Monad m =
(a - b) -
Enumerator a m r -
Michael Snoyman wrote:
On Wed, Dec 21, 2011 at 12:35 PM, Kannan Goundan kan...@cakoose.com
wrote:
I'm using the Data.Enumerator library. I'm trying to write a map
function that converts an Enumerator of one type to another. Something
like:
mapEnum :: Monad m =
(a - b) -
On Wed, Dec 21, 2011 at 12:59 PM, Kannan Goundan kan...@cakoose.com wrote:
Michael Snoyman wrote:
On Wed, Dec 21, 2011 at 12:35 PM, Kannan Goundan kan...@cakoose.com
wrote:
I'm using the Data.Enumerator library. I'm trying to write a map
function that converts an Enumerator of one type to
Michael Snoyman wrote:
On Wed, Dec 21, 2011 at 12:59 PM, Kannan Goundan kan...@cakoose.com
wrote:
Michael Snoyman wrote:
On Wed, Dec 21, 2011 at 12:35 PM, Kannan Goundan kan...@cakoose.com
wrote:
I'm using the Data.Enumerator library. I'm trying to write a map
function that converts an
Kannan Goundan wrote:
You're right -- now that I think about it, I don't really care what the
type of 'r' is. (Boy, I could have saved several hours today if I had
realized that earlier :-)
I seem to be hitting exactly the same problem. I constrain my types
too early and the compiler can't
The presence of (Step b m r) is an artifact of Haskell's type system.
It can be removed through use of language extensions and 'forall' to
give a more aesthetically pleasing signature, but there should be no
behavioral difference.
On Wed, Dec 21, 2011 at 03:26, Michael Snoyman mich...@snoyman.com