Hi

>  How about a {-# IMPOSSIBLE #-} pragma that documents the fact that a
> particular point in the program *should* be unreachable?

Why not make it a function taking a string and returning a value of
any type. Then we can keep our language and not break various
parsing/type checking properties and rules on pragmas. We can even
define it:

impossible = error

Now you can use tools like Catch and Reach to ensure it is impossible.

I think it would be nice to distinguish between:

* error - inserted by the compiler
* impossible - the programmer knows this can't occur
* abort - deliberate aborting because the user made some mistake.

The safe library provides abort already.

Thanks

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

Reply via email to