commit
cc7dc408d7
3 changed files with 6 additions and 5 deletions
|
@ -39,14 +39,14 @@ data Summary (sym :: Symbol)
|
||||||
--type MyApi = Description
|
--type MyApi = Description
|
||||||
-- "This comment is visible in multiple Servant interpretations \
|
-- "This comment is visible in multiple Servant interpretations \
|
||||||
-- \and can be really long if necessary. \
|
-- \and can be really long if necessary. \
|
||||||
-- \Haskell multiline support is not perfect \
|
-- \Haskell multiline String support is not perfect \
|
||||||
-- \but it's still very readable."
|
-- \but it's still very readable."
|
||||||
-- :> Get '[JSON] Book
|
-- :> Get '[JSON] Book
|
||||||
-- :}
|
-- :}
|
||||||
data Description (sym :: Symbol)
|
data Description (sym :: Symbol)
|
||||||
deriving (Typeable)
|
deriving (Typeable)
|
||||||
|
|
||||||
-- | Fold modifier list to decide whether argument should be parsed strictly or leniently.
|
-- | Fold list of modifiers to extract description as a type-level String.
|
||||||
--
|
--
|
||||||
-- >>> :kind! FoldDescription '[]
|
-- >>> :kind! FoldDescription '[]
|
||||||
-- FoldDescription '[] :: Symbol
|
-- FoldDescription '[] :: Symbol
|
||||||
|
|
|
@ -11,6 +11,7 @@ import Data.Typeable
|
||||||
-- a modified (stripped) 'pathInfo' if the 'Application' is being routed with 'Servant.API.Sub.:>'.
|
-- a modified (stripped) 'pathInfo' if the 'Application' is being routed with 'Servant.API.Sub.:>'.
|
||||||
--
|
--
|
||||||
-- In addition to just letting you plug in your existing WAI 'Application's,
|
-- In addition to just letting you plug in your existing WAI 'Application's,
|
||||||
-- this can also be used with <https://hackage.haskell.org/package/servant-server/docs/Servant-Utils-StaticFiles.html#v:serveDirectory serveDirectory> to serve
|
-- this can also be used with functions from
|
||||||
-- static files stored in a particular directory on your filesystem
|
-- <https://hackage.haskell.org/package/servant-server/docs/Servant-Server-StaticFiles.html Servant.Server.StaticFiles>
|
||||||
|
-- to serve static files stored in a particular directory on your filesystem
|
||||||
data Raw deriving Typeable
|
data Raw deriving Typeable
|
||||||
|
|
|
@ -178,7 +178,7 @@ type family IsStrictSubAPI sub api :: Constraint where
|
||||||
|
|
||||||
-- | Check that every element of @xs@ is an endpoint of @api@ (using @'IsIn'@).
|
-- | Check that every element of @xs@ is an endpoint of @api@ (using @'IsIn'@).
|
||||||
--
|
--
|
||||||
-- ok (Proxy :: Proxy (AllIsIn (Endpoints SampleAPI) SampleAPI))
|
-- >>> ok (Proxy :: Proxy (AllIsIn (Endpoints SampleAPI) SampleAPI))
|
||||||
-- OK
|
-- OK
|
||||||
type family AllIsIn xs api :: Constraint where
|
type family AllIsIn xs api :: Constraint where
|
||||||
AllIsIn '[] api = ()
|
AllIsIn '[] api = ()
|
||||||
|
|
Loading…
Reference in a new issue