Re: Extending the do-notation

2001-01-08 Thread George Russell
Sebastien Carlier wrote: > > > import Monad > > ... > > do y <- liftM unzip m1 > > Thanks. > > I'm constantly amazed by the number of tricks one has > to know before he can write concise code using the > do-notation (among other things, I used to write > "x <- return $ m" instead of "let x

Yet more on functional dependencies

2001-01-08 Thread George Russell
I am finding functional dependencies confusing. (I suspect I am not alone.) Should the following code work? class HasConverter a b | a -> b where convert :: a -> b instance (HasConverter a b,Show b) => Show a where show value = show (convert value) ___

Re: Are fundeps the right model at all?

2001-01-08 Thread Marcin 'Qrczak' Kowalczyk
Mon, 8 Jan 2001 17:53:35 +1300, Tom Pledger <[EMAIL PROTECTED]> pisze: > > Having types with type variables which are never instantiated nor > > constrained should be equivalent to having ground types! > > Do you have any examples of such a type variable in an instance decl? Not quite. When t

Yet more on functional dependencies

2001-01-08 Thread Tom Pledger
George Russell writes: > I am finding functional dependencies confusing. (I suspect I am not alone.) > Should the following code work? > > class HasConverter a b | a -> b where >convert :: a -> b > > instance (HasConverter a b,Show b) => Show a where >show value = show (convert

Re: Are anonymous type classes the right model at all? (replying to Re: Are fundeps the right model at all?)

2001-01-08 Thread Tom Pledger
Marcin 'Qrczak' Kowalczyk writes: [...] > My new record scheme proposal does not provide such lightweight > extensibility, but fields can be added and deleted in a controlled > way if the right types and instances are made. Johan Nordlander must be on holiday or something, so I'll deputise fo

ANNOUNCE: Draft TOC of Haskell in a Nutshell

2001-01-08 Thread Brook Conner
Inspired by the recent discussions of what kinds of books would encourage the spread of Haskell, I whipped up a draft table of contents for "Haskell in a Nutshell." You can find it in PDF form at http://nellardo.com/lang/haskell/hianTOC.pdf (it should have the fonts embedded - OReilly uses a

Re: ANNOUNCE: Draft TOC of Haskell in a Nutshell

2001-01-08 Thread Manuel M. T. Chakravarty
Brook Conner <[EMAIL PROTECTED]> wrote, > You can find it in PDF form at > http://nellardo.com/lang/haskell/hianTOC.pdf (it should have the fonts > embedded - OReilly uses a couple of oddballs) and in ASCII text at > http://nellardo.com/lang/haskell/haskell-in-a-nutshellTOC.txt. Makes sense t

Re: ANNOUNCE: Draft TOC of Haskell in a Nutshell

2001-01-08 Thread Bill Halchin
Yes! I agree with Manuel about the IO. It looks bad being towards the end. Regards, Bill Halchin >From: "Manuel M. T. Chakravarty" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: [EMAIL PROTECTED] >CC: [EMAIL PROTECTED] >Subject: Re: ANNOUNCE: Draft TOC of Haskell in a Nutshell >Date: Tu

Re: ANNOUNCE: Draft TOC of Haskell in a Nutshell

2001-01-08 Thread Ketil Malde
Brook Conner <[EMAIL PROTECTED]> writes: > Inspired by the recent discussions of what kinds of books would encourage the > spread of Haskell, I whipped up a draft table of contents for "Haskell in a > Nutshell." Let's see. It all depends on what you put into the chapters, of course, but you see

Re: ANNOUNCE: Draft TOC of Haskell in a Nutshell

2001-01-08 Thread Johannes Waldmann
> However, I would move IO further to the front. > For any "real life" programming, IO is essential... I am currently teaching a Functional Programming lecture (notes in German: http://www.informatik.uni-leipzig.de/~joe/edu/ws00/praxis/skript/) and I also used this approach: use the do-notati