hls-tactics-plugin-1.6.2.0: Wingman plugin for Haskell Language Server
Safe HaskellNone
LanguageHaskell2010

Wingman.Metaprogramming.Parser.Documentation

Synopsis

Documentation

data Determinism Source #

Is a tactic deterministic or not?

data Count a where Source #

How many arguments does the tactic take?

Constructors

One :: Count OccName 
Many :: Count [OccName] 

data Syntax a where Source #

What sorts of arguments does the tactic take? Currently there is no distincion between Ref and Bind, other than documentation.

The type index here is used for the shape of the function the parser should take.

Constructors

Nullary :: Syntax (Parser (TacticsM ())) 
Ref :: Count a -> Syntax (a -> Parser (TacticsM ())) 
Bind :: Count a -> Syntax (a -> Parser (TacticsM ())) 
Tactic :: Syntax (TacticsM () -> Parser (TacticsM ())) 

data Example Source #

An example for the documentation.

Constructors

Example 

Fields

data ExampleHyInfo Source #

An example HyInfo.

Constructors

EHI 

Fields

newtype Var Source #

A variable

Constructors

Var 

Fields

Instances

Instances details
IsString Var Source # 
Instance details

Defined in Wingman.Metaprogramming.Parser.Documentation

Methods

fromString :: String -> Var #

Pretty Var Source # 
Instance details

Defined in Wingman.Metaprogramming.Parser.Documentation

Methods

pretty :: Var -> Doc ann #

prettyList :: [Var] -> Doc ann #

newtype ExampleType Source #

A type

Constructors

ExampleType 

Fields

Instances

Instances details
IsString ExampleType Source # 
Instance details

Defined in Wingman.Metaprogramming.Parser.Documentation

Pretty ExampleType Source # 
Instance details

Defined in Wingman.Metaprogramming.Parser.Documentation

Methods

pretty :: ExampleType -> Doc ann #

prettyList :: [ExampleType] -> Doc ann #

data MetaprogramCommand a Source #

A command to expose to the parser

Constructors

MC 

Fields

data SomeMetaprogramCommand where Source #

Existentialize the pain away

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.

prettyExample :: Text -> Example -> Doc a Source #

Pretty print an example.

codeFence :: Doc a -> Doc a Source #

Make a haskell code fence.

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.