[project @ 2001-12-03 11:36:26 by simonpj]
authorsimonpj <unknown>
Mon, 3 Dec 2001 11:36:26 +0000 (11:36 +0000)
committersimonpj <unknown>
Mon, 3 Dec 2001 11:36:26 +0000 (11:36 +0000)
commit525aeb93903b0bc968915f3df4f7df755e24e8c7
treed696902ed64af0837f1bf173b3c64f08b122a8a1
parentd1255b8ff1125e6f081cc208189dbece66157d1f
[project @ 2001-12-03 11:36:26 by simonpj]
------------------------------------
Fix a tiresome and longstanding bug
in typechecking of unlifted bindings
------------------------------------

Consider

data T = MkT Int# Int#

f :: T -> Int#
f t = a +# b
    where
      MkT a b = if ... then t else t

This should really be OK, but if the "..." includes
some constraints, the constraint simplifier was trying to
generate some d1=d2 bindings. This is Bad because the desugarer
treats unlifted bindings very specially (they are strict).

This commit fixes the problem, by ensuring we never get
local dictionary binding for an unlifted group.

This fixes the bug which has been making the Alpha port fall
over with a pattern-match failure in DsExpr.  Nothing to do
with Alpha; it's just that the word-size change gave rise
to a little more commoning-up of literals in the type checker
which in turn made the desugarer it fall over.
ghc/compiler/typecheck/TcBinds.lhs