#1553: Error in "nameModule header{v a1Ax}"
-----------------------------------+----------------------------------------
  Reporter:  [EMAIL PROTECTED]  |          Owner:       
      Type:  bug                   |         Status:  new  
  Priority:  normal                |      Milestone:       
 Component:  GHCi                  |        Version:  6.6.1
  Severity:  normal                |       Keywords:       
Difficulty:  Unknown               |             Os:  Linux
  Testcase:                        |   Architecture:  x86  
-----------------------------------+----------------------------------------
'''1. Linux version:''' 2.4.27
 '''2. GCC version:''' 3.3.5 (Debian 1:3.3.5-13)
 '''3-4. Sequence of events:'''
 [EMAIL PROTECTED]:~/lab/NetGremlins/newSiteManager$ ghci -v eventsCons.hs
    ___         ___ _
   / _ \ /\  /\/ __(_)
  / /_\// /_/ / /  | |      GHC Interactive, version 6.6.1, for Haskell 98.
 / /_\\/ __  / /___| |      http://www.haskell.org/ghc/
 \____/\/ /_/\____/|_|      Type :? for help.

 Using package config file: /usr/local/lib/ghc-6.6.1/package.conf
 wired-in package base mapped to base-2.1.1
 wired-in package rts mapped to rts-1.0
 wired-in package haskell98 mapped to haskell98-1.0
 wired-in package template-haskell mapped to template-haskell-2.1
 Hsc static flags: -static
 Loading package base ... linking ... done.
 wired-in package base mapped to base-2.1.1
 wired-in package rts mapped to rts-1.0
 wired-in package haskell98 mapped to haskell98-1.0
 wired-in package template-haskell mapped to template-haskell-2.1
 *** Parser:
 *** Desugar:
 *** Simplify:
 *** CorePrep:
 *** ByteCodeGen:
 *** Parser:
 *** Desugar:
 *** Simplify:
 *** CorePrep:
 *** ByteCodeGen:
 wired-in package base mapped to base-2.1.1
 wired-in package rts mapped to rts-1.0
 wired-in package haskell98 mapped to haskell98-1.0
 wired-in package template-haskell mapped to template-haskell-2.1
 *** Chasing dependencies:
 Stable obj: []
 Stable BCO: []
 unload: retaining objs []
 unload: retaining bcos []
 Upsweep completely successful.
 *** Deleting temp files:
 Deleting:
 *** Chasing dependencies:
 Stable obj: []
 Stable BCO: []
 unload: retaining objs []
 unload: retaining bcos []
 compile: input file eventsCons.hs
 *** Checking old interface for main:EventsCons:
 [1 of 1] Compiling EventsCons       ( eventsCons.hs, interpreted )
 *** Parser:
 *** Renamer/typechecker:
 *** Desugar:
     Result size = 487
 *** Simplify:
     Result size = 2468
     Result size = 1293
     Result size = 1291
     Result size = 1291
 *** Tidy Core:
     Result size = 1291
 *** CorePrep:
     Result size = 1475
 *** ByteCodeGen:
 *** Deleting temp files:
 Deleting:
 Upsweep completely successful.
 *** Deleting temp files:
 Deleting:
 Ok, modules loaded: EventsCons.
 *EventsCons> main
 *** Parser:
 *** Desugar:
 *** Simplify:
 *** CorePrep:
 *** ByteCodeGen:
 Loading package haskell98 ... linking ... done.
 Loading package parsec-2.0 ... linking ... done.
 Loading package network-2.0.1 ... linking ... done.
 Loading package HTTP-3000.0.0 ... linking ... done.
 Loading package HUnit-1.1.1 ... linking ... done.
 Loading package hxt-7.2 ... linking ... done.
 ghc-6.6.1: panic! (the 'impossible' happened)
   (GHC version 6.6.1 for i386-unknown-linux):
         nameModule header{v a1Ax}

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

 *EventsCons>

 '''5. As can be seen in the listing it gives the error:'''
 ghc-6.6.1: panic! (the 'impossible' happened)
   (GHC version 6.6.1 for i386-unknown-linux):
         nameModule header{v a1Ax}

 '''6. Source code:'''
   1 module EventsCons where
   2 import Text.XML.HXT.Arrow
   3 import Data.Tree.NTree.TypeDefs (NTree (..))
   4 import System.Time
   5 import List
   6
   7 myMonths = [January .. December]
   8 monthRefs = zip [January .. December]
   9                 ["#jan", "#feb", "#mar", "#apr", "#may", "#jun",
  10                   "#jul", "#aug", "#sep", "#oct", "#nov", "#dec"]
  11
  12
  13 main =
  14   runX ( readDocument [(a_validate, v_0)] "events.xml" >>>
  15           processEvents myMonths >>>
  16           writeDocument [(a_indent, v_1)] "events.html" )
  17
  18
  19 processEvents months =
  20   processTopDown (monthListX months)
  21
  22
  23 monthListX months =
  24   mkelem "div" [sattr "class" "monthlist"]
  25     ([header] ++
  26       (listMonths $ take 6 months) ++
  27       [breakTag] ++
  28       (listMonths $ drop 6 months) ++
  29       [breakTag, archive, breakTag])
  30     `when`
  31       (isElem >>> hasName "monthList")
  32   where
  33     header = selem "h2" [[txt "Event Galleries"]]
  34     breakTag = selem "br" []
  35     archive = mkelem "a" [sattr "class" "month", sattr "href"
 "archive.html"]
  36                           [txt "Archive of Previous Years"]
  37     monthLink month = mkelem "a" [sattr "class" "month",
  38                                   sattr "href" (getRef $ lookup month
 monthRefs)]
  39                                  [txt $ show month]
  40     listMonths = map monthLink
  41 {-
  42 eventListX months events =
  43
  44     `when`
  45     (isElem >>> hasName "eventList")
  46   where
  47     monthGroup month =
  48       mkelem "div" [sattr "class" "month"]
  49         ([mkelem "a" [sattr "name" "jan"]
  50           [mkelem "span" [sattr "class" "month"]
  51             [txt (show month)]],
  52         selem "br" []] ++
  53         concatMap mkEventLink (filter (inMonth month) events) ++
  54         [selem "br" []]
  55     mkEventLink event =
  56       [mkelem "a" [sattr "class" "event", sattr "href" "eventLoc"]
  57                 [txt (eventName event)],
  58       selem "br" []]
  59
  60 -}
  61 -- Tools --
  62
  63 --Turns a lookup reference from "Maybe" to a String
  64 getRef Nothing = ""
  65 getRef (Just val) = val
  66

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1553>
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

Reply via email to