You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
case assertKnownWithMessage "foobar" xs of [] -> ...
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 .
The text was updated successfully, but these errors were encountered: