Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jberryman
GHC
Commits
d51d7efd
Commit
d51d7efd
authored
Feb 18, 2014
by
Joachim Breitner
Browse files
Call arity: Handle type application correctly
parent
7e787e7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/simplCore/CallArity.hs
View file @
d51d7efd
...
@@ -329,6 +329,10 @@ callArityAnal arity int e@(Var v)
...
@@ -329,6 +329,10 @@ callArityAnal arity int e@(Var v)
|
otherwise
|
otherwise
=
(
emptyVarEnv
,
e
)
=
(
emptyVarEnv
,
e
)
-- Non-value lambdas are ignored
callArityAnal
arity
int
(
Lam
v
e
)
|
not
(
isId
v
)
=
second
(
Lam
v
)
$
callArityAnal
arity
int
e
-- We have a lambda that we are not sure to call. Tail calls therein
-- We have a lambda that we are not sure to call. Tail calls therein
-- are no longer OneAndOnly calls
-- are no longer OneAndOnly calls
callArityAnal
0
int
(
Lam
v
e
)
callArityAnal
0
int
(
Lam
v
e
)
...
@@ -355,6 +359,8 @@ callArityAnal arity int (Let bind e)
...
@@ -355,6 +359,8 @@ callArityAnal arity int (Let bind e)
-- Application. Increase arity for the called expresion, nothing to know about
-- Application. Increase arity for the called expresion, nothing to know about
-- the second
-- the second
callArityAnal
arity
int
(
App
e
(
Type
t
))
=
second
(
\
e
->
App
e
(
Type
t
))
$
callArityAnal
arity
int
e
callArityAnal
arity
int
(
App
e1
e2
)
callArityAnal
arity
int
(
App
e1
e2
)
=
(
final_ae
,
App
e1'
e2'
)
=
(
final_ae
,
App
e1'
e2'
)
where
where
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment