[Haskell-cafe] out-commented code vs. case with redundant pattern matches
lemming at henning-thielemann.de
Thu Nov 30 09:28:52 UTC 2017
On Wed, 29 Nov 2017, Sergiu Ivanov wrote:
> Thus quoth Henning Thielemann on Wed Nov 29 2017 at 11:04 (+0100):
>> Occasionally I have multiple implementations of the same task and want to
>> choose one quickly but statically. I do not want to out-comment unused
>> branches because they shall still be type checked. So far I used this
>> case 0::Int of
>> 0 -> putStrLn "A"
>> 1 -> putStrLn "B"
>> _ -> putStrLn "C"
I have filed a GHC ticket:
More information about the Haskell-Cafe