Skip to content

Commit c4308ef

Browse files
authoredDec 13, 2021
Merge pull request #40 from expipiplus1/squash
2 parents f201e3e + 8031e14 commit c4308ef

21 files changed

+33
-164
lines changed
 

‎.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
matrix:
2121
os: [ubuntu-latest]
2222
cabal: [latest]
23-
ghc: ['8.6', '8.8', '8.10', '9.0']
23+
ghc: ['8.8', '8.10', '9.0', '9.2']
2424
fail-fast: false
2525

2626
steps:

‎LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2015 Joe Hermaszewski
1+
Copyright (c) 2015 Ellie Hermaszewska
22

33
Permission is hereby granted, free of charge, to any person obtaining
44
a copy of this software and associated documentation files (the

‎changelog.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## WIP
44

5+
## [0.12.5.1] - 2021-12-13
6+
- Correct author name
7+
- Squash warnings for newer GHCs
8+
59
## [0.12.5] - 2021-05-29
610
- Tweak test suite to fix #35
711

‎default.nix

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{ nixpkgsSrc ? builtins.fetchTarball {
22
url =
3-
"https://github.com/NixOS/nixpkgs/archive/540dccb2aeaffa9dc69bfdc41c55abd7ccc6baa3.tar.gz"; # nixos-unstable
4-
sha256 = "1j58m811w7xxjncf36hqcjqsfj979hkfcwx9wcrm3g3zbayavapg";
5-
}, pkgs ? import nixpkgsSrc { }, compiler ? null, extraOverrides ? _: _: { }
6-
, modifier ? x: x }:
3+
"https://github.com/NixOS/nixpkgs/archive/e675946ecde5606c505540de2024e2732bae4185.tar.gz"; # nixos-unstable
4+
sha256 = "1xnqhz0wxkgkwpwkal93k5rj72j39pvck542i9jyxh9bm25rc4j5";
5+
}, pkgs ? import nixpkgsSrc { }, compiler ? null }:
76

87
let
98
haskellPackages = if compiler == null then
@@ -14,8 +13,5 @@ let
1413
in haskellPackages.developPackage {
1514
name = "";
1615
root = pkgs.nix-gitignore.gitignoreSource [ ] ./.;
17-
overrides = with pkgs.haskell.lib;
18-
pkgs.lib.composeExtensions (_self: _super: { }) extraOverrides;
19-
inherit modifier;
16+
overrides = _self: _super: { };
2017
}
21-

‎exact-real.cabal

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
cabal-version: 1.24
22

3-
-- This file has been generated from package.yaml by hpack version 0.34.4.
3+
-- This file has been generated from package.yaml by hpack version 0.34.5.
44
--
55
-- see: https://github.com/sol/hpack
66

77
name: exact-real
8-
version: 0.12.5
8+
version: 0.12.5.1
99
synopsis: Exact real arithmetic
1010
description: A type to represent exact real numbers using fast binary Cauchy sequences.
1111
category: Math
1212
homepage: https://github.com/expipiplus1/exact-real#readme
1313
bug-reports: https://github.com/expipiplus1/exact-real/issues
14-
author: Joe Hermaszewski
15-
maintainer: Joe Hermaszewski <keep.it.real@monoid.al>
16-
copyright: 2020 Joe Hermaszewski
14+
author: Ellie Hermaszewska
15+
maintainer: Ellie Hermaszewska <keep.it.real@monoid.al>
16+
copyright: 2020 Ellie Hermaszewska
1717
license: MIT
1818
license-file: LICENSE
1919
build-type: Custom

‎package.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: exact-real
2-
version: "0.12.5"
2+
version: "0.12.5.1"
33
synopsis: Exact real arithmetic
44
description: A type to represent exact real numbers using fast binary Cauchy sequences.
55
category: Math
6-
author: Joe Hermaszewski
7-
maintainer: Joe Hermaszewski <keep.it.real@monoid.al>
8-
copyright: 2020 Joe Hermaszewski
6+
author: Ellie Hermaszewska
7+
maintainer: Ellie Hermaszewska <keep.it.real@monoid.al>
8+
copyright: 2020 Ellie Hermaszewska
99
github: expipiplus1/exact-real
1010
extra-source-files:
1111
- readme.md

