I'm trying to translate this HXT code to use the Arrow 'do' syntax:
readWriteDoc :: String -> IOSLA (XIOState s) b Int
readWriteDoc path = readDocument [(a_validate, "0")] path

                  >>> writeDocument [(a_output_encoding, isoLatin1)] "-"
                  >>> getErrStatus

This attempt fails to compile:
readWriteDoc :: String -> IOSLA (XIOState s) b Int
readWriteDoc = proc path -> do
   doc       <- readDocument [(a_validate, "0")]                   -< path
   result    <- writeDocument [(a_output_encoding, isoLatin1)] "-" -< doc
   getErrStatus -< result

I get this error message:
    Couldn't match `(->)' against `IOSLA (XIOState s)'
      Expected type: t -> t1
      Inferred type: IOStateArrow s XmlTree XmlTree
    Probable cause: `writeDocument' is applied to too many arguments in the call

        (writeDocument [(a_output_encoding, isoLatin1)] "-")
    In the command: writeDocument [(a_output_encoding, isoLatin1)] "-" -< doc


Any idea what I'm doing wrong?

Thanks,
Greg