From 776f221a30f840cb7e8be5abcd93eca754e863b6 Mon Sep 17 00:00:00 2001 From: Ben Price Date: Wed, 20 Oct 2021 15:08:46 +0100 Subject: [PATCH] fixup! First iteration of tree api --- primer/src/Primer/API.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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