-- | While the flexible pretty-printing infrastructure is useful when you want it,
-- it's helpful to have an implementation of the default Pretty typeclass that
-- does the default thing.

{-# OPTIONS_GHC -fno-warn-orphans #-}

{-# LANGUAGE TypeOperators        #-}
{-# LANGUAGE UndecidableInstances #-}

module UntypedPlutusCore.Core.Instance.Pretty.Default () where

import PlutusPrelude

import PlutusCore.Pretty.Classic
import PlutusCore.Pretty.PrettyConst

import UntypedPlutusCore.Core.Instance.Pretty.Classic ()
import UntypedPlutusCore.Core.Type

import Universe

instance
        ( PrettyClassic name
        , GShow uni, Closed uni, uni `Everywhere` PrettyConst, Pretty fun
        , Pretty ann
        ) => Pretty (Term name uni fun ann) where
    pretty :: Term name uni fun ann -> Doc ann
pretty = Term name uni fun ann -> Doc ann
forall a ann. PrettyClassic a => a -> Doc ann
prettyClassicDef

instance
        ( PrettyClassic name
        , GShow uni, Closed uni, uni `Everywhere` PrettyConst, Pretty fun
        , Pretty ann
        ) => Pretty (Program name uni fun ann) where
    pretty :: Program name uni fun ann -> Doc ann
pretty = Program name uni fun ann -> Doc ann
forall a ann. PrettyClassic a => a -> Doc ann
prettyClassicDef