Skip to content
This repository was archived by the owner on Oct 26, 2023. It is now read-only.

Commit 04b4240

Browse files
authored
Add MIT License (AlexKnauth#23)
* Revert "add resume to debug repl" * Add MIT License * Update .gitignore * Replace Travis with Github CI * Add resume to debug-repl
1 parent 4f0fb0b commit 04b4240

File tree

7 files changed

+67
-59
lines changed

7 files changed

+67
-59
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on: [push, pull_request]
2+
name: CI
3+
jobs:
4+
build:
5+
name: "Build on Racket '${{ matrix.racket-version }}' (${{ matrix.racket-variant }})"
6+
runs-on: ubuntu-latest
7+
strategy:
8+
matrix:
9+
racket-version: ["stable", "current"]
10+
racket-variant: ["BC", "CS"]
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: Bogdanp/[email protected]
14+
with:
15+
architecture: x64
16+
distribution: full
17+
variant: ${{ matrix.racket-variant }}
18+
version: ${{ matrix.racket-version }}
19+
- name: Installing debug and its dependencies
20+
run: raco pkg install --no-docs --auto --link --name debug
21+
- name: Compiling debug and building its docs
22+
run: raco setup --check-pkg-deps --unused-pkg-deps debug typed
23+
- name: Testing debug
24+
run: raco test -p debug

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# Racket-generated files
12
compiled/
23
doc/
4+
5+
# Editor-generated files
36
*~
7+
\#*
8+
.\#*
9+
10+
# OS-generated files
11+
.DS_Store

.travis.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
debug
2+
3+
MIT License
4+
5+
Copyright (c) 2015-2022 Alex Knauth, Suzanne Soy, Matthew Butterick, and Sorawee Porncharoenwase
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a copy
8+
of this software and associated documentation files (the "Software"), to deal
9+
in the Software without restriction, including without limitation the rights
10+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the Software is
12+
furnished to do so, subject to the following conditions:
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

debug/repl.rkt

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
pretty-format
1212
))
1313

14-
(define debug-repl-prompt-tag (make-continuation-prompt-tag 'debug-repl))
15-
(define debug-repl-abort-handler values)
16-
17-
;; ----------------------------------------------------------------------------
14+
(define current-debug-repl-escape (make-parameter #f))
1815

1916
(begin-for-syntax
2017
;; syntax-find-local-variables : Syntax -> (Listof Id)
@@ -92,19 +89,20 @@
9289
(old-prompt-read))
9390
(define (new-eval stx)
9491
(old-eval (intro stx)))
95-
(parameterize ([current-namespace ns]
96-
[current-prompt-read new-prompt-read]
97-
[current-eval new-eval])
98-
(call-with-continuation-prompt
99-
read-eval-print-loop
100-
debug-repl-prompt-tag
101-
debug-repl-abort-handler)))
92+
(let/ec k
93+
(parameterize ([current-namespace ns]
94+
[current-prompt-read new-prompt-read]
95+
[current-eval new-eval]
96+
[current-debug-repl-escape k])
97+
(read-eval-print-loop))))
10298

10399
;; namespace-define-transformer-binding! : Namespace Symbol Any -> Void
104100
(define (namespace-define-transformer-binding! ns sym val)
105101
(eval #`(define-syntax #,(datum->syntax #f sym) #,val) ns))
106102

107103
;; resume : Any ... -> Nothing
108104
(define (resume . vs)
109-
(apply abort-current-continuation debug-repl-prompt-tag vs))
110-
105+
(define k (current-debug-repl-escape))
106+
(unless k
107+
(error 'resume "must be called within a debug-repl"))
108+
(apply k vs))

debug/scribblings/debug.scrbl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,5 @@ Then if you call @racket[(f 1 2)], it will create a repl where @racket[x] is
7777
In one of these repls, you can try evaluating different expressions. If you're
7878
debugging a higher-order function for example, you can try out the functions
7979
it accepts or creates with multiple sets of arguments to see how they react.
80-
81-
@defproc[(resume [v any/c] ...) any]{
82-
When called inside of a @racket[debug-repl], exits the repl. The call to
83-
@racket[debug-repl] returns the arguments to @racket[resume].
84-
}
8580
}
81+

info.rkt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
(define collection 'multi)
44

5+
(define license 'MIT)
6+
57
;; Require a version of racket after this commit:
68
;; make `variable-reference->namespace` enable top-level mode
79
;; d1c2daf15b8be048b5cea63d5a1d7206bfc8d43f

0 commit comments

Comments
 (0)