
Hello, I would like the announce the release of my package unicode-symbols: http://hackage.haskell.org/package/unicode-symbols It offers alternative symbols for a number of common functions and operators from the base and containers packages. When used in combination with the language extension UnicodeSyntax you can write really nice code. The only thing missing is a nice λ symbol. The documentation on hackage should be pretty self explanatory. For each symbol the documentation gives its exact definition. The source code however, probably due to a bug in hscolour, is totally unreadable. To view the sources simply download the package and use a text editor. I tried to be conservative with the choice of unicode symbols. I have defined the division sign (÷) to be (/). But it could just as well be defined as 'div'. I do not know what would be the logical choice. Another choice that could lead to some discussion is the definition of (⊂) to be 'Data.Set.isProperSubsetOf' and (⊆) to be 'Data.Set.isSubsetOf'. An alternative choice would be to have (⊊) for 'isProperSubsetOf' and (⊂) for 'isSubsetOf'. I choose the former because it is more symmetrical with (<) and (≤). This package was inspired by unicode-prelude from Péter Diviánszky: http://hackage.haskell.org/package/unicode-prelude Regards, Roel van Dijk

On Dec 10, 2009, at 2:58 AM, Roel van Dijk wrote:
I tried to be conservative with the choice of unicode symbols. I have defined the division sign (÷) to be (/). But it could just as well be defined as 'div'.
No it couldn't. One expects 3÷2 to be 1½, not 1. You will, for example, find this text on the web: "Mathematically, the division sign is equivalent to the forward slash. Thus, for example, 4 ÷ 5 = 4/5 = 0.8" This is actually historically backwards. When I was a nipper, 1/6 meant "one and six" or "eighteen pence" or at least three loaves of good bread. As far as I'm aware, the use of "/" instead of "÷" is a computerism introduced in the days of 6 bit character sets.
Another choice that could lead to some discussion is the definition of (⊂) to be 'Data.Set.isProperSubsetOf' and (⊆) to be 'Data.Set.isSubsetOf'. An alternative choice would be to have (⊊) for 'isProperSubsetOf' and (⊂) for 'isSubsetOf'.
Mathematicians may use the plain horseshoe for either subset or proper subset, depending on the author. But I've never ever seen anyone use the horseshoe with an equals bar for proper subset; that would really make no sense. I suggest that you take the Z formal specification language as your guide (plain horseshoe is proper subset, horseshoe with equal bar is subset-or-equal). If you don't like Z, try B: same thing.

2009/12/9 Richard O'Keefe
On Dec 10, 2009, at 2:58 AM, Roel van Dijk wrote:
I tried to be conservative with the choice of unicode symbols. I have defined the division sign (÷) to be (/). But it could just as well be defined as 'div'.
No it couldn't. One expects 3÷2 to be 1½, not 1. You will, for example, find this text on the web: "Mathematically, the division sign is equivalent to the forward slash. Thus, for example, 4 ÷ 5 = 4/5 = 0.8" This is actually historically backwards. When I was a nipper, 1/6 meant "one and six" or "eighteen pence" or at least three loaves of good bread. As far as I'm aware, the use of "/" instead of "÷" is a computerism introduced in the days of 6 bit character sets.
Another choice that could lead to some discussion is the definition of
(⊂) to be 'Data.Set.isProperSubsetOf' and (⊆) to be 'Data.Set.isSubsetOf'. An alternative choice would be to have (⊊) for 'isProperSubsetOf' and (⊂) for 'isSubsetOf'.
Mathematicians may use the plain horseshoe for either subset or proper subset, depending on the author. But I've never ever seen anyone use the horseshoe with an equals bar for proper subset; that would really make no sense.
The second notation uses a horseshoe with an equals bar and a _slash_ through it to indicate proper subset, and I have seen that several times before; however, I prefer the first notation style.
I suggest that you take the Z formal specification language as your guide (plain horseshoe is proper subset, horseshoe with equal bar is subset-or-equal). If you don't like Z, try B: same thing.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- James Hall

2009/12/10 Richard O'Keefe
On Dec 10, 2009, at 2:58 AM, Roel van Dijk wrote:
I tried to be conservative with the choice of unicode symbols. I have defined the division sign (÷) to be (/). But it could just as well be defined as 'div'.
No it couldn't. One expects 3÷2 to be 1½, not 1. You will, for example, find this text on the web: "Mathematically, the division sign is equivalent to the forward slash. Thus, for example, 4 ÷ 5 = 4/5 = 0.8" This is actually historically backwards. When I was a nipper, 1/6 meant "one and six" or "eighteen pence" or at least three loaves of good bread. As far as I'm aware, the use of "/" instead of "÷" is a computerism introduced in the days of 6 bit character sets.
Ok, this makes me happy I choose (/) instead of 'div'.
Another choice that could lead to some discussion is the definition of (⊂) to be 'Data.Set.isProperSubsetOf' and (⊆) to be 'Data.Set.isSubsetOf'. An alternative choice would be to have (⊊) for 'isProperSubsetOf' and (⊂) for 'isSubsetOf'.
Mathematicians may use the plain horseshoe for either subset or proper subset, depending on the author. But I've never ever seen anyone use the horseshoe with an equals bar for proper subset; that would really make no sense.
As James Hall pointed out there is actually a tiny slash trough the equal bar underneath the horseshoe. The fact that this is hard to see is another reason why I choose the first option.
I suggest that you take the Z formal specification language as your guide (plain horseshoe is proper subset, horseshoe with equal bar is subset-or-equal). If you don't like Z, try B: same thing.
Yes, this is how I have defined things in the current version. Thank you for your comments, Roel
participants (3)
-
James Hall
-
Richard O'Keefe
-
Roel van Dijk