packages feed

data-dword 0.3.1.2 → 0.3.1.3

raw patch · 3 files changed

+32/−25 lines, 3 filesdep ~template-haskellPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

Dependency ranges changed: template-haskell

API changes (from Hackage documentation)

+ Data.DoubleWord: -- | The high half type

Files

LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2011-2018 Mikhail Vorozhtsov+Copyright (c) 2011-2019 Mikhail Vorozhtsov All rights reserved.  Redistribution and use in source and binary forms, with or without 
data-dword.cabal view
@@ -1,5 +1,5 @@ Name: data-dword-Version: 0.3.1.2+Version: 0.3.1.3 Category: Data Stability: experimental Synopsis: Stick two binary words together to get a bigger one@@ -13,14 +13,15 @@  Author: Mikhail Vorozhtsov <mikhail.vorozhtsov@gmail.com> Maintainer: Mikhail Vorozhtsov <mikhail.vorozhtsov@gmail.com>-Copyright: 2011-2018 Mikhail Vorozhtsov <mikhail.vorozhtsov@gmail.com>+Copyright: 2011-2019 Mikhail Vorozhtsov <mikhail.vorozhtsov@gmail.com> License: BSD3 License-File: LICENSE  Extra-Source-Files:   README.md -Tested-With: GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.1, GHC==8.2.1+Tested-With: GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2,+             GHC==8.4.4, GHC==8.6.5, GHC==8.8.1  Cabal-Version: >= 1.10.0 Build-Type: Simple
src/Data/DoubleWord/TH.hs view
@@ -21,7 +21,9 @@ #else import Data.Hashable (Hashable(..), combine) #endif+#if !MIN_VERSION_base(4,12,0) import Control.Applicative ((<$>), (<*>))+#endif import Language.Haskell.TH hiding (unpacked, match) import Data.BinaryWord (BinaryWord(..)) import Data.DoubleWord.Base@@ -1379,7 +1381,9 @@     lo'  = mkName "lo'"     tpT  = ConT tp     tySynInst n ps t =-#if MIN_VERSION_template_haskell(2,9,0)+#if MIN_VERSION_template_haskell(2,15,0)+      TySynInstD (TySynEqn Nothing (foldl AppT (ConT n) ps) t)+#elif MIN_VERSION_template_haskell(2,9,0)       TySynInstD n (TySynEqn ps t) #else       TySynInstD n ps t@@ -1447,12 +1451,18 @@     sizeE   = appV 'bitSize [SigE (VarE 'undefined) tpT] #endif     singE e = appC '(:) [e, ConE '[]]+    ruleP name lhs rhs phases =+      RuleP name+#if MIN_VERSION_template_haskell(2,15,0)+            Nothing+#endif+            [] lhs rhs phases     mkRules = do-      let idRule = RuleP ("fromIntegral/" ++ show tp ++ "->" ++ show tp) []+      let idRule = ruleP ("fromIntegral/" ++ show tp ++ "->" ++ show tp)                          (VarE 'fromIntegral)                          (SigE (VarE 'id) (AppT (AppT ArrowT tpT) tpT))                          AllPhases-          signRule = RuleP ("fromIntegral/" ++ show tp ++ "->" ++ show otp) []+          signRule = ruleP ("fromIntegral/" ++ show tp ++ "->" ++ show otp)                            (VarE 'fromIntegral)                            (SigE (VarE (if signed then 'unsignedWord                                                   else 'signedWord))@@ -1463,32 +1473,30 @@                (VarE 'extendLo)                (VarE 'signExtendLo)     mkRules' rules t narrowE extE signExtE = do-      let narrowRule = RuleP ("fromIntegral/" ++ show tp ++ "->" ++ showT t)-                             []+      let narrowRule = ruleP ("fromIntegral/" ++ show tp ++ "->" ++ showT t)                              (VarE 'fromIntegral)                              (SigE narrowE (AppT (AppT ArrowT tpT) t))                              AllPhases-          extRule = RuleP ("fromIntegral/" ++ showT t ++ "->" ++ show tp)-                          []+          extRule = ruleP ("fromIntegral/" ++ showT t ++ "->" ++ show tp)                           (VarE 'fromIntegral)                           (SigE extE (AppT (AppT ArrowT t) tpT))                           AllPhases       signedRules ← do         insts ← reifyInstances ''SignedWord [t]         case insts of-#if MIN_VERSION_template_haskell(2,9,0)+#if MIN_VERSION_template_haskell(2,15,0)+          [TySynInstD (TySynEqn _ _ signT)] → return $+#elif MIN_VERSION_template_haskell(2,9,0)           [TySynInstD _ (TySynEqn _ signT)] → return $ #else           [TySynInstD _ _ signT] → return $ #endif-            [ RuleP ("fromIntegral/" ++ show tp ++ "->" ++ showT signT)-                    []+            [ ruleP ("fromIntegral/" ++ show tp ++ "->" ++ showT signT)                     (VarE 'fromIntegral)                     (SigE (AppE (appVN '(.) ['signedWord]) narrowE)                           (AppT (AppT ArrowT tpT) signT))                     AllPhases-            , RuleP ("fromIntegral/" ++ showT signT ++ "->" ++ show tp)-                    []+            , ruleP ("fromIntegral/" ++ showT signT ++ "->" ++ show tp)                     (VarE 'fromIntegral)                     (SigE signExtE (AppT (AppT ArrowT signT) tpT))                     AllPhases ]@@ -1499,30 +1507,26 @@           let smallRules = ts >>= \(uSmallName, sSmallName) →                 let uSmallT = ConT uSmallName                     sSmallT = ConT sSmallName in-                [ RuleP ("fromIntegral/" +++                [ ruleP ("fromIntegral/" ++                          show tp ++ "->" ++ show uSmallName)-                        []                         (VarE 'fromIntegral)                         (SigE (appV '(.) [VarE 'fromIntegral, narrowE])                               (AppT (AppT ArrowT tpT) uSmallT))                         AllPhases-                , RuleP ("fromIntegral/" +++                , ruleP ("fromIntegral/" ++                          show uSmallName ++ "->" ++ show tp)-                        []                         (VarE 'fromIntegral)                         (SigE (appV '(.) [extE, VarE 'fromIntegral])                               (AppT (AppT ArrowT uSmallT) tpT))                         AllPhases-                , RuleP ("fromIntegral/" +++                , ruleP ("fromIntegral/" ++                          show tp ++ "->" ++ show sSmallName)-                        []                         (VarE 'fromIntegral)                         (SigE (appV '(.) [VarE 'fromIntegral, narrowE])                               (AppT (AppT ArrowT tpT) sSmallT))                         AllPhases-                , RuleP ("fromIntegral/" +++                , ruleP ("fromIntegral/" ++                          show sSmallName ++ "->" ++ show tp)-                        []                         (VarE 'fromIntegral)                         (SigE (appV '(.) [signExtE, VarE 'fromIntegral])                               (AppT (AppT ArrowT sSmallT) tpT))@@ -1532,7 +1536,9 @@         _ → do           insts ← reifyInstances ''LoWord [t]           case insts of-#if MIN_VERSION_template_haskell(2,9,0)+#if MIN_VERSION_template_haskell(2,15,0)+            [TySynInstD (TySynEqn _ _ t')] →+#elif MIN_VERSION_template_haskell(2,9,0)             [TySynInstD _ (TySynEqn _ t')] → #else             [TySynInstD _ _ t'] →