profile
viewpoint

Ask questionsFeature request: reflecting abstract syntax

It would be nice if there was some way to write a macro that takes as input the abstract syntax representation of a term (i.e. before typechecking). This would enable us to write macros that change the elaboration process. Some examples:

  • Idiom brackets as a macro
  • Reuse Agda's abstract syntax as the input to the typechecker of a deeply embedded DSL
  • Reuse Agda's syntax to denote codes in a universe

I'm sure people will be able to come up with lots of other ways to extend Agda's elaboration.

One question when implementing this feature is whether we need a separate representation of reflected abstract syntax, or if we can reuse the existing reflected internal syntax (by implementing a function abstractToReflected).

agda/agda

Answer questions rwe

Just for reference/discussion to a previous related (or duplicate) issue about this:

  • Issue #3849: Syntax macros / delay type-checking of macros
useful!

Related questions

Support cabal-install 3.0.0.0 hot 1
Primitive Bool file does not compile hot 1
Add a pragma for telling agda that a definition is injective hot 1
Proposal: start shipping stack (or Cabal) configuration for reproducible builds hot 1
Add a typechecking only target to the Makefile hot 1
Add a pragma for telling agda that a definition is injective hot 1
How to get around the implicit vs explicit function type error? hot 1
Internal error at Serialise/Instances/Internal.hs:129 hot 1
Add a pragma for telling agda that a definition is injective hot 1
Support cabal-install 3.0.0.0 hot 1
source:https://uonfu.com/
Github User Rank List