You should split the language in three parts: 1) The heresy/pre-base language (or heresy/private/pre-base) that implements the basic syntax (no pun intended), for example 'if', 'def', ... (probably most of the current content of heresy/main)
2) The libraries, for example heresy/lib/string that implements for example 'mid', 'left', 'right', ... (I still miss 'right', I have a definition of 'string-right' in my personal racket library.)The libraries can be written mostly in heresy/pre-base, with a little part of racket. Perhaps split that in low-level libraries that use some racket and high-level libraries that use only a restricted version of heresy (pre-base + low-level libraries). 3) The heresy language, that reexports all from heresy/pre-base and the libraries. If you see he implementation of racket, it starts with a #%kernel language. Then it constructs the racket/pre-base language with more features. Then it constructs the racket/base and racket languages. (Perhaps it has more intermediate steps that I missed.) https://github.com/plt/racket/blob/master/racket/collects/racket/private/base.rkt Gustavo On Sat, Nov 22, 2014 at 3:47 PM, J Arcane <jarc...@gmail.com> wrote: > Today I decided to set about writing some standard library functions for > Heresy. My goal is to write as much as I can in Heresy proper, only falling > back to the Racket core when I need to provide a missing feature. > > The trouble I'm having though, is in making any of this code available to > other Heresy code or providing it as part of the standard language. I just > run into circular dependency issues; my lang depends on the core, and if the > core depends on the library ... round and round we go. > > I'm baffled as to how I can extend my language in my own language if I can't > actually provide the functions I create for it. How do I write in my lang > and the provide the results such that future programs can use them, or > especially, so that the files in my library can safely reference each other? > > As always, the code is here: https://github.com/jarcane/heresy > > Thank you, > John Berry > > ____________________ > Racket Users list: > http://lists.racket-lang.org/users > ____________________ Racket Users list: http://lists.racket-lang.org/users