On Fri, Jun 22, 2007 at 03:14:06PM -0700, Stefan O'Rear wrote:
> On Fri, Jun 22, 2007 at 06:11:24PM -0400, Brandon S. Allbery KF8NH wrote:
> > (1) any way to flag a pattern match as "I know this is okay", don't  
> > warn about it" without shutting off pattern match warnings completely?
> 
> 
> case scrutinee of
>   Pattern -> alternative
>   Pattern -> alternative
>   _ -> error "Can't happen in functionname"

darcs has an "impossible" C-preprocessor macro that we use for this, which
uses __FILE__ and __LINE__ to automatically give a useful (to developers)
error message if it turns out that the case was possible after all.
-- 
David Roundy
http://www.darcs.net
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to