You're probably using IO (or System.IO) try. If you want imprecise
exceptions (I think that's the right name), you want to use
Control.Exception versions of try/catch/bracket/etc.
Prelude> :m IO
Prelude IO> :t try
forall a. IO a -> IO (Either GHC.IOBase.Exception a)
Prelude IO> try (error "a")
**
Hi all,
I'm trying to get exception handling working in GHC, but don't seem to be
able to make it work. Am I likely to be missing a compiler switch, or
something?
Cutting things down to basics, I'd have thought that the following
expression (typed at the ghci command prompt) should work: