Is it possible to (R5.91RS portably) abstract over repetition in
library definitions?
For example, suppose I had
(library (Text ParserCombinators Parsec (1 0 3))
(import (Text ParserCombinators Parsec Pos (1 0 3))
(Text ParserCombinators Parsec Error (1 0 3))
(Text ParserCombinators Parsec Prim (1 0 3))
(Text ParserCombinators Parsec Combinator (1 0 3))
(Text ParserCombinators Parsec Char (1 0 3)))
(export ...))
Contains an awful lot of repetition. Something like
(let-syntax ((library*
(syntax-rules ()
[(library* (x ...) y (z ...) body ...)
(library (x ... y)
(import (x ... y z) ...)
body ...)])))
(library* (Text ParserCombinators Parsec)
(1 0 3)
(Pos Error Prim Combinator Char)
(export ...)))
would be nice.
--
Trent Buck, Student Errant
Received on Mon Nov 13 2006 - 13:38:34 UTC