Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
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.
data ExampleHyInfo Source #
An example HyInfo
.
EHI | |
|
A variable
newtype ExampleType Source #
A type
Instances
IsString ExampleType Source # | |
Defined in Wingman.Metaprogramming.Parser.Documentation fromString :: String -> ExampleType # | |
Pretty ExampleType Source # | |
Defined in Wingman.Metaprogramming.Parser.Documentation pretty :: ExampleType -> Doc ann # prettyList :: [ExampleType] -> Doc ann # |
data MetaprogramCommand a Source #
A command to expose to the parser
MC | |
|
data SomeMetaprogramCommand where Source #
Existentialize the pain away
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
.