From 18cf52f9027a036cd7e40e48074471d48182f5a0 Mon Sep 17 00:00:00 2001 From: snoyberg Date: Fri, 20 Dec 2024 05:43:58 +0000 Subject: [PATCH] Apply automatic changes --- public/book-1.6/basics.html | 8 ++--- public/book-1.6/haskell.html | 6 ++-- public/book-1.6/introduction.html | 2 +- public/book-1.6/shakespearean-templates.html | 16 ++++----- public/book-1.6/widgets.html | 38 ++++++++++---------- public/book/basics.html | 8 ++--- public/book/haskell.html | 6 ++-- public/book/introduction.html | 2 +- public/book/shakespearean-templates.html | 16 ++++----- public/book/widgets.html | 38 ++++++++++---------- 10 files changed, 68 insertions(+), 72 deletions(-) diff --git a/public/book-1.6/basics.html b/public/book-1.6/basics.html index 9c3dcb7..be1548c 100644 --- a/public/book-1.6/basics.html +++ b/public/book-1.6/basics.html @@ -90,7 +90,7 @@

Routing

"GET" -> getHomeR _ -> badMethod -type Handler = HandlerT HelloWorld IO +type Handler = HandlerFor HelloWorld @@ -154,10 +154,10 @@

Handler function

whamlet is another quasi-quoter. In this case, it converts Hamlet syntax into a Widget. Hamlet is the default HTML templating engine in Yesod. Together with its siblings Cassius, Lucius and Julius, you can create HTML, CSS and -Javascript in a fully type-safe and compile-time-checked manner. We’ll see much +JavaScript in a fully type-safe and compile-time-checked manner. We’ll see much more about this in the Shakespeare chapter.

Widgets are another cornerstone of Yesod. They allow you to create modular -components of a site consisting of HTML, CSS and Javascript and reuse them +components of a site consisting of HTML, CSS and JavaScript and reuse them throughout your site. We’ll get into more detail on them in the widgets chapter.

@@ -204,7 +204,7 @@

Running

Once again we mention HelloWorld in our main function. Our foundation contains all the information we need to route and respond to requests in our application; now we just need to convert it into something that can run. A -useful function for this in Yesod is warp, which runs the Warp webserver with +useful function for this in Yesod is warp, which runs the Warp web server with a number of default settings enabled on the specified port (here, it’s 3000).

One of the features of Yesod is that you aren’t tied down to a single deployment strategy. Yesod is built on top of the Web Application Interface diff --git a/public/book-1.6/haskell.html b/public/book-1.6/haskell.html index d5ebe0a..9b01042 100644 --- a/public/book-1.6/haskell.html +++ b/public/book-1.6/haskell.html @@ -22,7 +22,7 @@

Additionally, there are a number of great articles on -School of Haskell.

+FP Complete’s Haskell’s hub.

In order to use Yesod, you’re going to have to know at least the basics of Haskell. Additionally, Yesod uses some features of Haskell that aren’t covered in most introductory texts. While this book assumes the reader has a basic @@ -150,7 +150,7 @@

Language Pragmas

I personally never use the GHC command line argument approach. It’s a personal -preference, but I like to have my settings clearly stated in a file. In general +preference, but I like to have my settings clearly stated in a file. In general, it’s recommended to avoid putting extensions in your cabal file; however, this rule mostly applies when writing publicly available libraries. When you’re writing an application that you and your team will be working on, having all of @@ -281,7 +281,7 @@

Template Haskell

A nice trick is that TH code is allowed to perform arbitrary IO actions, and therefore we can place some input in external files and have it parsed at compile time. One example usage is to have compile-time checked HTML, CSS, and -Javascript templates.

+JavaScript templates.

If your Template Haskell code is being used to generate declarations, and is being placed at the top level of our file, we can leave off the dollar sign and parentheses. In other words:

diff --git a/public/book-1.6/introduction.html b/public/book-1.6/introduction.html index d3f6bff..b42dd8b 100644 --- a/public/book-1.6/introduction.html +++ b/public/book-1.6/introduction.html @@ -9,7 +9,7 @@ process a more pleasant one. As a community, we have continually pushed new techniques to try and solve some of the lingering difficulties of security threats, the stateless nature of HTTP, the multiple languages (HTML, CSS, -Javascript) necessary to create a powerful web application, and more.

+JavaScript) necessary to create a powerful web application, and more.

Yesod attempts to ease the web development process by playing to the strengths of the Haskell programming language. Haskell’s strong compile-time guarantees of correctness not only encompass types; referential transparency ensures that diff --git a/public/book-1.6/shakespearean-templates.html b/public/book-1.6/shakespearean-templates.html index 1162371..8198a71 100644 --- a/public/book-1.6/shakespearean-templates.html +++ b/public/book-1.6/shakespearean-templates.html @@ -6,7 +6,7 @@

Yesod uses the Shakespearean family of template languages as its standard -approach to HTML, CSS and Javascript creation. This language family shares some +approach to HTML, CSS and JavaScript creation. This language family shares some common syntax, as well as overarching principles:

Additionally, there are a number of great articles on -School of Haskell.

+FP Complete’s Haskell’s hub.

In order to use Yesod, you’re going to have to know at least the basics of Haskell. Additionally, Yesod uses some features of Haskell that aren’t covered in most introductory texts. While this book assumes the reader has a basic @@ -150,7 +150,7 @@

Language Pragmas

I personally never use the GHC command line argument approach. It’s a personal -preference, but I like to have my settings clearly stated in a file. In general +preference, but I like to have my settings clearly stated in a file. In general, it’s recommended to avoid putting extensions in your cabal file; however, this rule mostly applies when writing publicly available libraries. When you’re writing an application that you and your team will be working on, having all of @@ -281,7 +281,7 @@

Template Haskell

A nice trick is that TH code is allowed to perform arbitrary IO actions, and therefore we can place some input in external files and have it parsed at compile time. One example usage is to have compile-time checked HTML, CSS, and -Javascript templates.

+JavaScript templates.

If your Template Haskell code is being used to generate declarations, and is being placed at the top level of our file, we can leave off the dollar sign and parentheses. In other words:

diff --git a/public/book/introduction.html b/public/book/introduction.html index e00d8c1..003f105 100644 --- a/public/book/introduction.html +++ b/public/book/introduction.html @@ -9,7 +9,7 @@ process a more pleasant one. As a community, we have continually pushed new techniques to try and solve some of the lingering difficulties of security threats, the stateless nature of HTTP, the multiple languages (HTML, CSS, -Javascript) necessary to create a powerful web application, and more.

+JavaScript) necessary to create a powerful web application, and more.

Yesod attempts to ease the web development process by playing to the strengths of the Haskell programming language. Haskell’s strong compile-time guarantees of correctness not only encompass types; referential transparency ensures that diff --git a/public/book/shakespearean-templates.html b/public/book/shakespearean-templates.html index d6b2296..e1c5159 100644 --- a/public/book/shakespearean-templates.html +++ b/public/book/shakespearean-templates.html @@ -6,7 +6,7 @@

Yesod uses the Shakespearean family of template languages as its standard -approach to HTML, CSS and Javascript creation. This language family shares some +approach to HTML, CSS and JavaScript creation. This language family shares some common syntax, as well as overarching principles: