{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-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 p = showbPrec p . FromStringShow
{-# INLINE showbPrec #-}
$(deriveTextShow ''Completion)
instance TextShow History where
showb = showbUnaryListWith showb 0 . historyLines
{-# INLINE showb #-}