[GHC] #13330: forkIO has inconsistent behavior under optimization
GHC
ghc-devs at haskell.org
Wed Mar 1 23:41:22 UTC 2017
#13330: forkIO has inconsistent behavior under optimization
-------------------------------------+-------------------------------------
Reporter: dfeuer | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.2.1
Component: Core Libraries | Version: 8.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Other | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D3189
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by dfeuer):
Replying to [comment:15 simonpj]:
> Demand signatures are not expressive enough to express the either/or
demand you want in comment:14. Sorry. Not even close.
>
> My questions in comment:13 stand though. What goes wrong (in behavior
or perf) if we just say `catchException = catch`?
I haven't tried `catchException = catch` yet. I'll take a look at that
soon. Are you sure demand signatures aren't close to expressive enough for
what I want? Because they ''look'' fairly close. We have a way to talk
about either-or demand for `case` branches. We have something fairly close
to
{{{#!hs
m `catch#` f = \s -> case ORACLE m s of
Succeeded -> m s
Failed e -> f e s
}}}
If we're analyzing ``m `catch#` f``, can't we find the demands for `m`
applied to one argument and for `f` applied to two? Because then we can
take their least upper bound and get demands for the whole thing applied
to the `realWorld#`, right? That doesn't give `catch#` itself a terribly
demand signature, but it shouldn't matter.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13330#comment:16>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list