atp-haskell-1.14.3: Translation from Ocaml to Haskell of John Harrison's ATP code
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Logic.ATP.Pretty

Synopsis

Documentation

(<>) :: Semigroup a => a -> a -> a infixr 6 #

An associative operation.

>>> [1,2,3] <> [4,5,6]
[1,2,3,4,5,6]

class Pretty a where #

Pretty printing class. The precedence level is used in a similar way as in the Show class. Minimal complete definition is either pPrintPrec or pPrint.

Minimal complete definition

pPrintPrec | pPrint

Methods

pPrintPrec :: PrettyLevel -> Rational -> a -> Doc #

pPrint :: a -> Doc #

Instances

Instances details
Pretty Predicate Source # 
Instance details

Defined in Data.Logic.ATP.Apply

Pretty Atom Source # 
Instance details

Defined in Data.Logic.ATP.DefCNF

Pretty Depth Source # 
Instance details

Defined in Data.Logic.ATP.Lib

Pretty Prop Source # 
Instance details

Defined in Data.Logic.ATP.Prop

Pretty Function Source # 
Instance details

Defined in Data.Logic.ATP.Skolem

Pretty K Source # 
Instance details

Defined in Data.Logic.ATP.Tableaux

Methods

pPrintPrec :: PrettyLevel -> Rational -> K -> Doc #

pPrint :: K -> Doc #

pPrintList :: PrettyLevel -> [K] -> Doc #

Pretty FName Source # 
Instance details

Defined in Data.Logic.ATP.Term

Pretty V Source # 
Instance details

Defined in Data.Logic.ATP.Term

Methods

pPrintPrec :: PrettyLevel -> Rational -> V -> Doc #

pPrint :: V -> Doc #

pPrintList :: PrettyLevel -> [V] -> Doc #

Pretty Ordering 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty Message Source # 
Instance details

Defined in Data.Logic.ATP.Parser

Pretty ParseError Source # 
Instance details

Defined in Data.Logic.ATP.Parser

Pretty Integer 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty () 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> () -> Doc #

pPrint :: () -> Doc #

pPrintList :: PrettyLevel -> [()] -> Doc #

Pretty Bool 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty Char 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty Double 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty Float 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty Int 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty a => Pretty (Failing a) Source # 
Instance details

Defined in Data.Logic.ATP.Lib

IsAtom atom => Pretty (LFormula atom) Source # 
Instance details

Defined in Data.Logic.ATP.Lit

Methods

pPrintPrec :: PrettyLevel -> Rational -> LFormula atom -> Doc #

pPrint :: LFormula atom -> Doc #

pPrintList :: PrettyLevel -> [LFormula atom] -> Doc #

Pretty a => Pretty (JL a) Source # 
Instance details

Defined in Data.Logic.ATP.LitWrapper

Methods

pPrintPrec :: PrettyLevel -> Rational -> JL a -> Doc #

pPrint :: JL a -> Doc #

pPrintList :: PrettyLevel -> [JL a] -> Doc #

IsAtom atom => Pretty (PFormula atom) Source # 
Instance details

Defined in Data.Logic.ATP.Prop

Methods

pPrintPrec :: PrettyLevel -> Rational -> PFormula atom -> Doc #

pPrint :: PFormula atom -> Doc #

pPrintList :: PrettyLevel -> [PFormula atom] -> Doc #

Pretty atom => Pretty (TruthTable atom) Source # 
Instance details

Defined in Data.Logic.ATP.Prop

(Num a, Show a) => Pretty (Knows a) Source # 
Instance details

Defined in Data.Logic.ATP.PropExamples

Pretty a => Pretty (Set a) Source # 
Instance details

Defined in Data.Logic.ATP.Pretty

Methods

pPrintPrec :: PrettyLevel -> Rational -> Set a -> Doc #

pPrint :: Set a -> Doc #

pPrintList :: PrettyLevel -> [Set a] -> Doc #

