SimpleFail15.hs:5:8: error: Illegal polymorphic or qualified type: (a ~ b) => t Perhaps you intended to use RankNTypes or Rank2Types In the type signature: foo :: (a, b) -> (a ~ b => t) -> (a, b)