SML# Document Version 4.1.0
23 Declarations of the core language and their interfaces

23.5 Exception declaration : exnDecl

Syntax of exception declaration is given below.

exnDecl ::=  exception exbind
exbind ::= (op)? vid (of ty)? (and exbind)?

This defines an exception constructor optionally with an argument of type ty.

23.5.1 Exception specification : exnSpec

Syntax of exception specification is the same as exception declaration.

23.5.2 Examples

The following are examples of exception declarations and their interface.

Data.sml file: exception Fail of string Data.smi file: exception Fail of string