FW: [GHC] #916: windows installer should play nice with other Haskell tools

Claus, Neil Thanks for raising this. I talked to Sigbjorn about it at ICFP. If you two can form a consensus (giving others an opportunity to speak up) about what should be the desirable behaviour for GHC's installer, he's happy to implement it. (Caveat: unless something turns out to be a lot of work, but that's unlikely.) You mention two specifics: - make file type registration optional - do not overwrite existing default handler for .hs/.lhs, just add new non-default handlers I believe that the former is done already; not sure about the latter (Sigbjorn will correct me if I'm wrong). I don’t know what a non-default handler is. Is there anything else? There was mention of better icons. What did you have in mind by "coordinate with Neil for WinHugs, and possibly with others"? Of course we'd like to coordinate... but about what specifically (apart from the above two)? Thanks Simon -----Original Message----- From: glasgow-haskell-bugs-bounces@haskell.org [mailto:glasgow-haskell-bugs-bounces@haskell.org] On Behalf Of GHC Sent: 28 September 2006 14:46 To: glasgow-haskell-bugs@haskell.org Subject: [GHC] #916: windows installer should play nice with other Haskell tools #916: windows installer should play nice with other Haskell tools ----------------------------------------+----------------------------------- Reporter: claus.reinke@talk21.com | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 6.4.2 Severity: normal | Keywords: Os: Windows | Difficulty: Unknown Architecture: Unknown | ----------------------------------------+----------------------------------- traditionally, the windows installers have registered ghci as the default tool to operate on .hs/.lhs files, without regard for existing file type associations. that has been a real pain for those of us who like to use many tools on haskell files. could you please ensure that future installers are more cooperative? - coordinate with Neil for WinHugs, and possibly with others - make file type registration optional - do not overwrite existing default handler for .hs/.lhs, just add new non-default handlers (so people can use their own defaults, eg. editors, and still have easy access to ghci, hugs, ..) this has come up many times. see also: http://www.haskell.org/pipermail/glasgow-haskell-users/2004- March/006402.html http://www.haskell.org/pipermail/hugs-users/2006-February/000656.html http://article.gmane.org/gmane.comp.lang.haskell.cvs.ghc/14819/ http://www.haskell.org/pipermail/glasgow-haskell-users/2006- September/011107.html http://www.haskell.org/pipermail/glasgow-haskell-users/2006- September/011110.html -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/916 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

