License | BSD-3-Clause |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
Swarm.Doc.Command
Description
Auto-generation of command attributes matrix.
Synopsis
- data DerivedAttrs = DerivedAttrs {}
- data CommandEntry = CommandEntry {
- cmd :: Const
- effects :: Set CommandEffect
- argTypes :: NonEmpty Type
- derivedAttrs :: DerivedAttrs
- newtype CommandCatalog = CommandCatalog {
- entries :: [CommandEntry]
- mkEntry :: Const -> CommandEntry
- getCatalog :: CommandCatalog
Documentation
data DerivedAttrs Source #
Constructors
DerivedAttrs | |
Fields
|
Instances
data CommandEntry Source #
Constructors
CommandEntry | |
Fields
|
Instances
ToJSON CommandEntry Source # | |||||
Defined in Swarm.Doc.Command Methods toJSON :: CommandEntry -> Value # toEncoding :: CommandEntry -> Encoding # toJSONList :: [CommandEntry] -> Value # toEncodingList :: [CommandEntry] -> Encoding # omitField :: CommandEntry -> Bool # | |||||
Generic CommandEntry Source # | |||||
Defined in Swarm.Doc.Command Associated Types
| |||||
type Rep CommandEntry Source # | |||||
Defined in Swarm.Doc.Command type Rep CommandEntry = D1 ('MetaData "CommandEntry" "Swarm.Doc.Command" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-doc" 'False) (C1 ('MetaCons "CommandEntry" 'PrefixI 'True) ((S1 ('MetaSel ('Just "cmd") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Const) :*: S1 ('MetaSel ('Just "effects") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Set CommandEffect))) :*: (S1 ('MetaSel ('Just "argTypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NonEmpty Type)) :*: S1 ('MetaSel ('Just "derivedAttrs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 DerivedAttrs)))) |
newtype CommandCatalog Source #
Constructors
CommandCatalog | |
Fields
|
Instances
ToJSON CommandCatalog Source # | |||||
Defined in Swarm.Doc.Command Methods toJSON :: CommandCatalog -> Value # toEncoding :: CommandCatalog -> Encoding # toJSONList :: [CommandCatalog] -> Value # toEncodingList :: [CommandCatalog] -> Encoding # omitField :: CommandCatalog -> Bool # | |||||
Generic CommandCatalog Source # | |||||
Defined in Swarm.Doc.Command Associated Types
Methods from :: CommandCatalog -> Rep CommandCatalog x # to :: Rep CommandCatalog x -> CommandCatalog # | |||||
ToSample CommandCatalog Source # | |||||
Defined in Swarm.Doc.Command Methods toSamples :: Proxy CommandCatalog -> [(Text, CommandCatalog)] # | |||||
type Rep CommandCatalog Source # | |||||
Defined in Swarm.Doc.Command type Rep CommandCatalog = D1 ('MetaData "CommandCatalog" "Swarm.Doc.Command" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-doc" 'True) (C1 ('MetaCons "CommandCatalog" 'PrefixI 'True) (S1 ('MetaSel ('Just "entries") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CommandEntry]))) |
mkEntry :: Const -> CommandEntry Source #
Uses explicit effects documentation as well as type signature information to compute various flags