[Haskell-cafe] Re: Documenting the impossible

Achim Schneider barsoap at web.de
Sun Jun 15 16:22:16 EDT 2008


Andrew Coppin <andrewcoppin at btinternet.com> wrote:

> I have a small idea. I'm curios if anybody else thinks it's a good
> idea...
> 
> How about a {-# IMPOSSIBLE #-} pragma that documents the fact that a 
> particular point in the program *should* be unreachable?
> 
I might support this in some way or the other _after_ we've got errors
that report source file and line number. Before that I will stay,
steadfast and stubborn, utterly ignorant of anything with less
importance.

Just use

assert s v = if debug then error s else v

in the mean time. -DHAVE_CONFIG_H ;)

-- 
(c) this sig last receiving data processing entity. Inspect headers for
past copyright information. All rights reserved. Unauthorised copying,
hiring, renting, public performance and/or broadcasting of this
signature prohibited. 



More information about the Haskell-Cafe mailing list