The problem seems to boil down to the fact that (at least in every IDE I am aware of) the order in which the compiler reads your code is the same as the order in which the code is displayed to you as you write it. 

A general solution would be to extend the IDE to allow hyperlinks, ignored by the compiler, from one part of the code to another. It is something one could write in Emacs Lisp, to work across multiple languages.

On Fri, Nov 28, 2014 at 3:53 AM, Tom Ellis <tom-lists-haskell-cafe-2013@jaguarpaw.co.uk> wrote:
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