Skip to content

Commit

Permalink
[#345] Support GHC-9.0
Browse files Browse the repository at this point in the history
Resolves #345
  • Loading branch information
vrom911 committed Mar 12, 2021
1 parent 173c23e commit 9d916f6
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 9 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -75,7 +80,7 @@ jobs:
strategy:
matrix:
stack: ["2.5"]
ghc: ["8.10.3"]
ghc: ["8.10.4"]

steps:
- uses: actions/checkout@v2
Expand Down
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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

Expand Down
7 changes: 4 additions & 3 deletions relude.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,16 @@ 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
type: git
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
Expand Down Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions src/Relude/Lifted/File.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE Safe #-}

{- |
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
resolver: lts-17.0
resolver: lts-17.5

0 comments on commit 9d916f6

Please sign in to comment.