mirror of
https://github.com/github/semantic.git
synced 2024-12-18 20:31:55 +03:00
Add generic ToJSON instance for Syntax
This commit is contained in:
parent
0b0dcdc274
commit
72899821bc
@ -5,6 +5,7 @@ import Prologue
|
||||
import Data.Mergeable
|
||||
import GHC.Generics
|
||||
import Test.QuickCheck hiding (Fixed)
|
||||
import Data.Aeson
|
||||
|
||||
-- | A node in an abstract syntax tree.
|
||||
--
|
||||
@ -76,7 +77,7 @@ data Syntax a f
|
||||
| Module { moduleId:: f, moduleBody :: [f] }
|
||||
| Import f [f]
|
||||
| Export (Maybe f) [f]
|
||||
deriving (Eq, Foldable, Functor, Generic, Generic1, Mergeable, Ord, Show, Traversable)
|
||||
deriving (Eq, Foldable, Functor, Generic, Generic1, Mergeable, Ord, Show, Traversable, ToJSON)
|
||||
|
||||
|
||||
-- Instances
|
||||
|
Loading…
Reference in New Issue
Block a user