module Minilang.App where import Minilang.API (LambdaAPI, Score (..)) import Servant.Server (Handler, Server) import Data.Time (getCurrentTime) import Control.Monad.IO.Class (liftIO) lambdaApp :: Server LambdaAPI lambdaApp = getLeaderboard getLeaderboard :: Handler [Score] getLeaderboard = do now <- liftIO getCurrentTime pure [Score "Alice" 95 now, Score "Bob" 88 now]