diff --git a/Data/SBV/BitVectors/AlgReals.hs b/Data/SBV/BitVectors/AlgReals.hs index a89d3cb20..aaf2bcbe8 100644 --- a/Data/SBV/BitVectors/AlgReals.hs +++ b/Data/SBV/BitVectors/AlgReals.hs @@ -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' diff --git a/RELEASENOTES b/RELEASENOTES index 372cf8bed..cbc75a062 100644 --- a/RELEASENOTES +++ b/RELEASENOTES @@ -1,7 +1,11 @@ Hackage: GitHub: -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 diff --git a/SBVUnitTest/SBVUnitTestBuildTime.hs b/SBVUnitTest/SBVUnitTestBuildTime.hs index 519c42211..ed3af2a5e 100644 --- a/SBVUnitTest/SBVUnitTestBuildTime.hs +++ b/SBVUnitTest/SBVUnitTestBuildTime.hs @@ -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" diff --git a/sbv.cabal b/sbv.cabal index a11bd0de9..17ea88643 100644 --- a/sbv.cabal +++ b/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