summaryrefslogtreecommitdiff
path: root/compiler/GHC/Rename
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2021-04-27 19:02:03 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-04-29 17:29:05 -0400
commitc2541c49f162f1d03b0ae55f47b9c76cc96df76f (patch)
tree7b8cddef5cd7d381ad6715d355f5d0d0c5dfe03c /compiler/GHC/Rename
parent514700005af295f84d74d5c7e1c303ce3c0b28ce (diff)
downloadhaskell-c2541c49f162f1d03b0ae55f47b9c76cc96df76f.tar.gz
Propagate free variables in extract_lctxt correctly
This fixes an oversight in the implementation of `extract_lctxt` which was introduced in commit ce85cffc. Fixes #19759.
Diffstat (limited to 'compiler/GHC/Rename')
-rw-r--r--compiler/GHC/Rename/HsType.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Rename/HsType.hs b/compiler/GHC/Rename/HsType.hs
index d11c4c9634..f92100ffe2 100644
--- a/compiler/GHC/Rename/HsType.hs
+++ b/compiler/GHC/Rename/HsType.hs
@@ -1910,7 +1910,7 @@ extractDataDefnKindVars (HsDataDefn { dd_kindSig = ksig })
= maybe [] extractHsTyRdrTyVars ksig
extract_lctxt :: Maybe (LHsContext GhcPs) -> FreeKiTyVars -> FreeKiTyVars
-extract_lctxt Nothing = const []
+extract_lctxt Nothing = id
extract_lctxt (Just ctxt) = extract_ltys (unLoc ctxt)
extract_scaled_ltys :: [HsScaled GhcPs (LHsType GhcPs)]