#40: type/constructor namespace bug -----------------------------------------+---------------------------------- Reporter: duncan.coutts@worc.ox.ac.uk | Owner: nobody Type: defect | Status: new Priority: major | Milestone: Component: hugs | Version: 200609 Keywords: | -----------------------------------------+---------------------------------- I tried to compile the Gtk2Hs code generator with hugs (September 2006) and it complained about this bit of code: {{{ extractAPI :: Xml.Document -> API extractAPI (Xml.Document _ _ (Xml.Elem "api" [] namespaces) _) = }}} The message is: {{{ ERROR "./Api.hs":156 - Illegal type "Document -> API" in constructor application }}} Commenting out the type signature suppressed the error. The problem seems to be a mixup in what namespace {{{Xml.Document}}} is being looked up in. There is both a type {{{Xml.Document}}} and a constructor {{{Xml.Document}}}. The type name seems to be masking the constructor name. It may also be because it's a qualified import. I don't know, I've looked into that any further. The Gtk2Hs code generator is here: http://darcs.haskell.org/gtk2hs/tools/apiGen/ You only need the Api.hs module to reproduce the error, though you would need all the .hs files in that dir to get the whole thing to run of course. -- Ticket URL: <http://hackage.haskell.org/trac/hugs/ticket/40> Hugs <http://www.haskell.org/hugs/> Hugs 98, an interpreter for Haskell