text/x-haskell and text/x-literate-haskell added to the GNOME MIME database
These MIME types has now been added to the GNOME MIME database: text/x-haskell for *.hs text/x-literate-haskell for *.lhs The default icons that will be used for these files in the GNOME file browser are: http://jimmac.musichall.cz/stuff/gnome-application-x-haskell.png http://jimmac.musichall.cz/stuff/gnome-application-x-literate-haskell.png The icons are covered by the GPL license, so feel free to use them under the terms of this license. Some rationale for the name of the MIME types. text/* indicates that if no suitable viewer for the MIME type is found, displaying the contents as plain text is OK. x-* means that it's not an officially registered MIME type (there is really no need to register it officially.) Our hope is that everyone will use these MIME types where appropriate. Regards, Martin -- Martin Norbäck d95mback@dtek.chalmers.se Kapplandsgatan 40 +46 (0)708 26 33 60 S-414 78 GÖTEBORG http://www.dtek.chalmers.se/~d95mback/ SWEDEN OpenPGP ID: 3FA8580B
These MIME types has now been added to the GNOME MIME database:
text/x-haskell for *.hs text/x-literate-haskell for *.lhs
Note the following thread from August 1999: application/x-haskell has already been proposed and used. http://www.dcs.gla.ac.uk/mail-www/haskell/msg01843.html http://www.dcs.gla.ac.uk/mail-www/haskell/msg01849.html http://www.dcs.gla.ac.uk/mail-www/haskell/msg01853.html "application" seems more appropriate for Fritz Ruehr's goal here, which is a script that can be clicked on to make it run (using runhugs, presumably). I can see your reasoning for "text", though. What is used for Javascript code at present? Or for C source code? --KW 8-)
tor 2002-04-18 klockan 11.32 skrev Keith Wansbrough:
These MIME types has now been added to the GNOME MIME database:
text/x-haskell for *.hs text/x-literate-haskell for *.lhs
Note the following thread from August 1999: application/x-haskell has already been proposed and used.
http://www.dcs.gla.ac.uk/mail-www/haskell/msg01843.html http://www.dcs.gla.ac.uk/mail-www/haskell/msg01849.html http://www.dcs.gla.ac.uk/mail-www/haskell/msg01853.html
I am aware of that discussion, but I chose text/* anyway.
"application" seems more appropriate for Fritz Ruehr's goal here, which is a script that can be clicked on to make it run (using runhugs, presumably). I can see your reasoning for "text", though. What is used for Javascript code at present? Or for C source code?
I've seen both text/javascript and application/x-javascript being used. GNOME has text/x-c for c code. Generally it has text for all program code in text format. RFC 2045 says: In general, the top-level media type is used to declare the general type of data, while the subtype specifies a specific format for that type of data. Thus, a media type of "image/xyz" is enough to tell a user agent that the data is an image, even if the user agent has no knowledge of the specific image format "xyz". Such information can be used, for example, to decide whether or not to show a user the raw data from an unrecognized subtype -- such an action might be reasonable for unrecognized subtypes of text, but not for unrecognized subtypes of image or audio. [...] Having application/x-haskell as the MIME type means that anyone that hasn't set up a viewer for that MIME type will not see it as text in the browser. So using text/ is a good way of specifying that the fallback of just showing the contents as text is perfectly OK. Even better maybe would be to have source/haskell, but introducing a completely new top-level media type is a bit heavy. Regards, Martin -- Martin Norbäck d95mback@dtek.chalmers.se Kapplandsgatan 40 +46 (0)708 26 33 60 S-414 78 GÖTEBORG http://www.dtek.chalmers.se/~d95mback/ SWEDEN OpenPGP ID: 3FA8580B
Martin writes:
Generally it has text for all program code in text format.
RFC 2045 says: [..] [..] Such information can be used, for example, to decide whether or not to show a user the raw data from an unrecognized subtype -- such an action might be reasonable for unrecognized subtypes of text, but not for unrecognized subtypes of image or audio. [...]
OK, that convinces me. --KW 8-) -- Keith Wansbrough <kw217@cl.cam.ac.uk> http://www.cl.cam.ac.uk/users/kw217/ University of Cambridge Computer Laboratory.
participants (2)
-
Keith Wansbrough -
Martin Norbäck