History

help: fix signatures - always print readably, preserving default values such as runes

Sigrid Solveig Haflínudóttir committed 3 months ago

Commit f045cc71 parent 05f773a2 files · +19 −7Browse files

Unified · Split

2 files
  1. boot/sl.boot +10 −4
  2. src/system.sl +9 −3
boot/sl.boot+10−4
@@ -826,13 +826,19 @@ caadr $begin nconc #fn(map)) 8) remove-duplicates) 8) · 825 unmodified lines
826get-syntax #fn("A1207180D963:" #(#fn(get) *syntax-environment*) 8) getprop826get-syntax #fn("A1207180D963:" #(#fn(get) *syntax-environment*) 8) getprop
827#fn("w20003000W2000;J70D9?24207181D953873K088;3=042088808253;J50482:883F0228880523;020888062:232481e261:" #(#fn(get)827#fn("w20003000W2000;J70D9?24207181D953873K088;3=042088808253;J50482:883F0228880523;020888062:232481e261:" #(#fn(get)
828*properties* #fn(has?) #fn(raise) key-error) 10)828*properties* #fn(has?) #fn(raise) key-error) 10)
829help-print-header #fn("O200020004000W2000J70D9?24W3000J7021?34DIb888228880>2_4813E02324808388>38152@f07583514823G07576805151488<2751@@0788051488<80514795047960:" #(#(:kind829help-print-header #fn("O200020004000W2000J70D9?24W3000J7021?34DIDIb8b988228880>2_48923_4813G0242589808388>48152@f07683514823G07677805151488<2851@@0798051488<805147:5047:60:" #(#(:kind
830:lpad) "" #fn("A19070_4712280RJ;0238051@[080R3E080Z3?02324915151@B075805137026@40272863:" #(void830:lpad) "" #fn("A19070_4712280RJ;0238051@[080R3E080Z3?02324915151@B075805137026@40272863:" #(void
831princ " ;; [" #fn(type-of) #fn(top-level-value) get-syntax "macro" "any" "]") print-type 9)831princ " ;; [" #fn(type-of) #fn(top-level-value) get-syntax "macro" "any" "]") print-type 9)
832#fn(for-each) #fn("A1209080P5171D9I142286>1239080>22487>1q87504^1^1759151475855148586d370D9@:075268652492<905147760:" #(#fn(str)832#fn("A1205071DAI142286>1238085>22487>1q87504^1^142585512685514:" #(#fn(buffer) *print-readably*
833#fn("A090I0:" #(*print-readably*) 4)
834#fn("A020909162:" #(#fn(write)) 7)
835#fn("A190504208061:" #(#fn(raise)) 6)
836#fn(io->str)
837#fn(io-close)) term->str 9)
838#fn(for-each) #fn("A190<9180P51205071D9I142287>123909180>32488>1q88504^1^1759251475855148587d370D9@:075268752493<915147760:" #(#fn(buffer)
833*print-syntax-sugar* #fn("A090I0:" #(*print-syntax-sugar*) 4)839*print-syntax-sugar* #fn("A090I0:" #(*print-syntax-sugar*) 4)
834#fn("A0209091P61:" #(#fn(str)) 7) #fn("A190504208061:" #(#fn(raise)) 6) princ " | " newline) 9)840#fn("A090<9192P61:" 7) #fn("A190504208061:" #(#fn(raise)) 6) princ " | " newline) 10) princ caddr
835princ caddr "doc group" print newline) 8)841"doc group" print newline) 9)
836i_auto11# #:i_auto11# i_auto23# #:i_auto23# identity842i_auto11# #:i_auto11# i_auto23# #:i_auto23# identity
837#fn("A180:" 4) in-env? #fn("A281B;3J04208081<52;J<04718081=62:" #(#fn(assq) in-env?) 7)843#fn("A180:" 4) in-env? #fn("A281B;3J04208081<52;J<04718081=62:" #(#fn(assq) in-env?) 7)
838inlineable? #fn("A180<85B;3u0485<20Q;3j047185T51;3^04727385T52;3P047485T2552S;3A047685T2780=5162:" #(λ844inlineable? #fn("A180<85B;3u0485<20Q;3j047185T51;3^04727385T52;3P047485T2552S;3A047685T2780=5162:" #(λ
src/system.sl+9−3
@@ -208,11 +208,17 @@ · 207 unmodified lines
208 ((get-syntax e) "macro")208 ((get-syntax e) "macro")
209 (else "any")]209 (else "any")]
210 "]"))210 "]"))
211 (def (term->str term)
212 (let {[b (buffer)]}
213 (with-bindings ((*print-readably* T))
214 (write term b))
215 (prog1 (io->str b) (io-close b))))
211 (if sigs216 (if sigs
212 (for-each (λ (sig)217 (for-each (λ (sig)
213 (let {[sug (str (cons term sig))]218 (let* {[sug (term->str (cons term sig))]
214 [sig (with-bindings ((*print-syntax-sugar* NIL))219 [b (buffer)]
215 (str (cons term sig)))]}220 [sig (with-bindings ((*print-syntax-sugar* NIL))
221 (term->str (cons term sig)))]}
216 (princ lpad)222 (princ lpad)
217 (princ sug)223 (princ sug)
218 (unless (equal? sug sig)224 (unless (equal? sug sig)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t