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.
Showing
- Ganeti/HTools/IAlloc.hs 62 additions, 59 deletionsGaneti/HTools/IAlloc.hs
- Ganeti/HTools/Rapi.hs 37 additions, 42 deletionsGaneti/HTools/Rapi.hs
- Ganeti/HTools/Utils.hs 58 additions, 111 deletionsGaneti/HTools/Utils.hs
- hbal.hs 2 additions, 2 deletionshbal.hs
- hn1.hs 2 additions, 2 deletionshn1.hs
- hscan.hs 18 additions, 18 deletionshscan.hs
Loading
Please register or sign in to comment