-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Consider the following, completely synthesized term:
import Language.Haskell.GHC.ExactPrint
import OccName
import HsExpr
import HsPat
import RdrName
import GHC
import BasicTypes
z :: LHsExpr GhcPs
z = noLoc $ HsVar NoExt $ noLoc $ Unqual $ mkVarOcc "hi"
c :: LHsExpr GhcPs
c = noLoc $ HsCase noExt z $ MG noExt (noLoc
[ noLoc $ Match noExt CaseAlt [noLoc $ WildPat noExt] $ GRHSs noExt [noLoc $ GRHS noExt [] z] $ noLoc $ EmptyLocalBinds noExt
, noLoc $ Match noExt CaseAlt [noLoc $ WildPat noExt] $ GRHSs noExt [noLoc $ GRHS noExt [] z] $ noLoc $ EmptyLocalBinds noExt
, noLoc $ Match noExt CaseAlt [noLoc $ WildPat noExt] $ GRHSs noExt [noLoc $ GRHS noExt [] z] $ noLoc $ EmptyLocalBinds noExt
]) Generated
blarg :: String
blarg =
let anns = addAnnotationsForPretty [] c mempty
in exactPrint c anns
The above prints
case hi of
_ -> hi
_ -> hi
_ -> hi
which is completely broken for layout. It should instead be:
case hi of
_ -> hi
_ -> hi
_ -> hi
See also: #80
Ailrun
Metadata
Metadata
Assignees
Labels
No labels