In the code below, can `maybe-car` have the given type without using 
typed/racket/unsafe?

#lang typed/racket
(require typed/racket/unsafe)

(module untyped racket
  (provide maybe-car)
  (define (maybe-car x)
    (cond
      [(pair? x) (car x)]
      [else x])))

(unsafe-require/typed
 'untyped
 [maybe-car (All (a b) (case->
                        (-> (Pairof a b) a)
                        (-> a a)))])

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/c8a25880-8127-405c-b862-95c4c3694440%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to