To follow up on my own post. I implemented the overloaded strings
last night and it seems to work pretty well. I've not done anything
about defaulting yet. I don't know how much of a problem this will
be in practice.
On Nov 10, 2006, at 22:49 , Lennart Augustsson wrote:
I think it's
what about pattern matching?
Yes, pattern matching is the issue that occurs to me too.
While string literals :: ByteString would be nice (and other magic
encoded in string literals, I guess), what is the story for pattern
matching on strings based on non-inductive types like arrays?
In my experience I've seen more requests for overloaded *Boolean* literals than
strings. In a Fran context, for example.
Simon
| -Original Message-
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
| Lennart Augustsson
| Sent: 11 November 2006 03:49
| To: Haskell Prime
|
Hello Simon,
Monday, November 13, 2006, 8:27:08 PM, you wrote:
In my experience I've seen more requests for overloaded *Boolean*
literals than strings. In a Fran context, for example.
what you mean by this? а few days ago i've published in cafe small lib
that allows to write things like (str
But if is a keyword hardwired to work with Bool. You can't write
if str then 0 else 1. This makes your solution seem like an add-on.
I suppose that if haskell' added a Boolean class, it presumably would
translate if/then/else to make use of it, so the above would start
working just by adding
On Mon Nov 13 12:27:08 EST 2006, Simon Peyton-Jones wrote:
In my experience I've seen more requests for overloaded *Boolean*
literals than strings. In a Fran context, for example.
Has there been discussion of the related issue, described in a Pan
paper as 'Unfortunately, the Bool type is wired
While for finite signals both have meaning, ie.
[1,2,3] [1,2,1] == True
[1,2,3] * [1,2,1] == [False,False,True]
Also, as the signature I gave implied,
[1,2,3] * [1,2,1] == [0,0,1]
And ifE etc., all as described in the paper I mentioned without
referencing:
'Compiling Embedded
Oh, I'll take booleans too! But those are easier to fudge with the
existing prelude (which I have).
On Nov 13, 2006, at 12:27 , Simon Peyton-Jones wrote:
In my experience I've seen more requests for overloaded *Boolean*
literals than strings. In a Fran context, for example.
Simon
|