[GHC] #13055: Adding INLINABLE pragma causes GHC panic
GHC
ghc-devs at haskell.org
Wed Jan 4 11:20:38 UTC 2017
#13055: Adding INLINABLE pragma causes GHC panic
-------------------------------------+-------------------------------------
Reporter: mpickering | Owner:
Type: bug | Status: closed
Priority: high | Milestone: 8.2.1
Component: Compiler | Version: 8.0.1
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
I'm very confused about this. The comment at the top of `GHC.Base` says
{{{
NOTA BENE: Do NOT use ($) anywhere in this module! The type of ($) is
slightly magical (it can return unlifted types), and it is wired in.
But, it is also *defined* in this module, with a non-magical type.
GHC gets terribly confused (and *hangs*) if you try to use ($) in this
module, because it has different types in different scenarios.
This is not a problem in general, because the type ($), being wired in, is
not
written out to the interface file, so importing files don't get confused.
The problem is only if ($) is used here. So don't!
}}}
(It should jolly well have a `Note` heading so we can refer to it.)
But I don't understand that. The wired-in definition should override the
local one, even in the module it is defined in. I'd love a better
understanding of what goes wrong.
But life is short, I suppose.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13055#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list