Hi Vlatko.
On 2 July 2013 16:03, Vlatko Basic wrote:
> Is there a nicer way to extract the 'IO String' from 'IOS',
> without 'case' or without pattern matching the whole 'P'?
>
You might enjoy the newtype package.
http://hackage.haskell.org/package/newtype
Hope this helps,
Ozgur.
Hi Adrian.
On Sat, Jul 6, 2013 at 2:40 PM, Adrian May
wrote:
> Is this a practical way to write Android and iPhone code? I don't mean
> console programs, I mean realistic smartphone apps.
Umm... Is your question "Is Ajhc's goal that build the compiler for Android"?
If so, the answer is No.
The A
> Here you go:
> import Control.Exception
> import Data.Typeable
> syncExceptions :: SomeException -> Maybe SomeException
> syncExceptions e
> | Just _ <- cast e :: Maybe AsyncException = Nothing
> | otherwise = Just e
Thanks, but it doesn't work as expected:
*Main> syncExceptio
* Nikita Karetnikov [2013-07-06 20:12:58+0400]
> > Here you go:
>
> > import Control.Exception
> > import Data.Typeable
>
> > syncExceptions :: SomeException -> Maybe SomeException
> > syncExceptions e
> > | Just _ <- cast e :: Maybe AsyncException = Nothing
> > | otherwise = Jus