<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"/><title>Servant.Common.Text</title><linkhref="ocean.css"rel="stylesheet"type="text/css"title="Ocean"/><scriptsrc="haddock-util.js"type="text/javascript"></script><scripttype="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Servant-Common-Text.html");};
</script></head><body><divid="package-header"><ulclass="links"id="page-menu"><li><ahref="src/Servant-Common-Text.html">Source</a></li><li><ahref="index.html">Contents</a></li><li><ahref="doc-index.html">Index</a></li></ul><pclass="caption">servant-0.2: A family of combinators for defining webservices APIs and serving them</p></div><divid="content"><divid="module-header"><tableclass="info"><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><pclass="caption">Servant.Common.Text</p></div><divid="synopsis"><pid="control.syn"class="caption expander"onclick="toggleSection('syn')">Synopsis</p><ulid="section.syn"class="hide"onclick="toggleSection('syn')"><liclass="src short"><spanclass="keyword">class</span><ahref="#t:FromText">FromText</a> a <spanclass="keyword">where</span><ulclass="subs"><li><ahref="#v:fromText">fromText</a> :: <ahref="https://hackage.haskell.org/package/text-1.2.0.0/docs/Data-Text.html#t:Text">Text</a> -><ahref="https://hackage.haskell.org/package/base-4.7.0.1/docs/Data-Maybe.html#t:Maybe">Maybe</a> a</li></ul></li><liclass="src short"><spanclass="keyword">class</span><ahref="#t:ToText">ToText</a> a <spanclass="keyword">where</span><ulclass="subs"><li><ahref="#v:toText">toText</a> :: a -><ahref="https://hackage.haskell.org/package/text-1.2.0.0/docs/Data-Text.html#t:Text">Text</a></li></ul></li></ul></div><divid="interface"><h1>Documentation</h1><divclass="top"><pclass="src"><spanclass="keyword">class</span><aname="t:FromText"class="def">FromText</a> a <spanclass="keyword">where</span><ahref="src/Servant-Common-Text.html#FromText"class="link">Source</a></p><divclass="doc"><p>For getting values from url captures and query string parameters</p></div><divclass="subs methods"><pclass="caption">Methods</p><pclass="src"><aname="v:fromText"class="def">fromText</a> :: <ahref="https://hackage.haskell.org/package/text-1.2.0.0/docs/Data-Text.html#t:Text">Text</a> -><ahref="https://hackage.haskell.org/package/base-4.7.0.1/docs/Data-Maybe.html#t:Maybe">Maybe</a> a <ahref="src/Servant-Common-Text.html#fromText"class="link">Source</a></p></div><divclass="subs instances"><pid="control.i:FromText"class="caption collapser"onclick="toggleSection('i:FromText')">Instances</p><divid="section.i:FromText"class="show"><table><tr><tdclass="src"><ahref="Servant-Common-Text.html#t:FromText">FromText</a><ahref="https://hackage.haskell.org/package/base-4.7.0.1/docs/Data-Bool.html#t:Bool">Bool</a></td><tdclass="doc"><pre>fromText "true" = Just True