#836: rebindable if-then-else syntax
----------------------------------+-----------------------------------------
Reporter: nibro | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: _|_
Component: Compiler (Parser) | Version: 6.13
Keywords: | Testcase: N/A
Blockedby: | Difficulty: Unknown
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
----------------------------------+-----------------------------------------
Comment(by nibro):
To clarify my original proposal:
I want {{{if e then a else b}}} to translate to {{{cond e a b}}} for
whatever {{{cond}}} is in scope, whatever its type. A pure syntactic
interpretation, making no semantic considerations whatsoever, exactly as
simonpj writes in
[http://hackage.haskell.org/trac/ghc/ticket/836#comment:6 comment 6].
I don't want to involve {{{case}}} in this, as I consider {{{case}}} to be
more primitive. The whole point of the proposal is that {{{if e then a
else b}}} should ''not'' be equal to
{{{
cond e a b = case e of
True -> a
False -> b
}}}
This should be the default (Prelude) implementation of {{{cond}}}, nothing
more.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/836#comment:13>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs