git.iko.soy/typeable/servant
on 98e02ea help sign in
16 lines 419 B history raw
1{-# LANGUAGE PolyKinds #-}
2{-# LANGUAGE TypeOperators #-}
3module Servant.API.Sub where
5import Data.Proxy ( Proxy )
7-- | The contained API (second argument) can be found under @("/" ++ path)@
8-- (path being the first argument).
9--
10-- Example:
11--
12-- > -- GET /hello/world
13-- > -- returning a JSON encoded World value
14-- > type MyApi = "hello" :> "world" :> Get World
15data (path :: k) :> a = Proxy path :> a
16infixr 9 :>