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
-- 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