Pretty a => Pretty (Maybe a) 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty a => Pretty [a] 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> [a] -> Doc #

pPrint :: [a] -> Doc #

pPrintList :: PrettyLevel -> [[a]] -> Doc #

(IsPredicate predicate, IsTerm term) => Pretty (FOLAP predicate term) Source # 
Instance details

Defined in Data.Logic.ATP.Apply

Methods

pPrintPrec :: PrettyLevel -> Rational -> FOLAP predicate term -> Doc #

pPrint :: FOLAP predicate term -> Doc #

pPrintList :: PrettyLevel -> [FOLAP predicate term] -> Doc #

(HasApply (FOL predicate term), HasEquate (FOL predicate term), IsTerm term) => Pretty (FOL predicate term) Source # 
Instance details

Defined in Data.Logic.ATP.Equate

Methods

pPrintPrec :: PrettyLevel -> Rational -> FOL predicate term -> Doc #

pPrint :: FOL predicate term -> Doc #

pPrintList :: PrettyLevel -> [FOL predicate term] -> Doc #

(HasApply atom, IsTerm term, term ~ TermOf atom, v ~ TVarOf term) => Pretty (QFormula v atom) Source # 
Instance details

Defined in Data.Logic.ATP.Quantified

Methods

pPrintPrec :: PrettyLevel -> Rational -> QFormula v atom -> Doc #

pPrint :: QFormula v atom -> Doc #

pPrintList :: PrettyLevel -> [QFormula v atom] -> Doc #

IsTerm (Term function v) => Pretty (Term function v) Source # 
Instance details

Defined in Data.Logic.ATP.Term

Methods

pPrintPrec :: PrettyLevel -> Rational -> Term function v -> Doc #

pPrint :: Term function v -> Doc #

pPrintList :: PrettyLevel -> [Term function v] -> Doc #

(Pretty a, Pretty b) => Pretty (Either a b) 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> Either a b -> Doc #

pPrint :: Either a b -> Doc #

pPrintList :: PrettyLevel -> [Either a b] -> Doc #

(Pretty v, Pretty term) => Pretty (Map v term) Source # 
Instance details

Defined in Data.Logic.ATP.Pretty

Methods

pPrintPrec :: PrettyLevel -> Rational -> Map v term -> Doc #

pPrint :: Map v term -> Doc #

pPrintList :: PrettyLevel -> [Map v term] -> Doc #

(Pretty a, Pretty b) => Pretty (a, b) 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> (a, b) -> Doc #

pPrint :: (a, b) -> Doc #

pPrintList :: PrettyLevel -> [(a, b)] -> Doc #

(Pretty a, Pretty b, Pretty c) => Pretty (a, b, c) 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> (a, b, c) -> Doc #

pPrint :: (a, b, c) -> Doc #

pPrintList :: PrettyLevel -> [(a, b, c)] -> Doc #

(Pretty a, Pretty b, Pretty c, Pretty d) => Pretty (a, b, c, d) 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> (a, b, c, d) -> Doc #

pPrint :: (a, b, c, d) -> Doc #

pPrintList :: PrettyLevel -> [(a, b, c, d)] -> Doc #

(Pretty a, Pretty b, Pretty c, Pretty d, Pretty e) => Pretty (a, b, c, d, e) 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> (a, b, c, d, e) -> Doc #

pPrint :: (a, b, c, d, e) -> Doc #

pPrintList :: PrettyLevel -> [(a, b, c, d, e)] -> Doc #

(Pretty a, Pretty b, Pretty c, Pretty d, Pretty e, Pretty f) => Pretty (a, b, c, d, e, f) 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> (a, b, c, d, e, f) -> Doc #

pPrint :: (a, b, c, d, e, f) -> Doc #

pPrintList :: PrettyLevel -> [(a, b, c, d, e, f)] -> Doc #

