Difference between revisions of "Installers"

From HaskellWiki
Jump to navigation Jump to search
m (Spelling)
Line 1: Line 1:
There are quite a few Haskell compilers/interpretters, and on Windows they all want to be the default handler for .hs and .lhs files. This document prescribes how all the installers should work with regards to file paths. Hopefully this document can reach a concensus.
+
There are quite a few Haskell compilers/interpreters, and on Windows they all want to be the default handler for .hs and .lhs files. This document prescribes how all the installers should work with regards to file paths. Hopefully this document can reach a concensus.
   
 
The compilers which are committed to implementing this standard are: [[Yhc]], [[Hugs]]
 
The compilers which are committed to implementing this standard are: [[Yhc]], [[Hugs]]
Line 17: Line 17:
 
The actions available for each compiler shall be:
 
The actions available for each compiler shall be:
   
* Open in <interpretter>
+
* Open in <interpreter>
   
Where interpretter is an interactive environment, in the style of Hugs/GHCi/Yhe.
+
Where interpreter is an interactive environment, in the style of Hugs/GHCi/Yhe.
   
 
An additional action shall be available, Edit, which will be the default. This will cause the Haskell file to open in an appropriate editor. The way an appropriate editor is determined is:
 
An additional action shall be available, Edit, which will be the default. This will cause the Haskell file to open in an appropriate editor. The way an appropriate editor is determined is:

Revision as of 23:56, 28 September 2006

There are quite a few Haskell compilers/interpreters, and on Windows they all want to be the default handler for .hs and .lhs files. This document prescribes how all the installers should work with regards to file paths. Hopefully this document can reach a concensus.

The compilers which are committed to implementing this standard are: Yhc, Hugs

User configuration

During install the user will be asked whether they want to register .hs/.lhs files to open with the compiler being installed. Yes will be the default. If the user picks no, then no changes will be made to the .lhs/.hs association settings.

File types

The Haskell file types are given as .hs and .lhs. They icon used shall be the top line of this image. These icons are available in the Hugs CVS repository in Windows .ico format (where?).

The file type description for each file shall be "Haskell Document".

Actions available

The actions available for each compiler shall be:

  • Open in <interpreter>

Where interpreter is an interactive environment, in the style of Hugs/GHCi/Yhe.

An additional action shall be available, Edit, which will be the default. This will cause the Haskell file to open in an appropriate editor. The way an appropriate editor is determined is:

  • 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.

BEGIN: Under debate, see the mailing list

  • If multiple compilers are installed, then each will give its own behaviour for the Edit command. The following is a priority list of what the Edit command should do - compilers should overwrite the existing setting if bound to a lower priority compiler, but not if bound to a higher priority one:
    1. WinHugs, opens using the sophisticated editor facilities, including auto-detection of appropriate editors and a configurable option
    2. GHCi, open using Notepad, unless someone can think of a better default (what is GHCi's :edit behaviour?)

i.e. installing WinHugs will overwrite GHC's configured Edit command, installing GHC will not overwrite WinHugs' setting.

END: Under debate

An entry should be added to the Explorer's New menu, giving Haskell Document as an option, which will create a .hs file.

Technical Implementation

Not much point in doing this section until everyone agrees on the end user behaviour!