packages feed

ad 1.0.2 → 1.0.3

raw patch · 2 files changed

+9/−5 lines, 2 files

Files

Numeric/AD/Internal/Classes.hs view
@@ -44,7 +44,7 @@     osi = id  class Lifted t where-    showsPrec1          :: Show a => Int -> t a -> ShowS+    showsPrec1          :: Num a => Int -> t a -> ShowS     (==!)               :: (Num a, Eq a) => t a -> t a -> Bool     compare1            :: (Num a, Ord a) => t a -> t a -> Ordering     fromInteger1        :: Num a => Integer -> t a@@ -190,7 +190,7 @@         compare1      = compare `on` primal         maxBound1     = lift maxBound         minBound1     = lift minBound-        showsPrec1    = showsPrec+        showsPrec1 d  = showsPrec d . primal          fromInteger1  = lift . fromInteger         (+!)          = (<+>) -- binary (+) one one         (-!)          = binary (-) one negOne -- TODO: <-> ? as it is, this might be pretty bad for Tower@@ -284,8 +284,8 @@ deriveNumeric f t = do     members <- liftedMembers     let keep n = nameBase n `elem` members-    xs <- lowerInstance keep ((classP ''Num [varA]:) . f) t `mapM` [''Enum, ''Eq, ''Ord, ''Bounded]-    ys <- lowerInstance keep f                            t `mapM` [''Show, ''Num, ''Fractional, ''Floating, ''RealFloat,''RealFrac, ''Real]+    xs <- lowerInstance keep ((classP ''Num [varA]:) . f) t `mapM` [''Enum, ''Eq, ''Ord, ''Bounded, ''Show]+    ys <- lowerInstance keep f                            t `mapM` [''Num, ''Fractional, ''Floating, ''RealFloat,''RealFrac, ''Real]     return (xs ++ ys)  lowerInstance :: (Name -> Bool) -> ([Q Pred] -> [Q Pred]) -> Q Type -> Name -> Q Dec
ad.cabal view
@@ -1,5 +1,5 @@ name:         ad-version:      1.0.2+version:      1.0.3 license:      BSD3 license-File: LICENSE copyright:    (c) Edward Kmett 2010-2011,@@ -60,6 +60,10 @@     .     * @0@ means that the resulting derivative list is padded with 0s at the end.     .+    Changes since 1.0.0+    .+    * Changed the way 'Show' was derived to comply with changes in instance resolution in ghc >= 7.0 && <= 7.1+    .      Changes since 0.45.0     .     * Converted 'Stream' to use the external 'comonad' package