From 72899821bc17b761e08fed4cd93e4ed148fd5f83 Mon Sep 17 00:00:00 2001 From: Rick Winfrey Date: Tue, 1 Nov 2016 15:03:18 -0500 Subject: [PATCH] Add generic ToJSON instance for Syntax --- src/Syntax.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Syntax.hs b/src/Syntax.hs index 3baf604f6..f6fa0f3bf 100644 --- a/src/Syntax.hs +++ b/src/Syntax.hs @@ -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