Welcome! Please see the About page for a little more info on how this works.
Inside a defrecord body it's possible to refer to ->type-ctor but that is not possible inside deftype.
This patch adds an implicit declare, as done in defrecord making it possible to use the ->type-ctor inside deftype methods
Comment made by: halgari
Seems valid. Vetting.
Comment made by: samestep
Will this be incorporated soon? It's awkward to have to explicitly {{declare}} the factory function when defining, e.g., data structures ((link: http://codereview.stackexchange.com/q/121633/82369 text: example)). Also, the current situation violates the (link: https://en.wikipedia.org/wiki/Principle_of_least_astonishment text: principle of least astonishment); while working through (link: http://www.leonardoborges.com/writings/2012/11/30/monads-in-small-bites-part-i-functors/ text: this tutorial), I was quite surprised to find that {{defrecord}} does implicitly {{declare}} the factory functions, which contradicted my prior experience with {{deftype}}.
Comment made by: alexmiller
No enhancements are considered critical so it's hard for me to say when this will get evaluated. I've bumped it one step down the process at least.
Thank you, Alex! I completely understand that this isn't a particularly important issue; nonetheless, it is encouraging to see it move closer to being fixed.