[Ur] Building site templates
Adam Chlipala
adamc at impredicative.com
Tue Dec 6 19:23:35 EST 2011
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
>>
More information about the Ur
mailing list