Commit Graph

4 Commits

Author SHA1 Message Date
Markus Triska
567af2648c support must_be(var, ...) 2019-10-16 19:18:38 +02:00
Markus Triska
43f7743467 ENHANCED: Better error handling if Type is invalid.
Strictly speaking, type is currently not a type, so a domain error is
appropriate if Type is not a valid type. However, there are also other
cases where new types have been introduced in the past, and this
seems a good candidate for a new type. Let us hence use a type error.

Example:

    ?- can_be(listi, [a,b|Ls]).
    %@ ERROR: Type error: `type' expected, found `listi' (an atom)
2018-09-30 23:36:32 +02:00
Markus Triska
373546e83d correct can_be/2 for partial lists
Example:

    ?- can_be(list, [a,b|Ls]).
    %@ true.
2018-09-28 18:20:57 +02:00
Mark Thom
a97987c20b add error.pl, correct numbervars/3 2018-09-27 22:40:23 -06:00