
28 Aug
2013
28 Aug
'13
8:34 p.m.
On 29/08/13 00:43, Malcolm Wallace wrote:
Have you tried simply wrapping the call to runCpphs in a "catch"? Something like
safeRunCpphs :: ... -> IO (Either String String) safeRunCpphs foo = fmap Right (runCpphs foo) `catch` (\(UserError s)-> Left s
Yes, that is what I'm doing at the moment. The problem with this is that it does not allow me to distinguish between a programmer error (error) on the caller or implementation side, and an #error in the input file.