{-# OPTIONS_GHC -Wno-redundant-constraints #-}
{-# LANGUAGE NoImplicitPrelude #-}
module Morley.Prelude.Show
( PrettyShow
, show
) where
import Data.Fixed (Fixed)
import Data.Time (NominalDiffTime)
import Data.Typeable (TypeRep)
import Data.Word.Odd (Word62, Word63)
import GHC.TypeLits (ErrorMessage(..), TypeError)
import Language.Haskell.Extension (KnownExtension)
import Language.Haskell.TH (Name)
import Language.Haskell.TH.PprLib (Doc)
import Universum hiding (show)
import Universum qualified (show)
type family PrettyShow a :: Constraint
type instance PrettyShow Word = ()
type instance PrettyShow Word8 = ()
type instance PrettyShow Word16 = ()
type instance PrettyShow Word32 = ()
type instance PrettyShow Word62 = ()
type instance PrettyShow Word63 = ()
type instance PrettyShow Word64 = ()
type instance PrettyShow Int = ()
type instance PrettyShow Int8 = ()
type instance PrettyShow Int16 = ()
type instance PrettyShow Int32 = ()
type instance PrettyShow Int64 = ()
type instance PrettyShow Integer = ()
type instance PrettyShow Natural = ()
type instance PrettyShow Float = ()
type instance PrettyShow Double = ()
type instance PrettyShow (Fixed _) = ()
type instance PrettyShow UnicodeException = ()
type instance PrettyShow Name = ()
type instance PrettyShow Doc = ()
type instance PrettyShow KnownExtension = ()
type instance PrettyShow TypeRep = ()
type instance PrettyShow NominalDiffTime = ()
type instance PrettyShow [a] = PrettyShow a
type instance PrettyShow Text = TypeError (
'Text "Show instance for Text is not pretty" ':$$:
'Text "Consider relying on the Buildable instance"
)
type instance PrettyShow LText = TypeError (
'Text "Show instance for lazy Text is not pretty" ':$$:
'Text "Consider relying on the Buildable instance"
)
type instance PrettyShow Char = TypeError (
'Text "Show instance for String and Char is not pretty" ':$$:
'Text "Consider relying on the Buildable instance"
)
type instance PrettyShow ByteString = TypeError (
'Text "Show instance for ByteString is not pretty"
)
type instance PrettyShow LByteString = TypeError (
'Text "Show instance for lazy ByteString is not pretty"
)
show :: forall b a. (PrettyShow a, Show a, IsString b) => a -> b
show :: a -> b
show = a -> b
forall b a. (Show a, IsString b) => a -> b
Universum.show