Dear Café,

I'm working on a EDSL that will include both type checks (at compile
time) and semantic checks (at run time). - Semantic properties are known
at compile time but feel too complex to me to be encoded in the type system.

If one of the runtime checks fails, I'd like to print the location of the error, i.e. not
  Error: Unknown field `AMOUNT' in table `ENTRIES'
(where? why?)
but
  Error: Unknown field `AMOUNT' in table `ENTRIES'
  Referenced at analysis1.hs:43:7 by `sumByInvoice'
    which was called at analysis1.hs:66:3 by `main'
  ENTRIES defined at analysis1.hs:13:8

I'm not yet sure which level of granularity I want for error messages
and one can probably get arbitrarily fancy on this.
For the moment I think it would be enough to auto-insert the location of
calls to a certain set of functions.

Any experience on this?

Thanks a lot.
-- Steffen


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to