| Why not just let
|
| if x then y else z
|
| be syntactic sugar for
|
| Prelude.ifThenElse x y z
The burden of my original message was that
a) this is reasonable, but
b) it would have to become the *defined behaviour*
As you say, the "defined behaviour" would have to cover
guards as
On Fri, Feb 16, 2001 at 05:13:10PM +, Marcin 'Qrczak' Kowalczyk wrote:
Fri, 16 Feb 2001 04:14:24 -0800, Simon Peyton-Jones [EMAIL PROTECTED] pisze:
Here I think the right thing is to say that desugaring for boolean
constructs uses a function 'if' assumed to have type
if ::
On 21-Feb-2001, Marcin 'Qrczak' Kowalczyk [EMAIL PROTECTED] wrote:
Wed, 21 Feb 2001 12:55:37 +1100, Fergus Henderson [EMAIL PROTECTED] pisze:
The documentation in the Haskell report does not say what
`fromInteger' should do for `Int', but the Hugs behaviour definitely
seems preferable,
William Lee Irwin III [EMAIL PROTECTED] pisze:
literal "0" gets mapped to zero :: AdditiveMonoid t = t
literal "1" gets mapped to one :: MultiplicativeMonoid t = t
literal "5" gets mapped to (fromPositiveInteger 5)
literal "-9" gets mapped to (fromNonZeroInteger -9)
On
Fri, 16 Feb 2001 04:14:24 -0800, Simon Peyton-Jones [EMAIL PROTECTED] pisze:
[Incidentally, if this is nhc's behaviour, it's not H98.
The Report (tries to) stress that you get the "fromInt from the actual
standard Prelude" regardless of what is in scope. That's why I'm not
going to make it
Thu, 15 Feb 2001 20:56:20 -0800, William Lee Irwin III [EMAIL PROTECTED] pisze:
literal "5" gets mapped to (fromPositiveInteger 5)
literal "-9" gets mapped to (fromNonZeroInteger -9)
Note that when a discussed generic Prelude replacement
framework is done, and ghc's rules are
William Lee Irwin III [EMAIL PROTECTED] pisze:
literal "5" gets mapped to (fromPositiveInteger 5)
literal "-9" gets mapped to (fromNonZeroInteger -9)
On Fri, Feb 16, 2001 at 05:42:17PM +, Marcin 'Qrczak' Kowalczyk wrote:
Note that when a discussed generic Prelude replacement
On Wed, Feb 14, 2001 at 02:19:39PM -0800, Simon Peyton-Jones wrote:
The most immediate and painful stumbling block in Haskell 98 is that
numeric literals, like 3, turn into (Prelude.fromInt 3), where
"Prelude.fromInt" really means "the fromInt from the standard Prelude"
regardless of whether
On 15-Feb-2001, William Lee Irwin III [EMAIL PROTECTED] wrote:
Some reasonable assumptions:
I disagree about the reasonableness of many of your assumptions ;-)
(1) lists are largely untouchable
I want to be able to write a Prelude that has lists as a strict data
type, rather than a
| On Mon, Feb 12, 2001 at 02:38:25PM -0800, William Lee Irwin III wrote:
| I had in mind looking within the compiler, actually. Where in the
| compiler? It's a big program, it might take me a while to do an
| uninformed search. I've peeked around a little bit and not gotten
| anywhere.
|
|
10 matches
Mail list logo