expand_macro_ : Macro -> List Sexp -> Sexp; expand_macro_ m args = case m | Macro_ f => (f args);
While we currently don't check it, our functions need to be *total*, meaning they must always handle (and terminate on) all cases.
So expand_macro_ should also handle the DMacro case.
- "default = new-attribute (List Sexp -> Sexp);
- "default = new-attribute (Int -> Bool); attribute Int default (lambda (lst : List Sexp) -> integer_ 1);
Hmm... I don't understand this change. The value you provide for the `default` arg of `Int` seems to have type (List Sexp -> Sexp) rather than (Int -> Bool).
let hd = case x
let hd = (case x | cons hd tl => hd
| nil => symbol_ \"x\" in
| nil => symbol_ \"x\") : Sexp in
Good catch, thanks. We could have done "hd : Sexp", of course.
Stefan