servant/servant/src/Servant/API/RedirectOf.hs

13 lines
308 B
Haskell

{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
module Servant.API.RedirectOf where
import Data.Proxy (Proxy(..))
import Servant.Links
data RedirectOf api where
RedirectOf
:: (IsElem endpoint api, HasLink endpoint)
=> Proxy endpoint -> (forall a. MkLink endpoint a -> a) -> RedirectOf api