Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Simon Peyton Jones <simonpj <at> microsoft.com>
Subject: patch applied (ghc): Fix constraint handling for lazy patterns
Newsgroups: gmane.comp.lang.haskell.cvs.ghc
Date: Friday 24th November 2006 23:15:17 UTC (over 10 years ago)
Fri Nov 24 15:05:48 PST 2006  [email protected]
  * Fix constraint handling for lazy patterns
  
  Lazy patterns are quite tricky!  Consider
  	f ~(C x) = 3
  Can the Num constraint from the 3 be discharged by a Num dictionary
  bound by the pattern?  Definitely not!  
  
  See Note [Hopping the LIE in lazy patterns] in TcPat
  
  The type checker wasn't ensuring this, and that was causing all
  manner of strange things to happen.  It actually manifested as a
  strictness bug reported by Sven Panne.
  
  I've added his test case as tcrun040.
  

    M ./compiler/hsSyn/HsUtils.lhs -6 +13
    M ./compiler/typecheck/TcPat.lhs -4 +19
 
CD: 3ms