mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
move object call up here because we want to product values when we marshal
This commit is contained in:
parent
1a18c17347
commit
cbe303d81d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user