I am having trouble finding in the documentation an unitary description of the core syntax of Agda. I found these by now:
Am i missing something? Is this explained somewhere else?
Concrete, Abstract, and Internal syntax are the three main forms of syntax that are used internally. Aside from those we also have the 'nice' Concrete syntax (a somewhat cleaned-up version of concrete syntax), Reflected syntax (used for reflection), and Treeless syntax (final stage of syntax before being handed off to one of the backends). The pipeline is as follows:
*.agda file
==[ parser (Lexer.x + Parser.y) ]==>
Concrete syntax
==[ nicifier (Syntax.Concrete.Definitions) ]==>
'Nice' concrete syntax
==[ scope checking (Syntax.Translation.ConcreteToAbstract) ]==>
Abstract syntax
==[ type checking (TypeChecking.Rules.*) ]==>
Internal syntax
==[ Agda.Compiler.ToTreeless ]==>
Treeless syntax
==[ different backends (Compiler.MAlonzo.*, Compiler.JS.*, ...) ]==>
Executable
The core language in the stub on ReadTheDocs corresponds to the Haskell datatype used for the Internal syntax.
I don't think most of this is really officially documented, PRs for the documentation are always welcome.
It's nice to know about the existence of these syntax.
Most helpful comment
Concrete, Abstract, and Internal syntax are the three main forms of syntax that are used internally. Aside from those we also have the 'nice' Concrete syntax (a somewhat cleaned-up version of concrete syntax), Reflected syntax (used for reflection), and Treeless syntax (final stage of syntax before being handed off to one of the backends). The pipeline is as follows:
The core language in the stub on ReadTheDocs corresponds to the Haskell datatype used for the Internal syntax.
I don't think most of this is really officially documented, PRs for the documentation are always welcome.