1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 17:04:47 +03:00

move object call up here because we want to product values when we marshal

This commit is contained in:
Ayman Nadeem 2020-01-21 16:13:45 -05:00
parent 1a18c17347
commit cbe303d81d

View File

@ -24,6 +24,7 @@ import qualified Data.Text as Text
-- Serialize unmarshaled ASTs into JSON representation by auto-deriving Aeson instances generically
class MarshalJSON t where
marshal :: (ToJSON a) => t a -> Value -- don't need default signature because they're the same now
marshal = object . fields []
-- Create MarshalJSON instances for each type constructor
instance (GMarshalJSON (Rep1 t), Generic1 t) => MarshalJSON t