Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC

Commits:

28 changed files:

Changes:

  • compiler/GHC/Parser.y
    ... ... @@ -1529,13 +1529,13 @@ where_type_family :: { Located ((EpToken "where", EpToken ".."),FamilyInfo GhcP
    1529 1529
                         , ClosedTypeFamily (fst $ fst $ unLoc $2) (fmap reverse $ snd $ unLoc $2)) }
    
    1530 1530
     
    
    1531 1531
     ty_fam_inst_eqn_list :: { Located ((AnnList, EpToken ".."),Maybe [LTyFamInstEqn GhcPs]) }
    
    1532
    -        :     '{' ty_fam_inst_eqns '}'     { sLL $1 $> ((AnnList AnnListBraces (ListBraces (epTok $1) (epTok $3)) [], noAnn)
    
    1532
    +        :     '{' ty_fam_inst_eqns '}'     { sLL $1 $> ((AnnList (EpExplicitBraces (epTok $1) (epTok $3)) [], noAnn)
    
    1533 1533
                                                     ,Just (unLoc $2)) }
    
    1534 1534
             | vocurly ty_fam_inst_eqns close   { let (L loc _) = $2 in
    
    1535
    -                                             L loc ((AnnList (AnnListLayout (glR $1)) ListNone [], noAnn),Just (unLoc $2)) }
    
    1536
    -        |     '{' '..' '}'                 { sLL $1 $> ((AnnList AnnListBraces (ListBraces (epTok $1) (epTok $3)) [], epTok $2), Nothing) }
    
    1535
    +                                             L loc ((AnnList (EpVirtualBraces (glR $1)) [], noAnn),Just (unLoc $2)) }
    
    1536
    +        |     '{' '..' '}'                 { sLL $1 $> ((AnnList (EpExplicitBraces (epTok $1) (epTok $3)) [], epTok $2), Nothing) }
    
    1537 1537
             | vocurly '..' close               { let (L loc _) = $2 in
    
    1538
    -                                             L loc ((AnnList (AnnListLayout (glR $1)) ListNone [], epTok $2),Nothing) }
    
    1538
    +                                             L loc ((AnnList (EpVirtualBraces (glR $1)) [], epTok $2),Nothing) }
    
    1539 1539
     
    
    1540 1540
     ty_fam_inst_eqns :: { Located [LTyFamInstEqn GhcPs] }
    
    1541 1541
             : ty_fam_inst_eqns ';' ty_fam_inst_eqn
    
    ... ... @@ -1797,10 +1797,10 @@ cvars1 :: { [RecordPatSynField GhcPs] }
    1797 1797
     where_decls :: { LocatedA (OrdList (LHsDecl GhcPs), EpToken "where", AnnList) }
    
    1798 1798
             : 'where' '{' decls '}'       {% amsA' (sLL $1 $> (thdOf3 $ unLoc $3,
    
    1799 1799
                                                     epTok $1,
    
    1800
    -                                                AnnList AnnListBraces (ListBraces (epTok $2) (epTok $4)) (sndOf3 $ unLoc $3))) }
    
    1800
    +                                                AnnList (EpExplicitBraces (epTok $2) (epTok $4)) (sndOf3 $ unLoc $3))) }
    
    1801 1801
             | 'where' vocurly decls close {% amsA' (sLL $1 $3 (thdOf3 $ unLoc $3,
    
    1802 1802
                                                     epTok $1,
    
    1803
    -                                                AnnList (AnnListLayout (glR $3)) ListNone (sndOf3 $ unLoc $3))) }
    
    1803
    +                                                AnnList (EpVirtualBraces (glR $3)) (sndOf3 $ unLoc $3))) }
    
    1804 1804
     
    
    1805 1805
     pattern_synonym_sig :: { LSig GhcPs }
    
    1806 1806
             : 'pattern' con_list '::' sigtype
    
    ... ... @@ -1853,10 +1853,10 @@ decllist_cls
    1853 1853
             :: { Located ( AnnList
    
    1854 1854
                          , OrdList (LHsDecl GhcPs)
    
    1855 1855
                          , EpLayout) }      -- Reversed
    
    1856
    -        : '{'         decls_cls '}'     { sLL $1 $> (AnnList AnnListBraces (ListBraces (epTok $1) (epTok $3)) (fst $ unLoc $2)
    
    1856
    +        : '{'         decls_cls '}'     { sLL $1 $> (AnnList (EpExplicitBraces (epTok $1) (epTok $3)) (fst $ unLoc $2)
    
    1857 1857
                                                  ,snd $ unLoc $2, epExplicitBraces $1 $3) }
    
    1858 1858
             |     vocurly decls_cls close   { let { L l (anns, decls) = $2 }
    
    1859
    -                                           in L l (AnnList (AnnListLayout (glR $1)) ListNone anns, decls, EpVirtualBraces (glR $1)) }
    
    1859
    +                                           in L l (AnnList (EpVirtualBraces (glR $1)) anns, decls, EpVirtualBraces (glR $1)) }
    
    1860 1860
     
    
    1861 1861
     -- Class body
    
    1862 1862
     --
    
    ... ... @@ -1897,8 +1897,8 @@ decls_inst :: { Located ([EpToken ";"],OrdList (LHsDecl GhcPs)) } -- Reversed
    1897 1897
     
    
    1898 1898
     decllist_inst
    
    1899 1899
             :: { Located (AnnList, OrdList (LHsDecl GhcPs)) }      -- Reversed
    
    1900
    -        : '{'         decls_inst '}'    { sLL $1 $> (AnnList AnnListBraces (ListBraces (epTok $1) (epTok $3)) (fst $ unLoc $2), snd $ unLoc $2) }
    
    1901
    -        |     vocurly decls_inst close  { L (gl $2) (AnnList (AnnListLayout (glR $1)) ListNone (fst $ unLoc $2),                snd $ unLoc $2) }
    
    1900
    +        : '{'         decls_inst '}'    { sLL $1 $> (AnnList (EpExplicitBraces (epTok $1) (epTok $3)) (fst $ unLoc $2), snd $ unLoc $2) }
    
    1901
    +        |     vocurly decls_inst close  { L (gl $2) (AnnList (EpVirtualBraces (glR $1)) (fst $ unLoc $2),                snd $ unLoc $2) }
    
    1902 1902
     
    
    1903 1903
     -- Instance body
    
    1904 1904
     --
    
    ... ... @@ -1935,9 +1935,9 @@ decls :: { Located (EpaLocation, [EpToken ";"], OrdList (LHsDecl GhcPs)) }
    1935 1935
             | {- empty -}                   { noLoc (noAnn, [],nilOL) }
    
    1936 1936
     
    
    1937 1937
     decllist :: { Located (AnnList,Located (OrdList (LHsDecl GhcPs))) }
    
    1938
    -        : '{'            decls '}'     { sLL $1 $> (AnnList AnnListBraces (ListBraces (epTok $1) (epTok $3)) (sndOf3 $ unLoc $2)
    
    1938
    +        : '{'            decls '}'     { sLL $1 $> (AnnList (EpExplicitBraces (epTok $1) (epTok $3)) (sndOf3 $ unLoc $2)
    
    1939 1939
                                                        ,sL1 $2 $ thdOf3 $ unLoc $2) }
    
    1940
    -        |     vocurly    decls close   { sL1 $2    (AnnList (AnnListLayout (fstOf3 $ unLoc $2)) ListNone (sndOf3 $ unLoc $2)
    
    1940
    +        |     vocurly    decls close   { sL1 $2    (AnnList (EpVirtualBraces (fstOf3 $ unLoc $2)) (sndOf3 $ unLoc $2)
    
    1941 1941
                                                        ,sL1 $2 $ thdOf3 $ unLoc $2) }
    
    1942 1942
     
    
    1943 1943
     -- Binding groups other than those of class and instance declarations
    
    ... ... @@ -1945,16 +1945,16 @@ decllist :: { Located (AnnList,Located (OrdList (LHsDecl GhcPs))) }
    1945 1945
     binds   ::  { LHsLocalBinds GhcPs }
    
    1946 1946
                                              -- May have implicit parameters
    
    1947 1947
                                              -- No type declarations
    
    1948
    -        : decllist          {% do { let { (AnnList la p s, decls) = unLoc $1 }
    
    1948
    +        : decllist          {% do { let { (ann, decls) = unLoc $1 }
    
    1949 1949
                                       ; val_binds <- cvBindGroup (unLoc $ decls)
    
    1950 1950
                                       ; !cs <- getCommentsFor (gl $1)
    
    1951
    -                                  ; return (L (EpAnn (glR $1) noAnn cs) $ HsValBinds (AnnList la p s, noEpTok) val_binds)} }
    
    1951
    +                                  ; return (L (EpAnn (glR $1) noAnn cs) $ HsValBinds (ann, noEpTok) val_binds)} }
    
    1952 1952
     
    
    1953 1953
             | '{'            dbinds '}'     {% amsA' (sLL $1 $>
    
    1954
    -                                             $ HsIPBinds (AnnList AnnListBraces (ListBraces (epTok $1) (epTok $3)) [], noEpTok) (IPBinds noExtField (reverse $ unLoc $2))) }
    
    1954
    +                                             $ HsIPBinds (AnnList (EpExplicitBraces (epTok $1) (epTok $3)) [], noEpTok) (IPBinds noExtField (reverse $ unLoc $2))) }
    
    1955 1955
     
    
    1956 1956
             |     vocurly    dbinds close   {% amsA' (sLL $1 $2
    
    1957
    -                                             $ HsIPBinds (AnnList (AnnListLayout $ glR $2) ListNone [], noEpTok) (IPBinds noExtField (reverse $ unLoc $2))) }
    
    1957
    +                                             $ HsIPBinds (AnnList (EpVirtualBraces $ glR $2) [], noEpTok) (IPBinds noExtField (reverse $ unLoc $2))) }
    
    1958 1958
     
    
    1959 1959
     
    
    1960 1960
     wherebinds :: { Maybe (LHsLocalBinds GhcPs) }
    
    ... ... @@ -2556,11 +2556,11 @@ gadt_constrlist :: { Located ((EpToken "where", AnnList)
    2556 2556
     
    
    2557 2557
             : 'where' '{'        gadt_constrs '}'    {% checkEmptyGADTs $
    
    2558 2558
                                                           L (comb2 $1 $4)
    
    2559
    -                                                        ((epTok $1, AnnList AnnListBraces (ListBraces (epTok $2) (epTok $4)) [])
    
    2559
    +                                                        ((epTok $1, AnnList (EpExplicitBraces (epTok $2) (epTok $4)) [])
    
    2560 2560
                                                             , unLoc $3) }
    
    2561 2561
             | 'where' vocurly    gadt_constrs close  {% checkEmptyGADTs $
    
    2562 2562
                                                           L (comb2 $1 $3)
    
    2563
    -                                                        ((epTok $1,  AnnList (AnnListLayout $ glR $2) ListNone [])
    
    2563
    +                                                        ((epTok $1,  AnnList (EpVirtualBraces $ glR $2) [])
    
    2564 2564
                                                             , unLoc $3) }
    
    2565 2565
             | {- empty -}                            { noLoc (noAnn,[]) }
    
    2566 2566
     
    
    ... ... @@ -3339,8 +3339,8 @@ acmd :: { LHsCmdTop GhcPs }
    3339 3339
                                        return (sL1a cmd $ HsCmdTop noExtField cmd) }
    
    3340 3340
     
    
    3341 3341
     cvtopbody :: { (AnnList,[LHsDecl GhcPs]) }
    
    3342
    -        :  '{'            cvtopdecls0 '}'      { (AnnList AnnListBraces (ListBraces (epTok $1) (epTok $3)) [],$2) }
    
    3343
    -        |      vocurly    cvtopdecls0 close    { (AnnList (AnnListLayout (glR $1)) ListNone [],$2) }
    
    3342
    +        :  '{'            cvtopdecls0 '}'      { (AnnList (EpExplicitBraces (epTok $1) (epTok $3)) [],$2) }
    
    3343
    +        |      vocurly    cvtopdecls0 close    { (AnnList (EpVirtualBraces (glR $1)) [],$2) }
    
    3344 3344
     
    
    3345 3345
     cvtopdecls0 :: { [LHsDecl GhcPs] }
    
    3346 3346
             : topdecls_semi         { cvTopDecls $1 }
    
    ... ... @@ -3568,12 +3568,12 @@ guardquals1 :: { Located [LStmt GhcPs (LHsExpr GhcPs)] }
    3568 3568
     altslist(PATS) :: { forall b. DisambECP b => PV (LocatedA ([LMatch GhcPs (LocatedA b)], AnnList)) }
    
    3569 3569
             : '{'        alts(PATS) '}'    { $2 >>= \ $2 -> amsA'
    
    3570 3570
                                                (sLL $1 $> (reverse (snd $ unLoc $2),
    
    3571
    -                                           (AnnList AnnListBraces (ListBraces (epTok $1) (epTok $3)) (fst $ unLoc $2)))) }
    
    3571
    +                                           (AnnList (EpExplicitBraces (epTok $1) (epTok $3)) (fst $ unLoc $2)))) }
    
    3572 3572
             | vocurly    alts(PATS)  close { $2 >>= \ $2 -> amsA'
    
    3573 3573
                                                (L (getLoc $2) (reverse (snd $ unLoc $2),
    
    3574
    -                                           (AnnList (AnnListLayout $ glR $2) ListNone (fst $ unLoc $2)))) }
    
    3575
    -        | '{'              '}'   { amsA' (sLL $1 $> ([], (AnnList AnnListBraces (ListBraces (epTok $1) (epTok $2)) []))) }
    
    3576
    -        | vocurly          close { return $ noLocA ([], AnnList (AnnListLayout $ glR $1) ListNone []) }
    
    3574
    +                                           (AnnList (EpVirtualBraces $ glR $2) (fst $ unLoc $2)))) }
    
    3575
    +        | '{'              '}'   { amsA' (sLL $1 $> ([], (AnnList (EpExplicitBraces (epTok $1) (epTok $2)) []))) }
    
    3576
    +        | vocurly          close { return $ noLocA ([], AnnList (EpVirtualBraces $ glR $1) []) }
    
    3577 3577
     
    
    3578 3578
     alts(PATS) :: { forall b. DisambECP b => PV (Located ([EpToken ";"],[LMatch GhcPs (LocatedA b)])) }
    
    3579 3579
             : alts1(PATS)              { $1 >>= \ $1 -> return $
    
    ... ... @@ -3630,9 +3630,9 @@ gdpats :: { forall b. DisambECP b => PV (Located (NonEmpty (LGRHS GhcPs (Located
    3630 3630
     -- we don't need it.
    
    3631 3631
     ifgdpats :: { Located (AnnList, NonEmpty (LGRHS GhcPs (LHsExpr GhcPs))) }
    
    3632 3632
              : '{' gdpats '}'                 {% runPV $2 >>= \ $2 ->
    
    3633
    -                                             return $ sLL $1 $> (AnnList AnnListBraces (ListBraces (epTok $1) (epTok $3)) [], unLoc $2)  }
    
    3633
    +                                             return $ sLL $1 $> (AnnList (EpExplicitBraces (epTok $1) (epTok $3)) [], unLoc $2)  }
    
    3634 3634
              |     gdpats close               {% runPV $1 >>= \ $1 ->
    
    3635
    -                                             return $ sL1 $1 (AnnList (AnnListLayout (startLocSpan $ glR $1)) ListNone [], unLoc $1) }
    
    3635
    +                                             return $ sL1 $1 (AnnList (EpVirtualBraces (startLocSpan $ glR $1)) [], unLoc $1) }
    
    3636 3636
     
    
    3637 3637
     gdpat   :: { forall b. DisambECP b => PV (LGRHS GhcPs (LocatedA b)) }
    
    3638 3638
             : '|' guardquals '->' exp
    
    ... ... @@ -3682,10 +3682,10 @@ apat : aexp {% (checkPattern <=< runPV) (unECP $1) }
    3682 3682
     
    
    3683 3683
     stmtlist :: { forall b. DisambECP b => PV (LocatedA (AnnList, Located [LocatedA (Stmt GhcPs (LocatedA b))])) }
    
    3684 3684
             : '{'           stmts '}'       { $2 >>= \ $2 ->
    
    3685
    -                                          amsA' (sLL $1 $> (AnnList AnnListBraces (ListBraces (epTok $1) (epTok $3)) (fromOL $ fst $ unLoc $2)
    
    3685
    +                                          amsA' (sLL $1 $> (AnnList (EpExplicitBraces (epTok $1) (epTok $3)) (fromOL $ fst $ unLoc $2)
    
    3686 3686
                                                                , sL1 $2 $ reverse $ snd $ unLoc $2))}
    
    3687 3687
             |     vocurly   stmts close     { $2 >>= \ $2 ->
    
    3688
    -                                          amsA' (L (stmtsLoc $2) (AnnList (AnnListLayout (spanAsAnchor $ stmtsLoc $2)) ListNone (fromOL $ fst $ unLoc $2)
    
    3688
    +                                          amsA' (L (stmtsLoc $2) (AnnList (EpVirtualBraces (spanAsAnchor $ stmtsLoc $2)) (fromOL $ fst $ unLoc $2)
    
    3689 3689
                                                                      , sL1 $2 $ reverse $ snd $ unLoc $2))}
    
    3690 3690
     
    
    3691 3691
     --      do { ;; s ; s ; ; s ;; }
    

  • compiler/GHC/Parser/Annotation.hs
    ... ... @@ -41,7 +41,7 @@ module GHC.Parser.Annotation (
    41 41
     
    
    42 42
       -- ** Annotation data types used in TTG extension points
    
    43 43
     
    
    44
    -  AnnList(..), AnnListBrackets(..), AnnListLayout(..),
    
    44
    +  AnnList(..),
    
    45 45
       AnnParen(..),
    
    46 46
       AnnCType(..),AnnWarningTxt(..),AnnOverlap(..),AnnAnnDecl(..),AnnPragSCC(..),
    
    47 47
     
    
    ... ... @@ -291,6 +291,7 @@ data EpLayout =
    291 291
         EpNoLayout
    
    292 292
     
    
    293 293
     deriving instance Data EpLayout
    
    294
    +deriving instance Eq EpLayout
    
    294 295
     
    
    295 296
     -- | Used in 'GHC.Parser.Haddock' to get layout column. It assumes
    
    296 297
     -- | there is a RealSrcSpan in it, falling back to zero otherwise
    
    ... ... @@ -522,31 +523,12 @@ instance Outputable TrailingAnn where
    522 523
     -- surrounding items such as braces if present, and introductory
    
    523 524
     -- keywords such as 'where'.
    
    524 525
     
    
    525
    --- AZ: goal: only used when there is layout, so vertical alignment matters
    
    526 526
     data AnnList
    
    527 527
       = AnnList {
    
    528
    -      al_layout    :: !AnnListLayout,
    
    529
    -      al_brackets  :: !AnnListBrackets,
    
    528
    +      al_layout    :: !EpLayout,
    
    530 529
           al_semis     :: [EpToken ";"] -- decls
    
    531 530
           } deriving (Data,Eq)
    
    532 531
     
    
    533
    -data AnnListBrackets
    
    534
    -  = ListBraces (EpToken "{") (EpToken "}")
    
    535
    -  | ListNone
    
    536
    -  deriving (Data,Eq)
    
    537
    -
    
    538
    --- | How the extent of a list was delimited in the source.
    
    539
    -data AnnListLayout
    
    540
    -  = AnnListBraces   -- ^ Explicit @{ ; }@ written by the user. The tokens
    
    541
    -                    --   live in 'al_brackets' and 'al_semis'.
    
    542
    -  | AnnListLayout !EpaLocation
    
    543
    -                    -- ^ The lexer opened an implicit layout context.
    
    544
    -                    --   The 'EpaLocation' is the @vocurly@ token (or, for
    
    545
    -                    --   MultiWayIf, the leading @|@), whose start column is
    
    546
    -                    --   the layout column chosen by 'new_layout_context'.
    
    547
    -  | AnnListNoLayout -- ^ Neither: an Empty or compiler-generated list.
    
    548
    -  deriving (Data, Eq)
    
    549
    -
    
    550 532
     -- ---------------------------------------------------------------------
    
    551 533
     -- Annotations for parenthesised elements, such as tuples, lists
    
    552 534
     -- ---------------------------------------------------------------------
    
    ... ... @@ -1017,10 +999,10 @@ instance NoAnn NoEpAnns where
    1017 999
       noAnn = NoEpAnns
    
    1018 1000
     
    
    1019 1001
     instance NoAnn AnnList where
    
    1020
    -  noAnn = AnnList noAnn ListNone noAnn
    
    1002
    +  noAnn = AnnList noAnn noAnn
    
    1021 1003
     
    
    1022
    -instance NoAnn AnnListLayout where
    
    1023
    -  noAnn = AnnListNoLayout
    
    1004
    +instance NoAnn EpLayout where
    
    1005
    +  noAnn = EpNoLayout
    
    1024 1006
     
    
    1025 1007
     instance NoAnn NameAnn where
    
    1026 1008
       noAnn = NameAnnTrailing []
    
    ... ... @@ -1114,17 +1096,13 @@ instance Outputable NameAnn where
    1114 1096
         = text "NameAnnTrailing" <+> ppr t
    
    1115 1097
     
    
    1116 1098
     instance Outputable AnnList where
    
    1117
    -  ppr (AnnList l p s)
    
    1118
    -    = text "AnnList" <+> ppr l <+> ppr p <+> ppr s
    
    1119
    -
    
    1120
    -instance Outputable AnnListBrackets where
    
    1121
    -  ppr (ListBraces o c) = text "ListBraces" <+> ppr o <+> ppr c
    
    1122
    -  ppr ListNone         = text "ListNone"
    
    1099
    +  ppr (AnnList l s)
    
    1100
    +    = text "AnnList" <+> ppr l <+> ppr s
    
    1123 1101
     
    
    1124
    -instance Outputable AnnListLayout where
    
    1125
    -  ppr AnnListBraces     = text "AnnListBraces"
    
    1126
    -  ppr (AnnListLayout l) = text "AnnListLayout" <+> ppr l
    
    1127
    -  ppr AnnListNoLayout   = text "AnnListNoLayout"
    
    1102
    +instance Outputable EpLayout where
    
    1103
    +  ppr (EpExplicitBraces o c) = text "EpExplicitBraces" <+> ppr o <+> ppr c
    
    1104
    +  ppr (EpVirtualBraces l)    = text "EpVirtualBraces" <+> ppr l
    
    1105
    +  ppr EpNoLayout             = text "EpNoLayout"
    
    1128 1106
     
    
    1129 1107
     instance Outputable AnnCType where
    
    1130 1108
       ppr (AnnCType o c l ca)
    

  • compiler/GHC/Parser/PostProcess.hs
    ... ... @@ -473,13 +473,13 @@ valid_anchor (EpaSpan (RealSrcSpan r _)) = srcSpanStartLine r >= 0
    473 473
     valid_anchor _ = False
    
    474 474
     
    
    475 475
     patch_annlist_layout :: AnnList -> AnnList
    
    476
    -patch_annlist_layout (AnnList lo bs s) = AnnList (patch_layout lo) bs s
    
    476
    +patch_annlist_layout (AnnList lo s) = AnnList (patch_layout lo) s
    
    477 477
     
    
    478 478
     -- If the decl list for where binds is empty, the anchor ends up
    
    479 479
     -- invalid. Explicitly mark it as not having layout
    
    480
    -patch_layout :: AnnListLayout -> AnnListLayout
    
    481
    -patch_layout lo@(AnnListLayout (EpaSpan (RealSrcSpan _ _)) ) = lo
    
    482
    -patch_layout (AnnListLayout _ ) = AnnListNoLayout
    
    480
    +patch_layout :: EpLayout -> EpLayout
    
    481
    +patch_layout lo@(EpVirtualBraces (EpaSpan (RealSrcSpan _ _)) ) = lo
    
    482
    +patch_layout (EpVirtualBraces _ ) = EpNoLayout
    
    483 483
     patch_layout lo = lo
    
    484 484
     
    
    485 485
     -- | The anchor for a stmtlist is based on either the location or
    

  • testsuite/tests/ghc-api/exactprint/T22919.stderr
    ... ... @@ -70,8 +70,7 @@
    70 70
            ((,)
    
    71 71
             (FromSource)
    
    72 72
             (AnnList
    
    73
    -         (AnnListNoLayout)
    
    74
    -         (ListNone)
    
    73
    +         (EpNoLayout)
    
    75 74
              []))
    
    76 75
            (L
    
    77 76
             (EpAnn
    

  • testsuite/tests/ghc-api/exactprint/Test20239.stderr
    ... ... @@ -134,8 +134,7 @@
    134 134
               (EpTok
    
    135 135
                (EpaSpan { <no location info> }))
    
    136 136
               (AnnList
    
    137
    -           (AnnListNoLayout)
    
    138
    -           (ListNone)
    
    137
    +           (EpNoLayout)
    
    139 138
                [])
    
    140 139
               (EpTok
    
    141 140
                (EpaSpan { Test20239.hs:5:34 })))
    

  • testsuite/tests/ghc-api/exactprint/ZeroWidthSemi.stderr
    ... ... @@ -82,8 +82,7 @@
    82 82
            ((,)
    
    83 83
             (FromSource)
    
    84 84
             (AnnList
    
    85
    -         (AnnListNoLayout)
    
    86
    -         (ListNone)
    
    85
    +         (EpNoLayout)
    
    87 86
              []))
    
    88 87
            (L
    
    89 88
             (EpAnn
    

  • testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr
    ... ... @@ -61,9 +61,8 @@
    61 61
             (EpTok
    
    62 62
              (EpaSpan { T17544.hs:5:12-16 }))
    
    63 63
             (AnnList
    
    64
    -         (AnnListLayout
    
    64
    +         (EpVirtualBraces
    
    65 65
               (EpaSpan { T17544.hs:6:3 }))
    
    66
    -         (ListNone)
    
    67 66
              []))
    
    68 67
            (EpVirtualBraces
    
    69 68
             (EpaSpan { T17544.hs:6:3 })))
    
    ... ... @@ -242,9 +241,8 @@
    242 241
             (EpTok
    
    243 242
              (EpaSpan { T17544.hs:9:12-16 }))
    
    244 243
             (AnnList
    
    245
    -         (AnnListLayout
    
    244
    +         (EpVirtualBraces
    
    246 245
               (EpaSpan { T17544.hs:10:3 }))
    
    247
    -         (ListNone)
    
    248 246
              []))
    
    249 247
            (EpVirtualBraces
    
    250 248
             (EpaSpan { T17544.hs:10:3 })))
    
    ... ... @@ -424,9 +422,8 @@
    424 422
             (EpTok
    
    425 423
              (EpaSpan { T17544.hs:13:12-16 }))
    
    426 424
             (AnnList
    
    427
    -         (AnnListLayout
    
    425
    +         (EpVirtualBraces
    
    428 426
               (EpaSpan { T17544.hs:14:3 }))
    
    429
    -         (ListNone)
    
    430 427
              []))
    
    431 428
            (EpVirtualBraces
    
    432 429
             (EpaSpan { T17544.hs:14:3 })))
    
    ... ... @@ -606,9 +603,8 @@
    606 603
             (EpTok
    
    607 604
              (EpaSpan { T17544.hs:17:12-16 }))
    
    608 605
             (AnnList
    
    609
    -         (AnnListLayout
    
    606
    +         (EpVirtualBraces
    
    610 607
               (EpaSpan { T17544.hs:18:3 }))
    
    611
    -         (ListNone)
    
    612 608
              []))
    
    613 609
            (EpVirtualBraces
    
    614 610
             (EpaSpan { T17544.hs:18:3 })))
    
    ... ... @@ -855,8 +851,7 @@
    855 851
             (EpTok
    
    856 852
              (EpaSpan { T17544.hs:22:12-16 }))
    
    857 853
             (AnnList
    
    858
    -         (AnnListBraces)
    
    859
    -         (ListBraces
    
    854
    +         (EpExplicitBraces
    
    860 855
               (EpTok (EpaSpan { T17544.hs:22:18 }))
    
    861 856
               (EpTok (EpaSpan { T17544.hs:22:30 })))
    
    862 857
              []))
    
    ... ... @@ -1011,9 +1006,8 @@
    1011 1006
              (EpTok
    
    1012 1007
               (EpaSpan { T17544.hs:23:17-21 }))
    
    1013 1008
              (AnnList
    
    1014
    -          (AnnListLayout
    
    1009
    +          (EpVirtualBraces
    
    1015 1010
                (EpaSpan { T17544.hs:24:3 }))
    
    1016
    -          (ListNone)
    
    1017 1011
               [])))
    
    1018 1012
            []
    
    1019 1013
            (L
    
    ... ... @@ -1139,9 +1133,8 @@
    1139 1133
                    (EpTok
    
    1140 1134
                     (EpaSpan { T17544.hs:24:15-19 }))
    
    1141 1135
                    (AnnList
    
    1142
    -                (AnnListLayout
    
    1136
    +                (EpVirtualBraces
    
    1143 1137
                      (EpaSpan { T17544.hs:25:5 }))
    
    1144
    -                (ListNone)
    
    1145 1138
                     [])
    
    1146 1139
                    (EpTok
    
    1147 1140
                     (EpaSpan { <no location info> })))
    
    ... ... @@ -1257,8 +1250,7 @@
    1257 1250
             (EpTok
    
    1258 1251
              (EpaSpan { T17544.hs:28:12-16 }))
    
    1259 1252
             (AnnList
    
    1260
    -         (AnnListBraces)
    
    1261
    -         (ListBraces
    
    1253
    +         (EpExplicitBraces
    
    1262 1254
               (EpTok (EpaSpan { T17544.hs:28:18 }))
    
    1263 1255
               (EpTok (EpaSpan { T17544.hs:28:30 })))
    
    1264 1256
              []))
    
    ... ... @@ -1413,9 +1405,8 @@
    1413 1405
              (EpTok
    
    1414 1406
               (EpaSpan { T17544.hs:29:17-21 }))
    
    1415 1407
              (AnnList
    
    1416
    -          (AnnListLayout
    
    1408
    +          (EpVirtualBraces
    
    1417 1409
                (EpaSpan { T17544.hs:30:3 }))
    
    1418
    -          (ListNone)
    
    1419 1410
               [])))
    
    1420 1411
            []
    
    1421 1412
            (L
    
    ... ... @@ -1541,9 +1532,8 @@
    1541 1532
                    (EpTok
    
    1542 1533
                     (EpaSpan { T17544.hs:30:15-19 }))
    
    1543 1534
                    (AnnList
    
    1544
    -                (AnnListLayout
    
    1535
    +                (EpVirtualBraces
    
    1545 1536
                      (EpaSpan { T17544.hs:31:5 }))
    
    1546
    -                (ListNone)
    
    1547 1537
                     [])
    
    1548 1538
                    (EpTok
    
    1549 1539
                     (EpaSpan { <no location info> })))
    
    ... ... @@ -1659,8 +1649,7 @@
    1659 1649
             (EpTok
    
    1660 1650
              (EpaSpan { T17544.hs:34:12-16 }))
    
    1661 1651
             (AnnList
    
    1662
    -         (AnnListBraces)
    
    1663
    -         (ListBraces
    
    1652
    +         (EpExplicitBraces
    
    1664 1653
               (EpTok (EpaSpan { T17544.hs:34:18 }))
    
    1665 1654
               (EpTok (EpaSpan { T17544.hs:34:30 })))
    
    1666 1655
              []))
    
    ... ... @@ -1815,9 +1804,8 @@
    1815 1804
              (EpTok
    
    1816 1805
               (EpaSpan { T17544.hs:35:17-21 }))
    
    1817 1806
              (AnnList
    
    1818
    -          (AnnListLayout
    
    1807
    +          (EpVirtualBraces
    
    1819 1808
                (EpaSpan { T17544.hs:36:3 }))
    
    1820
    -          (ListNone)
    
    1821 1809
               [])))
    
    1822 1810
            []
    
    1823 1811
            (L
    
    ... ... @@ -1943,9 +1931,8 @@
    1943 1931
                    (EpTok
    
    1944 1932
                     (EpaSpan { T17544.hs:36:15-19 }))
    
    1945 1933
                    (AnnList
    
    1946
    -                (AnnListLayout
    
    1934
    +                (EpVirtualBraces
    
    1947 1935
                      (EpaSpan { T17544.hs:37:5 }))
    
    1948
    -                (ListNone)
    
    1949 1936
                     [])
    
    1950 1937
                    (EpTok
    
    1951 1938
                     (EpaSpan { <no location info> })))
    
    ... ... @@ -2061,8 +2048,7 @@
    2061 2048
             (EpTok
    
    2062 2049
              (EpaSpan { T17544.hs:40:12-16 }))
    
    2063 2050
             (AnnList
    
    2064
    -         (AnnListBraces)
    
    2065
    -         (ListBraces
    
    2051
    +         (EpExplicitBraces
    
    2066 2052
               (EpTok (EpaSpan { T17544.hs:40:18 }))
    
    2067 2053
               (EpTok (EpaSpan { T17544.hs:40:30 })))
    
    2068 2054
              []))
    
    ... ... @@ -2217,9 +2203,8 @@
    2217 2203
              (EpTok
    
    2218 2204
               (EpaSpan { T17544.hs:41:17-21 }))
    
    2219 2205
              (AnnList
    
    2220
    -          (AnnListLayout
    
    2206
    +          (EpVirtualBraces
    
    2221 2207
                (EpaSpan { T17544.hs:42:3 }))
    
    2222
    -          (ListNone)
    
    2223 2208
               [])))
    
    2224 2209
            []
    
    2225 2210
            (L
    
    ... ... @@ -2345,9 +2330,8 @@
    2345 2330
                    (EpTok
    
    2346 2331
                     (EpaSpan { T17544.hs:42:15-19 }))
    
    2347 2332
                    (AnnList
    
    2348
    -                (AnnListLayout
    
    2333
    +                (EpVirtualBraces
    
    2349 2334
                      (EpaSpan { T17544.hs:43:5 }))
    
    2350
    -                (ListNone)
    
    2351 2335
                     [])
    
    2352 2336
                    (EpTok
    
    2353 2337
                     (EpaSpan { <no location info> })))
    
    ... ... @@ -2463,8 +2447,7 @@
    2463 2447
             (EpTok
    
    2464 2448
              (EpaSpan { T17544.hs:46:12-16 }))
    
    2465 2449
             (AnnList
    
    2466
    -         (AnnListBraces)
    
    2467
    -         (ListBraces
    
    2450
    +         (EpExplicitBraces
    
    2468 2451
               (EpTok (EpaSpan { T17544.hs:46:18 }))
    
    2469 2452
               (EpTok (EpaSpan { T17544.hs:46:30 })))
    
    2470 2453
              []))
    
    ... ... @@ -2619,9 +2602,8 @@
    2619 2602
              (EpTok
    
    2620 2603
               (EpaSpan { T17544.hs:47:17-21 }))
    
    2621 2604
              (AnnList
    
    2622
    -          (AnnListLayout
    
    2605
    +          (EpVirtualBraces
    
    2623 2606
                (EpaSpan { T17544.hs:48:3 }))
    
    2624
    -          (ListNone)
    
    2625 2607
               [])))
    
    2626 2608
            []
    
    2627 2609
            (L
    
    ... ... @@ -2747,9 +2729,8 @@
    2747 2729
                    (EpTok
    
    2748 2730
                     (EpaSpan { T17544.hs:48:15-19 }))
    
    2749 2731
                    (AnnList
    
    2750
    -                (AnnListLayout
    
    2732
    +                (EpVirtualBraces
    
    2751 2733
                      (EpaSpan { T17544.hs:49:5 }))
    
    2752
    -                (ListNone)
    
    2753 2734
                     [])
    
    2754 2735
                    (EpTok
    
    2755 2736
                     (EpaSpan { <no location info> })))
    
    ... ... @@ -2865,8 +2846,7 @@
    2865 2846
             (EpTok
    
    2866 2847
              (EpaSpan { T17544.hs:52:13-17 }))
    
    2867 2848
             (AnnList
    
    2868
    -         (AnnListBraces)
    
    2869
    -         (ListBraces
    
    2849
    +         (EpExplicitBraces
    
    2870 2850
               (EpTok (EpaSpan { T17544.hs:52:19 }))
    
    2871 2851
               (EpTok (EpaSpan { T17544.hs:52:32 })))
    
    2872 2852
              []))
    
    ... ... @@ -3021,9 +3001,8 @@
    3021 3001
              (EpTok
    
    3022 3002
               (EpaSpan { T17544.hs:53:18-22 }))
    
    3023 3003
              (AnnList
    
    3024
    -          (AnnListLayout
    
    3004
    +          (EpVirtualBraces
    
    3025 3005
                (EpaSpan { T17544.hs:54:3 }))
    
    3026
    -          (ListNone)
    
    3027 3006
               [])))
    
    3028 3007
            []
    
    3029 3008
            (L
    
    ... ... @@ -3149,9 +3128,8 @@
    3149 3128
                    (EpTok
    
    3150 3129
                     (EpaSpan { T17544.hs:54:16-20 }))
    
    3151 3130
                    (AnnList
    
    3152
    -                (AnnListLayout
    
    3131
    +                (EpVirtualBraces
    
    3153 3132
                      (EpaSpan { T17544.hs:55:5 }))
    
    3154
    -                (ListNone)
    
    3155 3133
                     [])
    
    3156 3134
                    (EpTok
    
    3157 3135
                     (EpaSpan { <no location info> })))
    

  • testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr
    ... ... @@ -185,9 +185,8 @@
    185 185
             (EpTok
    
    186 186
              (EpaSpan { T17544_kw.hs:14:3-7 }))
    
    187 187
             (AnnList
    
    188
    -         (AnnListLayout
    
    188
    +         (EpVirtualBraces
    
    189 189
               (EpaSpan { T17544_kw.hs:14:9 }))
    
    190
    -         (ListNone)
    
    191 190
              [])
    
    192 191
             (EpTok
    
    193 192
              (EpaSpan { <no location info> })))
    
    ... ... @@ -296,9 +295,8 @@
    296 295
             (EpTok
    
    297 296
              (EpaSpan { T17544_kw.hs:17:3-7 }))
    
    298 297
             (AnnList
    
    299
    -         (AnnListLayout
    
    298
    +         (EpVirtualBraces
    
    300 299
               (EpaSpan { T17544_kw.hs:17:9 }))
    
    301
    -         (ListNone)
    
    302 300
              [])
    
    303 301
             (EpTok
    
    304 302
              (EpaSpan { <no location info> })))
    
    ... ... @@ -415,9 +413,8 @@
    415 413
             (EpTok
    
    416 414
              (EpaSpan { T17544_kw.hs:21:3-7 }))
    
    417 415
             (AnnList
    
    418
    -         (AnnListLayout
    
    416
    +         (EpVirtualBraces
    
    419 417
               (EpaSpan { T17544_kw.hs:22:5 }))
    
    420
    -         (ListNone)
    
    421 418
              []))
    
    422 419
            (EpVirtualBraces
    
    423 420
             (EpaSpan { T17544_kw.hs:22:5 })))
    

  • testsuite/tests/haddock/should_compile_flag_haddock/T24221.stderr
    ... ... @@ -82,8 +82,7 @@
    82 82
             (EpTok
    
    83 83
              (EpaSpan { <no location info> }))
    
    84 84
             (AnnList
    
    85
    -         (AnnListNoLayout)
    
    86
    -         (ListNone)
    
    85
    +         (EpNoLayout)
    
    87 86
              [])
    
    88 87
             (EpTok
    
    89 88
              (EpaSpan { T24221.hs:5:3 })))
    
    ... ... @@ -419,8 +418,7 @@
    419 418
             (EpTok
    
    420 419
              (EpaSpan { <no location info> }))
    
    421 420
             (AnnList
    
    422
    -         (AnnListNoLayout)
    
    423
    -         (ListNone)
    
    421
    +         (EpNoLayout)
    
    424 422
              [])
    
    425 423
             (EpTok
    
    426 424
              (EpaSpan { T24221.hs:11:11 })))
    
    ... ... @@ -590,8 +588,7 @@
    590 588
             (EpTok
    
    591 589
              (EpaSpan { <no location info> }))
    
    592 590
             (AnnList
    
    593
    -         (AnnListNoLayout)
    
    594
    -         (ListNone)
    
    591
    +         (EpNoLayout)
    
    595 592
              [])
    
    596 593
             (EpTok
    
    597 594
              (EpaSpan { T24221.hs:14:11 })))
    
    ... ... @@ -787,8 +784,7 @@
    787 784
             (EpTok
    
    788 785
              (EpaSpan { <no location info> }))
    
    789 786
             (AnnList
    
    790
    -         (AnnListNoLayout)
    
    791
    -         (ListNone)
    
    787
    +         (EpNoLayout)
    
    792 788
              [])
    
    793 789
             (EpTok
    
    794 790
              (EpaSpan { T24221.hs:19:11 })))
    
    ... ... @@ -984,8 +980,7 @@
    984 980
             (EpTok
    
    985 981
              (EpaSpan { <no location info> }))
    
    986 982
             (AnnList
    
    987
    -         (AnnListNoLayout)
    
    988
    -         (ListNone)
    
    983
    +         (EpNoLayout)
    
    989 984
              [])
    
    990 985
             (EpTok
    
    991 986
              (EpaSpan { T24221.hs:27:11 })))
    
    ... ... @@ -1228,8 +1223,7 @@
    1228 1223
             (EpTok
    
    1229 1224
              (EpaSpan { <no location info> }))
    
    1230 1225
             (AnnList
    
    1231
    -         (AnnListNoLayout)
    
    1232
    -         (ListNone)
    
    1226
    +         (EpNoLayout)
    
    1233 1227
              [])
    
    1234 1228
             (EpTok
    
    1235 1229
              (EpaSpan { T24221.hs:31:11 })))
    
    ... ... @@ -1485,8 +1479,7 @@
    1485 1479
             (EpTok
    
    1486 1480
              (EpaSpan { <no location info> }))
    
    1487 1481
             (AnnList
    
    1488
    -         (AnnListNoLayout)
    
    1489
    -         (ListNone)
    
    1482
    +         (EpNoLayout)
    
    1490 1483
              [])
    
    1491 1484
             (EpTok
    
    1492 1485
              (EpaSpan { T24221.hs:36:11 })))
    

  • testsuite/tests/module/mod185.stderr
    ... ... @@ -97,8 +97,7 @@
    97 97
            ((,)
    
    98 98
             (FromSource)
    
    99 99
             (AnnList
    
    100
    -         (AnnListNoLayout)
    
    101
    -         (ListNone)
    
    100
    +         (EpNoLayout)
    
    102 101
              []))
    
    103 102
            (L
    
    104 103
             (EpAnn
    

  • testsuite/tests/parser/should_compile/DumpParsedAst.stderr
    ... ... @@ -120,8 +120,7 @@
    120 120
             (EpTok
    
    121 121
              (EpaSpan { <no location info> }))
    
    122 122
             (AnnList
    
    123
    -         (AnnListNoLayout)
    
    124
    -         (ListNone)
    
    123
    +         (EpNoLayout)
    
    125 124
              [])
    
    126 125
             (EpTok
    
    127 126
              (EpaSpan { DumpParsedAst.hs:7:12 })))
    
    ... ... @@ -365,9 +364,8 @@
    365 364
              (EpaSpan { <no location info> })))
    
    366 365
            (ClosedTypeFamily
    
    367 366
             (AnnList
    
    368
    -         (AnnListLayout
    
    367
    +         (EpVirtualBraces
    
    369 368
               (EpaSpan { DumpParsedAst.hs:11:3 }))
    
    370
    -         (ListNone)
    
    371 369
              [])
    
    372 370
             (Just
    
    373 371
              [(L
    
    ... ... @@ -837,8 +835,7 @@
    837 835
             (EpTok
    
    838 836
              (EpaSpan { <no location info> }))
    
    839 837
             (AnnList
    
    840
    -         (AnnListNoLayout)
    
    841
    -         (ListNone)
    
    838
    +         (EpNoLayout)
    
    842 839
              [])
    
    843 840
             (EpTok
    
    844 841
              (EpaSpan { DumpParsedAst.hs:15:19 })))
    
    ... ... @@ -1154,9 +1151,8 @@
    1154 1151
              (EpaSpan { <no location info> })))
    
    1155 1152
            (ClosedTypeFamily
    
    1156 1153
             (AnnList
    
    1157
    -         (AnnListLayout
    
    1154
    +         (EpVirtualBraces
    
    1158 1155
               (EpaSpan { DumpParsedAst.hs:19:3 }))
    
    1159
    -         (ListNone)
    
    1160 1156
              [])
    
    1161 1157
             (Just
    
    1162 1158
              [(L
    
    ... ... @@ -1808,9 +1804,8 @@
    1808 1804
               (EpTok
    
    1809 1805
                (EpaSpan { DumpParsedAst.hs:22:62-66 }))
    
    1810 1806
               (AnnList
    
    1811
    -           (AnnListLayout
    
    1807
    +           (EpVirtualBraces
    
    1812 1808
                 (EpaSpan { DumpParsedAst.hs:23:3 }))
    
    1813
    -           (ListNone)
    
    1814 1809
                [])
    
    1815 1810
               (EpTok
    
    1816 1811
                (EpaSpan { <no location info> })))
    
    ... ... @@ -2235,8 +2230,7 @@
    2235 2230
            ((,)
    
    2236 2231
             (FromSource)
    
    2237 2232
             (AnnList
    
    2238
    -         (AnnListNoLayout)
    
    2239
    -         (ListNone)
    
    2233
    +         (EpNoLayout)
    
    2240 2234
              []))
    
    2241 2235
            (L
    
    2242 2236
             (EpAnn
    

  • testsuite/tests/parser/should_compile/DumpParsedAstComments.stderr
    ... ... @@ -90,8 +90,7 @@
    90 90
            ((,)
    
    91 91
             (FromSource)
    
    92 92
             (AnnList
    
    93
    -         (AnnListNoLayout)
    
    94
    -         (ListNone)
    
    93
    +         (EpNoLayout)
    
    95 94
              []))
    
    96 95
            (L
    
    97 96
             (EpAnn
    
    ... ... @@ -219,8 +218,7 @@
    219 218
            ((,)
    
    220 219
             (FromSource)
    
    221 220
             (AnnList
    
    222
    -         (AnnListNoLayout)
    
    223
    -         (ListNone)
    
    221
    +         (EpNoLayout)
    
    224 222
              []))
    
    225 223
            (L
    
    226 224
             (EpAnn
    
    ... ... @@ -297,9 +295,8 @@
    297 295
                      ((,)
    
    298 296
                       (Right
    
    299 297
                        (AnnList
    
    300
    -                    (AnnListLayout
    
    298
    +                    (EpVirtualBraces
    
    301 299
                          (EpaSpan { DumpParsedAstComments.hs:16:3 }))
    
    302
    -                    (ListNone)
    
    303 300
                         []))
    
    304 301
                       (EpaSpan { DumpParsedAstComments.hs:14:7-8 }))
    
    305 302
                      (DoExpr
    
    ... ... @@ -373,8 +370,7 @@
    373 370
            ((,)
    
    374 371
             (FromSource)
    
    375 372
             (AnnList
    
    376
    -         (AnnListNoLayout)
    
    377
    -         (ListNone)
    
    373
    +         (EpNoLayout)
    
    378 374
              []))
    
    379 375
            (L
    
    380 376
             (EpAnn
    

  • testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
    ... ... @@ -30,8 +30,7 @@
    30 30
                ((,)
    
    31 31
                 (FromSource)
    
    32 32
                 (AnnList
    
    33
    -             (AnnListNoLayout)
    
    34
    -             (ListNone)
    
    33
    +             (EpNoLayout)
    
    35 34
                  []))
    
    36 35
                (L
    
    37 36
                 (EpAnn
    
    ... ... @@ -184,8 +183,7 @@
    184 183
               (EpTok
    
    185 184
                (EpaSpan { <no location info> }))
    
    186 185
               (AnnList
    
    187
    -           (AnnListNoLayout)
    
    188
    -           (ListNone)
    
    186
    +           (EpNoLayout)
    
    189 187
                [])
    
    190 188
               (EpTok
    
    191 189
                (EpaSpan { <no location info> })))
    
    ... ... @@ -318,9 +316,8 @@
    318 316
                (EpaSpan { <no location info> })))
    
    319 317
              (ClosedTypeFamily
    
    320 318
               (AnnList
    
    321
    -           (AnnListLayout
    
    319
    +           (EpVirtualBraces
    
    322 320
                 (EpaSpan { DumpRenamedAst.hs:13:3 }))
    
    323
    -           (ListNone)
    
    324 321
                [])
    
    325 322
               (Just
    
    326 323
                [(L
    
    ... ... @@ -1046,8 +1043,7 @@
    1046 1043
               (EpTok
    
    1047 1044
                (EpaSpan { <no location info> }))
    
    1048 1045
               (AnnList
    
    1049
    -           (AnnListNoLayout)
    
    1050
    -           (ListNone)
    
    1046
    +           (EpNoLayout)
    
    1051 1047
                [])
    
    1052 1048
               (EpTok
    
    1053 1049
                (EpaSpan { <no location info> })))
    
    ... ... @@ -1194,9 +1190,8 @@
    1194 1190
                (EpaSpan { <no location info> })))
    
    1195 1191
              (ClosedTypeFamily
    
    1196 1192
               (AnnList
    
    1197
    -           (AnnListLayout
    
    1193
    +           (EpVirtualBraces
    
    1198 1194
                 (EpaSpan { DumpRenamedAst.hs:26:3 }))
    
    1199
    -           (ListNone)
    
    1200 1195
                [])
    
    1201 1196
               (Just
    
    1202 1197
                [(L
    
    ... ... @@ -2322,8 +2317,7 @@
    2322 2317
                 (EpTok
    
    2323 2318
                  (EpaSpan { <no location info> }))
    
    2324 2319
                 (AnnList
    
    2325
    -             (AnnListNoLayout)
    
    2326
    -             (ListNone)
    
    2320
    +             (EpNoLayout)
    
    2327 2321
                  [])
    
    2328 2322
                 (EpTok
    
    2329 2323
                  (EpaSpan { <no location info> })))
    

  • testsuite/tests/parser/should_compile/DumpSemis.stderr
    ... ... @@ -261,8 +261,7 @@
    261 261
            ((,)
    
    262 262
             (FromSource)
    
    263 263
             (AnnList
    
    264
    -         (AnnListNoLayout)
    
    265
    -         (ListNone)
    
    264
    +         (EpNoLayout)
    
    266 265
              []))
    
    267 266
            (L
    
    268 267
             (EpAnn
    
    ... ... @@ -333,9 +332,8 @@
    333 332
                      ((,)
    
    334 333
                       (Right
    
    335 334
                        (AnnList
    
    336
    -                    (AnnListLayout
    
    337
    -                     (EpaSpan { DumpSemis.hs:(11,3)-(12,3) }))
    
    338
    -                    (ListNone)
    
    335
    +                    (EpVirtualBraces
    
    336
    +                      (EpaSpan { DumpSemis.hs:(11,3)-(12,3) }))
    
    339 337
                         []))
    
    340 338
                       (EpaSpan { DumpSemis.hs:10:7-8 }))
    
    341 339
                      (DoExpr
    
    ... ... @@ -364,8 +362,7 @@
    364 362
                            ((,)
    
    365 363
                             (Right
    
    366 364
                              (AnnList
    
    367
    -                          (AnnListBraces)
    
    368
    -                          (ListBraces
    
    365
    +                          (EpExplicitBraces
    
    369 366
                                (EpTok (EpaSpan { DumpSemis.hs:11:6 }))
    
    370 367
                                (EpTok (EpaSpan { DumpSemis.hs:11:15 })))
    
    371 368
                               [(EpTok
    
    ... ... @@ -560,8 +557,7 @@
    560 557
            ((,)
    
    561 558
             (FromSource)
    
    562 559
             (AnnList
    
    563
    -         (AnnListNoLayout)
    
    564
    -         (ListNone)
    
    560
    +         (EpNoLayout)
    
    565 561
              []))
    
    566 562
            (L
    
    567 563
             (EpAnn
    
    ... ... @@ -632,8 +628,7 @@
    632 628
                      ((,)
    
    633 629
                       (Right
    
    634 630
                        (AnnList
    
    635
    -                    (AnnListBraces)
    
    636
    -                    (ListBraces
    
    631
    +                    (EpExplicitBraces
    
    637 632
                          (EpTok (EpaSpan { DumpSemis.hs:16:3 }))
    
    638 633
                          (EpTok (EpaSpan { DumpSemis.hs:19:3 })))
    
    639 634
                         [(EpTok
    
    ... ... @@ -818,8 +813,7 @@
    818 813
            ((,)
    
    819 814
             (FromSource)
    
    820 815
             (AnnList
    
    821
    -         (AnnListNoLayout)
    
    822
    -         (ListNone)
    
    816
    +         (EpNoLayout)
    
    823 817
              []))
    
    824 818
            (L
    
    825 819
             (EpAnn
    
    ... ... @@ -890,8 +884,7 @@
    890 884
                      ((,)
    
    891 885
                       (Right
    
    892 886
                        (AnnList
    
    893
    -                    (AnnListBraces)
    
    894
    -                    (ListBraces
    
    887
    +                    (EpExplicitBraces
    
    895 888
                          (EpTok (EpaSpan { DumpSemis.hs:22:10 }))
    
    896 889
                          (EpTok (EpaSpan { DumpSemis.hs:22:30 })))
    
    897 890
                         [(EpTok
    
    ... ... @@ -1032,8 +1025,7 @@
    1032 1025
            ((,)
    
    1033 1026
             (FromSource)
    
    1034 1027
             (AnnList
    
    1035
    -         (AnnListNoLayout)
    
    1036
    -         (ListNone)
    
    1028
    +         (EpNoLayout)
    
    1037 1029
              []))
    
    1038 1030
            (L
    
    1039 1031
             (EpAnn
    
    ... ... @@ -1143,8 +1135,7 @@
    1143 1135
            ((,)
    
    1144 1136
             (FromSource)
    
    1145 1137
             (AnnList
    
    1146
    -         (AnnListNoLayout)
    
    1147
    -         (ListNone)
    
    1138
    +         (EpNoLayout)
    
    1148 1139
              []))
    
    1149 1140
            (L
    
    1150 1141
             (EpAnn
    
    ... ... @@ -1256,8 +1247,7 @@
    1256 1247
            ((,)
    
    1257 1248
             (FromSource)
    
    1258 1249
             (AnnList
    
    1259
    -         (AnnListNoLayout)
    
    1260
    -         (ListNone)
    
    1250
    +         (EpNoLayout)
    
    1261 1251
              []))
    
    1262 1252
            (L
    
    1263 1253
             (EpAnn
    
    ... ... @@ -1366,9 +1356,8 @@
    1366 1356
             (EpTok
    
    1367 1357
              (EpaSpan { DumpSemis.hs:28:40-44 }))
    
    1368 1358
             (AnnList
    
    1369
    -         (AnnListLayout
    
    1359
    +         (EpVirtualBraces
    
    1370 1360
               (EpaSpan { DumpSemis.hs:29:3 }))
    
    1371
    -         (ListNone)
    
    1372 1361
              []))
    
    1373 1362
            (EpVirtualBraces
    
    1374 1363
             (EpaSpan { DumpSemis.hs:29:3 })))
    
    ... ... @@ -1766,8 +1755,7 @@
    1766 1755
            ((,)
    
    1767 1756
             (FromSource)
    
    1768 1757
             (AnnList
    
    1769
    -         (AnnListNoLayout)
    
    1770
    -         (ListNone)
    
    1758
    +         (EpNoLayout)
    
    1771 1759
              []))
    
    1772 1760
            (L
    
    1773 1761
             (EpAnn
    
    ... ... @@ -1898,8 +1886,7 @@
    1898 1886
            ((,)
    
    1899 1887
             (FromSource)
    
    1900 1888
             (AnnList
    
    1901
    -         (AnnListNoLayout)
    
    1902
    -         (ListNone)
    
    1889
    +         (EpNoLayout)
    
    1903 1890
              []))
    
    1904 1891
            (L
    
    1905 1892
             (EpAnn
    
    ... ... @@ -1981,8 +1968,7 @@
    1981 1968
                       (HsValBinds
    
    1982 1969
                        ((,)
    
    1983 1970
                         (AnnList
    
    1984
    -                     (AnnListBraces)
    
    1985
    -                     (ListBraces
    
    1971
    +                     (EpExplicitBraces
    
    1986 1972
                           (EpTok (EpaSpan { DumpSemis.hs:34:13 }))
    
    1987 1973
                           (EpTok (EpaSpan { DumpSemis.hs:34:31 })))
    
    1988 1974
                          [(EpTok
    
    ... ... @@ -2026,8 +2012,7 @@
    2026 2012
                              ((,)
    
    2027 2013
                               (FromSource)
    
    2028 2014
                               (AnnList
    
    2029
    -                           (AnnListNoLayout)
    
    2030
    -                           (ListNone)
    
    2015
    +                           (EpNoLayout)
    
    2031 2016
                                []))
    
    2032 2017
                              (L
    
    2033 2018
                               (EpAnn
    
    ... ... @@ -2145,8 +2130,7 @@
    2145 2130
                              ((,)
    
    2146 2131
                               (FromSource)
    
    2147 2132
                               (AnnList
    
    2148
    -                           (AnnListNoLayout)
    
    2149
    -                           (ListNone)
    
    2133
    +                           (EpNoLayout)
    
    2150 2134
                                []))
    
    2151 2135
                              (L
    
    2152 2136
                               (EpAnn
    
    ... ... @@ -2282,8 +2266,7 @@
    2282 2266
            ((,)
    
    2283 2267
             (FromSource)
    
    2284 2268
             (AnnList
    
    2285
    -         (AnnListNoLayout)
    
    2286
    -         (ListNone)
    
    2269
    +         (EpNoLayout)
    
    2287 2270
              []))
    
    2288 2271
            (L
    
    2289 2272
             (EpAnn
    
    ... ... @@ -2393,8 +2376,7 @@
    2393 2376
                       ((,)
    
    2394 2377
                        (FromSource)
    
    2395 2378
                        (AnnList
    
    2396
    -                    (AnnListBraces)
    
    2397
    -                    (ListBraces
    
    2379
    +                    (EpExplicitBraces
    
    2398 2380
                          (EpTok (EpaSpan { DumpSemis.hs:38:4 }))
    
    2399 2381
                          (EpTok (EpaSpan { DumpSemis.hs:44:4 })))
    
    2400 2382
                         [(EpTok
    

  • testsuite/tests/parser/should_compile/KindSigs.stderr
    ... ... @@ -112,9 +112,8 @@
    112 112
              (EpaSpan { <no location info> })))
    
    113 113
            (ClosedTypeFamily
    
    114 114
             (AnnList
    
    115
    -         (AnnListLayout
    
    115
    +         (EpVirtualBraces
    
    116 116
               (EpaSpan { KindSigs.hs:12:3 }))
    
    117
    -         (ListNone)
    
    118 117
              [])
    
    119 118
             (Just
    
    120 119
              [(L
    
    ... ... @@ -1003,8 +1002,7 @@
    1003 1002
            ((,)
    
    1004 1003
             (FromSource)
    
    1005 1004
             (AnnList
    
    1006
    -         (AnnListNoLayout)
    
    1007
    -         (ListNone)
    
    1005
    +         (EpNoLayout)
    
    1008 1006
              []))
    
    1009 1007
            (L
    
    1010 1008
             (EpAnn
    
    ... ... @@ -1728,8 +1726,7 @@
    1728 1726
            ((,)
    
    1729 1727
             (FromSource)
    
    1730 1728
             (AnnList
    
    1731
    -         (AnnListNoLayout)
    
    1732
    -         (ListNone)
    
    1729
    +         (EpNoLayout)
    
    1733 1730
              []))
    
    1734 1731
            (L
    
    1735 1732
             (EpAnn
    

  • testsuite/tests/parser/should_compile/T14189.stderr
    ... ... @@ -54,8 +54,7 @@
    54 54
               (EpTok
    
    55 55
                (EpaSpan { <no location info> }))
    
    56 56
               (AnnList
    
    57
    -           (AnnListNoLayout)
    
    58
    -           (ListNone)
    
    57
    +           (EpNoLayout)
    
    59 58
                [])
    
    60 59
               (EpTok
    
    61 60
                (EpaSpan { <no location info> })))
    

  • testsuite/tests/parser/should_compile/T15279.stderr
    ... ... @@ -28,7 +28,7 @@
    28 28
          []
    
    29 29
          []))
    
    30 30
        (EpVirtualBraces
    
    31
    -    (1))
    
    31
    +    (EpaSpan { T15279.hs:5:1 }))
    
    32 32
        (Nothing)
    
    33 33
        (Nothing))
    
    34 34
       (Just
    
    ... ... @@ -155,8 +155,7 @@
    155 155
            ((,)
    
    156 156
             (FromSource)
    
    157 157
             (AnnList
    
    158
    -         (AnnListNoLayout)
    
    159
    -         (ListNone)
    
    158
    +         (EpNoLayout)
    
    160 159
              []))
    
    161 160
            (L
    
    162 161
             (EpAnn
    
    ... ... @@ -239,8 +238,14 @@
    239 238
                       (SourceText 'b')
    
    240 239
                       ('b'))))))
    
    241 240
                  [])
    
    242
    -            (EmptyLocalBinds
    
    243
    -             (NoExtField)))))
    
    241
    +            (L
    
    242
    +             (EpAnn
    
    243
    +              (EpaSpan { <no location info> })
    
    244
    +              []
    
    245
    +              (EpaComments
    
    246
    +               []))
    
    247
    +             (EmptyLocalBinds
    
    248
    +              (NoExtField))))))
    
    244 249
             ,(L
    
    245 250
               (EpAnn
    
    246 251
                (EpaSpan { T15279.hs-incl:2:1-13 })
    
    ... ... @@ -316,8 +321,14 @@
    316 321
                       (SourceText 'c')
    
    317 322
                       ('c'))))))
    
    318 323
                  [])
    
    319
    -            (EmptyLocalBinds
    
    320
    -             (NoExtField)))))
    
    324
    +            (L
    
    325
    +             (EpAnn
    
    326
    +              (EpaSpan { <no location info> })
    
    327
    +              []
    
    328
    +              (EpaComments
    
    329
    +               []))
    
    330
    +             (EmptyLocalBinds
    
    331
    +              (NoExtField))))))
    
    321 332
             ,(L
    
    322 333
               (EpAnn
    
    323 334
                (EpaSpan { T15279.hs:7:1-11 })
    
    ... ... @@ -390,7 +401,13 @@
    390 401
                       (SourceText 'a')
    
    391 402
                       ('a'))))))
    
    392 403
                  [])
    
    393
    -            (EmptyLocalBinds
    
    394
    -             (NoExtField)))))])))))]))
    
    404
    +            (L
    
    405
    +             (EpAnn
    
    406
    +              (EpaSpan { <no location info> })
    
    407
    +              []
    
    408
    +              (EpaComments
    
    409
    +               []))
    
    410
    +             (EmptyLocalBinds
    
    411
    +              (NoExtField))))))])))))]))
    
    395 412
     
    
    396 413
     

  • testsuite/tests/parser/should_compile/T15323.stderr
    ... ... @@ -111,9 +111,8 @@
    111 111
             (EpTok
    
    112 112
              (EpaSpan { T15323.hs:5:21-25 }))
    
    113 113
             (AnnList
    
    114
    -         (AnnListLayout
    
    114
    +         (EpVirtualBraces
    
    115 115
               (EpaSpan { T15323.hs:6:5 }))
    
    116
    -         (ListNone)
    
    117 116
              [])
    
    118 117
             (EpTok
    
    119 118
              (EpaSpan { <no location info> })))
    

  • testsuite/tests/parser/should_compile/T20452.stderr
    ... ... @@ -130,8 +130,7 @@
    130 130
             (EpTok
    
    131 131
              (EpaSpan { <no location info> }))
    
    132 132
             (AnnList
    
    133
    -         (AnnListNoLayout)
    
    134
    -         (ListNone)
    
    133
    +         (EpNoLayout)
    
    135 134
              [])
    
    136 135
             (EpTok
    
    137 136
              (EpaSpan { T20452.hs:5:24 })))
    
    ... ... @@ -263,8 +262,7 @@
    263 262
             (EpTok
    
    264 263
              (EpaSpan { <no location info> }))
    
    265 264
             (AnnList
    
    266
    -         (AnnListNoLayout)
    
    267
    -         (ListNone)
    
    265
    +         (EpNoLayout)
    
    268 266
              [])
    
    269 267
             (EpTok
    
    270 268
              (EpaSpan { T20452.hs:6:24 })))
    
    ... ... @@ -325,8 +323,7 @@
    325 323
             (EpTok
    
    326 324
              (EpaSpan { T20452.hs:8:78-82 }))
    
    327 325
             (AnnList
    
    328
    -         (AnnListBraces)
    
    329
    -         (ListBraces
    
    326
    +         (EpExplicitBraces
    
    330 327
               (EpTok (EpaSpan { T20452.hs:8:84 }))
    
    331 328
               (EpTok (EpaSpan { T20452.hs:8:85 })))
    
    332 329
              []))
    
    ... ... @@ -560,8 +557,7 @@
    560 557
             (EpTok
    
    561 558
              (EpaSpan { T20452.hs:9:78-82 }))
    
    562 559
             (AnnList
    
    563
    -         (AnnListBraces)
    
    564
    -         (ListBraces
    
    560
    +         (EpExplicitBraces
    
    565 561
               (EpTok (EpaSpan { T20452.hs:9:84 }))
    
    566 562
               (EpTok (EpaSpan { T20452.hs:9:85 })))
    
    567 563
              []))
    

  • testsuite/tests/parser/should_compile/T20718.stderr
    ... ... @@ -104,8 +104,7 @@
    104 104
            ((,)
    
    105 105
             (FromSource)
    
    106 106
             (AnnList
    
    107
    -         (AnnListNoLayout)
    
    108
    -         (ListNone)
    
    107
    +         (EpNoLayout)
    
    109 108
              []))
    
    110 109
            (L
    
    111 110
             (EpAnn
    

  • testsuite/tests/parser/should_compile/T20846.stderr
    ... ... @@ -94,8 +94,7 @@
    94 94
            ((,)
    
    95 95
             (FromSource)
    
    96 96
             (AnnList
    
    97
    -         (AnnListNoLayout)
    
    98
    -         (ListNone)
    
    97
    +         (EpNoLayout)
    
    99 98
              []))
    
    100 99
            (L
    
    101 100
             (EpAnn
    

  • testsuite/tests/printer/T18791.stderr
    ... ... @@ -82,9 +82,8 @@
    82 82
             (EpTok
    
    83 83
              (EpaSpan { T18791.hs:4:8-12 }))
    
    84 84
             (AnnList
    
    85
    -         (AnnListLayout
    
    85
    +         (EpVirtualBraces
    
    86 86
               (EpaSpan { T18791.hs:5:3 }))
    
    87
    -         (ListNone)
    
    88 87
              [])
    
    89 88
             (EpTok
    
    90 89
              (EpaSpan { <no location info> })))
    

  • testsuite/tests/printer/Test20297.stdout
    ... ... @@ -83,8 +83,7 @@
    83 83
            ((,)
    
    84 84
             (FromSource)
    
    85 85
             (AnnList
    
    86
    -         (AnnListNoLayout)
    
    87
    -         (ListNone)
    
    86
    +         (EpNoLayout)
    
    88 87
              []))
    
    89 88
            (L
    
    90 89
             (EpAnn
    
    ... ... @@ -178,8 +177,7 @@
    178 177
                  (HsValBinds
    
    179 178
                   ((,)
    
    180 179
                    (AnnList
    
    181
    -                (AnnListNoLayout)
    
    182
    -                (ListNone)
    
    180
    +                (EpNoLayout)
    
    183 181
                     [])
    
    184 182
                    (EpTok
    
    185 183
                     (EpaSpan { Test20297.hs:9:3-7 })))
    
    ... ... @@ -215,8 +213,7 @@
    215 213
            ((,)
    
    216 214
             (FromSource)
    
    217 215
             (AnnList
    
    218
    -         (AnnListNoLayout)
    
    219
    -         (ListNone)
    
    216
    +         (EpNoLayout)
    
    220 217
              []))
    
    221 218
            (L
    
    222 219
             (EpAnn
    
    ... ... @@ -310,9 +307,8 @@
    310 307
                  (HsValBinds
    
    311 308
                   ((,)
    
    312 309
                    (AnnList
    
    313
    -                (AnnListLayout
    
    310
    +                (EpVirtualBraces
    
    314 311
                      (EpaSpan { Test20297.hs:13:9-26 }))
    
    315
    -                (ListNone)
    
    316 312
                     [])
    
    317 313
                    (EpTok
    
    318 314
                     (EpaSpan { Test20297.hs:12:3-7 })))
    
    ... ... @@ -340,8 +336,7 @@
    340 336
                         ((,)
    
    341 337
                          (FromSource)
    
    342 338
                          (AnnList
    
    343
    -                      (AnnListNoLayout)
    
    344
    -                      (ListNone)
    
    339
    +                      (EpNoLayout)
    
    345 340
                           []))
    
    346 341
                         (L
    
    347 342
                          (EpAnn
    
    ... ... @@ -412,9 +407,8 @@
    412 407
                                   ((,)
    
    413 408
                                    (Right
    
    414 409
                                     (AnnList
    
    415
    -                                 (AnnListLayout
    
    410
    +                                 (EpVirtualBraces
    
    416 411
                                       (EpaSpan { Test20297.hs:13:22-26 }))
    
    417
    -                                 (ListNone)
    
    418 412
                                      []))
    
    419 413
                                    (EpaSpan { Test20297.hs:13:19-20 }))
    
    420 414
                                   (DoExpr
    
    ... ... @@ -490,8 +484,7 @@
    490 484
            ((,)
    
    491 485
             (FromSource)
    
    492 486
             (AnnList
    
    493
    -         (AnnListNoLayout)
    
    494
    -         (ListNone)
    
    487
    +         (EpNoLayout)
    
    495 488
              []))
    
    496 489
            (L
    
    497 490
             (EpAnn
    
    ... ... @@ -563,9 +556,8 @@
    563 556
                       (EpTok
    
    564 557
                        (EpaSpan { Test20297.hs:16:5-6 }))
    
    565 558
                       (AnnList
    
    566
    -                   (AnnListLayout
    
    559
    +                   (EpVirtualBraces
    
    567 560
                         (EpaSpan { Test20297.hs:16:8 }))
    
    568
    -                   (ListNone)
    
    569 561
                        []))
    
    570 562
                      (:|
    
    571 563
                       (L
    
    ... ... @@ -784,8 +776,7 @@
    784 776
            ((,)
    
    785 777
             (FromSource)
    
    786 778
             (AnnList
    
    787
    -         (AnnListNoLayout)
    
    788
    -         (ListNone)
    
    779
    +         (EpNoLayout)
    
    789 780
              []))
    
    790 781
            (L
    
    791 782
             (EpAnn
    
    ... ... @@ -873,8 +864,7 @@
    873 864
                  (HsValBinds
    
    874 865
                   ((,)
    
    875 866
                    (AnnList
    
    876
    -                (AnnListNoLayout)
    
    877
    -                (ListNone)
    
    867
    +                (EpNoLayout)
    
    878 868
                     [])
    
    879 869
                    (EpTok
    
    880 870
                     (EpaSpan { Test20297.ppr.hs:6:3-7 })))
    
    ... ... @@ -904,8 +894,7 @@
    904 894
            ((,)
    
    905 895
             (FromSource)
    
    906 896
             (AnnList
    
    907
    -         (AnnListNoLayout)
    
    908
    -         (ListNone)
    
    897
    +         (EpNoLayout)
    
    909 898
              []))
    
    910 899
            (L
    
    911 900
             (EpAnn
    
    ... ... @@ -993,9 +982,8 @@
    993 982
                  (HsValBinds
    
    994 983
                   ((,)
    
    995 984
                    (AnnList
    
    996
    -                (AnnListLayout
    
    985
    +                (EpVirtualBraces
    
    997 986
                      (EpaSpan { Test20297.ppr.hs:10:7-24 }))
    
    998
    -                (ListNone)
    
    999 987
                     [])
    
    1000 988
                    (EpTok
    
    1001 989
                     (EpaSpan { Test20297.ppr.hs:9:3-7 })))
    
    ... ... @@ -1023,8 +1011,7 @@
    1023 1011
                         ((,)
    
    1024 1012
                          (FromSource)
    
    1025 1013
                          (AnnList
    
    1026
    -                      (AnnListNoLayout)
    
    1027
    -                      (ListNone)
    
    1014
    +                      (EpNoLayout)
    
    1028 1015
                           []))
    
    1029 1016
                         (L
    
    1030 1017
                          (EpAnn
    
    ... ... @@ -1095,9 +1082,8 @@
    1095 1082
                                   ((,)
    
    1096 1083
                                    (Right
    
    1097 1084
                                     (AnnList
    
    1098
    -                                 (AnnListLayout
    
    1085
    +                                 (EpVirtualBraces
    
    1099 1086
                                       (EpaSpan { Test20297.ppr.hs:10:20-24 }))
    
    1100
    -                                 (ListNone)
    
    1101 1087
                                      []))
    
    1102 1088
                                    (EpaSpan { Test20297.ppr.hs:10:17-18 }))
    
    1103 1089
                                   (DoExpr
    
    ... ... @@ -1167,8 +1153,7 @@
    1167 1153
            ((,)
    
    1168 1154
             (FromSource)
    
    1169 1155
             (AnnList
    
    1170
    -         (AnnListNoLayout)
    
    1171
    -         (ListNone)
    
    1156
    +         (EpNoLayout)
    
    1172 1157
              []))
    
    1173 1158
            (L
    
    1174 1159
             (EpAnn
    
    ... ... @@ -1240,9 +1225,8 @@
    1240 1225
                       (EpTok
    
    1241 1226
                        (EpaSpan { Test20297.ppr.hs:11:5-6 }))
    
    1242 1227
                       (AnnList
    
    1243
    -                   (AnnListLayout
    
    1228
    +                   (EpVirtualBraces
    
    1244 1229
                         (EpaSpan { Test20297.ppr.hs:11:8 }))
    
    1245
    -                   (ListNone)
    
    1246 1230
                        []))
    
    1247 1231
                      (:|
    
    1248 1232
                       (L
    

  • testsuite/tests/printer/Test24533.stdout
    ... ... @@ -65,8 +65,7 @@
    65 65
              (EpTok
    
    66 66
               (EpaSpan { <no location info> }))
    
    67 67
              (AnnList
    
    68
    -          (AnnListNoLayout)
    
    69
    -          (ListNone)
    
    68
    +          (EpNoLayout)
    
    70 69
               [])))
    
    71 70
            []
    
    72 71
            (L
    
    ... ... @@ -320,8 +319,7 @@
    320 319
             (EpTok
    
    321 320
              (EpaSpan { <no location info> }))
    
    322 321
             (AnnList
    
    323
    -         (AnnListNoLayout)
    
    324
    -         (ListNone)
    
    322
    +         (EpNoLayout)
    
    325 323
              []))
    
    326 324
            (EpNoLayout))
    
    327 325
           []
    
    ... ... @@ -454,9 +452,8 @@
    454 452
              (EpTok
    
    455 453
               (EpaSpan { Test24533.hs:14:17-21 }))
    
    456 454
              (AnnList
    
    457
    -          (AnnListLayout
    
    455
    +          (EpVirtualBraces
    
    458 456
                (EpaSpan { Test24533.hs:16:3 }))
    
    459
    -          (ListNone)
    
    460 457
               [])))
    
    461 458
            []
    
    462 459
            (L
    
    ... ... @@ -538,8 +535,7 @@
    538 535
                 ((,)
    
    539 536
                  (FromSource)
    
    540 537
                  (AnnList
    
    541
    -              (AnnListNoLayout)
    
    542
    -              (ListNone)
    
    538
    +              (EpNoLayout)
    
    543 539
                   []))
    
    544 540
                 (L
    
    545 541
                  (EpAnn
    
    ... ... @@ -735,8 +731,7 @@
    735 731
              (EpTok
    
    736 732
               (EpaSpan { <no location info> }))
    
    737 733
              (AnnList
    
    738
    -          (AnnListNoLayout)
    
    739
    -          (ListNone)
    
    734
    +          (EpNoLayout)
    
    740 735
               [])))
    
    741 736
            []
    
    742 737
            (L
    
    ... ... @@ -964,8 +959,7 @@
    964 959
             (EpTok
    
    965 960
              (EpaSpan { <no location info> }))
    
    966 961
             (AnnList
    
    967
    -         (AnnListNoLayout)
    
    968
    -         (ListNone)
    
    962
    +         (EpNoLayout)
    
    969 963
              []))
    
    970 964
            (EpNoLayout))
    
    971 965
           []
    
    ... ... @@ -1051,9 +1045,8 @@
    1051 1045
              (EpTok
    
    1052 1046
               (EpaSpan { Test24533.ppr.hs:5:17-21 }))
    
    1053 1047
              (AnnList
    
    1054
    -          (AnnListLayout
    
    1048
    +          (EpVirtualBraces
    
    1055 1049
                (EpaSpan { Test24533.ppr.hs:6:3 }))
    
    1056
    -          (ListNone)
    
    1057 1050
               [])))
    
    1058 1051
            []
    
    1059 1052
            (L
    
    ... ... @@ -1135,8 +1128,7 @@
    1135 1128
                 ((,)
    
    1136 1129
                  (FromSource)
    
    1137 1130
                  (AnnList
    
    1138
    -              (AnnListNoLayout)
    
    1139
    -              (ListNone)
    
    1131
    +              (EpNoLayout)
    
    1140 1132
                   []))
    
    1141 1133
                 (L
    
    1142 1134
                  (EpAnn
    

  • utils/check-exact/ExactPrint.hs
    ... ... @@ -967,23 +967,17 @@ markExternalSourceTextA ann src txt = do
    967 967
     
    
    968 968
     -- ---------------------------------------------------------------------
    
    969 969
     
    
    970
    -markLensBracketsO :: (Monad m, Monoid w)
    
    971
    -  => a -> Lens a AnnListBrackets -> EP w m a
    
    972
    -markLensBracketsO a l =
    
    973
    -  case view l a of
    
    974
    -    ListBraces o c -> do
    
    975
    -      o' <- markEpToken o
    
    976
    -      return (set l (ListBraces o' c) a)
    
    977
    -    ListNone -> return (set l ListNone a)
    
    978
    -
    
    979
    -markLensBracketsC :: (Monad m, Monoid w)
    
    980
    -  => a -> Lens a AnnListBrackets -> EP w m a
    
    981
    -markLensBracketsC a l =
    
    982
    -  case view l a of
    
    983
    -    ListBraces o c -> do
    
    984
    -      c' <- markEpToken c
    
    985
    -      return (set l (ListBraces o c') a)
    
    986
    -    ListNone -> return (set l ListNone a)
    
    970
    +markEpLayoutO :: (Monad m, Monoid w) => EpLayout -> EP w m EpLayout
    
    971
    +markEpLayoutO (EpExplicitBraces o c) = do
    
    972
    +  o' <- markEpToken o
    
    973
    +  return (EpExplicitBraces o' c)
    
    974
    +markEpLayoutO ep = return ep
    
    975
    +
    
    976
    +markEpLayoutC :: (Monad m, Monoid w) => EpLayout -> EP w m EpLayout
    
    977
    +markEpLayoutC (EpExplicitBraces o c) = do
    
    978
    +  c' <- markEpToken c
    
    979
    +  return (EpExplicitBraces o c')
    
    980
    +markEpLayoutC ep = return ep
    
    987 981
     
    
    988 982
     -- -------------------------------------
    
    989 983
     
    
    ... ... @@ -1148,26 +1142,6 @@ limportDeclAnnPackage k annImp = fmap (\new -> annImp { importDeclAnnPackage = n
    1148 1142
     
    
    1149 1143
     -- -------------------------------------
    
    1150 1144
     
    
    1151
    --- data AnnList
    
    1152
    ---   = AnnList {
    
    1153
    ---       al_layout    :: !AnnListLayout,
    
    1154
    ---       al_brackets  :: !AnnListBrackets,
    
    1155
    ---       al_semis     :: [EpToken ";"], -- decls
    
    1156
    ---       al_trailing  :: [TrailingAnn] -- ^ items appearing after the
    
    1157
    ---                                     -- list, such as '=>' for a
    
    1158
    ---                                     -- context
    
    1159
    ---       } deriving (Data,Eq)
    
    1160
    -
    
    1161
    -lal_brackets :: Lens AnnList AnnListBrackets
    
    1162
    -lal_brackets k parent = fmap (\new -> parent { al_brackets = new })
    
    1163
    -                           (k (al_brackets parent))
    
    1164
    -
    
    1165
    -lal_semis :: Lens AnnList [EpToken ";"]
    
    1166
    -lal_semis k parent = fmap (\new -> parent { al_semis = new })
    
    1167
    -                           (k (al_semis parent))
    
    1168
    -
    
    1169
    --- -------------------------------------
    
    1170
    -
    
    1171 1145
     lfst :: Lens (a,b) a
    
    1172 1146
     lfst k parent = fmap (\new -> (new, snd parent))
    
    1173 1147
                          (k (fst parent))
    
    ... ... @@ -1427,12 +1401,6 @@ markLensFun a l f = do
    1427 1401
     
    
    1428 1402
     -- -------------------------------------
    
    1429 1403
     
    
    1430
    -markEpAnnAllLT :: (Monad m, Monoid w, KnownSymbol tok)
    
    1431
    -  => ann -> Lens ann [EpToken tok] -> EP w m ann
    
    1432
    -markEpAnnAllLT a l = do
    
    1433
    -  anns <- mapM markEpToken (view l a)
    
    1434
    -  return (set l anns a)
    
    1435
    -
    
    1436 1404
     markEpaLocationAll :: (Monad m, Monoid w)
    
    1437 1405
       => [EpaLocation] -> String -> EP w m [EpaLocation]
    
    1438 1406
     markEpaLocationAll locs str = mapM (\l -> printStringAtAA l str) locs
    
    ... ... @@ -1468,12 +1436,12 @@ markAnnListA :: (Monad m, Monoid w)
    1468 1436
       => AnnList
    
    1469 1437
       -> EP w m a
    
    1470 1438
       -> EP w m (AnnList, a)
    
    1471
    -markAnnListA an action = do
    
    1472
    -  an0 <- markLensBracketsO an lal_brackets
    
    1473
    -  an1 <- markEpAnnAllLT an0 lal_semis
    
    1439
    +markAnnListA (AnnList la semis) action = do
    
    1440
    +  la0 <- markEpLayoutO la
    
    1441
    +  semis' <- mapM markEpToken semis
    
    1474 1442
       r <- action
    
    1475
    -  an2 <- markLensBracketsC an1 lal_brackets
    
    1476
    -  return (an2, r)
    
    1443
    +  la1 <- markEpLayoutC la0
    
    1444
    +  return ((AnnList la1 semis'), r)
    
    1477 1445
     
    
    1478 1446
     -- ---------------------------------------------------------------------
    
    1479 1447
     
    
    ... ... @@ -2638,7 +2606,7 @@ instance ExactPrint (HsLocalBinds GhcPs) where
    2638 2606
         w' <- markEpToken w -- 'where'
    
    2639 2607
     
    
    2640 2608
         case al_layout an0 of
    
    2641
    -      AnnListLayout anc -> do
    
    2609
    +      EpVirtualBraces anc -> do
    
    2642 2610
             when (not $ isEmptyValBinds valbinds) $ setExtraDP (Just anc)
    
    2643 2611
           _ -> return ()
    
    2644 2612
     
    
    ... ... @@ -2649,7 +2617,7 @@ instance ExactPrint (HsLocalBinds GhcPs) where
    2649 2617
                  Nothing -> return an1
    
    2650 2618
                  Just (ss,dp) -> do
    
    2651 2619
                      setExtraDPReturn Nothing
    
    2652
    -                 return $ an1 { al_layout = AnnListLayout (EpaDelta ss dp []) }
    
    2620
    +                 return $ an1 { al_layout = EpVirtualBraces (EpaDelta ss dp []) }
    
    2653 2621
         return (HsValBinds (an2, w') valbinds')
    
    2654 2622
     
    
    2655 2623
       exact (HsIPBinds (an,w) bs) = do
    

  • utils/check-exact/Main.hs
    ... ... @@ -520,8 +520,8 @@ changeLocalDecls libdir (L l p) = do
    520 520
             let oldDecls' = captureLineSpacing oldDecls
    
    521 521
             let (VbSig o:oldBinds)  = map wrapValBind oldDecls'
    
    522 522
                 o' = setEntryDP o (DifferentLine 2 0)
    
    523
    -        let (AnnList (AnnListLayout _) a b) = van
    
    524
    -        let van' = AnnList (AnnListLayout (EpaDelta noSrcSpan (DifferentLine 1 4) [])) a b
    
    523
    +        let (AnnList _ b) = van
    
    524
    +        let van' = AnnList (EpVirtualBraces (EpaDelta noSrcSpan (DifferentLine 1 4) [])) b
    
    525 525
             let binds' = L lb (HsValBinds (van',w)
    
    526 526
                               (ValBinds noExtField (VbSig sig':VbBind decl':VbSig o':oldBinds)))
    
    527 527
             return (L lm (Match an mln pats (GRHSs emptyComments rhs binds')))
    
    ... ... @@ -546,7 +546,7 @@ changeLocalDecls2 libdir (L l p) = do
    546 546
           replaceLocalBinds (L lm (Match ma mln pats (GRHSs _ rhs (L _ EmptyLocalBinds{})))) = do
    
    547 547
             let anc = (EpaDelta noSrcSpan (DifferentLine 1 2) [])
    
    548 548
             let anc2 = (EpaDelta noSrcSpan (DifferentLine 1 4) [])
    
    549
    -        let an = ( AnnList (AnnListLayout anc2) ListNone []
    
    549
    +        let an = ( AnnList (EpVirtualBraces anc2) []
    
    550 550
                      , EpTok (EpaDelta noSrcSpan (SameLine 0) []))
    
    551 551
             let lb = EpAnn anc noAnn emptyComments
    
    552 552
             let decls = [VbSig sig', VbBind decl']
    

  • utils/check-exact/Transform.hs
    ... ... @@ -1021,15 +1021,13 @@ replaceDeclsValbinds w (L l (EmptyLocalBinds _)) new
    1021 1021
     
    
    1022 1022
     oldWhereAnnotation :: (AnnList, EpToken "where")
    
    1023 1023
       -> WithWhere -> (AnnList, EpToken "where")
    
    1024
    -oldWhereAnnotation (an, _w) ww  = an'
    
    1024
    +oldWhereAnnotation (an, _w) ww  = (an, w')
    
    1025 1025
       -- TODO: when we set DP (0,0) for the HsValBinds EpEpaLocation,
    
    1026 1026
       -- change the AnnList anchor to have the correct DP too
    
    1027 1027
       where
    
    1028
    -    (AnnList ancl p s) = an
    
    1029
    -    w = case ww of
    
    1028
    +    w' = case ww of
    
    1030 1029
           WithWhere -> EpTok (EpaDelta noSrcSpan (SameLine 0) [])
    
    1031 1030
           WithoutWhere -> noEpTok
    
    1032
    -    an' = (AnnList ancl p s, w)
    
    1033 1031
     
    
    1034 1032
     newWhereAnnotation :: WithWhere -> (AnnList, EpToken "where")
    
    1035 1033
     newWhereAnnotation ww = (an, w)
    
    ... ... @@ -1038,7 +1036,7 @@ newWhereAnnotation ww = (an, w)
    1038 1036
       w = case ww of
    
    1039 1037
         WithWhere -> EpTok (EpaDelta noSrcSpan (SameLine 0) [])
    
    1040 1038
         WithoutWhere -> noEpTok
    
    1041
    -  an = AnnList (AnnListLayout anc2) ListNone []
    
    1039
    +  an = AnnList (EpVirtualBraces anc2) []
    
    1042 1040
     
    
    1043 1041
     -- ---------------------------------------------------------------------
    
    1044 1042
     
    

  • utils/check-exact/Utils.hs
    ... ... @@ -341,10 +341,6 @@ insertTopLevelCppComments (HsModule (XModulePs an lo mdeprec mbDoc) mmn mexports
    341 341
             cs4' = workInComments cs4 these
    
    342 342
             (xs',rest') = allocPreceding xs rest
    
    343 343
     
    
    344
    -annListBracketsLocs :: AnnListBrackets -> (EpaLocation,EpaLocation)
    
    345
    -annListBracketsLocs (ListBraces o c) = (getEpTokenLoc o,    getEpTokenLoc c)
    
    346
    -annListBracketsLocs ListNone         = (noAnn,              noAnn)
    
    347
    -
    
    348 344
     data SplitWhere = Before | After
    
    349 345
     
    
    350 346
     splitOnWhere :: SplitWhere -> EpToken "where" -> [LEpaComment] -> ([LEpaComment], [LEpaComment])