We should consider writing a subsection in the Exceptions article about how to declare polymorphic exceptions and how to get the type variable 'a in scope of the declaration. Some things that could be included:
- Example of a bad polymorphic exception declaration (i.e. declaring a polymorphic exception top-level).
- Motivation for why a polymorphic exception declaration should have a polymorphic type variable in scope. I think a good way to motivate this would be by comparing polymorphic datatype declarations to exception declarations.
- Showing how we can get
'a in scope of a polymorphic exception declaration.
- (optional) Brief aside about explicit type variable quantification in
fun and val declarations in SML.
We should consider writing a subsection in the Exceptions article about how to declare polymorphic exceptions and how to get the type variable
'ain scope of the declaration. Some things that could be included:'ain scope of a polymorphic exception declaration.funandvaldeclarations in SML.