collect-errors-0.1.5.0: Error monad with a Float instance
Safe HaskellNone
LanguageHaskell2010

Numeric.CollectErrors.Type

Synopsis

Documentation

cn :: v -> CN v Source #

unCN :: CN p -> p Source #

newtype NumErrors Source #

Constructors

NumErrors (Set NumErrorLevel) 

Instances

Instances details
Eq NumErrors Source # 
Instance details

Defined in Numeric.CollectErrors.Type

Show NumErrors Source # 
Instance details

Defined in Numeric.CollectErrors.Type

Generic NumErrors Source # 
Instance details

Defined in Numeric.CollectErrors.Type

Associated Types

type Rep NumErrors :: Type -> Type #

Semigroup NumErrors Source # 
Instance details

Defined in Numeric.CollectErrors.Type

Monoid NumErrors Source # 
Instance details

Defined in Numeric.CollectErrors.Type

NFData NumErrors Source # 
Instance details

Defined in Numeric.CollectErrors.Type

Methods

rnf :: NumErrors -> () #

CanTestErrorsPresent NumErrors Source # 
Instance details

Defined in Numeric.CollectErrors.Type

CanTestErrorsCertain NumErrors Source # 
Instance details

Defined in Numeric.CollectErrors.Type

(Floating v, Ord v, Show v) => Floating (CN v) Source # 
Instance details

Defined in Numeric.CollectErrors.PreludeInstances

Methods

pi :: CN v #

exp :: CN v -> CN v #

log :: CN v -> CN v #

sqrt :: CN v -> CN v #

(**) :: CN v -> CN v -> CN v #

logBase :: CN v -> CN v -> CN v #

sin :: CN v -> CN v #

cos :: CN v -> CN v #

tan :: CN v -> CN v #

asin :: CN v -> CN v #

acos :: CN v -> CN v #

atan :: CN v -> CN v #

sinh :: CN v -> CN v #

cosh :: CN v -> CN v #

tanh :: CN v -> CN v #

asinh :: CN v -> CN v #

acosh :: CN v -> CN v #

atanh :: CN v -> CN v #

log1p :: CN v -> CN v #

expm1 :: CN v -> CN v #

log1pexp :: CN v -> CN v #

log1mexp :: CN v -> CN v #

(Fractional v, Eq v) => Fractional (CN v) Source # 
Instance details

Defined in Numeric.CollectErrors.PreludeInstances

Methods

(/) :: CN v -> CN v -> CN v #

recip :: CN v -> CN v #

fromRational :: Rational -> CN v #

(Integral v, Ord v, Show v) => Integral (CN v) Source # 
Instance details

Defined in Numeric.CollectErrors.PreludeInstances

Methods

quot :: CN v -> CN v -> CN v #

rem :: CN v -> CN v -> CN v #

div :: CN v -> CN v -> CN v #

mod :: CN v -> CN v -> CN v #

quotRem :: CN v -> CN v -> (CN v, CN v) #

divMod :: CN v -> CN v -> (CN v, CN v) #

toInteger :: CN v -> Integer #

CanClearPotentialErrors (CN t) Source # 
Instance details

Defined in Numeric.CollectErrors.Type

Methods

clearPotentialErrors :: CN t -> CN t Source #

type Rep NumErrors Source # 
Instance details

Defined in Numeric.CollectErrors.Type

type Rep NumErrors = D1 ('MetaData "NumErrors" "Numeric.CollectErrors.Type" "collect-errors-0.1.5.0-DAyNZ8BMV4w4yqJNdU6hiq" 'True) (C1 ('MetaCons "NumErrors" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set NumErrorLevel))))

data NumError Source #

Instances

Instances details
Eq NumError Source # 
Instance details

Defined in Numeric.CollectErrors.Type

Ord NumError Source # 
Instance details

Defined in Numeric.CollectErrors.Type

Show NumError Source # 
Instance details

Defined in Numeric.CollectErrors.Type

Generic NumError Source # 
Instance details

Defined in Numeric.CollectErrors.Type

Associated Types

type Rep NumError :: Type -> Type #

Methods

from :: NumError -> Rep NumError x #

to :: Rep NumError x -> NumError #

NFData NumError Source # 
Instance details

Defined in Numeric.CollectErrors.Type

Methods

rnf :: NumError -> () #

CanTestErrorsCertain NumErrorLevel Source # 
Instance details

Defined in Numeric.CollectErrors.Type

type Rep NumError Source # 
Instance details

Defined in Numeric.CollectErrors.Type

type Rep NumError = D1 ('MetaData "NumError" "Numeric.CollectErrors.Type" "collect-errors-0.1.5.0-DAyNZ8BMV4w4yqJNdU6hiq" 'False) (C1 ('MetaCons "DivByZero" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "OutOfDomain" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: C1 ('MetaCons "NumError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String))))

data ErrorCertaintyLevel Source #

Instances

Instances details
Eq ErrorCertaintyLevel Source # 
Instance details

Defined in Numeric.CollectErrors.Type

Ord ErrorCertaintyLevel Source # 
Instance details

Defined in Numeric.CollectErrors.Type

Show ErrorCertaintyLevel Source # 
Instance details

Defined in Numeric.CollectErrors.Type

Generic ErrorCertaintyLevel Source # 
Instance details

Defined in Numeric.CollectErrors.Type

Associated Types

type Rep ErrorCertaintyLevel :: Type -> Type #

NFData ErrorCertaintyLevel Source # 
Instance details

Defined in Numeric.CollectErrors.Type

Methods

rnf :: ErrorCertaintyLevel -> () #

CanTestErrorsCertain NumErrorLevel Source # 
Instance details

Defined in Numeric.CollectErrors.Type

type Rep ErrorCertaintyLevel Source # 
Instance details

Defined in Numeric.CollectErrors.Type

type Rep ErrorCertaintyLevel = D1 ('MetaData "ErrorCertaintyLevel" "Numeric.CollectErrors.Type" "collect-errors-0.1.5.0-DAyNZ8BMV4w4yqJNdU6hiq" 'False) (C1 ('MetaCons "ErrorCertain" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorPotential" 'PrefixI 'False) (U1 :: Type -> Type))

noValueNumErrorCertain :: NumError -> CN v Source #

Construct an empty wrapper indicating that given error has certainly occurred.

noValueNumErrorPotential :: NumError -> CN v Source #

Construct an empty wrapper indicating that given error may have occurred.

class CanClearPotentialErrors cnt where Source #

Methods

clearPotentialErrors :: cnt -> cnt Source #

If there is a value, remove any potential errors that are associated with it.

Instances

Instances details
CanClearPotentialErrors t => CanClearPotentialErrors [t] Source # 
Instance details

Defined in Numeric.CollectErrors.Type

Methods

clearPotentialErrors :: [t] -> [t] Source #

CanClearPotentialErrors (CN t) Source # 
Instance details

Defined in Numeric.CollectErrors.Type

Methods

clearPotentialErrors :: CN t -> CN t Source #

(CanClearPotentialErrors t1, CanClearPotentialErrors t2) => CanClearPotentialErrors (t1, t2) Source # 
Instance details

Defined in Numeric.CollectErrors.Type

Methods

clearPotentialErrors :: (t1, t2) -> (t1, t2) Source #

liftCN :: (a -> CN c) -> CN a -> CN c Source #

lift2CN :: (a -> b -> CN c) -> CN a -> CN b -> CN c Source #

lift1TCN :: (a -> b -> CN c) -> CN a -> b -> CN c Source #

liftT1CN :: (a -> b -> CN c) -> a -> CN b -> CN c Source #