| 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.UnifiedITEOp
Description
Synopsis
- symIte :: forall (mode :: EvalModeTag) v. (DecideEvalMode mode, UnifiedITEOp mode v) => GetBool mode -> v -> v -> v
- symIteMerge :: forall (mode :: EvalModeTag) u v. (DecideEvalMode mode, UnifiedITEOp mode v, Mergeable v, UnionViewMode mode u, UnionView u) => u v -> v
- class UnifiedITEOp (mode :: EvalModeTag) v where
- withBaseITEOp :: (If (IsConMode mode) () (ITEOp v) => r) -> r
Documentation
symIte :: forall (mode :: EvalModeTag) v. (DecideEvalMode mode, UnifiedITEOp mode v) => GetBool mode -> v -> v -> v Source #
Unified symIte operation.
This function isn't able to infer the mode of the boolean variable, so you need to provide the mode explicitly. For example:
symIte @mode (a .== b) ... symIte (a .== b :: SymBool) ... symIte (a .== b :: GetBool mode) ...
symIteMerge :: forall (mode :: EvalModeTag) u v. (DecideEvalMode mode, UnifiedITEOp mode v, Mergeable v, UnionViewMode mode u, UnionView u) => u v -> v Source #
Unified symIteMerge
operation.
This function isn't able to infer the mode of the base monad from the result, so you need to provide the mode explicitly. For example:
symIteMerge @mode ... symIteMerge (... :: GetData mode v) ...
class UnifiedITEOp (mode :: EvalModeTag) v where Source #
A class that provides unified equality comparison.
We use this type class to help resolve the constraints for ITEOp.
Instances
| (DecideEvalMode mode, If (IsConMode mode) () (ITEOp a)) => UnifiedITEOp mode a Source # | |
| (UnifiedITEOp 'S v, Mergeable v) => UnifiedITEOp 'S (Union v) Source # | |