mpickering / apply-refact

Refactor Haskell source files
BSD 3-Clause "New" or "Revised" License
147 stars 29 forks source link

Refactor panics when running on haskell source files #143

Open flip111 opened 11 months ago

flip111 commented 11 months ago
» fd -g '*.hs' src app ps -x hlint --refactor --refactor-options="--inplace" {}
refactor: panic! (the 'impossible' happened)
  GHC version 9.4.7:
        runPipe

parse error on input `pattern'
Call stack:
    CallStack (from HasCallStack):
      callStackDoc, called at compiler/GHC/Utils/Panic.hs:182:37 in ghc:GHC.Utils.Panic
      pprPanic, called at src/Refact/Compat.hs:161:13 in main:Refact.Compat

Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug
TheOddler commented 3 months ago

I just encountered this too, did you ever find a fix?

flip111 commented 3 months ago

@TheOddler with which GHC version was refactor compiled in your case?

TheOddler commented 3 months ago

I'm not sure, but I have since found that using a newer version did solve my problem. I updated my nix channel I was using, and retried, and then it worked.

Sadly I'm not sure any more what the exact version of GHC was I was using, sorry!

zliu41 commented 3 months ago

Can you narrow it down to the module or code block on which it panics?