summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2021-02-26 14:51:59 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-03-05 04:48:39 -0500
commit4cd98bd2c91cac4a10831ab7111c7be8153bdd33 (patch)
treeab3fc0a338e56e9fe901332fbb957abf7a2eefce /testsuite/tests/simplCore
parent6467a48e64ce5ccea29099cb89962e879cded91c (diff)
downloadhaskell-4cd98bd2c91cac4a10831ab7111c7be8153bdd33.tar.gz
Run linear Lint on the desugarer output (part of #19165)
This addresses points (1a) and (1b) of #19165. - Move mkFailExpr to HsToCore/Utils, as it can be shared - Desugar incomplete patterns and holes to an empty case, as in Note [Incompleteness and linearity] - Enable linear linting of desugarer output - Mark MultConstructor as broken. It fails Lint, but I'd like to fix this separately. Metric Decrease: T6048
Diffstat (limited to 'testsuite/tests/simplCore')
-rw-r--r--testsuite/tests/simplCore/should_compile/T9400.stderr10
-rw-r--r--testsuite/tests/simplCore/should_compile/spec-inline.stderr5
2 files changed, 9 insertions, 6 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T9400.stderr b/testsuite/tests/simplCore/should_compile/T9400.stderr
index 9e3f4184ea..7825071aea 100644
--- a/testsuite/tests/simplCore/should_compile/T9400.stderr
+++ b/testsuite/tests/simplCore/should_compile/T9400.stderr
@@ -9,7 +9,7 @@ T9400.hs:18:9: warning: [-Woverlapping-patterns (in -Wdefault)]
==================== Tidy Core ====================
Result size of Tidy Core
- = {terms: 37, types: 22, coercions: 0, joins: 0/0}
+ = {terms: 38, types: 22, coercions: 0, joins: 0/0}
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$trModule1 :: Addr#
@@ -36,7 +36,7 @@ T9400.$trModule :: Module
[GblId, Unf=OtherCon []]
T9400.$trModule = GHC.Types.Module $trModule2 $trModule4
--- RHS size: {terms: 22, types: 15, coercions: 0, joins: 0/0}
+-- RHS size: {terms: 23, types: 15, coercions: 0, joins: 0/0}
main :: IO ()
[GblId]
main
@@ -64,8 +64,10 @@ main
@()
@()
(putStrLn (unpackCString# "efg"#))
- (Control.Exception.Base.patError
- @'LiftedRep @(IO ()) "T9400.hs:(17,5)-(18,29)|case"#))))
+ (case Control.Exception.Base.patError
+ @'LiftedRep @() "T9400.hs:(17,5)-(18,29)|case"#
+ of wild {
+ }))))
diff --git a/testsuite/tests/simplCore/should_compile/spec-inline.stderr b/testsuite/tests/simplCore/should_compile/spec-inline.stderr
index a9da295e8b..a8fa8e58e8 100644
--- a/testsuite/tests/simplCore/should_compile/spec-inline.stderr
+++ b/testsuite/tests/simplCore/should_compile/spec-inline.stderr
@@ -45,10 +45,11 @@ lvl :: GHC.Prim.Addr#
lvl = "spec-inline.hs:(19,5)-(29,25)|function go"#
-- RHS size: {terms: 2, types: 2, coercions: 0, joins: 0/0}
-Roman.foo3 :: Int
+Roman.foo3 :: ()
[GblId, Str=b, Cpr=b]
Roman.foo3
- = Control.Exception.Base.patError @'GHC.Types.LiftedRep @Int lvl
+ = Control.Exception.Base.patError
+ @'GHC.Types.LiftedRep @() lvl
Rec {
-- RHS size: {terms: 40, types: 5, coercions: 0, joins: 0/0}