Skip to content

Commit

Permalink
Merge pull request #81 from anton-k/update-docs
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
anton-k authored Nov 26, 2023
2 parents b4f6152 + a386414 commit 18a76ff
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/src/11-html-goodies.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,20 +176,20 @@ data Urls = Urls
```

It resembles the handlers code only we use prefix `UrlOf`. This is a type-level
function that know which URL-creation function corresponds to handler.
function that knows which URL-creation function corresponds to handler.

For a static route with no arguments it will product just constant `Url`.
But for a route with argument the result URL also is going to depend on those arguments
For a static route with no arguments it will produce just constant `Url`.
But for a route with arguments the result URL also is going to depend on those arguments
in case that input is either `Query`, `Optional`, `QueryFlag` or `Capture`.
All those inputs affect the look of the resulting URL.

So for `ByeRoute` we get the type:
For example for `ByeRoute` we get the type:

```haskell
Query "user" Text -> Url
```

So we have correct types let's link URL to the server definition:
Let's link URLs to the server definition:

```haskell
urls :: Urls
Expand Down Expand Up @@ -237,7 +237,7 @@ And the proper corresponding URL text will be generated from arguments.
## How to use HTML-templates

In the previous examples we wrote HTML view code with `blaze-html` DSL.
All HTML construction is a Haskell function in this style. But often it is
The HTML construction is a Haskell function in this style. But often it is
desirable to write HTML with the *holes* in it. So that holes can be substituted
with values at run-time. Those files are called templates. Often templates
are written by Web-designers.
Expand Down Expand Up @@ -462,7 +462,7 @@ We are not limited with `mustache` for templates. The Haskell has many
great templating libraries which also can be used like [`shakespeare`](https://hackage.haskell.org/package/shakespeare)
or [heist](https://hackage.haskell.org/package/heist) and many others.

I've chose `stache` as it ports very widespread and simple solution.
I've chosen `stache` as it ports very widespread and simple solution `mustache` to Haskell.
But other template engines can be used in the same way. The `mig` library is not tied
to any of those libraries. Although I've tried `stache` and highly recommend it.
It's easy to use and versatile.
Expand Down

0 comments on commit 18a76ff

Please sign in to comment.