Re: Arrow Classes

2003-06-28 Thread Joe English
a where app :: a (a b c,b) c class (Arrow a) = ArrowZero a where aZero :: a b c aMaybe :: a (Maybe c) c aGuard :: (b - Bool) - a b b class (Arrow a) = ArrowPlus a where (+++) :: a b c - a b c - a b c --Joe English [EMAIL PROTECTED

Re: Q. about XML support (WAS: Re: Interesting Read)

2003-02-19 Thread Joe English
, but implementing it in a sane way requires some ingenuity.) --Joe English [EMAIL PROTECTED] ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: Enum on Float/Double

2002-10-24 Thread Joe English
-- they're subject to horribly bad roundoff errors -- and I'm not even close to being a numerical analyst. --Joe English [EMAIL PROTECTED] ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: UTF-8 library

2002-08-10 Thread Joe English
. Java attempts platform independence by declaring that all the world *is*, in fact, a VAX [*]. [*] More precisely, a 32-bit platform with IEEE 754 floating point. --Joe English [EMAIL PROTECTED] ___ Haskell mailing list [EMAIL PROTECTED] http

Re: UTF-8 library

2002-08-08 Thread Joe English
. --Joe English [EMAIL PROTECTED] ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

[ADMINISTRIVIA]: Change list submission policy please?

