Update the definition of Dynamics%.

define-type doesn't seem to work with Instance any more in Racket 8.7,
so predefining the type synonym DynamicsClass does not help Dynamics%
shorter.  Defining DynamicsClass as a macros doesn't work either.
This commit is contained in:
Sergiu Ivanov 2023-02-03 12:50:08 +01:00
parent 53e4981845
commit 16626c70ec

View file

@ -543,8 +543,8 @@
;; ;;
;; NOTE: The type appearing when you type dynamics% in the REPL does ;; NOTE: The type appearing when you type dynamics% in the REPL does
;; not directly type check. ;; not directly type check.
(define-type (DynamicsClass a) (define-type (Dynamics% a)
(Class (Instance (Class
(init (network (Network a) #:optional) (init (network (Network a) #:optional)
(mode Mode #:optional)) (mode Mode #:optional))
(field (network (Network a)) (field (network (Network a))
@ -555,8 +555,7 @@
(build-state-graph (-> (Listof (State Any)) Graph)) (build-state-graph (-> (Listof (State Any)) Graph))
(build-state-graph/annotated (-> (Listof (State Any)) Graph)) (build-state-graph/annotated (-> (Listof (State Any)) Graph))
(build-state-graph* (-> (Listof (State Any)) (U Positive-Integer 'full) Graph)) (build-state-graph* (-> (Listof (State Any)) (U Positive-Integer 'full) Graph))
(build-state-graph*/annotated (-> (Listof (State Any)) (U Positive-Integer 'full) Graph)))) (build-state-graph*/annotated (-> (Listof (State Any)) (U Positive-Integer 'full) Graph)))))
(define-type (Dynamics% a) (Instance (DynamicsClass a)))
(module+ test (module+ test
(let* ([n1 : (Network Boolean) (let* ([n1 : (Network Boolean)