Looks like the graph is represented by an adjacency matrix, where the
element at (a, b) tells you whether there is an edge from node a to node
b with weight x or not by having the value (Just x) or Nothing,
respectively.
Whether the matrix is sparse depends on the data, i.e. how many edges
are
Perhaps x is evaluated earlier than you think, i.e. before the trace
(due to some strictness analysis?). But this is a just a guess.
I usually use trace outermost in my expression, not within a let. I
never had a problem with it:
fA :: SomeInput - SomeResult
fA a = trace (Entering fA) $ f
Hi,
isn't the correct type context for f the following?
f :: (Functor m, Monad m) = Int - m a - m (Seq a)
So your f really is a kind of specialization of g.
Could the reason for f performing better be list fusion? Anything
happening inside Control.Monad.replicateM should be subject to it.
There is Hood [11 and its graphical front-end GHood [2]. I have never
used them myself however, only seen them demonstrated. Normally, using
Debug.Trace is enough for me.
[1] http://www.ittc.ku.edu/csdl/fpg/Tools/Hood
[2] http://community.haskell.org/~claus/GHood/
Thomas
Am 10.10.2012
How would you implement bfnum? (If you've already read the paper,
what was your first answer?)
Actually, my first thought was Just traverse the tree twice. Then it
dawned on me, that the tree could be of infinite size and I settled for
the following solution:
bfsn :: Tree a - Tree Int
as well. The Eden webpage will be updated as soon as we have a
pre-release of the 6.12 branch.
Best regards,
Thomas Horstmeyer (Eden group Marburg)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe