aboutsummaryrefslogtreecommitdiff
path: root/lib/Server.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Server.hs')
-rw-r--r--lib/Server.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Server.hs b/lib/Server.hs
index 3c1e84b..93046f8 100644
--- a/lib/Server.hs
+++ b/lib/Server.hs
@@ -53,7 +53,7 @@ import Yesod (toWaiAppPlain)
import Conferer (fetch, mkConfig)
import Extrapolation (Extrapolator (..),
- LinearExtrapolator)
+ LinearExtrapolator (..))
import System.IO.Unsafe
import Config (ServerConfig)
@@ -105,7 +105,7 @@ server gtfs@GTFS{..} dbpool = handleDebugAPI
onError
pure Nothing
Just running@Running{..} -> do
- let anchor = extrapolateAnchorFromPing @LinearExtrapolator gtfs running ping
+ let anchor = extrapolateAnchorFromPing LinearExtrapolator gtfs running ping
-- TODO: are these always inserted in order?
runSql dbpool $ do
insert ping
@@ -129,7 +129,7 @@ server gtfs@GTFS{..} dbpool = handleDebugAPI
-- ignore this and continue sending messages, which will continue to be handled.
liftIO $ handleTrainPing (WS.sendClose conn ("" :: ByteString)) ping >>= \case
Just anchor -> WS.sendTextData conn (A.encode anchor)
- Nothing -> pure ()
+ Nothing -> pure ()
handleDebugState = do
now <- liftIO getCurrentTime
runSql dbpool $ do