Skip to content

Problem with interface file (.hi) for a particular function

I'm getting the following error:

Can't find interface-file declaration for mkNSElement

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

When trying to call the following function:

import Text.XML.HXT.Arrow


mkNSElement :: Num a => QName -> IOStateArrow [(String, a)] b XmlTree
            -> IOStateArrow [(String, a)] b XmlTree
mkNSElement qn cs = proc x -> do
                      nss <- getUserState -< x
                      let ns = namespaceUri qn
                          (pfx, s) = case lookup ns nss of
                                       Nothing -> (i+1, (ns, i+1):nss)
                                           where i = maximum (map snd nss)
                                       Just x  -> (x, nss)
                          pfx' = "q" ++ show pfx
                          qn' = qn { namePrefix=pfx' }
                      a <- mkElement qn' [sattr ("xmlns:" ++ pfx') ns] cs -<< x
                      setUserState -< s
                      returnA -< a

Same problem trying to run ":t mkNSElement" in ghci.

Trac metadata
Trac field Value
Version 6.6.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information