module PlutusCore.Pretty.Default
    ( prettyPlcDef
    , displayPlcDef
    , prettyPlcDebug
    , displayPlcDebug
    , displayPlcCondensedErrorClassic
    ) where

import PlutusPrelude

import PlutusCore.Pretty.Plc

-- | Pretty-print a value in the default mode using the classic view.
prettyPlcDef :: PrettyPlc a => a -> Doc ann
prettyPlcDef :: a -> Doc ann
prettyPlcDef = a -> Doc ann
forall a ann. PrettyPlc a => a -> Doc ann
prettyPlcClassicDef

-- | Render a value to 'String' in the default mode using the classic view.
displayPlcDef :: (PrettyPlc a, Render str) => a -> str
displayPlcDef :: a -> str
displayPlcDef = Doc Any -> str
forall str ann. Render str => Doc ann -> str
render (Doc Any -> str) -> (a -> Doc Any) -> a -> str
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> Doc Any
forall a ann. PrettyPlc a => a -> Doc ann
prettyPlcClassicDef

-- | Pretty-print a value in the debug mode using the classic view.
prettyPlcDebug :: PrettyPlc a => a -> Doc ann
prettyPlcDebug :: a -> Doc ann
prettyPlcDebug = a -> Doc ann
forall a ann. PrettyPlc a => a -> Doc ann
prettyPlcClassicDebug

-- | Render a value to 'String' in the debug mode using the classic view.
displayPlcDebug :: (PrettyPlc a, Render str) => a -> str
displayPlcDebug :: a -> str
displayPlcDebug = Doc Any -> str
forall str ann. Render str => Doc ann -> str
render (Doc Any -> str) -> (a -> Doc Any) -> a -> str
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> Doc Any
forall a ann. PrettyPlc a => a -> Doc ann
prettyPlcClassicDebug

-- | Render an error to 'String' in the condensed manner using the classic view.
displayPlcCondensedErrorClassic :: (PrettyPlc a, Render str) => a -> str
displayPlcCondensedErrorClassic :: a -> str
displayPlcCondensedErrorClassic =
    Doc Any -> str
forall str ann. Render str => Doc ann -> str
render (Doc Any -> str) -> (a -> Doc Any) -> a -> str
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (PrettyConfigPlcOptions -> PrettyConfigPlc) -> a -> Doc Any
forall a ann.
PrettyPlc a =>
(PrettyConfigPlcOptions -> PrettyConfigPlc) -> a -> Doc ann
prettyPlcCondensedErrorBy PrettyConfigPlcOptions -> PrettyConfigPlc
defPrettyConfigPlcClassic