• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Ethereum
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • Zcash
      • Des
      • X86isa
      • Sha-2
      • Yul
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Axe
      • Poseidon
      • Where-do-i-place-my-book
      • Aleo
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
              • Dynamic-semantics
                • Execution
                • Values
                • Dynamic-environments
                • Arithmetic-operations
                • Curve-parameterization
                • Shift-operations
                • Errors
                • Value-expressions
                • Locations
                • Input-execution
                  • Eval-input-item-list
                  • Eval-input-item
                  • Funarg
                  • Funarg-option
                    • Funarg-option-fix
                    • Funarg-option-case
                      • Funarg-option-equiv
                      • Funarg-option-some
                      • Funarg-option-none
                      • Funarg-optionp
                    • Eval-input-section-list
                    • Eval-input-section
                    • Eval-input-file
                    • Funarg-result
                    • Funarg-list-result
                    • Funarg-list
                  • Edwards-bls12-generator
                  • Equality-operations
                  • Logical-operations
                  • Program-execution
                  • Ordering-operations
                  • Bitwise-operations
                  • Literal-evaluation
                  • Type-maps-for-struct-components
                  • Output-execution
                  • Tuple-operations
                  • Struct-operations
                • Compilation
                • Static-semantics
                • Concrete-syntax
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Funarg-option

    Funarg-option-case

    Case macro for the different kinds of funarg-option structures.

    This is an ACL2::fty sum-type case macro, typically introduced by fty::defflexsum or fty::deftagsum. It allows you to safely check the type of a funarg-option structure, or to split into cases based on its type.

    Short Form

    In its short form, funarg-option-case allows you to safely check the type of a funarg-option structure. For example:

    (funarg-option-case x :none)

    can be used to determine whether x is a none instead of some other kind of funarg-option structure.

    Long Form

    In its longer form, funarg-option-case allows you to split into cases based on the kind of structure you are looking at. A typical example would be:

    (funarg-option-case x
      :none ...
      :some ...)

    It is also possible to consolidate ``uninteresting'' cases using :otherwise.

    For convenience, the case macro automatically binds the fields of x for you, as appropriate for each case. That is, in the :none case, you can use fty::defprod-style foo.bar style accessors for x without having to explicitly add a none b* binder.