summaryrefslogtreecommitdiff
path: root/lambda-calcul/haskell/src/Minilang/API.hs
diff options
context:
space:
mode:
authorArnaud Bailly <arnaud@pankzsoft.com>2025-11-04 09:06:01 +0100
committerArnaud Bailly <arnaud@pankzsoft.com>2025-11-04 09:06:01 +0100
commitdf879037d135c0b300735185d5fdc0857ed797d6 (patch)
tree60ea569254a110be6fc53453e99312e2f16fc384 /lambda-calcul/haskell/src/Minilang/API.hs
parent1083bb7758a2dfe3f2861bf802627cec16933861 (diff)
downloadlambda-nantes-df879037d135c0b300735185d5fdc0857ed797d6.tar.gz
Serve index.html when requesting '/'
Diffstat (limited to 'lambda-calcul/haskell/src/Minilang/API.hs')
-rw-r--r--lambda-calcul/haskell/src/Minilang/API.hs10
1 files changed, 6 insertions, 4 deletions
diff --git a/lambda-calcul/haskell/src/Minilang/API.hs b/lambda-calcul/haskell/src/Minilang/API.hs
index 65e652a..2b8743f 100644
--- a/lambda-calcul/haskell/src/Minilang/API.hs
+++ b/lambda-calcul/haskell/src/Minilang/API.hs
@@ -1,13 +1,13 @@
{-# LANGUAGE DataKinds #-}
-{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveAnyClass #-}
+{-# LANGUAGE TypeOperators #-}
module Minilang.API where
+import Data.Aeson (FromJSON, ToJSON)
import Data.Time (UTCTime)
-import Servant (Get, JSON, (:>))
import GHC.Generics (Generic)
-import Data.Aeson (ToJSON, FromJSON)
+import Servant (Get, JSON, (:<|>), (:>), Raw)
data Score = Score
{ name :: String,
@@ -16,4 +16,6 @@ data Score = Score
}
deriving (Eq, Show, Generic, ToJSON, FromJSON)
-type LambdaAPI = "api" :> "leaderboard" :> Get '[JSON] [Score]
+type LambdaAPI =
+ "api" :> "leaderboard" :> Get '[JSON] [Score]
+ :<|> Raw