retrie
retrie copied to clipboard
Invalid indentation in do notation produced by `--adhoc 'forall a. id $ a = a'`
For Test.hs
:
main :: IO ()
main = do
x <- getLine
id $
print $
x ++ x
retrie --adhoc 'forall a. id $ a = a'
will produce:
main :: IO ()
main = do
x <- getLine
print $
x ++ x
which is not valid code due to bad indentation.
Ugh I thought I had fixed this. Will investigate.
Ugh I thought I had fixed this. Will investigate.
FWIW, a simpler version
main :: IO ()
main = do
x <- getLine
id $
print x
is currently handled properly to produce
main :: IO ()
main = do
x <- getLine
print x
seems like something is missed when the rhs is more complicated.
Yeah, I suspect I broke it with my recent commit that generalized the elaboration. I used to have special handling for $
, which I suspect resulted in the annotations moving correctly.