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
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)
___
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
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
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
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
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
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
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
> 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
10 matches
Mail list logo