Re: [Haskell-cafe] cpphs calls error when it finds an #error declaration

2013-08-28 Thread Niklas Hambüchen
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 do

Re: [Haskell-cafe] cpphs calls error when it finds an #error declaration

2013-08-28 Thread Malcolm Wallace
On 27 Aug 2013, at 08:33, Niklas Hambüchen wrote: > @Malcolm, would you mind a change towards throwing an exception that is > different from error so that it can be easily caught, or even better, a > change from > >runCpphs :: ... -> IO String > > to > >runCpphs :: ... -> IO (Either St