Re: [GHC] #3823: GHC 6.12 breaks combination of records and mutually recursive modules
#3823: GHC 6.12 breaks combination of records and mutually recursive modules +--- Reporter: mboes | Owner: igloo Type: merge | Status: closed Priority: high | Milestone: 6.12.2 Component: Compiler |Version: 6.12.1 Resolution: fixed | Keywords: Difficulty: | Os: Unknown/Multiple Testcase: T3823 | Architecture: Unknown/Multiple Failure: GHC rejects valid program | +--- Changes (by igloo): * status: new = closed * testcase: = T3823 * resolution: = fixed Comment: I've merged this, but the example fails to build (in both HEAD and 6.12) with this error: {{{ T3823B.hs:8:6: Couldn't match expected type `A' against inferred type `Bool' In the first argument of `y', namely `a' In the expression: y a In the definition of `b': b = y a }}} which looks correct to me. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/3823#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #3823: GHC 6.12 breaks combination of records and mutually recursive modules
#3823: GHC 6.12 breaks combination of records and mutually recursive modules -+-- Reporter: mboes |Owner: igloo Type: merge | Status: new Priority: high |Milestone: 6.12.2 Component: Compiler | Version: 6.12.1 Keywords:| Difficulty: Os: Unknown/Multiple | Testcase: Architecture: Unknown/Multiple | Failure: GHC rejects valid program -+-- Changes (by simonpj): * owner: simonpj = igloo * type: bug = merge Comment: Good catch, thank you! Easily fixed too {{{ Wed Jan 20 09:42:21 GMT 2010 simo...@microsoft.com * Fix Trac #3823, plus warning police in TcRnDriver The immediate reason for this patch is to fix #3823. This was rather easy: all the work was being done but I was returning type_env2 rather than type_env3. An unused-veriable warning would have shown this up, so I fixed all the other warnings in TcRnDriver. Doing so showed up at least two genuine lurking bugs. Hurrah. M ./compiler/typecheck/TcRnDriver.lhs -54 +60 M ./compiler/typecheck/TcTyClsDecls.lhs -2 +2 }}} This is worth merging to the 6.12 branch, Ian. And adding a regression test. Simon -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/3823#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #3823: GHC 6.12 breaks combination of records and mutually recursive modules
#3823: GHC 6.12 breaks combination of records and mutually recursive modules -+-- Reporter: mboes |Owner: Type: bug | Status: new Priority: high |Milestone: 6.12.2 Component: Compiler | Version: 6.12.1 Keywords:| Difficulty: Os: Unknown/Multiple | Testcase: Architecture: Unknown/Multiple | Failure: GHC rejects valid program -+-- Changes (by simonmar): * priority: normal = high * milestone: = 6.12.2 Comment: regression -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/3823#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #3823: GHC 6.12 breaks combination of records and mutually recursive modules
#3823: GHC 6.12 breaks combination of records and mutually recursive modules -+-- Reporter: mboes |Owner: simonpj Type: bug | Status: new Priority: high |Milestone: 6.12.2 Component: Compiler | Version: 6.12.1 Keywords:| Difficulty: Os: Unknown/Multiple | Testcase: Architecture: Unknown/Multiple | Failure: GHC rejects valid program -+-- Changes (by simonpj): * owner: = simonpj Comment: I'm on this. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/3823#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
[GHC] #3823: GHC 6.12 breaks combination of records and mutually recursive modules
#3823: GHC 6.12 breaks combination of records and mutually recursive modules -+-- Reporter: mboes | Owner: Type: bug | Status: new Priority: normal| Component: Compiler Version: 6.12.1|Keywords: Os: Unknown/Multiple |Testcase: Architecture: Unknown/Multiple | Failure: GHC rejects valid program -+-- Take the following code for two mutually recursive modules A and B: {{{ module A where import B data A = X { x :: Bool } | Y y :: A - A y = \_ - Y -- A.hs-boot module A where data A = X { x :: Bool } | Y y :: A - A module B where import {-# SOURCE #-} A data B = A A a = x (X True) b = y a }}} Compiling this code with ghc --make or ghci gives: {{{ [1 of 3] Compiling A[boot] ( A.hs-boot, A.o-boot ) [2 of 3] Compiling B( B.hs, B.o ) B.hs:7:4: Can't find interface-file declaration for variable x Probable cause: bug in .hi-boot file, or inconsistent .hi file Use -ddump-if-trace to get an idea of which file caused the error In the expression: x (X True) In the definition of `a': a = x (X True) }}} This code used to work in GHC 6.10. Note that this issue breaks the build of the hmk package on Hackage. Doubtless other packages making use of mutually recursive modules hit this snag too. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/3823 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs