Closed jwaldmann closed 10 years ago
When compiling with CO4.Compilation.compileFile
(as in most non-trivial use-cases) all assertKnown
are converted to assertKnownLoc
: if assertKnowLoc
fails, its location in the source file is dumped.
This does not work when compiling with CO4.Compilation.compile
, because source locations are provided by Language.Haskell.Exts
which is not used in CO4.Compilation.compile
. Again, this should't be a problem because CO4.Compilation.compile
is merely used for simple examples.
Currently we have
assertKnown :: a -> a
for run-time checks. If there are several such checks in the code, and one of them fails, I don't see which one. Ideally, I'd want the source location of the failing assertKnown in the error message.As a work-around, we can have the programmer write a message in the assert, as in
of course a shorter name is preferred. The idea is similar to http://www.haskell.org/ghc/docs/7.8.2/html/users_guide/profiling.html#scc-pragma .