:- module(_,_,[]).

% An example of (non-recursive) types: dates

weekday('Monday').
weekday('Tuesday').
weekday('Wednesday').
weekday('Thursday').
weekday('Friday').
weekday('Saturday').
weekday('Sunday').

day_of_month(1).
day_of_month(2).
% ...
day_of_month(31).

date(date(W,D)) :- weekday(W), day_of_month(D).

% Sample queries:
%
% Checking if something is a date:
% ?- date(date('Monday',31)).
%
% Checking something that is not a date:
% ?- date(date(a,31)).

% Generating dates (the terms of the type):
% ?- date(D).


% -> 'Property'-based testing for free!
