We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5348c61 commit b2236b8Copy full SHA for b2236b8
plugins/hls-tactics-plugin/src/Ide/Plugin/Tactic/GHC.hs
@@ -279,9 +279,11 @@ dataConExTys = DataCon.dataConExTyVars
279
280
281
------------------------------------------------------------------------------
282
--- | In GHC 8.8, sometimes patterns are wrapped in 'XPat'. It's not clear why,
283
--- but if we don't remove these wrappers, many functions that operate on
284
--- patterns fail to match.
+-- | In GHC 8.8, sometimes patterns are wrapped in 'XPat'.
+-- The nitty gritty details are explained at
+-- https://blog.shaynefletcher.org/2020/03/ghc-haskell-pats-and-lpats.html
285
+--
286
+-- We need to remove these in order to succesfull find patterns.
287
unXPat :: Pat GhcPs -> Pat GhcPs
288
#if __GLASGOW_HASKELL__ == 808
289
unXPat (XPat (L _ pat)) = unXPat pat
0 commit comments