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.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to