Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
-
cfd4fb67
by Ryan Scott at 2026-11-22T16:36:59-05:00
3 changed files:
Changes:
| ... | ... | @@ -1604,7 +1604,10 @@ repE (HsLam _ LamCase (MG { mg_alts = L _ ms })) |
| 1604 | 1604 | ; repLamCase core_ms }
|
| 1605 | 1605 | repE (HsLam _ LamCases (MG { mg_alts = (L _ ms) }))
|
| 1606 | 1606 | = do { ms' <- mapM repClauseTup ms
|
| 1607 | - ; core_ms <- coreListM matchTyConOcc ms'
|
|
| 1607 | + -- Safety: \cases has an invariant that `mg_alts` is
|
|
| 1608 | + -- non-empty, so calling `nonEmptyCoreList` below is
|
|
| 1609 | + -- always safe.
|
|
| 1610 | + ; let core_ms = nonEmptyCoreList ms'
|
|
| 1608 | 1611 | ; repLamCases core_ms }
|
| 1609 | 1612 | repE (HsApp _ x y) = do {a <- repLE x; b <- repLE y; repApp a b}
|
| 1610 | 1613 | repE (HsAppType _ e t) = do { a <- repLE e
|
| 1 | +{-# LANGUAGE LambdaCase #-}
|
|
| 2 | +{-# LANGUAGE TemplateHaskellQuotes #-}
|
|
| 3 | +module T27826 where
|
|
| 4 | + |
|
| 5 | +import Language.Haskell.TH
|
|
| 6 | + |
|
| 7 | +foo :: Q Exp
|
|
| 8 | +foo = [| \cases x -> x |] |
| ... | ... | @@ -657,6 +657,7 @@ test('T8306_th', only_ways(['ghci']), ghci_script, ['T8306_th.script']) |
| 657 | 657 | test('T26862_th', only_ways(['ghci']), ghci_script, ['T26862_th.script'])
|
| 658 | 658 | test('T27022', normal, compile_and_run, [''])
|
| 659 | 659 | test('T27034', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques'])
|
| 660 | +test('T27826', normal, compile, [''])
|
|
| 660 | 661 | test('T20902', normal, compile, [''])
|
| 661 | 662 | test('TH_cvt_DefaultDataInstDecl', normal, compile_fail, ['-v0'])
|
| 662 | 663 | test('TH_cvt_IllegalDeclaration', normal, compile_fail, ['-v0'])
|