
What I wrote under "Allowing hyphens in identifiers" and what Richard O'Keefe wrote earlier under "A new form of newtype" caused me to think. It was pointed out that hyphens are not permitted in Haskell identifiers much as they are in Lisp for good cause even though such a feature is regarded by some as especially desirable. It is technically feasible (or at least appears to be). It is a matter of what constitutes good language design. My suggestion was to whip up a makeshift preprocessor to make the necessary substitutions. It might be better to go about it in a fashion similar to how one would use Haskell to create a new language using Happy, but instead of making a full fledged language create a language that makes only minor adjustments to the official language where most of the original source code and command line options are copied verbatim with a handful of things caught such as the Richard O'Keefe newtype, a nano-language if you will. Actually I have known about this possibility for years. There is always something you would like to change about whatever language you are working with and so I have put thought into it. It would make prototyping of new ideas easier. It would furthermore make it possible to make changes that would be unacceptable for an official version of the language such as hyphens in place of underscores for those who feel the benefit of being able to use hyphens this way outweigh the problems it may cause. The official language remains intact. Broadly speaking I am talking about a preprocessor, but one tailored for the needs of Haskell. For related art see Ciao Prolog (see http://ciaohome.org). They are using their preprocessor to do some rather sophisticated things which include program analysis and optimization. Something so elaborate may not be necessary, however. Just some Happy code that has been cobbled together that address some of the issues involved that is reworked to satisfy a special need.

John,
It might be better to go about it in a fashion similar to how one would use Haskell to create a new language using Happy, but instead of making a full fledged language create a language that makes only minor adjustments to the official language where most of the original source code and command line options are copied verbatim with a handful of things caught such as the Richard O'Keefe newtype, a nano-language if you will. Actually I have known about this possibility for years. There is always something you would like to change about whatever language you are working with and so I have put thought into it.
What about¯syntax macros? http://people.cs.uu.nl/arthurb/data/Macros/Manual.pdf Cheers, Stefan

Stefan, I managed to look at the paper and yeah you may be onto something. I
am certainly open to ideas. Looks promising. There needs to be a standard
way to extend the language without having to concern oneself with everything
that goes under the hood. There is certainly an interest in this. It is like
what everyone wants for Christmas.
--------------------------------------------------
From: "Stefan Holdermans"
John,
It might be better to go about it in a fashion similar to how one would use Haskell to create a new language using Happy, but instead of making a full fledged language create a language that makes only minor adjustments to the official language where most of the original source code and command line options are copied verbatim with a handful of things caught such as the Richard O'Keefe newtype, a nano-language if you will. Actually I have known about this possibility for years. There is always something you would like to change about whatever language you are working with and so I have put thought into it.
What about¯syntax macros? http://people.cs.uu.nl/arthurb/data/Macros/Manual.pdf
Cheers,
Stefan

I delved a little more deeper into http://people.cs.uu.nl/arthurb/data/Macros/Manual.pdf. I'm uncertain if I am able to understand the value of what its authors are proposing. The emphasis appears to be on extending the syntax of the language at runtime, but like so what. My impression after skimming a portion of the paper is they are advocating a bottom up approach whereas I am advocating a top down approach. Our orientation appears to be different.
participants (2)
-
John D. Earle
-
Stefan Holdermans