<div dir="ltr"><div>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. </div><div><br></div><div>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.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 28, 2014 at 3:53 AM, Tom Ellis <span dir="ltr"><<a href="mailto:tom-lists-haskell-cafe-2013@jaguarpaw.co.uk" target="_blank">tom-lists-haskell-cafe-2013@jaguarpaw.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, Nov 28, 2014 at 11:44:16AM +0000, Andrew Butterfield wrote:<br>
> Condsider the following Haskell program (fragment):<br>
><br>
> f 0 = “zero”<br>
> g 0 = “NULL”<br>
> f n = “non-zero”<br>
> g n = “PRESENT”<br>
><br>
> This will result in two “Multiple Declaration” errors.<br>
<br>
</span>Here's a somewhat silly answer, but it may be of help.<br>
<br>
data T = F | G<br>
<br>
fun :: T -> Int -> String<br>
fun F 0 = "zero"<br>
fun G 0 = "NULL"<br>
fun F n = "non-zero"<br>
fun G n = "PRESENT"<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div>