Skip to content

Commit 3c2d446

Browse files
NoahStoryMsamth
authored andcommitted
Remove case-λ:, pcase-λ:, pλ:, λ:, popt-λ:, opt-λ:.
1 parent d1c4066 commit 3c2d446

File tree

3 files changed

+14
-40
lines changed

3 files changed

+14
-40
lines changed

typed-racket-doc/typed-racket/scribblings/reference/legacy.scrbl

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,32 +35,22 @@ A polymorphic function, abstracted over the type variables
3535
@racket[a]. The type variables @racket[a] are bound in both the types
3636
of the formal, and in any type expressions in the @racket[body].}
3737

38-
@defalias[pλ: plambda: "syntax"]
39-
4038
@defform/subs[(opt-lambda: formals maybe-ret . body)
4139
([formals ([v : t] ... [v : t default] ...)
4240
([v : t] ... [v : t default] ... v : t *)
4341
([v : t] ... [v : t default] ... v : t ooo bound)])]{
4442
A function with optional arguments.}
4543

46-
@defalias[opt-λ: opt-lambda: "syntax"]
47-
4844
@defform*[[(popt-lambda: (a ...) formals maybe-ret . body)
4945
(popt-lambda: (a ... a ooo) formals maybe-ret . body)]]{
5046
A polymorphic function with optional arguments.}
5147

52-
@defalias[popt-λ: popt-lambda: "syntax"]
53-
5448
@defalias[case-lambda: case-lambda "syntax"]
5549

56-
@defalias[case-λ: case-lambda: "syntax"]
57-
5850
@defform*[[(pcase-lambda: (a ...) [formals body] ...)
5951
(pcase-lambda: (a ... b ooo) [formals body] ...)]]{
6052
A polymorphic function of multiple arities.}
6153

62-
@defalias[pcase-λ: pcase-lambda: "syntax"]
63-
6454
@defform*[[
6555
(let: ([v : t e] ...) . body)
6656
(let: loop : t0 ([v : t e] ...) . body)]]{

typed-racket-lib/typed-racket/base-env/prims-lambda.rkt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@
1818
(provide (rename-out [-case-lambda case-lambda]
1919
[-case-lambda case-lambda:]
2020
[-case-lambda case-λ]
21-
[-case-lambda case-λ:]
22-
[pcase-lambda: pcase-λ:]
23-
[plambda: pλ:]
24-
[lambda: λ:]
25-
[popt-lambda: popt-λ:]
26-
[opt-lambda: opt-λ:])
21+
[lambda: λ:])
2722
pcase-lambda:
2823
plambda:
2924
-lambda
Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,16 @@
11
#lang typed/racket/base
22

3-
(: foo0 (∀ () (→* ((∪ Symbol String)) (Integer) (Pair Boolean Integer))))
4-
(: foo1 (∀ () (→* ((∪ Symbol String) Integer) () (Pair Boolean Integer))))
5-
(: foo2 (∀ () (→* ((∪ Symbol String) Integer) () (Pair Boolean Integer))))
6-
(: foo3 (∀ () (→* ((∪ Symbol String)) (Integer) (Pair Boolean Integer))))
7-
(: foo4 (∀ () (→* ((∪ Symbol String)) (Integer) (Pair Boolean Integer))))
8-
(define foo0 (λ #:∀ () ([s : (∪ Symbol String)] [i : Integer 0]) : (Pair Boolean Integer) (cons (symbol? s) i)))
9-
(define foo1 (λ: ([s : (∪ Symbol String)] [i : Integer]) : (Pair Boolean Integer) (cons (symbol? s) i)))
10-
(define foo2 (pλ: () ([s : (∪ Symbol String)] [i : Integer]) : (Pair Boolean Integer) (cons (symbol? s) i)))
11-
(define foo3 (opt-λ: ([s : (∪ Symbol String)] [i : Integer 0]) : (Pair Boolean Integer) (cons (symbol? s) i)))
12-
(define foo4 (popt-λ: () ([s : (∪ Symbol String)] [i : Integer 0]) : (Pair Boolean Integer) (cons (symbol? s) i)))
13-
(foo0 'abc 0) (foo0 "abc" 0)
14-
(foo1 'abc 0) (foo1 "abc" 0)
15-
(foo2 'abc 0) (foo2 "abc" 0)
16-
(foo3 'abc 0) (foo3 "abc" 0)
17-
(foo4 'abc 0) (foo4 "abc" 0)
3+
(: foo (→* ((∪ Symbol String)) (Integer) (Pair Boolean Integer)))
4+
(define foo
5+
(λ (s [i 0])
6+
(cons (symbol? s) i)))
7+
(foo 'abc)
8+
(foo "abc")
189

19-
(: bar0 (∀ () (case→ (→ True) (→ Any False))))
20-
(: bar1 (∀ () (case→ (→ True) (→ Any False))))
21-
(: bar2 (∀ () (case→ (→ True) (→ Any False))))
22-
(define bar0 (case-λ #:∀ () [() #t] [(_) #f]))
23-
(define bar1 (case-λ: #:∀ () [() #t] [(_) #f]))
24-
(define bar2 (pcase-λ: () [() #t] [(_) #f]))
25-
(bar0) (bar0 bar0)
26-
(bar1) (bar1 bar1)
27-
(bar2) (bar2 bar2)
10+
(: bar (∀ () (case→ (→ True) (→ Any False))))
11+
(define bar
12+
(case-λ
13+
[() #t]
14+
[(_) #f]))
15+
(bar)
16+
(bar bar)

0 commit comments

Comments
 (0)