Fix additional indentation bug for let-in
parent
af227a797d
commit
2b303b2a20
|
@ -782,3 +782,19 @@ func = abc + def
|
||||||
where
|
where
|
||||||
abc = 13
|
abc = 13
|
||||||
def = 1
|
def = 1
|
||||||
|
|
||||||
|
#test AddBaseY/EnsureIndent float in effect
|
||||||
|
|
||||||
|
zItazySunefp twgq nlyo lwojjoBiecao =
|
||||||
|
let mhIarjyai =
|
||||||
|
ukwAausnfcn
|
||||||
|
$ XojlsTOSR.vuwOvuvdAZUOJaa
|
||||||
|
$ XojlsTOSR.vkesForanLiufjeDI
|
||||||
|
$ XojlsTOSR.vkesForanLiufjeDI
|
||||||
|
$ XojlsTOSR.popjAyijoWarueeP
|
||||||
|
$ XojlsTOSR.jpwuPmafuDqlbkt nlyo
|
||||||
|
$ XojlsTOSR.jpwuPmafuDqlbkt xxneswWhxwng
|
||||||
|
$ XojlsTOSR.jpwuPmafuDqlbkt oloCuxeDdow
|
||||||
|
$ XojlsTOSR.jpwuPmafuDqlbkt (uwurrvoNnukzefuDjeh lwojjoBiecao nlyo)
|
||||||
|
$ etOslnoz lwojjoBiecao
|
||||||
|
in kucotg $ (bbbr, Yoxe.Dwzbuzi.zrLokoTnuy piv)
|
||||||
|
|
|
@ -770,7 +770,7 @@ layoutExpr lexpr@(L _ expr) = do
|
||||||
addAlternativeCond (not hasComments) $ docSeq
|
addAlternativeCond (not hasComments) $ docSeq
|
||||||
[ appSep $ docLit $ Text.pack "let"
|
[ appSep $ docLit $ Text.pack "let"
|
||||||
, docNodeAnnKW lexpr (Just AnnLet)
|
, docNodeAnnKW lexpr (Just AnnLet)
|
||||||
$ appSep $ docForceSingleline bindDoc
|
$ appSep $ docForceSingleline bindDoc
|
||||||
, appSep $ docLit $ Text.pack "in"
|
, appSep $ docLit $ Text.pack "in"
|
||||||
, docForceSingleline expDoc1
|
, docForceSingleline expDoc1
|
||||||
]
|
]
|
||||||
|
|
|
@ -132,6 +132,8 @@ transformSimplifyFloating = stepBO .> stepFull
|
||||||
Just $ BDIndentLevelPop (BDAddBaseY ind x)
|
Just $ BDIndentLevelPop (BDAddBaseY ind x)
|
||||||
BDAddBaseY ind (BDIndentLevelPushCur x) ->
|
BDAddBaseY ind (BDIndentLevelPushCur x) ->
|
||||||
Just $ BDIndentLevelPushCur (BDAddBaseY ind x)
|
Just $ BDIndentLevelPushCur (BDAddBaseY ind x)
|
||||||
|
BDAddBaseY ind (BDEnsureIndent ind2 x) ->
|
||||||
|
Just $ BDEnsureIndent (mergeIndents ind ind2) x
|
||||||
_ -> Nothing
|
_ -> Nothing
|
||||||
stepBO :: BriDoc -> BriDoc
|
stepBO :: BriDoc -> BriDoc
|
||||||
stepBO = -- traceFunctionWith "stepBO" (show . briDocToDocWithAnns) (show . briDocToDocWithAnns) $
|
stepBO = -- traceFunctionWith "stepBO" (show . briDocToDocWithAnns) (show . briDocToDocWithAnns) $
|
||||||
|
|
Loading…
Reference in New Issue