add {-# LANGUAGE ScopedTypeVariables #-} in REPL.hs
and add type signature of the exception otherwise
when compile it will produce some errors.