Skip to content

Commit a2b88d8

Browse files
committed
Clean up whitespace
1 parent 28d926f commit a2b88d8

File tree

4 files changed

+32
-13
lines changed

4 files changed

+32
-13
lines changed

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,39 @@
11
PKG := software_foundations
2+
3+
24
# TODO: Find idris executable.
35
IDRIS ?= idris
46

7+
58
.PHONY: pdf site
69

10+
711
all: pdf site
812

13+
914
build:
1015
$(IDRIS) --build $(PKG).ipkg
1116

17+
1218
pdf:
1319
$(MAKE) -C src
1420
mv src/all.pdf docs/pdf/sf-idris-2016.pdf
1521

22+
1623
clean-all: clean clean-docs
1724

25+
1826
clean:
1927
$(IDRIS) --clean $(PKG).ipkg
2028

29+
2130
clean-docs:
2231
$(MAKE) -C src clean
2332
@$(RM) docs/index.html >/dev/null
2433

34+
2535
site: docs/index.html
2636

37+
2738
docs/index.html: README.md
2839
pandoc -f markdown_github -t html -s -o $@ $<

src/Basics.lidr

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ that can be used to prove simple properties of Idris programs.
6161

6262
One unusual aspect of Coq is that its set of built-in features is _extremely_
6363
small, For example, instead of providing the usual palette of atomic data types
64-
(booleans, integers, strings, etc.), Coq offers a powerful mechanism for
65-
defining new data types from scratch, from which all these familiar types arise
64+
(booleans, integers, strings, etc.), Coq offers a powerful mechanism for
65+
defining new data types from scratch, from which all these familiar types arise
6666
as instances.
6767

6868
Naturally, the Coq distribution comes with an extensive standard library
@@ -229,7 +229,7 @@ members `False` and `True`.
229229
data Bool = True | False
230230
```
231231

232-
This definition is written in the simplified style, similar to `Day`. It can
232+
This definition is written in the simplified style, similar to `Day`. It can
233233
also be written in the verbose style:
234234

235235
```idris
@@ -238,7 +238,7 @@ data Bool : Type where
238238
False : Bool
239239
```
240240

241-
The verbose style is more powerful because it allows us to assign precise
241+
The verbose style is more powerful because it allows us to assign precise
242242
types to individual constructors. This will become very useful later on.
243243

244244
Although we are rolling our own booleans here for the sake of building up
@@ -282,7 +282,7 @@ truth table -- for the `orb` function:
282282
-- TODO: Edit this
283283

284284
We can also introduce some familiar syntax for the boolean operations we have
285-
just defined. The `syntax` command defines a new symbolic notation for an
285+
just defined. The `syntax` command defines a new symbolic notation for an
286286
existing definition, and `infixl` specifies left-associative fixity.
287287
\color{black}
288288

@@ -301,9 +301,9 @@ existing definition, and `infixl` specifies left-associative fixity.
301301

302302
=== Exercises: 1 star (nandb)
303303

304-
Fill in the hole `?nandb_rhs` and complete the following function; then make
305-
sure that the assertions below can each be verified by Idris. (Fill in each of
306-
the holes, following the model of the `orb` tests above.) The function should
304+
Fill in the hole `?nandb_rhs` and complete the following function; then make
305+
sure that the assertions below can each be verified by Idris. (Fill in each of
306+
the holes, following the model of the `orb` tests above.) The function should
307307
return `True` if either or both of its inputs are `False`.
308308

309309
> nandb : (b1 : Bool) -> (b2 : Bool) -> Bool
@@ -395,8 +395,8 @@ Idris provides a _module system_, to aid in organizing large developments.
395395
> namespace Numbers
396396

397397
The types we have defined so far are examples of "enumerated types": their
398-
definitions explicitly enumerate a finite set of elements. A More interesting
399-
way of defining a type is to give a collection of _inductive rules_ describing
398+
definitions explicitly enumerate a finite set of elements. A More interesting
399+
way of defining a type is to give a collection of _inductive rules_ describing
400400
its elements. For example, we can define the natural numbers as follows:
401401

402402
```idris

src/Induction.lidr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,14 @@ plus_rearrange_firsttry n m p q = rewrite plus_comm in Refl
176176
```
177177
When checking right hand side of plus_rearrange_firsttry with expected type
178178
n + m + (p + q) = m + n + (p + q)
179-
179+
180180
_ does not have an equality type ((n1 : Nat) ->
181181
(n1 : Nat) -> plus n1 m1 = plus m1 n1)
182182
```
183183

184184
To get `plus_comm` to apply at the point where we want it to, we can introduce a
185-
local lemma using the `where` keyword stating that `n + m = m + n` (for the
186-
particular `m` and `n` that we are talking about here), prove this lemma using
185+
local lemma using the `where` keyword stating that `n + m = m + n` (for the
186+
particular `m` and `n` that we are talking about here), prove this lemma using
187187
`plus_comm`, and then use it to do the desired rewrite.
188188

189189
> plus_rearrange : (n, m, p, q : Nat) ->

src/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,40 @@
11
.DEFAULT_GOAL := all.pdf
22

3+
34
# TODO: Find pandoc executable.
45
PANDOC ?= pandoc
56

7+
68
PANDOC_FLAGS := \
79
--filter pandoc-minted.hs --latex-engine=xelatex \
810
-f markdown+lhs+tex_math_single_backslash -t latex+lhs \
911
--top-level-division=chapter
1012

13+
1114
LIDRFILES := Preface.lidr \
1215
Basics.lidr \
1316
Induction.lidr
1417
# TODO: Add more chapters, in order, here.
1518

19+
1620
TEXFILES := $(LIDRFILES:.lidr=.tex)
1721

1822

1923
.PHONY: all clean
2024

25+
2126
clean:
2227
rm -rf all.{aux,log,out,toc,pdf} _minted-all $(TEXFILES)
2328

29+
2430
all.pdf: all.tex
2531
latexmk -xelatex -e '$$pdflatex=q/xelatex %O --shell-escape %S/' $<
2632

33+
2734
all.tex: book.tex $(TEXFILES)
2835
$(PANDOC) $(PANDOC_FLAGS) -N --toc -o $@ \
2936
$(foreach texfile,$(TEXFILES),-A $(texfile)) $<
3037

38+
3139
%.tex: %.lidr
3240
$(PANDOC) $(PANDOC_FLAGS) -o $@ $<

0 commit comments

Comments
 (0)