Skip to content

Commit

Permalink
Remove IsIn from servant-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
fizruk committed Jan 20, 2016
1 parent eb0f7c3 commit 795182e
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions servant-docs/src/Servant/Docs/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import GHC.Generics
import GHC.TypeLits
import Servant.API
import Servant.API.ContentTypes
import Servant.API.TypeLevel
import Servant.Utils.Links

import qualified Data.HashMap.Strict as HM
Expand Down Expand Up @@ -298,15 +299,6 @@ docs p = docsWithOptions p defaultDocOptions
docsWithOptions :: HasDocs layout => Proxy layout -> DocOptions -> API
docsWithOptions p = docsFor p (defEndpoint, defAction)

-- | Closed type family, check if endpoint is exactly within API.

-- We aren't sure what affects how an Endpoint is built up, so we require an
-- exact match.
type family IsIn (endpoint :: *) (api :: *) :: Constraint where
IsIn e (sa :<|> sb) = Or (IsIn e sa) (IsIn e sb)
IsIn (e :> sa) (e :> sb) = IsIn sa sb
IsIn e e = ()

-- | Create an 'ExtraInfo' that is garunteed to be within the given API layout.
--
-- The safety here is to ensure that you only add custom documentation to an
Expand Down

0 comments on commit 795182e

Please sign in to comment.