[GHC] #14127: -fignore-interface-pragmas and -fspecialise do not go well together
GHC
ghc-devs at haskell.org
Wed Aug 16 14:37:02 UTC 2017
#14127: -fignore-interface-pragmas and -fspecialise do not go well together
-------------------------------------+-------------------------------------
Reporter: lspitzner | Owner: (none)
Type: bug | Status: infoneeded
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
crash or panic | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by lspitzner):
Sorry, I wrongly assumed this was much easier to reproduce. Now that I
try, it appears to be pretty specific, in fact I can't even simplify
properly. This still needs a dependency on aeson-1.2.1.0:
- A.hs
{{{#!hs
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveDataTypeable #-}
module A where
import GHC.Generics
data Foo = AltChooserSimpleQuick
deriving (Generic)
}}}
- B.hs
{{{#!hs
{-# OPTIONS_GHC -fno-pre-inlining #-}
{-# OPTIONS_GHC -fspecialise #-}
{-# OPTIONS_GHC -fignore-interface-pragmas #-}
module B where
import A
import qualified Data.Aeson.Types as Aeson
instance Aeson.FromJSON Foo where
parseJSON = Aeson.genericParseJSON Aeson.defaultOptions
{-# NOINLINE parseJSON #-}
}}}
I have made several attempts to reproduce this with a standalone class
instead of the one from aeson, but failed to do so. It also appears that
the panic disappears when there is no orphan instance in play (i.e. if you
merge modules A/B).
Also note that simply replacing `data Foo = AltChooseSimpleQuick` with
`data Foo = AltChoose` the panic disappears. Further testing suggests that
it requires any constructor identifier with at least 21 characters to
trigger the panic.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14127#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list