Skip to content

Commit

Permalink
Add IsIn instance for NamedRoutes in servant-swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
Friede80 committed Sep 15, 2023
1 parent 18ad2a1 commit 1ec6ab7
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type family IsIn sub api :: Constraint where
IsIn e (a :<|> b) = Or (IsIn e a) (IsIn e b)
IsIn (e :> a) (e :> b) = IsIn a b
IsIn e e = ()
IsIn e (NamedRoutes record) = IsIn e (ToServantApi record)

-- | Check whether a type is a member of a list of types.
-- This is a type-level analogue of @'elem'@.
Expand Down

0 comments on commit 1ec6ab7

Please sign in to comment.