packages feed

aern2-real 0.2.4.3 → 0.2.5.0

raw patch · 4 files changed

+9/−36 lines, 4 filesdep ~aern2-mpPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: aern2-mp

API changes (from Hackage documentation)

- AERN2.Real.CKleenean: instance AERN2.Real.CKleenean.CanSelect (Numeric.CollectErrors.Type.CN AERN2.Kleenean.Kleenean)
- AERN2.Real.CKleenean: instance AERN2.Real.CKleenean.CanSelect AERN2.Kleenean.Kleenean
- AERN2.Real.CKleenean: instance AERN2.Real.CKleenean.CanSelect AERN2.Real.CKleenean.CKleenean
- AERN2.Real.Type: instance Numeric.MixedTypes.Literals.ConvertibleExactly (AERN2.MP.WithCurrentPrec.WithAnyPrec (Numeric.CollectErrors.Type.CN AERN2.MP.Ball.Type.MPBall)) AERN2.Real.Type.CReal
+ AERN2.Real.CKleenean: instance AERN2.Select.CanSelect AERN2.Real.CKleenean.CKleenean
+ AERN2.Real.Type: instance Numeric.MixedTypes.Literals.ConvertibleExactly (AERN2.MP.WithCurrentPrec.Type.WithAnyPrec (Numeric.CollectErrors.Type.CN AERN2.MP.Ball.Type.MPBall)) AERN2.Real.Type.CReal
- AERN2.Real: class (IsBool (SelectType k)) => CanSelect k where {
+ AERN2.Real: class IsBool SelectType k => CanSelect k where {
- AERN2.Real.CKleenean: class (IsBool (SelectType k)) => CanSelect k where {
+ AERN2.Real.CKleenean: class IsBool SelectType k => CanSelect k where {

Files

README.md view
@@ -46,7 +46,6 @@ A sequence is allowed not to converge, but only if all its elements contain the same error.   Such a sequence can be thought of as converging to this error. - ## 2. Usage with Prelude  First, let us load the package with **Prelude** operations:@@ -214,7 +213,7 @@ ...> bad1 ? (prec 100) {{ERROR: out of domain: negative sqrt argument}} ```- + and sometimes an error cannot be determined with certainty:  ```Text
aern2-real.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 9e106106d0bd593449a861fdba5c8ce5eb3de6bab0d62934c6a6bbb41d51783a+-- hash: a941e85f57a40b5cf3c43916267832d6e3d3d06355ebdf3245776b4d564ec0cf  name:           aern2-real-version:        0.2.4.3+version:        0.2.5.0 synopsis:       Real numbers as sequences of MPBalls description:    Please see the README on GitHub at <https://github.com/michalkonecny/aern2/#readme> category:       Math@@ -61,7 +61,7 @@   ghc-options: -Wall   build-depends:       QuickCheck-    , aern2-mp >=0.2.4+    , aern2-mp >=0.2.5     , base ==4.*     , collect-errors >=0.1.5     , hspec@@ -93,7 +93,7 @@   ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall   build-depends:       QuickCheck-    , aern2-mp >=0.2.4+    , aern2-mp >=0.2.5     , aern2-real     , base ==4.*     , collect-errors >=0.1.5
changelog.md view
@@ -1,5 +1,7 @@ # Change log for aern2-real +* v 0.2.5 2021-05-27+  * CanSelect moved to aern2-mp * v 0.2.4 2021-05-26   * overhaul README and examples   * stop "very inaccurate" errors breaking ? (bits n) queries@@ -28,4 +30,3 @@   * arrow-based networks of nodes communicating via query-answer protocols   * networks executable with cached and parallel strategies   * network execution can be visualised in browser using an Elm frontend-
src/AERN2/Real/CKleenean.hs view
@@ -26,6 +26,8 @@  import qualified Data.List as List +import AERN2.Select+ import AERN2.MP  import AERN2.Real.Type@@ -51,16 +53,6 @@   and2 = lift2 and2   or2 = lift2 or2 --- select:--class (IsBool (SelectType k)) => CanSelect k where-  {-| Must be Bool or similar -}-  type SelectType k -  {-|-    Execute two lazy computations "in parallel" until one of them succeeds. -  -}-  select :: k -> k -> (SelectType k) {-^ True means that the first computation succeeded. -}- instance CanSelect CKleenean where   type SelectType CKleenean = Bool   select (CSequence s1) (CSequence s2) = aux s1 s2@@ -72,25 +64,6 @@         (Right CertainFalse, Right CertainFalse) -> error "select: Both branches failed!"         _ -> aux rest1 rest2     aux _ _ = error "select: internal error"--instance CanSelect Kleenean where-  type SelectType Kleenean = CN Bool-  select CertainTrue _ = cn True-  select _ CertainTrue = cn False-  select CertainFalse CertainFalse =-    CN.noValueNumErrorPotential $ -      CN.NumError "select (Kleenean): Both branches failed!"-  select _ _ = -    CN.noValueNumErrorPotential $ -      CN.NumError "select (Kleenean): Insufficient information to determine selection."--instance CanSelect (CN Kleenean) where-  type SelectType (CN Kleenean) = CN Bool-  select cnk1 cnk2 =-    do-    k1 <- cnk1-    k2 <- cnk2-    select k1 k2  instance (CanUnionCNSameType t) =>   HasIfThenElse CKleenean (CSequence t)