~nytpu/dbc-scheme

dbc-scheme/contracts.sld -rw-r--r-- 828 bytes
c2dccf9anytpu add license file 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
;;; contracts.sld --- R7RS Design by Contracts
;;;
;;; Copyright (c) 2022 nytpu <alex [at] nytpu.com>
;;; SPDX-License-Identifier: MPL-2.0
;;; Home Page: <https://git.sr.ht/~nytpu/dbc-scheme>

;;> Design-by-Contracts for R7RS Scheme.
;;>
;;> This adds functionality to add pre- and post-condition contracts to
;;> functions, in a manner similar to
;;> \hyperlink[https://learn.adacore.com/courses/intro-to-ada/chapters/contracts.html]{Ada's subprogram contracts}.
;;>
;;> View additional details at the
;;> \hyperlink[https://git.sr.ht/~nytpu/dbc-scheme]{project's repository}.
;;>
;;> \bold{TODO:} Add type contracts for records and/or atoms.
(define-library (nytpu contracts)
  (export lambda-contract
          define-contract)
  (import (scheme base)
          (scheme lazy)
          (srfi 1))
  (include "contracts.scm"))