[Haskell-cafe] Re: Debugging partial functions by the rules
ndmitchell at gmail.com
Wed Nov 15 08:07:13 EST 2006
> Should Haskell also provide unrestricted side effects, setjmp/
> longjmp, missile launching functions, etc? After all, people who
> don't want to use them can just avoid them. :)
Fair point. But if you eliminate incomplete cases, and the error
function, you'd probably need to increase the power of the type
checker by introducing dependant types. It's a good research avenue,
and an interesting approach, but its not what Haskell is to me (but it
might be to others).
> Every time I read code containing these functions, I have to
> perform a non-local analysis to verify the invariant, or even to determine
> the invariant.
If you use the Programmatica annotations, the ESC/Haskell annotations
or Catch then you can have these assertions checked for you, and in
the case of Catch even infered for you. Admitedly ESC/Haskell and
Catch aren't ready for use yet, but they will be soon!
More information about the Haskell-Cafe