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 = m"). [snip]

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 the type

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 value)

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 for

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 to me.

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: Tue, 09

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 seem to

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

Re: Learning Haskell and FP

2001-01-08 Thread Benjamin L. Russell
On Fri, 5 Jan 2001 10:26:19 -0500 (EST) Patrick M Doane [EMAIL PROTECTED] wrote: [snip] I think a really good beginner's tutorial on I/O could be started from this paper: - Start immediately with using the 'do expression' and don't worry about the history that led to its

Re: Learning Haskell and FP

2001-01-08 Thread Theodore Norvell
Erik Meijer wrote: Nope, I also think that Haskell is the world's finest *imperative* language (and the world's best functional language as well). The beauty of monads is that you can encapsulate imperative actions as first class values, ie they have the same status as functions, lists, ...