on master help sign in
Remove IsIn from servant-docs
a6de4baNickolay Kudasov
servant-docs/src/Servant/Docs/Internal.hs+1−9
@@ -42,6 +42,7 @@ import GHC.Generics
42import GHC.TypeLits
42import GHC.TypeLits
43import Servant.API
43import Servant.API
44import Servant.API.ContentTypes
44import Servant.API.ContentTypes
45+import Servant.API.TypeLevel
45import Servant.Utils.Links
46import Servant.Utils.Links
46
47
47import qualified Data.HashMap.Strict as HM
48import qualified Data.HashMap.Strict as HM
@@ -306,15 +307,6 @@ docs p = docsWithOptions p defaultDocOptions
306docsWithOptions :: HasDocs api => Proxy api -> DocOptions -> API
307docsWithOptions :: HasDocs api => Proxy api -> DocOptions -> API
307docsWithOptions p = docsFor p (defEndpoint, defAction)
308docsWithOptions p = docsFor p (defEndpoint, defAction)
308
309
309−-- | Closed type family, check if endpoint is exactly within API.
310−
311−-- We aren't sure what affects how an Endpoint is built up, so we require an
312−-- exact match.
313−type family IsIn (endpoint :: *) (api :: *) :: Constraint where
314− IsIn e (sa :<|> sb) = Or (IsIn e sa) (IsIn e sb)
315− IsIn (e :> sa) (e :> sb) = IsIn sa sb
316− IsIn e e = ()
317−
318-- | Create an 'ExtraInfo' that is guaranteed to be within the given API layout.
310-- | Create an 'ExtraInfo' that is guaranteed to be within the given API layout.
319--
311--
320-- The safety here is to ensure that you only add custom documentation to an
312-- The safety here is to ensure that you only add custom documentation to an