Re: MonadZero (concluded)

1998-11-06 Thread Erik Meijer
>Phil's proposal: > delete class MonadZero, MonadPlus > delete filterM, guard, mfilter, concatM > >This is ok by me. Does anyone object? No, not at all. The prelude should be as small as possible. Erik

RE: composed contexts

1998-11-06 Thread Frank A. Christoph
>> class (Monad m, Monad (t m)) => MonadT t m where >> lift :: m a -> t m a >> >> instance (Monad m, Monad (StateT s m)) => MonadT (StateT s) m where >> lift m = \s -> m >>= \x -> return (s,x) >> >> If the definitions from the paper can be turned into valid >> Haskell 98 w.l.o.g. now, then

Re: Two prelude/library matters

1998-11-06 Thread Koen Claessen
On Fri, 6 Nov 1998, Christian Sievers wrote: | This gives one more example of what I always wanted to suggest: | The documentation of a class should clearly state which the minimal | sets of definitions are that one has to give, rather than let the | reader figure this out from the code. Ind

RE: MonadZero (concluded)

1998-11-06 Thread Christian Sievers
> > Yes, nuke MonadPlus. For Haskell 2 we can put these things in a > > wonderful Monad library. > > I had thought that too many functions depend on MonadZero/Plus, > but actually, it's the following: > > filterM :: MonadZero m => (a -> m Bool) -> [a] -> m [a] > guard :: MonadZero m => Bool ->

Re: MonadZero (concluded)

1998-11-06 Thread Lennart Augustsson
> This is ok by me. Does anyone object? I don't understand why MonadZero/MonadPlus should go away. Isn't the idea that when in doubt Haskell 98 should do what Haskell 1.4 did? What's the compelling reason for removing these classes? I've used several of the functions that would go away. It wo

RE: MonadZero (concluded)

1998-11-06 Thread Ralf Hinze
| Does this mean that code which relies on ++ and do notation with Maybe | will stop working? ++ is specialized to lists, I'm afraid. Ralf

Re: Two prelude/library matters

1998-11-06 Thread Christian Sievers
> 1. The Show class > ~~ [...] > class Show a where > showsPrec :: Int -> a -> ShowS > show:: a -> String -- NEW > showList :: [a] -> ShowS > > showsPrec

Re: Parallel Haskell

1998-11-06 Thread Phil Trinder
Ernesto, There's also a parallel implementation of Haskell based on the Glasgow Haskell Compiler (GHC): Web page: http://www.dcs.gla.ac.uk/fp/software/gph/ Mailing List: [EMAIL PROTECTED] Phil -- Phil Trinder Department of Computing and

Re: MonadZero (concluded)

1998-11-06 Thread Meurig Sage
Simon Peyton-Jones wrote: > Phil's proposal: > delete class MonadZero, MonadPlus > delete filterM, guard, mfilter, concatM > > This is ok by me. Does anyone object? > > Simon If you're going to do this, are you going to change the Maybe library so that it has something equivalen

Re: MonadZero (concluded)

1998-11-06 Thread Ralf Hinze
| class Monad m => MonadPlus m where | mzero :: m a | mplus :: m a -> m a -> m a | | Why is this here? It doesn't need to be in the prelude. Just | leave it for the user to define (and then the user may pick | better names, like Ringad, zero, and <+>). -- P Yes, nuke Mon

Re: MonadZero (concluded)

1998-11-06 Thread Olaf Chitil
Philip Wadler wrote: > class Monad m => MonadPlus m where > mzero :: m a > mplus :: m a -> m a -> m a > > Why is this here? It doesn't need to be in the prelude. Just > leave it for the user to define (and then the user may pick > better names, like Ringad, zero, an

Re: derive conflicts with multiply-defined and module level import

1998-11-06 Thread Erik Meijer
Hi Alex, >[...] >[ describes that he wants interleave the definitions of several functions ] >[ but Haskell does not allow this ] >[...] >This restriction is very frustrating because I want to add names to a >function lookup table as they are derived. Is there a strong reason for >disallowing t

