Appendix B. Inbuilts and Base Libraries

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

This appendix provides a brief description of the types and operators that are either "inbuilt" or provided by the current base libraries. The base libraries are automatically imported by every user-defined spec. The title of each section of this appendix is the qualifier of the type- and op-names given therein. For example, the full name for op ++ described in Section "List" is List.++. However, for the unary operator - on integers, the qualifier is Integer_ . Note, also, that inbuilts cannot be qualified.

For the sake of brevity, infixl is abbreviated below to L and infixr to R.

Inbuilts

Inbuilt Type

Boolean

Inbuilt Ops

Name Fixity Type Description
= R 20 [a] a * a -> a tests if the parameters are equal
~= R 20 [a] a * a -> a tests if the parameters are unequal
~  Boolean -> Boolean logical negation
&& R 15 Boolean * Boolean -> Boolean non-strict logical and
|| R 14 Boolean * Boolean -> Boolean non-strict logical or
=> R 13 Boolean * Boolean -> Boolean non-strict logical implication
<=> R 12 Boolean * Boolean -> Boolean logical equivalence
<< L 25 {x:A,...,y:B,...} * {x:A,...,z:C,...} -> {x:A,...,y:B,...,z:C,...} see Section Applications under record update