Hastructure
Safe HaskellNone
LanguageHaskell2010

Triggers

Documentation

data Trigger Source #

Constructors

Trigger 

Fields

Instances

Instances details
FromJSON Trigger Source # 
Instance details

Defined in Triggers

ToJSON Trigger Source # 
Instance details

Defined in Triggers

Generic Trigger Source # 
Instance details

Defined in Triggers

Associated Types

type Rep Trigger 
Instance details

Defined in Triggers

Methods

from :: Trigger -> Rep Trigger x #

to :: Rep Trigger x -> Trigger #

Show Trigger Source # 
Instance details

Defined in Triggers

Eq Trigger Source # 
Instance details

Defined in Triggers

Methods

(==) :: Trigger -> Trigger -> Bool #

(/=) :: Trigger -> Trigger -> Bool #

Ord Trigger Source # 
Instance details

Defined in Triggers

type Rep Trigger Source # 
Instance details

Defined in Triggers

data TriggerEffect Source #

Constructors

DealStatusTo DealStatus

change deal status

DoAccrueFee FeeNames

accure fee

AddTrigger Trigger

add a new trigger

ChangeReserveBalance String ReserveAmount

update reserve target balance

CloseDeal (Int, DatePattern) (Int, DatePattern) (PricingMethod, AccountName, Maybe DealStats) (Maybe [CollectionRule])

close the deal

BuyAsset AccountName PricingMethod

buy asset from the assumption using funds from account

ChangeBondRate BondName InterestInfo IRate

change bond rate

TriggerEffects [TriggerEffect]

a combination of effects above

RunActions [Action]

run a list of waterfall actions

DoNothing

do nothing

Instances

Instances details
FromJSON TriggerEffect Source # 
Instance details

Defined in Triggers

ToJSON TriggerEffect Source # 
Instance details

Defined in Triggers

Generic TriggerEffect Source # 
Instance details

Defined in Triggers

Associated Types

type Rep TriggerEffect 
Instance details

Defined in Triggers

type Rep TriggerEffect = D1 ('MetaData "TriggerEffect" "Triggers" "Hastructure-0.50.4-C46IQoFqEMALLVrlvHB4m" 'False) (((C1 ('MetaCons "DealStatusTo" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DealStatus)) :+: C1 ('MetaCons "DoAccrueFee" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FeeNames))) :+: (C1 ('MetaCons "AddTrigger" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Trigger)) :+: (C1 ('MetaCons "ChangeReserveBalance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ReserveAmount)) :+: C1 ('MetaCons "CloseDeal" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Int, DatePattern)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Int, DatePattern))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PricingMethod, AccountName, Maybe DealStats)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [CollectionRule]))))))) :+: ((C1 ('MetaCons "BuyAsset" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AccountName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PricingMethod)) :+: C1 ('MetaCons "ChangeBondRate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BondName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 InterestInfo) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IRate)))) :+: (C1 ('MetaCons "TriggerEffects" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TriggerEffect])) :+: (C1 ('MetaCons "RunActions" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Action])) :+: C1 ('MetaCons "DoNothing" 'PrefixI 'False) (U1 :: Type -> Type)))))
Show TriggerEffect Source # 
Instance details

Defined in Triggers

Eq TriggerEffect Source # 
Instance details

Defined in Triggers

Ord TriggerEffect Source # 
Instance details

Defined in Triggers

type Rep TriggerEffect Source # 
Instance details

Defined in Triggers

type Rep TriggerEffect = D1 ('MetaData "TriggerEffect" "Triggers" "Hastructure-0.50.4-C46IQoFqEMALLVrlvHB4m" 'False) (((C1 ('MetaCons "DealStatusTo" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DealStatus)) :+: C1 ('MetaCons "DoAccrueFee" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FeeNames))) :+: (C1 ('MetaCons "AddTrigger" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Trigger)) :+: (C1 ('MetaCons "ChangeReserveBalance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ReserveAmount)) :+: C1 ('MetaCons "CloseDeal" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Int, DatePattern)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Int, DatePattern))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PricingMethod, AccountName, Maybe DealStats)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [CollectionRule]))))))) :+: ((C1 ('MetaCons "BuyAsset" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AccountName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PricingMethod)) :+: C1 ('MetaCons "ChangeBondRate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BondName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 InterestInfo) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IRate)))) :+: (C1 ('MetaCons "TriggerEffects" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TriggerEffect])) :+: (C1 ('MetaCons "RunActions" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Action])) :+: C1 ('MetaCons "DoNothing" 'PrefixI 'False) (U1 :: Type -> Type)))))