1
1
mirror of https://github.com/github/semantic.git synced 2024-12-18 12:21:57 +03:00

Add generic ToJSON instance for Syntax

This commit is contained in:
Rick Winfrey 2016-11-01 15:03:18 -05:00
parent 0b0dcdc274
commit 72899821bc

View File

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