Fix annotateIOError (bug noticed by Ross Paterson).
-> Maybe Handle
-> Maybe FilePath
-> IOError
-> Maybe Handle
-> Maybe FilePath
-> IOError
-annotateIOError (IOError hdl errTy _ str path) loc ohdl opath =
+annotateIOError (IOError ohdl errTy _ str opath) loc hdl path =
IOError (hdl `mplus` ohdl) errTy loc str (path `mplus` opath)
where
Nothing `mplus` ys = ys
IOError (hdl `mplus` ohdl) errTy loc str (path `mplus` opath)
where
Nothing `mplus` ys = ys