[Haskell-cafe] Quickcheck examples and Data.Word32

John Meacham john at repetae.net
Thu Oct 27 20:29:46 EDT 2005

On Thu, Oct 27, 2005 at 07:06:12PM +0100, Joel Reymont wrote:
> This requires
> {-# OPTIONS_GHC -fallow-undecidable-instances #-}
> but since I'm using -fglasgow-exts in a lot of places I'm wondering  
> if adding undecidable instances would be a bad habit. I guess not...  
> not until I shoot myself in the foot :-).

I would avoid them if at all possible. especially if you are still
learning haskell, I have found they often hide real errors in ones
design of a class hierarchy by making something compile that shouldn't.

I had a particularly nasty bug in my regex library when I only had one
operator (=~) that was not being caught because of undecidable instances
being allowed, when I turned them off, I thought about the problem again
and realized that separate monadic (=~~) and non monadic (=~) versions
not only solved the issue but was actually a much nicer design with much
clearer semantics.


John Meacham - ⑆repetae.net⑆john⑈ 

More information about the Haskell-Cafe mailing list