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
, 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
--
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
.
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
.
--Joe English
[EMAIL PROTECTED]
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
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
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
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
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
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
, 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
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
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
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
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
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
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
, 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
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
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
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
to be a
superclass of Lattice?
--Joe English
[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
= ((\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
.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
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
and Ketil Malde's parser would give the best of both worlds.
--Joe English
[EMAIL PROTECTED]
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
' 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]
ut a space problem under STG Hugs.
--Joe English
[EMAIL PROTECTED]
ce bounded by the depth of the tree.
--Joe English
[EMAIL PROTECTED]
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
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]
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]
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
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]
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]
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
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
38 matches
Mail list logo