Here's a proposal that attempts to synthesise prior discussion. It
support the features I want without imposing overhead on Eli.

;; Base Types

(define-type (Dict Key Value)
  (U (HashTable Key Value) (Listof (Pair Key Value))))

(define-type Name (Listof Symbol))
(define-type Info (Dict Symbol Any))

;; Test Results

(struct: Test-Info ([name : Name] [info : Info] [result: Test-Result]))

(define-type Test-Result (U success failure))

(struct: Success ())
;; Skipped and Pending are a subtype of Success -- report it if you support it
(struct: Skipped Success ())
(struct: Pending Success ())

(struct: Failure ([exn : (U exn #f)]))
;; An error is a failure that occurred outside a testing construct --
report it if you support it
(struct: Error Failure ())

N.
_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Reply via email to