[Ur] C type for Ur/Web list type

Artyom Shalkhakov artyom.shalkhakov at gmail.com
Thu Apr 14 07:14:58 EDT 2016


2016-04-14 17:02 GMT+06:00 Adam Chlipala <adamc at csail.mit.edu>:
> On 04/14/2016 06:53 AM, Artyom Shalkhakov wrote:
>>
>> there is this question: what C types do [list string] and [option string]
>> map to? I think that [option string] probably maps to a nullable pointer to
>> uw_Basis_string. What about the list constructor?
>
>
> That's a tricky one.  There is actually no support for parametric
> polymorphism in the FFI.  Every [list a] type is compiled to a separate C
> struct.
>

Okay. The use-case is this: I'm decoding/encoding URI parameters in an
Ur/Web program, naively. That involves a lot of string concatenation.
Is there another (preferably external-dependency-free) approach to
this?

> _______________________________________________
> Ur mailing list
> Ur at impredicative.com
> http://www.impredicative.com/cgi-bin/mailman/listinfo/ur



-- 
Cheers,
Artyom Shalkhakov



More information about the Ur mailing list