add 'Error (ErrorType m)' to some functions