Preserve let-bindings when pretty-printing
knisht opened this issue · comments
Konstantin Nisht commented
Consider the following snippet.
data U : Set where
u : U
test : U
test = let X = U
a : X
a = u
in {!helper a!} -- C-c C-h
Currently, the signature of helper function is helper : U → U
, but it would be better to print helper : (let X = U) → X → U
Jesper Cockx commented
Konstantin Nisht commented
For the record, there is already a heuristic that restores let-binding during pretty-printing.
agda/src/full/Agda/Syntax/Translation/InternalToAbstract.hs
Lines 453 to 465 in 2816d75