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.UnifiedSafeLinearArith
Description
Synopsis
- safeAdd :: forall (mode :: EvalModeTag) e a m. (MonadError e m, UnifiedSafeLinearArith mode e a m) => a -> a -> m a
- safeNeg :: forall (mode :: EvalModeTag) e a m. (MonadError e m, UnifiedSafeLinearArith mode e a m) => a -> m a
- safeSub :: forall (mode :: EvalModeTag) e a m. (MonadError e m, UnifiedSafeLinearArith mode e a m) => a -> a -> m a
- class UnifiedSafeLinearArith (mode :: EvalModeTag) e a (m :: Type -> Type) where
- withBaseSafeLinearArith :: (SafeLinearArith e a m => r) -> r
Documentation
safeAdd :: forall (mode :: EvalModeTag) e a m. (MonadError e m, UnifiedSafeLinearArith mode e a m) => a -> a -> m a Source #
Unified safeAdd
operation.
This function isn't able to infer the mode, so you need to provide the mode explicitly. For example:
safeAdd @mode a b
safeNeg :: forall (mode :: EvalModeTag) e a m. (MonadError e m, UnifiedSafeLinearArith mode e a m) => a -> m a Source #
Unified safeNeg
operation.
This function isn't able to infer the mode, so you need to provide the mode explicitly. For example:
safeNeg @mode a
safeSub :: forall (mode :: EvalModeTag) e a m. (MonadError e m, UnifiedSafeLinearArith mode e a m) => a -> a -> m a Source #
Unified safeSub
operation.
This function isn't able to infer the mode, so you need to provide the mode explicitly. For example:
safeSub @mode a b
class UnifiedSafeLinearArith (mode :: EvalModeTag) e a (m :: Type -> Type) where Source #
A class that provides unified linear arithmetic operations.
We use this type class to help resolve the constraints for SafeLinearArith
.
Methods
withBaseSafeLinearArith :: (SafeLinearArith e a m => r) -> r Source #