use current-host-lang in define-primop and typed-out
This commit is contained in:
parent
297e5df6ae
commit
b4d5c710b3
|
@ -721,7 +721,8 @@
|
|||
(lambda (stx modes)
|
||||
(syntax-parse stx #:datum-literals (:)
|
||||
;; cannot write ty:type bc provides might precede type def
|
||||
[(_ (~and (~or (~and [out-x:id (~optional :) ty] (~parse x #'out-x))
|
||||
[(_ (~and (~or (~and [out-x:id (~optional :) ty]
|
||||
(~parse x ((current-host-lang) #'out-x)))
|
||||
[[x:id (~optional :) ty] out-x:id])) ...)
|
||||
#:with (x/tc ...) (generate-temporaries #'(x ...))
|
||||
#:when (stx-map
|
||||
|
@ -735,7 +736,7 @@
|
|||
(define-syntax define-primop
|
||||
(syntax-parser #:datum-literals (:)
|
||||
[(define-primop op:id (~optional :) τ)
|
||||
#:with op- (format-id #'op "~a-" #'op)
|
||||
#:with op- ((current-host-lang) #'op)
|
||||
#'(define-primop op op- τ)]
|
||||
[(define-primop op/tc:id (~optional #:as) op:id (~optional :) τ:type)
|
||||
; rename-transformer doesnt seem to expand at the right time
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#lang turnstile
|
||||
(require racket/fixnum racket/flonum)
|
||||
(require (postfix-in - racket/fixnum)
|
||||
(postfix-in - racket/flonum))
|
||||
|
||||
(extends
|
||||
"ext-stlc.rkt"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#lang turnstile/lang
|
||||
(require
|
||||
racket/fixnum racket/flonum
|
||||
(postfix-in - racket/fixnum)
|
||||
(postfix-in - racket/flonum)
|
||||
(for-syntax macrotypes/type-constraints macrotypes/variance-constraints))
|
||||
|
||||
(extends
|
||||
|
|
Loading…
Reference in New Issue
Block a user