fix: getHeadInfo ==> getHeadInfo?

The generated code was not producing compilation errors because we
have a coercion from `A` to `Option A`
This commit is contained in:
Leonardo de Moura 2021-05-04 16:46:41 -07:00
parent 56d5d6c564
commit dd325cfffc

View file

@ -76,7 +76,7 @@ private partial def quoteSyntax : Syntax → TermElabM Syntax
getAntiquotTerm stx
else if isTokenAntiquot stx && !isEscapedAntiquot stx then
match stx[0] with
| Syntax.atom _ val => `(Syntax.atom (Option.getD (getHeadInfo $(getAntiquotTerm stx)) info) $(quote val))
| Syntax.atom _ val => `(Syntax.atom (Option.getD (getHeadInfo? $(getAntiquotTerm stx)) info) $(quote val))
| _ => throwErrorAt stx "expected token"
else if isAntiquotSuffixSplice stx && !isEscapedAntiquot stx then
-- splices must occur in a `many` node