diff options
author | David Feuer <david.feuer@gmail.com> | 2017-01-10 16:33:20 -0500 |
---|---|---|
committer | David Feuer <David.Feuer@gmail.com> | 2017-01-10 16:57:19 -0500 |
commit | 2be364ac8cf2f5cd3b50503e8b26f51eb46101e5 (patch) | |
tree | e054b239f6574e0b2ccbef866e492e427169ef36 /testsuite/tests/deSugar/should_compile | |
parent | 8b15fc42847b3ba4a161158995564b1986907776 (diff) | |
download | haskell-2be364ac8cf2f5cd3b50503e8b26f51eb46101e5.tar.gz |
Inline partially-applied wrappers
Suppose we have
```
data Node a = Node2 !Int a a | Node3 !Int a a a
instance Traversable Node where
traverse f (Node2 s x y) = Node2 s <$> f x <*> f y
...
```
Since `Node2` is partially applied, we wouldn't inline its
wrapper. The result was that we'd box up the `Int#` to put
the box in the closure passed to `fmap`. We now allow the wrapper
to inline when partially applied, so GHC stores the `Int#`
directly in the closure.
Reviewers: rwbarton, mpickering, simonpj, austin, bgamari
Reviewed By: simonpj, bgamari
Subscribers: mpickering, thomie
Differential Revision: https://phabricator.haskell.org/D2891
GHC Trac Issues: #12990
Diffstat (limited to 'testsuite/tests/deSugar/should_compile')
-rw-r--r-- | testsuite/tests/deSugar/should_compile/T2431.stderr | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/testsuite/tests/deSugar/should_compile/T2431.stderr b/testsuite/tests/deSugar/should_compile/T2431.stderr index ff1047db84..797c6c7776 100644 --- a/testsuite/tests/deSugar/should_compile/T2431.stderr +++ b/testsuite/tests/deSugar/should_compile/T2431.stderr @@ -9,7 +9,7 @@ T2431.$WRefl [InlPrag=INLINE] :: forall a. a :~: a Str=m, Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, - Guidance=ALWAYS_IF(arity=0,unsat_ok=False,boring_ok=False) + Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=False) Tmpl= \ (@ a) -> T2431.Refl @ a @ a @~ (<a>_N :: (a :: *) GHC.Prim.~# (a :: *))}] T2431.$WRefl = |