[It is a philosophical question, not a practical programming problem.]
I'm used, in imperative programming languages with exceptions (like
Python) to call any function without fear of stopping the program
because I can always catch the exceptions with things like (Python):
while not over:
On 8/1/06, Stephane Bortzmeyer [EMAIL PROTECTED] wrote:
How to do it in Haskell? How can I call functions like Prelude.head
while being sure my program won't stop, even if I call head on an
empty list (thus calling error)?
Try looking at Control.Exception. For example:
module Test where
On Tue, Aug 01, 2006 at 08:52:06AM +0200, Stephane Bortzmeyer wrote:
To: haskell-cafe@haskell.org
From: Stephane Bortzmeyer [EMAIL PROTECTED]
Date: Tue, 1 Aug 2006 08:52:06 +0200
Subject: [Haskell-cafe] A program which never crashes (even when a function
calls error)
[It is a
Hi list,Apologies for continuing with the cross-posting, but wxhaskell-users is not exactly active.It seems like there may be enough interest in wxHaskell to justify trying to revive the project.At present, from what I can tell, Daan Leijen, the principal developer of wxHaskell, no longer has much
On Tue, 1 Aug 2006, Stephane Bortzmeyer wrote:
[It is a philosophical question, not a practical programming problem.]
I'm used, in imperative programming languages with exceptions (like
Python) to call any function without fear of stopping the program
because I can always catch the
On 31.07 16:27, Brian Hulley wrote:
None of the above type classes would be compatible with Data.ByteString!
(You mentioned this issue before wrt Data.Edison.Seq but it just clicked
with me now for the above refactoring.) For compatibility, the element type
would need to appear also thus:
Hello Brian,
Tuesday, August 1, 2006, 4:23:53 AM, you wrote:
That's a tough call to make. Changing the kind of Sequence to * from *
- * means losing the Functor, Monad, and MonadPlus superclasses and
all the various maps and zips.
But there's no option if you want to be able to support
Hello Brian,
Tuesday, August 1, 2006, 4:43:23 AM, you wrote:
As you've pointed out, there are 2 separate issues that are in danger of
being confused:
1) Forcing all sequence instances to support all operations
2) Bundling all the ops into a single huge class
Collections library (darcs get
Hello John,
Tuesday, August 1, 2006, 6:27:29 AM, you wrote:
It is best to think of haskell primitives as something completely new,
they reuse some naming conventions from OO programming, but that doesn't
mean they suffer from the same limitations. It took me a few trys to
wrap my brain
Hello Stephane,
Tuesday, August 1, 2006, 10:52:06 AM, you wrote:
except Exception e:
don't look at anything except than Tackling the awkward squad:
monadic input/output, concurrency, exceptions, and foreign-language
calls in Haskell
Hello Einar,
Tuesday, August 1, 2006, 1:58:30 PM, you wrote:
class ElementType c a | c - a
class Foldable c where
fold :: ElementType c a = (a - b - b) - b - c - b
i love it! will it be possible to write smth like this:
class Stream m h | h-m
data T h = (Stream m h) = C (m Int)
?
On Jul 31, 2006, at 10:27 PM, John Meacham wrote:
[snip]
It is best to think of haskell primitives as something completely new,
they reuse some naming conventions from OO programming, but that
doesn't
mean they suffer from the same limitations. It took me a few trys to
wrap my brain
I wanted a longest common subsequence function and a bit of Googling
failed to turn up a functional one, except for in a scary bit of darcs.
So, I tried making a memoized functional version of the LCS delta
algorithm on the problem's Wikipedia page. It's not the fastest, but
it's simple and should
Mark T.B. Carroll wrote:
Take this as your cue to point out the much better LCS algorithm that
already exists in the standard libraries, that I couldn't find. (-:
I don't know of a version in the libraries, but since you mentioned you
were unsuccessful looking for any functional algorithms
Hello all,
There has been very recently a thread discussing the design decisions
involved in creating a sequence abstraction. This was naturally of
interest to me as the current Edison maintainer, and generated a fair
bit of interesting discussion. I'd like to kick off a new thread
[EMAIL PROTECTED] (Mark T.B. Carroll) writes:
I wanted a longest common subsequence function and a bit of Googling
failed to turn up a functional one, except for in a scary bit of darcs.
The code in darcs is a translation of the example code in the Eugene Myers
paper mentioned in the comments
Hi,
You can post wxHaskell related questions to the wxHaskell mailing list
([EMAIL PROTECTED]).
I had problems when compiling wxhaskell 0.9.4 using wxWidgets 2.6.3.
And I found out that in wxWidgets 2.6.3, some DB-related field names
have changed:
columnSize -- columnLength
bufferLength
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED] (Mark T.B. Carroll) writes:
I wanted a longest common subsequence function and a bit of Googling
failed to turn up a functional one, except for in a scary
bit of darcs.
The code in darcs is a
Bulat Ziganshin wrote:
Hello Brian,
Tuesday, August 1, 2006, 4:43:23 AM, you wrote:
As you've pointed out, there are 2 separate issues that are in
danger of being confused:
1) Forcing all sequence instances to support all operations
2) Bundling all the ops into a single huge class
On Tue, 2006-08-01 at 14:37 +0400, Bulat Ziganshin wrote:
Hello Brian,
Tuesday, August 1, 2006, 4:23:53 AM, you wrote:
That's a tough call to make. Changing the kind of Sequence to * from *
- * means losing the Functor, Monad, and MonadPlus superclasses and
all the various maps and
On 8/1/06, Mark T.B. Carroll [EMAIL PROTECTED] wrote:
I wanted a longest common subsequence function and a bit of Googling
failed to turn up a functional one, except for in a scary bit of darcs.
I saw a thread from back in the day about this when I was looking for
a good implementation of
John Meacham wrote:
On Tue, Aug 01, 2006 at 02:56:21AM +0100, Brian Hulley wrote:
Now the problem is that person C may come along and notice that
there is a useful abstraction to be made by inheriting both from
ClassA and ClassB. But both of these define foo and there is no
mechanism in the
Robert Dockins wrote:
[snip other points]
7) Finally, I somehow feel like there should be a nice categorical
formulation of these datastructure abstractions which would help to
drive a refactoring of the API typeclasses in a principled way,
rather than on an ad-hoc
This page:
http://jaortega.wordpress.com/2006/03/17/programmers-go-bananas/
lists some references at the bottom. Perhaps they would be useful.
Jared.
On 8/1/06, Brian Hulley [EMAIL PROTECTED] wrote:
Robert Dockins wrote:
[snip other points]
7) Finally, I somehow feel like there should be
Dear wxHaskell users,
First of all, I apologize for not being responsive on the
wxHaskell users mailing list. I recently changed jobs and countries and didnt
properly take care of older email aliases.
Anyway, even though I am motivated to support wxHaskell,
practice proves that the
On Tue, Aug 01, 2006 at 09:41:40AM +0100,
Chris Kuklewicz [EMAIL PROTECTED] wrote
a message of 105 lines which said:
The problem is mentioned here:
http://www.cs.uu.nl/people/daan/download/parsec/parsec.html#notFollowedBy
notFollowedBy seems to work for me and is quite simple, even for my
Robert Dockins wrote:
[snip]
7) Finally, I somehow feel like there should be a nice categorical
formulation of these datastructure abstractions which would help to
drive a refactoring of the API typeclasses in a principled way,
rather than on an ad-hoc I-sort-of-think-these-go-together sort of
On Tue, Aug 01, 2006 at 13:03:52 -0700, Daan Leijen wrote:
One potential challenge is to find a group of testers that are
willing to help compiling wxHaskell on different target systems:
Windows, MacOS X, and Unix/GTK variations.
I volunteer to help test on MacOS X
I am happy to give
Jared Updike wrote:
This page:
http://jaortega.wordpress.com/2006/03/17/programmers-go-bananas/
lists some references at the bottom. Perhaps they would be useful.
Thanks! That page looks really interesting and useful,
Brian.
___
Haskell-Cafe
Stephane Bortzmeyer wrote:
[It is a philosophical question, not a practical programming problem.]
I'm used, in imperative programming languages with exceptions (like
Python) to call any function without fear of stopping the program
because I can always catch the exceptions with things like
Stephane Bortzmeyer wrote:
The first would be to test whether bb is followed by eof or
comma before accepting it.
notFollowedBy actually does the opposite (checking that there are no
more letters).
Are you sure that you don't actually want
* many1 letter `sepBy1` comma
? Just asking,
Brian Hulley wrote:
splitWith :: (v - Bool) - c - (c,c)
splitWith p t
| isEmpty t = (empty, empty)
| p (measure t) =
let
(l,x,r) = splitWithInternal p mempty t
in (l, pushL x r)
| otherwise =
32 matches
Mail list logo