diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2020-09-24 21:02:09 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-09-25 21:15:14 -0400 |
commit | 6a7dae4badcea5b3519005cf4e5fbf15f7e5df59 (patch) | |
tree | eb97e0fbb778f6600e674fe2f5f9a8bd8bd7c6d2 /compiler | |
parent | 04bc50b3c8e40387a0d0f090ea23cd68923f1834 (diff) | |
download | haskell-6a7dae4badcea5b3519005cf4e5fbf15f7e5df59.tar.gz |
Fix typed holes causing linearity errors (#18491)
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/GHC/Tc/Gen/Expr.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/GHC/Tc/Gen/Expr.hs b/compiler/GHC/Tc/Gen/Expr.hs index 9d40225a55..3b4aa4ec20 100644 --- a/compiler/GHC/Tc/Gen/Expr.hs +++ b/compiler/GHC/Tc/Gen/Expr.hs @@ -198,6 +198,8 @@ tcExpr e@(HsUnboundVar _ occ) res_ty ; name <- newSysName occ ; let ev = mkLocalId name Many ty ; emitNewExprHole occ ev ty + ; tcEmitBindingUsage bottomUE -- Holes fit any usage environment + -- (#18491) ; tcWrapResultO (UnboundOccurrenceOf occ) e (HsUnboundVar ev occ) ty res_ty } |