Inconsistency in CoreUtils.exprIsOk
Consider
f1 = \x y -> let t = case x of
True -> let v = Just y
in (v, v)
False -> (Nothing, Nothing)
in \w -> t
f2 = \x y -> let t = case x of
True -> (Just y, Just y)
False -> (Nothing, Nothing)
in \w -> t
We give f1
arity 1, but f2
gets arity 2. That's bizarre, because all we've done is turn a let
into a function application.
Reason: in CoreUtils.exprIsOk
, we recursively apply go
in the App
case, but we fail unconditionally in the Let
case. That is simply inconsistent, and it bit me when trying something else.
Incidentally exprIsOk
is badly named.
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |