On Thu, 4 Sep 2008, Ryan Ingram wrote:

Nice.  I've written similar stuff a couple of times before, but the
formulation using Maybe and modify definitely solves some problems I
started to notice as I used it on bigger structures.  However, it
might be better to separate a class of "never failing" references,
where the reader is guaranteed to succeed, from "potentially failing"
references which give a Maybe value.

I'd also not use the names "get" and "modify" because they are already
used by MonadState.    I always used "frGet", "frSet", and "frModify",
and then tended to not use them directly as I was generally working in
a state monad.

Haskell already supports qualification, why manual prefixing?
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to