[commit: ghc] cardinality: Fix egregious back-to-front case for argOneShots (3cf6e67)

Simon Peyton Jones simonpj at microsoft.com
Mon Mar 25 14:03:01 CET 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : cardinality

https://github.com/ghc/ghc/commit/3cf6e67d47c9f44dbe6378edef87113bab48b74d

>---------------------------------------------------------------

commit 3cf6e67d47c9f44dbe6378edef87113bab48b74d
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Mar 25 12:59:21 2013 +0000

    Fix egregious back-to-front case for argOneShots

>---------------------------------------------------------------

 compiler/basicTypes/Demand.lhs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/compiler/basicTypes/Demand.lhs b/compiler/basicTypes/Demand.lhs
index 4ea71b5..0462573 100644
--- a/compiler/basicTypes/Demand.lhs
+++ b/compiler/basicTypes/Demand.lhs
@@ -1249,10 +1249,10 @@ cprProdSig = StrictSig cprProdDmdType
 
 argOneShots :: StrictSig -> Arity -> [[Bool]]
 argOneShots (StrictSig (DmdType _ arg_ds _)) n_val_args
-  | arg_ds `lengthAtLeast` n_val_args
-  = go arg_ds
+  | arg_ds `lengthExceeds` n_val_args
+  = []   -- Too few arguments
   | otherwise
-  = []
+  = go arg_ds
   where
     go [] = []
     go (JD { absd = usg } : arg_ds)





More information about the ghc-commits mailing list