New Haskell Book by Paul Hudak

2000-02-29 Thread Graham Robertson
NEW BOOK FROM CAMBRIDGE UNIVERSITY PRESS (CUP) 'The Haskell School of Expression: Learning Functional Programming through Multimedia', by Paul Hudak (Yale) Paperback £18.95, ISBN: 0521644089 Hardback £52.50, ISBN: 0521643384 Publication April 2000 This book teaches functional programming as a w

overlaps and deduced contexts

2000-02-29 Thread S.D.Mechveliani
As people notice, the overlapping instances reveal certain question about the deduced type contexts. Consider the example *similar* to one someone recently presented (probably, M.Kowalczyk): f :: (Eq a) => Int -> a -> a -> Int f n x y = if n==0 then 0 else if x==

overlapping instances

2000-02-29 Thread S.D.Mechveliani
Marcin 'Qrczak' Kowalczyk <[EMAIL PROTECTED]> wrote on overlapping instances > The other issue is efficiency if you want f to behave the same way even > when the instance Eq (Maybe String) is not visible at f's definition. > It would mean that every overloaded function must be extended to > di

Re: overlapping instances

2000-02-29 Thread Marcin 'Qrczak' Kowalczyk
On Mon, 28 Feb 2000, S.D.Mechveliani wrote: > If we want the recent implementations to compile this as needed, we > have to write > g :: (Eq a, Eq (Maybe a)) => (a -> Bool) -> [a] -> [Bool] > > g h xs@(x:_) = (Just x == Just x) : map h xs > > - "because this g us

Re: overlaps and deduced contexts

2000-02-29 Thread Jeffrey R. Lewis
"S.D.Mechveliani" wrote: > overlaps with the standard instance Eq a => Eq [a] ... > and causes, in the existing implementations, many error reports - > until the user satisfies everything by typing > > f :: (Eq a,Eq [a],Eq [[a]],Eq [[[a]]],Eq a, > Eq [a],Eq [[a]

Re: overlaps and deduced contexts

2000-02-29 Thread Marcin 'Qrczak' Kowalczyk
Tue, 29 Feb 2000 13:26:00 +0300 (MSK), S.D.Mechveliani <[EMAIL PROTECTED]> pisze: > I propose for the user to remain with `Eq a =>'. > Let the compiler itself deduce and add the needed context. No, no, no. Would the function really have the type that is specified, or the one with extended conte

Re: overlapping instances

2000-02-29 Thread Marcin 'Qrczak' Kowalczyk
Tue, 29 Feb 2000 14:20:32 +0300 (MSK), S.D.Mechveliani <[EMAIL PROTECTED]> pisze: > > h :: Eq a => a -> a -> Int > > h x y = if x == y then 0 else 1 + h [x] [y] > > which would make h "1" "2" return 7 if in some other module there is: > > instance Eq [[[String]]] where > >

HaXml stuff ...

2000-02-29 Thread Bill Halchin
Hello, I am trying to build the HaXML stuff and the linker (ld) is looking for an archive, gmp.a, which I don't have installed. Can anybody lead me in the right direction?? Thanks, Bill Halchin __ Get Your Private, Free Email at http://ww

ANNOUNCE New Release of Classic Hugs98

2000-02-29 Thread Andy Gill
We are pleased to announce the next release of Classic Hugs, a Haskell interpreter and programming environment for developing cool Haskell programs. Sources and binaries are freely available by anonymous FTP and on the World-Wide Web. The release and supporting documents can be d