diff options
Diffstat (limited to 'testsuite')
4 files changed, 40 insertions, 11 deletions
diff --git a/testsuite/tests/numeric/should_compile/T7116.stdout b/testsuite/tests/numeric/should_compile/T7116.stdout index 996d391b44..8560ad4a10 100644 --- a/testsuite/tests/numeric/should_compile/T7116.stdout +++ b/testsuite/tests/numeric/should_compile/T7116.stdout @@ -62,11 +62,9 @@ dl :: Double -> Double Arity=1, Str=<SP(U)>, Cpr=m1, - Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False) - Tmpl= \ (x [Occ=Once1!] :: Double) -> - case x of { GHC.Types.D# y -> GHC.Types.D# (GHC.Prim.+## y y) }}] + Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=True)}] dl = dr -- RHS size: {terms: 8, types: 3, coercions: 0, joins: 0/0} @@ -94,13 +92,9 @@ fl :: Float -> Float Arity=1, Str=<SP(U)>, Cpr=m1, - Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False) - Tmpl= \ (x [Occ=Once1!] :: Float) -> - case x of { GHC.Types.F# y -> - GHC.Types.F# (GHC.Prim.plusFloat# y y) - }}] + Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=True)}] fl = fr diff --git a/testsuite/tests/simplCore/should_compile/T19360.hs b/testsuite/tests/simplCore/should_compile/T19360.hs new file mode 100644 index 0000000000..3998fb6d51 --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T19360.hs @@ -0,0 +1,29 @@ +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE RankNTypes #-} + +module T19360 where + +import GHC.Exts (oneShot) +import Data.Typeable (Typeable, cast) + +newtype SDoc = SDoc' (Bool -> Bool) + +data ApiAnn = ApiAnn + +showAstData :: D a => Bool -> a -> SDoc +showAstData z = showAstData' + where + showAstData' :: D a => a -> SDoc + showAstData' x = + case cast x of + Just (a :: ApiAnn) -> + case z of + True -> showAstData' a + False -> SDoc' (oneShot (\_ -> False)) + Nothing -> gmapQr showAstData' x + +class Typeable a => D a where + gmapQr :: forall r. (forall d. D d => d -> r) -> a -> r + +instance D ApiAnn where + gmapQr g ApiAnn = g ApiAnn diff --git a/testsuite/tests/simplCore/should_compile/T8331.stderr b/testsuite/tests/simplCore/should_compile/T8331.stderr index 030b175298..1c51037481 100644 --- a/testsuite/tests/simplCore/should_compile/T8331.stderr +++ b/testsuite/tests/simplCore/should_compile/T8331.stderr @@ -4,6 +4,11 @@ forall (@s) ($dMonadAbstractIOST :: MonadAbstractIOST (ReaderT Int (ST s))). useAbstractMonad @(ReaderT Int (ST s)) $dMonadAbstractIOST - = useAbstractMonad_$suseAbstractMonad @s + = (useAbstractMonad1 @s) + `cast` (<Int>_R + %<'Many>_N ->_R <Int>_R %<'Many>_N ->_R Sym (N:ST[0] <s>_N <Int>_R) + ; Sym (N:ReaderT[0] <Int>_R <ST s>_R <Int>_N) + :: Coercible + (Int -> Int -> STRep s Int) (Int -> ReaderT Int (ST s) Int)) diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T index b3936d11e6..a2783f33e1 100644 --- a/testsuite/tests/simplCore/should_compile/all.T +++ b/testsuite/tests/simplCore/should_compile/all.T @@ -346,3 +346,4 @@ test('T18668', normal, compile, ['-dsuppress-uniques']) test('T18995', [ grep_errmsg(r'print') ], compile, ['-O -ddump-simpl -dsuppress-uniques']) test('T19168', normal, compile, ['']) test('T19246', only_ways(['optasm']), multimod_compile, ['T19246', '-v0 -ddump-rules']) +test('T19360', only_ways(['optasm']), compile, ['']) |