hasmtlib-2.8.0: A monad for interfacing with external SMT solvers
Safe HaskellSafe-Inferred
LanguageGHC2021

Language.Hasmtlib.Type.Value

Description

This module provides the wrapper Value for embedding Haskell-Values into the SMT-Context.

The Direction Haskell-Value => SMT-Value is the creation of a constant in the SMT-Problem.

The other way around SMT-Value => Haskell-Value is mainly used when decoding a solvers solutions for variables.

Synopsis

Type

data Value (t :: SMTSort) where Source #

A wrapper for values of SMTSorts. This wraps a Haskell-value into the SMT-Context.

Instances

Instances details
GCompare Value Source # 
Instance details

Defined in Language.Hasmtlib.Type.Value

Methods

gcompare :: forall (a :: k) (b :: k). Value a -> Value b -> GOrdering a b #

GEq Value Source # 
Instance details

Defined in Language.Hasmtlib.Type.Value

Methods

geq :: forall (a :: k) (b :: k). Value a -> Value b -> Maybe (a :~: b) #

(KnownSMTSort t, Num (HaskellType t)) => Num (Value t) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Value

Methods

(+) :: Value t -> Value t -> Value t #

(-) :: Value t -> Value t -> Value t #

(*) :: Value t -> Value t -> Value t #

negate :: Value t -> Value t #

abs :: Value t -> Value t #

signum :: Value t -> Value t #

fromInteger :: Integer -> Value t #

Fractional (Value 'RealSort) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Value

Show (Value t) Source # 
Instance details

Defined in Language.Hasmtlib.Internal.Render

Methods

showsPrec :: Int -> Value t -> ShowS #

show :: Value t -> String #

showList :: [Value t] -> ShowS #

Eq (HaskellType t) => Eq (Value t) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Value

Methods

(==) :: Value t -> Value t -> Bool #

(/=) :: Value t -> Value t -> Bool #

Ord (HaskellType t) => Ord (Value t) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Value

Methods

compare :: Value t -> Value t -> Ordering #

(<) :: Value t -> Value t -> Bool #

(<=) :: Value t -> Value t -> Bool #

(>) :: Value t -> Value t -> Bool #

(>=) :: Value t -> Value t -> Bool #

max :: Value t -> Value t -> Value t #

min :: Value t -> Value t -> Value t #

Boolean (Value 'BoolSort) Source # 
Instance details

Defined in Language.Hasmtlib.Type.Value

Render (Value t) Source # 
Instance details

Defined in Language.Hasmtlib.Internal.Render

Methods

render :: Value t -> Builder Source #

Conversion

wrapValue :: forall t. KnownSMTSort t => HaskellType t -> Value t Source #

Wraps a Haskell-value into the SMT-Context-Value.

unwrapValue :: Value t -> HaskellType t Source #

Unwraps a Haskell-value from the SMT-Context-Value.