-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbase.ss
64 lines (51 loc) · 2.22 KB
/
base.ss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#lang scheme/base
(require scheme/contract
scheme/list
scheme/match
scheme/pretty
scheme/runtime-path
srfi/26
(planet untyped/unlib:3/debug)
(planet untyped/mirrors:2)
(planet untyped/unlib:3/exn)
(planet untyped/unlib:3/log)
"class/class.ss"
"web-server/servlet.ss")
; Configuration --------------------------------
; (parameter boolean)
(define dev? (make-parameter #f))
; path
(define-runtime-path smoke-htdocs-path
"htdocs")
; path
(define-runtime-path smoke-mime-types-path
"mime.types")
; Exceptions -----------------------------------
; (struct string continuation-marks)
(define-struct (exn:fail:smoke exn:fail) () #:transparent)
; (struct string continuation-marks)
(define-struct (exn:fail:smoke:session exn:fail:smoke) () #:transparent)
; (struct string continuation-marks)
(define-struct (exn:smoke exn) () #:transparent)
; (struct string continuation-marks form-element<%>)
(define-struct (exn:smoke:form exn:smoke) (element) #:transparent)
; Provide statements ---------------------------
(provide (all-from-out scheme/contract
scheme/list
scheme/match
scheme/pretty
srfi/26
(planet untyped/mirrors:2)
(planet untyped/unlib:3/debug)
(planet untyped/unlib:3/exn)
(planet untyped/unlib:3/log)
"class/class.ss"
"web-server/servlet.ss"))
(provide/contract
[dev? (parameter/c boolean?)]
[smoke-htdocs-path path?]
[smoke-mime-types-path path?]
[struct (exn:fail:smoke exn:fail) ([message string?] [continuation-marks continuation-mark-set?])]
[struct (exn:fail:smoke:session exn:fail:smoke) ([message string?] [continuation-marks continuation-mark-set?])]
[struct (exn:smoke exn) ([message string?] [continuation-marks continuation-mark-set?])]
[struct (exn:smoke:form exn:smoke) ([message string?] [continuation-marks continuation-mark-set?] [element object?])])