• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Error-checking
        • Apt
        • Abnf
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Prime-field-constraint-systems
        • Soft
        • Bv
        • Imp-language
        • Event-macros
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
        • Prime-fields
        • Java
        • C
        • Syntheto
        • Number-theory
        • Cryptography
        • Lists-light
        • File-io-light
          • Read-file-into-byte-array-stobj
          • Read-file-into-character-array-stobj
          • Write-strings-to-file!
          • Write-strings-to-file
          • Write-bytes-to-file!
          • Read-object-from-file
          • Write-strings-to-channel
            • Write-bytes-to-file
            • Write-bytes-to-channel
            • Read-objects-from-file
            • Read-file-into-byte-list
            • Read-file-into-character-list
          • Json
          • Built-ins
          • Solidity
          • Axe
          • Std-extensions
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Execloader
        • Axe
      • Testing-utilities
      • Math
    • File-io-light

    Write-strings-to-channel

    Write strings to an output channel.

    ;; Returns state.
    (defund write-strings-to-channel (strings channel state)
      (declare (xargs :guard (and (string-listp strings)
                                  (symbolp channel)
                                  (open-output-channel-p channel :character state))
                      :stobjs state
                      :guard-hints (("Goal" :in-theory (enable open-output-channel-p)))))
      (if (endp strings)
          state
        (pprogn (princ$ (car strings) channel state) ;todo: call something faster? (e.g., something that only works for strings)?
                (write-strings-to-channel (cdr strings) channel state))))