www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

ck.rkt (759B)


      1 #lang typed/racket/base
      2 
      3 (require phc-toolkit
      4          (for-syntax racket/base
      5                      syntax/parse
      6                      type-expander/expander
      7                      phc-toolkit/untyped))
      8 
      9 (provide check-equal?-values:)
     10 
     11 (define-syntax check-equal?-values:
     12   (syntax-parser
     13     [(_ actual {~maybe :colon type:type-expand!} expected ...)
     14      (quasisyntax/top-loc this-syntax
     15        (check-equal?: (call-with-values (ann (λ () actual)
     16                                              (-> #,(if (attribute type)
     17                                                        #'type.expanded
     18                                                        #'AnyValues)))
     19                                         (λ l l))
     20                       (list expected ...)))]))
     21