Skip to content

Commit

Permalink
Merge #1327
Browse files Browse the repository at this point in the history
1327: Rewrite of the ntp-client r=coot a=MarcFontaine

This PR started as a refactoring of the ntp-client but evolved into a re-implementation.
(Therefore it does not make sense to review it as a diff)


Co-authored-by: MarcFontaine <marc.fontaine@iohk.io>
Co-authored-by: MarcFontaine <MarcFontaine@users.noreply.github.com>
Co-authored-by: Marcin Szamotulski <profunctor@pm.me>
  • Loading branch information
4 people committed Feb 5, 2020
2 parents 972cc8c + 981abc5 commit 9a95fee
Show file tree
Hide file tree
Showing 13 changed files with 475 additions and 717 deletions.
1 change: 0 additions & 1 deletion nix/.stack.nix/default.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 1 addition & 22 deletions nix/.stack.nix/ntp-client.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions nix/pkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ let
packages.io-sim-classes.configureFlags = [ "--ghc-option=-Werror" ];
packages.Win32-network.configureFlags = [ "--ghc-option=-Werror" ];
packages.network-mux.configureFlags = [ "--ghc-option=-Werror" ];
packages.ntp-client.configureFlags = [ "--ghc-option=-Werror" ];
packages.ouroboros-network.configureFlags = [ "--ghc-option=-Werror" ];
packages.ouroboros-network.flags.cddl = true;
packages.ouroboros-network.components.tests.test-cddl.build-tools = [pkgs.cddl pkgs.cbor-diag];
Expand Down
64 changes: 16 additions & 48 deletions ntp-client/ntp-client.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -11,69 +11,37 @@ cabal-version: >=1.20

Library
exposed-modules: Network.NTP.Client
Network.NTP.Util
Network.NTP.Packet
Network.NTP.Query
Network.NTP.Test
Network.NTP.Trace
build-depends: async
, base
, binary >= 0.8
, bytestring
, contra-tracer
, formatting
, network
, stm
, these
, time
, time-units
build-depends: async >=2.2 && <2.3
, base >=4.9 && <4.13
, binary >=0.8 && <0.9
, bytestring >=0.10 && <0.11
, contra-tracer >=0.1 && <0.2
, network >= 3.1 && <3.2
, stm >=2.4 && <2.6
, time >=1.6 && <1.10

hs-source-dirs: src
default-language: Haskell2010
ghc-options: -Wall -Werror -fwarn-redundant-constraints
default-extensions: DeriveDataTypeable
DeriveGeneric
GeneralizedNewtypeDeriving
OverloadedStrings
MonadFailDesugaring

-- Just for testing: to be removed later.
Executable ntp-app
hs-source-dirs: test, src
main-is: NtpApp.hs
default-language: Haskell2010
ghc-options: -Wall -Werror -fwarn-redundant-constraints
other-modules: Network.NTP.Client
Network.NTP.Util
Network.NTP.Packet
Network.NTP.Trace
build-depends: async
, base
, binary >= 0.8
, bytestring
, contra-tracer
, formatting
, network
, stm
, these
, time
, time-units
ghc-options: -Wall
default-extensions: GeneralizedNewtypeDeriving

test-suite ntp-client-test
test-suite test-ntp-client
hs-source-dirs: test, src
main-is: Test.hs
type: exitcode-stdio-1.0
other-modules: Network.NTP.Packet
build-depends: base
, binary >= 0.8
build-depends: base >=4.9 && <4.13
, binary
, time
, time-units
, QuickCheck
, tasty
, tasty-quickcheck
default-language: Haskell2010
ghc-options: -threaded
-rtsopts
-Wall
-with-rtsopts=-N
ghc-options: -Wall
default-extensions: OverloadedStrings
, DeriveDataTypeable
, GeneralizedNewtypeDeriving
Expand Down

0 comments on commit 9a95fee

Please sign in to comment.