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

Commits:

7 changed files:

Changes:

  • compiler/GHC/Hs/Pat.hs
    ... ... @@ -443,7 +443,7 @@ pprPat (TuplePat _ pats bx)
    443 443
         -- `MkSolo x`, not `(x)`
    
    444 444
       | [pat] <- pats
    
    445 445
       , Boxed <- bx
    
    446
    -  = hcat [text (mkTupleStr Boxed dataName 1), pprParendLPat appPrec pat]
    
    446
    +  = hsep [text (mkTupleStr Boxed dataName 1), pprParendLPat appPrec pat]
    
    447 447
       | otherwise
    
    448 448
       = tupleParens (boxityTupleSort bx) (pprWithCommas ppr pats)
    
    449 449
     pprPat (SumPat _ pat alt arity) = sumParens (pprAlternative ppr pat alt arity)
    

  • testsuite/tests/th/T17380.stderr
    ... ... @@ -19,8 +19,8 @@ T17380.hs:15:6: error: [GHC-83865]
    19 19
     T17380.hs:18:7: error: [GHC-83865]
    
    20 20
         • Couldn't match expected type: Maybe String
    
    21 21
                       with actual type: Solo (Maybe String)
    
    22
    -    • In the pattern: MkSolo(Just "wat")
    
    23
    -      In an equation for ‘quux’: quux (MkSolo(Just "wat")) = Just "frerf"
    
    22
    +    • In the pattern: MkSolo (Just "wat")
    
    23
    +      In an equation for ‘quux’: quux (MkSolo (Just "wat")) = Just "frerf"
    
    24 24
     
    
    25 25
     T17380.hs:21:8: error: [GHC-83865]
    
    26 26
         • Couldn't match type: Maybe String
    

  • testsuite/tests/th/T18612.stderr
    ... ... @@ -8,6 +8,6 @@ T18612.hs:(10,7)-(11,75): Splicing type
    8 8
       ======>
    
    9 9
         Identity (Solo ()) -> Identity (Solo ())
    
    10 10
     T18612.hs:12:4-36: Splicing pattern
    
    11
    -    conP 'Identity [tupP [tupP []]] ======> Identity (MkSolo())
    
    11
    +    conP 'Identity [tupP [tupP []]] ======> Identity (MkSolo ())
    
    12 12
     T18612.hs:12:41-78: Splicing expression
    
    13 13
         conE 'Identity `appE` tupE [tupE []] ======> Identity (MkSolo ())

  • testsuite/tests/th/T27034.hs
    1
    +{-# LANGUAGE TemplateHaskell #-}
    
    2
    +module T27034 where
    
    3
    +
    
    4
    +import Language.Haskell.TH
    
    5
    +
    
    6
    +f $(tupP [wildP]) = ()
    
    7
    +g $(tupP [varP (mkName "x")]) = x

  • testsuite/tests/th/T27034.stderr
    1
    +T27034.hs:6:4-17: Splicing pattern
    
    2
    +    tupP [wildP] ======> MkSolo _
    
    3
    +T27034.hs:7:4-29: Splicing pattern
    
    4
    +    tupP [varP (mkName "x")] ======> MkSolo x

  • testsuite/tests/th/T8761.stderr
    ... ... @@ -28,7 +28,7 @@ T8761.hs:(16,1)-(39,13): Splicing declarations
    28 28
            return pats
    
    29 29
       ======>
    
    30 30
         pattern Q1 x1 x2 x3 <- ((x1, x2), [x3], _, _)
    
    31
    -    pattern x1 `Q2` x2 = MkSolo(x1, x2)
    
    31
    +    pattern x1 `Q2` x2 = MkSolo (x1, x2)
    
    32 32
         pattern Q3{qx3, qy3, qz3} <- ((qx3, qy3), [qz3]) where
    
    33 33
                                     Q3 qx3 qy3 qz3 = ((qx3, qy3), [qz3])
    
    34 34
     T8761.hs:(42,1)-(46,29): Splicing declarations
    

  • testsuite/tests/th/all.T
    ... ... @@ -655,6 +655,7 @@ test('T26099', normal, compile_fail, [''])
    655 655
     test('T8306_th', only_ways(['ghci']), ghci_script, ['T8306_th.script'])
    
    656 656
     test('T26862_th', only_ways(['ghci']), ghci_script, ['T26862_th.script'])
    
    657 657
     test('T27022', normal, compile_and_run, [''])
    
    658
    +test('T27034', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques'])
    
    658 659
     test('T20902', normal, compile, [''])
    
    659 660
     test('TH_cvt_DefaultDataInstDecl', normal, compile_fail, ['-v0'])
    
    660 661
     test('TH_cvt_IllegalDeclaration', normal, compile_fail, ['-v0'])