what4-1.5.1: Solver-agnostic symbolic values support for issuing queries

Safe Haskell | Safe-Inferred
Language | Haskell2010

What4.Protocol.SExp

Synopsis

- data SExp
  - = SAtom Text
  - | SString Text
  - | SApp [SExp]
- parseSExp :: Parser Text -> Parser SExp
- parseSExpBody :: Parser Text -> Parser SExp
- stringToSExp :: MonadFail m => Parser Text -> String -> m [SExp]
- parseNextWord :: Parser Text
- asAtomList :: SExp -> Maybe [Text]
- asNegAtomList :: SExp -> Maybe [(Bool, Text)]
- skipSpaceOrNewline :: Parser ()
- sExpToString :: SExp -> String

# Documentation

data SExp Source #

Constructors

SAtom Text |
SString Text |
SApp [SExp] |

#### Instances

Instances details

IsString SExp Source # |
Instance details Defined in What4.Protocol.SExp Methods fromString :: String -> SExp Source #
Show SExp Source # |
Instance details Defined in What4.Protocol.SExp Methods showsPrec :: Int -> SExp -> ShowS Source # show :: SExp -> String Source # showList :: [SExp] -> ShowS Source #
Eq SExp Source # |
Instance details Defined in What4.Protocol.SExp Methods (==) :: SExp -> SExp -> Bool Source # (/=) :: SExp -> SExp -> Bool Source #
Ord SExp Source # |
Instance details Defined in What4.Protocol.SExp Methods compare :: SExp -> SExp -> Ordering Source # (<) :: SExp -> SExp -> Bool Source # (<=) :: SExp -> SExp -> Bool Source # (>) :: SExp -> SExp -> Bool Source # (>=) :: SExp -> SExp -> Bool Source # max :: SExp -> SExp -> SExp Source # min :: SExp -> SExp -> SExp Source #

parseSExp Source #

Arguments

:: Parser Text | A parser for string literals
-> Parser SExp |

Parses an SExp. If the input is a string (recognized by the `readString` argument), return that as an `SString`; if the input is a single token, return that as an `SAtom`.

parseSExpBody Source #

Arguments

:: Parser Text | A parser for string literals
-> Parser SExp |

Parses the body of an SExp after the opening '(' has already been parsed.

stringToSExp Source #

Arguments

:: MonadFail m |
=> Parser Text | A parser for string literals
-> String |
-> m [SExp] |

parseNextWord :: Parser Text Source #

Read next contiguous sequence of numbers or letters.

asAtomList :: SExp -> Maybe [Text] Source #

asNegAtomList :: SExp -> Maybe [(Bool, Text)] Source #

skipSpaceOrNewline :: Parser () Source #

sExpToString :: SExp -> String Source #