Hi Ben,
Thank you for your answer.
On Thursday, February 20, 2020 at 3:29:15 AM UTC+1, Ben Greenman wrote:
>
> On 2/19/20, unlimitedscolobb > wrote:
> >
> > []
> >
> > ;Type Checker: Type a could not be converted to a contract because it
> > contains free variables.
> > ; in: a
> >
On 2/19/20, unlimitedscolobb wrote:
>
> []
>
> ;Type Checker: Type a could not be converted to a contract because it
> contains free variables.
> ; in: a
>
> Does this mean that I can never cast to types containing type variables?
Yes
> My original problem comes from playing around with ev
Hello,
I'm trying to get something similar to the following code working:
#lang typed/racket
(: f (-> Integer Any))
(define (f x) (+ 1 x))
(: g (All (a) (-> Integer a)))
(define (g x) (f x))
Of course, this gets me a type error:
;Type Checker: type mismatch
; expected: a
; given: Any
;
3 matches
Mail list logo