commit ffa0a05e260e86ea64db9c6d1c18718934a17cfe
parent 9116cfd5a2ee8f60faaac3aa8fe79bfb9f385917
Author: Ben Greenman <benjaminlgreenman@gmail.com>
Date: Fri, 30 Sep 2016 10:14:01 -0400
[scribblings] respond to comments on PR #29
- add `#lang turnstile` to Sec 2.7
- use eval:error in @examples[]
- remove @literal
Diffstat:
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/turnstile/scribblings/guide.scrbl b/turnstile/scribblings/guide.scrbl
@@ -338,17 +338,8 @@ language implementation:
(λ ([x : Int][y : Int])
(f x y)))
+)
- 1 2))
-
-@#reader scribble/comment-reader
-(racketblock
- (+ 1 (λ ([x : Int]) x))
- ;; eval:3.0: #%app: type mismatch: expected Int, given (→ Int Int)
- ;; expression: (λ ((x : Int)) x)
- ;; at: (λ ((x : Int)) x)
- ;; in: (#%app + 1 (λ ((x : Int)) x))
-)
-
+ 1 2)
+ (eval:error (+ 1 (λ ([x : Int]) x))))
@section{Extending a Language}
@@ -360,6 +351,7 @@ how we can reuse the above implementation to implement a subtyping language.
@label-code["A language with subtyping that reuses STLC"
@(racketblock0 #:escape esc
+(esc(lang turnstile))
(extends STLC #:except #%datum +)
(define-base-types Top Num Nat)
diff --git a/turnstile/scribblings/reference.scrbl b/turnstile/scribblings/reference.scrbl
@@ -114,7 +114,7 @@ Turnstile pre-declares @racket[(define-syntax-category type)], which in turn
@itemlist[
@item{@defform[(define-base-type base-type-name-id)]{
Defines a base type. A @racket[(define-base-type τ)] additionally defines:
- @itemlist[@item{@racket[τ], an @literal{identifier} macro representing type @racket[τ].}
+ @itemlist[@item{@racket[τ], an identifier macro representing type @racket[τ].}
@item{@racket[τ?], a predicate recognizing type @racket[τ].}
@item{@racket[~τ], a @tech:pat-expander recognizing type @racket[τ].}]}}
@item{@defform[(define-base-types base-type-name-id ...)]{Defines multiple base types.}}