Copyright | (c) Sirui Lu 2024 |
---|---|
License | BSD-3-Clause (see the LICENSE file) |
Maintainer | siruilu@cs.washington.edu |
Stability | Experimental |
Portability | GHC only |
Safe Haskell | None |
Language | Haskell2010 |
Grisette.Internal.Unified.Class.UnifiedSolvable
Description
Synopsis
- class UnifiedSolvable (mode :: EvalModeTag) a con | a -> mode con, con mode -> a where
- withBaseSolvable :: (If (IsConMode mode) (a ~ con) (Solvable con a) => r) -> r
- con :: forall (mode :: EvalModeTag) a con. (DecideEvalMode mode, UnifiedSolvable mode a con) => con -> a
- pattern Con :: forall (mode :: EvalModeTag) a con. (DecideEvalMode mode, UnifiedSolvable mode a con) => con -> a
- conView :: forall (mode :: EvalModeTag) a con. (DecideEvalMode mode, UnifiedSolvable mode a con) => a -> Maybe con
Documentation
class UnifiedSolvable (mode :: EvalModeTag) a con | a -> mode con, con mode -> a where Source #
A class that provides the ability to extract/wrap the concrete value from/into a symbolic value.
Instances
con :: forall (mode :: EvalModeTag) a con. (DecideEvalMode mode, UnifiedSolvable mode a con) => con -> a Source #
Wrap a concrete value in a symbolic value.
>>>
con True :: Bool
True
>>>
con True :: SymBool
true
pattern Con :: forall (mode :: EvalModeTag) a con. (DecideEvalMode mode, UnifiedSolvable mode a con) => con -> a Source #
A pattern synonym for extracting the concrete value from a symbolic value.
>>>
case con True :: SymBool of Con v -> v
True
>>>
case ssym "a" :: SymBool of Con v -> Just v; _ -> Nothing
Nothing
conView :: forall (mode :: EvalModeTag) a con. (DecideEvalMode mode, UnifiedSolvable mode a con) => a -> Maybe con Source #
Extract the concrete value from a symbolic value.
>>>
conView (con True :: SymBool)
Just True
>>>
conView (ssym "a" :: SymBool)
Nothing
>>>
conView True
Just True