[Haskell-cafe] Re: [Haskell] ANNOUNCE: GHC survey results

2005-07-06 Thread John Goerzen
On 2005-06-30, Malcolm Wallace <[EMAIL PROTECTED]> wrote: > The ideal front-end for a syntax-directed tool like Hat consists solely > of a lexer/parser to an abstract syntax tree, with no desugaring > whatsoever, and no typechecking. This is essentially what we have This sounds suspiciously like

Re: [Haskell-cafe] polymorphic type

2005-07-06 Thread Henning Thielemann
On Wed, 6 Jul 2005, wenduan wrote: > Dear all, > > Suppose we have defined two functions as below: > > case :: (a -> c,b -> c) -> Either a b -> c > case (f, g) (Left x) = f x > case (f, g) (Right x) = g x It seems to be case == uncurry either Prelude> :info either -- either is a variable eith

Re: [Haskell-cafe] polymorphic type

2005-07-06 Thread Stefan Holdermans
Wenduan, What I thought at first the signature of plus should be: plus :: (a -> c, b -> d) -> Either a b -> Either c d?Anyone know where I was wrong? Your initial thought was right: it should (a -> c, b -> d) -> Either a b -> Either c d Why didn't you just test it by feeding in to a compil

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-06 Thread Henning Thielemann
On Tue, 5 Jul 2005, Michael Walter wrote: > On 7/5/05, Henning Thielemann <[EMAIL PROTECTED]> wrote: > > The example, again: If you write some common expression like > > > > transpose x * a * x > > > > then both the human reader and the compiler don't know whether x is a > > "true" matrix or if i

[Haskell-cafe] polymorphic type

2005-07-06 Thread wenduan
Dear all, Suppose we have defined two functions as below: case :: (a -> c,b -> c) -> Either a b -> c case (f, g) (Left x) = f x case (f, g) (Right x) = g x plus :: (a -> b, c -> d) -> Either a b -> Either c d plus (f, g) = case(Left.f, Right.g) My question is regarding to the function signatur