{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -Wno-orphans #-}
module TextShow.System.Console.Haskeline () where
import System.Console.Haskeline (Interrupt, Prefs)
import System.Console.Haskeline.Completion (Completion)
import System.Console.Haskeline.History (History, historyLines)
import TextShow (TextShow(..), FromStringShow(..))
import TextShow.TH (deriveTextShow)
import TextShow.Utils (showbUnaryListWith)
$(deriveTextShow ''Interrupt)
instance TextShow Prefs where
showbPrec :: Int -> Prefs -> Builder
showbPrec Int
p = forall a. TextShow a => Int -> a -> Builder
showbPrec Int
p forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. a -> FromStringShow a
FromStringShow
{-# INLINE showbPrec #-}
$(deriveTextShow ''Completion)
instance TextShow History where
showb :: History -> Builder
showb = forall a. ([a] -> Builder) -> Int -> [a] -> Builder
showbUnaryListWith forall a. TextShow a => a -> Builder
showb Int
0 forall b c a. (b -> c) -> (a -> b) -> a -> c
. History -> [String]
historyLines
{-# INLINE showb #-}