diff options
author | Bartosz Nitka <niteria@gmail.com> | 2016-05-04 09:22:37 -0700 |
---|---|---|
committer | Bartosz Nitka <niteria@gmail.com> | 2016-05-04 10:18:10 -0700 |
commit | ad4392c142696d5092533480a82ed65322e9d413 (patch) | |
tree | 6b7dc893f6dcf0c87db84fef9c29e675a8db8095 /testsuite/tests/rebindable | |
parent | 763610e990207eaa143856fca411d5ad420651ed (diff) | |
download | haskell-ad4392c142696d5092533480a82ed65322e9d413.tar.gz |
Kill non-deterministic foldUFM in TrieMap and TcAppMap
Summary:
foldUFM introduces unnecessary non-determinism that actually
leads to different generated code as explained in
Note [TrieMap determinism].
As we're switching from UniqFM to UniqDFM here you might be
concerned about performance. There's nothing that ./validate
detects. nofib reports no change in Compile Allocations, but
Compile Time got better on some tests and worse on some,
yielding this summary:
-1 s.d. ----- -3.8%
+1 s.d. ----- +5.4%
Average ----- +0.7%
This is not a fair comparison as the order of Uniques
changes what GHC is actually doing. One benefit from making
this deterministic is also that it will make the
performance results more stable.
Full nofib results: P108
Test Plan: ./validate, nofib
Reviewers: goldfire, simonpj, simonmar, austin, bgamari
Reviewed By: simonpj
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2169
GHC Trac Issues: #4012
Diffstat (limited to 'testsuite/tests/rebindable')
-rw-r--r-- | testsuite/tests/rebindable/rebindable6.stderr | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/testsuite/tests/rebindable/rebindable6.stderr b/testsuite/tests/rebindable/rebindable6.stderr index 8d2ea09928..8667f318bf 100644 --- a/testsuite/tests/rebindable/rebindable6.stderr +++ b/testsuite/tests/rebindable/rebindable6.stderr @@ -25,15 +25,18 @@ rebindable6.hs:110:17: error: return b } rebindable6.hs:111:17: error: - • Ambiguous type variable ‘t1’ arising from a do statement - with the failable pattern ‘Just (b :: b)’ - prevents the constraint ‘(HasFail - ([Prelude.Char] -> t1))’ from being solved. + • Ambiguous type variables ‘t0’, ‘t1’ arising from a do statement + prevents the constraint ‘(HasBind + (IO (Maybe b) -> (Maybe b -> t1) -> t0))’ from being solved. (maybe you haven't applied a function to enough arguments?) - Probable fix: use a type annotation to specify what ‘t1’ should be. + Relevant bindings include + g :: IO (Maybe b) (bound at rebindable6.hs:108:19) + test_do :: IO a -> IO (Maybe b) -> IO b + (bound at rebindable6.hs:108:9) + Probable fix: use a type annotation to specify what ‘t0’, ‘t1’ should be. These potential instance exist: - instance HasFail (String -> IO a) - -- Defined at rebindable6.hs:61:18 + instance HasBind (IO a -> (a -> IO b) -> IO b) + -- Defined at rebindable6.hs:51:18 • In a stmt of a 'do' block: Just (b :: b) <- g In the expression: do { f; |