[plt-scheme] Predicates from Types

From: Sam TH (samth at ccs.neu.edu)
Date: Wed Apr 1 19:43:29 EDT 2009

On Wed, Apr 1, 2009 at 7:01 PM, Paulo J. Matos <pocmatos at gmail.com> wrote:
> Is there then a way to extract a predicate from a type? Given I assume
> the answer is no, what's the best solution for this?
> Right now I had to define :
> (: Predicate? (Any -> Boolean))
> (define (Predicate? u)
>     (or (Quantifier? u) (Logic-Predicate? u) ...))

This is the right solution, but you probably want the type:

(: Predicate? (Any -> Boolean : Predicate))

sam th
samth at ccs.neu.edu

Posted on the users mailing list.