I've been experimenting with a state monad. Below is a list of what is
included in my stack trace [+] and what isn't [-]. I've noticed that a call
to a symbol that is bound to the result of a domonad (not sure if that's
the right way to describe it) doesn't end up in my stack trace. I was
planning on having a lot of things like that combined arbitrarily (see cc
in the list below), but if they're not going to show up in stack traces
(besides calls to m_bind -- which are not informative since they're always
going to be on the same line), then that makes it tough to debug... Can I
do something to cause my stack trace to include them somehow? Thanks in
advance!
[+] call to aa, an ordinary method whose body is (bb {}) shows up in the
stack trace naturally.
[-] bb is excluded from the stack trace. It is defined to be synonymous
with symbol cc with (def bb cc). Of course, I don't expect this to be in
the stack trace since it's not a method call. But I did include it as part
of poking my stack trace.
[-] cc is excluded from the stack trace. It is bound to the result of a
state-m domonad: (def cc (domonad state-m .... My thinking (which appears
to be incorrect) is that this definition of cc should be equivalent to (def
cc <some fn which takes a state and returns [value new-state]>) which I
thought would be like a defn and thus would show up in a stack trace when
called.
[+] dd is a monadic value that's used inside cc (inside the domonad part).
So dd is a fn that takes a state and returns [value new-state]. dd shows up
in the stack trace when called.
[+] ee is an ordinary method called by dd. ee shows up in the stack trace.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en