Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions example/app/Main.hs
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
module Main where
module Main (main) where

import Network.FTP.Client
import qualified Network.FTP.Client.Conduit as FC
import Conduit
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as C
import Data.Monoid ((<>))

main :: IO ()
main = withFTPS "hostname.com" 21 $ \h welcome -> do
login h "username" "password"
main = withFTPS "hostname.com" 21 $ \h _welcome -> do
_ <- login h "username" "password"
runConduitRes
$ FC.mlsd h "."
.| mapC (C.pack . (<> "\n") . show)
Expand Down
32 changes: 29 additions & 3 deletions example/example.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,36 @@ source-repository head
type: git
location: https://github.com/flipstone/ftp-client

flag ci
description: More strict ghc options used for development and ci, not intended for end-use.
manual: True
default: False

executable example-exe
main-is: Main.hs
other-modules:
Paths_example
hs-source-dirs:
app
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends:
base
, bytestring
, conduit
, containers
, ftp-client
, ftp-client-conduit
default-language: Haskell2010
if flag(ci)
ghc-options: -O2 -threaded -rtsopts -with-rtsopts=-N -Wall -Werror -Wcompat -Widentities -Winvalid-haddock -Wmissing-local-signatures -Wmissing-export-lists -Wpartial-fields -Wmissed-specialisations -Wno-implicit-prelude -Wno-safe -Wno-unsafe -Wunused-packages
if impl (ghc < 9.4)
ghc-options: -Wno-unticked-promoted-constructors
if impl (ghc >= 9.4)
ghc-options: -Wimplicit-lift -Woperator-whitespace -Wredundant-bang-patterns -Wredundant-strictness-flags
if impl (ghc >= 9.8)
ghc-options: -Wincomplete-export-warnings -Wmissing-poly-kind-signatures -Wterm-variable-capture
if impl (ghc >= 9.10)
ghc-options: -Wdefaulted-exception-context
else
ghc-options: -threaded -rtsopts -with-rtsopts=-N

test-suite example-test
type: exitcode-stdio-1.0
Expand All @@ -42,7 +57,18 @@ test-suite example-test
Paths_example
hs-source-dirs:
test
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends:
base
default-language: Haskell2010
if flag(ci)
ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Werror -Wcompat -Widentities -Winvalid-haddock -Wmissing-local-signatures -Wmissing-export-lists -Wpartial-fields -Wmissed-specialisations -Wno-implicit-prelude -Wno-safe -Wno-unsafe
if impl (ghc < 9.4)
ghc-options: -Wno-unticked-promoted-constructors
if impl (ghc >= 9.4)
ghc-options: -Wimplicit-lift -Woperator-whitespace -Wredundant-bang-patterns -Wredundant-strictness-flags
if impl (ghc >= 9.8)
ghc-options: -Wincomplete-export-warnings -Wmissing-poly-kind-signatures -Wterm-variable-capture
if impl (ghc >= 9.10)
ghc-options: -Wdefaulted-exception-context
else
ghc-options: -threaded -rtsopts -with-rtsopts=-N
101 changes: 92 additions & 9 deletions example/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,114 @@ category: Web

git: https://github.com/flipstone/ftp-client

flags:
ci:
description: More strict ghc options used for development and ci, not intended for end-use.
manual: true
default: false

executables:
example-exe:
main: Main.hs
source-dirs: app
language: Haskell2010
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
dependencies:
- base
- ftp-client
- ftp-client-conduit
- conduit
- bytestring
- containers
when:
- condition: flag(ci)
then:
ghc-options:
- -O2
- -threaded
- -rtsopts
- -with-rtsopts=-N
- -Wall
- -Werror
- -Wcompat
- -Widentities
- -Winvalid-haddock
- -Wmissing-local-signatures
- -Wmissing-export-lists
- -Wpartial-fields
- -Wmissed-specialisations
- -Wno-implicit-prelude
- -Wno-safe
- -Wno-unsafe
- -Wunused-packages
when:
- condition: impl (ghc < 9.4)
ghc-options:
- -Wno-unticked-promoted-constructors
- condition: impl (ghc >= 9.4)
ghc-options:
- -Wimplicit-lift
- -Woperator-whitespace
- -Wredundant-bang-patterns
- -Wredundant-strictness-flags
- condition: impl (ghc >= 9.8)
ghc-options:
- -Wincomplete-export-warnings
- -Wmissing-poly-kind-signatures
- -Wterm-variable-capture
- condition: impl (ghc >= 9.10)
ghc-options:
- -Wdefaulted-exception-context
else:
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N

