You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a <- locallyReduceAllDefs $ liftTCM $traverse (isType_ <=< toAbstract_) a
liftU1 (addContext ("x"::String, domFromArga::DomType)) m
In order to print terms nicely, e.g. using debugPrint or typeError with termErr, I propose that they all should use Telescope (i.e. List (Σ String λ _ → Arg Type)) instead. For the same reason, extendContext should take an extra argument of type String in order to give a name to the variable introduced to the context.
It would be a breaking change but this change allows programmers to easily print not only understandable but also more precise type information during macro expansion.
The text was updated successfully, but these errors were encountered:
L-TChen
changed the title
[ reflection ] Proposal: Use Telescope for getContext, inContext, and extendContext
Proposal: Use Telescope for getContext, inContext, and extendContextDec 30, 2021
andreasabel
changed the title
Proposal: Use Telescope for getContext, inContext, and extendContext
Reflection: Use Telescope for getContext, inContext, and extendContextOct 25, 2022
asr
changed the title
Reflection: Use Telescope for getContext, inContext, and extendContext
Reflection: Use Telescope for getContext, inContext, and extendContextNov 2, 2022
Currently,
getContext
andinContext
only returns and takes a list ofArg Type
without a name, and internally all variables are namedx
:agda/src/full/Agda/TypeChecking/Unquote.hs
Lines 780 to 783 in 9428b1d
In order to print terms nicely, e.g. using
debugPrint
ortypeError
withtermErr
, I propose that they all should useTelescope
(i.e.List (Σ String λ _ → Arg Type)
) instead. For the same reason,extendContext
should take an extra argument of typeString
in order to give a name to the variable introduced to the context.It would be a breaking change but this change allows programmers to easily print not only understandable but also more precise type information during macro expansion.
The text was updated successfully, but these errors were encountered: