grisette-0.9.0.0: Symbolic evaluation as a library
Copyright(c) Sirui Lu 2024
LicenseBSD-3-Clause (see the LICENSE file)
Maintainersiruilu@cs.washington.edu
StabilityExperimental
PortabilityGHC only
Safe HaskellSafe-Inferred
LanguageHaskell2010

Grisette.Internal.Core.Data.Class.SafeFromFP

Description

 
Synopsis

Documentation

class (MonadError e m, TryMerge m, IEEEFPConvertible a fp fprd) => SafeFromFP e a fp fprd m where Source #

Safe conversion from floating point numbers that throws exceptions when the result isn't representable by the type.

Methods

safeFromFP :: fprd -> fp -> m a Source #

Instances

Instances details
(MonadError NotRepresentableFPError m, TryMerge m, ValidFP eb sb) => SafeFromFP NotRepresentableFPError AlgReal (FP eb sb) FPRoundingMode m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeFromFP

Methods

safeFromFP :: FPRoundingMode -> FP eb sb -> m AlgReal Source #

(MonadError NotRepresentableFPError m, MonadUnion m, ValidFP eb sb) => SafeFromFP NotRepresentableFPError SymAlgReal (SymFP eb sb) SymFPRoundingMode m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeFromFP

(MonadError NotRepresentableFPError m, MonadUnion m, ValidFP eb sb) => SafeFromFP NotRepresentableFPError SymInteger (SymFP eb sb) SymFPRoundingMode m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeFromFP

(MonadError NotRepresentableFPError m, TryMerge m, ValidFP eb sb) => SafeFromFP NotRepresentableFPError Integer (FP eb sb) FPRoundingMode m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeFromFP

Methods

safeFromFP :: FPRoundingMode -> FP eb sb -> m Integer Source #

(MonadError NotRepresentableFPError m, TryMerge m, ValidFP eb sb, KnownNat n, 1 <= n) => SafeFromFP NotRepresentableFPError (IntN n) (FP eb sb) FPRoundingMode m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeFromFP

Methods

safeFromFP :: FPRoundingMode -> FP eb sb -> m (IntN n) Source #

(MonadError NotRepresentableFPError m, TryMerge m, ValidFP eb sb, KnownNat n, 1 <= n) => SafeFromFP NotRepresentableFPError (WordN n) (FP eb sb) FPRoundingMode m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeFromFP

Methods

safeFromFP :: FPRoundingMode -> FP eb sb -> m (WordN n) Source #

(MonadError NotRepresentableFPError m, MonadUnion m, ValidFP eb sb, KnownNat n, 1 <= n) => SafeFromFP NotRepresentableFPError (SymIntN n) (SymFP eb sb) SymFPRoundingMode m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeFromFP

Methods

safeFromFP :: SymFPRoundingMode -> SymFP eb sb -> m (SymIntN n) Source #

(MonadError NotRepresentableFPError m, MonadUnion m, ValidFP eb sb, KnownNat n, 1 <= n) => SafeFromFP NotRepresentableFPError (SymWordN n) (SymFP eb sb) SymFPRoundingMode m Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.SafeFromFP

Methods

safeFromFP :: SymFPRoundingMode -> SymFP eb sb -> m (SymWordN n) Source #