| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Wingman.Metaprogramming.Parser.Documentation
Synopsis
- data Determinism
 - prettyDeterminism :: Determinism -> Doc b
 - data Count a where
 - prettyCount :: Count a -> Doc b
 - data Syntax a where
 - prettySyntax :: Syntax a -> Doc b
 - data Example = Example {}
 - data ExampleHyInfo = EHI {
- ehi_name :: Var
 - ehi_type :: ExampleType
 
 - newtype Var = Var {}
 - newtype ExampleType = ExampleType {}
 - data MetaprogramCommand a = MC {
- mpc_name :: Text
 - mpc_syntax :: Syntax a
 - mpc_det :: Determinism
 - mpc_description :: Text
 - mpc_tactic :: a
 - mpc_examples :: [Example]
 
 - data SomeMetaprogramCommand where
 - makeMPParser :: MetaprogramCommand a -> Parser (TacticsM ())
 - makeParser :: [SomeMetaprogramCommand] -> Parser (TacticsM ())
 - prettyCommand :: MetaprogramCommand a -> Doc b
 - prettyHyInfo :: ExampleHyInfo -> Doc a
 - mappendIfNotNull :: [a] -> a -> [a]
 - prettyExample :: Text -> Example -> Doc a
 - codeFence :: Doc a -> Doc a
 - prettyReadme :: [SomeMetaprogramCommand] -> String
 - command :: Text -> Determinism -> Syntax a -> Text -> a -> [Example] -> SomeMetaprogramCommand
 
Documentation
data Determinism Source #
Is a tactic deterministic or not?
Constructors
| Deterministic | |
| Nondeterministic | 
prettyDeterminism :: Determinism -> Doc b Source #
How many arguments does the tactic take?
prettyCount :: Count a -> Doc b Source #
prettySyntax :: Syntax a -> Doc b Source #
An example for the documentation.
Constructors
| Example | |
data ExampleHyInfo Source #
An example HyInfo.
Constructors
| EHI | |
Fields 
  | |
A variable
newtype ExampleType Source #
A type
Constructors
| ExampleType | |
Fields  | |
Instances
| IsString ExampleType Source # | |
Defined in Wingman.Metaprogramming.Parser.Documentation Methods fromString :: String -> ExampleType #  | |
| Pretty ExampleType Source # | |
Defined in Wingman.Metaprogramming.Parser.Documentation  | |
data MetaprogramCommand a Source #
A command to expose to the parser
Constructors
| MC | |
Fields 
  | |
data SomeMetaprogramCommand where Source #
Existentialize the pain away
Constructors
| SMC :: MetaprogramCommand a -> SomeMetaprogramCommand | 
makeMPParser :: MetaprogramCommand a -> Parser (TacticsM ()) Source #
Run the Parser of a MetaprogramCommand
makeParser :: [SomeMetaprogramCommand] -> Parser (TacticsM ()) Source #
Compile a collection of metaprogram commands into a parser.
prettyCommand :: MetaprogramCommand a -> Doc b Source #
Pretty print a command.
prettyHyInfo :: ExampleHyInfo -> Doc a Source #
Pretty print a hypothesis.
mappendIfNotNull :: [a] -> a -> [a] Source #
Append the given term only if the first argument has elements.
prettyReadme :: [SomeMetaprogramCommand] -> String Source #
Render all of the commands.
command :: Text -> Determinism -> Syntax a -> Text -> a -> [Example] -> SomeMetaprogramCommand Source #
Helper function to build a SomeMetaprogramCommand.