[Hugs] #40: type/constructor namespace bug
Hugs <[email protected]> Mon, 16 Oct 2006 23:38:22 -0000
| Newsgroups | gmane.comp.lang.haskell.hugs.bugs |
|---|---|
| Message-ID | <061.9d7d9507d5658207b5460f00e20febc2@localhost> |
#40: type/constructor namespace bug -----------------------------------------+---------------------------------- Reporter: [email protected] | 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 _______________________________________________ Hugs-Bugs mailing list [email protected] http://www.haskell.org/mailman/listinfo/hugs-bugs