HscTypes: Use foldl' instead of foldr
authorBen Gamari <bgamari.foss@gmail.com>
Tue, 24 Jan 2017 17:52:06 +0000 (12:52 -0500)
committerBen Gamari <ben@smart-cactus.org>
Tue, 24 Jan 2017 21:07:34 +0000 (16:07 -0500)
commit2cc67adb29b33e15727c6463ed84e43cc159b3a2
tree2983243f63581c21b7c5440ceaf228413d9d088c
parentefc8e3b17bd374c5860081bd7350a1ce7c7cb92f
HscTypes: Use foldl' instead of foldr

In this case we are building a map, for which `foldl'` is much better
suited. This has a small but consistent impact on compiler allocations,
```
        -1 s.d.                -----          -0.161%
        +1 s.d.                -----          -0.011%
        Average                -----          -0.086%
```

Test Plan: Validate

Reviewers: austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2967
compiler/main/HscTypes.hs