On Fri, Nov 28, 2014 at 11:44:16AM +0000, Andrew Butterfield wrote:
> Condsider the following Haskell program (fragment):
>
> f 0 = “zero”
> g 0 = “NULL”
> f n = “non-zero”
> g n = “PRESENT”
>
> This will result in two “Multiple Declaration” errors.
Here's a somewhat silly answer, but it may be of help.
data T = F | G
fun :: T -> Int -> String
fun F 0 = "zero"
fun G 0 = "NULL"
fun F n = "non-zero"
fun G n = "PRESENT"
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe