Add a new answer
Either add an answer for a new language or add an alternative
A description is only necessary when the code is not suitably 'obvious' or to justify an alternative approach.
import Control.Monad.Error data AdmittanceError = TooTall | TooShort | RefusedForReason String | RefusedForNoReason instance Error AdmittanceError where noMsg = RefusedForNoReason strMsg str = RefusedForReason str
Declare custom exception types which can be thrown with 'Control.Monad.Error's 'throwError' and caught with 'catchError'.
Created by: sam
Edit this answer
Edit the language, code and description simultaneously.