Fix comment wandering left inside instance decls
parent
698356a880
commit
f289389879
|
@ -1065,6 +1065,13 @@ type ((a :+: b) c) = (a, c)
|
|||
instance MyClass Int where
|
||||
myMethod x = x + 1
|
||||
|
||||
#test simple-method-comment
|
||||
|
||||
instance MyClass Int where
|
||||
myMethod x =
|
||||
-- insightful comment
|
||||
x + 1
|
||||
|
||||
#test simple-method-signature
|
||||
|
||||
instance MyClass Int where
|
||||
|
|
|
@ -858,6 +858,7 @@ layoutClsInst :: ToBriDoc ClsInstDecl
|
|||
layoutClsInst lcid@(L _ cid) = docLines
|
||||
[ layoutInstanceHead
|
||||
, docEnsureIndent BrIndentRegular
|
||||
$ docSetIndentLevel
|
||||
$ docSortedLines
|
||||
$ fmap layoutAndLocateSig (cid_sigs cid)
|
||||
++ fmap layoutAndLocateBind (bagToList $ cid_binds cid)
|
||||
|
|
Loading…
Reference in New Issue