(Pretty a, Pretty b, Pretty c, Pretty d, Pretty e, Pretty f, Pretty g) => Pretty (a, b, c, d, e, f, g) 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> (a, b, c, d, e, f, g) -> Doc #

pPrint :: (a, b, c, d, e, f, g) -> Doc #

pPrintList :: PrettyLevel -> [(a, b, c, d, e, f, g)] -> Doc #

(Pretty a, Pretty b, Pretty c, Pretty d, Pretty e, Pretty f, Pretty g, Pretty h) => Pretty (a, b, c, d, e, f, g, h) 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> (a, b, c, d, e, f, g, h) -> Doc #

pPrint :: (a, b, c, d, e, f, g, h) -> Doc #

pPrintList :: PrettyLevel -> [(a, b, c, d, e, f, g, h)] -> Doc #

data Doc #

The abstract type of documents. A Doc represents a set of layouts. A Doc with no occurrences of Union or NoDoc represents just one layout.

Instances

Instances details
IsString Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

fromString :: String -> Doc #

Monoid Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

mempty :: Doc #

mappend :: Doc -> Doc -> Doc #

mconcat :: [Doc] -> Doc #

Semigroup Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

(<>) :: Doc -> Doc -> Doc #

sconcat :: NonEmpty Doc -> Doc #

stimes :: Integral b => b -> Doc -> Doc #

Generic Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Associated Types

type Rep Doc :: Type -> Type #

Methods

from :: Doc -> Rep Doc x #

to :: Rep Doc x -> Doc #

Show Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

showsPrec :: Int -> Doc -> ShowS #

show :: Doc -> String #

showList :: [Doc] -> ShowS #

NFData Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

rnf :: Doc -> () #

Eq Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

(==) :: Doc -> Doc -> Bool #

(/=) :: Doc -> Doc -> Bool #

type Rep Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

