On Fri, Sep 18, 2015 at 9:00 PM, Andrew Bernard <andrew.bernard@gmail.com> wrote:
Is this how normal Haskell is developed and written in practice? I find the type and the function impenetrably dense and difficult to understand. Should I be aspiring to have my functions look and work like this? Of course it depends on what you want to do, but the essence of the question is, does Haskell ultimately end up looking like this for any real programming, beyond textbook list manipulation functions?

If you need that, then yes. If not, then no.

Usually that kind of thing is packaged up in higher level libraries; the type Eval6 would be exposed, the underlying stuff is used internally and you would not normally need to know or care about it unless you were specifically working on the internals of that library. Most applications you would write, you only care about Eval6 and any functions exported along with it.

That said, I think in most cases you would use a newtype and derive through MonadReader, MonadError, MonadState, and MonadIO so you can ignore precisely how the type was built and just use it.

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net