on master help sign in
remove mfSequence
commitdcb01042cd7cab8224e04fec19094b533c000d0b authorHarendra Kumar <harendra.kumar@gmail.com> dateSat 10 Jun 2017, 16:45 (9 years ago) parent70c2917
1 file changed−18
src/Duct/Event.hs−18
src/Duct/Event.hs−18
@@ -43,8 +43,6 @@ data Context = forall m a b. Context
4343 -- XXX All of the following can be removed
4444 -- Even the remote status can be removed by the same logic
4545
46− , mfSequence :: Int
47−
4846 , parentChannel :: Maybe (TChan ThreadId)
4947 -- ^ Our parent thread's channel to communicate to when we die
5048
@@ -98,7 +96,6 @@ initContext x childChan pending credit =
9896 , currentm = x
9997 , fstack = []
10098 , mfData = mempty
101− , mfSequence = 0
10299 , parentChannel = Nothing
103100 , childChannel = childChan
104101 , pendingThreads = pending
@@ -137,18 +134,3 @@ modifyData f = modify $ \st -> st { mfData = M.alter alterf t (mfData st) }
137134
138135delData :: (MonadState Context m, Typeable a) => a -> m ()
139136delData x = modify $ \st -> st { mfData = M.delete (typeOf x) (mfData st) }
140−
141−{-
142−getPrevId :: MonadState EventF m => m Int
143−getPrevId = gets mfSequence
144−
145−-- | Generator of identifiers that are unique within the current monadic
146−-- sequence They are not unique in the whole program.
147−genId :: MonadState EventF m => m Int
148−genId = do
149− st <- get
150− let n = mfSequence st
151− put st { mfSequence = n + 1 }
152− return n
153−
154−-}