Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,388
    • Issues 4,388
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 378
    • Merge Requests 378
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #4524

Closed
Open
Opened Nov 24, 2010 by guest@trac-guest

Template variable unbound in rewrite rule

I was trying to compile the latest darcs source (darcs get --lazy http://darcs.net) using ghc7. I had to modify darcs.cabal to add !NoMonoLocalBinds to 3 places (just search for extensions, and add it to the END of the lists).

When I do a build I get this:

[ 65 of 154] Compiling Darcs.Patch.V1.Commute ( src/Darcs/Patch/V1/Commute.lhs, dist/build/Darcs/Patch/V1/Commute.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 7.0.1 for i386-unknown-linux):
	Template variable unbound in rewrite rule
    sg_s2vkQ{tv} [co]
    [x{tv a2uFt} [sk], y{tv a2uFu} [sk], sg_s2vkQ{tv} [co],
     sc_s2vkR{v} [lid], sc_s2vkS{v} [lid]]
    [x{tv X2uJc} [sk], y{tv X2uJe} [sk], sg_s2vkQ{tv} [co],
     sc_s2vkR{v} [lid], sc_s2vkS{v} [lid]]
    [TYPE y{tv a2uFu} [sk], TYPE y{tv a2uFu} [sk],
     TYPE x{tv a2uFt} [sk], TYPE x{tv a2uFt} [sk],
     TYPE x{tv a2uFt} [sk], sc_s2vkS{v} [lid], sc_s2vkR{v} [lid],
     darcs-2.5:Darcs.Witnesses.Ordered.NilRL{v ruI5} [gid[DataCon]]
       @ darcs-2.5:Darcs.Patch.V1.Core.Patch{tc r1EYF}
       @ x{tv a2uFt} [sk]
       @ x{tv a2uFt} [sk]
       @ x{tv a2uFt} [sk]]
    [TYPE y{tv a2uFu} [sk], TYPE y{tv a2uFu} [sk],
     TYPE x{tv a2uFt} [sk], TYPE x{tv a2uFt} [sk],
     TYPE x{tv a2uFt} [sk], wild_s2vhT{v} [lid], sc_s2vke{v} [lid],
     darcs-2.5:Darcs.Witnesses.Ordered.NilRL{v ruI5} [gid[DataCon]]
       @ darcs-2.5:Darcs.Patch.V1.Core.Patch{tc r1EYF}
       @ x{tv a2uFt} [sk]
       @ x{tv a2uFt} [sk]
       @ x{tv a2uFt} [sk]]

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

As an additional data point, this module builds correctly without !NoMonoLocalBinds. The reason I was adding !NoMonoLocalBinds to the .cabal file is because I can't use #if __GLASGOW_HASKELL >= 700 to conditionally add in this language flag. The reason is because ghc6 will not correctly understand the language flag appearing inside a CPP #if/#endif block and I want this code to compile on ghc6 and 7.

Please let me know if I can provide additional information to help reproduce this bug. My email address is dagitj on gmail, also on CC of this ticket.

Trac metadata
Trac field Value
Version 7.0.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Type checker)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC dagitj@gmail.com
Operating system Unknown/Multiple
Architecture Unknown/Multiple
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#4524