[commit: ghc] master: Comments fix to Trac #9140 (27c99a1)
git at git.haskell.org
git at git.haskell.org
Wed Aug 20 08:13:33 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/27c99a1f8399fd6cb8931c17385102747556b6cc/ghc
>---------------------------------------------------------------
commit 27c99a1f8399fd6cb8931c17385102747556b6cc
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Aug 20 09:12:55 2014 +0100
Comments fix to Trac #9140
>---------------------------------------------------------------
27c99a1f8399fd6cb8931c17385102747556b6cc
compiler/typecheck/TcBinds.lhs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/compiler/typecheck/TcBinds.lhs b/compiler/typecheck/TcBinds.lhs
index 14a5704..9db4125 100644
--- a/compiler/typecheck/TcBinds.lhs
+++ b/compiler/typecheck/TcBinds.lhs
@@ -1456,6 +1456,10 @@ checkStrictBinds top_lvl rec_group orig_binds tc_binds poly_ids
is_unlifted id = case tcSplitSigmaTy (idType id) of
(_, _, rho) -> isUnLiftedType rho
+ -- For the is_unlifted check, we need to look inside polymorphism
+ -- and overloading. E.g. x = (# 1, True #)
+ -- would get type forall a. Num a => (# a, Bool #)
+ -- and we want to reject that. See Trac #9140
is_monomorphic (L _ (AbsBinds { abs_tvs = tvs, abs_ev_vars = evs }))
= null tvs && null evs
More information about the ghc-commits
mailing list