Browse Source

Bump to lts-17.14

master
Denis Tereshkin 5 years ago
parent
commit
4d8026f78b
  1. 7
      src/Bot.hs
  2. 9
      stack.yaml

7
src/Bot.hs

@ -28,11 +28,12 @@ import qualified Data.Map.Strict as M
import Data.Text (isPrefixOf, stripPrefix) import Data.Text (isPrefixOf, stripPrefix)
import qualified Data.Text as T import qualified Data.Text as T
import Data.Text.Encoding import Data.Text.Encoding
import qualified Data.Text.Lazy as TL
import Data.XML.Types import Data.XML.Types
import Language.Haskell.Printf
import Network.Xmpp import Network.Xmpp
import System.Log.Logger import System.Log.Logger
import System.ZMQ4 hiding (message) import System.ZMQ4 hiding (message)
import Text.Printf.TH
startBot :: Config -> IO () startBot :: Config -> IO ()
startBot conf = forever $ do startBot conf = forever $ do
@ -120,12 +121,12 @@ startBot conf = forever $ do
showPricesMsg ref = do showPricesMsg ref = do
m <- readIORef ref m <- readIORef ref
return $ foldMap (\tick -> [st|%?: %?\n|] (security tick) (value tick)) m return $ foldMap (\tick -> TL.toStrict $ [t|%?: %?\n|] (security tick) (value tick)) m
toXml text = [Element (Name "body" Nothing Nothing) [] [NodeContent (ContentText text)]] toXml text = [Element (Name "body" Nothing Nothing) [] [NodeContent (ContentText text)]]
messageForTrade :: TradeSinkMessage -> T.Text messageForTrade :: TradeSinkMessage -> T.Text
messageForTrade (TradeSinkTrade{..}) = [st|Trade: %? %? at %? (%? lots, %?/%?)|] messageForTrade (TradeSinkTrade{..}) = TL.toStrict $ [t|Trade: %? %? at %? (%? lots, %?/%?)|]
tsOperation tsOperation
tsSecurity tsSecurity
tsPrice tsPrice

9
stack.yaml

@ -18,7 +18,7 @@
# #
# resolver: ./custom-snapshot.yaml # resolver: ./custom-snapshot.yaml
# resolver: https://example.com/snapshots/2018-01-01.yaml # resolver: https://example.com/snapshots/2018-01-01.yaml
resolver: lts-12.9 resolver: lts-17.14
# User packages to be built. # User packages to be built.
# Various formats can be used as shown in the example below. # Various formats can be used as shown in the example below.
@ -37,12 +37,15 @@ packages:
- . - .
- ../libatrade - ../libatrade
- ../zeromq4-haskell-zap - ../zeromq4-haskell-zap
- ../pontarius-xmpp
# Dependency packages to be pulled from upstream that are not in the resolver # Dependency packages to be pulled from upstream that are not in the resolver
# using the same syntax as the packages field. # using the same syntax as the packages field.
# (e.g., acme-missiles-0.3) # (e.g., acme-missiles-0.3)
extra-deps: [ "datetime-0.3.1", "stringprep-1.0.0", "th-printf-0.5.1", "text-format-0.3.2" ] extra-deps:
- datetime-0.3.1
- stringprep-1.0.0
- th-printf-0.7
- pontarius-xmpp-0.5.6.4
# Override default flag values for local packages and extra-deps # Override default flag values for local packages and extra-deps
# flags: {} # flags: {}

Loading…
Cancel
Save