Re: [Haskell-cafe] Why can't we make an instance declaration on a type synonym?

2010-01-02 Thread Ivan Lazar Miljenovic
jberryman writes: > This may be a dumb question, but why can we not declare a Monad > instance of a type synonym? This question came to me while working > with the State monad recently and feeling that the requirement that we > wrap our functions in the State constructor is a bit... kludgy. > Be

[Haskell-cafe] ANNOUNCE: PriorityChansConverger-0.1

2010-01-02 Thread Andrey Sisoyev
Hello, cafe! Didn't find it in HackageDB, so made it. http://hackage.haskell.org/package/PriorityChansConverger Category: concurency Converges multiple channels into one. When user reads from the PCC, the choice is made - from which channel to read. System selects a nonempty channel, whose (Curr

Re: [Haskell-cafe] Why can't we make an instance declaration on a type synonym?

2010-01-02 Thread Daniel Fischer
Am Sonntag 03 Januar 2010 05:37:31 schrieb Jason Dusek: > Well, you can, with: > > -XTypeSynonymInstances > > though I'm not sure it addresses your specific need. Doesn't help him here, he would need instance Monad (State s) where ... but that would be a partially applied type synonym. H

Re: [Haskell-cafe] Why can't we make an instance declaration on a type synonym?

2010-01-02 Thread Jason Dusek
Well, you can, with: -XTypeSynonymInstances though I'm not sure it addresses your specific need. -- Jason Dusek ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Why can't we make an instance declaration on a type synonym?

2010-01-02 Thread jberryman
This may be a dumb question, but why can we not declare a Monad instance of a type synonym? This question came to me while working with the State monad recently and feeling that the requirement that we wrap our functions in the State constructor is a bit... kludgy. Why can't the State monad be def

Re: [Haskell-cafe] Re: FASTER primes

2010-01-02 Thread Daniel Fischer
Am Samstag 02 Januar 2010 14:13:29 schrieb Will Ness: > Daniel Fischer web.de> writes: > > Am Mittwoch 30 Dezember 2009 20:46:57 schrieb Will Ness: > > > Daniel Fischer web.de> writes: > > > > Am Dienstag 29 Dezember 2009 20:16:59 schrieb Daniel Fischer: > > > > > > especially the claim that goin

Re: [Haskell-cafe] Space Efficiency When Sorting a List of Many Lists

2010-01-02 Thread Peter Green
On 31/12/2009, at 6:38 PM, Luke Palmer wrote: On Wed, Dec 30, 2009 at 9:39 PM, Peter Green wrote: I can guess that there might be be less laziness and more instantiation when sorting is introduced, Yes, by a lot. Sorting requires keeping the entire list in memory. And Haskell lists, unf

[Haskell-cafe] Re: FASTER primes

2010-01-02 Thread Will Ness
Daniel Fischer web.de> writes: > > > Am Mittwoch 30 Dezember 2009 20:46:57 schrieb Will Ness: > > Daniel Fischer web.de> writes: > > > Am Dienstag 29 Dezember 2009 20:16:59 schrieb Daniel Fischer: > > > > > especially the claim that going by primes squares > > > > > is "a pleasing but minor op