Hi again,
I was silent for some time but in this time I created QuickCheck tests
for Data.Tree.Zipper which achieve 100% coverage with HPC. I also
created a ticket for it: Ticket #2324
http://hackage.haskell.org/trac/ghc/ticket/2324
The attached file is the current implementation and it
Hello,
I think that the modified API (no state monad, and using Maybe) is
quite nice! I implemented a version of the the suggested API using a
slightly different data structure, which makes the code a bit simpler,
I think. I put the code in the Haskell wiki:
Aha. I see the point. The current design was influenced from some
other implementation that I spot somewhere in the net. I will change
it but this reminds me of another problem. Most movement functions
raise error if they can't do the movement. This is convenient if you
somehow know that the
Krasimir Angelov wrote:
The monads design is used in Data.Map i.e.
lookup :: (Monad m, Ord k) = k - Map k a - m a
which is widely considered a poor design decision and a wart on Data.Map.
:-)
Seriously, if you don't return a useful error message, then Maybe is as
good as it gets, why not
I think that MonadZero m = ... is better than just Maybe. If you can
have more general solution for free, why fight it?
On 23 May 2008, at 14:55, Jules Bean wrote:
Krasimir Angelov wrote:
The monads design is used in Data.Map i.e.
lookup :: (Monad m, Ord k) = k - Map k a - m a
which is
On Fri, May 23, 2008 at 10:55 AM, Jules Bean [EMAIL PROTECTED] wrote:
Krasimir Angelov wrote:
The monads design is used in Data.Map i.e.
lookup :: (Monad m, Ord k) = k - Map k a - m a
which is widely considered a poor design decision and a wart on Data.Map.
It is? Can you point to
On 2008 May 23, at 13:34, Luke Palmer wrote:
On Fri, May 23, 2008 at 10:55 AM, Jules Bean [EMAIL PROTECTED]
wrote:
Krasimir Angelov wrote:
The monads design is used in Data.Map i.e.
lookup :: (Monad m, Ord k) = k - Map k a - m a
which is widely considered a poor design decision and a
Using 'monad' here makes it easier to make a mistake with the code, as
it permits new kinds of unexpected failure.
This is Haskell, we should use Maybe.
And users that want it can lift Maybe a - m a
-- Don
(-1) for new uses of fail in place of Nothing.
kr.angelov:
The monads design is used
Hello Guys,
We have Data.Tree in the standard libraries for a long time but for
some reason we still don't have standard implementation for Zipper. I
wrote recently one implementation for Yi but there are many other
versions hanging around. At least I know for some. I propose to add
one in the
Hi Krasimir,
I had a long exchange with chessguy about this interface, suggesting a
significant change in style, simplifying the type. (Incidentally, the
change removed the State and hence mtl dependence.)
The conversation is on http://tunes.org/~nef/logs/haskell/08.05.17, starting
with
* Every definition of tp
I meant of type, forgetting that my emacs abbrevs don't expand in gmail.
On Thu, May 22, 2008 at 2:13 PM, Conal Elliott [EMAIL PROTECTED] wrote:
Hi Krasimir,
I had a long exchange with chessguy about this interface, suggesting a
significant change in style,
11 matches
Mail list logo