Skip to content

Commit b2236b8

Browse files
committed
Update comment around unXPat
1 parent 5348c61 commit b2236b8

File tree

1 file changed

+5
-3
lines changed
  • plugins/hls-tactics-plugin/src/Ide/Plugin/Tactic

1 file changed

+5
-3
lines changed

plugins/hls-tactics-plugin/src/Ide/Plugin/Tactic/GHC.hs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,11 @@ dataConExTys = DataCon.dataConExTyVars
279279

280280

281281
------------------------------------------------------------------------------
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.
282+
-- | In GHC 8.8, sometimes patterns are wrapped in 'XPat'.
283+
-- The nitty gritty details are explained at
284+
-- 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.
285287
unXPat :: Pat GhcPs -> Pat GhcPs
286288
#if __GLASGOW_HASKELL__ == 808
287289
unXPat (XPat (L _ pat)) = unXPat pat

0 commit comments

Comments
 (0)