haskell / haskell/aeson

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

Open
#1,074 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
1.3k
Forks
336
Avg merge
3d 7h
Merged PRs (30d)
4

Description

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 ```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.