Andy,

On 22.03.2010, at 08:48, Andy Stewart wrote:

> If two module have same signal name, example, Entry and TextBuffer  
> have
> some signal `copyClipboard`, when `gtk2hs/gtk/Graphics/UI/Gtk.hs.pp`
> import those will got conflict error, then you just need hiding one
> module's signal name.
>
> We just add suffix `Signal` after signal name when necessary, example
> have signal named `show`, so we need change it to `showSignal` to  
> avoid
> conflict with Haskell `show` functoin.

Well, my convention was so far to call attributes and signals by their  
shortest name (as in Gtk+). Once a naming conflict with a standard  
Haskell function occurs (as in the 'show' signal) or if two modules  
export the same signal/attribute name, these become prefixed with the  
type name. I think we should stick to this. Duplicate names in  
different modules are a pain since it is impossible to use either of  
the names when you simply import Graphics.UI.Gtk which is what most  
users do.

And please don't change any existing signal names since this will  
break code. If an existing module Foo contains e.g. 'copyClipboard'  
and a new module has the same signal name, do the following:

old Foo.chs:

-- | The content was copied to the clipboard.
--
copyClipboard :: ....
copyClipboard =


new Foo.chs:

-- keep backwards compatibility, export, but do not document
copyClipboard = fooCopyClipboard

-- | The content was copied to the clipboard.
--
fooCopyClipboard :: ....
fooCopyClipboard =


Please tell me if this convention is not clear.

Axel.


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Reply via email to