2002-06-27 Thread Joe English
The haskell mailing list is getting an increasing amount of spam, viruses, and virus warnings. Would it be possible to change the list policy to only allow submissions from subscribed members? Please? --Joe English [EMAIL PROTECTED

Re: Functional design patterns (was: How to get functional software engineering experience?)

2002-05-15 Thread Joe English
patterns are like this (e.g., combinator library, embedded domain-specific language), the majority can be described rigorously. This gives them an added usefulness -- you can actually calculate with them. --Joe English [EMAIL PROTECTED] ___ Haskell

Is there a name for this structure?

2002-03-26 Thread Joe English
and g are functors and A and B categories. In some cases (g . f . g) is also equal to g; is there a name for this as well? I find myself running into pairs of functions with this property over and over again, and am looking for a short way to describe the property... Thanks, --Joe English [EMAIL

ANNOUNCE: HXML 0.2, XML parser for Haskell

2002-03-06 Thread Joe English
and DOCTYPE declarations) + Several data structures and public functions have been renamed + Space fault in comment parsing fixed Please contact Joe English [EMAIL PROTECTED] with any questions, comments, or bug reports. --Joe English [EMAIL PROTECTED

ANNOUNCE: HXML 0.2, XML parser for Haskell

2002-03-06 Thread Joe English
and DOCTYPE declarations) + Several data structures and public functions have been renamed + Space fault in comment parsing fixed Please contact Joe English [EMAIL PROTECTED] with any questions, comments, or bug reports. --Joe English [EMAIL PROTECTED

Re: Lazy Parsing

2002-02-28 Thread Joe English
, and there have been many incompatible changes since 0.1. The main thing left to be finished is the documentation, if you can live without that let me know and I'll put a snapshot up.) --Joe English [EMAIL PROTECTED] ___ Haskell-Cafe mailing list

Re: heap and walking through a very long list

2001-11-24 Thread Joe English
Simon Peyton-Jones wrote: There should really be a strict accumArray, just as there should be a strict foldl. Yes, please! Is there a way to write a strict version of accumArray in Haskell 98, or does this need to be done by the implementation? --Joe English [EMAIL PROTECTED

Space faults in HaXml

2001-11-04 Thread Joe English
is. (It even works in Hugs, which I found surprising, since the HXML tree builder has a known problem when run with Hugs' garbage collector.) --Joe English [EMAIL PROTECTED] ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo

ANNOUNCE: HXML 0.1, an(other) XML parser for Haskell

2001-11-02 Thread Joe English
version is 0.1, and is slightly post-alpha quality. Tested with GHC 5.02, NHC98 1.10, and various recent versions of Hugs. Please contact Joe English [EMAIL PROTECTED] with any questions, comments, or bug reports. --Joe English [EMAIL PROTECTED

Re: HaXml, memory usage and segmentation fault

2001-10-31 Thread Joe English
again got a flat heap profile -- there doesn't seem to be anything wrong with the structure of the original program. The code will be ready to release Real Soon Now; I'll keep you posted. --Joe English [EMAIL PROTECTED] ___ Haskell-Cafe

Re: HaXml, memory usage and segmentation fault

2001-10-29 Thread Joe English
a space leak under Hugs, so this only deferred the problem. Under ghc/ghci, though, it has modest memory requirements and runs without paging. --Joe English [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org

Re: HaXml, memory usage and segmentation fault

2001-10-29 Thread Joe English
and a couple of things that it just gets wrong, but it's basically working. I'll package it up and put it on the Web when I get a chance. This may take a day or two... --Joe English [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http

Re: HaXml, memory usage and segmentation fault

2001-10-26 Thread Joe English
, there's not much you can do short of replacing the HaXml parser. --Joe English [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

HaXml article on IBM developerWorks

2001-10-25 Thread Joe English
documents. Many of the HaXml techniques are far more elegant, compact, | and powerful than the ones found in familiar techniques like DOM, SAX, or | XSLT. Code samples demonstrate the techniques. http://www-106.ibm.com/developerworks/xml/library/x-matters14.html --Joe English [EMAIL PROTECTED

Re: Multithreaded stateful software

2001-05-28 Thread Joe English
had this project coming up, I'd use it as an excuse to finally learn Erlang...) --Joe English [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: Monads

2001-05-17 Thread Joe English
monads until reading Wadler's aptly-titled Comprehending Monads, which approaches them from this perspective. --Joe English [EMAIL PROTECTED] ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: A sample revised prelude for numeric classes

2001-02-11 Thread Joe English
to be a superclass of Lattice? --Joe English [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: Extending the do-notation

2001-01-07 Thread Joe English
= ((\pat - exp3) . exp1) so that the above example could be rewritten more compactly: do y - unzip # m1 This can be done in Haskell without any changes to the 'do' notation at all: just define | f # m = m = (return . f) and add an appropriate fixity declaration for '#'. --Joe English

Re: Finding primes using a primes map with Haskell and Hugs98

2000-12-16 Thread Joe English
.n] where foldl_strict f a [] = a foldl_strict f a (x:xs) = (foldl_strict f $! f a x) xs Does it have to do with the way hugs98 implements and Int to Bool array? Most likely yes. Hugs is optimized for interactive use and quick compilation, not for space usage. Try it with GHC or HBC and see how it d

Re: mapM/concatMapM

2000-10-18 Thread Joe English
type 'IO [()]', perhaps the result of the IO operation -- a list of 100K empty tuples -- is the culprit, even though the result is never used. Does 'mapM_ print ... ' (:: IO ()) perform any better? --Joe English [EMAIL PROTECTED] ___ Haskell

Re: SAX, XML, Haskell

2000-09-25 Thread Joe English
and Ketil Malde's parser would give the best of both worlds. --Joe English [EMAIL PROTECTED]

Re: simple binary IO proposition.

2000-09-02 Thread Joe English
Marcin 'Qrczak' Kowalczyk wrote: Joe English pisze: According to the ISO C standard, the meaning of wchar_t is implementation-defined. I know. How to convert between the default multibyte locale and Unicode on such systems? As far as I can tell, there's no way to do so in Standard C

Re: Test case Re: Is there a space leak here?

2000-02-28 Thread Joe English
' and 'sum') all the tests ran without a problem. That was using breadth=12 and depth=6, which makes Hugs98 run out of room even with the default heap size. Problem solved! Thanks! --Joe English [EMAIL PROTECTED]

Re: Test case Re: Is there a space leak here?

2000-02-28 Thread Joe English
ut a space problem under STG Hugs. --Joe English [EMAIL PROTECTED]

Re: Is there a space leak here?

2000-02-26 Thread Joe English
ce bounded by the depth of the tree. --Joe English [EMAIL PROTECTED]

Test case Re: Is there a space leak here?

2000-02-26 Thread Joe English
more data stored at each node and it fails on modestly-sized inputs. Thanks in advance for any advice... --Joe English [EMAIL PROTECTED] -- module SpaceLeak where data Tree a = Tree a [Tree a] deriving (Show, Eq) -- -- a few of the usual polytypic functions... -- mapTree

Re: Reverse composition

1999-10-08 Thread Joe English
apr :: (b - c) - Either a b - Either a c These are called "first", "second", "left", and "right" in the Arrow library. --Joe English [EMAIL PROTECTED]

Re: To all those who don't like ad-hoc overloading

1999-10-04 Thread Joe English
e union l1 l2 means union (==) l1 l2 I don't quite see what algorithm you're using to decide how many arguments are passed to the function. What would you get if you typed: foo = foldr union [] for example? --Joe English [EMAIL PROTECTED]

Re: Cryptarithm solver - comparing oranges and oranges

1999-09-20 Thread Joe English
it. (Monads are Haskell's way of making imperative and mutative programming harder to do so that programmers are less likely to do it, right? :)) Actually, quite the opposite... you should see how difficult it was to do I/O in Haskell *before* Monads were introduced! --Joe English [EMAIL

Re: Guidance on strictness

1999-06-07 Thread Joe English
Haskell Arrays unless you really, really need constant-time random access." In this particular problem, 'scprod' consumes elements in sequential order, so it may be better to use lists instead of arrays. (In fact "scprod a a where a = produce n 1.0" has a closed-form, O(1) solution, but I assume that's not the problem you're really trying to solve :-) Hope this helps, --Joe English [EMAIL PROTECTED]

Re: Modifying the monomorphism restriction

1999-02-24 Thread Joe English
reading the code, a ~ on the RHS of a binding is a signal that something out-of-the-ordinary is going on operationally, the same as when it appears on the LHS. --Joe English [EMAIL PROTECTED]

Re: Modifying the monomorphism restriction

1999-02-24 Thread Joe English
I wrote: Operationally I expect that in "let x = f y in ... x ... x", 'f y' is only evaluated once, no matter what type it is. Which, of course, is not how Haskell actually works, if x :: (SomeClass a) = SomeType a. DOH! Please disregard my earlier remarks... --Joe English

Re: Modifying the monomorphism restriction

1999-02-24 Thread Joe English
Alex Ferguson [EMAIL PROTECTED] wrote: Joe English: How about leaving the 'a = b' binding form as it is, (monomorphism restriction and all) and using 'a = ~ b' to indicate call-by-name. [...] I like that much less [...] because I consider it (still) to be the wrong 'default