[Ur] Tooling: type of an expression

Simon Van Casteren simon.van.casteren at gmail.com
Wed Oct 24 04:11:52 EDT 2018


Is there a possibility for -dumpTypes to also dump values in let bindings?

Op do 11 okt. 2018 om 16:33 schreef Adam Chlipala <adamc at csail.mit.edu>:

> Well, you could take advantage of the type-inference daemon and run a new
> compilation job with your extra expression added to the build.
> On 10/11/2018 02:56 AM, Simon Van Casteren wrote:
>
> I think that would get me to the first level: getting types of
> identifiers. Do you see any way to evaluate expressions and getting the
> types of those?
>
> This is something that would definitely be worth it for me, so I'll be
> implementing it unless I can't figure it out :).
>
> Simon
>
> On Thu, Oct 11, 2018, 5:20 AM Adam Chlipala <adamc at csail.mit.edu> wrote:
>
>> I'm sure it's more than just remotely possible and is just a question of
>> someone getting hands dirty and writing the code!  The baseline of a
>> whole-program compiler could make it trickier than for many other
>> toolsets, but it could work to periodically run "compiles" through type
>> inference, saving the results to hidden files.
>>
>> On 10/10/2018 08:22 PM, Simon Van Casteren wrote:
>> > Urweb tooling is pretty limited compared to other languages. I knew
>> > that when I started with it and so far I'm OK with it. Honestly, most
>> > of the "modern" tooling I see in other ecosystems is a waste of time.
>> >
>> > However, the one thing that would really cut dev time in half for me
>> > in Ur/web (slightly exaggerated for effect) would be being able to
>> > have the compiler tell me the type of an expression. You can go
>> > multiple levels deep here:
>> >
>> > - type of an identifier
>> > - type of an expression at top level
>> > - type of an expression in function definition, let-binding, etc
>> >
>> > I'm sending this email to the mailing list to ask if something like
>> > this is remotely possible, what kind of approach we can take and how
>> > we could go about implementing it.
>> >
>> > Any help much appreciated
>>
> _______________________________________________
> Ur mailing list
> Ur at impredicative.com
> http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20181024/5fc4d0d7/attachment.html>


More information about the Ur mailing list