Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

typo

  • Loading branch information...
commit 74e35dfbda0cc953a547291ab8a658c0c91c7d34 1 parent 991d7b7
@afiskon afiskon authored
View
4 blog/2011/2/announcing-yesod-0-7.html
@@ -29,5 +29,5 @@ <h2 id="next-steps">Next steps</h2>
<li><p>In addition to Cassius, I hope to add Lucius to the hamlet package. Lucius will be a new syntax that is similar to Less. In other words, it will be a superset of CSS3. It will use the same underlying types as Cassius, so it should be easy to swap between the two of them, or use both in the same project. Anyone interested in helping on this is welcome to contact me.</p></li>
<li><p>There will likely be major changes to yesod-form. In particular, I think that polymorphic forms was a bad idea, and I want to investigate basing things on Jasper's <a href="http://hackage.haskell.org/package/digestive-functors">digestive-functors</a>. Because yesod-form is now a separate package, it should be possible to experiment with this new approach without moving to a new version of Yesod. I need to investigate more, but I think it's likely that experimental versions will be released under the package yesod-form-dev.</p></li>
<li><p>I'm looking for co-maintainers on packages. The idea is to spread knowledge around (you know, just in case I get hit by a bus), get fresh eyes to look at problems, and free up some of my time. With the new smaller-packages approach, I think this should be much easier to achieve. If anyone sees a package that they would like to help out with, please send me an email.</p></li>
-<li><p>One new project I'm hoping to embark on soon is LambdaEngine. This will be both a library for supporting hot-loading of WAI applications, and a hosting service for WAI apps. My initial goal is to migrate my current set of applications to a new server using this (you may have noticed that my web pages get downtime occassionally, it's almost always that my node has &quot;had issues&quot;). I'm hoping to make this as easy-to-use as possible, and possibly even provide free hosting for apps, though we'll need to see how that works for me budget-wise. Don't expect any big announcements on this immediately, but if you're interested in the idea let me know.</p></li>
-</ul>
+<li><p>One new project I'm hoping to embark on soon is LambdaEngine. This will be both a library for supporting hot-loading of WAI applications, and a hosting service for WAI apps. My initial goal is to migrate my current set of applications to a new server using this (you may have noticed that my web pages get downtime occasionally, it's almost always that my node has &quot;had issues&quot;). I'm hoping to make this as easy-to-use as possible, and possibly even provide free hosting for apps, though we'll need to see how that works for me budget-wise. Don't expect any big announcements on this immediately, but if you're interested in the idea let me know.</p></li>
+</ul>
View
4 blog/2011/6/cookbook-part-2.html
@@ -104,7 +104,7 @@
backend-agnostic, such as not relying on relational features of SQL. My experience has
been you can easily perform 95% of what you need to do with the high-level interface.
(In fact, most of my web apps use the high level interface exclusively.)</p>
- <p class="hascomments" id="file845-persistent-raw-sql-x2">But occassionally you&#39;ll want to use a feature that&#39;s specific to a backend. One feature I&#39;ve
+ <p class="hascomments" id="file845-persistent-raw-sql-x2">But occasionally you&#39;ll want to use a feature that&#39;s specific to a backend. One feature I&#39;ve
used in the past is full text search. In this case, we&#39;ll use the SQL &quot;LIKE&quot; operator, which is
not modeled in Persistent. We&#39;ll get all people with the last name &quot;Snoyman&quot; and print the
records out.</p>
@@ -197,4 +197,4 @@
defaultLayout $ addJulius [julius|alert(&quot;#{render MsgHello}&quot;)|]
main :: IO ()
-main = warpDebug 3000 JI</pre>
+main = warpDebug 3000 JI</pre>
View
6 blog/2011/8/new-forms-chapter.html
@@ -467,7 +467,7 @@
things you should be aware of:</p>
<ul id="file441-i18n-ul_pgx_iyg_md"><li id="file441-i18n-x2">There is an automatic instance of RenderMessage for Text in every site, so you can just use
plain strings if you don&#39;t care about i18n support. However, you may need to use explicit type
- signatures occassionally.</li>
+ signatures occasionally.</li>
<li id="file441-i18n-x3">yesod-form expresses all of its messages in terms of the FormMessage datatype. Therefore, to
use yesod-form, you&#39;ll need to have an appropriate RenderMessage instance. A simple one that
uses the default English translations would
@@ -476,7 +476,7 @@
</pre></pre>This
is provided automatically by the scaffolded site.</li>
<li id="file441-i18n-x5">In order to allow multiple different message types to co-exist, we use an existential type
- called SomeMessage. You will occassionally need to wrap your values inside of it, though this is
+ called SomeMessage. You will occasionally need to wrap your values inside of it, though this is
not common in normal library use.</li>
</ul>
</section><section .subtopic=""><h1>TODO</h1>
@@ -486,4 +486,4 @@
<li id="file442-todo-x4">Creating new fields</li>
</ul>
<p class="hascomments" id="file442-todo-x5">If you can think of anything else it&#39;s missing, please leave a comment.</p>
- </section>
+ </section>
View
8 blog/2011/8/persistent-0-6-0.html
@@ -363,7 +363,7 @@
apply.</p>
<pre class="codeblock"><pre style="padding: 0;margin: 0;">updateWhere [<span style="color: blue;">PersonFirstName</span> ==. <span style="color: green;">&quot;Michael&quot;</span>] [<span style="color: blue;">PersonAge</span> *=. <span style="color: teal;">2</span>] <span style="color: gray;">-- it&#39;s been a long day</span>
</pre></pre>
- <p class="hascomments" id="file816-update-x11">Occassionally, you&#39;ll just want to completely replace the value in a database with a different
+ <p class="hascomments" id="file816-update-x11">Occasionally, you&#39;ll just want to completely replace the value in a database with a different
value. For that, you use (surprise) the replace function.</p>
<pre class="codeblock"><pre style="padding: 0;margin: 0;">personId &lt;- insert $ <span style="color: blue;">Person</span> <span style="color: green;">&quot;Michael&quot;</span> <span style="color: green;">&quot;Snoyman&quot;</span> <span style="color: teal;">26</span>
replace personId $ <span style="color: blue;">Person</span> <span style="color: green;">&quot;John&quot;</span> <span style="color: green;">&quot;Doe&quot;</span> <span style="color: teal;">20</span>
@@ -589,7 +589,7 @@
back through this whole chapter: not once did we need to deal with the Key or Generic stuff
directly. The most common place for it to pop up is in compiler error messages. So it&#39;s important
to be aware that this exists, but it shouldn&#39;t affect you on a day-to-day basis.</p>
- </section><section .subtopic=""><h1>Custom Fields</h1><p class="hascomments" id="file822-custom-fields-cf1">Occassionally, you will want to define a custom field to be used in your datastore. The most common case is an enumeration, such as employment status. For this, Persistent provides a helper Template Haskell function:</p><pre class="codeblock"><pre style="padding: 0;margin: 0;"><span style="color: gray;">{-# LANGUAGE QuasiQuotes, TypeFamilies, GeneralizedNewtypeDeriving, TemplateHaskell, OverloadedStrings, GADTs #-}</span>
+ </section><section .subtopic=""><h1>Custom Fields</h1><p class="hascomments" id="file822-custom-fields-cf1">Occasionally, you will want to define a custom field to be used in your datastore. The most common case is an enumeration, such as employment status. For this, Persistent provides a helper Template Haskell function:</p><pre class="codeblock"><pre style="padding: 0;margin: 0;"><span style="color: gray;">{-# LANGUAGE QuasiQuotes, TypeFamilies, GeneralizedNewtypeDeriving, TemplateHaskell, OverloadedStrings, GADTs #-}</span>
<span style="color: green;font-weight: bold;">import</span> <span style="color: blue;">Database.Persist</span>
<span style="color: green;font-weight: bold;">import</span> <span style="color: blue;">Database.Persist.Sqlite</span>
<span style="color: green;font-weight: bold;">import</span> <span style="color: blue;">Database.Persist.TH</span>
@@ -614,7 +614,7 @@
backend-agnostic, such as not relying on relational features of SQL. My experience has
been you can easily perform 95% of what you need to do with the high-level interface.
(In fact, most of my web apps use the high level interface exclusively.)</p>
- <p class="hascomments" id="file823-persistent-raw-sql-x2">But occassionally you&#39;ll want to use a feature that&#39;s specific to a backend. One feature I&#39;ve
+ <p class="hascomments" id="file823-persistent-raw-sql-x2">But occasionally you&#39;ll want to use a feature that&#39;s specific to a backend. One feature I&#39;ve
used in the past is full text search. In this case, we&#39;ll use the SQL &quot;LIKE&quot; operator, which is
not modeled in Persistent. We&#39;ll get all people with the last name &quot;Snoyman&quot; and print the
records out.</p>
@@ -738,4 +738,4 @@
when a result can&#39;t be found, it returns a 404 message page. The getPersonR function is a very
common approach used in real-world Yesod applications: get404 a value and then return a response
based on it.</p>
- </section>
+ </section>
View
4 blog/2011/9/new-book-content.html
@@ -268,7 +268,7 @@
</pre></pre>
<h1>Custom fields</h1>
<p class="hascomments" id="file1370-custom-x-3">The fields that come built-in with Yesod will likely cover the vast majority of your
- form needs. But occassionally, you&#39;ll need something more specialized. Fortunately, you can
+ form needs. But occasionally, you&#39;ll need something more specialized. Fortunately, you can
create new forms in Yesod yourself. The <code id="file1370-custom-x-19">Field</code> datatype has two records:
<code id="file1370-custom-x-20">fieldParse</code> takes a list of values submitted by the user and returns one of
three results:</p>
@@ -323,4 +323,4 @@
&lt;input <span style="color: green;font-weight: bold;">type</span>=submit value=<span style="color: green;">&quot;Change password&quot;</span>&gt;
|]
</pre></pre>
-
+
View
4 blog/2012/1/conduits-conduits.html
@@ -155,7 +155,7 @@
</pre></pre>
<p class="hascomments">There is in fact one last way of expressing the same idea. I&#39;ll leave it as an exercise to the
reader to discover it.</p>
- <p class="hascomments">It may seem like all these different approaches are redundant. While occassionally you can in
+ <p class="hascomments">It may seem like all these different approaches are redundant. While occasionally you can in
fact choose whichever approach you feel like using, in many cases you will need a specific
approach. For example:</p>
<ul id="file1719-conceptId-ul_c3efe67b-809e-4b36-a534-dace20035bc7"><li>If you have a stream of numbers, and you want to apply a conduit (e.g., <code>map
@@ -308,4 +308,4 @@
cover some real-life use cases for conduits, and give examples of where libraries like
<a href="http://hackage.haskell.org/package/http-conduit">http-conduit</a> and the upcoming conduit-based <a href="http://hackage.haskell.org/package/wai">wai</a> can be
used together.</p>
-
+
View
2  book/chapters/authentication-and-authorization.dita
@@ -170,7 +170,7 @@ main = do
<image href="../images/after-login.png" id="162-image_gz2_v3f_p2"/>
</fig>
</conbody></concept><concept id="email-163"><title>Email</title><conbody>
- <p id="163-x-3">For many use cases, third-party authentication of email will be sufficient. Occassionally,
+ <p id="163-x-3">For many use cases, third-party authentication of email will be sufficient. Occasionally,
you'll want users to actual create passwords on your site. The scaffolded site does not include
this setup, because:</p>
<ul id="163-ul_mmf_nsk_pe">
View
4 book/chapters/conduits.dita
@@ -1058,7 +1058,7 @@ main = return ()</codeblock>
=$ CL.consume</codeblock>
<p>There is in fact one last way of expressing the same idea. I'll leave it as an exercise to the
reader to discover it.</p>
- <p>It may seem like all these different approaches are redundant. While occassionally you can in
+ <p>It may seem like all these different approaches are redundant. While occasionally you can in
fact choose whichever approach you feel like using, in many cases you will need a specific
approach. For example:</p>
<ul id="232-ul_c3efe67b-809e-4b36-a534-dace20035bc7">
@@ -1463,4 +1463,4 @@ main = return ()</codeblock>
<p>But the major changes are in the <codeph>handleConn</codeph> function. We now start off by
buffering our source. This buffered source is then used twice in our function, and then passed
off to the application.</p>
- </conbody></concept></concept></concept>
+ </conbody></concept></concept></concept>
View
6 book/chapters/forms.dita
@@ -1002,7 +1002,7 @@ getCarR = do
<ul id="100-ul_pgx_iyg_md">
<li id="100-x2">There is an automatic instance of <codeph id="100-x-6">RenderMessage</codeph> for
<codeph id="100-x-7">Text</codeph> in every site, so you can just use plain strings if you don't care about
- i18n support. However, you may need to use explicit type signatures occassionally.</li>
+ i18n support. However, you may need to use explicit type signatures occasionally.</li>
<li id="100-x3"><codeph id="100-x-8">yesod-form</codeph> expresses all of its messages in terms of the
<codeph id="100-x-9">FormMessage</codeph> datatype. Therefore, to use <codeph id="100-x-10">yesod-form</codeph>, you'll
need to have an appropriate <codeph id="100-x-11">RenderMessage</codeph> instance. A simple one that uses the
@@ -1011,7 +1011,7 @@ getCarR = do
renderMessage _ _ = defaultFormMessage</codeblock>This
is provided automatically by the scaffolded site.</li>
<!-- Perhaps include this later? <li id="x5">In order to allow multiple different message types to co-exist, we use an existential
- type called <codeph id="x-12">SomeMessage</codeph>. You will occassionally need to wrap your values inside
+ type called <codeph id="x-12">SomeMessage</codeph>. You will occasionally need to wrap your values inside
of it, though this is not common in normal library use.</li>-->
</ul>
</conbody></concept><concept id="monadic-101"><title>Monadic Forms</title><conbody>
@@ -1184,7 +1184,7 @@ main :: IO ()
main = warpDebug 3000 Input</codeblock>
</conbody></concept><concept id="custom-103"><title>Custom fields</title><conbody>
<p id="103-x-3">The fields that come built-in with Yesod will likely cover the vast majority of your
- form needs. But occassionally, you'll need something more specialized. Fortunately, you can
+ form needs. But occasionally, you'll need something more specialized. Fortunately, you can
create new forms in Yesod yourself. The <codeph id="103-x-19">Field</codeph> datatype has two records:
<codeph id="103-x-20">fieldParse</codeph> takes a list of values submitted by the user and returns one of
three results:</p>
View
4 book/chapters/persistent.dita
@@ -1245,7 +1245,7 @@ type PostId = Key SqlPersist Post</codeblock>
<codeph id="131-x-31">Key</codeph> or <codeph id="131-x-32">Generic</codeph> stuff directly. The most common place for it to
pop up is in compiler error messages. So it's important to be aware that this exists, but it
shouldn't affect you on a day-to-day basis.</p>
- </conbody></concept><concept id="custom-fields-132"><title>Custom Fields</title><conbody><p id="132-cf1">Occassionally, you will want to define a custom field to be used in your datastore. The most common case is an enumeration, such as employment status. For this, Persistent provides a helper Template Haskell function:</p><codeblock id="132-x1" outputclass="haskell">-- START
+ </conbody></concept><concept id="custom-fields-132"><title>Custom Fields</title><conbody><p id="132-cf1">Occasionally, you will want to define a custom field to be used in your datastore. The most common case is an enumeration, such as employment status. For this, Persistent provides a helper Template Haskell function:</p><codeblock id="132-x1" outputclass="haskell">-- START
{-# LANGUAGE QuasiQuotes, TypeFamilies, GeneralizedNewtypeDeriving, TemplateHaskell,
OverloadedStrings, GADTs, FlexibleContexts #-}
import Database.Persist
@@ -1277,7 +1277,7 @@ main = runResourceT $ withSqliteConn ":memory:" $ runSqlConn $ do
backend-agnostic, such as not relying on relational features of SQL. My experience has
been you can easily perform 95% of what you need to do with the high-level interface.
(In fact, most of my web apps use the high level interface exclusively.)</p>
- <p id="133-x2">But occassionally you'll want to use a feature that's specific to a backend. One feature I've
+ <p id="133-x2">But occasionally you'll want to use a feature that's specific to a backend. One feature I've
used in the past is full text search. In this case, we'll use the SQL "LIKE" operator, which is
not modeled in Persistent. We'll get all people with the last name "Snoyman" and print the
records out.</p>
View
4 book/chapters/routing-and-handlers.dita
@@ -221,7 +221,7 @@ main = warpDebug 3000 Args
common functions living in the <codeph id="84-x-23">Handler</codeph> monad. I am specifically <i id="84-x16">not</i> covering any of the session functions; that will be addressed in
the <xref id="84-x17" href="sessions.dita#sessions-105">sessions chapter</xref>.</p></conbody><concept id="application-information-85"><title>Application Information</title><conbody><p id="85-ghandler3">There are a number of functions that return information about your application as a whole, and give no information about individual requests. Some of these are:</p><dl id="85-x1"><dlentry id="85-x2"><dt id="85-x3">getYesod</dt><dd id="85-x4">Returns your applicaton foundation value. If you store configuration values in your foundation, you will probably end up using this function a lot.</dd></dlentry><dlentry id="85-x5"><dt id="85-x6">getYesodSub</dt><dd id="85-x7">Get the subsite foundation value. Unless you are working in a subsite, this will return the same value as <codeph id="85-x8">getYesod</codeph>.</dd></dlentry><dlentry id="85-x9"><dt id="85-x10">getUrlRender</dt><dd id="85-x11">Returns the <term id="85-x12">URL rendering function</term>, which converts a type-safe
URL into a <codeph id="85-x13">Text</codeph>. Most of the time- like with Hamlet-
- Yesod calls this function for you, but you may occassionally need to call it
+ Yesod calls this function for you, but you may occasionally need to call it
directly.</dd></dlentry><dlentry id="85-x14"><dt id="85-x15">getUrlRenderParams</dt><dd id="85-x16">A variant of <codeph id="85-x17">getUrlRender</codeph> that converts both a type-safe URL and a list of query-string parameters. This function handles all percent-encoding necessary.</dd></dlentry></dl></conbody></concept><concept id="request-information-86"><title>Request Information</title><conbody><p id="86-ghandler4">The most common information you will want to get about the current request is the
requested path, the query string parameters and POSTed form data. The first of those is
dealt with in the routing, as described above. The other two are best dealt with using
@@ -241,4 +241,4 @@ main = warpDebug 3000 Args
</dlentry></dl></conbody></concept><concept id="response-headers-88"><title>Response Headers</title><conbody><dl id="88-x1"><dlentry id="88-x2"><dt id="88-x3">setCookie</dt><dd id="88-x4">Set a cookie on the client. Instead of taking an expiration date, this function takes a cookie duration in minutes. Remember, you won't see this cookie using <codeph id="88-x5">lookupCookie</codeph> until the <i id="88-x6">following</i> request.</dd></dlentry><dlentry id="88-x7"><dt id="88-x8">deleteCookie</dt><dd id="88-x9">Tells the client to remove a cookie. Once again, <codeph id="88-x10">lookupCookie</codeph> will not reflect this change until the next request.</dd></dlentry><dlentry id="88-x11"><dt id="88-x12">setHeader</dt><dd id="88-x13">Set an arbitrary response header.</dd></dlentry><dlentry id="88-x14"><dt id="88-x15">setLanguage</dt><dd id="88-x16">Set the preferred user language, which will show up in the result of the <codeph id="88-x17">languages</codeph> function.</dd></dlentry><dlentry id="88-x18"><dt id="88-x19">cacheSeconds</dt><dd id="88-x20">Set a Cache-Control header to indicate how many seconds this response can be cached. This can be particularly useful if you are using <xref id="88-x21" href="http://www.varnish-cache.org" scope="external" format="html">varnish on your server</xref>.</dd></dlentry><dlentry id="88-x22"><dt id="88-x23">neverExpires</dt><dd id="88-x24">Set the Expires header to the year 2037. You can use this with content which should never expire, such as when the request path has a hash value associated with it.</dd></dlentry><dlentry id="88-x25"><dt id="88-x26">alreadyExpired</dt><dd id="88-x27">Sets the Expires header to the past.</dd></dlentry><dlentry id="88-x28"><dt id="88-x29">expiresAt</dt><dd id="88-x30">Sets the Expires header to the specified date/time.</dd></dlentry></dl></conbody></concept></concept><concept id="summary-89"><title>Summary</title><conbody><p id="89-summary1">Routing and dispatch is arguably the core of Yesod: it is from here that our
type-safe URLs are defined, and the majority of our code is written within the
<codeph id="89-x-3">Handler</codeph> monad. This chapter covered some of the most important and
- central concepts of Yesod, so it is important that you properly digest it.</p><p id="89-summary2">This chapter also hinted at a number of more complex Yesod topics that we will be covering later. But you should be able to write some very sophisticated web applications with just the knowledge you have learned up until here.</p></conbody></concept></concept>
+ central concepts of Yesod, so it is important that you properly digest it.</p><p id="89-summary2">This chapter also hinted at a number of more complex Yesod topics that we will be covering later. But you should be able to write some very sophisticated web applications with just the knowledge you have learned up until here.</p></conbody></concept></concept>
Please sign in to comment.
Something went wrong with that request. Please try again.