commit f5fdac70773db07b5aaba327104582c19c468d7c
parent 16b5cd4ba494e93750749775120080cea79a41c7
Author: Georges Dupéron <georges.duperon@gmail.com>
Date: Wed, 14 Sep 2016 21:55:54 +0200
Bug fix for the previous commit
Diffstat:
| M | main.rkt | | | 28 | +++++++++++++--------------- |
1 file changed, 13 insertions(+), 15 deletions(-)
diff --git a/main.rkt b/main.rkt
@@ -47,30 +47,28 @@
(define/with-syntax ins2
(if poly? #'(name T2 ...) #'name))
+
+ (define/with-syntax PrinterType
+ (maybe-∀ #'(→ ins Output-Port (U #t #f 0 1) Any)))
+ (define/with-syntax ComparerType-Equal
+ (maybe-∀2 #'(→ ins ins2 (→ Any Any Boolean) Any)))
+ (define/with-syntax ComparerType-Hash1
+ (maybe-∀ #'(→ ins (→ Any Fixnum) Fixnum)))
+ (define/with-syntax ComparerType-Hash2
+ (maybe-∀ #'(→ ins (→ Any Fixnum) Fixnum)))
+ (define/with-syntax ComparerType
+ #'(List ComparerType-Equal
+ ComparerType-Hash1
+ ComparerType-Hash2))
#`(begin
#,@(when-attr custom-write
- (define-type PrinterType
- #,(maybe-∀ #'(→ ins Output-Port (U #t #f 0 1) Any)))
(: printer PrinterType)
(: printer-implementation PrinterType)
(define (printer self port mode)
(printer-implementation self port mode)))
#,@(when-attr equal+hash
- (define-type ComparerType-Equal
- #,(maybe-∀2
- #'(→ ins ins2 (→ Any Any Boolean) Any)))
- (define-type ComparerType-Hash1
- #,(maybe-∀
- #'(→ ins (→ Any Fixnum) Fixnum)))
- (define-type ComparerType-Hash2
- #,(maybe-∀
- #'(→ ins (→ Any Fixnum) Fixnum)))
- (define-type ComparerType
- (List ComparerType-Equal
- ComparerType-Hash1
- ComparerType-Hash2))
(: eq+h ComparerType)
(: eq+h-implementation (→ ComparerType))
(define eq+h