[racket] Typed racket and sort

From: Norman Gray (norman at astro.gla.ac.uk)
Date: Wed Aug 3 18:49:43 EDT 2011

Vincent, hello.

On 2011 Aug 3, at 20:17, Vincent St-Amour wrote:

>> I suspect I'm not grokking something important about polymorphic
>> functions, but I don't know what.
> 
> Inference does not currently work well with function that take keyword
> arguments. The solution in cases like this, is to instantiate the type
> variables manually:
>  ((inst sort String String) ss string<?)
> Here, you're making explicit that you're using sort to sort a list of
> Strings, and that Strings will be used as keys.

Thanks -- this makes sense.  And works.

----

While I'm on the subject of typed/racket, I've been trying 5.1.2's DrRacket with #lang typed/racket, without success.

In a freshly-opened DrRacket, if I have nothing but "#lang typed/racket" in the top window, and press 'Run', I get in the interactions window:

> Welcome to DrRacket, version 5.1.2 [3m].
> Language: typed/racket; memory limit: 128 MB.
> link: module mismatch, probably from old bytecode whose dependencies have changed: variable not provided (directly or indirectly and at the expected position) from module: "/Data/LocalApplications/Racket/5.1.2/collects/typed-scheme/tc-setup.rkt" accessed from module: "/Data/LocalApplications/Racket/5.1.2/collects/typed-scheme/core.rkt" at source phase level: 0 in: parse-invis-kw6.1
> > 

I think it should not do that!

Any typing in the interaction window produces the same response.

%  /Data/LocalApplications/Racket/5.1.2/bin/racket -l typed/racket -i

...works fine.

I'm not aware of having anything particularly odd in my setup.

Best wishes,

Norman


-- 
Norman Gray  :  http://nxg.me.uk
School of Physics and Astronomy, University of Glasgow, UK




Posted on the users mailing list.