module PlutusCore.Pretty.Default
    ( prettyPlc
    , displayPlc
    , prettyPlcSimple
    , displayPlcSimple
    , displayPlcCondensedErrorClassic
    ) where

import PlutusPrelude

import PlutusCore.Pretty.Plc

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

-- | Render a value to 'String' in the default mode using the classic view.
displayPlc :: (PrettyPlc a, Render str) => a -> str
displayPlc :: forall a str. (PrettyPlc a, Render str) => a -> str
displayPlc = Doc Any -> str
forall ann. Doc ann -> 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
prettyPlcClassic

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

-- | Render a value to 'String' in the debug mode using the classic view.
displayPlcSimple :: (PrettyPlc a, Render str) => a -> str
displayPlcSimple :: forall a str. (PrettyPlc a, Render str) => a -> str
displayPlcSimple = Doc Any -> str
forall ann. Doc ann -> 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
prettyPlcClassicSimple

-- | Render an error to 'String' in the condensed manner using the classic view.
displayPlcCondensedErrorClassic :: (PrettyPlc a, Render str) => a -> str
displayPlcCondensedErrorClassic :: forall a str. (PrettyPlc a, Render str) => a -> str
displayPlcCondensedErrorClassic =
    Doc Any -> str
forall ann. Doc ann -> 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
prettyConfigPlcClassic