summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2014-08-20 09:12:55 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2014-08-20 09:12:55 +0100
commit27c99a1f8399fd6cb8931c17385102747556b6cc (patch)
treecf97364b1f9548545e2673b383720bf366f70dc1 /compiler
parent7bf49f86a20f3beda0ee5fbea2db64cfef730d74 (diff)
downloadhaskell-27c99a1f8399fd6cb8931c17385102747556b6cc.tar.gz
Comments fix to Trac #9140
Diffstat (limited to 'compiler')
-rw-r--r--compiler/typecheck/TcBinds.lhs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/typecheck/TcBinds.lhs b/compiler/typecheck/TcBinds.lhs
index 14a570423e..9db4125f4b 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