fix unmarshal of top-level "root" scope

Closes #9
This commit is contained in:
Matthew Flatt 2016-01-03 06:40:14 -07:00
parent cfc28ee82a
commit 423feb1e21

View File

@ -1175,7 +1175,7 @@
(struct-copy prefix p [stxs (map walk s)])]
[(req rs _)
(struct-copy req p
[reqs (map walk rs)])]
[reqs (walk rs)])]
[(? mod?)
(struct-copy mod p
[prefix (walk (mod-prefix p))]
@ -1298,6 +1298,9 @@
[_ (error 'decode-wrap "bad shift")]))))
(define (decode-scope s ht)
(or
(and (eq? s root-scope)
s)
(hash-ref ht s
(lambda ()
(unless (encoded-scope? s)
@ -1344,7 +1347,7 @@
(decode-binding (cdr p) ht)))
(loop (+ i 2)))])))
(set-scope-bindings! sc bindings))
sc)))
sc))))
(define (decode-scope-set l ht)
(decode-map decode-scope l ht))