module Test where if :: Bool -> (a -> a) -> a -> a if False _ = id if True f = f
- rGHC Glasgow Haskell Compiler
Unit Tests Skipped
- Build Status
Buildable 13612 Build 19804: [GHC] Linux/amd64: Patch building Build 19803: [GHC] OSX/amd64: Continuous Integration Build 19802: [GHC] Windows/amd64: Continuous Integration
So i can define terms named if, then, and else ☺
I consider if-then-else a wart, but simply deleting it would break too many programs.
Can we run this through the ghc proposals process?
Yep, i'll do so.
I am marking as 'abandoned'; the reaction at ghc-proposals was rather negative and currently I don't see a prospect for merging this.
In principle, if we add mixfix operators to the language in the future we could revive this - however, I don't expect this to be done soon.