diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2016-01-25 11:16:18 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2016-01-25 11:32:32 +0000 |
commit | 3c060f36f6eb4d359f252168e2f97b573d017080 (patch) | |
tree | 3f015279a2dcdcf8656353e24c54ee9c24cade67 /testsuite/tests/polykinds/T11248.hs | |
parent | f7e0e5f957f1b061eda057282504fca3de061220 (diff) | |
download | haskell-3c060f36f6eb4d359f252168e2f97b573d017080.tar.gz |
Fix exprIsHNF (Trac #11248)
Blimey! CoreUtils.exprIsHNFlike had not one but two bugs.
* is_hnf_like treated coercion args like type args
(result: exprIsHNF might wrongly say True)
* app_is_value treated type args like value args
(result: exprIsHNF might wrongly say False)
Bizarre. This goes back to at least 2012. It's amazing that it
hasn't caused more trouble.
It was discovered by a Lint error when compiling Trac #11248 with -O.
Diffstat (limited to 'testsuite/tests/polykinds/T11248.hs')
-rw-r--r-- | testsuite/tests/polykinds/T11248.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T11248.hs b/testsuite/tests/polykinds/T11248.hs index e1c8fcc1b8..b3a32e3097 100644 --- a/testsuite/tests/polykinds/T11248.hs +++ b/testsuite/tests/polykinds/T11248.hs @@ -1,3 +1,6 @@ +{-# OPTIONS_GHC -O #-} + -- Trac #11248, comment:6 showed that this tests failed with -O + {-# LANGUAGE DataKinds, TypeOperators, TypeFamilies, KindSignatures, ConstraintKinds #-} |