module Text.Show.Text.System.Console.Haskeline (
showbInterrupt
, showbPrefsPrec
, showbCompletionPrec
, showbHistory
) where
import Prelude hiding (Show)
import System.Console.Haskeline (Interrupt, Prefs)
import System.Console.Haskeline.Completion (Completion)
import System.Console.Haskeline.History (History, historyLines)
import Text.Show.Text (Show(showb, showbPrec), Builder, FromStringShow(..), showbUnary)
import Text.Show.Text.TH (deriveShow, deriveShowPragmas, defaultInlineShowb)
#include "inline.h"
showbInterrupt :: Interrupt -> Builder
showbInterrupt = showb
showbPrefsPrec :: Int -> Prefs -> Builder
showbPrefsPrec p = showbPrec p . FromStringShow
showbCompletionPrec :: Int -> Completion -> Builder
showbCompletionPrec = showbPrec
showbHistory :: History -> Builder
showbHistory = showbUnary "fromList" 0 . historyLines
$(deriveShowPragmas defaultInlineShowb ''Interrupt)
instance Show Prefs where
showbPrec = showbPrefsPrec
INLINE_INST_FUN(showbPrec)
$(deriveShow ''Completion)
instance Show History where
showb = showbHistory
INLINE_INST_FUN(showb)