@@ -33,7 +33,20 @@
3333-- and part of the sitemap.
3434--
3535-- __N.B.:__ 'mkLink' assumes a capture matches any string (without slashes).
36−module Servant.Utils.Links where
36+module Servant.Utils.Links (
37+ -- * Link and mkLink
38+ -- | The only end-user utilities
39+ mkLink
40+ , Link
41+ -- * Internal
42+ -- | These functions will likely only be of interest if you are writing
43+ -- more API combinators and would like to extend the behavior of
44+ -- 'mkLink'
45+ , ValidLinkIn()
46+ , VLinkHelper(..)
47+ , IsElem
48+ , IsLink
49+ )where
3750
3851import Data.Proxy
3952import GHC.TypeLits
@@ -94,6 +107,9 @@ instance ( IsElem f s ~ 'True
94107 , VLinkHelper f) => ValidLinkIn f s where
95108 mkLink _ _ = Link (vlh (Proxy :: Proxy f))
96109
110+-- | A safe link datatype.
111+-- The only way of constructing a 'Link' is using 'mkLink', which means any
112+-- 'Link' is guaranteed to be part of the mentioned API.
97113data Link = Link String deriving Show
98114
99115class VLinkHelper f where