[Ur] last type decl wins?

Adam Chlipala adamc at impredicative.com
Sat Apr 16 08:58:01 EDT 2011


Vag Vagoff wrote:
> On 13.04.2011 4:13, Adam Chlipala wrote:
>> This behavior is just as in ML or Haskell. You are shadowing a 
>> definition, but the old definition doesn't "go away," it just becomes 
>> impossible to reference. At the end of the file, [y] has a type that 
>> refers to an out-of-scope identifier, but that isn't problematic 
>> semantically.
>
> No, in Haskell you can shadow only by local (let or where) 
> definitions, not top level.
> There is,
>  - toplevel definition in current module clashes with any imported 
> definitions (there is why "hiding" is used)
>  - toplevel definition in current module clashes with other toplevel 
> definitions in current module

Ah, thanks for the correction.  I should stop making claims about 
Haskell without doing some programming in it first. ;)



More information about the Ur mailing list