[racket] Typed Racket vs. Haskell

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Fri Sep 21 14:36:25 EDT 2012

On Fri, Sep 21, 2012 at 2:29 PM,  <thorsopia at lavabit.com> wrote:
> One more question.
>
> I've been told that there are no typeclasses in TR.
> How would you handle this?
>
> foo :: (Ord a) => a -> a -> a

Racket doesn't have a general notion of ordering, so we'd probably
write this function like this:

(: foo : (All (A) (A A -> Boolean) A A -> A))
(define (foo cmp left right) ...)

On the more general question, Racket has struct properties and the
generics system built on them.  We would like to integrate Typed
Racket with these facilities, but that has not happened yet.
-- 
sam th
samth at ccs.neu.edu

Posted on the users mailing list.