Allow expressions in SPECIALISE pragmas
The GHC Steering Committee has accepted a proposal to allow expressions in SPECIALISE pragmas, not just type signatures: see https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0493-specialise-expressions.rst. For example, this should allow {-# SPECIALISE f @Int #-}
.
In addition the proposal introduces two warnings in -Wdefault
:
-
-Wdeprecated-pragmas
, to be emitted when aSPECIALISE
pragma uses the multi-type form{-# SPECIALISE f :: T1, T2 #-}
, prior to removal of support for this syntax -
-Wuseless-specialisations
, where a specialisation does not specialise anything (e.g.{-# SPECIALISE f #-}
).