Closed
Description
Given this:
data Metaprogram = Metaprogram
{ mp_name :: !Text
, mp_known_by_auto :: !Bool
, mp_show_code_action :: !Bool
, mp_program :: !(TacticsM ())
}
deriving stock Generic
{-# ANN Metaprogram "hello" #-}
instance NFData Metaprogram where
rnf (!(Metaprogram !_ !_ !_ !_)) = ()
without -XBangPatterns
enabled, I get a code action on the last line, suggesting I add BangPatterns
. Doing so produces this output:
data Metaprogram = Metaprogram
{ mp_name :: !Text
, mp_known_by_auto :: !Bool
, mp_show_code_action :: !Bool
, mp_program :: !(TacticsM ())
}
deriving stock Generic
{-# ANN Metaprogram "hello" #-}
{-# LANGUAGE BangPatterns #-}
instance NFData Metaprogram where
rnf (!(Metaprogram !_ !_ !_ !_)) = ()
which is super the wrong place for it.