String literals

Dan Weston westondan at imageworks.com
Mon Nov 13 17:11:19 EST 2006


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 instance Boolean String.

Dan

Bulat Ziganshin wrote:
> 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" && 0 || 1)
> 
> 




More information about the Haskell-prime mailing list