Commit 9afaebef authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari
Browse files

StgLint: Allow join point bindings of unlifted type

As described in `Note [CoreSyn let/app invariant]` this is allowed.

Fixes #14117.

Test Plan: Build GHC with BuildFlavour=devel2 with -dstg-lint

Reviewers: austin, simonpj

Reviewed By: simonpj

Subscribers: rwbarton, thomie

GHC Trac Issues: #14117

Differential Revision: https://phabricator.haskell.org/D3857
parent 4717ce86
......@@ -11,7 +11,7 @@ module StgLint ( lintStgTopBindings ) where
import StgSyn
import Bag ( Bag, emptyBag, isEmptyBag, snocBag, bagToList )
import Id ( Id, idType, isLocalId )
import Id ( Id, idType, isLocalId, isJoinId )
import VarSet
import DataCon
import CoreSyn ( AltCon(..) )
......@@ -108,7 +108,7 @@ lint_binds_help (binder, rhs)
_maybe_rhs_ty <- lintStgRhs rhs
-- Check binder doesn't have unlifted type
checkL (not (isUnliftedType binder_ty))
checkL (isJoinId binder || not (isUnliftedType binder_ty))
(mkUnliftedTyMsg binder rhs)
-- Check match to RHS type
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment