[GHC] #10294: Missing instances if compiling with -fplugin

#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

#10294: Missing instances if compiling with -fplugin -------------------------------------+------------------------------------- Reporter: jscholl | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler (Type | Version: 7.10.1 checker) | Keywords: Resolution: duplicate | Architecture: x86_64 Operating System: Linux | (amd64) Type of failure: GHC rejects | Test Case: valid program | Blocking: Blocked By: 10420 | Differential Revisions: Related Tickets: | -------------------------------------+------------------------------------- Changes (by ezyang): * status: new => closed * resolution: => duplicate * blockedby: => 10420 Comment: Pretty sure this is a duplicate of #10420, which was reported later but has a proper diagnosis of the problem. But maybe we should put this test example into the test suite in any case. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10294#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10294: Missing instances if compiling with -fplugin
-------------------------------------+-------------------------------------
Reporter: jscholl | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler (Type | Version: 7.10.1
checker) | Keywords:
Resolution: duplicate | Architecture: x86_64
Operating System: Linux | (amd64)
Type of failure: GHC rejects | Test Case:
valid program | Blocking:
Blocked By: 10420 | Differential Revisions:
Related Tickets: |
-------------------------------------+-------------------------------------
Comment (by Edward Z. Yang

#10294: Missing instances if compiling with -fplugin
-------------------------------------+-------------------------------------
Reporter: jscholl | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler (Type | Version: 7.10.1
checker) | Keywords:
Resolution: duplicate | Architecture: x86_64
Operating System: Linux | (amd64)
Type of failure: GHC rejects | Test Case:
valid program | Blocking:
Blocked By: 10420 | Differential Revisions:
Related Tickets: |
-------------------------------------+-------------------------------------
Comment (by Joachim Breitner

#10294: Missing instances if compiling with -fplugin
-------------------------------------+-------------------------------------
Reporter: jscholl | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler (Type | Version: 7.10.1
checker) | Keywords:
Resolution: duplicate | Architecture: x86_64
Operating System: Linux | (amd64)
Type of failure: GHC rejects | Test Case:
valid program | Blocking:
Blocked By: 10420 | Differential Revisions:
Related Tickets: |
-------------------------------------+-------------------------------------
Comment (by Joachim Breitner

#10294: Missing instances if compiling with -fplugin -------------------------------------+------------------------------------- Reporter: jscholl | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 7.10.1 checker) | Keywords: Resolution: | Architecture: x86_64 Operating System: Linux | (amd64) Type of failure: GHC rejects | Test Case: valid program | plugins/T10294, plugins/T10294a Blocked By: 10420 | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * status: closed => new * testcase: => plugins/T10294, plugins/T10294a * resolution: duplicate => Comment: The `pre_cmd` of T10294 and T10294a generates the following warning with a devel2 build: {{{ $ make -s --no-print-directory -C annotation-plugin package.T10294 WARNING: file compiler/specialise/Specialise.hs, line 722 specImport discarding: mapM_ :: forall a_a5Mh (m_a5Mi :: * -> *) b_a5Mj (t_a5Mk :: * -> *). (Foldable t_a5Mk, Monad m_a5Mi) => (a_a5Mh -> m_a5Mi b_a5Mj) -> t_a5Mk a_a5Mh -> m_a5Mi () want: False stable: False calls: mapM_ _ @ CoreM _ @ [] $fFoldable[] $fMonadCoreM }}} This makes the test fail for me, even when DYNAMIC_GHC_PROGRAMS=YES (my timeout program stops working for some reason when it sees unexpected output). I don't know if the warning can be ignored, so I'm reopening this ticket. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10294#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10294: Missing instances if compiling with -fplugin -------------------------------------+------------------------------------- Reporter: jscholl | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.12.1 Component: Compiler (Type | Version: 7.10.1 checker) | Resolution: fixed | Keywords: Operating System: Linux | Architecture: x86_64 | (amd64) Type of failure: GHC rejects | Test Case: valid program | plugins/T10294, plugins/T10294a Blocked By: 10420 | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * status: new => closed * resolution: => fixed * milestone: => 7.12.1 Comment: Nevermind, that warning only shows up when ghc is compiled with `-DDEBUG`, and is not related to this ticket at all. Closing as duplicate again. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10294#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10294: Missing instances if compiling with -fplugin
-------------------------------------+-------------------------------------
Reporter: jscholl | Owner:
Type: bug | Status: closed
Priority: normal | Milestone: 8.0.1
Component: Compiler (Type | Version: 7.10.1
checker) |
Resolution: fixed | Keywords:
Operating System: Linux | Architecture: x86_64
| (amd64)
Type of failure: GHC rejects | Test Case:
valid program | plugins/T10294, plugins/T10294a
Blocked By: 10420 | Blocking:
Related Tickets: | Differential Rev(s):
-------------------------------------+-------------------------------------
Comment (by Ben Gamari
participants (1)
-
GHC