[Haskell-cafe] Re: Equations for `foo' have different numbers of arguments

2009-03-24 Thread Achim Schneider
Manlio Perillo manlio_peri...@libero.it wrote: Hi. There is a limitation, in Haskell, that I'm not sure to understand. Here is an example: module Main where divide :: Float - Float - Float divide _ 0 = error division by 0 divide = (/) main = do print $ divide 1.0 0.0 print

Re: [Haskell-cafe] Re: Equations for `foo' have different numbers of arguments

2009-03-24 Thread Martijn van Steenbergen
Achim Schneider wrote: The other might be implementation issues: it makes pattern match rules more complex. But only marginally, right? f A B = biz f B = bar f = bam could be trivially rewritten to: f A B = biz f B y = bar y f x y = bam x y Martijn.

Re: [Haskell-cafe] Re: Equations for `foo' have different numbers of arguments

2009-03-24 Thread John Van Enk
Yes, but this seems to have terrifying implications... On Tue, Mar 24, 2009 at 11:25 AM, Martijn van Steenbergen mart...@van.steenbergen.nl wrote: Achim Schneider wrote: The other might be implementation issues: it makes pattern match rules more complex. But only marginally, right? f

[Haskell-cafe] Re: Equations for `foo' have different numbers of arguments

2009-03-24 Thread Achim Schneider
Martijn van Steenbergen mart...@van.steenbergen.nl wrote: f x y = bam x y This would introduce another matching of x on the outside of bam, and I don't know if this works without significantly messing with e.g. strictness. -- (c) this sig last receiving data processing entity. Inspect headers