crucible-llvm-0.6: Support for translating and executing LLVM code in Crucible
Copyright(c) Galois Inc 2015-2016
LicenseBSD3
MaintainerRob Dockins <rdockins@galois.com>
Stabilityprovisional
Safe HaskellSafe-Inferred
LanguageHaskell2010

Lang.Crucible.LLVM.PrettyPrint

Description

This module defines several functions whose names clash with functions offered elsewhere in llvm-pretty (e.g., Text.LLVM.PP) and in crucible-llvm (e.g., Lang.Crucible.LLVM.MemModel.MemLog). For this reason, it is recommended to import this module qualified.

Synopsis

Documentation

commaSepList :: [Doc ann] -> Doc ann Source #

Print list of documents separated by commas and spaces.

ppIntType :: Integral a => a -> Doc ann Source #

Pretty print int type with width.

ppPtrType :: Doc ann -> Doc ann Source #

Pretty print pointer type.

ppArrayType :: Natural -> Doc ann -> Doc ann Source #

ppVectorType :: Natural -> Doc ann -> Doc ann Source #

ppIntVector :: Integral a => Natural -> a -> Doc ann Source #

llvm-pretty printing with the latest LLVM version

ppLLVMLatest :: ((?config :: Config) => a) -> a Source #

Pretty-print an LLVM-related AST in accordance with the latest LLVM version that llvm-pretty currently supports (i.e., the value of llvmVlatest.)

Note that we are mainly using the llvm-pretty printer in crucible-llvm for the sake of defining Show instances and creating error messages, not for creating machine-readable LLVM code. As a result, it doesn't particularly matter which LLVM version we use, as any version-specific differences in pretty-printer output won't be that impactful.

ppDeclare :: Declare -> Doc Source #

Invoke ppDeclare in accordance with the latest LLVM version that llvm-pretty supports.

ppIdent :: Ident -> Doc Source #

Invoke ppIdent in accordance with the latest LLVM version that llvm-pretty supports.

ppSymbol :: Symbol -> Doc Source #

Invoke ppSymbol in accordance with the latest LLVM version that llvm-pretty supports.

ppType :: Type -> Doc Source #

Invoke ppType in accordance with the latest LLVM version that llvm-pretty supports.

ppValue :: Value -> Doc Source #

Invoke ppValue in accordance with the latest LLVM version that llvm-pretty supports.