Switch from hand-written monads to a real one
authorIustin Pop <iustin@google.com>
Wed, 20 May 2009 21:13:02 +0000 (22:13 +0100)
committerIustin Pop <iustin@google.com>
Wed, 20 May 2009 21:25:28 +0000 (22:25 +0100)
commit942403e6b9f188e603af205ea2fbd156aac95627
tree4f0bce8ebc1f978ee84b516f15ac250b92618568
parent144f190b60b71c1abd52e41aad1ccfae95bf371f
Switch from hand-written monads to a real one

This big patch converts from our home-grown monad-like constructs
(the Either stuff) to a real, Either-like-but-another-name monad.

We introduce a “Result a” monad, and this allows dropping many of the
extra constructs. Hopefully the code is also more clear.

Many of the functions could now be written in a generic-monad style,
instead of Result specifically, but that will come in future patches.

IAlloc.hs also has some unrelated patches.
Ganeti/HTools/IAlloc.hs
Ganeti/HTools/Rapi.hs
Ganeti/HTools/Utils.hs
hbal.hs
hn1.hs
hscan.hs