smtlib2-1.0: A type-safe interface to communicate with an SMT solver.

Safe HaskellNone
LanguageHaskell98

Language.SMTLib2.Internals.Monad

Documentation

newtype Backend b => SMT b a Source

Constructors

SMT 

Fields

runSMT :: StateT (SMTState b) (SMTMonad b) a
 

Instances

Backend b => Monad (SMT b) Source 
Backend b => Functor (SMT b) Source 
Backend b => Applicative (SMT b) Source 
(Backend b, MonadIO (SMTMonad b)) => MonadIO (SMT b) Source 
(Backend b, (~) (Type -> *) e (Expr b)) => Embed (SMT b) e Source 
Backend b => MonadState (SMTState b) (SMT b) Source 
type EmVar (SMT b) e = Var b Source 
type EmQVar (SMT b) e = QVar b Source 
type EmFun (SMT b) e = Fun b Source 
type EmConstr (SMT b) e = Constr b Source 
type EmField (SMT b) e = Field b Source 
type EmFunArg (SMT b) e = FunArg b Source 
type EmLVar (SMT b) e = LVar b Source 

data SMTState b Source

Constructors

SMTState 

Fields

backend :: !b
 
datatypes :: !(DatatypeInfo (Constr b) (Field b))
 

Instances

withBackend :: Backend b => SMTMonad b b -> SMT b a -> SMTMonad b a Source

withBackendExitCleanly :: (Backend b, SMTMonad b ~ IO) => IO b -> SMT b a -> IO a Source

liftSMT :: Backend b => SMTMonad b a -> SMT b a Source

embedSMT :: Backend b => (b -> SMTMonad b (a, b)) -> SMT b a Source

embedSMT' :: Backend b => (b -> SMTMonad b b) -> SMT b () Source

data DTProxy dt where Source

Constructors

DTProxy :: IsDatatype dt => DTProxy dt 

type DatatypeInfo con field = DMap DTProxy (RegisteredDT con field) Source

newtype RegisteredDT con field dt Source

Constructors

RegisteredDT (BackendDatatype con field `(DatatypeSig dt, dt)`) 

lookupDatatype :: DTProxy dt -> DatatypeInfo con field -> BackendDatatype con field `(DatatypeSig dt, dt)` Source

lookupConstructor :: String -> BackendDatatype con field `(DatatypeSig dt, dt)` -> (forall arg. BackendConstr con field `(arg, dt)` -> a) -> a Source

constructDatatype :: GEq con => con `(arg, ret)` -> List ConcreteValue arg -> BackendDatatype con field `(cons, ret)` -> ret Source

lookupField :: String -> BackendConstr con field `(arg, dt)` -> (forall tp. BackendField field dt tp -> a) -> a Source

lookupDatatypeCon :: (IsDatatype dt, Typeable con, Typeable field) => DTProxy dt -> String -> DatatypeInfo con field -> (forall arg. BackendConstr con field `(arg, dt)` -> a) -> a Source

lookupDatatypeField :: (IsDatatype dt, Typeable con, Typeable field) => DTProxy dt -> String -> String -> DatatypeInfo con field -> (forall tp. BackendField field dt tp -> a) -> a Source

defineVar' :: Backend b => Expr b t -> SMT b (Var b t) Source

defineVarNamed' :: Backend b => String -> Expr b t -> SMT b (Var b t) Source

declareVar' :: Backend b => Repr t -> SMT b (Var b t) Source

declareVarNamed' :: Backend b => Repr t -> String -> SMT b (Var b t) Source