apply-refact
apply-refact copied to clipboard
Refactor panics when running on haskell source files
» 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
I just encountered this too, did you ever find a fix?
@TheOddler with which GHC version was refactor compiled in your case?
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!
Can you narrow it down to the module or code block on which it panics?