[Haskell-cafe] Defining instance needs allow-undecidable-instance?

2006-03-28 Thread oleg
Daniel McAllansmith wrote: When I try to add MonadError into the types I eventually hit the requirement for allow-undecidable-instances. Is there some way I can I avoid having to use this extension? class (Num i, Bounded i, Monad m, MonadError String m) = MonadSource i m | m - i

Re: [Haskell-cafe] planet.haskell.org? for Haskell blogs

2006-03-28 Thread Antti-Juhani Kaijanaho
Antti-Juhani Kaijanaho wrote: If you want your blog listed, email me. I will not add people without their consent. Just tell me your RSS/Atom feed URI (try to pick one that will not contain non-English posts; but there is no need to restrict to just Haskell-related posts - half of the beauty

[Haskell-cafe] Haskell's market

2006-03-28 Thread Arnaud Bailly
Hello haskellers, I have been following this list's debates for a while and I am very enthusiastic about functional programming in general and haskell in particular. I am on the verge of starting a new sofware development project for a customer and I wonder whether or not Haskell would be the

[Haskell-cafe] Re: Haskell's market

2006-03-28 Thread Pete Chown
Arnaud Bailly wrote: I am on the verge of starting a new sofware development project for a customer and I wonder whether or not Haskell would be the right tool to do the job. One snag is that I doubt you could ring up an agency and ask for half a dozen Haskell programmers. You could

Re: [Haskell-cafe] Haskell's market

2006-03-28 Thread Bulat Ziganshin
Hello Arnaud, Tuesday, March 28, 2006, 3:58:53 PM, you wrote: The project is a Point-of-sale distributed management system with the following (non-exhaustive) list of features : - rich GUI clients (on windows platform) to allow optimizing users input speed. There will about 50-60

Re: [Haskell-cafe] Re: Haskell's market

2006-03-28 Thread Arnaud Bailly
Pete Chown [EMAIL PROTECTED] writes: Arnaud Bailly wrote: I am on the verge of starting a new sofware development project for a customer and I wonder whether or not Haskell would be the right tool to do the job. One snag is that I doubt you could ring up an agency and ask for half a dozen

Re: [Haskell-cafe] Re: Haskell's market

2006-03-28 Thread Neil Mitchell
instead of coding them. I am thinking about an approach based on a sort of DSL design with Haskell then code/bytecode generation to Java/whatever platform. Yhc can generate a portable bytecode, and it can also generate .NET bytecode (IL), and there was a project underway to generate Java (JVM)

Re: [Haskell-cafe] multiple computations, same input

2006-03-28 Thread Jan-Willem Maessen
On Mar 28, 2006, at 1:02 AM, Tomasz Zielonka wrote: On Mon, Mar 27, 2006 at 03:10:18PM -0800, Greg Fitzgerald wrote: hold a part of the data in memory while you show the first one, Here would be a better example then. f lst = show (sum (filter ( 1) lst), sum (filter ( 2) lst)) It

Re: [Haskell-cafe] multiple computations, same input

2006-03-28 Thread Greg Fitzgerald
...Anyway, I can't help but think that there might be a happy mediumbetween eager and lazy evaluation. What I'd love to see is the compiler continue to be call-by-need, but be smart enough to recognize when multiple expressions will all eventually need to be evaluated. A simple example: show (a +

Re: [Haskell-cafe] error vs. MonadError vs. fail

2006-03-28 Thread Daniel McAllansmith
On Tuesday 28 March 2006 07:29, Andrew Pimlott wrote: MonadError is not up to this task as far as I can tell. Why not? All that needs to be done is write the missing instances, eg instance MonadError () Maybe where throwError x = Nothing Nothing `catchError` f =

Re: [Haskell-cafe] Re: Positive integers

2006-03-28 Thread ihope
On 3/24/06, Henning Thielemann [EMAIL PROTECTED] wrote: A new type, say Cardinal as in Modula, would document for the user of a function that only non-negative numbers are allowed and the function writer can be sure, that only non-negative numbers are passed. ... newtype Cardinal =

Re: [Haskell-cafe] error vs. MonadError vs. fail

2006-03-28 Thread Andrew Pimlott
On Wed, Mar 29, 2006 at 08:57:00AM +1200, Daniel McAllansmith wrote: On Tuesday 28 March 2006 07:29, Andrew Pimlott wrote: MonadError is not up to this task as far as I can tell. Why not? All that needs to be done is write the missing instances, eg instance MonadError () Maybe

Re: [Haskell-cafe] error vs. MonadError vs. fail

2006-03-28 Thread Daniel McAllansmith
On Wednesday 29 March 2006 09:49, Andrew Pimlott wrote: If you want to write a MonadError operation that can be used with Maybe or Either, it would look like f :: (MonadError e m, Error e) = Bool - m Int f b = if b then return 42 else throwError (strMsg The boolean

Re: [Haskell-cafe] Re: Equirecursive types?

2006-03-28 Thread ihope
On 3/27/06, lee marks [EMAIL PROTECTED] wrote: So this is legal: type Fix s a = s a (Fix s a) fold :: Functor (s a) = (s a b - b) - Fix s a - b fold f = f . fmap (fold f) but this is not: fold f = f . fmap (fold f) data Fix s a = Fix {runFix :: s a (Fix s a)} fold :: Functor (s

Re: [Haskell-cafe] multiple computations, same input

2006-03-28 Thread John Meacham
On Tue, Mar 28, 2006 at 12:27:43PM -0800, Greg Fitzgerald wrote: ...Anyway, I can't help but think that there might be a happy medium between eager and lazy evaluation. What I'd love to see is the compiler continue to be call-by-need, but be smart enough to recognize when multiple