Removal candidates in patterns

John Meacham john at
Mon Jan 30 21:02:42 EST 2006

On Thu, Jan 26, 2006 at 07:35:42PM +0000, Olaf Chitil wrote:
> If Haskell had a type for natural numbers I'd be in favour of n+k and k 
> patterns (working only for this type, not any other numerical type).

Ideally, I'd like to see pattern matching on numbers be seperated into its own
class independently of 'Num' so we can decide whether to allow pattern
matching independently of whether something is a 'Num' something like

class NumMatchable a where
        numMatches :: Integer -> a -> Bool

John Meacham - ⑆⑆john⑈ 

More information about the Haskell-prime mailing list