From ed4809813fa51524ae73a4475afe33018a67f87d Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Wed, 20 Jul 2016 09:56:03 +0200 Subject: InstEnv: Ensure that instance visibility check is lazy Previously instIsVisible had completely broken the laziness of lookupInstEnv' since it would examine is_dfun_name to check the name of the defining module (to know whether it is an interactive module). This resulted in the visibility check drawing in an interface file unnecessarily. This contributed to the unnecessary regression in compiler allocations reported in #12367. Test Plan: Validate, check nofib changes Reviewers: simonpj, ezyang, austin Reviewed By: ezyang Subscribers: thomie, ezyang Differential Revision: https://phabricator.haskell.org/D2411 GHC Trac Issues: #12367 --- testsuite/tests/ghci.debugger/scripts/break006.stderr | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'testsuite/tests/ghci.debugger') diff --git a/testsuite/tests/ghci.debugger/scripts/break006.stderr b/testsuite/tests/ghci.debugger/scripts/break006.stderr index 7929e36cc2..f19a5b3896 100644 --- a/testsuite/tests/ghci.debugger/scripts/break006.stderr +++ b/testsuite/tests/ghci.debugger/scripts/break006.stderr @@ -5,12 +5,11 @@ Use :print or :force to determine these types Relevant bindings include it :: a (bound at :4:1) These potential instances exist: - instance (Show b, Show a) => Show (Either a b) - -- Defined in ‘Data.Either’ instance Show Ordering -- Defined in ‘GHC.Show’ instance Show Integer -- Defined in ‘GHC.Show’ - ...plus 23 others - ...plus 42 instances involving out-of-scope types + instance Show a => Show (Maybe a) -- Defined in ‘GHC.Show’ + ...plus 22 others + ...plus 11 instances involving out-of-scope types (use -fprint-potential-instances to see them all) • In a stmt of an interactive GHCi command: print it @@ -20,11 +19,10 @@ Use :print or :force to determine these types Relevant bindings include it :: a (bound at :6:1) These potential instances exist: - instance (Show b, Show a) => Show (Either a b) - -- Defined in ‘Data.Either’ instance Show Ordering -- Defined in ‘GHC.Show’ instance Show Integer -- Defined in ‘GHC.Show’ - ...plus 23 others - ...plus 42 instances involving out-of-scope types + instance Show a => Show (Maybe a) -- Defined in ‘GHC.Show’ + ...plus 22 others + ...plus 11 instances involving out-of-scope types (use -fprint-potential-instances to see them all) • In a stmt of an interactive GHCi command: print it -- cgit v1.2.1