calamity-0.1.7.0: A library for writing discord bots
Safe HaskellNone
LanguageHaskell2010

Calamity.Internal.AesonThings

Documentation

type family WithSpecialCases rules a :: Type where ... Source #

Equations

WithSpecialCases rules a = WithSpecialCasesInner (FoldSpecialCases rules) a 

newtype WithSpecialCasesInner (rules :: SpecialCaseList) a Source #

Instances

Instances details
(RunSpecialCase rules, Typeable a, Generic a, GFromJSON Zero (Rep a)) => FromJSON (WithSpecialCasesInner rules a) Source # 
Instance details

Defined in Calamity.Internal.AesonThings

Methods

parseJSON :: Value -> Parser (WithSpecialCasesInner rules a)

parseJSONList :: Value -> Parser [WithSpecialCasesInner rules a]

type IfNoneThen label d = SpecialRule label ('IfNoneThen d) Source #

type ExtractField label field = SpecialRule label ('ExtractField field) Source #

type ExtractFields label field = SpecialRule label ('ExtractFields field) Source #

type InjectID label mn idn = SpecialRule label ('InjectID mn idn) Source #

data SpecialRule (label :: Symbol) (action :: SpecialRuleAction) Source #

data DefaultToEmptyArray Source #

Instances

Instances details
Reifies DefaultToEmptyArray Value Source # 
Instance details

Defined in Calamity.Internal.AesonThings

Methods

reflect :: proxy DefaultToEmptyArray -> Value

data DefaultToZero Source #

Instances

Instances details
Reifies DefaultToZero Value Source # 
Instance details

Defined in Calamity.Internal.AesonThings

Methods

reflect :: proxy DefaultToZero -> Value

data DefaultToFalse Source #

Instances

Instances details
Reifies DefaultToFalse Value Source # 
Instance details

Defined in Calamity.Internal.AesonThings

Methods

reflect :: proxy DefaultToFalse -> Value

newtype CalamityJSON a Source #

Constructors

CalamityJSON 

Fields

Instances

Instances details
(Typeable a, Generic a, GFromJSON Zero (Rep a)) => FromJSON (CalamityJSON a) Source # 
Instance details

Defined in Calamity.Internal.AesonThings

Methods

parseJSON :: Value -> Parser (CalamityJSON a)

parseJSONList :: Value -> Parser [CalamityJSON a]

(Typeable a, Generic a, GToJSON Zero (Rep a), GToEncoding Zero (Rep a)) => ToJSON (CalamityJSON a) Source # 
Instance details

Defined in Calamity.Internal.AesonThings

Methods

toJSON :: CalamityJSON a -> Value

toEncoding :: CalamityJSON a -> Encoding

toJSONList :: [CalamityJSON a] -> Value

toEncodingList :: [CalamityJSON a] -> Encoding

jsonOptions :: Options Source #