[Hugs] #40: type/constructor namespace bug
#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
#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 Resolution: | Keywords: ------------------------------------------+--------------------------------- Comment (by duncan.coutts@worc.ox.ac.uk): The March 2005 version does not have this bug. -- Ticket URL: <http://hackage.haskell.org/trac/hugs/ticket/40> Hugs <http://www.haskell.org/hugs/> Hugs 98, an interpreter for Haskell
#40: type/constructor namespace bug ------------------------------------------+--------------------------------- Reporter: duncan.coutts@worc.ox.ac.uk | Owner: nobody Type: defect | Status: closed Priority: major | Milestone: Component: hugs | Version: 200609 Resolution: invalid | Keywords: ------------------------------------------+--------------------------------- Changes (by ross): * resolution: => invalid * status: new => closed Comment: hugs +k reports: {{{ ERROR "Api.hs":156 - Kind error in constructor application *** expression : Document -> API *** constructor : Document *** kind : * -> * *** does not match : * }}} The `Document` type changed kind in Sep 2005 ([http://cvs.haskell.org/cgi- bin/cvsweb.cgi/fptools/libraries/HaXml/src/Text/XML/HaXml/Types.hs?f=h;only_with_tag=MAIN#rev1.6 rev. 1.6 of Text.XML.HaXml.Types]) -- Ticket URL: <http://hackage.haskell.org/trac/hugs/ticket/40> Hugs <http://www.haskell.org/hugs/> Hugs 98, an interpreter for Haskell
#40: type/constructor namespace bug ------------------------------------------+--------------------------------- Reporter: duncan.coutts@worc.ox.ac.uk | Owner: nobody Type: defect | Status: closed Priority: major | Milestone: Component: hugs | Version: 200609 Resolution: invalid | Keywords: ------------------------------------------+--------------------------------- Comment (by duncan.coutts@worc.ox.ac.uk): Oh yes. Sorry, my confusion not hugs'. -- Ticket URL: <http://hackage.haskell.org/trac/hugs/ticket/40> Hugs <http://www.haskell.org/hugs/> Hugs 98, an interpreter for Haskell
participants (1)
-
Hugs