cmap->index fails in generate-metadata.
samrushing opened this issue · 0 comments
samrushing commented
Ran into this problem:
(datatype lazy*
(:delayed (-> 'a))
(:value 'a)
)
;; i.e. (ref (lazy 'a))
(typealias lazy {val=(lazy* 'a)})
...
(datatype stream
(:nil)
;;(:cell 'a (lazy (stream 'a)))
(:cell 'a {val=(lazy* (stream 'a))})
)
The 'a
from the typealias is not the same 'a
in the datatype. The commented-out :cell
arm thus causes a crash in dt.to-sexp
in generate-metadata
. Not sure if this is a simple problem with instantiation or if we need the ability to declare 'mutual' datatypes (with the idea that their type variables are the same).