Ticket #5468: 0001-DeepSeq-Remove-dependancy-and-instances-for-array-and-containers.patch

File 0001-DeepSeq-Remove-dependancy-and-instances-for-array-and-containers.patch, 2.6 KB (added by hvr, 3 years ago)
  • Control/DeepSeq.hs

    From 5517aa4fc7b26d3c497579f8882f3b43cf4db771 Mon Sep 17 00:00:00 2001
    From: Herbert Valerio Riedel <[email protected]>
    Date: Wed, 7 Sep 2011 09:40:51 +0200
    Subject: [PATCH 1/2] Remove dependancy and instances for array and container package
    
    See #5468 for more information about the rationale of this change.
    
    Note: This also bumps the package version from `1.1.1.0` to `1.3.0.0`,
    thus skipping the major version `1.2` on purpose in order to allow for
    an interim release to implement changes such as adding additional
    `NFData` instances for `base` (see #5465 for instance).
    ---
     Control/DeepSeq.hs |   24 ------------------------
     deepseq.cabal      |    6 ++----
     2 files changed, 2 insertions(+), 28 deletions(-)
    
    diff --git a/Control/DeepSeq.hs b/Control/DeepSeq.hs
    index f394752..b6e6d52 100644
    a b import Data.Int 
    5050import Data.Word 
    5151import Data.Ratio 
    5252import Data.Complex 
    53 import Data.Map 
    54 import Data.Set 
    55 import Data.IntMap 
    56 import Data.IntSet 
    57 import Data.Tree 
    58 import Data.Array 
    5953import Data.Fixed 
    6054import Data.Version 
    6155 
    instance (NFData a, NFData b) => NFData (Either a b) where 
    154148    rnf (Left x)  = rnf x 
    155149    rnf (Right y) = rnf y 
    156150 
    157 instance (NFData k, NFData a) => NFData (Data.Map.Map k a) where 
    158     rnf = rnf . Data.Map.toList 
    159  
    160 instance NFData a => NFData (Data.Set.Set a) where 
    161     rnf = rnf . Data.Set.toList 
    162  
    163 instance NFData a => NFData (Data.Tree.Tree a) where 
    164     rnf (Data.Tree.Node r f) = rnf r `seq` rnf f 
    165  
    166 instance NFData a => NFData (Data.IntMap.IntMap a) where 
    167     rnf = rnf . Data.IntMap.toList 
    168  
    169 instance NFData Data.IntSet.IntSet where 
    170     rnf = rnf . Data.IntSet.toList 
    171  
    172151instance NFData Data.Version.Version where 
    173152    rnf (Data.Version.Version branch tags) = rnf branch `seq` rnf tags 
    174153 
    instance NFData a => NFData [a] where 
    176155    rnf [] = () 
    177156    rnf (x:xs) = rnf x `seq` rnf xs 
    178157 
    179 instance (Ix a, NFData a, NFData b) => NFData (Array a b) where 
    180     rnf x = rnf (bounds x, Data.Array.elems x) 
    181  
    182158instance (NFData a, NFData b) => NFData (a,b) where 
    183159  rnf (x,y) = rnf x `seq` rnf y 
    184160 
  • deepseq.cabal

    diff --git a/deepseq.cabal b/deepseq.cabal
    index 5db632e..34c5fc4 100644
    a b  
    11name:           deepseq 
    2 version:        1.1.1.0 
     2version:        1.3.0.0 
    33license:        BSD3 
    44license-file:   LICENSE 
    55maintainer:     [email protected] 
    source-repository head 
    2828 
    2929library { 
    3030  exposed-modules: Control.DeepSeq 
    31   build-depends: base       >= 3   && < 5,  
    32                  containers >= 0.1 && < 0.5, 
    33                  array      >= 0.1 && < 0.4 
     31  build-depends: base       >= 3   && < 5 
    3432  ghc-options: -Wall 
    3533}