Hello Günther,
Saturday, July 4, 2009, 3:11:23 AM, you wrote:
I've got an IO action, some file system IO, traversing one level only and
iterating over files found. I wish to build in an early exit, ie. if an
IO action in the loop encounters a particular value I want it to abort the
loop.
Good evening, all, following up on my question regarding space leaks,
I seem to have stumbled across something very promising. I said I was
using this tiny function lastOrNil to get the last value in a list,
or the empty (scheme) list if the haskell list was empty. The uses of
it were all of the
Antoine Latter wrote:
Personally, I've never used runhaskell Setup sdist and I've only
ever used cabal sdist. But I'm not sure where I learned that.
I think cabal-install is a pretty standard util for people to have,
and it ships with the Haskell platform now. So the big hurdle is
On Saturday 04 July 2009, Uwe Hollerbach wrote:
Good evening, all, following up on my question regarding space leaks,
I seem to have stumbled across something very promising. I said I was
using this tiny function lastOrNil to get the last value in a list,
or the empty (scheme) list if the
And I realize that you are not trying to replace RDBs, just building a
nicer interface to them. I am just concerned that some of the nice
properties are lost in the process. I think my main concern comes from
seeing people create databases, by automatically generating tables from
OO-classes.
Andrew Coppin wrote:
I just wrote a small module for dealing with half-integers. (That is,
any number I/2 where I is an integer. Note that the set of integers is
a subset of this; Wikipedia seems to reserve half-integer for such
numbers that are *not* integers.)
Now, the question is... Is
On Sat, Jul 04, 2009 at 12:37:21PM +0100, Andrew Coppin wrote:
It's on Hackage:
http://hackage.haskell.org/package/AC-HalfInteger-1.1.1
It'll be interesting to see if I uploaded it right... o_O
I guess you did, congrats! :)
...on the Haddock comments of halve and double, it should be
Felipe Lessa wrote:
On Sat, Jul 04, 2009 at 12:37:21PM +0100, Andrew Coppin wrote:
It's on Hackage:
http://hackage.haskell.org/package/AC-HalfInteger-1.1.1
It'll be interesting to see if I uploaded it right... o_O
I guess you did, congrats! :)
...on the Haddock comments of halve
On Jul 4, 2009, at 01:17 , Jason Dusek wrote:
What is the proper name for the operation on functions of a
functor, anyway? The name `fmap` seems to driven by an analogy
with `map`.
Cale (.) /Cale
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system
This is irritating me now... Suppose I have something like the following:
zero = 0 :: Int
one = 1 :: Int
two = 2 :: Int
three = 3 :: Int
How do I add Haddock comments to the end of each line? For some reason,
Haddock doesn't like either of
zero = 0 :: Int -- | Zero
zero = 0 :: Int -- ^ Zero
process [] = return ()
process (file:files) = do x - doit file
if x0 then process files
else return ()
Or use a fold:
process' = foldl op True files
op True file = doit file
op False _ = False
process' = foldl op True files
op True file = doit file
op False _ = False
Please pardon me. 'doit' should surely be able to do some IO:
import Data.Foldable
import System.IO
process' = foldlM op True files
op True file = doit file
op False _ = return False
were DoIt has the type
Hello Matthias,
Saturday, July 4, 2009, 6:39:30 PM, you wrote:
Or use a fold:
process' = foldl op True files
op True file = doit file
op False _ = False
foldM, probably, otherwise you will need to execute all actions before
running fold
--
Best regards,
Bulat
Hi,
I've put the code that I wish to transform from using exceptions to using
continuations on hpaste:
?http://hpaste.org/fastcgi/hpaste.fcgi/view?id=6515#a6515
thanks
Günther
Am 04.07.2009, 01:11 Uhr, schrieb Günther Schmidt gue.schm...@web.de:
Hi,
I've got an IO action, some file
Hi Günther,
here is a solution with the Maybe Monad:
http://hpaste.org/fastcgi/hpaste.fcgi/view?id=6515#a6515
Matthias.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
P.S. See http://en.wikibooks.org/wiki/Haskell/Monad_transformers for
some documentation.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
P.P.S. Strange it does not seem to work with the paste. So here comes
the solution by mail:
module Consolidator.BusinessLogic.ConflictsResolved
(consolidateDuplicates) where
import System.FilePath
import System.Directory
import Control.Monad (filterM)
import Control.Exception (throwIO)
import
---
Haskell Weekly News
http://sequence.complete.org/hwn/20090704
Issue 124 - July 04, 2009
---
Welcome to issue 124 of HWN, a newsletter covering
On Sat, Jul 4, 2009 at 08:22, Andrew Coppinandrewcop...@btinternet.com wrote:
This is irritating me now... Suppose I have something like the following:
zero = 0 :: Int
one = 1 :: Int
two = 2 :: Int
three = 3 :: Int
How do I add Haddock comments to the end of each line? For some reason,
Hi *^o^*,
I'm working on a source code transformation project for numerical automatic
differentiation for Fortran and C.
I would love to know the best Haskell way/package available today to
represent procedural (non-OO) code in a language-independent manner. Any
tips or resource, paper
Alexander Dunlap wrote:
Couple of suggestions:
- You should put an (Integer i) = constraint on the halve function so
that it becomes impossible to create invalid HalfIntegers.
Right. Currently you can *make* such a HalfInteger. You just won't be
able to *do* anything with it afterwards.
OK, so having released AC-HalfInteger, I got slightly carried away and
released three other small packages. These are packages that many
programs I write all end up using. I'm forever copying these files, so I
made them into actual bonafide packages.
On Sat, Jul 04, 2009 at 06:56:44PM +0100, Andrew Coppin wrote:
http://hackage.haskell.org/package/AC-Colour-1.1.1
Why don't you use colour[1]?
[1] http://hackage.haskell.org/package/colour
--
Felipe.
___
Haskell-Cafe mailing list
Felipe Lessa wrote:
On Sat, Jul 04, 2009 at 06:56:44PM +0100, Andrew Coppin wrote:
http://hackage.haskell.org/package/AC-Colour-1.1.1
Why don't you use colour[1]?
[1] http://hackage.haskell.org/package/colour
A few reasons:
1. I never knew it existed. ;-)
2. It's
On Sat, Jul 4, 2009 at 8:38 PM, Andrew
Coppinandrewcop...@btinternet.com wrote:
A few reasons:
1. I never knew it existed. ;-)
A good reason. However, it's good to do a quick search over Hackage
before uploading (or before writing) so you know what's out there.
Also, if you hadn't used an AC-
Max Rabkin wrote:
On Sat, Jul 4, 2009 at 8:38 PM, Andrew
Coppinandrewcop...@btinternet.com wrote:
A few reasons:
1. I never knew it existed. ;-)
A good reason. However, it's good to do a quick search over Hackage
before uploading (or before writing) so you know what's out there.
On 7/4/09, Marcin Kosiba marcin.kos...@gmail.com wrote:
On Saturday 04 July 2009, Uwe Hollerbach wrote:
Good evening, all, following up on my question regarding space leaks,
I seem to have stumbled across something very promising. I said I was
using this tiny function lastOrNil to get the last
On Sat, Jul 4, 2009 at 9:18 PM, Andrew
Coppinandrewcop...@btinternet.com wrote:
2. It's mind-blowingly complex.
Colour *is* complex. Which is why I'm so glad Russell O'Connor did all
the hard work for me :)
Well, no, because now I'm going to have to spend a few hours trying to find
out
Paul Johnson wrote:
Andrew Coppin wrote:
Well, no, because now I'm going to have to spend a few hours trying
to find out what CIE is before I can even use that library.
I think really it's just aimed at a different problem. It looks like
it's trying to specify actual real-world colours.
The byte code for the virtual machine of this years ICFP specified a
language with single assignment per simulation step. Interestingly
most memory locations get overwritten each simulation step before they
are read. That means, those locations don't have to be remember
between steps. Also
2009/7/4 Matthias Görgens matthias.goerg...@googlemail.com:
The byte code for the virtual machine of this years ICFP specified a
language with single assignment per simulation step. Interestingly
most memory locations get overwritten each simulation step before they
are read. That means,
On Jul 4, 2009, at 15:01 , Max Rabkin wrote:
On Sat, Jul 4, 2009 at 8:38 PM, Andrew
Coppinandrewcop...@btinternet.com wrote:
3. It doesn't appear to provide arithmetic over colours.
It provides darken, blend and addition (though addition is called
mappend rather than (+)). signum, abs and
32 matches
Mail list logo