From 207151a384d187c29baa5bf3ec2405c27d58c1df Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Tue, 22 Apr 2008 11:52:38 +0000 Subject: [PATCH] Minor bug in SpecConstr In SpecConstr.isValue, we recorded a ConVal for a big-lambda, which seems wrong. I came across this when implementing System IF. The code now reads: isValue env (Lam b e) | isTyVar b = case isValue env e of Just _ -> Just LambdaVal -- NB! Nothing -> Nothing | otherwise = Just LambdaVal --- compiler/specialise/SpecConstr.lhs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/specialise/SpecConstr.lhs b/compiler/specialise/SpecConstr.lhs index c9b5998..1897e1a 100644 --- a/compiler/specialise/SpecConstr.lhs +++ b/compiler/specialise/SpecConstr.lhs @@ -1320,7 +1320,9 @@ isValue env (Var v) -- as well, for let-bound constructors! isValue env (Lam b e) - | isTyVar b = isValue env e + | isTyVar b = case isValue env e of + Just _ -> Just LambdaVal + Nothing -> Nothing | otherwise = Just LambdaVal isValue _env expr -- Maybe it's a constructor application -- 1.7.10.4