glean-0.1.0.0: thrift/annotation/gen-hs2/Scope/Types.hs
-----------------------------------------------------------------
-- Autogenerated by Thrift
--
-- DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
-- @generated
-----------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
{-# OPTIONS_GHC -fno-warn-unused-imports#-}
{-# OPTIONS_GHC -fno-warn-overlapping-patterns#-}
{-# OPTIONS_GHC -fno-warn-incomplete-patterns#-}
{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns#-}
{-# OPTIONS_GHC -fno-warn-incomplete-record-updates#-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Scope.Types
(Transitive(Transitive), Program(Program), Struct(Struct),
Union(Union), Exception(Exception),
ThrownException(ThrownException), Field(Field), Typedef(Typedef),
Service(Service), Interaction(Interaction), Function(Function),
FunctionParameter(FunctionParameter), EnumValue(EnumValue),
Const(Const), Enum(Enum), Structured(Structured),
Interface(Interface), RootDefinition(RootDefinition),
Definition(Definition), DisableSchemaConst(DisableSchemaConst))
where
import qualified Control.DeepSeq as DeepSeq
import qualified Control.Monad as Monad
import qualified Control.Monad.ST.Trans as ST
import qualified Control.Monad.Trans.Class as Trans
import qualified Data.Aeson as Aeson
import qualified Data.Aeson.Types as Aeson
import qualified Data.Default as Default
import qualified Data.HashMap.Strict as HashMap
import qualified Data.Hashable as Hashable
import qualified Data.List as List
import qualified Data.Ord as Ord
import qualified Prelude as Prelude
import qualified Thrift.Binary.Parser as Parser
import qualified Thrift.CodegenTypesOnly as Thrift
import Control.Applicative ((<|>), (*>), (<*))
import Data.Aeson ((.:), (.:?), (.=), (.!=))
import Data.Monoid ((<>))
import Prelude ((.), (<$>), (<*>), (>>=), (==), (/=), (<), (++))
data Transitive = Transitive{}
deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
instance Aeson.ToJSON Transitive where
toJSON Transitive = Aeson.object Prelude.mempty
instance Thrift.ThriftStruct Transitive where
buildStruct _proxy Transitive = Thrift.genStruct _proxy []
parseStruct _proxy
= ST.runSTT
(do Prelude.return ()
let
_parse _lastId
= do _fieldBegin <- Trans.lift
(Thrift.parseFieldBegin _proxy _lastId _idMap)
case _fieldBegin of
Thrift.FieldBegin _type _id _bool -> do case _id of
_ -> Trans.lift
(Thrift.parseSkip _proxy
_type
(Prelude.Just _bool))
_parse _id
Thrift.FieldEnd -> do Prelude.pure (Transitive)
_idMap = HashMap.fromList []
_parse 0)
instance DeepSeq.NFData Transitive where
rnf Transitive = ()
instance Default.Default Transitive where
def = Transitive
instance Hashable.Hashable Transitive where
hashWithSalt __salt Transitive = __salt
data Program = Program{}
deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
instance Aeson.ToJSON Program where
toJSON Program = Aeson.object Prelude.mempty
instance Thrift.ThriftStruct Program where
buildStruct _proxy Program = Thrift.genStruct _proxy []
parseStruct _proxy
= ST.runSTT
(do Prelude.return ()
let
_parse _lastId
= do _fieldBegin <- Trans.lift
(Thrift.parseFieldBegin _proxy _lastId _idMap)
case _fieldBegin of
Thrift.FieldBegin _type _id _bool -> do case _id of
_ -> Trans.lift
(Thrift.parseSkip _proxy
_type
(Prelude.Just _bool))
_parse _id
Thrift.FieldEnd -> do Prelude.pure (Program)
_idMap = HashMap.fromList []
_parse 0)
instance DeepSeq.NFData Program where
rnf Program = ()
instance Default.Default Program where
def = Program
instance Hashable.Hashable Program where
hashWithSalt __salt Program = __salt
data Struct = Struct{}
deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
instance Aeson.ToJSON Struct where
toJSON Struct = Aeson.object Prelude.mempty
instance Thrift.ThriftStruct Struct where
buildStruct _proxy Struct = Thrift.genStruct _proxy []
parseStruct _proxy
= ST.runSTT
(do Prelude.return ()
let
_parse _lastId
= do _fieldBegin <- Trans.lift
(Thrift.parseFieldBegin _proxy _lastId _idMap)
case _fieldBegin of
Thrift.FieldBegin _type _id _bool -> do case _id of
_ -> Trans.lift
(Thrift.parseSkip _proxy
_type
(Prelude.Just _bool))
_parse _id
Thrift.FieldEnd -> do Prelude.pure (Struct)
_idMap = HashMap.fromList []
_parse 0)
instance DeepSeq.NFData Struct where
rnf Struct = ()
instance Default.Default Struct where
def = Struct
instance Hashable.Hashable Struct where
hashWithSalt __salt Struct = __salt
data Union = Union{}
deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
instance Aeson.ToJSON Union where
toJSON Union = Aeson.object Prelude.mempty
instance Thrift.ThriftStruct Union where
buildStruct _proxy Union = Thrift.genStruct _proxy []
parseStruct _proxy
= ST.runSTT
(do Prelude.return ()
let
_parse _lastId
= do _fieldBegin <- Trans.lift
(Thrift.parseFieldBegin _proxy _lastId _idMap)
case _fieldBegin of
Thrift.FieldBegin _type _id _bool -> do case _id of
_ -> Trans.lift
(Thrift.parseSkip _proxy
_type
(Prelude.Just _bool))
_parse _id
Thrift.FieldEnd -> do Prelude.pure (Union)
_idMap = HashMap.fromList []
_parse 0)
instance DeepSeq.NFData Union where
rnf Union = ()
instance Default.Default Union where
def = Union
instance Hashable.Hashable Union where
hashWithSalt __salt Union = __salt
data Exception = Exception{}
deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
instance Aeson.ToJSON Exception where
toJSON Exception = Aeson.object Prelude.mempty
instance Thrift.ThriftStruct Exception where
buildStruct _proxy Exception = Thrift.genStruct _proxy []
parseStruct _proxy
= ST.runSTT
(do Prelude.return ()
let
_parse _lastId
= do _fieldBegin <- Trans.lift
(Thrift.parseFieldBegin _proxy _lastId _idMap)
case _fieldBegin of
Thrift.FieldBegin _type _id _bool -> do case _id of
_ -> Trans.lift
(Thrift.parseSkip _proxy
_type
(Prelude.Just _bool))
_parse _id
Thrift.FieldEnd -> do Prelude.pure (Exception)
_idMap = HashMap.fromList []
_parse 0)
instance DeepSeq.NFData Exception where
rnf Exception = ()
instance Default.Default Exception where
def = Exception
instance Hashable.Hashable Exception where
hashWithSalt __salt Exception = __salt
data ThrownException = ThrownException{}
deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
instance Aeson.ToJSON ThrownException where
toJSON ThrownException = Aeson.object Prelude.mempty
instance Thrift.ThriftStruct ThrownException where
buildStruct _proxy ThrownException = Thrift.genStruct _proxy []
parseStruct _proxy
= ST.runSTT
(do Prelude.return ()
let
_parse _lastId
= do _fieldBegin <- Trans.lift
(Thrift.parseFieldBegin _proxy _lastId _idMap)
case _fieldBegin of
Thrift.FieldBegin _type _id _bool -> do case _id of
_ -> Trans.lift
(Thrift.parseSkip _proxy
_type
(Prelude.Just _bool))
_parse _id
Thrift.FieldEnd -> do Prelude.pure (ThrownException)
_idMap = HashMap.fromList []
_parse 0)
instance DeepSeq.NFData ThrownException where
rnf ThrownException = ()
instance Default.Default ThrownException where
def = ThrownException
instance Hashable.Hashable ThrownException where
hashWithSalt __salt ThrownException = __salt
data Field = Field{}
deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
instance Aeson.ToJSON Field where
toJSON Field = Aeson.object Prelude.mempty
instance Thrift.ThriftStruct Field where
buildStruct _proxy Field = Thrift.genStruct _proxy []
parseStruct _proxy
= ST.runSTT
(do Prelude.return ()
let
_parse _lastId
= do _fieldBegin <- Trans.lift
(Thrift.parseFieldBegin _proxy _lastId _idMap)
case _fieldBegin of
Thrift.FieldBegin _type _id _bool -> do case _id of
_ -> Trans.lift
(Thrift.parseSkip _proxy
_type
(Prelude.Just _bool))
_parse _id
Thrift.FieldEnd -> do Prelude.pure (Field)
_idMap = HashMap.fromList []
_parse 0)
instance DeepSeq.NFData Field where
rnf Field = ()
instance Default.Default Field where
def = Field
instance Hashable.Hashable Field where
hashWithSalt __salt Field = __salt
data Typedef = Typedef{}
deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
instance Aeson.ToJSON Typedef where
toJSON Typedef = Aeson.object Prelude.mempty
instance Thrift.ThriftStruct Typedef where
buildStruct _proxy Typedef = Thrift.genStruct _proxy []
parseStruct _proxy
= ST.runSTT
(do Prelude.return ()
let
_parse _lastId
= do _fieldBegin <- Trans.lift
(Thrift.parseFieldBegin _proxy _lastId _idMap)
case _fieldBegin of
Thrift.FieldBegin _type _id _bool -> do case _id of
_ -> Trans.lift
(Thrift.parseSkip _proxy
_type
(Prelude.Just _bool))
_parse _id
Thrift.FieldEnd -> do Prelude.pure (Typedef)
_idMap = HashMap.fromList []
_parse 0)
instance DeepSeq.NFData Typedef where
rnf Typedef = ()
instance Default.Default Typedef where
def = Typedef
instance Hashable.Hashable Typedef where
hashWithSalt __salt Typedef = __salt
data Service = Service{}
deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
instance Aeson.ToJSON Service where
toJSON Service = Aeson.object Prelude.mempty
instance Thrift.ThriftStruct Service where
buildStruct _proxy Service = Thrift.genStruct _proxy []
parseStruct _proxy
= ST.runSTT
(do Prelude.return ()
let
_parse _lastId
= do _fieldBegin <- Trans.lift
(Thrift.parseFieldBegin _proxy _lastId _idMap)
case _fieldBegin of
Thrift.FieldBegin _type _id _bool -> do case _id of
_ -> Trans.lift
(Thrift.parseSkip _proxy
_type
(Prelude.Just _bool))
_parse _id
Thrift.FieldEnd -> do Prelude.pure (Service)
_idMap = HashMap.fromList []
_parse 0)
instance DeepSeq.NFData Service where
rnf Service = ()
instance Default.Default Service where
def = Service
instance Hashable.Hashable Service where
hashWithSalt __salt Service = __salt
data Interaction = Interaction{}
deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
instance Aeson.ToJSON Interaction where
toJSON Interaction = Aeson.object Prelude.mempty
instance Thrift.ThriftStruct Interaction where
buildStruct _proxy Interaction = Thrift.genStruct _proxy []
parseStruct _proxy
= ST.runSTT
(do Prelude.return ()
let
_parse _lastId
= do _fieldBegin <- Trans.lift
(Thrift.parseFieldBegin _proxy _lastId _idMap)
case _fieldBegin of
Thrift.FieldBegin _type _id _bool -> do case _id of
_ -> Trans.lift
(Thrift.parseSkip _proxy
_type
(Prelude.Just _bool))
_parse _id
Thrift.FieldEnd -> do Prelude.pure (Interaction)
_idMap = HashMap.fromList []
_parse 0)
instance DeepSeq.NFData Interaction where
rnf Interaction = ()
instance Default.Default Interaction where
def = Interaction
instance Hashable.Hashable Interaction where
hashWithSalt __salt Interaction = __salt
data Function = Function{}
deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
instance Aeson.ToJSON Function where
toJSON Function = Aeson.object Prelude.mempty
instance Thrift.ThriftStruct Function where
buildStruct _proxy Function = Thrift.genStruct _proxy []
parseStruct _proxy
= ST.runSTT
(do Prelude.return ()
let
_parse _lastId
= do _fieldBegin <- Trans.lift
(Thrift.parseFieldBegin _proxy _lastId _idMap)
case _fieldBegin of
Thrift.FieldBegin _type _id _bool -> do case _id of
_ -> Trans.lift
(Thrift.parseSkip _proxy
_type
(Prelude.Just _bool))
_parse _id
Thrift.FieldEnd -> do Prelude.pure (Function)
_idMap = HashMap.fromList []
_parse 0)
instance DeepSeq.NFData Function where
rnf Function = ()
instance Default.Default Function where
def = Function
instance Hashable.Hashable Function where
hashWithSalt __salt Function = __salt
data FunctionParameter = FunctionParameter{}
deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
instance Aeson.ToJSON FunctionParameter where
toJSON FunctionParameter = Aeson.object Prelude.mempty
instance Thrift.ThriftStruct FunctionParameter where
buildStruct _proxy FunctionParameter = Thrift.genStruct _proxy []
parseStruct _proxy
= ST.runSTT
(do Prelude.return ()
let
_parse _lastId
= do _fieldBegin <- Trans.lift
(Thrift.parseFieldBegin _proxy _lastId _idMap)
case _fieldBegin of
Thrift.FieldBegin _type _id _bool -> do case _id of
_ -> Trans.lift
(Thrift.parseSkip _proxy
_type
(Prelude.Just _bool))
_parse _id
Thrift.FieldEnd -> do Prelude.pure (FunctionParameter)
_idMap = HashMap.fromList []
_parse 0)
instance DeepSeq.NFData FunctionParameter where
rnf FunctionParameter = ()
instance Default.Default FunctionParameter where
def = FunctionParameter
instance Hashable.Hashable FunctionParameter where
hashWithSalt __salt FunctionParameter = __salt
data EnumValue = EnumValue{}
deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
instance Aeson.ToJSON EnumValue where
toJSON EnumValue = Aeson.object Prelude.mempty
instance Thrift.ThriftStruct EnumValue where
buildStruct _proxy EnumValue = Thrift.genStruct _proxy []
parseStruct _proxy
= ST.runSTT
(do Prelude.return ()
let
_parse _lastId
= do _fieldBegin <- Trans.lift
(Thrift.parseFieldBegin _proxy _lastId _idMap)
case _fieldBegin of
Thrift.FieldBegin _type _id _bool -> do case _id of
_ -> Trans.lift
(Thrift.parseSkip _proxy
_type
(Prelude.Just _bool))
_parse _id
Thrift.FieldEnd -> do Prelude.pure (EnumValue)
_idMap = HashMap.fromList []
_parse 0)
instance DeepSeq.NFData EnumValue where
rnf EnumValue = ()
instance Default.Default EnumValue where
def = EnumValue
instance Hashable.Hashable EnumValue where
hashWithSalt __salt EnumValue = __salt
data Const = Const{}
deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
instance Aeson.ToJSON Const where
toJSON Const = Aeson.object Prelude.mempty
instance Thrift.ThriftStruct Const where
buildStruct _proxy Const = Thrift.genStruct _proxy []
parseStruct _proxy
= ST.runSTT
(do Prelude.return ()
let
_parse _lastId
= do _fieldBegin <- Trans.lift
(Thrift.parseFieldBegin _proxy _lastId _idMap)
case _fieldBegin of
Thrift.FieldBegin _type _id _bool -> do case _id of
_ -> Trans.lift
(Thrift.parseSkip _proxy
_type
(Prelude.Just _bool))
_parse _id
Thrift.FieldEnd -> do Prelude.pure (Const)
_idMap = HashMap.fromList []
_parse 0)
instance DeepSeq.NFData Const where
rnf Const = ()
instance Default.Default Const where
def = Const
instance Hashable.Hashable Const where
hashWithSalt __salt Const = __salt
data Enum = Enum{}
deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
instance Aeson.ToJSON Enum where
toJSON Enum = Aeson.object Prelude.mempty
instance Thrift.ThriftStruct Enum where
buildStruct _proxy Enum = Thrift.genStruct _proxy []
parseStruct _proxy
= ST.runSTT
(do Prelude.return ()
let
_parse _lastId
= do _fieldBegin <- Trans.lift
(Thrift.parseFieldBegin _proxy _lastId _idMap)
case _fieldBegin of
Thrift.FieldBegin _type _id _bool -> do case _id of
_ -> Trans.lift
(Thrift.parseSkip _proxy
_type
(Prelude.Just _bool))
_parse _id
Thrift.FieldEnd -> do Prelude.pure (Enum)
_idMap = HashMap.fromList []
_parse 0)
instance DeepSeq.NFData Enum where
rnf Enum = ()
instance Default.Default Enum where
def = Enum
instance Hashable.Hashable Enum where
hashWithSalt __salt Enum = __salt
data Structured = Structured{}
deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
instance Aeson.ToJSON Structured where
toJSON Structured = Aeson.object Prelude.mempty
instance Thrift.ThriftStruct Structured where
buildStruct _proxy Structured = Thrift.genStruct _proxy []
parseStruct _proxy
= ST.runSTT
(do Prelude.return ()
let
_parse _lastId
= do _fieldBegin <- Trans.lift
(Thrift.parseFieldBegin _proxy _lastId _idMap)
case _fieldBegin of
Thrift.FieldBegin _type _id _bool -> do case _id of
_ -> Trans.lift
(Thrift.parseSkip _proxy
_type
(Prelude.Just _bool))
_parse _id
Thrift.FieldEnd -> do Prelude.pure (Structured)
_idMap = HashMap.fromList []
_parse 0)
instance DeepSeq.NFData Structured where
rnf Structured = ()
instance Default.Default Structured where
def = Structured
instance Hashable.Hashable Structured where
hashWithSalt __salt Structured = __salt
data Interface = Interface{}
deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
instance Aeson.ToJSON Interface where
toJSON Interface = Aeson.object Prelude.mempty
instance Thrift.ThriftStruct Interface where
buildStruct _proxy Interface = Thrift.genStruct _proxy []
parseStruct _proxy
= ST.runSTT
(do Prelude.return ()
let
_parse _lastId
= do _fieldBegin <- Trans.lift
(Thrift.parseFieldBegin _proxy _lastId _idMap)
case _fieldBegin of
Thrift.FieldBegin _type _id _bool -> do case _id of
_ -> Trans.lift
(Thrift.parseSkip _proxy
_type
(Prelude.Just _bool))
_parse _id
Thrift.FieldEnd -> do Prelude.pure (Interface)
_idMap = HashMap.fromList []
_parse 0)
instance DeepSeq.NFData Interface where
rnf Interface = ()
instance Default.Default Interface where
def = Interface
instance Hashable.Hashable Interface where
hashWithSalt __salt Interface = __salt
data RootDefinition = RootDefinition{}
deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
instance Aeson.ToJSON RootDefinition where
toJSON RootDefinition = Aeson.object Prelude.mempty
instance Thrift.ThriftStruct RootDefinition where
buildStruct _proxy RootDefinition = Thrift.genStruct _proxy []
parseStruct _proxy
= ST.runSTT
(do Prelude.return ()
let
_parse _lastId
= do _fieldBegin <- Trans.lift
(Thrift.parseFieldBegin _proxy _lastId _idMap)
case _fieldBegin of
Thrift.FieldBegin _type _id _bool -> do case _id of
_ -> Trans.lift
(Thrift.parseSkip _proxy
_type
(Prelude.Just _bool))
_parse _id
Thrift.FieldEnd -> do Prelude.pure (RootDefinition)
_idMap = HashMap.fromList []
_parse 0)
instance DeepSeq.NFData RootDefinition where
rnf RootDefinition = ()
instance Default.Default RootDefinition where
def = RootDefinition
instance Hashable.Hashable RootDefinition where
hashWithSalt __salt RootDefinition = __salt
data Definition = Definition{}
deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
instance Aeson.ToJSON Definition where
toJSON Definition = Aeson.object Prelude.mempty
instance Thrift.ThriftStruct Definition where
buildStruct _proxy Definition = Thrift.genStruct _proxy []
parseStruct _proxy
= ST.runSTT
(do Prelude.return ()
let
_parse _lastId
= do _fieldBegin <- Trans.lift
(Thrift.parseFieldBegin _proxy _lastId _idMap)
case _fieldBegin of
Thrift.FieldBegin _type _id _bool -> do case _id of
_ -> Trans.lift
(Thrift.parseSkip _proxy
_type
(Prelude.Just _bool))
_parse _id
Thrift.FieldEnd -> do Prelude.pure (Definition)
_idMap = HashMap.fromList []
_parse 0)
instance DeepSeq.NFData Definition where
rnf Definition = ()
instance Default.Default Definition where
def = Definition
instance Hashable.Hashable Definition where
hashWithSalt __salt Definition = __salt
data DisableSchemaConst = DisableSchemaConst{}
deriving (Prelude.Eq, Prelude.Show, Prelude.Ord)
instance Aeson.ToJSON DisableSchemaConst where
toJSON DisableSchemaConst = Aeson.object Prelude.mempty
instance Thrift.ThriftStruct DisableSchemaConst where
buildStruct _proxy DisableSchemaConst = Thrift.genStruct _proxy []
parseStruct _proxy
= ST.runSTT
(do Prelude.return ()
let
_parse _lastId
= do _fieldBegin <- Trans.lift
(Thrift.parseFieldBegin _proxy _lastId _idMap)
case _fieldBegin of
Thrift.FieldBegin _type _id _bool -> do case _id of
_ -> Trans.lift
(Thrift.parseSkip _proxy
_type
(Prelude.Just _bool))
_parse _id
Thrift.FieldEnd -> do Prelude.pure (DisableSchemaConst)
_idMap = HashMap.fromList []
_parse 0)
instance DeepSeq.NFData DisableSchemaConst where
rnf DisableSchemaConst = ()
instance Default.Default DisableSchemaConst where
def = DisableSchemaConst
instance Hashable.Hashable DisableSchemaConst where
hashWithSalt __salt DisableSchemaConst = __salt