Skip to content

Incorrect reported pattern synonym signature

data T where
  MkT :: (Show b) => b -> T

--pattern ExNumPat :: () => Show b => b -> T
pattern ExNumPat x = MkT x

GHC reports that ExNumPat is missing a signature (correctly) but it reports the wrong type. The correct type is the one commented out.

pstest.hs:12:1: warning:
    Top-level binding with no type signature:
      ExNumPat :: forall b. Show b => b -> T
Edited by Ben Gamari
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information