Hi Mike and Joram, On 19 November 2016 at 21:06, Mike Solomon <m...@mikesolomon.org> wrote:
> One thing I've used in the past for this sort of thing are Scheme > functions, specifically file-exists? . > > https://www.gnu.org/software/mit-scheme/documentation/mit- > scheme-ref/File-Manipulation.html > > Another solution is to use some sort of top-level compilation script in > bash or python, which is how i manage style sheets for large scores (I > generate temporary ly files on the fly). > Since lilypond uses Guile 1.8 and not MIT Scheme, you may be better off looking here for file system functions: https://www.gnu.org/software/guile/docs/docs-1.8/guile-ref/File-System.html#File-System [Although I myself often derive useful inspiration from looking at other Scheme implementations.] Joram, Exceptions are not built in to Scheme but you can implement them in a library yourself with continuations if you are keen. For example: http://courses.cs.washington.edu/courses/cse341/04wi/lectures/15-scheme-continuations.html This is not particularly trivial stuff, but it works. In general though functional programmers tend to avoid exception style coding, for a long list of reasons. But that's another story and probably another separate mailing list (lilypond-scheme anybody :-)). As to actually implementing exceptions around lilypond code, I have not tried it so I cannot fully answer your question. Andrew
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user