Skip to content

Commit

Permalink
updates for compatibility with ghc HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
shayne-fletcher committed May 15, 2024
1 parent ca9c5ac commit c68e021
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GHC/Util/FreeVars.hs
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ instance AllVars (LocatedA (Pat GhcPs)) where
allVars (L _ (ConPat _ _ (RecCon (HsRecFields flds _)))) = allVars flds
allVars (L _ (NPlusKPat _ n _ _ _ _)) = allVars (noLocA $ VarPat noExtField n :: LocatedA (Pat GhcPs)) -- n+k pattern.
allVars (L _ (ViewPat _ e p)) = freeVars_ e <> allVars p -- View pattern.

allVars (L _ WildPat{}) = mempty -- Wildcard pattern.
allVars (L _ LitPat{}) = mempty -- Literal pattern.
allVars (L _ NPat{}) = mempty -- Natural pattern.
allVars (L _ InvisPat {}) = mempty -- since ghc-9.10.1

-- allVars p@SplicePat{} = allVars $ children p -- Splice pattern (includes quasi-quotes).
-- allVars p@SigPat{} = allVars $ children p -- Pattern with a type signature.
Expand Down

0 comments on commit c68e021

Please sign in to comment.