Ticket #7147 (closed bug: fixed)

Opened 9 months ago

Last modified 9 months ago

programatica fails to compile

Reported by: maeder Owned by:
Priority: normal Milestone: 7.6.1
Component: Compiler Version: 7.6.1-rc1
Keywords: Cc:
Operating System: Solaris Architecture: x86
Type of failure: GHC rejects valid program Difficulty: Unknown
Test Case: typecheck/should_compile/T7147 Blocked By:
Blocking: Related Tickets:

Description

-bash-3.00$ cabal install http://www.dfki.de/sks/hets/src-distribution/programatica-1.0.0.4.tar.gz
Downloading
http://www.dfki.de/sks/hets/src-distribution/programatica-1.0.0.4.tar.gz
Resolving dependencies...
Configuring programatica-1.0.0.4...
Building programatica-1.0.0.4...
Preprocessing library programatica-1.0.0.4...
[  1 of 223] Compiling TokenTags        ( base/pretty/TokenTags.hs, dist/build/TokenTags.o )

...

[141 of 223] Compiling DefinedNamesBase ( base/defs/DefinedNamesBase.hs, dist/build/DefinedNamesBase.o )

base/defs/DefinedNamesBase.hs:22:48:
    No instance for (AddName
                       (ghc-prim:GHC.Prim.Any *) (SyntaxRec.BaseDeclI i))
      arising from a use of `addNameRec'
    Possible fix:
      add an instance declaration for
      (AddName (ghc-prim:GHC.Prim.Any *) (SyntaxRec.BaseDeclI i))
    In the expression: addNameRec
    In an equation for `addName': addName = addNameRec
    In the instance declaration for `AddName i (HsDeclI i)'
cabal: Error: some packages failed to install:
programatica-1.0.0.4 failed during the building phase. The exception was:
ExitFailure 1

Change History

Changed 9 months ago by pcapriotti

  • status changed from new to infoneeded
  • difficulty set to Unknown

Thanks for the report. Any chance you can isolate this failure into a small self-contained test case?

Changed 9 months ago by maeder

I don't know the inner working of this package myself. I suspect that cruel module re-exports may cause this problem, but my attempts to locate the problem failed so far.

Changed 9 months ago by simonpj

Ah, I see. I've found the bug. Patch coming.

Changed 9 months ago by simonpj@…

commit de07bf2657fc5709331ad933b5563fac97b1a05b

Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Wed Aug 15 18:10:54 2012 +0100

    Use TcMType.growThetaTyVars (which works) rather than TcSimplify.growPreds (which doesn't)
    
    I think this got left behind when we simplified and improved TcSimplify.  The effect
    was that we had a function like
       class P a b | a -> b
       class Q b c | b -> c
    
       f :: (P a b, Q b c) => a -> a
    
    and were were failing to quanitfy over 'c', even though it is (indirectly) determined
    by 'a'.
    
    This make Programatica fail to compile: Trac #7147

 compiler/typecheck/TcSimplify.lhs |   40 +++++++++++++------------------------
 1 files changed, 14 insertions(+), 26 deletions(-)

Changed 9 months ago by simonpj

  • status changed from infoneeded to merge

Fixed, thanks.

Pls merge to 7.6.

Simon

Changed 9 months ago by simonpj

  • testcase set to typecheck/should_compile/T7147

Changed 9 months ago by pcapriotti

  • status changed from merge to closed
  • resolution set to fixed
  • milestone set to 7.6.1

Merged as ab4c7d3b0ad758f965b67239201dc3da52888e5f.

Note: See TracTickets for help on using tickets.