Zulip Chat Archive
Stream: Is there code for X?
Topic: Is there function for normalizing a term in elaboration m?
Alissa Tung (May 01 2024 at 15:22):
Hello, I am trying to find a function for normalizing a term in elaboration monad. Or evaluation function for expressions. I had tried some search and read the implementation for command eval, but I have not find something can be used in elab m.
Alissa Tung (May 01 2024 at 17:02):
I had tried something like
elab "debug!" x:term : term => do
logInfo x
let xs <- elabTermAndSynthesize x .none
logInfo xs
logInfo (<- eval% xs)
return xs
but seems is not correct
(kernel) declaration has free variables '_tmp._@.Main._hyg.144'
Eric Wieser (May 02 2024 at 11:59):
What do you mean by "normalize"?
Alissa Tung (May 02 2024 at 12:03):
Eric Wieser said:
What do you mean by "normalize"?
Sorry I am not familiar with the terms, the two terms I used here are
-
normalize: syntax -> syntax, which is elaborates the syntax to expression, run the reduction or calculations, read back to syntax
-
evaluate: expression -> expression, simplify the expression, for example, calculate function applications
Last updated: May 02 2025 at 03:31 UTC