Qu'est-ce qu'il manque pour pouvoir l'écrire en Typer?
Je pense qu'on aurait seulement besoin de la fonction "eval".
Hmm.. je ne comprends pas. Pourquoi ne peut-on pas juste faire:
diff --git a/btl/types.typer b/btl/types.typer index 99101b4..92c81d8 100644 --- a/btl/types.typer +++ b/btl/types.typer @@ -107,7 +107,10 @@ float_ = Built-in "float_" (Float -> Sexp); Macro = inductive_ (dMacro) (Macro_ (List Sexp -> Sexp)); Macro_ = inductive-cons Macro Macro_ ;
-expand_macro_ = Built-in "expand_macro_" (Macro -> List Sexp -> Sexp); +expand_macro_ : Macro -> List Sexp -> Sexp; +expand_macro_ = lambda m args -> + case m + | Macro_ f => f args;
sexp_dispatch_ = Built-in "sexp_dispatch_" ( (a : Type) ≡>
Je ne vois pas le besoin d'un "eval" ici.
Stefan