Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
A parser for an s-expression representation of what4 expressions
Synopsis
- deserializeExpr :: forall sym t st fs. sym ~ ExprBuilder t st fs => sym -> SExpr -> IO (Either String (Some (SymExpr sym)))
- deserializeExprWithConfig :: forall sym t st fs. sym ~ ExprBuilder t st fs => sym -> Config sym -> SExpr -> IO (Either String (Some (SymExpr sym)))
- deserializeSymFn :: forall sym t st fs. sym ~ ExprBuilder t st fs => sym -> SExpr -> IO (Either String (SomeSymFn sym))
- deserializeSymFnWithConfig :: forall sym t st fs. sym ~ ExprBuilder t st fs => sym -> Config sym -> SExpr -> IO (Either String (SomeSymFn sym))
- deserializeBaseType :: SExpr -> Either String (Some BaseTypeRepr)
- readBaseTypes :: forall m. MonadError String m => SExpr -> m (Some (Assignment BaseTypeRepr))
- data Atom
- data WellFormedSExpr atom
- = WFSList [WellFormedSExpr atom]
- | WFSAtom atom
- data Config sym = Config {}
- defaultConfig :: (IsSymExprBuilder sym, ShowF (SymExpr sym)) => sym -> Config sym
- data SomeSymFn t = forall dom ret. SomeSymFn (SymFn t dom ret)
- type SExpr = WellFormedSExpr Atom
- parseSExpr :: Text -> Either String SExpr
- printSExpr :: Seq String -> SExpr -> Text
Documentation
deserializeExpr :: forall sym t st fs. sym ~ ExprBuilder t st fs => sym -> SExpr -> IO (Either String (Some (SymExpr sym))) Source #
(deserializeExpr sym)
is equivalent
to (deserializeExpr' (defaultConfig sym))
.
deserializeExprWithConfig :: forall sym t st fs. sym ~ ExprBuilder t st fs => sym -> Config sym -> SExpr -> IO (Either String (Some (SymExpr sym))) Source #
deserializeSymFn :: forall sym t st fs. sym ~ ExprBuilder t st fs => sym -> SExpr -> IO (Either String (SomeSymFn sym)) Source #
(deserializeSymFn sym)
is equivalent
to (deserializeSymFn' (defaultConfig sym))
.
deserializeSymFnWithConfig :: forall sym t st fs. sym ~ ExprBuilder t st fs => sym -> Config sym -> SExpr -> IO (Either String (SomeSymFn sym)) Source #
deserializeBaseType :: SExpr -> Either String (Some BaseTypeRepr) Source #
readBaseTypes :: forall m. MonadError String m => SExpr -> m (Some (Assignment BaseTypeRepr)) Source #
AId Text | An identifier. |
AStr (Some StringInfoRepr) Text | A prefix followed by a string literal (.e.g, AStr "u" "Hello World" is serialize as `#u"Hello World"`). |
AInt Integer | Integer (i.e., unbounded) literal. |
ANat Natural | Natural (i.e., unbounded) literal |
AReal Rational | Real (i.e., unbounded) literal. |
AFloat (Some FloatPrecisionRepr) BigFloat | A floating point literal (with precision) |
ABV Int Integer | Bitvector, width and then value. |
ABool Bool | Boolean literal. |
data WellFormedSExpr atom #
A well-formed s-expression is one which does not
contain any dotted lists. This means that not
every value of SExpr a
can be converted to a
WellFormedSExpr a
, although the opposite is
fine.
WFSList [WellFormedSExpr atom] | |
WFSAtom atom |
Instances
defaultConfig :: (IsSymExprBuilder sym, ShowF (SymExpr sym)) => sym -> Config sym Source #
type SExpr = WellFormedSExpr Atom Source #