| Did you know ... | Search Documentation: |
| Packs (add-ons) for SWI-Prolog |
| Title: | Support for type definitions |
|---|---|
| Rating: | |
| Latest version: | 0.1.9 |
| SHA1 sum: | 1a11149629e7dfea8f670fae5efd322d071bab78 |
| Author: | Samer Abdallah <s.abdallah@ucl.ac.uk> |
| Download URL: | https://raw.githubusercontent.com/samer--/prolog/master/typedef/release/typedef-0.1.9.tgz |
library(mavis), etc.
This package provides library(typedef), a small library for
processing type declarations.
See library(typedef) module header for more information.
This is a small test file that you can use to check if it works.
:- use_module(library(typedef)).
:- type maybe(A) ---> nothing; just(A).
:- type natural == nonneg.
%% test(+A:natural, +B:maybe(natural)) is det.
test(A,B) :-
must_be(natural,A),
must_be(maybe(natural),B).
Pack contains 5 files holding a total of 47.6K bytes.