diff options
author | Alexis King <lexi.lambda@gmail.com> | 2020-02-10 01:16:08 -0600 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-02-26 15:08:09 -0500 |
commit | 621468f680a111c20366a9445a3b225cbc34ffbf (patch) | |
tree | d313256658ab1667e877d358087357cb2637f2e1 /testsuite | |
parent | 1b1067d14b656bbbfa7c47f156ec2700c9751549 (diff) | |
download | haskell-621468f680a111c20366a9445a3b225cbc34ffbf.tar.gz |
Treat coercions as arguments for floating and inlining
This reverts commit 8924224ecfa065ebc67b96a90d01cf9d2edd0e77
and fixes #17787.
Diffstat (limited to 'testsuite')
4 files changed, 12 insertions, 4 deletions
diff --git a/testsuite/tests/deSugar/should_compile/T2431.stderr b/testsuite/tests/deSugar/should_compile/T2431.stderr index e2c903238c..608b26b793 100644 --- a/testsuite/tests/deSugar/should_compile/T2431.stderr +++ b/testsuite/tests/deSugar/should_compile/T2431.stderr @@ -10,7 +10,7 @@ T2431.$WRefl [InlPrag=INLINE[0]] :: forall a. a :~: a Cpr=m1, Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=True) + Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=False) Tmpl= \ (@a) -> T2431.Refl @a @a @~(<a>_N :: a GHC.Prim.~# a)}] T2431.$WRefl = \ (@a) -> T2431.Refl @a @a @~(<a>_N :: a GHC.Prim.~# a) @@ -110,6 +110,3 @@ T2431.$tc'Refl $tc'Refl2 1# $krep3 - - - diff --git a/testsuite/tests/simplCore/should_compile/T17787.hs b/testsuite/tests/simplCore/should_compile/T17787.hs new file mode 100644 index 0000000000..fb6b5c1b98 --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T17787.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE GADTs #-} +module T17787 where + +data T a where + C :: T () + +foo :: (T () -> T () -> ()) -> () +foo f = f C C diff --git a/testsuite/tests/simplCore/should_compile/T17787.stderr b/testsuite/tests/simplCore/should_compile/T17787.stderr new file mode 100644 index 0000000000..773e04795e --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T17787.stderr @@ -0,0 +1,2 @@ +foo :: (T () -> T () -> ()) -> () +foo = \ (f :: T () -> T () -> ()) -> f T17787.$WC T17787.$WC diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T index bd512897a7..276d8479a3 100644 --- a/testsuite/tests/simplCore/should_compile/all.T +++ b/testsuite/tests/simplCore/should_compile/all.T @@ -314,3 +314,4 @@ test('T17409', test('T17429', normal, compile, ['-dcore-lint -O2']) test('T17722', normal, multimod_compile, ['T17722B', '-dcore-lint -O2 -v0']) test('T17724', normal, compile, ['-dcore-lint -O2']) +test('T17787', [ grep_errmsg(r'foo') ], compile, ['-ddump-simpl -dsuppress-uniques']) |