From 3aab871f6271010a11d602a95da0b8702adf8119 Mon Sep 17 00:00:00 2001 From: Sandy Maguire Date: Thu, 11 Mar 2021 09:18:47 -0800 Subject: [PATCH] Add wingman branding to code actions --- .../hls-tactics-plugin/src/Wingman/Types.hs | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/plugins/hls-tactics-plugin/src/Wingman/Types.hs b/plugins/hls-tactics-plugin/src/Wingman/Types.hs index c6f0d8e2d9..63bf13b175 100644 --- a/plugins/hls-tactics-plugin/src/Wingman/Types.hs +++ b/plugins/hls-tactics-plugin/src/Wingman/Types.hs @@ -61,15 +61,17 @@ data TacticCommand -- | Generate a title for the command. tacticTitle :: TacticCommand -> T.Text -> T.Text -tacticTitle Auto _ = "Attempt to fill hole" -tacticTitle Intros _ = "Introduce lambda" -tacticTitle Destruct var = "Case split on " <> var -tacticTitle Homomorphism var = "Homomorphic case split on " <> var -tacticTitle DestructLambdaCase _ = "Lambda case split" -tacticTitle HomomorphismLambdaCase _ = "Homomorphic lambda case split" -tacticTitle DestructAll _ = "Split all function arguments" -tacticTitle UseDataCon dcon = "Use constructor " <> dcon -tacticTitle Refine _ = "Refine hole" +tacticTitle = (mappend "Wingman: " .) . go + where + go Auto _ = "Attempt to fill hole" + go Intros _ = "Introduce lambda" + go Destruct var = "Case split on " <> var + go Homomorphism var = "Homomorphic case split on " <> var + go DestructLambdaCase _ = "Lambda case split" + go HomomorphismLambdaCase _ = "Homomorphic lambda case split" + go DestructAll _ = "Split all function arguments" + go UseDataCon dcon = "Use constructor " <> dcon + go Refine _ = "Refine hole" ------------------------------------------------------------------------------