FFI Report, CVS Id 1.11

Alastair David Reid reid at cs.utah.edu
Fri Aug 31 14:33:38 EDT 2001

> The implementation is just something like

>    addIOErrorLocAndPath loc path io 
>            = catch io (\err -> ioError err{loc=loc,path=path})

This reminds me of _scc_: 

1) We're annotating the code with programmer-meaningful annotations
   which are then used at runtime to help them understand program

2) It has the same nested behaviour as _scc_

3) Just as stacks of cost centres are useful for profiling, it'd be
   useful to have stacks of error locations.  
   When you print an IOError, you'd get a list of (nested) error
   locations - it'd feel a lot like the stack dumps you get from 

(It'd also be useful to have a function like this in non-monadic code.
Implementation should be easy and I think the semantics is

Alastair Reid        reid at cs.utah.edu        http://www.cs.utah.edu/~reid/

More information about the FFI mailing list