types : string -> (string * int) list

SYNOPSIS
Lists the types in the named theory.

DESCRIBE
The function types should be applied to a string which is the name of an ancestor theory (including the current theory; the special string "-" is always interpreted as the current theory). It returns a list of all the type constructors declared in the named theory, in the form of arity-name pairs.

FAILURE
Fails unless the named theory is an ancestor.

EXAMPLE
   - load "rich_listTheory";

   - itlist union (map types (ancestry "-")) [];
   > val it =
       [("one", 0), ("option", 1), ("num", 0), ("sum", 2), 
        ("recspace", 1), ("prod", 2), ("list", 1), ("bool", 0),
        ("ind", 0), ("fun", 2)]
     : (string * int) list

SEEALSO  ancestry,   axioms,   constants,   definitions,   infixes,   new_type,   new_type_definition,   parents

HOL  Kananaskis 0