summaryrefslogtreecommitdiff
path: root/src/Data/Word64RangeMap.hs
diff options
context:
space:
mode:
authorjim@bo <jim@bo>2018-06-23 02:51:56 -0400
committerjim@bo <jim@bo>2018-06-23 05:56:39 -0400
commit8f541d5e4f81ad7766986c48e4296e4d4ec5788b (patch)
treec41657c1326771b17c8cd4968f56e83e6d765c43 /src/Data/Word64RangeMap.hs
parent5c42256bb4bbd97b6d179e992eb762625a8dc2b4 (diff)
OutGoing hooks so SessionView is updated etc
Diffstat (limited to 'src/Data/Word64RangeMap.hs')
-rw-r--r--src/Data/Word64RangeMap.hs6
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
21type OuterIndex = Int 21type OuterIndex = Int
22type Index = Word64 22type Index = Word64
23type InnerArray b = UArray Index b 23type 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.
27newtype RefArray r ma i e = RefArray (r (ma i e)) 27newtype RefArray r ma i e = RefArray (r (ma i e))
28 28
29-- convenient contraint kind 29-- convenient contraint kind
30type RangeArray rangeArray m b ref = (IArray UArray b, MArray rangeArray (InnerArray b) m, Reference ref m) 30type 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
32type RangeMap rangeArray b ref = RefArray ref rangeArray OuterIndex (InnerArray b) 32type 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
67emptySTMRangeMap :: STM (RangeMap TArray Word8 TVar) 67emptySTMRangeMap :: STM (RangeMap TArray a TVar)
68emptySTMRangeMap = RefArray <$> 68emptySTMRangeMap = RefArray <$>
69 (newTVar =<< 69 (newTVar =<<
70 newListArray (0,-1) []) 70 newListArray (0,-1) [])