[commit: ghc] master: StgLint: Allow join point bindings of unlifted type (9afaebe)
git at git.haskell.org
git at git.haskell.org
Tue Aug 22 15:22:06 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/9afaebefe5e59c8e9632f381bee14aa84b44c955/ghc
>---------------------------------------------------------------
commit 9afaebefe5e59c8e9632f381bee14aa84b44c955
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Tue Aug 22 08:44:47 2017 -0400
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
>---------------------------------------------------------------
9afaebefe5e59c8e9632f381bee14aa84b44c955
compiler/stgSyn/StgLint.hs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/compiler/stgSyn/StgLint.hs b/compiler/stgSyn/StgLint.hs
index cbfd11b..ad7b142 100644
--- a/compiler/stgSyn/StgLint.hs
+++ b/compiler/stgSyn/StgLint.hs
@@ -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
More information about the ghc-commits
mailing list