Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
Merge pull request #3686 from input-output-hk/matt/co-403/remove-wall…
Browse files Browse the repository at this point in the history
…et-dep

[CO-403] Remove `wallet` dependency from `Cardano/Wallet/Server/Plugins.hs`
  • Loading branch information
KtorZ committed Oct 4, 2018
2 parents 9e7afa8 + f48828a commit a3c5ad3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions wallet-new/src/Cardano/Wallet/Server/Plugins.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
a particular monad, at some point in time.
-}

-- Orphan instance for Buildable Servant.NoContent
{-# OPTIONS_GHC -fno-warn-orphans #-}

module Cardano.Wallet.Server.Plugins
( Plugin
, apiServer
Expand All @@ -19,6 +22,7 @@ import Data.Aeson (encode)
import qualified Data.ByteString.Char8 as BS8
import qualified Data.Text as T
import Data.Typeable (typeOf)
import Formatting.Buildable (build)
import qualified Servant

import Network.HTTP.Types.Status (badRequest400)
Expand Down Expand Up @@ -58,14 +62,9 @@ import Pos.Util.Wlog (logInfo, modifyLoggerName, usingLoggerName)
import Pos.Web (serveDocImpl, serveImpl)
import qualified Pos.Web.Server

-- Needed for Orphan Instance 'Buildable Servant.NoContent' :|
import Pos.Wallet.Web ()


-- A @Plugin@ running in the monad @m@.
type Plugin m = Diffusion m -> m ()


-- | A @Plugin@ to start the wallet REST server
apiServer
:: ProtocolMagic
Expand Down Expand Up @@ -182,3 +181,6 @@ updateWatcher = const $ do
newUpdate <- WalletLayer.waitForUpdate w
logInfo "A new update was found!"
WalletLayer.addUpdate w . cpsSoftwareVersion $ newUpdate

instance Buildable Servant.NoContent where
build Servant.NoContent = build ()

0 comments on commit a3c5ad3

Please sign in to comment.