1Complete: module 2{ 3 PATH: con "/dis/lib/complete.dis"; 4 5 Completion: adt { 6 advance: int; # whether forward progress has been made 7 complete: int; # whether the completion now represents a file or directory 8 str: string; # string to advance, suffixed " " (file) or "/" (directory) 9 nmatch: int; # number of files that matched 10 filename: array of string; # their names 11 }; 12 13 init: fn(); 14 complete: fn(dir, s: string): (ref Completion, string); 15}; 16