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 | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- symIte :: forall mode v. (DecideEvalMode mode, UnifiedITEOp mode v) => GetBool mode -> v -> v -> v
- symIteMerge :: forall mode v. (DecideEvalMode mode, UnifiedITEOp mode v, Mergeable v) => BaseMonad mode v -> v
- class UnifiedITEOp mode v where
- withBaseITEOp :: (If (IsConMode mode) (() :: Constraint) (ITEOp v) => r) -> r
Documentation
symIte :: forall mode 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 v. (DecideEvalMode mode, UnifiedITEOp mode v, Mergeable v) => BaseMonad mode 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 (... :: BaseMonad mode v) ...
class UnifiedITEOp mode v where Source #
A class that provides unified equality comparison.
We use this type class to help resolve the constraints for ITEOp
.
withBaseITEOp :: (If (IsConMode mode) (() :: Constraint) (ITEOp v) => r) -> r Source #
Instances
(DecideEvalMode mode, If (IsConMode mode) () (ITEOp a)) => UnifiedITEOp mode a Source # | |
(UnifiedITEOp 'S v, Mergeable v) => UnifiedITEOp 'S (Union v) Source # | |