What use of `inst` produced `Nothing`?

Sam

On Tue, Sep 29, 2015 at 3:46 PM, Matthias Felleisen
<[email protected]> wrote:
>
> On Sep 29, 2015, at 3:25 PM, Sam Tobin-Hochstadt <[email protected]> wrote:
>
>> I think something problematic is happening with type inference here,
>> and better types could be picked. Right now, Typed Racket is doing
>> this:
>>
>>   (compose (λ (x) x) (inst (λ #:forall (a) ({x : a}) x) Nothing))
>>
>> when it should probably do
>>
>>   (compose (λ (x) x) (inst (λ #:forall (a) ({x : a}) x) Any))
>>
>> However, using polymorphic arguments (such as your second function)
>> to polymorphic functions (such as `compose`) in general won't produce
>> the results you want, and I recommend writing the instantiation you
>> want explicitly.
>
>
>
> Well yes, that's where I started with inst. The Nothing told me I was on the 
> wrong track with inst.
>
> What you might be saying is 'use inst for compose'.
>
> -- Matthias
>
>
>
>
>
>>
>> Sam
>>
>> On Tue, Sep 29, 2015 at 2:33 PM, Matthias Felleisen
>> <[email protected]> wrote:
>>>
>>> Why does this
>>>
>>>> (compose (λ (x) x) (λ #:forall (a) ({x : a}) x))
>>>
>>> have this type:
>>>
>>>> - : (-> Nothing Any)
>>>
>>> Thanks -- Matthias
>>>
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "Racket Developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to [email protected].
>>> To post to this group, send email to [email protected].
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/racket-dev/7E7C582D-7066-4073-AAFD-9B6CA99F1F1E%40ccs.neu.edu.
>>> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-dev/CAK%3DHD%2BYzanSwPXAG_kE1V7YCJKpYJ8PNEF0ZdZ6eHvy2VNyRaA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to