{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} module API where import Servant.API import Servant.Links import Servant.RawM import Servant.HTML.Blaze import Data.Proxy -- internal imports import Types type UserAPI = Get '[HTML] UserSelectPage :<|> "user" :> Capture "id" Int :> Get '[HTML] UserOverviewPage :<|> "auth" :> Get '[HTML] AuthPage ( userSelectLink :<|> userOverviewLink :<|> authLink ) = allLinks (Proxy :: Proxy UserAPI)