[Ur] last type decl wins?

Adam Chlipala adamc at impredicative.com
Sat Apr 16 13:04:19 EDT 2011


Marc Weber wrote:
> Excerpts from Adam Chlipala's message of Sat Apr 16 17:21:39 +0200 2011:
>    
>> I think of almost every Haskell program as an "incomprehensible
>> entangled mess," because of implicit mutual recursion spread across
>> files!
>>      
> You're talking about this, correct?
>
>      a = b
>
>      b = a
>
> without a "and" ?
>    

Yes, that's an example of implicit mutual recursion.  Vag's follow-up 
example is even worse, because the "recursion" is entirely accidental.

> I don't expect there being a perfect way at all.
>    

Indeed.  I propose restricting further discussion of this issue to 
empirical results with reasonable scientific validity.  (That should 
keep anyone busy for a while! :D)

> May I conclude from that that urweb should support overloading? :)

It does, with type classes, just as in Haskell.

> Do you have some specific function names in mind which share a name but
> have slightly different behaviour?
>
> would map and queryX be such cases?
>    

I would say these deserve to be distinguished, because the latter 
requires side effects, while the former does not.



More information about the Ur mailing list