RE: MonadZero (concluded)

1998-11-06 Thread S. Alexander Jacobson
On Fri, 6 Nov 1998, Ralf Hinze wrote: > | Does this mean that code which relies on ++ and do notation with Maybe > | will stop working? > ++ is specialized to lists, I'm afraid. Ok, then I am officially complaining about the elimination of ++ and MonadPlus. It is a much more radical change than

RE: MonadZero (concluded)

1998-11-06 Thread S. Alexander Jacobson
Does this mean that code which relies on ++ and do notation with Maybe will stop working? -Alex- On Fri, 6 Nov 1998, Simon Peyton-Jones wrote: > > | class Monad m => MonadPlus m where > > | mzero :: m a > > | mplus :: m a -> m a -> m a > > | > > | Why is this here? It doesn't need t

polymorphism and lists (was Re: Two prelude/library matters)

1998-11-06 Thread S. Alexander Jacobson
On Fri, 6 Nov 1998, Simon Peyton-Jones wrote: > I have three small (and late) prelude/library proposals to add: > 1. The Show class > ~~ > * Add 'show' as a class method of class Show, to give: > This breaks nothing (show has the same type as before), but it allows > someone

Re: Default Default

1998-11-06 Thread Stephen H. Price
On Thu, 5 Nov 1998, Philip Wadler wrote: > So do I, if it's done right. But we already decided that doing it right > is too hard for Haskell 98; it will have to wait for Haskell 2. Given that, > the conservative design is to leave Int as the default default. > Horses for courses. Just as the in

Re: MonadZero (concluded)

1998-11-06 Thread Philip Wadler
class Monad m where return :: m a (>>=) :: m a -> (a -> m b) -> m b (>>) :: m a -> m b -> m b fail :: String -> m a fail s = error s IO.fail becomes IO.ioError Looks good. class Monad m => MonadPlus m where

RE: MonadZero (concluded)

1998-11-06 Thread Simon Peyton-Jones
> | class Monad m => MonadPlus m where > | mzero :: m a > | mplus :: m a -> m a -> m a > | > | Why is this here? It doesn't need to be in the prelude. Just > | leave it for the user to define (and then the user may pick > | better names, like Ringad, zero, and <+>). -- P > > Y

Re: Paralel Haskell

1998-11-06 Thread Ernesto Posse
>I'm a brazilian student and i'm looking for some informations about Paralel >Haskell. Please, Help me... > >Thanks > You should look at the Web Site of M.I.T.'s Laboratory for Computer Science. Their Computation Structures group has developed pH (Parallel Haskell). The address is: http://

Re: Note from (deputy) maintainer

1998-11-06 Thread Fergus Henderson
On 05-Nov-1998, Sven Panne <[EMAIL PROTECTED]> wrote: > The Deputy wrote: > > [...] Due to various quirks in the mailing list system at Glasgow, [...] > > Just a suggestion: Simply use Majordomo for the mailing list. > >http://www.greatcircle.com/majordomo/ > > It has none of these problems

Two prelude/library matters

1998-11-06 Thread Simon Peyton-Jones
I have three small (and late) prelude/library proposals to add: 1. The Show class ~~ One of the first things proposed when StdHaskell started was to make it possible to make a type an instance of Show by defining 'show' rather than by defining 'showsPrec'. More elaborate things

MonadZero (concluded)

1998-11-06 Thread Simon Peyton-Jones
OK, I think we have enough agreement to decide: class Monad m where return :: m a (>>=) :: m a -> (a -> m b) -> m b (>>) :: m a -> m b -> m b fail :: String -> m a fail s = error s (I'm still a bit nervous about capturing 'fail' but

RE: composed contexts

1998-11-06 Thread Simon Peyton-Jones
> class (Monad m, Monad (t m)) => MonadT t m where > lift :: m a -> t m a > > instance (Monad m, Monad (StateT s m)) => MonadT (StateT s) m where > lift m = \s -> m >>= \x -> return (s,x) > > If the definitions from the paper can be turned into valid > Haskell 98 w.l.o.g. now, then I'm happ