XNAT client code in Haskell