diff options
author | jim@bo <jim@bo> | 2018-06-23 02:51:56 -0400 |
---|---|---|
committer | jim@bo <jim@bo> | 2018-06-23 05:56:39 -0400 |
commit | 8f541d5e4f81ad7766986c48e4296e4d4ec5788b (patch) | |
tree | c41657c1326771b17c8cd4968f56e83e6d765c43 /src/Data | |
parent | 5c42256bb4bbd97b6d179e992eb762625a8dc2b4 (diff) |
OutGoing hooks so SessionView is updated etc
Diffstat (limited to 'src/Data')
-rw-r--r-- | src/Data/Word64RangeMap.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Data/Word64RangeMap.hs b/src/Data/Word64RangeMap.hs index f4736d59..2e4cc8b7 100644 --- a/src/Data/Word64RangeMap.hs +++ b/src/Data/Word64RangeMap.hs | |||
@@ -20,14 +20,14 @@ import Data.IORef | |||
20 | 20 | ||
21 | type OuterIndex = Int | 21 | type OuterIndex = Int |
22 | type Index = Word64 | 22 | type Index = Word64 |
23 | type InnerArray b = UArray Index b | 23 | type InnerArray b = Array Index b |
24 | 24 | ||
25 | -- | Although this type includes a parameter for index, the code assumes bounds start at 0 | 25 | -- | Although this type includes a parameter for index, the code assumes bounds start at 0 |
26 | -- and the index has 'Integral', and 'Num' instances. | 26 | -- and the index has 'Integral', and 'Num' instances. |
27 | newtype RefArray r ma i e = RefArray (r (ma i e)) | 27 | newtype RefArray r ma i e = RefArray (r (ma i e)) |
28 | 28 | ||
29 | -- convenient contraint kind | 29 | -- convenient contraint kind |
30 | type RangeArray rangeArray m b ref = (IArray UArray b, MArray rangeArray (InnerArray b) m, Reference ref m) | 30 | type RangeArray rangeArray m b ref = (MArray rangeArray (InnerArray b) m, Reference ref m) |
31 | -- The RangeMap type, to be used with the above constraint | 31 | -- The RangeMap type, to be used with the above constraint |
32 | type RangeMap rangeArray b ref = RefArray ref rangeArray OuterIndex (InnerArray b) | 32 | type RangeMap rangeArray b ref = RefArray ref rangeArray OuterIndex (InnerArray b) |
33 | 33 | ||
@@ -64,7 +64,7 @@ instance (Reference r m, MArray ma e m) => MArray (RefArray r ma) e m where | |||
64 | unsafeWrite (RefArray r) i e = modifyRef r (\x -> Base.unsafeWrite x i e >> return (x,())) | 64 | unsafeWrite (RefArray r) i e = modifyRef r (\x -> Base.unsafeWrite x i e >> return (x,())) |
65 | -} | 65 | -} |
66 | 66 | ||
67 | emptySTMRangeMap :: STM (RangeMap TArray Word8 TVar) | 67 | emptySTMRangeMap :: STM (RangeMap TArray a TVar) |
68 | emptySTMRangeMap = RefArray <$> | 68 | emptySTMRangeMap = RefArray <$> |
69 | (newTVar =<< | 69 | (newTVar =<< |
70 | newListArray (0,-1) []) | 70 | newListArray (0,-1) []) |