[Ur] Building site templates

James Parker jp at jamesparker.me
Sat Dec 10 19:39:24 EST 2011


Thank you for the help. It's helped me track down what was going wrong.

Personally, I feel as though the error messages could be improved. As a newcomer, I found the overload of error messages overwhelming. Perhaps if there are actual errors, the type inference unification messages could be suppressed. Also, if the offending file is in the working directory, only the file name could be shown instead of the entire path.

I also had a few more questions. What exactly do the brackets [] do? Also, Is there a reason I can't name an sql column "Name"? I get the following error when I attempt to do so:

syntax error: deleting  COMMA NAME COLON

Thanks,

JP

On Dec 6, 2011, at 7:23 PM, Adam Chlipala wrote:

> austin seipp wrote:
>> As for the inference errors: they are bad, but they generally point
>> you around the code at fault as they did here, if you go by the error
>> line #s and look around. You'll get intuition for the actual errors
>> (in all their verbosity) as you keep going forward. The compiler does
>> tricky things for its unification algorithm to work in the presence of
>> the powerful Ur type system, so sometimes the inferred types can seem
>> confusing as an example.
>>   
> 
> I just want to add that I think the messages below are just fine! :)  You have to understand the Ur type system to use Ur/Web, and the first error message explains the problem quite directly.  The following error messages wind up being fairly nonsensical, because the first error injects an ill-kinded constructor.
> 
> It is my intention that the official Ur/Web tutorial:
>    http://www.impredicative.com/ur/tutorial/
> explains all the context needed to understand these error messages.  If that's not the case, specific suggestions will be appreciated!
> 
>> On Tue, Dec 6, 2011 at 3:33 PM, James Parker<jp at jamesparker.me>  wrote:
>>   
>>> I've tried xml, body, and xhtml. Is there some other type I can try? If I simply define sidebar inside template, the project will compile and run correctly.
>>> 
>>> The source is available here if it's helpful:
>>> 
>>> https://github.com/jprider63/UMDTalks
>>> 
>>> Here's the full error message:
>>> 
>>> /home/james/Projects/UMDTalks/common.urs:4:32-4:35: Wrong kind
>>> Constructor:  Basis.xml
>>>  Have kind:  {Unit} ->  {Type} ->  {Type} ->  Type
>>>  Need kind:  Type
>>> Incompatible kinds
>>> Kind 1:  {Unit} ->  {Type} ->  {Type} ->  Type
>>> Kind 2:  Type
>>>     
> 
> 
> _______________________________________________
> Ur mailing list
> Ur at impredicative.com
> http://www.impredicative.com/cgi-bin/mailman/listinfo/ur




More information about the Ur mailing list