diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4dec9d4..cf53a8e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,14 +13,17 @@ jobs: strategy: matrix: os: [ubuntu-latest, macOS-latest, windows-latest] - cabal: ["3.2"] + cabal: ["3.4"] ghc: - "8.2.2" - "8.4.4" - "8.6.5" - "8.8.4" - - "8.10.3" + - "8.10.4" + - "9.0.1" exclude: + - os: macOS-latest + ghc: 8.10.4 - os: macOS-latest ghc: 8.8.4 - os: macOS-latest @@ -30,6 +33,8 @@ jobs: - os: macOS-latest ghc: 8.2.2 + - os: windows-latest + ghc: 8.10.4 - os: windows-latest ghc: 8.8.4 - os: windows-latest @@ -75,7 +80,7 @@ jobs: strategy: matrix: stack: ["2.5"] - ghc: ["8.10.3"] + ghc: ["8.10.4"] steps: - uses: actions/checkout@v2 diff --git a/CHANGELOG.md b/CHANGELOG.md index c9ff2b5..cca0f25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,9 @@ The changelog is available [on GitHub][2]. , relude ``` -* Upgrade to GHC-8.10.3, GHC-8.8.4. +* [#345](https://github.com/kowainik/relude/issues/345): + Support GHC-9.0. +* Upgrade to GHC-8.10.4, GHC-8.8.4. * Add `infinitely` as more strictly typed `forever`. * Remove `Eq` constraint on `universeNonEmpty` * Add `maybeAt`, `!!?` with its arguments flipped. @@ -41,12 +43,13 @@ The changelog is available [on GitHub][2]. module created that is exported in the main `Relude` module by default. __Migration guide:__ If you were using any of these functions you can now - remove `Relude.Extra.Enum` from your imports and explicit `mixins` section + remove `Relude.Extra.Enum` from your imports and explicit `mixins` section as they are available for you with the `Relude` module. * [#347](https://github.com/kowainik/relude/issues/347): Add `ordNubOn` function. * [#268](https://github.com/kowainik/relude/issues/268): Drop support of GHC-8.0.2. +* Add lifted `readFile'` function. ## 0.7.0.0 — May 14, 2020 diff --git a/relude.cabal b/relude.cabal index ebe385d..cdf7206 100644 --- a/relude.cabal +++ b/relude.cabal @@ -95,7 +95,8 @@ tested-with: GHC == 8.2.2 GHC == 8.4.4 GHC == 8.6.5 GHC == 8.8.4 - GHC == 8.10.3 + GHC == 8.10.4 + GHC == 9.0.1 source-repository head @@ -103,7 +104,7 @@ source-repository head location: git@github.com:kowainik/relude.git common common-options - build-depends: base >= 4.10 && < 4.15 + build-depends: base >= 4.10 && < 4.16 ghc-options: -Wall -Wcompat @@ -223,7 +224,7 @@ library build-depends: bytestring >= 0.10 && < 0.12 , containers >= 0.5.7 && < 0.7 , deepseq ^>= 1.4 - , ghc-prim >= 0.4.0.0 && < 0.7 + , ghc-prim >= 0.4.0.0 && < 0.8 , hashable >= 1.2 && < 1.4 , mtl ^>= 2.2 , stm >= 2.4 && < 2.6 diff --git a/src/Relude/Lifted/File.hs b/src/Relude/Lifted/File.hs index 46956a3..292259c 100644 --- a/src/Relude/Lifted/File.hs +++ b/src/Relude/Lifted/File.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE Safe #-} {- | @@ -14,6 +15,9 @@ Lifted versions of functions working with files and common IO. module Relude.Lifted.File ( readFile +#if ( __GLASGOW_HASKELL__ >= 900 ) + , readFile' +#endif , writeFile , appendFile ) where @@ -32,6 +36,17 @@ readFile = liftIO . IO.readFile {-# SPECIALIZE readFile :: FilePath -> IO String #-} {-# INLINE readFile #-} +#if ( __GLASGOW_HASKELL__ >= 900 ) +{- | Lifted version of 'IO.readFile''. Strict version of 'readFile'. + +@since x.x.x.x +-} +readFile' :: MonadIO m => FilePath -> m String +readFile' = liftIO . IO.readFile' +{-# SPECIALIZE readFile' :: FilePath -> IO String #-} +{-# INLINE readFile' #-} +#endif + -- | Lifted version of 'IO.writeFile'. writeFile :: MonadIO m => FilePath -> String -> m () writeFile p= liftIO . IO.writeFile p diff --git a/stack.yaml b/stack.yaml index ab7f113..fd834e1 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1 +1 @@ -resolver: lts-17.0 +resolver: lts-17.5