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
addAnnotationsForPretty inserts a leading space for HsVars (or RdrNames, I haven't dug in). This is the wrong thing to do in the case of a BodyStmt, which will break the do block's layout.
Consider this:
foo =do
a
and we want to append a new noLoc $ BodyStmt _ (noLoc $ HsVar _ (noLoc $ Unqual "b") _ _ for b into the do block. After making new source spans for the noLocs, wen can call addAnnotationsForPretty, on the BodyStmt above, but printing this is:
foo =do
a
b
which is a parse error :(
The text was updated successfully, but these errors were encountered:
addAnnotationsForPretty
inserts a leading space forHsVar
s (orRdrName
s, I haven't dug in). This is the wrong thing to do in the case of aBodyStmt
, which will break thedo
block's layout.Consider this:
and we want to append a new
noLoc $ BodyStmt _ (noLoc $ HsVar _ (noLoc $ Unqual "b") _ _
forb
into the do block. After making new source spans for the noLocs, wen can calladdAnnotationsForPretty
, on theBodyStmt
above, but printing this is:which is a parse error :(
The text was updated successfully, but these errors were encountered: