Re: Re[2]: [Haskell-cafe] The difficulty of designing a sequence class

2006-08-01 Thread Duncan Coutts
On Tue, 2006-08-01 at 14:37 +0400, Bulat Ziganshin wrote: > Hello Brian, > > Tuesday, August 1, 2006, 4:23:53 AM, you wrote: > > >> That's a tough call to make. Changing the kind of Sequence to * from * > >> -> * means losing the Functor, Monad, and MonadPlus superclasses and > >> all the various

Re: Re[2]: [Haskell-cafe] The difficulty of designing a sequence class

2006-08-01 Thread Brian Hulley
Bulat Ziganshin wrote: Hello Brian, Tuesday, August 1, 2006, 4:43:23 AM, you wrote: As you've pointed out, there are 2 separate issues that are in danger of being confused: 1) Forcing all sequence instances to support all operations 2) Bundling all the ops into a single huge class Collection

Re[2]: [Haskell-cafe] The difficulty of designing a sequence class

2006-08-01 Thread Bulat Ziganshin
Hello Einar, Tuesday, August 1, 2006, 1:58:30 PM, you wrote: > class ElementType c a | c -> a > class Foldable c where > fold :: ElementType c a => (a -> b -> b) -> b -> c -> b i love it! will it be possible to write smth like this: class Stream m h | h->m data T h = (Stream m h) => C (m Int

Re[2]: [Haskell-cafe] The difficulty of designing a sequence class

2006-08-01 Thread Bulat Ziganshin
Hello John, Tuesday, August 1, 2006, 6:27:29 AM, you wrote: > It is best to think of haskell primitives as something completely new, > they reuse some naming conventions from OO programming, but that doesn't > mean they suffer from the same limitations. It took me a few trys to > wrap my brain ar

Re[2]: [Haskell-cafe] The difficulty of designing a sequence class

2006-08-01 Thread Bulat Ziganshin
Hello Brian, Tuesday, August 1, 2006, 4:43:23 AM, you wrote: > As you've pointed out, there are 2 separate issues that are in danger of > being confused: > 1) Forcing all sequence instances to support all operations > 2) Bundling all the ops into a single huge class Collections library (darcs ge

Re[2]: [Haskell-cafe] The difficulty of designing a sequence class

2006-08-01 Thread Bulat Ziganshin
Hello Brian, Tuesday, August 1, 2006, 4:23:53 AM, you wrote: >> That's a tough call to make. Changing the kind of Sequence to * from * >> -> * means losing the Functor, Monad, and MonadPlus superclasses and >> all the various maps and zips. > But there's no option if you want to be able to suppo