home
/
code
/
tt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7296ed9
)
Type the User uri
author
Siraaj Khandkar
<siraaj@khandkar.net>
Mon, 29 Nov 2021 15:05:57 +0000
(10:05 -0500)
committer
Siraaj Khandkar
<siraaj@khandkar.net>
Mon, 29 Nov 2021 15:05:57 +0000
(10:05 -0500)
tt.rkt
patch
|
blob
|
blame
|
history
diff --git
a/tt.rkt
b/tt.rkt
index
c29fabb
..
fcaf8ce
100644
(file)
--- a/
tt.rkt
+++ b/
tt.rkt
@@
-28,7
+28,7
@@
(cons 'error β))))
(struct User
(cons 'error β))))
(struct User
- ([uri :
String
]
+ ([uri :
Url
]
[nick : (Option String)]))
(struct User-Agent
[nick : (Option String)]))
(struct User-Agent
@@
-65,11
+65,12
@@
(: user-default User)
(define user-default
(: user-default User)
(define user-default
- (User
"https://github.com/xandkar/tt"
#f))
+ (User
(string->url "https://github.com/xandkar/tt")
#f))
(: user->str (-> User String))
(define (user->str user)
(: user->str (-> User String))
(define (user->str user)
- (match-define (User u n) user)
+ (match-define (User u0 n) user)
+ (define u (url->string u0))
(if n
(format "+~a; @~a" u n)
(format "+~a" u )))
(if n
(format "+~a; @~a" u n)
(format "+~a" u )))
@@
-121,8
+122,9
@@
user-default)
user-default)))
user-default)
user-default)))
+(: peer->user (-> Peer User))
(define (peer->user p)
(define (peer->user p)
- (match-define (Peer n
_ u
_) p)
+ (match-define (Peer n
u _
_) p)
(User u n))
(: peers-equal? (-> Peer Peer Boolean))
(User u n))
(: peers-equal? (-> Peer Peer Boolean))
This page took
0.029879 seconds
and
4
git commands to generate.