Merge branch 'master' into next
This commit is contained in:
commit
b029e2a8ab
5 changed files with 25 additions and 25 deletions
|
@ -242,7 +242,7 @@ Let's take a look at the file `config/routes`:
|
|||
/favicon.ico FaviconR GET
|
||||
/robots.txt RobotsR GET
|
||||
|
||||
/ RootR GET
|
||||
/ HomeR GET
|
||||
</pre>
|
||||
|
||||
We want to add a route of the form `/echo/[anything]` somehow and do some action with this.
|
||||
|
@ -262,7 +262,7 @@ Application.hs:31:1: Not in scope: `getEchoR'
|
|||
</pre>
|
||||
|
||||
Why? Simply because we didn't written the code for the handler `EchoR`.
|
||||
Edit the file `Handler/Root.hs` and append this:
|
||||
Edit the file `Handler/Home.hs` and append this:
|
||||
|
||||
<code class="haskell">
|
||||
getEchoR :: String -> Handler RepHtml
|
||||
|
@ -382,17 +382,17 @@ getEchoR theText = do
|
|||
[whamlet|<h1>#{theText}|]
|
||||
</code>
|
||||
|
||||
Do not forget to remove the getEchoR function inside `Handler/Root.hs`.
|
||||
Do not forget to remove the getEchoR function inside `Handler/Home.hs`.
|
||||
|
||||
We must declare this new file into`yosog.cabal`.
|
||||
Just after `Handler.Root`, add:
|
||||
Just after `Handler.Home`, add:
|
||||
|
||||
<pre>
|
||||
Handler.Echo
|
||||
</pre>
|
||||
|
||||
We must also declare this new Handler module inside `Application.hs`.
|
||||
Just after the "`import Handler.Root`", add:
|
||||
Just after the "`import Handler.Home`", add:
|
||||
|
||||
<code class="haskell">
|
||||
import Handler.Echo
|
||||
|
|
|
@ -243,7 +243,7 @@ Let's take a look at the file `config/routes`:
|
|||
/favicon.ico FaviconR GET
|
||||
/robots.txt RobotsR GET
|
||||
|
||||
/ RootR GET
|
||||
/ HomeR GET
|
||||
</pre>
|
||||
|
||||
We want to add a route of the form `/echo/[anything]` somehow and do some action with this.
|
||||
|
@ -263,7 +263,7 @@ Application.hs:31:1: Not in scope: `getEchoR'
|
|||
</pre>
|
||||
|
||||
Why? Simply because we didn't written the code for the handler `EchoR`.
|
||||
Edit the file `Handler/Root.hs` and append this:
|
||||
Edit the file `Handler/Home.hs` and append this:
|
||||
|
||||
<code class="haskell">
|
||||
getEchoR :: String -> Handler RepHtml
|
||||
|
@ -383,17 +383,17 @@ getEchoR theText = do
|
|||
[whamlet|<h1>#{theText}|]
|
||||
</code>
|
||||
|
||||
Do not forget to remove the getEchoR function inside `Handler/Root.hs`.
|
||||
Do not forget to remove the getEchoR function inside `Handler/Home.hs`.
|
||||
|
||||
We must declare this new file into`yosog.cabal`.
|
||||
Just after `Handler.Root`, add:
|
||||
Just after `Handler.Home`, add:
|
||||
|
||||
<pre>
|
||||
Handler.Echo
|
||||
</pre>
|
||||
|
||||
We must also declare this new Handler module inside `Application.hs`.
|
||||
Just after the "`import Handler.Root`", add:
|
||||
Just after the "`import Handler.Home`", add:
|
||||
|
||||
<code class="haskell">
|
||||
import Handler.Echo
|
||||
|
|
|
@ -249,7 +249,7 @@ Let's take a look at the file `config/routes`:
|
|||
/favicon.ico FaviconR GET
|
||||
/robots.txt RobotsR GET
|
||||
|
||||
/ RootR GET
|
||||
/ HomeR GET
|
||||
</pre>
|
||||
|
||||
We want to add a route of the form `/echo/[anything]` somehow and do some action with this.
|
||||
|
@ -269,7 +269,7 @@ Application.hs:31:1: Not in scope: `getEchoR'
|
|||
</pre>
|
||||
|
||||
Why? Simply because we didn't written the code for the handler `EchoR`.
|
||||
Edit the file `Handler/Root.hs` and append this:
|
||||
Edit the file `Handler/Home.hs` and append this:
|
||||
|
||||
<code class="haskell">
|
||||
getEchoR :: String -> Handler RepHtml
|
||||
|
@ -389,17 +389,17 @@ getEchoR theText = do
|
|||
[whamlet|<h1>#{theText}|]
|
||||
</code>
|
||||
|
||||
Do not forget to remove the getEchoR function inside `Handler/Root.hs`.
|
||||
Do not forget to remove the getEchoR function inside `Handler/Home.hs`.
|
||||
|
||||
We must declare this new file into`yosog.cabal`.
|
||||
Just after `Handler.Root`, add:
|
||||
Just after `Handler.Home`, add:
|
||||
|
||||
<pre>
|
||||
Handler.Echo
|
||||
</pre>
|
||||
|
||||
We must also declare this new Handler module inside `Application.hs`.
|
||||
Just after the "`import Handler.Root`", add:
|
||||
Just after the "`import Handler.Home`", add:
|
||||
|
||||
<code class="haskell">
|
||||
import Handler.Echo
|
||||
|
|
|
@ -326,7 +326,7 @@ Let’s take a look at the file <code>config/routes</code>:</p>
|
|||
/favicon.ico FaviconR GET
|
||||
/robots.txt RobotsR GET
|
||||
|
||||
/ RootR GET
|
||||
/ HomeR GET
|
||||
</pre>
|
||||
|
||||
<p>We want to add a route of the form <code>/echo/[anything]</code> somehow and do some action with this.
|
||||
|
@ -346,7 +346,7 @@ Application.hs:31:1: Not in scope: `getEchoR'
|
|||
</pre>
|
||||
|
||||
<p>Why? Simply because we didn’t written the code for the handler <code>EchoR</code>.
|
||||
Edit the file <code>Handler/Root.hs</code> and append this:</p>
|
||||
Edit the file <code>Handler/Home.hs</code> and append this:</p>
|
||||
|
||||
<pre class="twilight">
|
||||
<span class="Entity">getEchoR</span> :: <span class="Constant">String</span> -> <span class="Constant">Handler</span> <span class="Constant">RepHtml</span>
|
||||
|
@ -468,17 +468,17 @@ getEchoR theText = <span class="Keyword">do</span>
|
|||
[whamlet|<h1>#{theText}|]
|
||||
</pre>
|
||||
|
||||
<p>Do not forget to remove the getEchoR function inside <code>Handler/Root.hs</code>.</p>
|
||||
<p>Do not forget to remove the getEchoR function inside <code>Handler/Home.hs</code>.</p>
|
||||
|
||||
<p>We must declare this new file into<code>yosog.cabal</code>.
|
||||
Just after <code>Handler.Root</code>, add:</p>
|
||||
Just after <code>Handler.Home</code>, add:</p>
|
||||
|
||||
<pre>
|
||||
Handler.Echo
|
||||
</pre>
|
||||
|
||||
<p>We must also declare this new Handler module inside <code>Application.hs</code>.
|
||||
Just after the “<code>import Handler.Root</code>”, add:</p>
|
||||
Just after the “<code>import Handler.Home</code>”, add:</p>
|
||||
|
||||
<pre class="twilight">
|
||||
<span class="Keyword">import</span> <span class="Constant">Handler</span>.<span class="Constant">Echo</span>
|
||||
|
|
|
@ -327,7 +327,7 @@ Let’s take a look at the file <code>config/routes</code>:</p>
|
|||
/favicon.ico FaviconR GET
|
||||
/robots.txt RobotsR GET
|
||||
|
||||
/ RootR GET
|
||||
/ HomeR GET
|
||||
</pre>
|
||||
|
||||
<p>We want to add a route of the form <code>/echo/[anything]</code> somehow and do some action with this.
|
||||
|
@ -347,7 +347,7 @@ Application.hs:31:1: Not in scope: `getEchoR'
|
|||
</pre>
|
||||
|
||||
<p>Why? Simply because we didn’t written the code for the handler <code>EchoR</code>.
|
||||
Edit the file <code>Handler/Root.hs</code> and append this:</p>
|
||||
Edit the file <code>Handler/Home.hs</code> and append this:</p>
|
||||
|
||||
<pre class="twilight">
|
||||
<span class="Entity">getEchoR</span> :: <span class="Constant">String</span> -> <span class="Constant">Handler</span> <span class="Constant">RepHtml</span>
|
||||
|
@ -469,17 +469,17 @@ getEchoR theText = <span class="Keyword">do</span>
|
|||
[whamlet|<h1>#{theText}|]
|
||||
</pre>
|
||||
|
||||
<p>Do not forget to remove the getEchoR function inside <code>Handler/Root.hs</code>.</p>
|
||||
<p>Do not forget to remove the getEchoR function inside <code>Handler/Home.hs</code>.</p>
|
||||
|
||||
<p>We must declare this new file into<code>yosog.cabal</code>.
|
||||
Just after <code>Handler.Root</code>, add:</p>
|
||||
Just after <code>Handler.Home</code>, add:</p>
|
||||
|
||||
<pre>
|
||||
Handler.Echo
|
||||
</pre>
|
||||
|
||||
<p>We must also declare this new Handler module inside <code>Application.hs</code>.
|
||||
Just after the “<code>import Handler.Root</code>”, add:</p>
|
||||
Just after the “<code>import Handler.Home</code>”, add:</p>
|
||||
|
||||
<pre class="twilight">
|
||||
<span class="Keyword">import</span> <span class="Constant">Handler</span>.<span class="Constant">Echo</span>
|
||||
|
|
Loading…
Reference in a new issue