Re: [Haskell-cafe] Monomorphic containers, Functor/Foldable/Traversable WAS: mapM_ for bytestring

2013-09-16 Thread Michael Snoyman
On Tue, Sep 17, 2013 at 4:25 AM, John Lato wrote: > On Mon, Sep 16, 2013 at 4:57 AM, Michael Snoyman wrote: > >> >> I think I just made a bad assumption about what you were proposing. If I >> was going to introduce a typeclass like this, I'd want it to support `Set`, >> since IME it's the most co

Re: [Haskell-cafe] Monomorphic containers, Functor/Foldable/Traversable WAS: mapM_ for bytestring

2013-09-16 Thread John Lato
On Mon, Sep 16, 2013 at 4:57 AM, Michael Snoyman wrote: > > > > On Mon, Sep 16, 2013 at 10:34 AM, John Lato wrote: > >> On Fri, Sep 13, 2013 at 12:48 AM, Michael Snoyman wrote: >> >>> >>> >>> >>> On Thu, Sep 12, 2013 at 2:37 AM, John Lato wrote: >>> I didn't see this message and replied pri

Re: [Haskell-cafe] Monomorphic containers, Functor/Foldable/Traversable WAS: mapM_ for bytestring

2013-09-16 Thread Michael Snoyman
On Mon, Sep 16, 2013 at 10:34 AM, John Lato wrote: > On Fri, Sep 13, 2013 at 12:48 AM, Michael Snoyman wrote: > >> >> >> >> On Thu, Sep 12, 2013 at 2:37 AM, John Lato wrote: >> >>> I didn't see this message and replied privately to Michael earlier, so >>> I'm replicating my comments here. >>> >>

Re: [Haskell-cafe] Monomorphic containers, Functor/Foldable/Traversable WAS: mapM_ for bytestring

2013-09-16 Thread John Lato
On Fri, Sep 13, 2013 at 12:48 AM, Michael Snoyman wrote: > > > > On Thu, Sep 12, 2013 at 2:37 AM, John Lato wrote: > >> I didn't see this message and replied privately to Michael earlier, so >> I'm replicating my comments here. >> >> > Sorry about that, I wrote to you privately first and then tho

Re: [Haskell-cafe] Monomorphic containers, Functor/Foldable/Traversable WAS: mapM_ for bytestring

2013-09-13 Thread Michael Snoyman
On Fri, Sep 13, 2013 at 10:07 AM, Mario Blažević wrote: > On 09/13/13 02:28, Michael Snoyman wrote: > >> >> >> >> On Fri, Sep 13, 2013 at 9:18 AM, Mario Blažević > blama...@acanac.net>> wrote: >> >> On 09/13/13 01:51, Michael Snoyman wrote: >> >> On Fri, Sep 13, 2013 at 5:38 AM, Ma

Re: [Haskell-cafe] Monomorphic containers, Functor/Foldable/Traversable WAS: mapM_ for bytestring

2013-09-13 Thread Mario Blažević
On 09/13/13 02:28, Michael Snoyman wrote: On Fri, Sep 13, 2013 at 9:18 AM, Mario Blažević > wrote: On 09/13/13 01:51, Michael Snoyman wrote: On Fri, Sep 13, 2013 at 5:38 AM, Mario Blažević mailto:blama...@acanac.net>

Re: [Haskell-cafe] Monomorphic containers, Functor/Foldable/Traversable WAS: mapM_ for bytestring

2013-09-12 Thread Michael Snoyman
On Fri, Sep 13, 2013 at 9:18 AM, Mario Blažević wrote: > On 09/13/13 01:51, Michael Snoyman wrote: >> >> On Fri, Sep 13, 2013 at 5:38 AM, Mario Blažević > blama...@acanac.net>> wrote: >> >> On 09/11/13 19:37, John Lato wrote: >> >> >> 3. I'm not entirely sure that the length* functio

Re: [Haskell-cafe] Monomorphic containers, Functor/Foldable/Traversable WAS: mapM_ for bytestring

2013-09-12 Thread Mario Blažević
On 09/13/13 01:51, Michael Snoyman wrote: On Fri, Sep 13, 2013 at 5:38 AM, Mario Blažević > wrote: On 09/11/13 19:37, John Lato wrote: 3. I'm not entirely sure that the length* functions belong here. I understand why, and I think it's s

Re: [Haskell-cafe] Monomorphic containers, Functor/Foldable/Traversable WAS: mapM_ for bytestring

2013-09-12 Thread Michael Snoyman
On Fri, Sep 13, 2013 at 5:38 AM, Mario Blažević wrote: > On 09/11/13 19:37, John Lato wrote: > >> I didn't see this message and replied privately to Michael earlier, so >> I'm replicating my comments here. >> >> 1. Sooner or later I expect you'll want something like this: >> >> class LooseMap c

Re: [Haskell-cafe] Monomorphic containers, Functor/Foldable/Traversable WAS: mapM_ for bytestring

2013-09-12 Thread Michael Snoyman
On Thu, Sep 12, 2013 at 2:37 AM, John Lato wrote: > I didn't see this message and replied privately to Michael earlier, so I'm > replicating my comments here. > > Sorry about that, I wrote to you privately first and then thought this might be a good discussion for the cafe. > 1. Sooner or late

Re: [Haskell-cafe] Monomorphic containers, Functor/Foldable/Traversable WAS: mapM_ for bytestring

2013-09-12 Thread Mario Blažević
On 09/11/13 19:37, John Lato wrote: I didn't see this message and replied privately to Michael earlier, so I'm replicating my comments here. 1. Sooner or later I expect you'll want something like this: class LooseMap c el el' where lMap :: (el -> el') -> c el -> c el' It covers the case of

Re: [Haskell-cafe] Monomorphic containers, Functor/Foldable/Traversable WAS: mapM_ for bytestring

2013-09-11 Thread John Lato
I didn't see this message and replied privately to Michael earlier, so I'm replicating my comments here. 1. Sooner or later I expect you'll want something like this: class LooseMap c el el' where lMap :: (el -> el') -> c el -> c el' It covers the case of things like hashmaps/unboxed vectors t

[Haskell-cafe] Monomorphic containers, Functor/Foldable/Traversable WAS: mapM_ for bytestring

2013-09-11 Thread Michael Snoyman
That's really funny timing. I started work on a very similar project just this week: https://github.com/snoyberg/mono-traversable It's not refined yet, which is why I haven't discussed it too publicly, but it's probably at the point where some review would make sense. There's been a bit of a disc