diff --git a/primer/src/Primer/API.hs b/primer/src/Primer/API.hs index fb464a069..8967f3619 100644 --- a/primer/src/Primer/API.hs +++ b/primer/src/Primer/API.hs @@ -299,16 +299,18 @@ data APIProg = APIProg instance ToJSON APIProg +-- | This type is the api's view of a 'Def' +-- (this is expected to evolve as we flesh out the API) data APIDef = APIDef { id :: ID , name :: Name , _type :: Tree , term :: Tree - -- type and term: REVIEW: naming, what is the openapi.json like (esp _type), - -- should I force it to inline? (iirc, 'type' is a keyword both in Haskell - -- and TypeScript) + -- type and term: REVIEW: naming + -- (iirc, 'type' is a keyword both in Haskell and TypeScript) } deriving (Generic) + instance ToJSON APIDef viewProg :: Prog -> APIProg