getting error while trying to create ToJSON instance for type Exp. using aeson 1.4.7.1
import qualified Data.Aeson.TH as AesonTH
import Data.Functor.Identity as DF
data ExpT f =
ExpT
{
name :: f Text,
age :: f Int
} deriving (Generic)
type Exp = ExpT DF.Identity
deriving instance Eq Exp
$(AesonTH.deriveToJSON AesonTH.defaultOptions ''ExpT)
getting error
normalizeDecFor: DataD or NewtypeD required
getting error while trying to create ToJSON instance for type Exp. using aeson 1.4.7.1
getting error
normalizeDecFor: DataD or NewtypeD required