Fix weird compilation error

This commit is contained in:
Filip Gralinski 2021-01-27 14:46:06 +01:00
parent 648a4368d0
commit d44408c1e8

View File

@ -1,5 +1,3 @@
{-# LANGUAGE OverloadedLists #-}
module Handler.ShowChallenge where module Handler.ShowChallenge where
import Import hiding (Proxy, fromList) import Import hiding (Proxy, fromList)
@ -66,7 +64,7 @@ import qualified Data.Swagger as DS
import Data.Swagger.Declare import Data.Swagger.Declare
import Control.Lens hiding ((.=), (^.)) import Control.Lens hiding ((.=), (^.))
import Data.Proxy import Data.Proxy as DPR
import Data.HashMap.Strict.InsOrd (fromList) import Data.HashMap.Strict.InsOrd (fromList)
instance ToJSON LeaderboardEntry where instance ToJSON LeaderboardEntry where
@ -82,8 +80,8 @@ instance ToJSON LeaderboardEntry where
instance ToSchema LeaderboardEntry where instance ToSchema LeaderboardEntry where
declareNamedSchema _ = do declareNamedSchema _ = do
stringSchema <- declareSchemaRef (Proxy :: Proxy String) stringSchema <- declareSchemaRef (DPR.Proxy :: DPR.Proxy String)
intSchema <- declareSchemaRef (Proxy :: Proxy Int) intSchema <- declareSchemaRef (DPR.Proxy :: DPR.Proxy Int)
return $ NamedSchema (Just "LeaderboardEntry") $ mempty return $ NamedSchema (Just "LeaderboardEntry") $ mempty
& type_ .~ SwaggerObject & type_ .~ SwaggerObject
& properties .~ & properties .~
@ -105,7 +103,7 @@ declareLeaderboardSwagger = do
return $ mempty return $ mempty
& paths .~ & paths .~
[ ("/api/leaderboard/{challengeName}", fromList [ ("/api/leaderboard/{challengeName}",
mempty & DS.get ?~ (mempty mempty & DS.get ?~ (mempty
& parameters .~ [ Inline $ mempty & parameters .~ [ Inline $ mempty
& name .~ "challengeName" & name .~ "challengeName"