diff options
Diffstat (limited to '')
-rw-r--r-- | lib/Server.hs | 6 | ||||
-rw-r--r-- | lib/Server/ControlRoom.hs | 6 | ||||
-rw-r--r-- | lib/Server/GTFS_RT.hs | 6 |
3 files changed, 9 insertions, 9 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 diff --git a/lib/Server/ControlRoom.hs b/lib/Server/ControlRoom.hs index e5e9b7c..b1948f2 100644 --- a/lib/Server/ControlRoom.hs +++ b/lib/Server/ControlRoom.hs @@ -53,7 +53,7 @@ import Yesod import Yesod.Form import Extrapolation (Extrapolator (..), - LinearExtrapolator) + LinearExtrapolator (..)) import GTFS import Numeric (showFFloat) import Persist @@ -234,8 +234,8 @@ getTrainViewR trip day = do $else <td title="_{MsgBlockToken}"><a href="@{TokenBlock key}">_{MsgBlockToken}</a> |] - where guessDelay history = fmap trainAnchorDelay . extrapolateAtPosition @LinearExtrapolator history - guessAtSeconds = extrapolateAtSeconds @LinearExtrapolator + where guessDelay history = fmap trainAnchorDelay . extrapolateAtPosition LinearExtrapolator history + guessAtSeconds = extrapolateAtSeconds LinearExtrapolator getTripsViewR :: Handler Html diff --git a/lib/Server/GTFS_RT.hs b/lib/Server/GTFS_RT.hs index e0bbeda..1641131 100644 --- a/lib/Server/GTFS_RT.hs +++ b/lib/Server/GTFS_RT.hs @@ -77,7 +77,7 @@ import Data.UUID (toASCIIBytes, toLazyASCIIBytes) import qualified Data.Vector as V import Extrapolation (Extrapolator (extrapolateAtPosition, extrapolateAtSeconds), - LinearExtrapolator) + LinearExtrapolator (..)) import GTFS (Depth (..)) import GTFS.Realtime.TripUpdate (TripUpdate (TripUpdate)) import Server.Util (Service, @@ -149,9 +149,9 @@ gtfsRealtimeServer gtfs@GTFS{..} dbpool = handleServiceAlerts :<|> handleTripUpd dFeedMessage $ Seq.fromList $ mkTripUpdate nowSeconds <$> anchors where mkTripUpdate nowSeconds (Entity (RunningKey (Token uuid)) Running{..}, Trip{..} :: Trip Deep Deep, anchors) = - let lastCall = extrapolateAtSeconds @LinearExtrapolator anchors nowSeconds + let lastCall = extrapolateAtSeconds LinearExtrapolator anchors nowSeconds stations = tripStops - <&> (\stop@Stop{..} -> fmap (, stop) $ extrapolateAtPosition @LinearExtrapolator anchors (int2Double stopSequence)) + <&> (\stop@Stop{..} -> fmap (, stop) $ extrapolateAtPosition LinearExtrapolator anchors (int2Double stopSequence)) in (dFeedEntity (Utf8 $ toLazyASCIIBytes uuid)) { FE.trip_update = Just $ TripUpdate { TU.trip = dTripDescriptor runningTrip (Just runningDay) |