[Haskell-cafe] out-commented code vs. case with redundant pattern matches
doug at cs.dartmouth.edu
Wed Nov 29 13:33:52 UTC 2017
Surely GHC is too clever by half in asserting that just 1 of two
impossible branches is redundant in the code
> case 0::Int of
> 0 -> putStrLn "A"
> 1 -> putStrLn "B"
> _ -> putStrLn "C"
The assertion suggests that GHC code optimization would leave
some useless vestige of the third case,
The long-range solution to Thielmann's quandry is a bug report.
More information about the Haskell-Cafe