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.Printf

Description

A model of C's printf function. This does not entirely conform to the C standard's specification of printf; see doc/limitations.md for the specifics.

Synopsis

Documentation

data Case Source #

Constructors

UpperCase 
LowerCase 

Instances

Instances details
Show Case Source # 
Instance details

Defined in Lang.Crucible.LLVM.Printf

Methods

showsPrec :: Int -> Case -> ShowS #

show :: Case -> String #

showList :: [Case] -> ShowS #

Eq Case Source # 
Instance details

Defined in Lang.Crucible.LLVM.Printf

Methods

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

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

Ord Case Source # 
Instance details

Defined in Lang.Crucible.LLVM.Printf

Methods

compare :: Case -> Case -> Ordering #

(<) :: Case -> Case -> Bool #

(<=) :: Case -> Case -> Bool #

(>) :: Case -> Case -> Bool #

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

max :: Case -> Case -> Case #

min :: Case -> Case -> Case #

executeDirectives :: forall m. Monad m => PrintfOperations m -> [PrintfDirective] -> m (ByteString, Int) Source #

Given a list of PrintfDirectives, compute the resulting ByteString and its length.

We make an effort not to assume a particular text encoding for the ByteString that this returns. Some parts of the implementation do use functionality from Data.ByteString.Char8, which is limited to the subset of Unicode covered by code points 0-255. We believe these uses are justified, however, and we have left comments explaining the reasoning behind each use.

formatRational Source #

Arguments

:: Maybe Rational 
-> FloatFormat 
-> Int 
-> Maybe Int 
-> Set PrintfFlag 
-> Either String String

Left indicates an error, right is OK