From 7702fa052b25de7e764d574a576dd86554ff1352 Mon Sep 17 00:00:00 2001 From: slotThe Date: Wed, 7 Apr 2021 09:41:49 +0200 Subject: [PATCH] Add MINIMAL for XPrompt --- XMonad/Prompt.hs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/XMonad/Prompt.hs b/XMonad/Prompt.hs index b60a96da..9b90d390 100644 --- a/XMonad/Prompt.hs +++ b/XMonad/Prompt.hs @@ -222,17 +222,23 @@ instance XPrompt XPType where completionFunction (XPT t) = completionFunction t modeAction (XPT t) = modeAction t --- | The class prompt types must be an instance of. In order to --- create a prompt you need to create a data type, without parameters, --- and make it an instance of this class, by implementing a simple --- method, 'showXPrompt', which will be used to print the string to be --- displayed in the command line window. +-- | A class for an abstract prompt. In order for your data type to be a +-- valid prompt you _must_ make it an instance of this class. -- --- This is an example of a XPrompt instance definition: +-- The minimal complete definition is just 'showXPrompt', i.e. the name +-- of the prompt. This string will be displayed in the command line +-- window (before the cursor). -- +-- As an example of a complete 'XPrompt' instance definition, we can +-- look at the 'XMonad.Prompt.Shell.Shell' prompt from +-- "XMonad.Prompt.Shell": +-- +-- > data Shell = Shell +-- > -- > instance XPrompt Shell where -- > showXPrompt Shell = "Run: " class XPrompt t where + {-# MINIMAL showXPrompt #-} -- | This method is used to print the string to be -- displayed in the command line window.