#1644: Problem with interface file (.hi) for a particular function
-------------------------------------------+--------------------------------
    Reporter:  [EMAIL PROTECTED]  |        Owner:         
        Type:  bug                         |       Status:  new    
    Priority:  normal                      |    Milestone:         
   Component:  Compiler                    |      Version:  6.6.1  
    Severity:  normal                      |   Resolution:         
    Keywords:                              |   Difficulty:  Unknown
          Os:  Unknown                     |     Testcase:         
Architecture:  Unknown                     |  
-------------------------------------------+--------------------------------
Comment (by [EMAIL PROTECTED]):

 I had troubles reproducing it in a simpler setting. What I did notice
 right now though, is I was calling mkElement oddly. Its type is

 {{{mkElement :: (ArrowXml a) => QName -> a n XmlTree -> a n XmlTree -> a n
 XmlTree}}}

 but I'm calling it with a list ([sattr ("xmlns:" ++ pfx') ns]). Changing
 the call to

 {{{mkElement qn' (sattr ("xmlns:" ++ pfx') ns) cs}}}

 and the error disappears.

 Tried this in ghci:

 {{{
 :t mkElement undefined (sattr "" "")
 mkElement (undefined) (sattr "" "") :: (ArrowXml a) => a n XmlTree -> a n
 XmlTree

 :t mkElement undefined [sattr "" ""]
 <no output at all>
 }}}

 So something fishy is happening. If I pass in an empty list instead

 {{{
 :t mkElement undefined []
     Couldn't match expected type `a n' against inferred type `[]'
       Expected type: a n XmlTree
       Inferred type: [a1]
     In the second argument of `mkElement', namely `[]'
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1644>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to