cur/bool.rkt
William J. Bowman 26ac41f104 Splitting modules and cleaning up; most tests pass
* Split prop, nat, bool, maybe, and stlc into modules
* Reverted proofs-for-free stuff to the pre-me-fucking-about version,
  and cleaned it up.
* Fixed redex-curnel test suite. Redefinition of module+ was causing
  issues.
* Moved various var stuff to oll.
* Moved stlc examples to seperate module.
2015-01-31 00:43:07 -05:00

20 lines
400 B
Racket

#lang s-exp "redex-curnel.rkt"
(provide bool btrue bfalse if bnot)
(data bool : Type
(btrue : bool)
(bfalse : bool))
(define-syntax (if syn)
(syntax-case syn ()
[(_ t s f)
#'(case t
[btrue s]
[bfalse f])]))
(define (bnot (x : bool)) (if x bfalse btrue))
(module+ test
(require rackunit)
(check-equal? (bnot btrue) bfalse)
(check-equal? (bnot bfalse) btrue))