Re: How to murder a cat

1999-06-14 Thread Jeff Dalton
Craig Dickson wrote: > Jeff Dalton <[EMAIL PROTECTED]> wrote: > > > Sure, cat in itself isn't very interesting. But cat is just a simple > > case of a more interesting problem, that of writing what Unix calls > > "filters": programs that take some input from a file or pipe or other > > similar

Re: types

1999-06-14 Thread Lars Lundgren
On Mon, 14 Jun 1999, Jose Bernardo Barros wrote: > > According to the definition of the class Bounded, minBound and maxBound > have types > > minBound :: Bounded a => a > maxBound :: Bounded a => a > > Suppose I define the function > > f (minBound, maxBound) = (maxBound, minBo

types

1999-06-14 Thread Jose Bernardo Barros
According to the definition of the class Bounded, minBound and maxBound have types minBound :: Bounded a => a maxBound :: Bounded a => a Suppose I define the function f (minBound, maxBound) = (maxBound, minBound) shouldn't its type be f :: (Bounded a, Bounded b, Bounded c,

Re: categorical prelude

1999-06-14 Thread trb
Peter White writes: > Do you have a URL for "On the expressive power of Constructor Classes"? http://www.cs.uu.nl/~luc/GlasgowFP94.ps

Re: How to murder a cat

1999-06-14 Thread Kevin Atkinson
Craig Dickson wrote: > I would think that if one wishes to learn functional programming, one would > be best advised to start out solving problems that are well-suited to the > functional paradigm -- where most of the solution involves manipulating the > data in memory, rather than getting the da

Re: How to murder a cat

1999-06-14 Thread Jan Skibinski
> Sure, cat in itself isn't very interesting. But cat is just a simple > case of a more interesting problem, that of writing what Unix calls > "filters": programs that take some input from a file or pipe or other > similar source and transform it into some output. .. and if standard Un

Re: How to murder a cat

1999-06-14 Thread Craig Dickson
Jeff Dalton <[EMAIL PROTECTED]> wrote: > Sure, cat in itself isn't very interesting. But cat is just a simple > case of a more interesting problem, that of writing what Unix calls > "filters": programs that take some input from a file or pipe or other > similar source and transform it into some

Re: Overlapping instances?

1999-06-14 Thread Lars Henrik Mathiesen
> Date: Sun, 13 Jun 1999 16:46:57 -0400 > From: Kevin Atkinson <[EMAIL PROTECTED]> > Thanks but why is this OK? Sorry, I misunderstood the question. > class T f r > > instance T a (a) > instance T (c a b) (c a (b)) > I mean the comman instance here is T (c a b) (c a (b)). Well, i

Reading a character without echoing it

1999-06-14 Thread Jose Romildo Malaquias
How can a single character be read from standard input without echoing it to the console in Haskell 98? Bird's book mentions two functions for reading a character getChar, getCh :: IO Char but Haskell 98 does not seem to have getCh, which should do the no echoing reading. Thanks. Prof.

RE: Overlapping instances?

1999-06-14 Thread Mark P Jones
Let me define some terms. If pi and pi' are two class constraints, then we say that pi and pi' are overlapping if S(pi) = S'(pi') for some substitutions S and S'. Thus C Int and C [a] do not overlap, but C (a,Int) and C (Bool, a) do overlap. As it says in the Hugs manual, overlapping instances