mirror of
https://github.com/aelve/guide.git
synced 2024-11-23 04:07:14 +03:00
Migrate to newer versions
This commit is contained in:
parent
519211ac2e
commit
e810f1997d
@ -42,7 +42,7 @@ executable guide
|
||||
-- other-extensions:
|
||||
build-depends: MonadRandom == 0.4.*
|
||||
, Spock
|
||||
, Spock-lucid == 0.2.*
|
||||
, Spock-lucid == 0.3.*
|
||||
, acid-state == 0.14.*
|
||||
, aeson == 0.11.*
|
||||
, aeson-pretty == 0.7.*
|
||||
@ -65,7 +65,6 @@ executable guide
|
||||
, http-types
|
||||
, ilist
|
||||
, iproute == 1.7.*
|
||||
, list-t
|
||||
, lucid >= 2.9.5 && < 3
|
||||
, megaparsec == 4.4.*
|
||||
, microlens-platform >= 0.3.2
|
||||
@ -79,7 +78,7 @@ executable guide
|
||||
, safecopy
|
||||
, shortcut-links >= 0.4.2
|
||||
, split
|
||||
, stm-containers == 0.2.10.*
|
||||
, stm-containers >= 0.2.14 && < 0.3
|
||||
, template-haskell
|
||||
, text-all == 0.3.*
|
||||
, time >= 1.5
|
||||
|
@ -26,7 +26,6 @@ import qualified Data.ByteString.Lazy as BSL
|
||||
-- Concurrent map
|
||||
import qualified STMContainers.Map as STMMap
|
||||
import Data.Hashable
|
||||
import qualified ListT
|
||||
-- Lucid
|
||||
import Lucid.Base
|
||||
|
||||
@ -110,11 +109,8 @@ invalidateCache gs key = liftIO $ atomically $ do
|
||||
for_ (cacheDepends gs key) $ \k ->
|
||||
STMMap.delete k cache
|
||||
|
||||
-- TODO: Should be easier once
|
||||
-- https://github.com/nikita-volkov/stm-containers/issues/6 is closed.
|
||||
emptyCache :: MonadIO m => m ()
|
||||
emptyCache = liftIO $ atomically $
|
||||
ListT.traverse_ (\(k,_) -> STMMap.delete k cache) (STMMap.stream cache)
|
||||
emptyCache = liftIO $ atomically $ STMMap.deleteAll cache
|
||||
|
||||
cached :: MonadIO m => CacheKey -> HtmlT m () -> HtmlT m ()
|
||||
cached key gen = do
|
||||
|
Loading…
Reference in New Issue
Block a user