[project @ 2005-01-04 16:26:55 by simonpj]
authorsimonpj <unknown>
Tue, 4 Jan 2005 16:27:01 +0000 (16:27 +0000)
committersimonpj <unknown>
Tue, 4 Jan 2005 16:27:01 +0000 (16:27 +0000)
commita27f7c876021accc78d176cfaba98937dad870af
tree3fdb226b5168cc6432270ea58afcbf1c6bf62cd9
parentf3cdd93b05a52ac8c77ea93288a9fd3ee1210f99
[project @ 2005-01-04 16:26:55 by simonpj]
------------------
          Fix an mdo bug
   ------------------

Embarassingly, this bug makes GHC either panic (for some programs) or
go into a loop (on others) in a recursive mdo that involves a
polymorphic function.  Urk!

The fix is twofold:
  a) add a missing bindInstsOfLocalFuns to tcStmtAndThen (RecStmt case)
  b) bind the correct set of variables in dsRecStmt

I added some explanatory comments about RecStmt in HsExpr too.

The tests is mdo/should_compile/mdo006
ghc/compiler/deSugar/DsExpr.lhs
ghc/compiler/hsSyn/HsExpr.lhs
ghc/compiler/typecheck/TcMatches.lhs