type Rep Doc = D1 ('MetaData "Doc" "Text.PrettyPrint.HughesPJ" "pretty-1.1.3.6" 'True) (C1 ('MetaCons "Doc" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Doc ()))))

class Pretty a where #

Pretty printing class. The precedence level is used in a similar way as in the Show class. Minimal complete definition is either pPrintPrec or pPrint.

Minimal complete definition

pPrintPrec | pPrint

Methods

pPrintPrec :: PrettyLevel -> Rational -> a -> Doc #

pPrint :: a -> Doc #

Instances

Instances details
Pretty Predicate Source # 
Instance details

Defined in Data.Logic.ATP.Apply

Pretty Atom Source # 
Instance details

Defined in Data.Logic.ATP.DefCNF

Pretty Depth Source # 
Instance details

Defined in Data.Logic.ATP.Lib

Pretty Prop Source # 
Instance details

Defined in Data.Logic.ATP.Prop

Pretty Function Source # 
Instance details

Defined in Data.Logic.ATP.Skolem

Pretty K Source # 
Instance details

Defined in Data.Logic.ATP.Tableaux

Methods

pPrintPrec :: PrettyLevel -> Rational -> K -> Doc #

pPrint :: K -> Doc #

pPrintList :: PrettyLevel -> [K] -> Doc #

Pretty FName Source # 
Instance details

Defined in Data.Logic.ATP.Term

Pretty V Source # 
Instance details

Defined in Data.Logic.ATP.Term

Methods

pPrintPrec :: PrettyLevel -> Rational -> V -> Doc #

pPrint :: V -> Doc #

pPrintList :: PrettyLevel -> [V] -> Doc #

Pretty Ordering 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty Message Source # 
Instance details

Defined in Data.Logic.ATP.Parser

Pretty ParseError Source # 
Instance details

Defined in Data.Logic.ATP.Parser

Pretty Integer 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty () 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> () -> Doc #

pPrint :: () -> Doc #

pPrintList :: PrettyLevel -> [()] -> Doc #

Pretty Bool 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty Char 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty Double 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty Float 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty Int 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty a => Pretty (Failing a) Source # 
Instance details

Defined in Data.Logic.ATP.Lib

IsAtom atom => Pretty (LFormula atom) Source # 
Instance details

Defined in Data.Logic.ATP.Lit

Methods

pPrintPrec :: PrettyLevel -> Rational -> LFormula atom -> Doc #

pPrint :: LFormula atom -> Doc #

pPrintList :: PrettyLevel -> [LFormula atom] -> Doc #

Pretty a => Pretty (JL a) Source # 
Instance details

Defined in Data.Logic.ATP.LitWrapper

Methods

pPrintPrec :: PrettyLevel -> Rational -> JL a -> Doc #

pPrint :: JL a -> Doc #

pPrintList :: PrettyLevel -> [JL a] -> Doc #

IsAtom atom => Pretty (PFormula atom) Source # 
Instance details

Defined in Data.Logic.ATP.Prop

Methods

pPrintPrec :: PrettyLevel -> Rational -> PFormula atom -> Doc #

pPrint :: PFormula atom -> Doc #

pPrintList :: PrettyLevel -> [PFormula atom] -> Doc #

Pretty atom => Pretty (TruthTable atom) Source # 
Instance details

Defined in Data.Logic.ATP.Prop

(Num a, Show a) => Pretty (Knows a) Source # 
Instance details

Defined in Data.Logic.ATP.PropExamples

Pretty a => Pretty (Set a) Source # 
Instance details

Defined in Data.Logic.ATP.Pretty

Methods

pPrintPrec :: PrettyLevel -> Rational -> Set a -> Doc #

pPrint :: Set a -> Doc #

pPrintList :: PrettyLevel -> [Set a] -> Doc #

Pretty a => Pretty (Maybe a) 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Pretty a => Pretty [a] 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> [a] -> Doc #

pPrint :: [a] -> Doc #

pPrintList :: PrettyLevel -> [[a]] -> Doc #

(IsPredicate predicate, IsTerm term) => Pretty (FOLAP predicate term) Source # 
Instance details

Defined in Data.Logic.ATP.Apply

Methods

pPrintPrec :: PrettyLevel -> Rational -> FOLAP predicate term -> Doc #

pPrint :: FOLAP predicate term -> Doc #

pPrintList :: PrettyLevel -> [FOLAP predicate term] -> Doc #

(HasApply (FOL predicate term), HasEquate (FOL predicate term), IsTerm term) => Pretty (FOL predicate term) Source # 
Instance details

Defined in Data.Logic.ATP.Equate

Methods

pPrintPrec :: PrettyLevel -> Rational -> FOL predicate term -> Doc #

pPrint :: FOL predicate term -> Doc #

pPrintList :: PrettyLevel -> [FOL predicate term] -> Doc #

(HasApply atom, IsTerm term, term ~ TermOf atom, v ~ TVarOf term) => Pretty (QFormula v atom) Source # 
Instance details

Defined in Data.Logic.ATP.Quantified

Methods

pPrintPrec :: PrettyLevel -> Rational -> QFormula v atom -> Doc #

pPrint :: QFormula v atom -> Doc #

pPrintList :: PrettyLevel -> [QFormula v atom] -> Doc #

IsTerm (Term function v) => Pretty (Term function v) Source # 
Instance details

Defined in Data.Logic.ATP.Term

Methods

pPrintPrec :: PrettyLevel -> Rational -> Term function v -> Doc #

pPrint :: Term function v -> Doc #

pPrintList :: PrettyLevel -> [Term function v] -> Doc #

(Pretty a, Pretty b) => Pretty (Either a b) 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> Either a b -> Doc #

pPrint :: Either a b -> Doc #

pPrintList :: PrettyLevel -> [Either a b] -> Doc #

(Pretty v, Pretty term) => Pretty (Map v term) Source # 
Instance details

Defined in Data.Logic.ATP.Pretty

Methods

pPrintPrec :: PrettyLevel -> Rational -> Map v term -> Doc #

pPrint :: Map v term -> Doc #

pPrintList :: PrettyLevel -> [Map v term] -> Doc #

(Pretty a, Pretty b) => Pretty (a, b) 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> (a, b) -> Doc #

pPrint :: (a, b) -> Doc #

pPrintList :: PrettyLevel -> [(a, b)] -> Doc #

(Pretty a, Pretty b, Pretty c) => Pretty (a, b, c) 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> (a, b, c) -> Doc #

pPrint :: (a, b, c) -> Doc #

pPrintList :: PrettyLevel -> [(a, b, c)] -> Doc #

(Pretty a, Pretty b, Pretty c, Pretty d) => Pretty (a, b, c, d) 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> (a, b, c, d) -> Doc #

pPrint :: (a, b, c, d) -> Doc #

pPrintList :: PrettyLevel -> [(a, b, c, d)] -> Doc #

(Pretty a, Pretty b, Pretty c, Pretty d, Pretty e) => Pretty (a, b, c, d, e) 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> (a, b, c, d, e) -> Doc #

pPrint :: (a, b, c, d, e) -> Doc #

pPrintList :: PrettyLevel -> [(a, b, c, d, e)] -> Doc #

(Pretty a, Pretty b, Pretty c, Pretty d, Pretty e, Pretty f) => Pretty (a, b, c, d, e, f) 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> (a, b, c, d, e, f) -> Doc #

pPrint :: (a, b, c, d, e, f) -> Doc #

pPrintList :: PrettyLevel -> [(a, b, c, d, e, f)] -> Doc #

(Pretty a, Pretty b, Pretty c, Pretty d, Pretty e, Pretty f, Pretty g) => Pretty (a, b, c, d, e, f, g) 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> (a, b, c, d, e, f, g) -> Doc #

pPrint :: (a, b, c, d, e, f, g) -> Doc #

pPrintList :: PrettyLevel -> [(a, b, c, d, e, f, g)] -> Doc #

(Pretty a, Pretty b, Pretty c, Pretty d, Pretty e, Pretty f, Pretty g, Pretty h) => Pretty (a, b, c, d, e, f, g, h) 
Instance details

Defined in Text.PrettyPrint.HughesPJClass

Methods

pPrintPrec :: PrettyLevel -> Rational -> (a, b, c, d, e, f, g, h) -> Doc #

pPrint :: (a, b, c, d, e, f, g, h) -> Doc #

pPrintList :: PrettyLevel -> [(a, b, c, d, e, f, g, h)] -> Doc #

text :: String -> Doc #

A document of height 1 containing a literal string. text satisfies the following laws:

The side condition on the last law is necessary because text "" has height 1, while empty has no height.

brackets #

Arguments

:: Doc 
-> Doc

Wrap document in [...]

comma #

Arguments

:: Doc

A ',' character

hcat :: [Doc] -> Doc #

List version of <>.

nest :: Int -> Doc -> Doc #

Nest (or indent) a document by a given number of positions (which may also be negative). nest satisfies the laws:

The side condition on the last law is needed because empty is a left identity for <>.

punctuate :: Doc -> [Doc] -> [Doc] #

punctuate p [d1, ... dn] = [d1 <> p, d2 <> p, ... dn-1 <> p, dn]

fsep :: [Doc] -> Doc #

"Paragraph fill" version of sep.

prettyShow :: Pretty a => a -> String #

Pretty print a value with the prettyNormal level.

data Associativity Source #

Constructors

InfixL 
InfixR 
InfixN 
InfixA 

Instances

Instances details
Show Associativity Source # 
Instance details

Defined in Data.Logic.ATP.Pretty

type Precedence = forall a. Num a => a Source #

Use the same precedence type as the pretty package

class HasFixity x where Source #

A class to extract the fixity of a formula so they can be properly parenthesized.

The Haskell FixityDirection type is concerned with how to interpret a formula formatted in a certain way, but here we are concerned with how to format a formula given its interpretation. As such, one case the Haskell type does not capture is whether the operator follows the associative law, so we can omit parentheses in an expression such as a & b & c. Hopefully, we can generate formulas so that an associative operator with left associative fixity direction appears as (a+b)+c rather than a+(b+c).

Minimal complete definition

Nothing

Instances

Instances details
HasFixity Atom Source # 
Instance details

Defined in Data.Logic.ATP.DefCNF

HasFixity Prop Source # 
Instance details

Defined in Data.Logic.ATP.Prop

IsAtom atom => HasFixity (LFormula atom) Source # 
Instance details

Defined in Data.Logic.ATP.Lit

HasFixity a => HasFixity (JL a) Source # 
Instance details

Defined in Data.Logic.ATP.LitWrapper

IsAtom atom => HasFixity (PFormula atom) Source # 
Instance details

Defined in Data.Logic.ATP.Prop

Num a => HasFixity (Knows a) Source # 
Instance details

Defined in Data.Logic.ATP.PropExamples

HasFixity (FOLAP predicate term) Source # 
Instance details

Defined in Data.Logic.ATP.Apply

Methods

precedence :: FOLAP predicate term -> Precedence Source #

associativity :: FOLAP predicate term -> Associativity Source #

(IsPredicate predicate, IsTerm term) => HasFixity (FOL predicate term) Source # 
Instance details

Defined in Data.Logic.ATP.Equate

Methods

precedence :: FOL predicate term -> Precedence Source #

associativity :: FOL predicate term -> Associativity Source #

IsQuantified (QFormula v atom) => HasFixity (QFormula v atom) Source # 
Instance details

Defined in Data.Logic.ATP.Quantified

(IsFunction function, IsVariable v) => HasFixity (Term function v) Source # 
Instance details

Defined in Data.Logic.ATP.Term

Methods

precedence :: Term function v -> Precedence Source #

associativity :: Term function v -> Associativity Source #

data Side Source #

What side of the parent formula are we rendering?

Constructors

Top 
LHS 
RHS 
Unary 

Instances

Instances details
Show Side Source # 
Instance details

Defined in Data.Logic.ATP.Pretty

Methods

showsPrec :: Int -> Side -> ShowS #

show :: Side -> String #

showList :: [Side] -> ShowS #

testParen :: (Eq a, Ord a, Num a) => Side -> a -> a -> Associativity -> Bool Source #

Decide whether to parenthesize based on which side of the parent binary operator we are rendering, the parent operator's precedence, and the precedence and associativity of the operator we are rendering. testParen :: Side -> Precedence -> Precedence -> Associativity -> Bool

assertEqual' Source #

Arguments

:: (?loc :: CallStack, Eq a, Pretty a) 
=> String

The message prefix

-> a

The expected value

-> a

The actual value

-> Assertion 

Version of assertEqual that uses the pretty printer instead of show.

leafPrec :: Num a => a Source #

boolPrec :: Num a => a Source #

notPrec :: Num a => a Source #

atomPrec :: Num a => a Source #

andPrec :: Num a => a Source #

orPrec :: Num a => a Source #

impPrec :: Num a => a Source #

iffPrec :: Num a => a Source #

quantPrec :: Num a => a Source #

eqPrec :: Num a => a Source #

pAppPrec :: Num a => a Source #

Orphan instances

Pretty a => Pretty (Set a) Source # 
Instance details

Methods

pPrintPrec :: PrettyLevel -> Rational -> Set a -> Doc #

pPrint :: Set a -> Doc #

pPrintList :: PrettyLevel -> [Set a] -> Doc #

(Pretty v, Pretty term) => Pretty (Map v term) Source # 
Instance details

Methods

pPrintPrec :: PrettyLevel -> Rational -> Map v term -> Doc #

pPrint :: Map v term -> Doc #

pPrintList :: PrettyLevel -> [Map v term] -> Doc #