userError package:ghc-lib-parser

Construct an IOError value with a string describing the error. The fail method of the IO instance of the Monad class raises a userError, thus:
instance Monad IO where
...
fail s = ioError (userError s)