_SystemEnumStrict.dcl 2.13 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
definition module _SystemEnumStrict;

from StdClass import class Enum (..), class IncDec,class +(+),class -(-),class zero(zero),class one(one),class Ord (..),class < (<),<=,inc;
from StdBool import not;

import _SystemStrictLists;

_from_s  :: !a -> .[!a]  | IncDec a			special { a=Int };
_from_ts :: !a -> .[a!]  | IncDec a			special { a=Int };
_from_sts:: !a -> .[!a!] | IncDec a			special { a=Int };
_from_u  :: !a -> .[#a]  | IncDec,UList a	special { a=Int };
_from_uts:: !a -> .[#a!] | IncDec,UTSList a	special { a=Int };
_from_o  :: a -> .(l a) | IncDec a & List l a
	special {
		l=[],a=Int;
		l=[!],a=Int;
		l=[ !],a=Int;
		l=[!!],a=Int;
		l=[#],a=Int;
		l=[#!],a=Int;
	};

_from_to_s   :: !a !a -> .[!a]  | Enum a			special { a=Int };
_from_to_ts  :: !a !a -> .[a!]  | Enum a			special { a=Int };
_from_to_sts :: !a !a -> .[!a!] | Enum a			special { a=Int };
_from_to_u   :: !a !a -> .[#a]  | Enum,UList a		special { a=Int };
_from_to_uts :: !a !a -> .[#a!] | Enum,UTSList a	special { a=Int };
_from_to_o   :: !a !a -> .(l a) | Enum a & List l a
	special {
		l=[],a=Int;
		l=[!],a=Int;
		l=[ !],a=Int;
		l=[!!],a=Int;
		l=[#],a=Int;
		l=[#!],a=Int;
	};

38 39 40 41 42 43
_from_then_s   :: !a a -> .[!a]   | Enum a			special { a=Int };
_from_then_ts  :: !a !a -> .[a!]  | Enum a			special { a=Int };
_from_then_sts :: !a !a -> .[!a!] | Enum a			special { a=Int };
_from_then_u   :: !a a -> .[#a]   | Enum,UList a	special { a=Int };
_from_then_uts :: !a !a -> .[#a!] | Enum,UTSList a	special { a=Int };
_from_then_o   :: a a -> .(l a)   | Enum a & List l a
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
	special {
		l=[],a=Int;
		l=[!],a=Int;
		l=[ !],a=Int;
		l=[!!],a=Int;
		l=[#],a=Int;
		l=[#!],a=Int;
	};

_from_then_to_s   :: !a !a !a -> .[!a]  | Enum a			special { a=Int };
_from_then_to_ts  :: !a !a !a -> .[a!]  | Enum a			special { a=Int };
_from_then_to_sts :: !a !a !a -> .[!a!] | Enum a			special { a=Int };
_from_then_to_u   :: !a !a !a -> .[#a]  | Enum,UList a		special { a=Int };
_from_then_to_uts :: !a !a !a -> .[#a!] | Enum,UTSList a	special { a=Int };
_from_then_to_o   :: !a !a !a -> .(l a) | Enum a & List l a
	special {
		l=[],a=Int;
		l=[!],a=Int;
		l=[ !],a=Int;
		l=[!!],a=Int;
		l=[#],a=Int;
		l=[#!],a=Int;
	};