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

Wingman.Tactics

Synopsis

Documentation

assumption :: TacticsM () Source #

Use something in the hypothesis to fill the hole.

assume :: OccName -> TacticsM () Source #

Use something named in the hypothesis to fill the hole.

intros :: TacticsM () Source #

Introduce a lambda binding every variable.

destructAuto :: HyInfo CType -> TacticsM () Source #

Case split, and leave holes in the matches.

destructOrHomoAuto :: HyInfo CType -> TacticsM () Source #

When running auto, in order to prune the auto search tree, we try a homomorphic destruct whenever possible. If that produces any results, we can probably just prune the other side.

destruct :: HyInfo CType -> TacticsM () Source #

Case split, and leave holes in the matches.

homo :: HyInfo CType -> TacticsM () Source #

Case split, using the same data constructor in the matches.

destructLambdaCase :: TacticsM () Source #

LambdaCase split, and leave holes in the matches.

homoLambdaCase :: TacticsM () Source #

LambdaCase split, using the same data constructor in the matches.

split :: TacticsM () Source #

Choose between each of the goal's data constructors.

splitAuto :: TacticsM () Source #

Choose between each of the goal's data constructors. Different than split because it won't split a data con if it doesn't result in any new goals.

splitSingle :: TacticsM () Source #

Like split, but only works if there is a single matching data constructor for the goal.

requireNewHoles :: TacticsM () -> TacticsM () Source #

Allow the given tactic to proceed if and only if it introduces holes that have a different goal than current goal.

splitConLike :: ConLike -> TacticsM () Source #

Attempt to instantiate the given ConLike to solve the goal.

INVARIANT: Assumes the given ConLike is appropriate to construct the type with.

splitDataCon :: DataCon -> TacticsM () Source #

Attempt to instantiate the given data constructor to solve the goal.

INVARIANT: Assumes the given datacon is appropriate to construct the type with.

destructAll :: TacticsM () Source #

Perform a case split on each top-level argument. Used to implement the "Destruct all function arguments" action.

userSplit :: OccName -> TacticsM () Source #

User-facing tactic to implement "Use constructor x"

matching :: (Judgement -> TacticsM ()) -> TacticsM () Source #

matching f takes a function from a judgement to a Tactic, and then applies the resulting Tactic.

attemptOn :: (Judgement -> [a]) -> (a -> TacticsM ()) -> TacticsM () Source #

runTactic Source #

Arguments

:: Context 
-> Judgement 
-> TacticsM ()

Tactic to use

-> Either [TacticError] RunTacticResults 

Attempt to generate a term of the right type using in-scope bindings, and a given tactic.