aboutsummaryrefslogtreecommitdiff
path: root/frontend/StdCompare.dcl
blob: f9cebea685715a51e341718bb98be68160986d57 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
definition module StdCompare

import syntax, compare_constructor

::	CompareValue :== Int
Smaller :== -1
Greater	:== 1
Equal	:== 0

class (=<) infix 4 a :: !a !a -> CompareValue

instance =< Int, Expression, {# Char}, Ident, [a] | =< a, BasicType //, (Global a) | =< a

instance =< Type, SymbIdent

instance == BasicType, TypeVar, AttributeVar, AttrInequality, TypeSymbIdent, DefinedSymbol, 
			TypeContext , BasicValue, FunKind, (Global a) | == a, Priority, Assoc, Type, 
			ConsVariable, SignClassification, TypeCons, TCClass

instance < MemberDef

smallerOrEqual :: !Type !Type -> CompareValue