[GHC] #15012: "Iface type variable out of scope" when compiling with -c
GHC
ghc-devs at haskell.org
Sun Apr 8 00:47:10 UTC 2018
#15012: "Iface type variable out of scope" when compiling with -c
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.4.1
Resolution: | Keywords: deriving
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC rejects | Unknown/Multiple
valid program | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):
* keywords: => deriving
Comment:
I suspect that `DeriveGeneric` is to blame here. Here is what `-ddump-
deriv` tells us about the derived `Rep1` associated type family instance
for `Generic1`:
{{{#!hs
Derived type family instances:
type GHC.Generics.Rep1 (Foo.TyFamily a_a2ta) = GHC.Generics.D1
('GHC.Generics.MetaData
"TyFamily" "Foo"
"main" 'GHC.Types.False)
(GHC.Generics.C1
('GHC.Generics.MetaCons
"TyFamily"
'GHC.Generics.PrefixI
'GHC.Types.False)
(GHC.Generics.S1
('GHC.Generics.MetaSel
'GHC.Base.Nothing
'GHC.Generics.NoSourceUnpackedness
'GHC.Generics.NoSourceStrictness
'GHC.Generics.DecidedLazy)
(GHC.Generics.Rec0 GHC.Types.Int)
GHC.Generics.:*:
GHC.Generics.S1
('GHC.Generics.MetaSel
'GHC.Base.Nothing
'GHC.Generics.NoSourceUnpackedness
'GHC.Generics.NoSourceStrictness
'GHC.Generics.DecidedLazy)
(GHC.Generics.Rec0
(Foo.FakeOut b_a2q1))))
}}}
Notice that `b_a2q1` is unbound in this definition! Perhaps we should be
turning this into `Any`?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15012#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list