Appendix B. Base Libraries

Table of Contents
Boolean
Integer
Nat
Char
String
List
Compare
Option
Functions

The base libraries are automatically imported by every user-defined spec.

This appendix provides a brief description of the sorts and ops in the current base libraries. The title of each section of this appendix is the qualifier of the sort-names and op-names given therein. For example, the full op-name for op ~ described in Section "Boolean" is Boolean.~.

Boolean

Sort

sort Boolean

Ops

Name Fixity Sort Description
~  Boolean -> Boolean logical negation
& infixr 15 Boolean * Boolean -> Boolean logical and
or infixr 14 Boolean * Boolean -> Boolean logical or
=> infixr 13 Boolean * Boolean -> Boolean logical implication
<=> infixr 12 Boolean * Boolean -> Boolean logical equivalence
~= infixr 20 fa(a) a * a -> Boolean inequality (logical exclusive or)
toString  Boolean -> String converts Boolean value to string
show  Boolean -> String same as toString
compare  Boolean * Boolean -> Comparison compares two Boolean values