G'day all.
Ketil Malde wrote:
>(.) . (.) .(.)
>
> I entered it into GHCi, and got
>
> :: forall a a b c a.
> (b -> c) -> (a -> a -> a -> b) -> a -> a -> a -> c
I got this:
Prelude> :t (.) . (.) . (.)
(.) . (.) . (.) :: forall a a1 b c a2.
(b ->
-- Forwarded message --
From: shiqi cao <[EMAIL PROTECTED]>
Date: Sun, 13 Feb 2005 21:25:56 -0500
Subject: Re: [Haskell-cafe] Point-free style
To: Tim Docker <[EMAIL PROTECTED]>
On Mon, 14 Feb 2005 11:24:12 +1100, Tim Docker <[EMAIL PROTECTED]> wrote:
> Ketil Malde wrote:
>
> >
Dmitri Pissarenko <[EMAIL PROTECTED]> writes:
> Hello!
>
> I'm building the haskell-jvm-bridge (http://sourceforge.net/projects/jvm-
> bridge/).
>
> The final step of the building procedure is to install the package of haskell-
> jvm-bridge.
>
> When I enter ghc-pkg -a -f javavm.ghc-pkg I'm gettin
Ketil Malde wrote:
>(.) . (.) .(.)
>
> I entered it into GHCi, and got
>
> :: forall a a b c a.
> (b -> c) -> (a -> a -> a -> b) -> a -> a -> a -> c
I spent a minute or so attempting to intuit the type signature of this,
before cheating and entering it i
G'day all.
Quoting Josef Svenningsson <[EMAIL PROTECTED]>:
> I think it's unfair to the monad transformers to simply say that they
> don't obey the law. The interesting thing is whether they *preserve*
> the law. A monad transformer T preserves a law if given a monad M
> which obeys the law holds
On Sun, 13 Feb 2005 17:59:57 -0500, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> G'day all.
>
> Quoting Remi Turk <[EMAIL PROTECTED]>:
>
> > According to http://www.haskell.org/hawiki/MonadPlus (see also
> > the recent thread about MonadPlus) a MonadPlus instance
> > should obey m >> mzero ===
On Sun, Feb 13, 2005 at 06:05:23PM -0500, [EMAIL PROTECTED] wrote:
> G'day all.
>
> Quoting David Roundy <[EMAIL PROTECTED]>:
>
> > It might be interesting to write a "backtracking" IO-like monad which
> > obeyed m >> mzero === mzero. I imagine you could do it for something like
> > an ACID data
G'day all.
Quoting David Roundy <[EMAIL PROTECTED]>:
> It might be interesting to write a "backtracking" IO-like monad which
> obeyed m >> mzero === mzero. I imagine you could do it for something like
> an ACID database, if you define === as meaning "has the same final result
> on the database",
G'day all.
Quoting Remi Turk <[EMAIL PROTECTED]>:
> According to http://www.haskell.org/hawiki/MonadPlus (see also
> the recent thread about MonadPlus) a MonadPlus instance
> should obey m >> mzero === mzero, which IO doesn't. IOW, the
> MonadPlus instance for IO (defined in Control.Monad.Error)
On Sun, Feb 13, 2005 at 10:33:06PM +0100, Tomasz Zielonka wrote:
> On Sun, Feb 13, 2005 at 10:25:49PM +0100, Remi Turk wrote:
> > > BTW, I have an implementation of STM based entirely on old concurrency
> > > primitives, which means that it will work in older GHC and probably in
> > > other Haskell
On Sun, Feb 13, 2005 at 10:25:49PM +0100, Remi Turk wrote:
> > BTW, I have an implementation of STM based entirely on old concurrency
> > primitives, which means that it will work in older GHC and probably in
> > other Haskell compilers. I am going to put it on my web site, when I get
> > one.
>
>
On Sun, Feb 13, 2005 at 09:28:18PM +0100, Tomasz Zielonka wrote:
> On Sun, Feb 13, 2005 at 08:06:36PM +0100, Remi Turk wrote:
> > You might be interested in the recent STM monad then
> > (Control.Concurrent.STM in GHC-6.4): `T' for Transactional.
> > However, though it supports both MonadPlus and e
On Sun, Feb 13, 2005 at 08:06:36PM +0100, Remi Turk wrote:
> You might be interested in the recent STM monad then
> (Control.Concurrent.STM in GHC-6.4): `T' for Transactional.
> However, though it supports both MonadPlus and exceptions, it
> doesn't use MonadPlus for exceptions: It's used for
> blo
On Sun, Feb 13, 2005 at 01:31:56PM -0500, David Roundy wrote:
> On Sun, Feb 13, 2005 at 04:57:46PM +0100, Remi Turk wrote:
> > According to http://www.haskell.org/hawiki/MonadPlus (see also
> > the recent thread about MonadPlus) a MonadPlus instance
> > should obey m >> mzero === mzero, which IO do
On Sun, Feb 13, 2005 at 04:57:46PM +0100, Remi Turk wrote:
> According to http://www.haskell.org/hawiki/MonadPlus (see also
> the recent thread about MonadPlus) a MonadPlus instance
> should obey m >> mzero === mzero, which IO doesn't. IOW, the
> MonadPlus instance for IO (defined in Control.Monad.
The error is in the code line above, you can't write
trainingSet :: [ClassifiedImage]
by itself in a do statement.
Thanks for your advice!
Now it works.
Best regards
Dmitri Pissarenko
--
Dmitri Pissarenko
Software Engineer
http://dapissarenko.com
___
Hask
On Sun, Feb 13, 2005 at 08:58:29AM -0500, David Roundy wrote:
> I've been working on a typeclass that derives from MonadPlus which will
> encapsulate certain kinds of IO. With MonadPlus, you can write monadic
> code with exceptions and everything that may not be executed in the IO
> monad. You ju
Am Sonntag, 13. Februar 2005 10:16 schrieb Dmitri Pissarenko:
> Hello!
>
> Thanks for your answer!
>
> I've tried that and wrote
>
>
> do...
> let classifiedImagesWithData = ((return trainingSet) >>=
> readClassifiedImages) ciwd <- (sequence classifiedImagesWithData)
> let allImages = (getImages c
On Sat, Feb 12, 2005 at 01:08:59PM -0500, Benjamin Pierce wrote:
> I have seen lots of examples that show how it's useful to make some type
> constructor into an instance of Monad.
>
> Where can I find examples showing why it's good to take the trouble to show
> that something is also a MonadPlus?
Hello!
I'm building the haskell-jvm-bridge (http://sourceforge.net/projects/jvm-
bridge/).
The final step of the building procedure is to install the package of haskell-
jvm-bridge.
When I enter ghc-pkg -a -f javavm.ghc-pkg I'm getting the error
javavm.ghc-pkg: parse error in package config fil
Hello!
Thanks for your answer!
Perhaps try:
do ...
ciwd <- sequence classifiedImagesWithData
let allImages = (getImages ciwd)
...
as it seems like you're trying to gave getImages act on a value of
type [IO (ClassifiedImage, Image)]. Applying sequence to
classifiedImagesWithData will turn i
21 matches
Mail list logo