Hi All,
I talked to Sigbjorn about it at ICFP. If you two can form a consensus (giving others an opportunity to speak up) about what should be the desirable behaviour for GHC's installer, he's happy to implement it.
I think me and Claus came to an agreement, and I have documented it in a wiki page at: http://haskell.org/haskellwiki/Installers Anything there that is either unclear or controversial? Thanks Neil (Caveat: unless something turns out to be a lot of work, but that's unlikely.)
You mention two specifics:
- make file type registration optional - do not overwrite existing default handler for .hs/.lhs, just add new non-default handlers
I believe that the former is done already; not sure about the latter (Sigbjorn will correct me if I'm wrong). I don't know what a non-default handler is.
Is there anything else? There was mention of better icons. What did you have in mind by "coordinate with Neil for WinHugs, and possibly with others"? Of course we'd like to coordinate... but about what specifically (apart from the above two)?
Thanks
Simon
-----Original Message----- From: glasgow-haskell-bugs-bounces@haskell.org [mailto:glasgow-haskell-bugs-bounces@haskell.org] On Behalf Of GHC Sent: 28 September 2006 14:46 To: glasgow-haskell-bugs@haskell.org Subject: [GHC] #916: windows installer should play nice with other Haskell tools
#916: windows installer should play nice with other Haskell tools ----------------------------------------+----------------------------------- Reporter: claus.reinke@talk21.com | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 6.4.2 Severity: normal | Keywords: Os: Windows | Difficulty: Unknown Architecture: Unknown | ----------------------------------------+----------------------------------- traditionally, the windows installers have registered ghci as the default tool to operate on .hs/.lhs files, without regard for existing file type associations. that has been a real pain for those of us who like to use many tools on haskell files.
could you please ensure that future installers are more cooperative? - coordinate with Neil for WinHugs, and possibly with others - make file type registration optional - do not overwrite existing default handler for .hs/.lhs, just add new non-default handlers (so people can use their own defaults, eg. editors, and still have easy access to ghci, hugs, ..)
this has come up many times. see also:
http://www.haskell.org/pipermail/glasgow-haskell-users/2004- March/006402.html http://www.haskell.org/pipermail/hugs-users/2006-February/000656.html http://article.gmane.org/gmane.comp.lang.haskell.cvs.ghc/14819/ http://www.haskell.org/pipermail/glasgow-haskell-users/2006- September/011107.html http://www.haskell.org/pipermail/glasgow-haskell-users/2006- September/011110.html
-- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/916 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

On 9/28/06, Neil Mitchell
I think me and Claus came to an agreement, and I have documented it in a wiki page at: http://haskell.org/haskellwiki/Installers
Anything there that is either unclear or controversial?
While this may not be true for other interpreted files, the convention that seems to have been established for batch files, HTML files, etc is that the Open (default) menu item runs (or displays) the given file, and that there are non-default Edit options for each possible editor (e.g., Notepad, Dreamweaver, etc.). Adopting this convention, each interpreter would add "Open in <interpreter>" to the context menu, providing the user an option to make this the default behavior, and would, if necessary, also install an "Edit with <interpreter>" option. I believe adopting this approach would not only preserve similarity with existing behavior, but would be more internally consistent. Presented with a list of "Open in <interpreter>" options and a default also called "Open", I would expect them to have similar behavior. Editing is not (to me) similar to running. /g

Hi,
While this may not be true for other interpreted files, the convention that seems to have been established for batch files, HTML files, etc is that the Open (default) menu item runs (or displays) the given file, and that there are non-default Edit options for each possible editor (e.g., Notepad, Dreamweaver, etc.). Adopting this convention, each interpreter would add "Open in <interpreter>" to the context menu, providing the user an option to make this the default behavior,
It's not always true, consider .c files - double clicking them doesn't compiled and execute them. It seems different things do different ways, so I'd say Haskell should do what's most useful.
and would, if necessary, also install an "Edit with <interpreter>" option.
No interpretters actually allow the user to edit within them at the moment, hence one Edit action seems sufficient. If this were to change, then this seems a reasonable way of representing it. The advantage of having one Edit command which is the default is that its a single unambiguous default, and doesn't result in things stealing from each other etc. No one has to "decide" if they are a GHC user or a Hugs user, then can all just be happy. I think its possible to make an Edit command the default, would that make you happier? i.e. no open, but by default you edit. Thanks Neil

On 9/28/06, Neil Mitchell
The advantage of having one Edit command which is the default is that its a single unambiguous default, and doesn't result in things stealing from each other etc. No one has to "decide" if they are a GHC user or a Hugs user, then can all just be happy. I think its possible to make an Edit command the default, would that make you happier? i.e. no open, but by default you edit.
That seems like a decent compromise from here. Since I personally set my edit command to use Emacs (via gnuclientw), I assume installers will ask before clobbering it? /g -- It is myself I have never met, whose face is pasted on the underside of my mind.

Hi
That seems like a decent compromise from here. Since I personally set my edit command to use Emacs (via gnuclientw), I assume installers will ask before clobbering it?
"If prior to installing the compiler there is a default document handler for .hs/.lhs files, which is not one of the compilers adhereing to this standard, then that will be used." - if the user has explicitly set an Open/Edit command then the Haskell program won't even offer to clobber it, since the user has already gone to the trouble of registering .hs files. Thanks Neil

http://haskell.org/haskellwiki/Installers
Anything there that is either unclear or controversial?
1. possibility to avoid new file type assocs: agreed 2. icon: no opinion 3. file type for .hs/.lhs: all Haskell systems should agree on one (and I have a vague feeling that there was a consensus about this several years back, something to do with MIME?) 4. actions: + "open with X" (where X is ghci, hugs, ..): agreed + default action: _never_ override existing default!! so the only unclear/controversial point seems to be the default. from discussion with Neil, I assume that the programmer/installer-perspective is not quite as simple as the user perspective, but here's what I'd like to see: a. all installers should agree on the file type for .hs/.lhs (currently, they don't) b. if I decide to permit an installer for X to register itself for .hs/.lhs, it should ensure that the common file type is registered, and add a non-default action "Open with X" for that file type (by non-default, I mean the actions that are listed in the "Edit File Type" dialogue and are available in right-click menues, but not set as the default action for double-click) [as an aside: "Build with ghc --make" might also make sense for the ghc installer; as would version numbers for all menu entries, as "Open with GHCi", eg., is not uniquely determined if both 6.4.2 and 6.6 are installed] c. this means that as long as I have any Haskell tool installed, .hs/.lhs will be recognized with the common file type and all installed Haskell tools are available from the right-click menu for that file type (provided I've allowed registration), happily coexisting. if I want to make any of those tools the default, I can do so, without overriding or losing other actions (for me, the default will be an editor, for Neil it will be WinHugs calling out to an editor, for someone else it might be GHCi..) in other words, no priorities between tools, no editing via WinHugs (unless the user sets that as the default). if you absolutely insist on making one tool the default handler: - ask the user before you do so - don't overwrite the existing default (A), just add an action (B) and switch defaults (from A to B), so that both actions remain available unless I've missed something, this will result in happiness amongst both newbies and oldies:-) - newbies won't have any old Haskell tools installed, will just accept all installer defaults, and will thus end up in WinHugs/GHCi/WinHugs Edit/.. via a simple double click, depending on what tool they installed - oldies will keep all their old settings and file type handlers available, just gain a new option with every new tool they install and lose one with every tool they uninstall hth, claus

Hi
3. file type for .hs/.lhs: all Haskell systems should agree on one (and I have a vague feeling that there was a consensus about this several years back, something to do with MIME?)
My text there was chosen at random, I have no particular tie to it what-so-ever. A MIME type is probably desirable too, if anyone can remember what was decided upon.
+ default action: _never_ override existing default!!
so the only unclear/controversial point seems to be the default. from discussion with Neil, I assume that the programmer/installer-perspective is not quite as simple as the user perspective, but here's what I'd like to see:
Hmm, I appreciate thats simpler logic. The thing is that GHCi doesn't really have a good idea how to open .hs files under Windows, and WinHugs has a really good idea - hence there is a better user experience if WinHugs is used. How about: GHC installs Open with GHCi, not as default (if there are no other commands it will be default anyway) WinHugs installs Open with WinHugs, Edit with WinHugs, giving the option to make Edit with WinHugs the default during install (defaulting to Yes if there is no default action, No if there is one) I'll also provide some configuration dialog within WinHugs to have a drop down list for all the installed actions, and allow the user to pick a default. Thanks Neil
participants (4)
-
Claus Reinke
-
J. Garrett Morris
-
Neil Mitchell
-
Simon Peyton-Jones