Skip to content
Snippets Groups Projects
Commit 3198956d authored by Arnaud Spiwack's avatar Arnaud Spiwack Committed by Ben Gamari
Browse files

Factor mkCoreApp and mkCoreApps

`mkCoreApps` re-implemented `mkCoreApp` in a recursive function,
rather than using a simple `foldl'` in order to avoid repeatingly
computing the type of the function argument. I've factored the two
logic into a new (internal) function `mkCoreType` which assumes that
the type is known. `mkCoreApp` and `mkCoreApps` are thin wrappers
around it.

Differences
- The assertion failure message of `mkCoreApps` has more
  information in it.
- `mkCoreApps` now special-cases coercion argument like
  `mkCoreApp` (previously they were given to `mk_val_app` instead)

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3971
parent bbb8cb92
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment