Ticket #4343: add_throwSTM.dpatch

File add_throwSTM.dpatch, 1.1 KB (added by basvandijk, 4 years ago)

Patch for stm

Line 
11 patch for repository http://darcs.haskell.org/packages/stm:
2
3Sun Sep 26 20:18:24 CEST 2010  Bas van Dijk <v.dijk.bas@gmail.com>
4  * Add throwSTM :: Exception e => e -> STM a
5
6New patches:
7
8[Add throwSTM :: Exception e => e -> STM a
9Bas van Dijk <v.dijk.bas@gmail.com>**20100926181824
10 Ignore-this: fba233747030912f882ef02b984f6b6a
11] {
12hunk ./Control/Monad/STM.hs 34
13        orElse,
14        check,
15 #endif
16+        throwSTM,
17         catchSTM
18   ) where
19 
20hunk ./Control/Sequential/STM.hs 7
21 
22 -- #hide
23 module Control.Sequential.STM (
24-       STM, atomically, catchSTM,
25+       STM, atomically, throwSTM, catchSTM,
26        TVar, newTVar, newTVarIO, readTVar, readTVarIO, writeTVar
27     ) where
28 
29hunk ./Control/Sequential/STM.hs 52
30        throw ex
31 #endif
32 
33+#ifdef BASE4
34+throwSTM :: Exception e => e -> STM a
35+#else
36+throwSTM :: Exception -> STM a
37+#endif
38+throwSTM = STM . const . throwIO
39+
40 #ifdef BASE4
41 catchSTM :: Exception e => STM a -> (e -> STM a) -> STM a
42 #else
43}
44
45Context:
46
47[TAG 2.1.2.2
48Simon Marlow <marlowsd@gmail.com>**20100715153144
49 Ignore-this: dd4843fc8b82f206ff61ae95968cddd6
50]
51Patch bundle hash:
524556cb3f77a8bb39c1db823f2de33752985a8521