Metadata revisions for servant-0.2

Package maintainers and Hackage trustees are allowed to edit certain bits of package metadata after a release, without uploading a new tarball. Note that the tarball itself is never changed, just the metadata that is stored separately. For more information about metadata revisions, please refer to the Hackage Metadata Revisions FAQ.

No. Time User Changes
-r5 Sun Dec 10 21:44:03 UTC 2017 phadej
  • Changed the library component's library dependency on 'either' from

    -any
    to
    <5

-r4 Tue Feb 16 09:51:23 UTC 2016 phadej
  • Changed the library component's library dependency on 'wai-app-static' from

    <3.1
    to
    >=3.0 && <3.1

-r3 Sat Aug 8 14:01:28 UTC 2015 HerbertValerioRiedel
  • Changed the library component's library dependency on 'wai-app-static' from

    -any
    to
    <3.1

-r2 Tue Dec 9 14:49:02 UTC 2014 AlpMestanogullari
  • Changed author from

    Alp Mestanogullari, Sönke Hahn, Julian K. Arni
    to
    Alp Mestanogullari, Sönke Hahn, Julian K. Arni

-r1 Tue Dec 9 14:47:40 UTC 2014 AlpMestanogullari
  • Changed author from

    Alp Mestanogullari, Sönke Hahn, Julian K. Arni
    to
    Alp Mestanogullari, Sönke Hahn, Julian K. Arni

  • Changed description from

    A family of combinators for defining webservices APIs and serving them
    
    You can learn about the basics in <http://haskell-servant.github.io/getting-started/ the getting started> guide.
    
    Here's a runnable example, with comments, that defines a dummy API and
    implements a webserver that serves this API. You can find it <https://github.com/haskell-servant/servant/blob/master/example/greet.hs here> too.
    
    > {-# LANGUAGE DataKinds #-}
    > {-# LANGUAGE PolyKinds #-}
    > {-# LANGUAGE TypeFamilies #-}
    > {-# LANGUAGE DeriveGeneric #-}
    > {-# LANGUAGE TypeOperators #-}
    > {-# LANGUAGE OverloadedStrings #-}
    >
    > import Data.Aeson
    > import Data.Monoid
    > import Data.Proxy
    > import Data.Text
    > import GHC.Generics
    > import Network.Wai
    > import Network.Wai.Handler.Warp
    >
    > import Servant
    >
    > -- * Example
    >
    > -- | A greet message data type
    > newtype Greet = Greet { msg :: Text }
    >   deriving (Generic, Show)
    >
    > instance FromJSON Greet
    > instance ToJSON Greet
    >
    > -- API specification
    > type TestApi =
    >        -- GET /hello/:name?capital={true, false}
    >        "hello" :> Capture "name" Text :> QueryParam "capital" Bool :> Get Greet
    >
    >        -- POST /greet with a Greet as JSON in the request body,
    >        --      returns a Greet as JSON
    >   :<|> "greet" :> ReqBody Greet :> Post Greet
    >
    >        -- DELETE /greet/:greetid
    >   :<|> "greet" :> Capture "greetid" Text :> Delete
    >
    > testApi :: Proxy TestApi
    > testApi = Proxy
    >
    > -- Server-side handlers.
    > --
    > -- There's one handler per endpoint, which, just like in the type
    > -- that represents the API, are glued together using :<|>.
    > --
    > -- Each handler runs in the 'EitherT (Int, String) IO' monad.
    > server :: Server TestApi
    > server = helloH :<|> postGreetH :<|> deleteGreetH
    >
    >   where helloH name Nothing = helloH name (Just False)
    >         helloH name (Just False) = return . Greet $ "Hello, " <> name
    >         helloH name (Just True) = return . Greet . toUpper $ "Hello, " <> name
    >
    >         postGreetH greet = return greet
    >
    >         deleteGreetH _ = return ()
    >
    > -- Turn the server into a WAI app. 'serve' is provided by servant,
    > -- more precisely by the Servant.Server module.
    > test :: Application
    > test = serve testApi server
    >
    > -- Run the server.
    > --
    > -- 'run' comes from Network.Wai.Handler.Warp
    > runTestServer :: Port -> IO ()
    > runTestServer port = run port test
    >
    > -- Put this all to work!
    > main :: IO ()
    > main = runTestServer 8001
    to
    A family of combinators for defining webservices APIs and serving them
    
    You can learn about the basics in <http://haskell-servant.github.io/getting-started/ the getting started> guide.
    
    <https://github.com/haskell-servant/servant/blob/master/example/greet.hs Here>'s a runnable example, with comments, that defines a dummy API and
    implements a webserver that serves this API.

-r0 Tue Dec 9 14:34:02 UTC 2014 AlpMestanogullari