Pete Kazmier wrote:
train:: [B.ByteString] - WordFreq
train words = frequencyMap
where
frequencyMap = foldr incWordCount M.empty words
incWordCount w m = M.insertWith (+) w 1 m
So is 'incWordCount' strict in its second argument? I'm still not
sure exactly
Hi all,
I'm currently trying to generate XML documents with HXT. Everything went
well but I can't figure out how to generate the xmlns:... attributes
for the namespaces.
My code looks like:
runX $ constA (request TableListRequest) root [] [writeA]
writeDocument [(a_indent,v_1)] -
I still get the same message even with these instructions. I guess it
may be due to some Vista security checking...
Cheers,
Monique
On 4/24/07, Simon Marlow [EMAIL PROTECTED] wrote:
Tom Schrijvers wrote:
Here's the more complete error message:
configure:3321: checking for C compiler
I'm finding myself dealing with several large abstract syntax trees
that are very similar in nature. The constructor names would be the
same or one type may be a small extension of another.
This is something that I wouldn't worry about with Lisp, for example,
as I would create a bunch of
Hi Toby,
On 4/24/07, Toby Hutton [EMAIL PROTECTED] wrote:
Hi,
I'm trying to implement a fast kd-tree in Haskell.
http://en.wikipedia.org/wiki/Kd-tree It's a binary tree
representing space partitions.
Trees are pretty easy to implement in haskell, due to their inherent
recursive nature. For
On Mon, 23 Apr 2007 at 04:36PM -0700, Stefan O'Rear wrote:
I'm finding the number of set partitions that correspond to a certain
integer partition. If p = p_1, p_2,...,p_k is an integer partition of n,
then there are
n!
On Tue, 24 Apr 2007 14:23:47 +0100
Joel Reymont [EMAIL PROTECTED] wrote:
I'm finding myself dealing with several large abstract syntax trees
that are very similar in nature. The constructor names would be the
same or one type may be a small extension of another.
This is something that I
I still get the same message even with these instructions. I guess it
may be due to some Vista security checking...
Do you still get the same error message in your config.log now? Or a
different one? There is also an error on Vista with checking whether a
file is executable. I don't know
For backward compatibility reasons, I'm using GHC 6.2.2. So, if there
is already a solution for this issue in the GHC repository, please let
me know how to add it manually.
I don't have problems with ./configure on Windows XP.
On 4/24/07, Tom Schrijvers [EMAIL PROTECTED] wrote:
I still get
Udo Stenzel wrote:
There is another bug of this sort in your code. Consider
incWordCount w m = M.insertWith (+) w 1 m
There is no reason to evaluate the sum inside the map, instead an
unevaluated thunk is put in there.
Would not Data.Map.insertWith' do the trick?
b
Claus Reinke [EMAIL PROTECTED] writes:
I use emacs exclusively for hacking Haskell, but I wanted to see
if it's possible to connect to the shim server-process from vim
and started working on omnicompletion:
http://shim.haskellco.de/trac/attachment/wiki/ScreenShots/vim-shim.png
Magnus Jonsson wrote:
I have the same problem too when using Haskell. The more I try to
enforce static guarantees the more I get lots of datatypes that are
similar except for one or two constructors. The best way I have found
to avoid this is to simply give up on some of the static guarantees
On 4/24/07, Jacques Carette [EMAIL PROTECTED] wrote:
In Ocaml, you can frequently use polymorphic variants to get the same
effect.
Which means that if you are willing to do enough type-class-hackery, it
should, in principle, be possible to do the same in Haskell. But it
sure isn't as
Josef Svenningsson wrote:
On 4/24/07, Jacques Carette [EMAIL PROTECTED] wrote:
In Ocaml, you can frequently use polymorphic variants to get the same
effect.
Which means that if you are willing to do enough type-class-hackery, it
should, in principle, be possible to do the same in Haskell. But
A thing of beauty is a joy forever. Simple, fast, elegant. If I learn
any more from this list, someone is going to start charging me tuition! :)
Dan
[EMAIL PROTECTED] wrote:
G'day all.
Quoting Dan Weston [EMAIL PROTECTED]:
Why all the fuss? n! is in fact very easily *completely* factored
Dan Weston wrote:
A thing of beauty is a joy forever. Simple, fast, elegant.
factorial :: Integer - Integer
factorial = product . zipWith (^) . factorisedFactorial
Well... The zipWith (^) should be map (uncurry (^)).
And the performance of this approach is strongly dependent on the
Hi,
Toby Hutton wrote:
Say I want to put the words 'foo', 'bar' and 'baz' into a binary tree. The
heuristic requires I split the words into letters and sort them:
'aabbfoorz'. The heuristic then may decide, based on the sorted letters,
that 'bar' and 'foo' should go in the left child and
Bryan O'Sullivan wrote:
Udo Stenzel wrote:
There is another bug of this sort in your code. Consider
incWordCount w m = M.insertWith (+) w 1 m
There is no reason to evaluate the sum inside the map, instead an
unevaluated thunk is put in there.
Would not Data.Map.insertWith'
runX $ constA (request TableListRequest) root [] [writeA]
writeDocument [(a_indent,v_1)] -
writeDocument [(a_indent,v_1), (a_check_namespaces, v_1)] -
should do the trick.
Cheers,
Tim
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hi everybody =)
First time I write to the list.
My name is Glauber and I'm doing my master course at UNICAMP, Brazil,
under supervisor of Prof. Dr. Arnaldo Vieira Moura.
I'm interested in Haskell, type theory and algebraic specification
(formal methods). I've been studying these subjects to my
On Tue, Apr 24, 2007 at 09:25:55PM -0300, Glauber Cabral wrote:
Hi everybody =)
First time I write to the list.
http://haskell.org/pipermail/haskell-cafe/2007-April/024819.html
http://haskell.org/pipermail/haskell-cafe/2007-April/024867.html
(I am not a researcher and cannot comment on the
Hi =)
No problem!
And sorry by the duplicated post. I've had just checked my gmail and
the message was not there, 2 days after posting. I've sent again and
then there were 2 copies.
Cheers,
Glauber
On 4/24/07, Stefan O'Rear [EMAIL PROTECTED] wrote:
On Tue, Apr 24, 2007 at 09:25:55PM -0300,
On Tue, Apr 24, 2007 at 09:58:01PM -0300, Glauber Cabral wrote:
Hi =)
No problem!
And sorry by the duplicated post. I've had just checked my gmail and
the message was not there, 2 days after posting. I've sent again and
then there were 2 copies.
Cheers,
Glauber
On 4/24/07, Stefan O'Rear
G'day all.
Quoting Bryan O'Sullivan [EMAIL PROTECTED]:
Well... The zipWith (^) should be map (uncurry (^)).
Err... yes.
And the performance of this approach is strongly dependent on the
efficiency of your prime sieve, so you're moving the complexity around,
not eliminating it.
Yes and no.
In a debate I proposed Excel is a functional language. It was refuted
and I'd like to know what some of you clever Haskellers might think :)
My opposition proposed (after some weeding out) that there is a
distinction between Excel, the application, the GUI and Excel, the
language (which we
Oleg, Simon,
Thanks for your help. If i understand it correctly, the code below gives a
reasonably clean first cut at a demonstration of process calculi as
polymorphically parametric in the type of name, allowing for an
instantiation of the type in which the quoted processes play the role of
I can confirm that, although before Ubuntu Feisty came out I just
compiled GHC 6.6 myself. I was surprised how easy it was -- I had
heard building GHC was hard, but I guess that's only if you don't
already have a Haskell compiler. I expect I'll probably be compiling
the newest version myself
[EMAIL PROTECTED] wrote:
Yes and no. Standard algorithms for computing and manipulating
combinatorial-sized Integers strongly depend on the properties of
your Integer implementation.
Manipulating lists of prime factors can also be more efficient,
because most of the numbers you deal with are
Tony Morris wrote:
My opposition proposed (after some weeding out) that there is a
distinction between Excel, the application, the GUI and Excel, the
language (which we eventually agreed (I think) manifested itself as a
.xls file).
I say Excel is a functional language. If there needs to be the
29 matches
Mail list logo