notes
This commit is contained in:
parent
0e8fae66d7
commit
977756d25f
26
remix/README
26
remix/README
|
@ -1,6 +1,30 @@
|
|||
TODO remove ;
|
||||
|
||||
TODO add ; back into braces but don't have , because of conflict with
|
||||
its ,
|
||||
|
||||
TODO look at udelim
|
||||
|
||||
TODO look at Unicode Bidi_Paired_Bracket_Type property values of Open
|
||||
& Close: http://xahlee.info/comp/unicode_matching_brackets.html
|
||||
|
||||
TODO require uses the #%required binding from the module to let the
|
||||
server do something to the client namespace --- This could be used to
|
||||
propagate static bindings for things like type-classes outward
|
||||
|
||||
TODO require* like def* to put have extensible #%module-begin (called #%require*d)
|
||||
|
||||
TODO require* at the top-interaction hacks it
|
||||
|
||||
TODO implement match def-transformer and see how it looks
|
||||
|
||||
TOOD look into Greg's request
|
||||
https://mail.google.com/mail/u/0/#inbox/1574317e1974dbf5
|
||||
|
||||
(def id 42
|
||||
(list a b c) (list 1 2 3)
|
||||
(values in out) (tcp-connect "host" 3000))
|
||||
|
||||
TODO think about interface language part of theory/interface/modules
|
||||
|
||||
TODO add syntax property for def transformer on RHS (for function call
|
||||
|
@ -82,7 +106,7 @@ TODO "define"-transformers for attaching meta-information to definitions, like d
|
|||
|
||||
TODO Bindings & keywords everywhere
|
||||
|
||||
TODO Less representation contraints
|
||||
TODO Less representation constraints
|
||||
|
||||
TODO Meaningless eq? semantics
|
||||
|
||||
|
|
18
remix/exp/unit-test.rkt
Normal file
18
remix/exp/unit-test.rkt
Normal file
|
@ -0,0 +1,18 @@
|
|||
#lang racket/base
|
||||
|
||||
(define-signature ^eq
|
||||
==)
|
||||
|
||||
(define-unit (@eq-symbol)
|
||||
(export ^eq)
|
||||
(define == symbol=?))
|
||||
|
||||
|
||||
(define-unit
|
||||
(@eq-pair
|
||||
[(^prefix a: ^eq) (@eq-symbol)]
|
||||
[(^prefix b: ^eq) (@eq-symbol)])
|
||||
|
||||
(define (== x y)
|
||||
(and (a:== (car x) (car y))
|
||||
(b:== (cdr x) (cdr y)))))
|
11
remix/exp/unit.rkt
Normal file
11
remix/exp/unit.rkt
Normal file
|
@ -0,0 +1,11 @@
|
|||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
#lang remix
|
||||
(require* remix/unit0)
|
||||
|
||||
(import foo) ; =>
|
||||
(import [(^exactly foo) foo])
|
||||
|
||||
(require remix/set0)
|
||||
(import [(^prefix bid: ^set) remix/stx/bound-id]
|
||||
[(^prefix bit: ^set) (remix/set/bit 20)])
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
@ -23,7 +23,7 @@
|
|||
;; You will get an allocation function named #:alloc
|
||||
(def [posn p1] (posn.#:alloc [x 5] [y 7]))
|
||||
;; XXX (def [posn p1] #:alloc [x 5] [y 7]) <--- def transformer for allocation
|
||||
;; XXX (def [posn p1] (posn [x 5] [y 7])) <--- default use is allocation
|
||||
;; XXX (def [posn p1] [x 5] [y 7]) <--- default use is allocation
|
||||
;; And accessors
|
||||
{p1.x ≡ 5}
|
||||
{p1.y ≡ 7}
|
||||
|
@ -33,7 +33,7 @@
|
|||
{(posn.x p1) ≡ 5}
|
||||
;; You will also get a copying function
|
||||
(def [posn p2] (p1.#:set [y {p1.y + 2}]))
|
||||
;; XXX (def [posn p2] (posn p1 [y {p1.y + 2}])) <---- default use with expr is copy
|
||||
;; XXX (def [posn p2] p1 [y {p1.y + 2}]) <---- default use with expr is copy
|
||||
;; Notice that these built-in functions are keywords, so that they
|
||||
;; can't conflict with the fields you've defined.
|
||||
{p2.x ≡ 5}
|
||||
|
|
Loading…
Reference in New Issue
Block a user