Skip to content

Commit

Permalink
Modernize GHC options
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkkrp committed Jun 26, 2023
1 parent 4c912a9 commit 700cffc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Path/IO.hs
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ listDirRecurRel dir =
-- traversing symlinked directories, but recreating symlinks in the target
-- directory according to their targets in the source directory.
copyDirRecur ::
(MonadIO m, MonadCatch m) =>
(MonadIO m) =>
-- | Source
Path b0 Dir ->
-- | Destination
Expand All @@ -512,7 +512,7 @@ copyDirRecur = copyDirRecurGen True
-- traversing symlinked directories, but recreating symlinks in the target
-- directory according to their targets in the source directory.
copyDirRecur' ::
(MonadIO m, MonadCatch m) =>
(MonadIO m) =>
-- | Source
Path b0 Dir ->
-- | Destination
Expand Down
16 changes: 6 additions & 10 deletions path-io.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -42,34 +42,30 @@ library
unix-compat

if flag(dev)
ghc-options: -Wall -Werror
ghc-options:
-Wall -Werror -Wredundant-constraints -Wpartial-fields
-Wunused-packages

else
ghc-options: -O2 -Wall

if flag(dev)
ghc-options:
-Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns
-Wnoncanonical-monad-instances

test-suite tests
type: exitcode-stdio-1.0
main-is: Main.hs
hs-source-dirs: tests
default-language: GHC2021
build-depends:
base >=4.15 && <5.0,
directory >=1.3.2.0 && <1.4,
exceptions >=0.8 && <0.11,
hspec >=2.0 && <3.0,
filepath >=1.2 && <1.5,
path >=0.7.1 && <0.10,
path-io,
transformers >=0.3 && <0.7,
unix-compat

if flag(dev)
ghc-options: -Wall -Werror
ghc-options:
-Wall -Werror -Wredundant-constraints -Wpartial-fields
-Wunused-packages

else
ghc-options: -O2 -Wall
2 changes: 1 addition & 1 deletion tests/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ listDirRecurCyclicSpec =

-- | Follows symbolic links.
listDirRecurCyclic ::
(MonadIO m, MonadThrow m) =>
(MonadIO m) =>
-- | Directory to list
Path b Dir ->
-- | Sub-directories and files
Expand Down

0 comments on commit 700cffc

Please sign in to comment.