Skip to content

Commit 897aa30

Browse files
authored
Merge pull request #6 from bwignall/typecheck
Replace "typecheck" with "type-check"
2 parents 50d0850 + 1fe1da7 commit 897aa30

7 files changed

+11
-7
lines changed

10-parsing-a-binary-data-format.org

+1-1
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ push a s = Item a s
805805
#+END_SRC
806806

807807
Try removing that ~Ord~ constraint above, and the definition of
808-
~push~ will fail to typecheck.
808+
~push~ will fail to type-check.
809809

810810
This is why our attempt to write a ~Functor~ instance for ~Bar~
811811
failed earlier: it would have required an ~Eq~ constraint to

12-barcode-recognition.org

+1-1
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ arrays.
342342
should return the leftmost element of the tuple. With an
343343
argument of one, it should return the next element. And so on.
344344
What restrictions do you have to put on the types of the
345-
arguments in order to write a function that typechecks
345+
arguments in order to write a function that type-checks
346346
correctly?
347347
2. Write a similar function that takes a six-tuple as its first
348348
argument.

26-building-a-bloom-filter.org

+1-1
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ The value of ~-fvia-C~ with the FFI
10541054
Compiling with ~-fvia-C~ has a useful safety benefit when we write
10551055
FFI bindings. If we mention a header file in an FFI declaration
10561056
(e.g. ~foreign import "string.h memcpy")~, the C compiler will
1057-
typecheck the generated Haskell code and ensure that its
1057+
type-check the generated Haskell code and ensure that its
10581058
invocation of the C function is consistent with the C function's
10591059
prototype in the header file.
10601060

4-functional-programming.org

+1-1
Original file line numberDiff line numberDiff line change
@@ -1910,7 +1910,7 @@ ghci> unsafeHead []
19101910
*** Exception: Lambda.hs:7:13-23: Non-exhaustive patterns in lambda
19111911
#+END_SRC
19121912

1913-
The definition typechecks, so it will compile, so the error will
1913+
The definition type-checks, so it will compile, so the error will
19141914
occur at runtime. The moral of this story is to be careful in how
19151915
you use patterns when defining an anonymous function: make sure
19161916
your patterns can't fail!

5-writing-a-library.org

+2-2
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ works becomes more accurate.
433433
#+BEGIN_TIP
434434
Explicit types, undefined values, and error
435435

436-
The special value ~undefined~ will happily typecheck no matter
436+
The special value ~undefined~ will happily type-check no matter
437437
where we use it, as will an expression like ~error "argh!"~. It is
438438
especially important that we write type signatures when we use
439439
these. Suppose we use ~undefined~ or ~error "write me"~ to act as
@@ -536,7 +536,7 @@ double num = undefined
536536
#+END_SRC
537537

538538
The special value ~undefined~ has the type ~a~, so it always
539-
typechecks, no matter where we use it. If we attempt to evaluate
539+
type-checks, no matter where we use it. If we attempt to evaluate
540540
it, it will cause our program to crash.
541541

542542
#+BEGIN_SRC screen

9-a-library-for-searching-the-file-system.org

+1-1
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ betterFind (sizeP `equalP` 1024) :: FilePath -> IO [FilePath]
640640
#+END_SRC
641641

642642
Notice that we're not actually calling ~betterFind~, we're merely
643-
making sure that our expression typechecks. We now have a more
643+
making sure that our expression type-checks. We now have a more
644644
expressive way to list all files that are exactly some size. Our
645645
success gives us enough confidence to continue.
646646

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@ typeclass:
2121
sed -i 's/Typeclass/Type class/g' *.org
2222
sed -i 's/typeclass/type class/g' *.org
2323
sed -i 's/6-using-type classes.org/6-using-typeclasses.org/g' *.org
24+
25+
typecheck:
26+
# No instances of "Typecheck"
27+
sed -i 's/typecheck/type-check/g' *.org

0 commit comments

Comments
 (0)