‎readme.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ examples in this readme.
2626
0 :+ 0
2727
```
2828

29+
Or:
30+
31+
```haskell
32+
λ> let f :: a. Fractional a => (a, a); f = iterate (\(x0, x1) -> let x2 = 111 - (1130-3000/x0) / x1 in (x1, x2)) (11/2, 61/11) !! 100
33+
λ> f @Double
34+
(100.0,100.0)
35+
λ> f @(CReal 10)
36+
(6.0000,6.0000)
37+
λ> f @(CReal 50)
38+
(5.9999999879253263,5.9999999899377725)
39+
```
40+
2941
Implementation
3042
--------------
3143

@@ -73,8 +85,4 @@ Contributing
7385

7486
Contributions and bug reports are welcome!
7587

76-
Please feel free to contact me on GitHub or as "jophish" on freenode.
77-
78-
-Joe
79-
8088
[goldberg]: http://www.validlab.com/goldberg/paper.pdf "What Every Computer Scientist Should Know About Floating-Point Arithmetic"

‎src/Data/CReal/Internal.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ powerSeries q termsAtPrecision x = crMemoize
768768
p' = p + d
769769
p'' = p' + d
770770
m = atPrecision x p''
771-
xs = (%1) <$> iterate (\e -> m * e /^ p'') (bit p')
771+
xs = (% 1) <$> iterate (\e -> m * e /^ p'') (bit p')
772772
r = sum . take (t + 1) . fmap (round . (* fromInteger (bit d))) $ zipWith (*) q xs
773773
in r /^ (2 * d))
774774

‎stack-7.10.2.yaml

-7
This file was deleted.

‎stack-7.10.2.yaml.lock

-26
This file was deleted.

‎stack-7.10.3.yaml

-6
This file was deleted.

‎stack-7.10.3.yaml.lock

-26
This file was deleted.

‎stack-8.2.2.yaml

-5
This file was deleted.

‎stack-8.2.2.yaml.lock

-19
This file was deleted.

‎stack-8.4.4.yaml

-5
This file was deleted.

‎stack-8.4.4.yaml.lock

-19
This file was deleted.

‎stack-8.6.5.yaml

-5
This file was deleted.

‎stack-8.6.5.yaml.lock

-19
This file was deleted.

‎test/Test.hs

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import Data.List (inits)
1313
import Data.Maybe (fromJust)
1414
import Data.Proxy
1515
import Data.Ratio ((%))
16-
import Data.Semigroup
1716
import GHC.TypeNats
1817
import Numeric.Natural
1918
import Test.Tasty (TestTree, defaultMain, testGroup)

‎test/Test/QuickCheck/Classes/Extra.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module Test.QuickCheck.Classes.Extra
1717
) where
1818

1919
import Data.Group (invert, Group, Abelian)
20-
import Data.Monoid ((<>), Sum(..), Product)
20+
import Data.Monoid (Sum(..), Product)
2121
import Test.QuickCheck.Extra (Arbitrary, (<=>), (==>))
2222
import Test.QuickCheck.Modifiers (NonZero)
2323
import Test.QuickCheck.Checkers (commutes, transitive, EqProp, (=-=), BinRel)

‎test/Test/QuickCheck/Extra.hs

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ module Test.QuickCheck.Extra
1414

1515
import Test.QuickCheck
1616
import Test.QuickCheck.Checkers (EqProp)
17-
import Test.QuickCheck.Modifiers (NonZero(..), Positive(..))
1817
import System.Random (Random)
1918

2019
deriving instance Num a => Num (NonZero a)

0 commit comments

Comments
 (0)
Please sign in to comment.