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
Please register or sign in to comment