Skip to content

Commit

Permalink
Added NamedRoutes to servant-foreign (#1648)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyakooo0 committed Feb 27, 2023
1 parent aaeee88 commit a082794
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions servant-foreign/src/Servant/Foreign/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,13 @@ instance HasForeign lang ftype api
foreignFor lang ftype Proxy req =
foreignFor lang ftype (Proxy :: Proxy api) req

instance HasForeign lang ftype (ToServantApi r) => HasForeign lang ftype (NamedRoutes r) where
type Foreign ftype (NamedRoutes r) = Foreign ftype (ToServantApi r)

foreignFor lang ftype Proxy req =
foreignFor lang ftype (Proxy :: Proxy (ToServantApi r)) req


-- | Utility class used by 'listFromAPI' which computes
-- the data needed to generate a function for each endpoint
-- and hands it all back in a list.
Expand Down

0 comments on commit a082794

Please sign in to comment.