Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting issue while creating to create ToJSON instance using aeson template in aeson-1.4.7.1 #1074

Open
adiR28 opened this issue Oct 5, 2023 · 0 comments

Comments

@adiR28
Copy link

adiR28 commented Oct 5, 2023

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

@adiR28 adiR28 changed the title Getting issue while creating to create ToJSON instance of in aeson-1.4.7.1 Getting issue while creating to create ToJSON instance using aeson template in aeson-1.4.7.1 Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant