From cbf17cdc224caef50f1beebbb6100cc2ce942dac Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 16 May 2017 13:07:21 -0400 Subject: [PATCH] Clean up the definition of toJSON for Both. --- src/Renderer/JSON.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Renderer/JSON.hs b/src/Renderer/JSON.hs index 8c2ef02b8..8b75351c5 100644 --- a/src/Renderer/JSON.hs +++ b/src/Renderer/JSON.hs @@ -11,7 +11,6 @@ import Data.Aeson as A hiding (json) import Data.Bifunctor.Join import Data.Functor.Both import Data.Record -import Data.Vector as Vector hiding (toList) import Diff import Info import Patch @@ -46,7 +45,7 @@ instance ToJSON a => ToJSONFields (Join (,) a) where toJSONFields (Join (a, b)) = [ "before" .= a, "after" .= b ] instance ToJSON a => ToJSON (Join (,) a) where - toJSON (Join (a, b)) = A.Array . Vector.fromList $ toJSON <$> [ a, b ] + toJSON = toJSON . toList toEncoding = foldable instance (ToJSONFields a, ToJSONFields (f (Free f a))) => ToJSON (Free f a) where