{-# LANGUAGE CPP #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -Wno-orphans #-}
module TextShow.GHC.Stack () where
import GHC.Stack (CallStack, SrcLoc, getCallStack)
import TextShow.Classes (TextShow(..))
import TextShow.Data.Char ()
import TextShow.Data.Integral ()
import TextShow.Data.List ()
import TextShow.Data.Tuple ()
import TextShow.TH.Internal (deriveTextShow)
$(deriveTextShow ''SrcLoc)
instance TextShow CallStack where
showb :: CallStack -> Builder
showb = [(String, SrcLoc)] -> Builder
forall a. TextShow a => a -> Builder
showb ([(String, SrcLoc)] -> Builder)
-> (CallStack -> [(String, SrcLoc)]) -> CallStack -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CallStack -> [(String, SrcLoc)]
getCallStack
{-# INLINE showb #-}