mirror of
https://github.com/barrucadu/dejafu.git
synced 2024-10-06 02:37:44 +03:00
Remove use of const
in dejafu (fix for GHC 9.0)
This commit is contained in:
parent
349767a7b6
commit
4c98a7f6b7
@ -7,6 +7,16 @@ standard Haskell versioning scheme.
|
|||||||
.. _PVP: https://pvp.haskell.org/
|
.. _PVP: https://pvp.haskell.org/
|
||||||
|
|
||||||
|
|
||||||
|
unreleased
|
||||||
|
----------
|
||||||
|
|
||||||
|
Fixed
|
||||||
|
~~~~~
|
||||||
|
|
||||||
|
* (:issue:`334`) Compilation error under GHC 9 due to use of
|
||||||
|
``const``.
|
||||||
|
|
||||||
|
|
||||||
2.4.0.1 (2020-12-28)
|
2.4.0.1 (2020-12-28)
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
-- |
|
-- |
|
||||||
-- Module : Test.DejaFu.Conc.Internal
|
-- Module : Test.DejaFu.Conc.Internal
|
||||||
-- Copyright : (c) 2016--2020 Michael Walker
|
-- Copyright : (c) 2016--2021 Michael Walker
|
||||||
-- License : MIT
|
-- License : MIT
|
||||||
-- Maintainer : Michael Walker <mike@barrucadu.co.uk>
|
-- Maintainer : Michael Walker <mike@barrucadu.co.uk>
|
||||||
-- Stability : experimental
|
-- Stability : experimental
|
||||||
@ -81,7 +81,7 @@ runConcurrency invariants forSnapshot sched memtype g idsrc caps ma = do
|
|||||||
, cCState = initialCState
|
, cCState = initialCState
|
||||||
}
|
}
|
||||||
(c, ref) <- runRefCont AStop (Just . Right) (runModelConc ma)
|
(c, ref) <- runRefCont AStop (Just . Right) (runModelConc ma)
|
||||||
let threads0 = launch' Unmasked initialThread (const c) (cThreads ctx)
|
let threads0 = launch' Unmasked initialThread (\_ -> c) (cThreads ctx)
|
||||||
threads <- case forkBoundThread of
|
threads <- case forkBoundThread of
|
||||||
Just fbt -> makeBound fbt initialThread threads0
|
Just fbt -> makeBound fbt initialThread threads0
|
||||||
Nothing -> pure threads0
|
Nothing -> pure threads0
|
||||||
@ -100,7 +100,7 @@ runConcurrencyWithSnapshot :: (MonadDejaFu n, HasCallStack)
|
|||||||
runConcurrencyWithSnapshot sched memtype ctx restore ma = do
|
runConcurrencyWithSnapshot sched memtype ctx restore ma = do
|
||||||
(c, ref) <- runRefCont AStop (Just . Right) (runModelConc ma)
|
(c, ref) <- runRefCont AStop (Just . Right) (runModelConc ma)
|
||||||
let threads0 = M.delete initialThread (cThreads ctx)
|
let threads0 = M.delete initialThread (cThreads ctx)
|
||||||
let threads1 = launch' Unmasked initialThread (const c) threads0
|
let threads1 = launch' Unmasked initialThread (\_ -> c) threads0
|
||||||
threads <- case forkBoundThread of
|
threads <- case forkBoundThread of
|
||||||
Just fbt -> do
|
Just fbt -> do
|
||||||
let boundThreads = M.filter (isJust . _bound) threads1
|
let boundThreads = M.filter (isJust . _bound) threads1
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
-- |
|
-- |
|
||||||
-- Module : Test.DejaFu.Conc.Internal.Program
|
-- Module : Test.DejaFu.Conc.Internal.Program
|
||||||
-- Copyright : (c) 2019 Michael Walker
|
-- Copyright : (c) 2019--2021 Michael Walker
|
||||||
-- License : MIT
|
-- License : MIT
|
||||||
-- Maintainer : Michael Walker <mike@barrucadu.co.uk>
|
-- Maintainer : Michael Walker <mike@barrucadu.co.uk>
|
||||||
-- Stability : experimental
|
-- Stability : experimental
|
||||||
@ -141,7 +141,7 @@ instance (pty ~ Basic, Monad n) => C.MonadConc (Program pty n) where
|
|||||||
|
|
||||||
getMaskingState = ModelConc (\c -> AGetMasking c)
|
getMaskingState = ModelConc (\c -> AGetMasking c)
|
||||||
|
|
||||||
unsafeUnmask ma = ModelConc (AMasking Unmasked (const ma))
|
unsafeUnmask ma = ModelConc (AMasking Unmasked (\_ -> ma))
|
||||||
|
|
||||||
-- ----------
|
-- ----------
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user