diff options
Diffstat (limited to 'lambda-calcul/haskell/src/Minilang/API.hs')
| -rw-r--r-- | lambda-calcul/haskell/src/Minilang/API.hs | 10 |
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 |
