Skip to content

Disallow users to write instances for KnownNat and KnownSymbol

Consider the following patent nonsense:

{-# LANGUAGE FlexibleInstances #-}
import GHC.TypeLits
instance KnownNat n

Originally this was accepted (albeit with a warning about the missing natSing method). It is now rejected, as with instances of KnownSymbol, in the same way as instances of Typeable, which says:

    Class ‘Typeable’ does not support user-specified instances
Edited by sean
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information