Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- cn :: v -> CN v
- unCN :: CN p -> p
- type CN = CollectErrors NumErrors
- newtype NumErrors = NumErrors (Set NumErrorLevel)
- type NumErrorLevel = (NumError, ErrorCertaintyLevel)
- data NumError
- data ErrorCertaintyLevel
- noValueNumErrorCertain :: NumError -> CN v
- noValueNumErrorPotential :: NumError -> CN v
- removeValueErrorCertain :: CN t -> NumError -> CN t
- removeValueErrorPotential :: CN t -> NumError -> CN t
- prependErrorCertain :: NumError -> CN t -> CN t
- prependErrorPotential :: NumError -> CN t -> CN t
- clearPotentialErrors :: CN t -> CN t
- liftCN :: (a -> CN c) -> CN a -> CN c
- lift2CN :: (a -> b -> CN c) -> CN a -> CN b -> CN c
- lift1TCN :: (a -> b -> CN c) -> CN a -> b -> CN c
- liftT1CN :: (a -> b -> CN c) -> a -> CN b -> CN c
- type CanTakeCNErrors = CanTakeErrors NumErrors
Documentation
type CN = CollectErrors NumErrors Source #
Instances
Eq NumErrors Source # | |
Show NumErrors Source # | |
Generic NumErrors Source # | |
Semigroup NumErrors Source # | |
Monoid NumErrors Source # | |
NFData NumErrors Source # | |
Defined in Numeric.CollectErrors.Type | |
CanTestErrorsPresent NumErrors Source # | |
CanTestErrorsCertain NumErrors Source # | |
Defined in Numeric.CollectErrors.Type hasCertainError :: NumErrors -> Bool Source # | |
(Floating v, Ord v, Show v) => Floating (CN v) Source # | |
(Fractional v, Eq v) => Fractional (CN v) Source # | |
(Integral v, Ord v, Show v) => Integral (CN v) Source # | |
type Rep NumErrors Source # | |
Defined in Numeric.CollectErrors.Type type Rep NumErrors = D1 ('MetaData "NumErrors" "Numeric.CollectErrors.Type" "collect-errors-0.1.4.0-Ju7JO5ZiQfCKTkmV8h4SLb" 'True) (C1 ('MetaCons "NumErrors" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set NumErrorLevel)))) |
type NumErrorLevel = (NumError, ErrorCertaintyLevel) Source #
Instances
Eq NumError Source # | |
Ord NumError Source # | |
Defined in Numeric.CollectErrors.Type | |
Show NumError Source # | |
Generic NumError Source # | |
NFData NumError Source # | |
Defined in Numeric.CollectErrors.Type | |
CanTestErrorsCertain NumErrorLevel Source # | |
Defined in Numeric.CollectErrors.Type hasCertainError :: NumErrorLevel -> Bool Source # | |
type Rep NumError Source # | |
Defined in Numeric.CollectErrors.Type type Rep NumError = D1 ('MetaData "NumError" "Numeric.CollectErrors.Type" "collect-errors-0.1.4.0-Ju7JO5ZiQfCKTkmV8h4SLb" '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
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.
clearPotentialErrors :: CN t -> CN t Source #
If there is a value, remove any potential errors that are associated with it.
type CanTakeCNErrors = CanTakeErrors NumErrors Source #