[GHC] #16093: mkPluginUsage: file not found

GHC ghc-devs at haskell.org
Sun Dec 23 23:04:12 UTC 2018


#16093: mkPluginUsage: file not found
-------------------------------------+-------------------------------------
           Reporter:  lerkok         |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.6.3
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 I've been trying to track down another plugin issue when I ran into this
 one.

 I have the following `TestPlugin.hs` file:

 {{{#!hs
 module TestPlugin (plugin) where

 import GhcPlugins

 plugin :: Plugin
 plugin = defaultPlugin {installCoreToDos = install}
   where install _ todos = return (test : todos)

         test = CoreDoPluginPass "Test" return
 }}}

 And the following `Test.hs` file:

 {{{#!hs
 {-# OPTIONS_GHC -fplugin TestPlugin #-}

 main :: IO ()
 main = return ()
 }}}

 They are both in the same directory. With ghc 8.4.2, I have:

 {{{
 $ ghci-8.4.2 -package ghc Test.hs
 GHCi, version 8.4.2: http://www.haskell.org/ghc/  :? for help
 [1 of 2] Compiling TestPlugin       ( TestPlugin.hs, interpreted )
 [2 of 2] Compiling Main             ( Test.hs, interpreted )
 Ok, two modules loaded.
 }}}

 But with ghc 8.6.3, I get:

 {{{
 $ ghci-8.6.3 -package ghc Test.hs
 GHCi, version 8.6.3: http://www.haskell.org/ghc/  :? for help
 [1 of 2] Compiling TestPlugin       ( TestPlugin.hs, interpreted )
 [2 of 2] Compiling Main             ( Test.hs, interpreted )
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.6.3 for x86_64-apple-darwin):
         mkPluginUsage: file not found
   TestPlugin ./TestPlugin.o
   Call stack:
       CallStack (from HasCallStack):
         callStackDoc, called at compiler/utils/Outputable.hs:1160:37 in
 ghc:Outputable
         pprPanic, called at compiler/deSugar/DsUsage.hs:234:15 in
 ghc:DsUsage

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 }}}

 My original problem was different actually, so if you can suggest at least
 a workaround for this without actually fixing it  I can proceed to
 replicate the other one.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16093>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list