• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
      • B*
        • B*-binders
          • ACL2::patbind-ret
          • ACL2::patbind-stobj-get
          • Patbind-match
          • Patbind-when
          • Patbind-assocs
          • Patbind-the
          • Patbind-nths*
          • Patbind-er
          • Patbind-nths
          • Patbind-faig
          • Patbind-fun
          • Patbind-run-when
          • Patbind-pattern
          • Patbind-mv
          • Patbind-list*
          • Patbind-list
          • Patbind-cmp
          • Patbind-with-stolen
          • Patbind-with-fast
          • Patbind-unless-casematch
            • Patbind-cons
            • Patbind-access
            • Patbind-extract-keyword-args
            • Patbind-run-unless
            • Patbind-free-on-exit
            • Patbind-unless
            • Patbind-local-stobjs
            • Patbind-if
            • Patbind-getargs
            • Patbind-run-if
            • Patbind-state-global
            • Patbind-vl-read-zip-header-ret
            • Patbind-test-glmc-interp-nonhyps-ret
            • Patbind-test-glmc-interp-hyps-ret
            • Patbind-glmc-generic-interp-nonhyps-ret
            • Patbind-glmc-generic-interp-hyps-ret
          • Def-b*-binder
        • Defunc
        • Fty
        • Std/util
        • Apt
        • Defdata
        • Defrstobj
        • Seq
        • Match-tree
        • Defrstobj
        • With-supporters
        • Def-partial-measure
        • Template-subst
        • Soft
        • Defthm-domain
        • Event-macros
        • Def-universal-equiv
        • Def-saved-obligs
        • With-supporters-after
        • Definec
        • Sig
        • Outer-local
        • Data-structures
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Testing-utilities
      • Math
    • B*-binders

    Patbind-unless-casematch

    b* binder for using case-match against a single pattern.

    The following example shows the usage of unless-casematch inside a b* form. pattern is a pattern for case-match.

    (b* (((unless-casematch obj (a . b))
          (er hard? 'my-form "Expected obj to match (a . b) but it didn't")))
       (cw "The car is ~x0 and the cdr is ~x1~%" a b))

    This expands to:

    (case-match obj
      ((a . b) (cw "The car is ~x0 and the cdr is ~x1~%" a b))
      (& (er hard? 'my-form "Expected obj to match (a . b) but it didn't")))