diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2023-04-21 11:37:42 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-05-12 06:11:38 -0400 |
commit | ab63daac0e0ed8749514e38d714cfcd4562f4326 (patch) | |
tree | a8914398a67f2be5a8025a3949fee98ed0e5685c /testsuite/tests/simplCore/should_compile/T23267.hs | |
parent | c176ad1835ccfe55e2bde875b4a35e9d226ff657 (diff) | |
download | haskell-ab63daac0e0ed8749514e38d714cfcd4562f4326.tar.gz |
Allow Core optimizations when interpreting bytecode
Tracking ticket: #23056
MR: !10399
This adds the flag `-funoptimized-core-for-interpreter`, permitting use
of the `-O` flag to enable optimizations when compiling with the
interpreter backend, like in ghci.
Diffstat (limited to 'testsuite/tests/simplCore/should_compile/T23267.hs')
-rw-r--r-- | testsuite/tests/simplCore/should_compile/T23267.hs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T23267.hs b/testsuite/tests/simplCore/should_compile/T23267.hs new file mode 100644 index 0000000000..02307cea5d --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T23267.hs @@ -0,0 +1,25 @@ +module T23267 where + +data N = Z | S N + +union :: N -> () +union Z = () +union t = splitS t + +splitS :: N -> () +splitS Z = () +splitS (S l) = splitS l + +{- Results in this error: + +*** Core Lint errors : in result of SpecConstr *** +T23267.hs:10:1: warning: + Out of scope: l_aBE :: N + [LclId] + In the RHS of $ssplitS_sJx :: N -> () + In the body of lambda with binder sc_sJw :: N + Substitution: <InScope = {} + IdSubst = [] + TvSubst = [] + CvSubst = []> +-} |