|
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> |
| 2 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| 3 | +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| 4 | + <head> |
| 5 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 7 | + <title>servant 0.14.1 released - haskell-servant</title> |
| 8 | + <link rel="stylesheet" type="text/css" href="../css/foundation.min.css" /> |
| 9 | + <link rel="stylesheet" type="text/css" href="../css/default.css" /> |
| 10 | + </head> |
| 11 | + <body> |
| 12 | + <div class="top-bar-container"> |
| 13 | + <div class="grid-container"> |
| 14 | + <div class="grid-x"> |
| 15 | + <div class="medium-2 text-center"><a href="../">Servant</a></div> |
| 16 | + <div class="medium-2 text-center"><a href="../blog.html">Blog</a></div> |
| 17 | + <div class="medium-2 text-center"><a href="https://haskell-servant.readthedocs.io/en/stable/tutorial/index.html">Tutorial↦</a></div> |
| 18 | + <div class="medium-2 text-center"><a href="https://haskell-servant.readthedocs.io/en/stable/cookbook/index.html">Cookbook↦</a></div> |
| 19 | + <div class="medium-2 text-center"><a href="../talks.html">Talks</a></div> |
| 20 | + <div class="medium-2 text-center"><a href="https://github.com/haskell-servant/servant">GitHub↦</a></div> |
| 21 | + </div> |
| 22 | + </div> |
| 23 | + </div> |
| 24 | + |
| 25 | + <div id="content" class="grid-container"><div class="grid-x"> |
| 26 | + <div class="cell"><h1>servant 0.14.1 released</h1></div> |
| 27 | + |
| 28 | + <div class="cell"><p>We’re happy to announce the minor release of <code>servant-0.14.1</code>.</p> |
| 29 | +<ul> |
| 30 | +<li><p>Merge in (and slightly refactor) <code>servant-generic</code> (by <a href="https://github.com/chpatrick">Patrick Chilton</a>) into <code>servant</code> (<code>Servant.API.Generic</code>), <code>servant-client-code</code> (<code>Servant.Client.Generic</code>) and <code>servant-server</code> (<code>Servant.Server.Generic</code>).</p> |
| 31 | +<div class="sourceCode" id="cb1"><pre class="sourceCode haskell"><code class="sourceCode haskell"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="kw">data</span> <span class="dt">Routes</span> route <span class="fu">=</span> <span class="dt">Routes</span></a> |
| 32 | +<a class="sourceLine" id="cb1-2" data-line-number="2"> {<span class="ot"> _get ::</span> route <span class="fu">:-</span> <span class="dt">Capture</span> <span class="st">"id"</span> <span class="dt">Int</span> <span class="fu">:></span> <span class="dt">Get</span> '[<span class="dt">JSON</span>] <span class="dt">String</span></a> |
| 33 | +<a class="sourceLine" id="cb1-3" data-line-number="3"> ,<span class="ot"> _put ::</span> route <span class="fu">:-</span> <span class="dt">ReqBody</span> '[<span class="dt">JSON</span>] <span class="dt">Int</span> <span class="fu">:></span> <span class="dt">Put</span> '[<span class="dt">JSON</span>] <span class="dt">Bool</span></a> |
| 34 | +<a class="sourceLine" id="cb1-4" data-line-number="4"> }</a> |
| 35 | +<a class="sourceLine" id="cb1-5" data-line-number="5"><span class="kw">deriving</span> (<span class="dt">Generic</span>)</a> |
| 36 | +<a class="sourceLine" id="cb1-6" data-line-number="6"></a> |
| 37 | +<a class="sourceLine" id="cb1-7" data-line-number="7"><span class="ot">record ::</span> <span class="dt">Routes</span> <span class="dt">AsServer</span></a> |
| 38 | +<a class="sourceLine" id="cb1-8" data-line-number="8">record <span class="fu">=</span> <span class="dt">Routes</span></a> |
| 39 | +<a class="sourceLine" id="cb1-9" data-line-number="9"> { _get <span class="fu">=</span> return <span class="fu">.</span> show</a> |
| 40 | +<a class="sourceLine" id="cb1-10" data-line-number="10"> , _put <span class="fu">=</span> return <span class="fu">.</span> odd</a> |
| 41 | +<a class="sourceLine" id="cb1-11" data-line-number="11"> }</a> |
| 42 | +<a class="sourceLine" id="cb1-12" data-line-number="12"></a> |
| 43 | +<a class="sourceLine" id="cb1-13" data-line-number="13"><span class="ot">app ::</span> <span class="dt">Application</span></a> |
| 44 | +<a class="sourceLine" id="cb1-14" data-line-number="14">app <span class="fu">=</span> genericServe record</a></code></pre></div> |
| 45 | +<p>See <a href="https://haskell-servant.readthedocs.io/en/release-0.14/cookbook/generic/Generic.html">cookbook recipe for the complete usage example</a></p></li> |
| 46 | +<li><p>Deprecate <code>Servant.Utils.Links</code>, use <code>Servant.Links</code>.</p></li> |
| 47 | +<li><p><em>servant-server</em> Deprecate <code>Servant.Utils.StaticUtils</code>, use <code>Servant.Server.StaticUtils</code>.</p></li> |
| 48 | +</ul> |
| 49 | + |
| 50 | +<div class="post-info"> |
| 51 | + Posted on July 5, 2018 |
| 52 | + |
| 53 | + by The servant team |
| 54 | + |
| 55 | +</div> |
| 56 | +</div> |
| 57 | + </div></div> |
| 58 | + <div id="footer" class="grid-container"><div class="grid-x"><div class="cell"> |
| 59 | + Site proudly generated by |
| 60 | + <a href="http://jaspervdj.be/hakyll">Hakyll</a> |
| 61 | + - |
| 62 | + <a href="https://github.com/haskell-servant/haskell-servant.github.io">Source</a> |
| 63 | + </div></div<> |
| 64 | + </body> |
| 65 | +</html> |
0 commit comments