tests:
example-test:
main: Spec.hs
source-dirs: test
language: Haskell2010
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
dependencies:
- base
when:
- condition: flag(ci)
then:
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
- -Wall
- -Werror
- -Wcompat
- -Widentities
- -Winvalid-haddock
- -Wmissing-local-signatures
- -Wmissing-export-lists
- -Wpartial-fields
- -Wmissed-specialisations
- -Wno-implicit-prelude
- -Wno-safe
- -Wno-unsafe
when:
- condition: impl (ghc < 9.4)
ghc-options:
- -Wno-unticked-promoted-constructors
- condition: impl (ghc >= 9.4)
ghc-options:
- -Wimplicit-lift
- -Woperator-whitespace
- -Wredundant-bang-patterns
- -Wredundant-strictness-flags
- condition: impl (ghc >= 9.8)
ghc-options:
- -Wincomplete-export-warnings
- -Wmissing-poly-kind-signatures
- -Wterm-variable-capture
- condition: impl (ghc >= 9.10)
ghc-options:
- -Wdefaulted-exception-context
else:
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
2 changes: 2 additions & 0 deletions example/test/Spec.hs
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
module Main (main) where

main :: IO ()
main = putStrLn "Test suite not yet implemented"
15 changes: 15 additions & 0 deletions ftp-client-conduit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog for ftp-client-conduit

## 0.5.0.7

* Add the missing upper bounds on `bytestring`, `conduit` and `exceptions`.

* Replace conduit's deprecated `Producer` and `Consumer` synonyms with
`ConduitT` in the exported signatures of `nlst`, `retr`, `list`, `stor` and
`mlsd`. The type variables are left free, so the exported types are unchanged
-- `Producer m o` is `forall i. ConduitT i o m ()`, not `ConduitT () o m ()`.

* Raise the `conduit` lower bound to `>= 1.3`. `ConduitT` arrived in conduit
1.3, so the previous `>= 1.1` allowed dependency selections that cannot
compile the signatures above. The bounds audit only added the missing upper
halves; this is the lower half that replacing `Producer` and `Consumer`
invalidated.

## 0.5.0.6

* Correct the `resourcet` bound. `>= 1.2 && < 1.3` excluded `resourcet-1.3.0`,
Expand Down
37 changes: 31 additions & 6 deletions ftp-client-conduit/ftp-client-conduit.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cabal-version: 1.12
-- see: https://github.com/sol/hpack

name: ftp-client-conduit
version: 0.5.0.6
version: 0.5.0.7
synopsis: Transfer file with FTP and FTPS with Conduit
description: ftp-client is a library for communicating with an FTP server. It works over both a clear channel or TLS. ftp-client-conduit uses conduit to stream files and data in constant space.
category: Web
Expand All @@ -30,6 +30,11 @@ source-repository head
type: git
location: https://github.com/flipstone/ftp-client

flag ci
description: More strict ghc options used for development and ci, not intended for end-use.
manual: True
default: False

library
exposed-modules:
Network.FTP.Client.Conduit
Expand All @@ -38,17 +43,26 @@ library
hs-source-dirs:
src
default-extensions:
RankNTypes
OverloadedStrings
build-depends:
base >=4.16 && <5
, bytestring
, conduit >=1.1
, bytestring >=0.10.8.2 && <0.13
, conduit ==1.3.*
, crypton-connection >=0.3 && <0.5
, exceptions
, exceptions >=0.10.3 && <0.11
, ftp-client ==0.5.*
, resourcet >=1.2 && <1.4
default-language: Haskell2010
if flag(ci)
ghc-options: -O2 -Wall -Werror -Wcompat -Widentities -Winvalid-haddock -Wmissing-local-signatures -Wmissing-export-lists -Wpartial-fields -Wmissed-specialisations -Wno-implicit-prelude -Wno-safe -Wno-unsafe -Wunused-packages
if impl (ghc < 9.4)
ghc-options: -Wno-unticked-promoted-constructors
if impl (ghc >= 9.4)
ghc-options: -Wimplicit-lift -Woperator-whitespace -Wredundant-bang-patterns -Wredundant-strictness-flags
if impl (ghc >= 9.8)
ghc-options: -Wincomplete-export-warnings -Wmissing-poly-kind-signatures -Wterm-variable-capture
if impl (ghc >= 9.10)
ghc-options: -Wdefaulted-exception-context

test-suite ftp-conduit-test
type: exitcode-stdio-1.0
Expand All @@ -57,8 +71,19 @@ test-suite ftp-conduit-test
Paths_ftp_client_conduit
hs-source-dirs:
test
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends:
base >=4.16 && <5
, ftp-client-conduit
default-language: Haskell2010
if flag(ci)
ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Werror -Wcompat -Widentities -Winvalid-haddock -Wmissing-local-signatures -Wmissing-export-lists -Wpartial-fields -Wmissed-specialisations -Wno-implicit-prelude -Wno-safe -Wno-unsafe
if impl (ghc < 9.4)
ghc-options: -Wno-unticked-promoted-constructors
if impl (ghc >= 9.4)
ghc-options: -Wimplicit-lift -Woperator-whitespace -Wredundant-bang-patterns -Wredundant-strictness-flags
if impl (ghc >= 9.8)
ghc-options: -Wincomplete-export-warnings -Wmissing-poly-kind-signatures -Wterm-variable-capture
if impl (ghc >= 9.10)
ghc-options: -Wdefaulted-exception-context
else
ghc-options: -threaded -rtsopts -with-rtsopts=-N
Loading
Loading