>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
>> 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
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
> > 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 ->
> 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
| Does this mean that code which relies on ++ and do notation with Maybe
| will stop working?
++ is specialized to lists, I'm afraid.
Ralf
> 1. The Show class
> ~~
[...]
> class Show a where
> showsPrec :: Int -> a -> ShowS
> show:: a -> String -- NEW
> showList :: [a] -> ShowS
>
> showsPrec
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
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
| 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
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
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
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
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
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
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
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
> | 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
>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://
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
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
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
> 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
23 matches
Mail list logo