Factor mkCoreApp and mkCoreApps
ClosedPublic

Authored by aspiwack on Sep 15 2017, 8:41 AM.

Details

Summary

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)

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
aspiwack created this revision.Sep 15 2017, 8:41 AM
bgamari accepted this revision.Sep 15 2017, 1:25 PM

Looks reasonable to me.

This revision is now accepted and ready to land.Sep 15 2017, 1:25 PM
This revision was automatically updated to reflect the committed changes.