[Haskell-cafe] If you'd design a Haskell-like language, what would you do different?

Hans Aberg haberg-1 at telia.com
Mon Dec 26 20:53:23 CET 2011


On 26 Dec 2011, at 19:29, AUGER Cédric wrote:

> Le Mon, 26 Dec 2011 18:20:55 +0100,
> Hans Aberg <haberg-1 at telia.com> a écrit :
> 
>> On 26 Dec 2011, at 16:11, AUGER Cédric wrote:
>> 
>>> Under Xorg, "XCompose" might be your friend! I have a whole bunch of
>>> them for Coq programing.
>>> 
>>> Having something like:
>>> 
>>> ---------8<---------------------------------------------------------
>>> # ~/.XCompose contents:
>>> 
>>> # the Compose file of the xorg distribution to have a lot
>>> # of useful symbols such as "☭" ^^
>>> include "/usr/local/lib/X11/locale/en_US.UTF-8/Compose"
>>> # the Compose file that could be included in Haskell distributions
>>> include "/usr/local/share/haskell/Compose"
>>> # other personnal notations
>>> ------->8-----------------------------------------------------------
>>> # /usr/local/share/haskell/Compose contents:
>>> 
>>> # maybe to be downloaded via a Hackage cabal package?
>>> # of course "<Multi_key> <H>" should be replaced by a
>>> # user specified combo
>>> <Multi_key> <H> <colon> <colon> : "∷"
>>> <Multi_key> <H> <greater> <greater> <greater> : "⋙"
>>> <Multi_key> <H> <less> <less> <less> : "⋘"
>>> <Multi_key> <H> <less> <minus> <less> : "↢" U2919
>>> <Multi_key> <H> <greater> <minus> <greater> : "↣" U291A
>>> <Multi_key> <H> <minus> <less> <less> : U291B
>>> <Multi_key> <H> <greater> <greater> <minus> : U291C
>>> <Multi_key> <H> <a> <l> <l> : "∀"
>>> <Multi_key> <H> <e> <x> : "∃"
>>> <Multi_key> <H> <a> <n> <d> : "∧"
>>> <Multi_key> <H> <o> <r> : "∨"
>>> <Multi_key> <H> <a> <b> <s> <t> : "λ"
>>> <Multi_key> <H> <c> <o> <m> <p> : "∘"
>>> <Multi_key> <H> <minus> <greater> : "→"
>>> --------8<----------------------------------------------------------
>>> 
>>> But if you are under Windows, or Mac OS, I cannot tell (as well as I
>>> cannot tell if you are under a POSIX system not running xorg, such
>>> as the tty1..ttyn consoles)
>> 
>> On OS X one can make ones owns key maps, like with the program on the
>> link below, but it is very time consuming.

>> http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=ukelele
>> 
> I have heard of ukelele (but I didn't remembered the name as I am not
> a Mac OS user); I have heard it was a rather dirty solution, but that
> should work.

I think so, too.

> I guess that having a Haskell (or any script language by
> the way) patching the xml file (and able to "unpatch" if we want to
> uninstall) and make possible to get that patch via Hackage could be a
> solution (it would be time consuming for the patch writer, but then
> any Mac OS user would benefit it).
> 
> Of course it would only work for the basic Haskell notations, for
> custom ones, I guess it would be interesting to have a program which
> reads a "XCompose like" file (which is quite easy to edit) and generate
> the xml file for ukelele.
> 
> Note that the rest of the Haskell cafe mailing list won't be able to
> read my response since it seems that I cannot post on the list (I
> subscribed 2 years ago and never posted; waiting to learn and Haskell
> and then read the mailing list, but I learnt Haskell only about one
> month ago).

If one had a way to replace ASCII multicharacter symbols, that might be easier.

Hans





More information about the Haskell-Cafe mailing list