Ticket #3973: typeable_and_eq_instances_for_stm.dpatch

File typeable_and_eq_instances_for_stm.dpatch, 5.4 KB (added by basvandijk, 3 years ago)
Line 
14 patches for repository http://darcs.haskell.org/libraries/stm:
2
3Sat Apr 10 15:34:56 CEST 2010  Bas van Dijk <v.dijk.bas@gmail.com>
4  * Derived Eq and Typeable instances for TMVar
5
6Sat Apr 10 15:35:23 CEST 2010  Bas van Dijk <v.dijk.bas@gmail.com>
7  * Derived Typeable instance for TChan
8
9Sat Apr 10 15:36:30 CEST 2010  Bas van Dijk <v.dijk.bas@gmail.com>
10  * Derived Typeable instance for TArray
11
12Sat Apr 10 15:37:07 CEST 2010  Bas van Dijk <v.dijk.bas@gmail.com>
13  * Derived Eq instance for TArray
14
15New patches:
16
17[Derived Eq and Typeable instances for TMVar
18Bas van Dijk <v.dijk.bas@gmail.com>**20100410133456
19 Ignore-this: 87f0ed41668e96d523bfd6745d7ff406
20] {
21hunk ./Control/Concurrent/STM/TMVar.hs 1
22+{-# LANGUAGE DeriveDataTypeable #-}
23+
24 -----------------------------------------------------------------------------
25 -- |
26 -- Module      :  Control.Concurrent.STM.TMVar
27hunk ./Control/Concurrent/STM/TMVar.hs 39
28 #ifdef __GLASGOW_HASKELL__
29 import GHC.Conc
30 
31-newtype TMVar a = TMVar (TVar (Maybe a))
32+import Data.Typeable (Typeable)
33+
34+newtype TMVar a = TMVar (TVar (Maybe a)) deriving (Eq, Typeable)
35 {- ^
36 A 'TMVar' is a synchronising variable, used
37 for communication between concurrent threads.  It can be thought of
38}
39[Derived Typeable instance for TChan
40Bas van Dijk <v.dijk.bas@gmail.com>**20100410133523
41 Ignore-this: dc086ea4fc3afdc1c4d1d6c213628355
42] {
43hunk ./Control/Concurrent/STM/TChan.hs 2
44 {-# OPTIONS_GHC -fno-warn-name-shadowing #-}
45+{-# LANGUAGE DeriveDataTypeable #-}
46+
47 -----------------------------------------------------------------------------
48 -- |
49 -- Module      :  Control.Concurrent.STM.TChan
50hunk ./Control/Concurrent/STM/TChan.hs 36
51 #ifdef __GLASGOW_HASKELL__
52 import GHC.Conc
53 
54+import Data.Typeable (Typeable)
55+
56 -- | 'TChan' is an abstract type representing an unbounded FIFO channel.
57hunk ./Control/Concurrent/STM/TChan.hs 39
58-data TChan a = TChan (TVar (TVarList a)) (TVar (TVarList a))
59+data TChan a = TChan (TVar (TVarList a)) (TVar (TVarList a)) deriving Typeable
60 
61 type TVarList a = TVar (TList a)
62 data TList a = TNil | TCons a (TVarList a)
63}
64[Derived Typeable instance for TArray
65Bas van Dijk <v.dijk.bas@gmail.com>**20100410133630
66 Ignore-this: a2b39aaec2c9f96150e7214f60574427
67] {
68hunk ./Control/Concurrent/STM/TArray.hs 2
69 {-# OPTIONS -fglasgow-exts #-}
70+{-# LANGUAGE DeriveDataTypeable #-}
71+
72 -----------------------------------------------------------------------------
73 -- |
74 -- Module      :  Control.Concurrent.STM.TArray
75hunk ./Control/Concurrent/STM/TArray.hs 27
76 import Data.Array.Base (listArray, arrEleBottom, unsafeAt, MArray(..),
77                         IArray(numElements))
78 import Data.Ix (rangeSize)
79+import Data.Typeable (Typeable)
80 import Control.Concurrent.STM.TVar (TVar, newTVar, readTVar, writeTVar)
81 #ifdef __GLASGOW_HASKELL__
82 import GHC.Conc (STM)
83hunk ./Control/Concurrent/STM/TArray.hs 42
84 -- but it may be replaced by a more efficient implementation in the future
85 -- (the interface will remain the same, however).
86 --
87-newtype TArray i e = TArray (Array i (TVar e))
88+newtype TArray i e = TArray (Array i (TVar e)) deriving (Typeable)
89 
90 instance MArray TArray e STM where
91     getBounds (TArray a) = return (bounds a)
92}
93[Derived Eq instance for TArray
94Bas van Dijk <v.dijk.bas@gmail.com>**20100410133707
95 Ignore-this: a8c56552a7bce81bb65cc154fffdf12c
96] hunk ./Control/Concurrent/STM/TArray.hs 42
97 -- but it may be replaced by a more efficient implementation in the future
98 -- (the interface will remain the same, however).
99 --
100-newtype TArray i e = TArray (Array i (TVar e)) deriving (Typeable)
101+newtype TArray i e = TArray (Array i (TVar e)) deriving (Eq, Typeable)
102 
103 instance MArray TArray e STM where
104     getBounds (TArray a) = return (bounds a)
105
106Context:
107
108[rename these tests from conc* to stm*
109Simon Marlow <marlowsd@gmail.com>**20100330142623
110 Ignore-this: 61a8bd5a522fd4d3b9728ec9cd65a07
111]
112[suppress some warnings
113Simon Marlow <marlowsd@gmail.com>**20100330135643
114 Ignore-this: 8cfb32893256376c6774057a2ffd935a
115]
116[Update tests for GHC 6.12
117Simon Marlow <marlowsd@gmail.com>**20091014132627
118 Ignore-this: 63ae2f666a09717ff2479bc5fb61a4a2
119]
120[add test for #3049
121Simon Marlow <marlowsd@gmail.com>**20090624141507
122 Ignore-this: 433ff5240ca75661c9b58f3540d73961
123]
124[add readIORef to sequential implementation
125Ross Paterson <ross@soi.city.ac.uk>**20090116184642]
126[TAG stm 2.1.1.2
127Ian Lynagh <igloo@earth.li>**20081212151705]
128[Add a bit of strictness to avoid this test getting into a bad state
129Simon Marlow <marlowsd@gmail.com>**20081120124551]
130[Bump version number to 2.1.1.2
131Duncan Coutts <duncan@haskell.org>**20081022024341]
132[Make it build with base 3 and 4
133Duncan Coutts <duncan@haskell.org>**20081022024205
134 Uses exactly the same code as before for base 3. So no code changes.
135 For ghc-6.10 it is forced to always use base4 so there's no way to
136 build the package two different ways for a single ghc version.
137]
138[Use new-style cabal syntax
139Duncan Coutts <duncan@haskell.org>**20081022023352]
140[add readTVarIO :: TVar a -> IO a
141Simon Marlow <marlowsd@gmail.com>**20081010112731]
142[doc typo
143Simon Marlow <marlowsd@gmail.com>**20081003132415]
144[Fix this test (exception changes)
145Simon Marlow <marlowsd@gmail.com>**20081002094257]
146[follow Control.Exception changes
147Simon Marlow <marlowsd@gmail.com>**20080926235120]
148[add test for #2411
149Simon Marlow <marlowsd@gmail.com>**20080926233849]
150[TAG 6.10 branch has been forked
151Ian Lynagh <igloo@earth.li>**20080919123439]
152Patch bundle hash:
153b58e4b0563ef550e757576fbe47c72c373735ece