brandonchinn178 / aeson-schemas

Easily consume JSON data on-demand with type-safety
http://hackage.haskell.org/package/aeson-schemas
BSD 3-Clause "New" or "Revised" License
52 stars 1 forks source link

Investigate support for recursive definitions #25

Open brandon-leapyear opened 4 years ago

brandon-leapyear commented 4 years ago

Investigate if it would be possible to support

type Person = [schema|
  {
    parents: List #Person,
  }
|]
brandon-leapyear commented 4 years ago

:sparkles: This is an old work account. Please reference @brandonchinn178 for all future communication :sparkles:


Maybe we could also introduce using the schema quasiquoter to generate Q [Dec], like

[schema|
Person: {
  parents: List #Person
}
|]

and we could generate both the type Person = definition, and reference the same name in the schema