author | wenzelm |
Tue, 28 Oct 1997 17:58:35 +0100 | |
changeset 4029 | 22f2d1b17f97 |
parent 1478 | 2b8c2a7547ab |
child 11316 | b4e71bd751e4 |
permissions | -rw-r--r-- |
1478 | 1 |
(* Title: ZF/ex/Data.thy |
515 | 2 |
ID: $Id$ |
1478 | 3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
515 | 4 |
Copyright 1994 University of Cambridge |
5 |
||
6 |
Sample datatype definition. |
|
7 |
It has four contructors, of arities 0-3, and two parameters A and B. |
|
8 |
*) |
|
9 |
||
935 | 10 |
Data = Datatype + |
515 | 11 |
|
12 |
consts |
|
1401 | 13 |
data :: [i,i] => i |
515 | 14 |
|
15 |
datatype |
|
16 |
"data(A,B)" = Con0 |
|
17 |
| Con1 ("a: A") |
|
18 |
| Con2 ("a: A", "b: B") |
|
19 |
| Con3 ("a: A", "b: B", "d: data(A,B)") |
|
20 |
||
21 |
end |