Personal tools

Installers

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
m (Spelling)
(Actions available)
Line 21: Line 21:
 
Where interpreter 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:
+
If the interpretter can offer a sensible Edit action (i.e. WinHugs, but not GHCi) then there will be an additional command:
   
* 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.
+
* Edit using <interpretter>
   
'''BEGIN: Under debate, see the mailing list'''
+
== Default Action ==
   
* 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:
+
* 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.
*# WinHugs, opens using the sophisticated editor facilities, including auto-detection of appropriate editors and a configurable option
+
* If any Edit action is available, then that will be used.
*# GHCi, open using Notepad, unless someone can think of a better default (what is GHCi's :edit behaviour?)
+
* If no other actions are available, then an Open action will be used.
   
i.e. installing WinHugs will overwrite GHC's configured Edit command, installing GHC will ''not'' overwrite WinHugs' setting.
+
If there is a preexisting default handler, then that must not be changed without the users consent.
   
'''END: Under debate'''
+
== New Document Creation ==
   
 
An entry should be added to the Explorer's New menu, giving Haskell Document as an option, which will create a .hs file.
 
An entry should be added to the Explorer's New menu, giving Haskell Document as an option, which will create a .hs file.

Revision as of 09:51, 29 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

Contents

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

2 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".

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

If the interpretter can offer a sensible Edit action (i.e. WinHugs, but not GHCi) then there will be an additional command:

  • Edit using <interpretter>

4 Default Action

  • 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 any Edit action is available, then that will be used.
  • If no other actions are available, then an Open action will be used.

If there is a preexisting default handler, then that must not be changed without the users consent.

5 New Document Creation

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

6 Technical Implementation

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