cryptol-2.2.1: Cryptol: The Language of Cryptography

Copyright(c) 2013-2015 Galois, Inc.
LicenseBSD3
Maintainercryptol@galois.com
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Cryptol.Utils.PP

Description

 

Synopsis

Documentation

pp :: PP a => a -> Doc Source

pretty :: PP a => a -> String Source

ppInfix Source

Arguments

:: (PP thing, PP op) 
=> Int

Non-infix leaves are printed with this precedence

-> (thing -> Maybe (Infix op thing))

pattern to check if sub-thing is also infix

-> Infix op thing

Pretty print this infix expression

-> Doc 

Pretty print an infix expression of some sort.

data Assoc Source

Information about associativity.

Constructors

LeftAssoc 
RightAssoc 
NonAssoc 

Instances

data Infix op thing Source

Information about an infix expression of some sort.

Constructors

Infix 

Fields

ieOp :: op

operator

ieLeft :: thing

left argument

ieRight :: thing

right argumrnt

iePrec :: Int

operator precedence

ieAssoc :: Assoc

operator associativity

ordinal :: (Integral a, Show a, Eq a) => a -> Doc Source

Display a numeric values as an ordinar (e.g., 2nd)

ordSuffix :: (Integral a, Eq a) => a -> String Source

The suffix to use when displaying a number as an oridinal