
Yesterday's changes to sugar broke some things: * case isn't smart enough to infer the right things in all cases yet, so added previously existing case* for when it is necessary. * reexport define-theorem and qed from sugar, since still used in prop.
19 lines
474 B
Racket
19 lines
474 B
Racket
#lang s-exp "../cur.rkt"
|
|
(require "sugar.rkt")
|
|
(provide Maybe none some)
|
|
|
|
(data Maybe : (forall (A : Type) Type)
|
|
(none : (forall (A : Type) (Maybe A)))
|
|
(some : (forall* (A : Type) (a : A) (Maybe A))))
|
|
|
|
(module+ test
|
|
(require rackunit "bool.rkt")
|
|
#;(check-equal?
|
|
(case (some Bool true)
|
|
[(none (A : Type)) IH: ()
|
|
false]
|
|
[(some (A : Type) (x : A)) IH: ()
|
|
;; TODO: Don't know how to use dependency yet
|
|
(if x true false)])
|
|
true))
|