Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
Loading
  • Arnaud Spiwack's avatar
    3198956d
    Factor mkCoreApp and mkCoreApps · 3198956d
    Arnaud Spiwack authored and Ben Gamari's avatar Ben Gamari committed
    `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
    3198956d
    History
    Factor mkCoreApp and mkCoreApps
    Arnaud Spiwack authored and Ben Gamari's avatar Ben Gamari committed
    `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
Code owners