[commit: ghc] master: Don't pass HscEnv to functions in the Hsc monad (4899a86)

git at git.haskell.org git at git.haskell.org
Tue Oct 3 21:56:32 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/4899a86b69a3cf8b487329d5db8bb205152950ce/ghc

>---------------------------------------------------------------

commit 4899a86b69a3cf8b487329d5db8bb205152950ce
Author: Douglas Wilson <douglas.wilson at gmail.com>
Date:   Tue Oct 3 15:08:47 2017 -0400

    Don't pass HscEnv to functions in the Hsc monad
    
    `Hsc` is a reader monad in `HscEnv`. Several functions in HscMain were
    taking parameters of type `HscEnv` or `DynFlags`, and returning values
    of type `Hsc a`. This patch removes those parameters in favour of asking
    them from the context.
    
    This removes a source of confusion and should make refactoring a bit
    easier.
    
    Test Plan: ./validate
    
    Reviewers: austin, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: rwbarton, thomie
    
    Differential Revision: https://phabricator.haskell.org/D4061


>---------------------------------------------------------------

4899a86b69a3cf8b487329d5db8bb205152950ce
 compiler/main/HscMain.hs | 98 ++++++++++++++++++++++++++----------------------
 1 file changed, 53 insertions(+), 45 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 4899a86b69a3cf8b487329d5db8bb205152950ce


More information about the ghc-commits mailing list