Handle inline comments before let correctly

This commit is contained in:
mrkkrp 2019-07-21 12:22:24 +02:00 committed by Mark Karpov
parent de1b33788d
commit 560c498688
3 changed files with 13 additions and 1 deletions

View File

@ -10,3 +10,9 @@ bar x =
y = x
in z +
100
inlineComment :: Int -> Int
inlineComment =
let {- join -} go = case () of
() -> undefined
in go

View File

@ -10,3 +10,9 @@ bar x =
y = x
in z
+ 100
inlineComment :: Int -> Int
inlineComment =
let {- join -} go = case () of
() -> undefined
in go

View File

@ -392,7 +392,7 @@ p_hsLocalBinds = \case
(Left <$> bagToList bag) ++ (Right <$> lsigs)
p_item (Left x) = located x p_valDecl'
p_item (Right x) = located x p_sigDecl'
newlineSep p_item (sortOn ssStart items)
newlineSep (sitcc . p_item) (sortOn ssStart items)
HsValBinds NoExt _ -> notImplemented "HsValBinds"
HsIPBinds NoExt _ -> notImplemented "HsIPBinds"
EmptyLocalBinds NoExt -> return ()