[GHC] #9562: Type families + hs-boot files = unsafeCoerce
GHC
ghc-devs at haskell.org
Tue Sep 16 18:20:20 UTC 2014
#9562: Type families + hs-boot files = unsafeCoerce
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.3
Resolution: | Keywords:
Operating System: | Architecture: Unknown/Multiple
Unknown/Multiple | Difficulty: Unknown
Type of failure: GHC | Blocked By:
accepts invalid program | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Comment (by adamgundry):
Ouch! I conjecture that the following lighter restriction will restore
type soundness: a hs-boot file must list all type instance declarations
used (transitively) in the typechecking of any definition whose
declaration appears in the hs-boot file. (That is, a type instance
declaration must be listed if its axiom would appear in the fully-unfolded
elaborated Core term corresponding to any declaration in the hs-boot
file.)
Even if this conjecture is correct, of course, this may be unreasonably
hard to implement/explain.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9562#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list