Skip to content
Permalink
Browse files

Run weeder and remove commented out code

  • Loading branch information...
ruhatch committed May 14, 2019
1 parent 37a2cd2 commit 70cff2264652b104cfa8257f6e4b3cabef4c447f
@@ -39,21 +39,16 @@ library
cardano-sl-crypto,
cardano-sl-db,
cardano-sl-infra,
cardano-sl-util,
cborg,
conduit,
containers,
cryptonite,
directory,
exceptions,
free,
io-sim,
io-sim-classes,
lens,
memory,
ouroboros-consensus,
ouroboros-network,
random,
resourcet,
sqlite-simple,
serialise,
@@ -80,31 +75,24 @@ executable byron-proxy
cardano-binary,
cardano-ledger,
cardano-sl,
cardano-sl-binary,
cardano-sl-chain,
cardano-sl-core,
cardano-sl-db,
cardano-sl-infra,
cardano-sl-util,
cborg,
containers,
contra-tracer,
directory,
exceptions,
iohk-monitoring,
io-sim-classes,
lens,
network,
optparse-applicative,
ouroboros-consensus,
ouroboros-network,
random,
resourcet,
serialise,
stm,
text,
time,
type-operators == 0.1.0.4,
transformers,
typed-protocols
hs-source-dirs: src/exec
@@ -120,31 +108,17 @@ executable validator
other-modules: Logging
-- other-extensions:
build-depends: base,
async,
byron-proxy,
bytestring,
cardano-binary,
cardano-ledger,
cardano-shell,
cborg,
containers,
contra-tracer,
directory,
exceptions,
iohk-monitoring,
io-sim-classes,
lens,
network,
optparse-applicative,
ouroboros-consensus,
ouroboros-network,
random,
resourcet,
serialise,
stm,
text,
time,
type-operators == 0.1.0.4,
transformers,
typed-protocols
hs-source-dirs: src/exec
@@ -43,20 +43,7 @@ import qualified Ouroboros.Storage.ImmutableDB.API as Immutable
import Ouroboros.Storage.ImmutableDB.Util (cborEpochFileParser')
import Ouroboros.Storage.FS.API (HasFS)

{-
-- | Run a Decoder and fail if it does not consume all of the input bytes.
decodeFull
:: (forall s . CBOR.Decoder s t)
-> Lazy.ByteString
-> Either CBOR.DeserialiseFailure t
decodeFull decoder lbs = case CBOR.deserialiseFromBytesWithSize decoder lbs of
Left failure -> Left failure
Right (bs, offset, t) ->
if Lazy.null bs
then Right t
else Left (CBOR.DeserialiseFailure offset "decodeFull: did not consume all input")
-}

-- TODO: Move these functions to a compatibility module
coerceHashToLegacy :: Cardano.HeaderHash -> CSL.HeaderHash
coerceHashToLegacy (AbstractHash digest) = Legacy.AbstractHash digest

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -151,7 +151,6 @@ library
ViewPatterns

build-depends: base >=4.9 && <4.13,
cardano-ledger,
ouroboros-network,
typed-protocols,
io-sim-classes,
@@ -170,7 +169,6 @@ library
mtl >=2.2 && <2.3,
pipes >=4.3 && <4.4,
serialise >=0.2 && <0.3,
stm,
text >=1.2 && <1.3,
time,
transformers,
@@ -205,7 +203,6 @@ executable demo-playground
aeson,
async,
bytestring,
cborg,
containers,
cryptonite,
directory,
@@ -214,8 +211,7 @@ executable demo-playground
serialise,
stm,
string-conv,
text,
time
text
if os(windows)
build-depends: Win32
else
@@ -248,7 +244,6 @@ test-suite test-consensus
io-sim-classes,
io-sim,

bytestring,
containers,
contra-tracer,
cryptonite,
@@ -348,7 +343,6 @@ test-suite test-storage
quickcheck-state-machine >=0.6.0,
random,
serialise,
stm,
tasty,
tasty-hunit,
tasty-quickcheck,
@@ -100,7 +100,6 @@ library
cborg >=0.2.1 && <0.3,
containers,
fingertree >=0.1.4.2 && <0.2,
mtl >=2.2 && <2.3,
network,
process >=1.6 && <1.7,
serialise >=0.2 && <0.3,
@@ -198,9 +197,7 @@ test-suite tests
cborg,
containers,
directory,
free,
fingertree,
free,
hashable,
mtl,
network,
@@ -252,7 +249,6 @@ test-suite test-cddl
serialise,
text,
io-sim-classes,
ouroboros-network-testing,
typed-protocols
ghc-options: -Wall
-Wno-unticked-promoted-constructors
@@ -18,7 +18,7 @@ import Codec.CBOR.Decoding (decodeWord, decodeListLenOf, decodeBytes)
import Codec.CBOR.Read

import Ouroboros.Network.Protocol.ChainSync.Type as CS
import Ouroboros.Network.Protocol.ChainSync.Codec (codecChainSync)
import Ouroboros.Network.Protocol.ChainSync.Codec (codecSerialise)
import Network.TypedProtocol.ReqResp.Type as ReqResp
import Ouroboros.Network.Protocol.ReqResp.Codec (codecReqResp)
import Ouroboros.Network.Protocol.PingPong.Codec (codecPingPong)
@@ -121,7 +121,7 @@ decodeMsg (tag, input) = case tag of
-> PeerHasAgency pr st -> IO Bool
run codec state = runCodec ((decode codec) state) input

runCS = run (codecChainSync :: MonoCodec CS)
runCS = run (codecSerialise :: MonoCodec CS)
chainSyncParsers = [
runCS (ClientAgency CS.TokIdle)
, runCS (ServerAgency (CS.TokNext TokCanAwait))
@@ -75,7 +75,6 @@ test-suite tests
, Network.TypedProtocol.ReqResp.Tests
, Network.TypedProtocol.ReqResp.Type
build-depends: base
, async
, bytestring
, contra-tracer
, io-sim-classes

0 comments on commit 70cff22

Please sign in to comment.
You can’t perform that action at this time.