Changeset 37525 in project


Ignore:
Timestamp:
04/07/19 14:25:14 (10 months ago)
Author:
megane
Message:

Document all argument

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/scrutinizer

    r36680 r37525  
    2929=== Some functions
    3030==== (match-types t1 t2 #!optional (typeenv (type-typeenv `(or ,t1 ,t2))) all)
    31 The heart of the scrutinizer. Basically returns {{#t}} iff {{t2}} is a
    32 subtype of (or of equal type to) {{t1}}.
     31The heart of the scrutinizer.
    3332
    34 In addition, mutates typeenv if unification happens.
     33Let {{V_(t)}} denote the set of runtime values the type {{t}} stands
     34for. Examples:
     35
     36{{V_(boolean) = {#t, #f}}}
     37
     38{{V_(integer) = {0, 1, -1, 2, -2, ...}}}
     39
     40{{V_((or boolean integer)) = {#t, #f, 0, 1, -1, 2, -2, ...}}}
     41
     42When {{all}} is true {{match-types}} returns {{#t}} iff {{V_(t2)}} is
     43a subset of {{V_t1}}.
     44
     45When {{all}} is false {{match-types}} returns {{#t}} iff the sets
     46{{V_(t2)}} and {{V_(t1)}} intersect.
     47
     48If {{all}} is true and {{match-types}} is true then it's safe to
     49specialize.
     50
     51If {{all}} is false and {{match-types}} if false it's safe to issue
     52warning without risking a false positive.
     53
     54In addition, this function mutates {{typeenv}} and the {{trail}} if
     55unification happens.
    3556
    3657==== scrutinize -> (walk n e loc dest tail flow ctags)
Note: See TracChangeset for help on using the changeset viewer.