numtype-tf 0.1.1 → 0.1.2
raw patch · 4 files changed
+33/−5 lines, 4 files
Files
- Numeric/NumType/TF.lhs +1/−0
- Numeric/NumType/TFTests.hs +8/−2
- changelog.md +20/−0
- numtype-tf.cabal +4/−3
Numeric/NumType/TF.lhs view
@@ -204,6 +204,7 @@ Adding anything to Zero gives "anything". > type instance Add Z n = n+> --type instance Add n Z = n -- Not accepted by GHC 7.8. When adding to a non-Zero number our strategy is to "transfer" type constructors from the first type to the second type until the first
Numeric/NumType/TFTests.hs view
@@ -17,6 +17,12 @@ "Unary function Integral equivalence" (f' (toNum x)) (toNum (f x)) +-- | 'unaryTest' with @Num a@ fixed to @Integer@. This is needed by+-- 'testIncrDecr'.+unaryTest' :: (NumType n, NumType n')+ => (n -> n') -> (Integer -> Integer) -> n -> Test+unaryTest' = unaryTest+ -- Compares a type level binary function with a value level binary function -- by converting 'NumType' to 'Integral'. This assumes that the 'toIntegral' -- function is solid.@@ -44,8 +50,8 @@ , t pos1 , t pos1 ] where- t x = TestList [ unaryTest incr (P.+ 1) x- , unaryTest decr (P.- 1) x+ t x = TestList [ unaryTest' incr (P.+ 1) x+ , unaryTest' decr (P.- 1) x ] -- Test negation.
+ changelog.md view
@@ -0,0 +1,20 @@+1.2 (2014-02)+-------------+GHC 7.8.1 compatibility fix.++* Remove an overlapping `Add n Z` instance.++I don't expect this to break any existing code but am updating+the major version number just in case.+++1.1 (2013-07)+---------------+* Typeable NumTypes.+++1.0 (2012-01)+-------------+See the [announcement][1].++[1]: http://flygdynamikern.blogspot.se/2012/01/type-level-integers-with-type-families.html
numtype-tf.cabal view
@@ -1,10 +1,10 @@ Name: numtype-tf-Version: 0.1.1+Version: 0.1.2 License: BSD3 License-File: LICENSE-Copyright: Bjorn Buckwalter 2012+Copyright: Bjorn Buckwalter 2012-2014 Author: Bjorn Buckwalter-Maintainer: bjorn.buckwalter@gmail.com+Maintainer: bjorn@buckwalter.se Stability: experimental Homepage: http://dimensional.googlecode.com/ Synopsis: Type-level (low cardinality) integers, implemented@@ -31,4 +31,5 @@ Build-Depends: base < 5 Exposed-Modules: Numeric.NumType.TF Extra-source-files: README,+ changelog.md Numeric/NumType/TFTests.hs