www

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

aliases.rkt (1057B)


      1 #lang typed/racket/base (require phc-toolkit/is-typed)
      2 (provide (all-from-out racket/match)
      3      4      5          …+
      6          attr
      7          when-attr
      8          @
      9          match-λ
     10          match-λ*
     11          match-λ**
     12          generate-temporary
     13          true?
     14          false?)
     15   
     16 (require racket/match)
     17   
     18 (require (only-in racket/base
     19                   [compose ∘]
     20                   [... …])
     21          (only-in racket/bool
     22                   false?)
     23          (only-in syntax/parse
     24                   [...+ …+])
     25          (only-in phc-toolkit/untyped-only/syntax-parse
     26                   [attribute* attr]
     27                   [attribute* @]))
     28 
     29 (define-syntax-rule (when-attr a e)
     30   (if (attr a) e #'()))
     31   
     32 (require (only-in racket/match
     33                   [match-lambda match-λ]
     34                   [match-lambda* match-λ*]
     35                   [match-lambda** match-λ**]))
     36   
     37 (require/typed racket/syntax [generate-temporary (→ Any Identifier)])
     38 
     39 (if-typed
     40  (require (only-in alexis/bool true?))
     41  (require (only-in typed/alexis/bool true?)))