| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Numeric.CollectErrors.Type
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 #
Constructors
| NumErrors (Set NumErrorLevel) |
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 Methods 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.1-3TYetJF1qk82oqi66tywkB" 'True) (C1 ('MetaCons "NumErrors" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set NumErrorLevel)))) | |
type NumErrorLevel = (NumError, ErrorCertaintyLevel) Source #
Constructors
| DivByZero | |
| OutOfDomain String | |
| NumError String |
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 Methods 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.1-3TYetJF1qk82oqi66tywkB" '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 #
Constructors
| ErrorCertain | |
| ErrorPotential |
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 #