Skip to content

Commit

Permalink
Add forgotten Real instance for AlgReal, and bump up version.
Browse files Browse the repository at this point in the history
  • Loading branch information
LeventErkok committed Oct 19, 2012
1 parent 7a8c6f7 commit e13d6dc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Data/SBV/BitVectors/AlgReals.hs
Expand Up @@ -128,6 +128,10 @@ instance Fractional AlgReal where
(/) = lift2 "/" (/)
fromRational = AlgRational True

instance Real AlgReal where
toRational (AlgRational True v) = v
toRational x = error $ "AlgReal.toRational: Argument cannot be represented as a rational value: " ++ algRealToHaskell x

instance Random Rational where
random g = let (a, g') = random g
(b, g'') = random g'
Expand Down
6 changes: 5 additions & 1 deletion RELEASENOTES
@@ -1,7 +1,11 @@
Hackage: <http://hackage.haskell.org/package/sbv>
GitHub: <http://github.com/LeventErkok/sbv>

Latest Hackage released version: 2.4
Latest Hackage released version: 2.5

======================================================================
Version 2.5, 2012-10-20
- Add forgotten Real class instance for the type 'AlgReal'

======================================================================
Version 2.4, 2012-10-19
Expand Down
2 changes: 1 addition & 1 deletion SBVUnitTest/SBVUnitTestBuildTime.hs
Expand Up @@ -2,4 +2,4 @@
module SBVUnitTestBuildTime (buildTime) where

buildTime :: String
buildTime = "Thu Oct 18 20:24:21 PDT 2012"
buildTime = "Thu Oct 18 21:34:22 PDT 2012"
2 changes: 1 addition & 1 deletion sbv.cabal
@@ -1,5 +1,5 @@
Name: sbv
Version: 2.4
Version: 2.5
Category: Formal Methods, Theorem Provers, Bit vectors, Symbolic Computation, Math, SMT
Synopsis: SMT Based Verification: Symbolic Haskell theorem prover using SMT solving.
Description: Express properties about Haskell programs and automatically prove them using SMT
Expand Down

0 comments on commit e13d6dc

Please sign in to comment.