Someone privately asked a question concerning my module "DeepSeq" for "deep" strict evaluation:
module DeepSeq where
class DeepSeq a where deepSeq :: a -> b -> b deepSeq = seq -- default, for simple cases
...
instance DeepSeq Ordering where
instance DeepSeq Integer where instance DeepSeq Int where instance DeepSeq Float where instance DeepSeq Double where
Are these supposed to be empty?
Yes. These, plus the instances for (), Bool, and Char, are "simple cases" where the default method definition (deepSeq = seq) suffices. Now realizing that the "where" keyword is optional when there are no accompanying declarations, I think it would be preferable to omit the "where" keyword to indicate that the absence of declarations is intentional. Dean