summaryrefslogtreecommitdiff
path: root/ast/predicates.scm
blob: 20dfc13fefcd49d0adf1fdd909a957390e7781d8 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
;;; predicates.scm -- various useful predicates, collected from other places
;;;
;;; author :  Sandra Loosemore
;;; date   :  19 Mar 1992
;;;


;;; Some predicates on patterns (used by CFN)

(define-integrable (var-or-wildcard-pat? p)
  (or (is-type? 'wildcard-pat p)
      (is-type? 'var-pat p)))

(define-integrable (irrefutable-pat? p)
  (or (is-type? 'wildcard-pat p)
      (is-type? 'var-pat p)
      (is-type? 'irr-pat p)))