packages feed

salak 0.3.5.3 → 0.3.6

raw patch · 2 files changed

+12/−5 lines, 2 filesdep ~QuickCheckdep ~dlistdep ~hashable

Dependency ranges changed: QuickCheck, dlist, hashable, heaps, megaparsec, time, unliftio-core

Files

salak.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: a30d96cdc96bcc24bbb445150b6b13acead0ad726df1fab2d6ffa6f6f065f826+-- hash: f4e41d3d319929758bdec6b6e98dab0a80e8425760da0659ab8d1b56f45ecb58  name:           salak-version:        0.3.5.3+version:        0.3.6 synopsis:       Configuration (re)Loader and Parser. description:    This library defines a universal procedure to load configurations and parse properties, also supports reload configuration files. category:       Library, Configuration@@ -48,12 +48,12 @@     , filepath >=1.4.2 && <1.5     , hashable >=1.2.7.0 && <1.4     , heaps >=0.3.6 && <0.4-    , megaparsec >=7.0.5 && <7.1+    , megaparsec >=7.0.5 && <8.1     , mtl >=2.2.2 && <2.3     , scientific >=0.3.6 && <0.4     , text >=1.2.3 && <1.3     , time >=1.8.0 && <1.10-    , unliftio-core >=0.1.2 && <0.2+    , unliftio-core >=0.1.2 && <0.3     , unordered-containers >=0.2.10 && <0.3   default-language: Haskell2010 
src/Salak/Internal.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE CPP #-} -- | -- Module:      Salak.Internal -- Copyright:   2019 Daniel YU@@ -52,7 +53,6 @@ import           Control.Monad import           Control.Monad.Catch import           Control.Monad.Except-import qualified Control.Monad.IO.Unlift as IU import           Control.Monad.Reader import qualified Control.Monad.State     as MS import           Data.Char               (toLower)@@ -75,6 +75,9 @@ #if __GLASGOW_HASKELL__ < 808 import           Control.Monad.IO.Class  (MonadIO (..)) #endif+#if !MIN_VERSION_unliftio_core(0,2,0)+import qualified Control.Monad.IO.Unlift as IU+#endif  data UpdateSource = UpdateSource   {  ref    :: !(MVar Source)@@ -110,11 +113,13 @@     UpdateSource{..} <- MS.get     liftIO $ readMVar lfunc >>= \lf -> lf callStack msg +#if !MIN_VERSION_unliftio_core(0,2,0) instance (MonadThrow m, IU.MonadUnliftIO m) => IU.MonadUnliftIO (LoadSalakT m) where   {-# INLINE askUnliftIO #-}   askUnliftIO = do     ut <- MS.get     lift $ IU.withUnliftIO $ \u -> return (IU.UnliftIO (IU.unliftIO u . flip runLoad ut))+#endif  -- | Standard `MonadSalak` instance. newtype RunSalakT m a = RunSalakT { runSalakT :: ReaderT SourcePack m a }@@ -127,11 +132,13 @@   {-# INLINE askSourcePack #-}   askSourcePack = ask +#if !MIN_VERSION_unliftio_core(0,2,0) instance (MonadThrow m, IU.MonadUnliftIO m) => IU.MonadUnliftIO (RunSalakT m) where   {-# INLINE askUnliftIO #-}   askUnliftIO = do     ut <- ask     lift $ IU.withUnliftIO $ \u -> return (IU.UnliftIO (IU.unliftIO u . flip runReaderT ut . runSalakT))+#endif  -- | Basic loader loadTrie :: (MonadThrow m, MonadIO m) => Bool -> String -> (Int -> IO TraceSource) -> LoadSalakT m ()