[GHC] #10294: Missing instances if compiling with -fplugin
GHC
ghc-devs at haskell.org
Mon Apr 13 08:38:33 UTC 2015
#10294: Missing instances if compiling with -fplugin
-------------------------------------+-------------------------------------
Reporter: jscholl | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.1
(Type checker) | Operating System: Linux
Keywords: | Type of failure: GHC rejects
Architecture: x86_64 | valid program
(amd64) | Blocked By:
Test Case: | Related Tickets:
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Using the example from "9.3.3.2. Using Annotations" of the GHC user manual
does not work correctly with GHC 7.10. The following fails:
$ ghc -c Bug1.hs -fplugin=SayAnnNames.Plugin
{{{
Bug1.hs:5:1:
No instance for (Data SomeAnn) arising from an annotation
In the annotation: {-# ANN foo SomeAnn #-}
}}}
It does not seem to matter why the type class is required:
$ ghc -c Bug2.hs -fplugin=SayAnnNames.Plugin
{{{
Bug2.hs:10:7:
No instance for (Data SomeAnn) arising from a use of ‘bar’
In the expression: bar SomeAnn
In an equation for ‘baz’: baz = bar SomeAnn
}}}
Compiling without -fplugin works fine, though. If SomeAnn is defined in a
different module than SayAnnNames.Plugin and reexported from it, the
instances are in scope, too.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10294>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list