Re: [Haskell-cafe] Newbie: Is 'type' synonym hiding two much?

2007-03-22 Thread Dmitri O.Kondratiev
Now, in the 17.5 section of a book one may see the following declarations: succeed :: b -> Parse a b *Before looking at 'succeed' function definition* one may think that 'succeed' is a function of *one* argument of type 'b' that returns object of type 'Parse a b'. That's what it is. Howev

Re: [Haskell-cafe] Newbie: Is ‘type’ synonym hiding two much?

2007-03-22 Thread Ian Lynagh
On Thu, Mar 22, 2007 at 06:13:00PM +0300, Dmitri O.Kondratiev wrote: > > succeed :: b -> Parse a b > > *Before looking at 'succeed' function definition* one may think that > 'succeed' is a function of *one* argument of type 'b' that returns object of > type 'Parse a b'. > > Yet, function definit

Re: [Haskell-cafe] Newbie: Is ‘type’ synonym hiding two much?

2007-03-22 Thread Antti-Juhani Kaijanaho
On Thu, Mar 22, 2007 at 06:13:00PM +0300, Dmitri O.Kondratiev wrote: > F :: a -> b -> c > > Is the same as: > > F :: a -> (b -> c) Correcting the typo (use f, not F), these mean the same thing. > And means either: > > -a function 'f' of one argument of type 'a' that returns a function of >